diff --git a/assets/AnimatedWave-CPwzka9L.js b/assets/AnimatedWave-Ctq8iFvb.js similarity index 98% rename from assets/AnimatedWave-CPwzka9L.js rename to assets/AnimatedWave-Ctq8iFvb.js index 35d22cf259fd6c5fc05b16be21ff7f676f2f0238..4369e6cebf00a55ef650ef887d5409a90a494b98 100644 --- a/assets/AnimatedWave-CPwzka9L.js +++ b/assets/AnimatedWave-Ctq8iFvb.js @@ -1,3 +1,3 @@ -import{b as e}from"./Basic-6NscZoIc.js";import{bS as t,c5 as n,c6 as r,c8 as i,cI as a,cN as o,cb as s,cd as c,ci as l,d2 as u,d7 as d,dK as f,dQ as p,dR as m,dS as h,dT as g,dU as _,dV as v,dW as y,dX as b,dY as x,dZ as S,db as C,dj as w,dk as T,e0 as E,e2 as D,e3 as O,e5 as k,e6 as A,e7 as j,e9 as M,ea as N,eb as P,ec as F,ed as I,ee as L,eg as R,ek as z,el as B,en as V,eo as H,n as U,o as W,p as G,q as K,r as q,w as J,x as Y,z as X}from"./index-BqrqTEsQ.js";import{b as Z,c as Q,d as ee}from"./HeaderLink-D6jJjgut.js";import{d as $,e as te,f as ne}from"./Scenes-2Kp3NQ_V.js";function re(e,t){let n=ne(e,t?.in);if(!te(n))throw RangeError(`Invalid time value`);let r=t?.format??`extended`,i=t?.representation??`complete`,a=``,o=r===`extended`?`-`:``,s=r===`extended`?`:`:``;if(i!==`time`){let e=$(n.getDate(),2),t=$(n.getMonth()+1,2),r=$(n.getFullYear(),4);a=`${r}${o}${t}${o}${e}`}if(i!==`date`){let e=$(n.getHours(),2),t=$(n.getMinutes(),2),r=$(n.getSeconds(),2),i=a===``?``:` `;a=`${a}${i}${e}${s}${t}${s}${r}`}return a}const ie={},ae={class:`cross-background-container`};function oe(e,t){return k(),y(`div`,ae,[j(e.$slots,`default`,{},void 0,!0)])}var se=o(ie,[[`render`,oe],[`__scopeId`,`data-v-455eb62c`]]);const ce={"mb-1":``,"w-full":``,"gap-2":``},le={"w-full":``};var ue=S({__name:`Header`,setup(e){return(e,t)=>(k(),y(`header`,ce,[g(`div`,le,[x(Z)]),x(z(u),{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:I(()=>t[0]||=[g(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),de=ue,fe=`/assets/worker-_4r9VDQB.js`;const pe={relative:``,px:`{D().then(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})}),c(async()=>{D().then(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})}),(e,r)=>{let s=M(`auto-animate`);return k(),y(`div`,pe,[r[3]||=g(`div`,{"flex-1":``},null,-1),L((k(),y(`div`,{ref_key:`chatHistoryRef`,ref:t,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[r[2]||=g(`div`,{"flex-1":``},null,-1),(k(!0),y(p,null,A(z(i),(e,t)=>(k(),y(`div`,{key:t,"mb-2":``},[e.role===`error`?(k(),y(`div`,me,[g(`div`,he,[g(`div`,ge,[g(`div`,_e,[g(`span`,ve,H(z(n)(`stage.chat.message.character-name.core-system`)),1)]),r[0]||=g(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),z(a)&&t===z(i).length-1?(k(),y(`div`,ye)):(k(),y(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base (k(),y(`div`,{key:t},[e.type===`tool-call`?(k(),y(`div`,Te,[g(`div`,Ee,[r[1]||=b(` Called: `,-1),g(`code`,null,H(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(k(),y(`div`,De)):(k(),y(`div`,{key:2,innerHTML:z(o)(e.text)},null,8,Oe))]))),128))])):t===z(i).length-1&&!e.content?(k(),y(`div`,ke)):v(``,!0)])])):e.role===`user`?(k(),y(`div`,Ae,[g(`div`,je,[g(`div`,null,[g(`span`,Me,H(z(n)(`stage.chat.message.character-name.you`)),1)]),e.content?(k(),y(`div`,{key:0,class:`markdown-content break-words`,text:`base {if(!e||!e.trim())return;let t=u.getProviderConfig(f.value);await b(e,{chatProvider:await u.getProviderInstance(f.value),model:p.value,providerConfig:t})}});async function j(){if(!(!a.value.trim()||l.value))try{let e=u.getProviderConfig(f.value);await b(a.value,{chatProvider:await u.getProviderInstance(f.value),model:p.value,providerConfig:e})}catch(e){w.value.pop(),w.value.push({role:`error`,content:e.message})}}let{destroy:M,start:N}=n(v,{onSpeechStart:()=>{o.value=!0},onVADMisfire:()=>{o.value=!1},onSpeechEnd:e=>{o.value=!1,P(e.buffer)},auto:!1});async function P(e){await T.resume();let t=await i(e,T.sampleRate);D({type:`generate`,data:{audio:t,language:`en`}})}return F(_,async e=>{e===!1&&(M(),A())}),F(c,async e=>{e&&await h()}),F([f,p],async()=>{f.value&&p.value&&await C(p.value,await u.getProviderInstance(f.value),[])}),O(()=>{N()}),S(async()=>{a.value=``}),(t,n)=>(k(),y(`div`,Le,[g(`div`,Re,[g(`div`,ze,[x(Ie,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`a.value=e,placeholder:z(E)(`stage.message`),text:`primary-500 hover:primary-600 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`primary-200/20 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:B({"transition-colors-none placeholder:transition-colors-none":z(m)}),onSubmit:j,onCompositionstart:n[1]||=e=>l.value=!0,onCompositionend:n[2]||=e=>l.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])])]))}}),He=Ve;const Ue=[`src`],We=[`src`];var Ge=S({__name:`MobileHeaderLink`,setup(e){let t=C();return(e,n)=>(k(),_(z(u),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:I(()=>[z(t)?(k(),y(`img`,{key:0,src:z(ee),"h-8":``,"w-8":``,class:`theme-colored`},null,8,Ue)):(k(),y(`img`,{key:1,src:z(Q),"h-8":``,"w-8":``,class:`theme-colored`},null,8,We))]),_:1}))}}),Ke=o(Ge,[[`__scopeId`,`data-v-9c3d67a4`]]);const qe={"mb-1":``,"w-full":``,"gap-2":``},Je={"w-full":``,flex:``,"justify-center":``};var Ye=S({__name:`MobileHeader`,setup(e){return(e,t)=>(k(),y(`header`,qe,[g(`div`,Je,[x(Ke)])]))}}),Xe=Ye;const Ze={flex:`~ col`,rounded:`lg`,"overflow-hidden":``},Qe={key:0,flex:``,mr:`12`},$e={flex:`~ col`,shadow:`md violet-200/20 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset {D().then(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})}),s(async()=>{D().then(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})}),(e,r)=>{let o=M(`auto-animate`);return k(),y(`div`,Ze,[L((k(),y(`div`,{ref_key:`chatHistoryRef`,ref:t,"max-h":`35dvh`,"z-5":``,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,class:`chat-history`},[(k(!0),y(p,null,A(z(i),(e,t)=>(k(),y(`div`,{key:t,"mb-2":``},[e.role===`error`?(k(),y(`div`,Qe,[g(`div`,$e,[g(`div`,et,[g(`div`,null,[g(`span`,tt,H(z(n)(`stage.chat.message.character-name.core-system`)),1)]),r[0]||=g(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(k(),y(`div`,{key:0,class:`markdown-content break-words`,text:`base {if(_t.test(e)){let t=Date.prototype[e.replace(_t,`$1UTC`)];t&&(gt.prototype[e]=t)}});var vt=class extends gt{toString(){let e=this.toDateString(),t=this.toTimeString();return`${e} ${t}`}toDateString(){let e=yt.format(this),t=bt.format(this),n=this.getFullYear();return`${e} ${t} ${n}`}toTimeString(){let e=xt.format(this);return`${e} GMT+0000 (Coordinated Universal Time)`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{timeZone:`UTC`,...t})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{timeZone:`UTC`,...t})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{timeZone:`UTC`,...t})}},yt=new Intl.DateTimeFormat(`en-US`,{weekday:`short`,timeZone:`UTC`}),bt=new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,timeZone:`UTC`}),xt=new Intl.DateTimeFormat(`en-GB`,{hour12:!1,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZone:`UTC`});const St=`f837ba6386`,Ct=`main`,wt=`Tue Aug 5 15:59:52 2025 +0800`,Tt={"max-w":`calc[100%-2rem]`,"mx-auto":``,"h-full":``,flex:``,"flex-col":``,"pt-14":``},Et={"flex-1":``},Dt={grid:`~ cols-[70px_1fr]`,"mt-4":``,"gap-2":``,"text-sm":``},Ot={"font-mono":``},kt={"font-mono":``},At={"font-mono":``};var jt=S({__name:`About`,setup(e){let t=R(!1),n=re(new vt(wt));return(e,r)=>(k(),y(p,null,[g(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`About`,onClick:r[0]||=e=>t.value=!t.value},r[2]||=[g(`div`,{"i-solar:info-circle-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),x(z(c),{modelValue:t.value,"onUpdate:modelValue":r[1]||=e=>t.value=e},{default:I(()=>[g(`div`,Tt,[r[7]||=g(`div`,{"font-sans-rounded":``,"mb-14":``,"text-center":``,"text-5xl":``},[g(`span`,{text:`neutral-400 dark:neutral-100/65`},`Project`),b(),g(`span`,{text:`pink-400 dark:pink-300/90`},`AIRI`),g(`div`,{"mt-2":``,"text-base":``},` Web ver. `)],-1),g(`div`,Et,[r[6]||=g(`div`,{text:`neutral-500 dark:neutral-400`},` Application build information `,-1),g(`div`,Dt,[r[3]||=g(`div`,{text:`neutral-500 dark:neutral-400`},` Branch `,-1),g(`div`,Ot,H(z(Ct)),1),r[4]||=g(`div`,{text:`neutral-500 dark:neutral-400`},` Commit `,-1),g(`div`,kt,H(z(St).substring(0,7)),1),r[5]||=g(`div`,{text:`neutral-500 dark:neutral-400`},` Built on `,-1),g(`div`,At,H(z(n)),1)])]),r[8]||=g(`div`,{"my-10":``},[g(`div`,{text:`neutral-500 dark:neutral-400`},` About `),g(`div`,{"mt-4":``,flex:``,"flex-col":``,"gap-2":``},[g(`a`,{class:B([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,href:`https://airi.moeru.ai/docs/`,target:`_blank`},[g(`div`,{"i-solar:home-smile-outline":``}),g(`div`,null,`Home`)]),g(`a`,{href:`https://airi.moeru.ai/docs/en/docs/overview/`,class:B([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,target:`_blank`},[g(`div`,{"i-solar:document-add-outline":``}),g(`div`,null,`Documentations`)]),g(`a`,{href:`https://github.com/moeru-ai/airi`,class:B([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,target:`_blank`},[g(`div`,{"i-simple-icons:github":``}),g(`div`,null,`GitHub`)])])],-1)])]),_:1},8,[`modelValue`])],64))}}),Mt=jt;const Nt={"w-full":``,flex:``,"flex-1":``,"items-center":``,"self-end":``,"justify-end":``,"gap-2":``},Pt={key:0,"w-full":``,flex:``,"justify-between":``,"gap-2":``},Ft={key:0,"i-solar:tuning-outline":``,"size-5":``},It={key:1,"i-solar:alt-arrow-right-outline":``,"size-5":``};var Lt=S({__name:`ViewControls`,props:{modelValue:{required:!0},modelModifiers:{}},emits:E([`reset`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,{stageView:r,stageViewControlsEnabled:i}=d(W()),a=N(e,`modelValue`);function o(e){if(a.value===e){n(`reset`);return}a.value=e}return(e,t)=>(k(),y(`div`,Nt,[x(f,{name:`fade`},{default:I(()=>[z(i)?(k(),y(`div`,Pt,[x(z(l),{variant:`secondary-muted`,toggled:a.value===`x`,"w-full":``,onClick:t[0]||=e=>o(`x`)},{default:I(()=>t[5]||=[b(` X `,-1)]),_:1,__:[5]},8,[`toggled`]),x(z(l),{variant:`secondary-muted`,toggled:a.value===`y`,"w-full":``,onClick:t[1]||=e=>o(`y`)},{default:I(()=>t[6]||=[b(` Y `,-1)]),_:1,__:[6]},8,[`toggled`]),z(r)===`3d`?(k(),_(z(l),{key:0,variant:`secondary-muted`,toggled:a.value===`z`,"w-full":``,onClick:t[2]||=e=>o(`z`)},{default:I(()=>t[7]||=[b(` Z `,-1)]),_:1,__:[7]},8,[`toggled`])):v(``,!0),x(z(l),{variant:`secondary-muted`,toggled:a.value===`scale`,"w-full":``,onClick:t[3]||=e=>o(`scale`)},{default:I(()=>t[8]||=[b(` Scale `,-1)]),_:1,__:[8]},8,[`toggled`])])):v(``,!0)]),_:1}),g(`button`,{"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"justify-self-end":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,title:`View`,text:`neutral-500 dark:neutral-400`,onClick:t[4]||=e=>i.value=!z(i)},[x(f,{name:`fade`,mode:`out-in`},{default:I(()=>[z(i)?(k(),y(`div`,It)):(k(),y(`div`,Ft))]),_:1})])]))}}),Rt=o(Lt,[[`__scopeId`,`data-v-35df7db7`]]);const zt={key:0},Bt={key:0,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Vt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Ht={key:1,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Ut={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Wt={key:2,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Gt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Kt={key:3,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},qt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`};var Jt=S({__name:`Inputs`,props:{mode:{}},setup(e,{expose:t}){let n=e,{stageView:r,stageViewControlsEnabled:i}=d(W()),{scale:o,modelOffset:s,modelSize:c}=d(U()),{scale:l,position:u}=d(K()),p=h({get:()=>{switch(r.value){case`2d`:return u.value.x;case`3d`:return s.value.x;default:return 0}},set:e=>{switch(r.value){case`2d`:u.value.x=e;break;case`3d`:s.value.x=e;break;default:break}}}),m=h(()=>r.value===`2d`?-500:-c.value.x-10),b=h(()=>r.value===`2d`?500:c.value.x+10),S=h({get:()=>{switch(r.value){case`2d`:return u.value.y;case`3d`:return s.value.y;default:return 0}},set:e=>{switch(r.value){case`2d`:u.value.y=e;break;case`3d`:s.value.y=e;break;default:break}}}),C=h(()=>r.value===`2d`?-500:-c.value.y-10),w=h(()=>r.value===`2d`?500:c.value.y+10),T=h({get:()=>{switch(r.value){case`2d`:return 0;case`3d`:return s.value.z;default:return 0}},set:e=>{switch(r.value){case`2d`:break;case`3d`:s.value.z=e;break;default:break}}}),E=h(()=>r.value===`2d`?-500:-c.value.z-10),D=h(()=>r.value===`2d`?500:c.value.z+10),O=h({get:()=>r.value===`2d`?l.value:o.value,set:e=>{r.value===`2d`?l.value=e:o.value=e}});function A(){switch(n.mode){case`x`:p.value=0;break;case`y`:S.value=0;break;case`z`:T.value=0;break;case`scale`:O.value=1;break}}return t({resetOnMode:A}),(e,t)=>(k(),_(f,{name:`fade-side-pops-in`},{default:I(()=>[z(i)?(k(),y(`div`,zt,[x(f,{name:`fade-side-pops-in`,mode:`out-in`},{default:I(()=>[n.mode===`x`?(k(),y(`div`,Bt,[x(z(a),{modelValue:p.value,"onUpdate:modelValue":t[0]||=e=>p.value=e,min:m.value,max:b.value,step:.01,"data-direction":`vertical`,h:`50%`,"write-vertical-left":``},null,8,[`modelValue`,`min`,`max`]),g(`div`,Vt,H(p.value.toFixed(2)),1)])):n.mode===`y`?(k(),y(`div`,Ht,[x(z(a),{modelValue:S.value,"onUpdate:modelValue":t[1]||=e=>S.value=e,min:C.value,max:w.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),g(`div`,Ut,H(S.value.toFixed(2)),1)])):z(r)===`3d`&&n.mode===`z`?(k(),y(`div`,Wt,[x(z(a),{modelValue:T.value,"onUpdate:modelValue":t[2]||=e=>T.value=e,min:E.value,max:D.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),g(`div`,Gt,H(T.value.toFixed(2)),1)])):n.mode===`scale`?(k(),y(`div`,Kt,[x(z(a),{modelValue:O.value,"onUpdate:modelValue":t[3]||=e=>O.value=e,min:0,max:3,step:1e-4,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`]),g(`div`,qt,H(O.value.toFixed(2)),1)])):v(``,!0)]),_:1})])):v(``,!0)]),_:1}))}}),Yt=o(Jt,[[`__scopeId`,`data-v-225b2747`]]);const Xt={fixed:``,"bottom-0":``,"w-full":``,flex:``,"flex-col":``},Zt={relative:``,"w-full":``,"self-end":``},Qt={top:`50%`,"translate-y":`[-50%]`,fixed:``,"z-15":``,"px-3":``},$t={"translate-y":`[-100%]`,absolute:``,"right-0":``,"w-full":``,"px-3":``,"pb-3":``,"font-sans":``},en={flex:`~ col`,"w-full":``,"gap-1":``},tn={key:0,"i-solar:moon-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},nn={key:1,"i-solar:sun-2-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},rn={key:0,"size-5":``,text:`neutral-500 dark:neutral-400`,"inline-flex":``,"items-center":``,"justify-center":``},an={key:1,"size-5":``,text:`neutral-500 dark:neutral-400`,"inline-flex":``,"items-center":``,"justify-center":``};var on=S({__name:`MobileInteractiveArea`,setup(t){let r=C({disableTransition:!1}),i=R(`scale`),a=P(`viewControlsInputs`),o=R(``),s=R(!1),c=R(!1),l=T(),p=Y(),{activeProvider:h,activeModel:b}=d(J());w(document.documentElement,()=>l.update());let{themeColorsHueDynamic:S,stageView:E,stageViewControlsEnabled:D}=d(W()),{enabled:A,selectedAudioInput:j}=d(G()),{send:M,onAfterMessageComposed:N,discoverToolsCompatibility:L}=q(),{messages:H}=d(q()),{t:U}=X();async function K(){if(!(!o.value.trim()||c.value))try{let e=p.getProviderConfig(h.value);await M(o.value,{chatProvider:await p.getProviderInstance(h.value),model:b.value,providerConfig:e})}catch(e){H.value.pop(),H.value.push({role:`error`,content:e.message})}}let{destroy:Z,start:Q}=n(j,{onSpeechStart:()=>{s.value=!0},onVADMisfire:()=>{s.value=!1},onSpeechEnd:e=>{s.value=!1,ee(e)},auto:!1});function ee(e){alert(`Transcription is not implemented yet`)}return F(A,async e=>{e===!1&&Z()}),N(async()=>{o.value=``}),F([h,b],async()=>{h.value&&b.value&&await L(b.value,await p.getProviderInstance(h.value),[])}),O(()=>{Q(),l.update()}),(t,n)=>(k(),y(`div`,Xt,[(k(),_(m,null,[x(f,{name:`fade`},{default:I(()=>[z(D)?v(``,!0):(k(),_(ht,{key:0,"max-w":`[calc(100%-3.5rem)]`,"w-full":``,"self-start":``,"pl-3":``}))]),_:1})],1024)),g(`div`,Zt,[g(`div`,Qt,[x(Yt,{ref:`viewControlsInputs`,mode:i.value},null,8,[`mode`])]),g(`div`,$t,[g(`div`,en,[x(Mt),g(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Theme`,onClick:n[0]||=e=>r.value=!z(r)},[x(f,{name:`fade`,mode:`out-in`},{default:I(()=>[z(r)?(k(),y(`div`,tn)):(k(),y(`div`,nn))]),_:1})]),x(z(u),{to:`/settings`,border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Settings`},{default:I(()=>n[7]||=[g(`div`,{"i-solar:settings-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),_:1,__:[7]}),g(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Stage View`,onClick:n[1]||=e=>E.value=z(E)===`2d`?`3d`:`2d`},[z(E)===`2d`?(k(),y(`div`,rn,n[8]||=[g(`span`,null,`2D`,-1)])):v(``,!0),z(E)===`3d`?(k(),y(`div`,an,n[9]||=[g(`span`,null,`3D`,-1)])):v(``,!0)]),x(Rt,{modelValue:i.value,"onUpdate:modelValue":n[2]||=e=>i.value=e,onReset:n[3]||=()=>a.value?.resetOnMode()},null,8,[`modelValue`])])]),g(`div`,{bg:`white dark:neutral-800`,"max-h-100dvh":``,"max-w-100dvw":``,"w-full":``,flex:``,"gap-1":``,"overflow-auto":``,"px-3":``,"pt-2":``,style:V({paddingBottom:`${Math.max(Number.parseFloat(z(l).bottom.value.replace(`px`,``)),12)}px`})},[x(z(e),{modelValue:o.value,"onUpdate:modelValue":n[4]||=e=>o.value=e,placeholder:z(U)(`stage.message`),border:`solid 2 neutral-200/60 dark:neutral-700/60`,text:`neutral-500 hover:neutral-600 dark:neutral-100 dark:hover:neutral-200 placeholder:neutral-400 placeholder:hover:neutral-500 placeholder:dark:neutral-300 placeholder:dark:hover:neutral-400`,bg:`neutral-100/80 dark:neutral-950/80`,"max-h":`[10lh]`,"min-h":`[calc(1lh+4px+4px)]`,"w-full":``,"resize-none":``,"overflow-y-scroll":``,rounded:`[1lh]`,"px-4":``,"py-0.5":``,"outline-none":``,"backdrop-blur-md":``,"scrollbar-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:B([z(S)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:()=>{},onCompositionstart:n[5]||=e=>c.value=!0,onCompositionend:n[6]||=e=>c.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),o.value.trim()||c.value?(k(),y(`button`,{key:0,w:`[calc(1lh+4px+4px)]`,h:`[calc(1lh+4px+4px)]`,"aspect-square":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-full":``,"outline-none":``,"backdrop-blur-md":``,text:`neutral-500 hover:neutral-600 dark:neutral-900 dark:hover:neutral-800`,bg:`primary-50/80 dark:neutral-100/80 hover:neutral-50`,transition:`all duration-250 ease-in-out`,onClick:K},n[10]||=[g(`div`,{"i-solar:arrow-up-outline":``},null,-1)])):v(``,!0)],4)])]))}}),sn=on;const cn={class:`relative`},ln={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var un=S({__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=R(t.height),r=R(t.amplitude),i=R(t.waveLength),a=R(t.fillColor),o=R(t.direction),s=R(t.movementDirection);function c(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 l=h(()=>n.value+r.value*2),u=h(()=>{let e=` +import{b as e}from"./Basic-JYGX2D37.js";import{bS as t,c5 as n,c6 as r,c8 as i,cI as a,cN as o,cb as s,cd as c,ci as l,d2 as u,d7 as d,dK as f,dQ as p,dR as m,dS as h,dT as g,dU as _,dV as v,dW as y,dX as b,dY as x,dZ as S,db as C,dj as w,dk as T,e0 as E,e2 as D,e3 as O,e5 as k,e6 as A,e7 as j,e9 as M,ea as N,eb as P,ec as F,ed as I,ee as L,eg as R,ek as z,el as B,en as V,eo as H,n as U,o as W,p as G,q as K,r as q,w as J,x as Y,z as X}from"./index-D1IGsMK6.js";import{b as Z,c as Q,d as ee}from"./HeaderLink-CSWG6G--.js";import{d as $,e as te,f as ne}from"./Scenes-ZY5GY3Yk.js";function re(e,t){let n=ne(e,t?.in);if(!te(n))throw RangeError(`Invalid time value`);let r=t?.format??`extended`,i=t?.representation??`complete`,a=``,o=r===`extended`?`-`:``,s=r===`extended`?`:`:``;if(i!==`time`){let e=$(n.getDate(),2),t=$(n.getMonth()+1,2),r=$(n.getFullYear(),4);a=`${r}${o}${t}${o}${e}`}if(i!==`date`){let e=$(n.getHours(),2),t=$(n.getMinutes(),2),r=$(n.getSeconds(),2),i=a===``?``:` `;a=`${a}${i}${e}${s}${t}${s}${r}`}return a}const ie={},ae={class:`cross-background-container`};function oe(e,t){return k(),y(`div`,ae,[j(e.$slots,`default`,{},void 0,!0)])}var se=o(ie,[[`render`,oe],[`__scopeId`,`data-v-455eb62c`]]);const ce={"mb-1":``,"w-full":``,"gap-2":``},le={"w-full":``};var ue=S({__name:`Header`,setup(e){return(e,t)=>(k(),y(`header`,ce,[g(`div`,le,[x(Z)]),x(z(u),{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:I(()=>t[0]||=[g(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),de=ue,fe=`/assets/worker-_4r9VDQB.js`;const pe={relative:``,px:`{D().then(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})}),c(async()=>{D().then(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})}),(e,r)=>{let s=M(`auto-animate`);return k(),y(`div`,pe,[r[3]||=g(`div`,{"flex-1":``},null,-1),L((k(),y(`div`,{ref_key:`chatHistoryRef`,ref:t,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[r[2]||=g(`div`,{"flex-1":``},null,-1),(k(!0),y(p,null,A(z(i),(e,t)=>(k(),y(`div`,{key:t,"mb-2":``},[e.role===`error`?(k(),y(`div`,me,[g(`div`,he,[g(`div`,ge,[g(`div`,_e,[g(`span`,ve,H(z(n)(`stage.chat.message.character-name.core-system`)),1)]),r[0]||=g(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),z(a)&&t===z(i).length-1?(k(),y(`div`,ye)):(k(),y(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base (k(),y(`div`,{key:t},[e.type===`tool-call`?(k(),y(`div`,Te,[g(`div`,Ee,[r[1]||=b(` Called: `,-1),g(`code`,null,H(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(k(),y(`div`,De)):(k(),y(`div`,{key:2,innerHTML:z(o)(e.text)},null,8,Oe))]))),128))])):t===z(i).length-1&&!e.content?(k(),y(`div`,ke)):v(``,!0)])])):e.role===`user`?(k(),y(`div`,Ae,[g(`div`,je,[g(`div`,null,[g(`span`,Me,H(z(n)(`stage.chat.message.character-name.you`)),1)]),e.content?(k(),y(`div`,{key:0,class:`markdown-content break-words`,text:`base {if(!e||!e.trim())return;let t=u.getProviderConfig(f.value);await b(e,{chatProvider:await u.getProviderInstance(f.value),model:p.value,providerConfig:t})}});async function j(){if(!(!a.value.trim()||l.value))try{let e=u.getProviderConfig(f.value);await b(a.value,{chatProvider:await u.getProviderInstance(f.value),model:p.value,providerConfig:e})}catch(e){w.value.pop(),w.value.push({role:`error`,content:e.message})}}let{destroy:M,start:N}=n(v,{onSpeechStart:()=>{o.value=!0},onVADMisfire:()=>{o.value=!1},onSpeechEnd:e=>{o.value=!1,P(e.buffer)},auto:!1});async function P(e){await T.resume();let t=await i(e,T.sampleRate);D({type:`generate`,data:{audio:t,language:`en`}})}return F(_,async e=>{e===!1&&(M(),A())}),F(c,async e=>{e&&await h()}),F([f,p],async()=>{f.value&&p.value&&await C(p.value,await u.getProviderInstance(f.value),[])}),O(()=>{N()}),S(async()=>{a.value=``}),(t,n)=>(k(),y(`div`,Le,[g(`div`,Re,[g(`div`,ze,[x(Ie,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`a.value=e,placeholder:z(E)(`stage.message`),text:`primary-500 hover:primary-600 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-400 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`primary-200/20 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:B({"transition-colors-none placeholder:transition-colors-none":z(m)}),onSubmit:j,onCompositionstart:n[1]||=e=>l.value=!0,onCompositionend:n[2]||=e=>l.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])])]))}}),He=Ve;const Ue=[`src`],We=[`src`];var Ge=S({__name:`MobileHeaderLink`,setup(e){let t=C();return(e,n)=>(k(),_(z(u),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:I(()=>[z(t)?(k(),y(`img`,{key:0,src:z(ee),"h-8":``,"w-8":``,class:`theme-colored`},null,8,Ue)):(k(),y(`img`,{key:1,src:z(Q),"h-8":``,"w-8":``,class:`theme-colored`},null,8,We))]),_:1}))}}),Ke=o(Ge,[[`__scopeId`,`data-v-9c3d67a4`]]);const qe={"mb-1":``,"w-full":``,"gap-2":``},Je={"w-full":``,flex:``,"justify-center":``};var Ye=S({__name:`MobileHeader`,setup(e){return(e,t)=>(k(),y(`header`,qe,[g(`div`,Je,[x(Ke)])]))}}),Xe=Ye;const Ze={flex:`~ col`,rounded:`lg`,"overflow-hidden":``},Qe={key:0,flex:``,mr:`12`},$e={flex:`~ col`,shadow:`md violet-200/20 dark:none`,"min-w-20":``,"rounded-lg":``,"px-3":``,"py-2":``,h:`unset {D().then(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})}),s(async()=>{D().then(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})}),(e,r)=>{let o=M(`auto-animate`);return k(),y(`div`,Ze,[L((k(),y(`div`,{ref_key:`chatHistoryRef`,ref:t,"max-h":`35dvh`,"z-5":``,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,class:`chat-history`},[(k(!0),y(p,null,A(z(i),(e,t)=>(k(),y(`div`,{key:t,"mb-2":``},[e.role===`error`?(k(),y(`div`,Qe,[g(`div`,$e,[g(`div`,et,[g(`div`,null,[g(`span`,tt,H(z(n)(`stage.chat.message.character-name.core-system`)),1)]),r[0]||=g(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(k(),y(`div`,{key:0,class:`markdown-content break-words`,text:`base {if(_t.test(e)){let t=Date.prototype[e.replace(_t,`$1UTC`)];t&&(gt.prototype[e]=t)}});var vt=class extends gt{toString(){let e=this.toDateString(),t=this.toTimeString();return`${e} ${t}`}toDateString(){let e=yt.format(this),t=bt.format(this),n=this.getFullYear();return`${e} ${t} ${n}`}toTimeString(){let e=xt.format(this);return`${e} GMT+0000 (Coordinated Universal Time)`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{timeZone:`UTC`,...t})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{timeZone:`UTC`,...t})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{timeZone:`UTC`,...t})}},yt=new Intl.DateTimeFormat(`en-US`,{weekday:`short`,timeZone:`UTC`}),bt=new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,timeZone:`UTC`}),xt=new Intl.DateTimeFormat(`en-GB`,{hour12:!1,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZone:`UTC`});const St=`c88b72f07b`,Ct=`main`,wt=`Tue Aug 5 21:21:01 2025 +0800`,Tt={"max-w":`calc[100%-2rem]`,"mx-auto":``,"h-full":``,flex:``,"flex-col":``,"pt-14":``},Et={"flex-1":``},Dt={grid:`~ cols-[70px_1fr]`,"mt-4":``,"gap-2":``,"text-sm":``},Ot={"font-mono":``},kt={"font-mono":``},At={"font-mono":``};var jt=S({__name:`About`,setup(e){let t=R(!1),n=re(new vt(wt));return(e,r)=>(k(),y(p,null,[g(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`About`,onClick:r[0]||=e=>t.value=!t.value},r[2]||=[g(`div`,{"i-solar:info-circle-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),x(z(c),{modelValue:t.value,"onUpdate:modelValue":r[1]||=e=>t.value=e},{default:I(()=>[g(`div`,Tt,[r[7]||=g(`div`,{"font-sans-rounded":``,"mb-14":``,"text-center":``,"text-5xl":``},[g(`span`,{text:`neutral-400 dark:neutral-100/65`},`Project`),b(),g(`span`,{text:`pink-400 dark:pink-300/90`},`AIRI`),g(`div`,{"mt-2":``,"text-base":``},` Web ver. `)],-1),g(`div`,Et,[r[6]||=g(`div`,{text:`neutral-500 dark:neutral-400`},` Application build information `,-1),g(`div`,Dt,[r[3]||=g(`div`,{text:`neutral-500 dark:neutral-400`},` Branch `,-1),g(`div`,Ot,H(z(Ct)),1),r[4]||=g(`div`,{text:`neutral-500 dark:neutral-400`},` Commit `,-1),g(`div`,kt,H(z(St).substring(0,7)),1),r[5]||=g(`div`,{text:`neutral-500 dark:neutral-400`},` Built on `,-1),g(`div`,At,H(z(n)),1)])]),r[8]||=g(`div`,{"my-10":``},[g(`div`,{text:`neutral-500 dark:neutral-400`},` About `),g(`div`,{"mt-4":``,flex:``,"flex-col":``,"gap-2":``},[g(`a`,{class:B([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,href:`https://airi.moeru.ai/docs/`,target:`_blank`},[g(`div`,{"i-solar:home-smile-outline":``}),g(`div`,null,`Home`)]),g(`a`,{href:`https://airi.moeru.ai/docs/en/docs/overview/`,class:B([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,target:`_blank`},[g(`div`,{"i-solar:document-add-outline":``}),g(`div`,null,`Documentations`)]),g(`a`,{href:`https://github.com/moeru-ai/airi`,class:B([`block`,`flex items-center gap-2`,`rounded-xl px-3 py-2 lg:px-5 lg:py-3 outline-none backdrop-blur-md active:scale-95 focus:outline-none text-nowrap text-sm md:text-base`,`text-slate-700 dark:text-slate-100`]),bg:`black/4 dark:black/10 dark:hover:white/30`,transition:`colors,transform duration-200 ease-in-out`,target:`_blank`},[g(`div`,{"i-simple-icons:github":``}),g(`div`,null,`GitHub`)])])],-1)])]),_:1},8,[`modelValue`])],64))}}),Mt=jt;const Nt={"w-full":``,flex:``,"flex-1":``,"items-center":``,"self-end":``,"justify-end":``,"gap-2":``},Pt={key:0,"w-full":``,flex:``,"justify-between":``,"gap-2":``},Ft={key:0,"i-solar:tuning-outline":``,"size-5":``},It={key:1,"i-solar:alt-arrow-right-outline":``,"size-5":``};var Lt=S({__name:`ViewControls`,props:{modelValue:{required:!0},modelModifiers:{}},emits:E([`reset`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,{stageView:r,stageViewControlsEnabled:i}=d(W()),a=N(e,`modelValue`);function o(e){if(a.value===e){n(`reset`);return}a.value=e}return(e,t)=>(k(),y(`div`,Nt,[x(f,{name:`fade`},{default:I(()=>[z(i)?(k(),y(`div`,Pt,[x(z(l),{variant:`secondary-muted`,toggled:a.value===`x`,"w-full":``,onClick:t[0]||=e=>o(`x`)},{default:I(()=>t[5]||=[b(` X `,-1)]),_:1,__:[5]},8,[`toggled`]),x(z(l),{variant:`secondary-muted`,toggled:a.value===`y`,"w-full":``,onClick:t[1]||=e=>o(`y`)},{default:I(()=>t[6]||=[b(` Y `,-1)]),_:1,__:[6]},8,[`toggled`]),z(r)===`3d`?(k(),_(z(l),{key:0,variant:`secondary-muted`,toggled:a.value===`z`,"w-full":``,onClick:t[2]||=e=>o(`z`)},{default:I(()=>t[7]||=[b(` Z `,-1)]),_:1,__:[7]},8,[`toggled`])):v(``,!0),x(z(l),{variant:`secondary-muted`,toggled:a.value===`scale`,"w-full":``,onClick:t[3]||=e=>o(`scale`)},{default:I(()=>t[8]||=[b(` Scale `,-1)]),_:1,__:[8]},8,[`toggled`])])):v(``,!0)]),_:1}),g(`button`,{"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"justify-self-end":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,title:`View`,text:`neutral-500 dark:neutral-400`,onClick:t[4]||=e=>i.value=!z(i)},[x(f,{name:`fade`,mode:`out-in`},{default:I(()=>[z(i)?(k(),y(`div`,It)):(k(),y(`div`,Ft))]),_:1})])]))}}),Rt=o(Lt,[[`__scopeId`,`data-v-35df7db7`]]);const zt={key:0},Bt={key:0,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Vt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Ht={key:1,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Ut={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Wt={key:2,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},Gt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`},Kt={key:3,relative:``,class:`[&_.round-range-tooltip]:hover:opacity-100`},qt={class:`round-range-tooltip`,top:`50%`,"translate-y":`[-50%]`,absolute:``,"left-10":``,"font-mono":``,"op-0":``,transition:`all duration-200 ease-in-out`};var Jt=S({__name:`Inputs`,props:{mode:{}},setup(e,{expose:t}){let n=e,{stageView:r,stageViewControlsEnabled:i}=d(W()),{scale:o,modelOffset:s,modelSize:c}=d(U()),{scale:l,position:u}=d(K()),p=h({get:()=>{switch(r.value){case`2d`:return u.value.x;case`3d`:return s.value.x;default:return 0}},set:e=>{switch(r.value){case`2d`:u.value.x=e;break;case`3d`:s.value.x=e;break;default:break}}}),m=h(()=>r.value===`2d`?-500:-c.value.x-10),b=h(()=>r.value===`2d`?500:c.value.x+10),S=h({get:()=>{switch(r.value){case`2d`:return u.value.y;case`3d`:return s.value.y;default:return 0}},set:e=>{switch(r.value){case`2d`:u.value.y=e;break;case`3d`:s.value.y=e;break;default:break}}}),C=h(()=>r.value===`2d`?-500:-c.value.y-10),w=h(()=>r.value===`2d`?500:c.value.y+10),T=h({get:()=>{switch(r.value){case`2d`:return 0;case`3d`:return s.value.z;default:return 0}},set:e=>{switch(r.value){case`2d`:break;case`3d`:s.value.z=e;break;default:break}}}),E=h(()=>r.value===`2d`?-500:-c.value.z-10),D=h(()=>r.value===`2d`?500:c.value.z+10),O=h({get:()=>r.value===`2d`?l.value:o.value,set:e=>{r.value===`2d`?l.value=e:o.value=e}});function A(){switch(n.mode){case`x`:p.value=0;break;case`y`:S.value=0;break;case`z`:T.value=0;break;case`scale`:O.value=1;break}}return t({resetOnMode:A}),(e,t)=>(k(),_(f,{name:`fade-side-pops-in`},{default:I(()=>[z(i)?(k(),y(`div`,zt,[x(f,{name:`fade-side-pops-in`,mode:`out-in`},{default:I(()=>[n.mode===`x`?(k(),y(`div`,Bt,[x(z(a),{modelValue:p.value,"onUpdate:modelValue":t[0]||=e=>p.value=e,min:m.value,max:b.value,step:.01,"data-direction":`vertical`,h:`50%`,"write-vertical-left":``},null,8,[`modelValue`,`min`,`max`]),g(`div`,Vt,H(p.value.toFixed(2)),1)])):n.mode===`y`?(k(),y(`div`,Ht,[x(z(a),{modelValue:S.value,"onUpdate:modelValue":t[1]||=e=>S.value=e,min:C.value,max:w.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),g(`div`,Ut,H(S.value.toFixed(2)),1)])):z(r)===`3d`&&n.mode===`z`?(k(),y(`div`,Wt,[x(z(a),{modelValue:T.value,"onUpdate:modelValue":t[2]||=e=>T.value=e,min:E.value,max:D.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),g(`div`,Gt,H(T.value.toFixed(2)),1)])):n.mode===`scale`?(k(),y(`div`,Kt,[x(z(a),{modelValue:O.value,"onUpdate:modelValue":t[3]||=e=>O.value=e,min:0,max:3,step:1e-4,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`]),g(`div`,qt,H(O.value.toFixed(2)),1)])):v(``,!0)]),_:1})])):v(``,!0)]),_:1}))}}),Yt=o(Jt,[[`__scopeId`,`data-v-225b2747`]]);const Xt={fixed:``,"bottom-0":``,"w-full":``,flex:``,"flex-col":``},Zt={relative:``,"w-full":``,"self-end":``},Qt={top:`50%`,"translate-y":`[-50%]`,fixed:``,"z-15":``,"px-3":``},$t={"translate-y":`[-100%]`,absolute:``,"right-0":``,"w-full":``,"px-3":``,"pb-3":``,"font-sans":``},en={flex:`~ col`,"w-full":``,"gap-1":``},tn={key:0,"i-solar:moon-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},nn={key:1,"i-solar:sun-2-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},rn={key:0,"size-5":``,text:`neutral-500 dark:neutral-400`,"inline-flex":``,"items-center":``,"justify-center":``},an={key:1,"size-5":``,text:`neutral-500 dark:neutral-400`,"inline-flex":``,"items-center":``,"justify-center":``};var on=S({__name:`MobileInteractiveArea`,setup(t){let r=C({disableTransition:!1}),i=R(`scale`),a=P(`viewControlsInputs`),o=R(``),s=R(!1),c=R(!1),l=T(),p=Y(),{activeProvider:h,activeModel:b}=d(J());w(document.documentElement,()=>l.update());let{themeColorsHueDynamic:S,stageView:E,stageViewControlsEnabled:D}=d(W()),{enabled:A,selectedAudioInput:j}=d(G()),{send:M,onAfterMessageComposed:N,discoverToolsCompatibility:L}=q(),{messages:H}=d(q()),{t:U}=X();async function K(){if(!(!o.value.trim()||c.value))try{let e=p.getProviderConfig(h.value);await M(o.value,{chatProvider:await p.getProviderInstance(h.value),model:b.value,providerConfig:e})}catch(e){H.value.pop(),H.value.push({role:`error`,content:e.message})}}let{destroy:Z,start:Q}=n(j,{onSpeechStart:()=>{s.value=!0},onVADMisfire:()=>{s.value=!1},onSpeechEnd:e=>{s.value=!1,ee(e)},auto:!1});function ee(e){alert(`Transcription is not implemented yet`)}return F(A,async e=>{e===!1&&Z()}),N(async()=>{o.value=``}),F([h,b],async()=>{h.value&&b.value&&await L(b.value,await p.getProviderInstance(h.value),[])}),O(()=>{Q(),l.update()}),(t,n)=>(k(),y(`div`,Xt,[(k(),_(m,null,[x(f,{name:`fade`},{default:I(()=>[z(D)?v(``,!0):(k(),_(ht,{key:0,"max-w":`[calc(100%-3.5rem)]`,"w-full":``,"self-start":``,"pl-3":``}))]),_:1})],1024)),g(`div`,Zt,[g(`div`,Qt,[x(Yt,{ref:`viewControlsInputs`,mode:i.value},null,8,[`mode`])]),g(`div`,$t,[g(`div`,en,[x(Mt),g(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Theme`,onClick:n[0]||=e=>r.value=!z(r)},[x(f,{name:`fade`,mode:`out-in`},{default:I(()=>[z(r)?(k(),y(`div`,tn)):(k(),y(`div`,nn))]),_:1})]),x(z(u),{to:`/settings`,border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Settings`},{default:I(()=>n[7]||=[g(`div`,{"i-solar:settings-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),_:1,__:[7]}),g(`button`,{border:`2 solid neutral-100/60 dark:neutral-800/30`,bg:`neutral-50/70 dark:neutral-800/70`,"w-fit":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-xl":``,"p-2":``,"backdrop-blur-md":``,title:`Stage View`,onClick:n[1]||=e=>E.value=z(E)===`2d`?`3d`:`2d`},[z(E)===`2d`?(k(),y(`div`,rn,n[8]||=[g(`span`,null,`2D`,-1)])):v(``,!0),z(E)===`3d`?(k(),y(`div`,an,n[9]||=[g(`span`,null,`3D`,-1)])):v(``,!0)]),x(Rt,{modelValue:i.value,"onUpdate:modelValue":n[2]||=e=>i.value=e,onReset:n[3]||=()=>a.value?.resetOnMode()},null,8,[`modelValue`])])]),g(`div`,{bg:`white dark:neutral-800`,"max-h-100dvh":``,"max-w-100dvw":``,"w-full":``,flex:``,"gap-1":``,"overflow-auto":``,"px-3":``,"pt-2":``,style:V({paddingBottom:`${Math.max(Number.parseFloat(z(l).bottom.value.replace(`px`,``)),12)}px`})},[x(z(e),{modelValue:o.value,"onUpdate:modelValue":n[4]||=e=>o.value=e,placeholder:z(U)(`stage.message`),border:`solid 2 neutral-200/60 dark:neutral-700/60`,text:`neutral-500 hover:neutral-600 dark:neutral-100 dark:hover:neutral-200 placeholder:neutral-400 placeholder:hover:neutral-500 placeholder:dark:neutral-300 placeholder:dark:hover:neutral-400`,bg:`neutral-100/80 dark:neutral-950/80`,"max-h":`[10lh]`,"min-h":`[calc(1lh+4px+4px)]`,"w-full":``,"resize-none":``,"overflow-y-scroll":``,rounded:`[1lh]`,"px-4":``,"py-0.5":``,"outline-none":``,"backdrop-blur-md":``,"scrollbar-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:B([z(S)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:()=>{},onCompositionstart:n[5]||=e=>c.value=!0,onCompositionend:n[6]||=e=>c.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),o.value.trim()||c.value?(k(),y(`button`,{key:0,w:`[calc(1lh+4px+4px)]`,h:`[calc(1lh+4px+4px)]`,"aspect-square":``,flex:``,"items-center":``,"self-end":``,"justify-center":``,"rounded-full":``,"outline-none":``,"backdrop-blur-md":``,text:`neutral-500 hover:neutral-600 dark:neutral-900 dark:hover:neutral-800`,bg:`primary-50/80 dark:neutral-100/80 hover:neutral-50`,transition:`all duration-250 ease-in-out`,onClick:K},n[10]||=[g(`div`,{"i-solar:arrow-up-outline":``},null,-1)])):v(``,!0)],4)])]))}}),sn=on;const cn={class:`relative`},ln={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var un=S({__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=R(t.height),r=R(t.amplitude),i=R(t.waveLength),a=R(t.fillColor),o=R(t.direction),s=R(t.movementDirection);function c(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 l=h(()=>n.value+r.value*2),u=h(()=>{let e=` `;return`url(data:image/svg+xml;base64,${btoa(e)})`});return F(()=>[t.height,t.amplitude,t.waveLength,t.fillColor,t.direction,t.movementDirection],()=>{n.value=t.height,r.value=t.amplitude,i.value=t.waveLength,a.value=t.fillColor,o.value=t.direction,s.value=t.movementDirection},{immediate:!0}),(e,t)=>(k(),y(`div`,cn,[j(e.$slots,`default`,{},void 0,!0),g(`div`,ln,[g(`div`,{class:`colored-area wave`,style:V({background:a.value,height:`${l.value}px`,maskImage:u.value,WebkitMaskImage:u.value,"--wave-translate":`${-i.value}px`,"--animation-duration":`${i.value/e.animationSpeed}s`,"animation-direction":s.value===`left`?`normal`:`reverse`})},null,4)])]))}}),dn=o(un,[[`__scopeId`,`data-v-33a54ad1`]]);export{dn as b,sn as c,Xe as d,He as e,de as f,se as g}; \ No newline at end of file diff --git a/assets/Basic-6NscZoIc.js b/assets/Basic-JYGX2D37.js similarity index 91% rename from assets/Basic-6NscZoIc.js rename to assets/Basic-JYGX2D37.js index 5088aa11bcda3dc605f7bd08d61317c192b2d4e9..bc4b3beff074ca8f790a290403a0b3d2a7e33d22 100644 --- a/assets/Basic-6NscZoIc.js +++ b/assets/Basic-JYGX2D37.js @@ -1 +1 @@ -import{dN as e,dW as t,dZ as n,e0 as r,e5 as i,ea as a,ec as o,ee as s,eg as c,en as l}from"./index-BqrqTEsQ.js";var u=n({__name:`Basic`,props:r({defaultHeight:{}},{modelValue:{default:``},modelModifiers:{}}),emits:r([`submit`],[`update:modelValue`]),setup(n,{emit:r}){let u=n,d=r,f=a(n,`modelValue`),p=c(),m=c(`auto`);function h(e){e.code===`Enter`&&!e.shiftKey&&(e.preventDefault(),d(`submit`,f.value))}return o(f,()=>{m.value=`auto`,requestAnimationFrame(()=>{if(p.value){if(f.value===``){m.value=u.defaultHeight||`fit-content`;return}m.value=`${p.value.scrollHeight}px`}})},{immediate:!0}),(n,r)=>s((i(),t(`textarea`,{ref_key:`textareaRef`,ref:p,"onUpdate:modelValue":r[0]||=e=>f.value=e,style:l({height:m.value}),onKeydown:h},null,36)),[[e,f.value]])}}),d=u;export{d as b}; \ No newline at end of file +import{dN as e,dW as t,dZ as n,e0 as r,e5 as i,ea as a,ec as o,ee as s,eg as c,en as l}from"./index-D1IGsMK6.js";var u=n({__name:`Basic`,props:r({defaultHeight:{}},{modelValue:{default:``},modelModifiers:{}}),emits:r([`submit`],[`update:modelValue`]),setup(n,{emit:r}){let u=n,d=r,f=a(n,`modelValue`),p=c(),m=c(`auto`);function h(e){e.code===`Enter`&&!e.shiftKey&&(e.preventDefault(),d(`submit`,f.value))}return o(f,()=>{m.value=`auto`,requestAnimationFrame(()=>{if(p.value){if(f.value===``){m.value=u.defaultHeight||`fit-content`;return}m.value=`${p.value.scrollHeight}px`}})},{immediate:!0}),(n,r)=>s((i(),t(`textarea`,{ref_key:`textareaRef`,ref:p,"onUpdate:modelValue":r[0]||=e=>f.value=e,style:l({height:m.value}),onKeydown:h},null,36)),[[e,f.value]])}}),d=u;export{d as b}; \ No newline at end of file diff --git a/assets/CardCreate-BgwAv5Kv.js b/assets/CardCreate-BgwAv5Kv.js deleted file mode 100644 index bfa0d56d5084bdc4e0688b2e453662407bf12232..0000000000000000000000000000000000000000 --- a/assets/CardCreate-BgwAv5Kv.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./CardCreate-1xbHbXXu.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreate-1xbHbXXu.js b/assets/CardCreate-BnRABIEk.js similarity index 92% rename from assets/CardCreate-1xbHbXXu.js rename to assets/CardCreate-BnRABIEk.js index 1639c8f79daa11b9a44d7dd6634d98d9ecc6597f..9f0b373b8f584bf8639bb27b4d83867d69217ec4 100644 --- a/assets/CardCreate-1xbHbXXu.js +++ b/assets/CardCreate-BnRABIEk.js @@ -1 +1 @@ -import{dT as e,dW as t,dZ as n,e5 as r,ek as i,eo as a,z as o}from"./index-BqrqTEsQ.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,a(i(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as b}; \ No newline at end of file +import{dT as e,dW as t,dZ as n,e5 as r,ek as i,eo as a,z as o}from"./index-D1IGsMK6.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,a(i(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as b}; \ No newline at end of file diff --git a/assets/CardCreate-mWaFTW4v.js b/assets/CardCreate-mWaFTW4v.js new file mode 100644 index 0000000000000000000000000000000000000000..ea3aa32fc50a89510283362b7f3d3cc069043e75 --- /dev/null +++ b/assets/CardCreate-mWaFTW4v.js @@ -0,0 +1 @@ +import{b as e}from"./CardCreate-BnRABIEk.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-mu1VLVYi.js b/assets/CardCreationDialog-mu1VLVYi.js deleted file mode 100644 index 02d468bef91fdde51f680db2cba85d6e43102f4b..0000000000000000000000000000000000000000 --- a/assets/CardCreationDialog-mu1VLVYi.js +++ /dev/null @@ -1 +0,0 @@ -import"./DialogTitle-DcCyxlil.js";import{b as e}from"./CardCreationDialog-gKrswwkx.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-qGwMbPGi.js b/assets/CardCreationDialog-qGwMbPGi.js new file mode 100644 index 0000000000000000000000000000000000000000..a5e9023c8d5b4c79c09d3f9004000039f3f2ab36 --- /dev/null +++ b/assets/CardCreationDialog-qGwMbPGi.js @@ -0,0 +1 @@ +import"./DialogTitle-CaB1D00q.js";import{b as e}from"./CardCreationDialog-xeCipFWo.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-gKrswwkx.js b/assets/CardCreationDialog-xeCipFWo.js similarity index 98% rename from assets/CardCreationDialog-gKrswwkx.js rename to assets/CardCreationDialog-xeCipFWo.js index 4267f34619d598b8b6d2d9e4f9de61d87bc6058d..8fdb9594d8a4e89a9b82c03071ac22be3aa85f72 100644 --- a/assets/CardCreationDialog-gKrswwkx.js +++ b/assets/CardCreationDialog-xeCipFWo.js @@ -1,3 +1,3 @@ -import{b as e}from"./DialogTitle-DcCyxlil.js";import{cK as t,cN as n,cP as r,cT as i,cV as a,cW as o,cX as s,ci as c,dQ as ee,dS as l,dT as u,dU as d,dV as f,dW as p,dX as m,dY as h,dZ as g,e0 as _,e5 as v,e6 as y,ea as te,ed as b,ef as x,eg as S,ei as C,ek as w,el as T,eo as E,ep as D,et as O,t as k,z as ne}from"./index-BqrqTEsQ.js";var A=D(((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n})),j=D(((exports,t)=>{var n=A();t.exports=n})),M=D(((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n})),N=D(((exports,t)=>{var n=M();t.exports=n})),P=D(((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n})),F=D(((exports,t)=>{var n=String.prototype.trim;t.exports=n})),I=D(((exports,t)=>{var n=F(),r=` +import{b as e}from"./DialogTitle-CaB1D00q.js";import{cK as t,cN as n,cP as r,cT as i,cV as a,cW as o,cX as s,ci as c,dQ as ee,dS as l,dT as u,dU as d,dV as f,dW as p,dX as m,dY as h,dZ as g,e0 as _,e5 as v,e6 as y,ea as te,ed as b,ef as x,eg as S,ei as C,ek as w,el as T,eo as E,ep as D,et as O,t as k,z as ne}from"./index-D1IGsMK6.js";var A=D(((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n})),j=D(((exports,t)=>{var n=A();t.exports=n})),M=D(((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n})),N=D(((exports,t)=>{var n=M();t.exports=n})),P=D(((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n})),F=D(((exports,t)=>{var n=String.prototype.trim;t.exports=n})),I=D(((exports,t)=>{var n=F(),r=` \r \f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a})),L=D(((exports,t)=>{var n=N(),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})),R=D(((exports,t)=>{var n=F();function r(e){return n.call(e)}t.exports=r})),z=D(((exports,t)=>{var n=P(),r=I(),i=L(),a=R(),o;o=n&&r()?a:i,t.exports=o})),B=D(((exports,t)=>{var n=j(),r=N(),i=z(),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})),V=D(((exports,t)=>{var n=B();t.exports=n})),H=O(V());const U={class:`w-full flex flex-col gap-5`},W={class:`mt-4`},G={class:`border-b border-neutral-200 dark:border-neutral-700`},K={class:`flex justify-center -mb-px sm:justify-start space-x-1`},re=[`onClick`],ie={class:`flex items-center gap-1`},ae={key:0,class:`w-full rounded-xl bg-red900`},oe={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=g({__name:`CardCreationDialog`,props:_({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:_([`update:modelValue`],[`update:modelValue`]),setup(n,{emit:g}){let _=g,D=te(n,`modelValue`),{t:O}=ne(),A=k(),j=S(``),M=[{id:`identity`,label:O(`settings.pages.card.creation.identity`),icon:`i-solar:emoji-funny-square-bold-duotone`},{id:`behavior`,label:O(`settings.pages.card.creation.behavior`),icon:`i-solar:chat-round-line-bold-duotone`},{id:`settings`,label:O(`settings.pages.card.creation.settings`),icon:`i-solar:settings-bold-duotone`}],N=l({get:()=>M.find(e=>e.id===j.value)?j.value:M[0]?.id||``,set:e=>{j.value=e}}),P=S(!1),F=S(``);function I(e){let t=C(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 P.value=!0,F.value=O(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return P.value=!0,F.value=O(`settings.pages.card.creation.errors.systemprompt`),!1;else return P.value=!0,F.value=O(`settings.pages.card.creation.errors.scenario`),!1;else return P.value=!0,F.value=O(`settings.pages.card.creation.errors.personality`),!1;else return P.value=!0,F.value=O(`settings.pages.card.creation.errors.description`),!1;else return P.value=!0,F.value=O(`settings.pages.card.creation.errors.version`),!1;else return P.value=!0,F.value=O(`settings.pages.card.creation.errors.name`),!1;return P.value=!1,A.addCard(t),D.value=!1,!0}let L=S({name:O(`settings.pages.card.creation.defaults.name`),nickname:void 0,version:`1.0`,description:``,notes:void 0,personality:O(`settings.pages.card.creation.defaults.personality`),scenario:O(`settings.pages.card.creation.defaults.scenario`),systemPrompt:O(`settings.pages.card.creation.defaults.systemprompt`),postHistoryInstructions:O(`settings.pages.card.creation.defaults.posthistoryinstructions`),greetings:[],messageExample:[]});function R(e,t){return l({get:()=>L.value[e]??``,set:n=>{let r=n.trim();L.value[e]=r.length>0?t?t(r):r:``}})}let z=R(`name`,e=>(0,H.default)(e)),B=R(`nickname`),V=R(`description`),q=R(`notes`),J=R(`personality`),Y=R(`scenario`),X=l({get:()=>L.value.greetings??[],set:e=>{L.value.greetings=e||[]}}),Z=R(`version`),Q=R(`systemPrompt`),$=R(`postHistoryInstructions`);return(n,l)=>(v(),d(w(s),{open:D.value,"onUpdate:open":l[12]||=e=>_(`update:modelValue`,e)},{default:b(()=>[h(w(i),null,{default:b(()=>[h(w(a),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),h(w(o),{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:b(()=>[u(`div`,U,[h(w(e),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:b(()=>[m(E(w(O)(`settings.pages.card.create_card`)),1)]),_:1}),u(`div`,W,[u(`div`,G,[u(`div`,K,[(v(),p(ee,null,y(M,e=>u(`button`,{key:e.id,class:T([`px-4 py-2 text-sm font-medium`,[N.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=>N.value=e.id},[u(`div`,ie,[u(`div`,{class:T(e.icon)},null,2),m(` `+E(e.label),1)])],10,re)),64))])])]),P.value?(v(),p(`div`,ae,[u(`p`,oe,E(F.value),1)])):f(``,!0),N.value===`identity`?(v(),p(`div`,se,[u(`p`,ce,E(w(O)(`settings.pages.card.creation.fields_info.subtitle`)),1),u(`div`,le,[h(w(r),{modelValue:w(z),"onUpdate:modelValue":l[0]||=e=>x(z)?z.value=e:null,label:w(O)(`settings.pages.card.creation.name`),description:w(O)(`settings.pages.card.creation.fields_info.name`),required:!0},null,8,[`modelValue`,`label`,`description`]),h(w(r),{modelValue:w(B),"onUpdate:modelValue":l[1]||=e=>x(B)?B.value=e:null,label:w(O)(`settings.pages.card.creation.nickname`),description:w(O)(`settings.pages.card.creation.fields_info.nickname`)},null,8,[`modelValue`,`label`,`description`]),h(w(r),{modelValue:w(V),"onUpdate:modelValue":l[2]||=e=>x(V)?V.value=e:null,label:w(O)(`settings.pages.card.creation.description`),"single-line":!1,required:!0,description:w(O)(`settings.pages.card.creation.fields_info.description`)},null,8,[`modelValue`,`label`,`description`]),h(w(r),{modelValue:w(q),"onUpdate:modelValue":l[3]||=e=>x(q)?q.value=e:null,label:w(O)(`settings.pages.card.creator_notes`),"single-line":!1,description:w(O)(`settings.pages.card.creation.fields_info.notes`)},null,8,[`modelValue`,`label`,`description`])])])):N.value===`behavior`?(v(),p(`div`,ue,[u(`div`,de,[h(w(r),{modelValue:w(J),"onUpdate:modelValue":l[4]||=e=>x(J)?J.value=e:null,label:w(O)(`settings.pages.card.personality`),"single-line":!1,required:!0,description:w(O)(`settings.pages.card.creation.fields_info.personality`)},null,8,[`modelValue`,`label`,`description`]),h(w(r),{modelValue:w(Y),"onUpdate:modelValue":l[5]||=e=>x(Y)?Y.value=e:null,label:w(O)(`settings.pages.card.scenario`),"single-line":!1,required:!0,description:w(O)(`settings.pages.card.creation.fields_info.scenario`)},null,8,[`modelValue`,`label`,`description`]),h(w(t),{modelValue:X.value,"onUpdate:modelValue":l[6]||=e=>X.value=e,label:w(O)(`settings.pages.card.creation.greetings`),description:w(O)(`settings.pages.card.creation.fields_info.greetings`)},null,8,[`modelValue`,`label`,`description`])])])):N.value===`settings`?(v(),p(`div`,fe,[u(`div`,pe,[h(w(r),{modelValue:w(Q),"onUpdate:modelValue":l[7]||=e=>x(Q)?Q.value=e:null,label:w(O)(`settings.pages.card.systemprompt`),"single-line":!1,required:!0,description:w(O)(`settings.pages.card.creation.fields_info.systemprompt`)},null,8,[`modelValue`,`label`,`description`]),h(w(r),{modelValue:w($),"onUpdate:modelValue":l[8]||=e=>x($)?$.value=e:null,label:w(O)(`settings.pages.card.posthistoryinstructions`),"single-line":!1,required:!0,description:w(O)(`settings.pages.card.creation.fields_info.posthistoryinstructions`)},null,8,[`modelValue`,`label`,`description`]),h(w(r),{modelValue:w(Z),"onUpdate:modelValue":l[9]||=e=>x(Z)?Z.value=e:null,label:w(O)(`settings.pages.card.creation.version`),required:!0,description:w(O)(`settings.pages.card.creation.fields_info.version`)},null,8,[`modelValue`,`label`,`description`])])])):f(``,!0),u(`div`,me,[h(w(c),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:w(O)(`settings.pages.card.cancel`),disabled:!1,onClick:l[10]||=e=>D.value=!1},null,8,[`label`]),h(w(c),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:w(O)(`settings.pages.card.creation.create`),disabled:!1,onClick:l[11]||=e=>I(L.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),J=n(q,[[`__scopeId`,`data-v-71e6e2f1`]]);export{J as b}; \ No newline at end of file diff --git a/assets/CardDetailDialog-CFL4TUGk.js b/assets/CardDetailDialog-42_DgObP.js similarity index 97% rename from assets/CardDetailDialog-CFL4TUGk.js rename to assets/CardDetailDialog-42_DgObP.js index 097f8737365a2612be6e77a9a4b410235e98b5b5..93edaf83f04fa20b5317a0d4b6e6e6210a86b092 100644 --- a/assets/CardDetailDialog-CFL4TUGk.js +++ b/assets/CardDetailDialog-42_DgObP.js @@ -1 +1 @@ -import{b as e}from"./DeleteCardDialog-Cb8qVSVb.js";import{b as t}from"./DialogTitle-DcCyxlil.js";import{cT as ee,cV as te,cW as ne,cX as re,ci as ie,d7 as n,dQ as r,dS as i,dT as a,dV as o,dW as s,dX as c,dY as l,dZ as u,e5 as d,e6 as f,ed as p,eg as m,ek as h,el as g,eo as _,t as ae,z as oe}from"./index-BqrqTEsQ.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":``},v={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`},de={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},fe={"font-medium":``},pe={flex:`~ row`,"gap-2":``},me={class:`mt-4`},he={class:`border-b border-neutral-200 dark:border-neutral-700`},ge={class:`flex justify-center -mb-px sm:justify-start space-x-1`},y=[`onClick`],b={class:`flex items-center gap-1`},x={key:0},S=[`innerHTML`],C={key:1},w=[`innerHTML`],T={key:2},E={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},D={key:0,flex:`~ col`,"gap-2":``},O={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},k=[`innerHTML`],A={key:3},j={grid:`~ cols-1 sm:cols-3`,"gap-4":``},M={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`},N={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},P={truncate:``,"font-medium":``},F={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`},I={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=u({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:{}},emits:[`update:modelValue`],setup(u,{emit:R}){let z=u,B=R,{t:V}=oe(),H=ae(),{removeCard:xe}=H,{activeCardId:U}=n(H),W=i(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=i(()=>{if(!W.value||!W.value.extensions?.airi?.modules)return{consciousness:``,speech:``,voice:``};let e=W.value.extensions.airi.modules;return{consciousness:e.consciousness?.model||``,speech:e.speech?.model||``,voice:e.speech?.voice_id||``}}),K=i(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=i(()=>z.cardId===U.value),J=m(!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=m(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=m(``),Q=i(()=>{let e=[];return W.value?.description&&e.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),W.value?.notes&&e.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&e.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),e.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),e}),$=i({get:()=>Q.value.find(e=>e.id===Z.value)?Z.value:Q.value[0]?.id||``,set:e=>{Z.value=e}});return(n,i)=>(d(),s(r,null,[l(h(re),{open:n.modelValue,"onUpdate:open":i[0]||=e=>B(`update:modelValue`,e)},{default:p(()=>[l(h(ee),null,{default:p(()=>[l(h(te),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),l(h(ne),{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:p(()=>[W.value?(d(),s(`div`,se,[a(`div`,ce,[a(`div`,le,[a(`div`,null,[a(`div`,ue,[l(h(t),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:p(()=>[c(_(W.value.name),1)]),_:1}),q.value?(d(),s(`div`,v,[i[3]||=a(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),c(` `+_(h(V)(`settings.pages.card.active_badge`)),1)])):o(``,!0)]),a(`div`,de,[c(` v`+_(W.value.version)+` `,1),W.value.creator?(d(),s(r,{key:0},[c(` · `+_(h(V)(`settings.pages.card.created_by`))+` `,1),a(`span`,fe,_(W.value.creator),1)],64)):o(``,!0)])]),a(`div`,pe,[l(h(ie),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?h(V)(`settings.pages.card.active`):h(V)(`settings.pages.card.activate`),disabled:q.value,class:g({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),a(`div`,me,[a(`div`,he,[a(`div`,ge,[(d(!0),s(r,null,f(Q.value,e=>(d(),s(`button`,{key:e.id,class:g([`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},[a(`div`,b,[a(`div`,{class:g(e.icon)},null,2),c(` `+_(e.label),1)])],10,y))),128))])])]),$.value===`notes`&&W.value.notes?(d(),s(`div`,x,[a(`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,S)])):o(``,!0),$.value===`description`&&W.value.description?(d(),s(`div`,C,[a(`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,w)])):o(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(d(),s(`div`,T,[a(`div`,E,[(d(!0),s(r,null,f(K.value,(e,t)=>(d(),s(r,{key:t},[e?(d(),s(`div`,D,[a(`h2`,O,_(h(V)(`settings.pages.card.${t.toLowerCase()}`)),1),a(`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(e)},null,8,k)])):o(``,!0)],64))),128))])])):o(``,!0),$.value===`modules`?(d(),s(`div`,A,[a(`div`,j,[a(`div`,M,[a(`span`,N,[i[4]||=a(`div`,{"i-lucide:ghost":``},null,-1),c(` `+_(h(V)(`settings.pages.card.consciousness.model`)),1)]),a(`div`,P,_(G.value.consciousness??`default`),1)]),a(`div`,F,[a(`span`,I,[i[5]||=a(`div`,{"i-lucide:mic":``},null,-1),c(` `+_(h(V)(`settings.pages.card.speech.model`)),1)]),a(`div`,L,_(G.value.speech??`default`),1)]),a(`div`,_e,[a(`span`,ve,[i[6]||=a(`div`,{"i-lucide:music":``},null,-1),c(` `+_(h(V)(`settings.pages.card.speech.voice`)),1)]),a(`div`,ye,_(G.value.voice??`default`),1)])])])):o(``,!0)])])):(d(),s(`div`,be,[i[7]||=a(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),c(` `+_(h(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),l(e,{modelValue:X.value,"onUpdate:modelValue":i[1]||=e=>X.value=e,"card-name":W.value?.name,onConfirm:Ce,onCancel:i[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64))}}),z=R;export{z as b}; \ No newline at end of file +import{b as e}from"./DeleteCardDialog-Bc1chq43.js";import{b as t}from"./DialogTitle-CaB1D00q.js";import{cT as ee,cV as te,cW as ne,cX as re,ci as ie,d7 as n,dQ as r,dS as i,dT as a,dV as o,dW as s,dX as c,dY as l,dZ as u,e5 as d,e6 as f,ed as p,eg as m,ek as h,el as g,eo as _,t as ae,z as oe}from"./index-D1IGsMK6.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":``},v={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`},de={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},fe={"font-medium":``},pe={flex:`~ row`,"gap-2":``},me={class:`mt-4`},he={class:`border-b border-neutral-200 dark:border-neutral-700`},ge={class:`flex justify-center -mb-px sm:justify-start space-x-1`},y=[`onClick`],b={class:`flex items-center gap-1`},x={key:0},S=[`innerHTML`],C={key:1},w=[`innerHTML`],T={key:2},E={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},D={key:0,flex:`~ col`,"gap-2":``},O={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},k=[`innerHTML`],A={key:3},j={grid:`~ cols-1 sm:cols-3`,"gap-4":``},M={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`},N={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},P={truncate:``,"font-medium":``},F={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`},I={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=u({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:{}},emits:[`update:modelValue`],setup(u,{emit:R}){let z=u,B=R,{t:V}=oe(),H=ae(),{removeCard:xe}=H,{activeCardId:U}=n(H),W=i(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=i(()=>{if(!W.value||!W.value.extensions?.airi?.modules)return{consciousness:``,speech:``,voice:``};let e=W.value.extensions.airi.modules;return{consciousness:e.consciousness?.model||``,speech:e.speech?.model||``,voice:e.speech?.voice_id||``}}),K=i(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=i(()=>z.cardId===U.value),J=m(!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=m(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=m(``),Q=i(()=>{let e=[];return W.value?.description&&e.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),W.value?.notes&&e.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&e.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),e.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),e}),$=i({get:()=>Q.value.find(e=>e.id===Z.value)?Z.value:Q.value[0]?.id||``,set:e=>{Z.value=e}});return(n,i)=>(d(),s(r,null,[l(h(re),{open:n.modelValue,"onUpdate:open":i[0]||=e=>B(`update:modelValue`,e)},{default:p(()=>[l(h(ee),null,{default:p(()=>[l(h(te),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),l(h(ne),{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:p(()=>[W.value?(d(),s(`div`,se,[a(`div`,ce,[a(`div`,le,[a(`div`,null,[a(`div`,ue,[l(h(t),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:p(()=>[c(_(W.value.name),1)]),_:1}),q.value?(d(),s(`div`,v,[i[3]||=a(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),c(` `+_(h(V)(`settings.pages.card.active_badge`)),1)])):o(``,!0)]),a(`div`,de,[c(` v`+_(W.value.version)+` `,1),W.value.creator?(d(),s(r,{key:0},[c(` · `+_(h(V)(`settings.pages.card.created_by`))+` `,1),a(`span`,fe,_(W.value.creator),1)],64)):o(``,!0)])]),a(`div`,pe,[l(h(ie),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?h(V)(`settings.pages.card.active`):h(V)(`settings.pages.card.activate`),disabled:q.value,class:g({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),a(`div`,me,[a(`div`,he,[a(`div`,ge,[(d(!0),s(r,null,f(Q.value,e=>(d(),s(`button`,{key:e.id,class:g([`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},[a(`div`,b,[a(`div`,{class:g(e.icon)},null,2),c(` `+_(e.label),1)])],10,y))),128))])])]),$.value===`notes`&&W.value.notes?(d(),s(`div`,x,[a(`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,S)])):o(``,!0),$.value===`description`&&W.value.description?(d(),s(`div`,C,[a(`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,w)])):o(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(d(),s(`div`,T,[a(`div`,E,[(d(!0),s(r,null,f(K.value,(e,t)=>(d(),s(r,{key:t},[e?(d(),s(`div`,D,[a(`h2`,O,_(h(V)(`settings.pages.card.${t.toLowerCase()}`)),1),a(`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(e)},null,8,k)])):o(``,!0)],64))),128))])])):o(``,!0),$.value===`modules`?(d(),s(`div`,A,[a(`div`,j,[a(`div`,M,[a(`span`,N,[i[4]||=a(`div`,{"i-lucide:ghost":``},null,-1),c(` `+_(h(V)(`settings.pages.card.consciousness.model`)),1)]),a(`div`,P,_(G.value.consciousness??`default`),1)]),a(`div`,F,[a(`span`,I,[i[5]||=a(`div`,{"i-lucide:mic":``},null,-1),c(` `+_(h(V)(`settings.pages.card.speech.model`)),1)]),a(`div`,L,_(G.value.speech??`default`),1)]),a(`div`,_e,[a(`span`,ve,[i[6]||=a(`div`,{"i-lucide:music":``},null,-1),c(` `+_(h(V)(`settings.pages.card.speech.voice`)),1)]),a(`div`,ye,_(G.value.voice??`default`),1)])])])):o(``,!0)])])):(d(),s(`div`,be,[i[7]||=a(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),c(` `+_(h(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),l(e,{modelValue:X.value,"onUpdate:modelValue":i[1]||=e=>X.value=e,"card-name":W.value?.name,onConfirm:Ce,onCancel:i[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64))}}),z=R;export{z as b}; \ No newline at end of file diff --git a/assets/CardDetailDialog-B-AcpLM4.js b/assets/CardDetailDialog-B-AcpLM4.js new file mode 100644 index 0000000000000000000000000000000000000000..ae64ef76c6be73974861feff5ae9168a2af5412d --- /dev/null +++ b/assets/CardDetailDialog-B-AcpLM4.js @@ -0,0 +1 @@ +import"./DeleteCardDialog-Bc1chq43.js";import"./DialogTitle-CaB1D00q.js";import{b as e}from"./CardDetailDialog-42_DgObP.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-C-yU3tpO.js b/assets/CardDetailDialog-C-yU3tpO.js deleted file mode 100644 index 2c99fcc33a83bb476946065b1f637c9003041953..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-C-yU3tpO.js +++ /dev/null @@ -1 +0,0 @@ -import"./DeleteCardDialog-Cb8qVSVb.js";import"./DialogTitle-DcCyxlil.js";import{b as e}from"./CardDetailDialog-CFL4TUGk.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-H_UE8PfW.js b/assets/CardListItem-4sQIRPZf.js similarity index 98% rename from assets/CardListItem-H_UE8PfW.js rename to assets/CardListItem-4sQIRPZf.js index fe6d08b119917344528af5985fd4f36df0f6dc22..7241f7d08fe52fc38ee348ab657b96c51c8e5a5c 100644 --- a/assets/CardListItem-H_UE8PfW.js +++ b/assets/CardListItem-4sQIRPZf.js @@ -1 +1 @@ -import{ce as e,dP as t,dT as n,dU as r,dV as i,dW as a,dZ as o,e5 as s,ed as c,ek as l,el as u,eo as d}from"./index-BqrqTEsQ.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=o({__name:`CardListItem`,props:{id:{},name:{},description:{},isActive:{type:Boolean},isSelected:{type:Boolean},version:{},consciousnessModel:{},voiceModel:{}},emits:[`select`,`activate`,`delete`],setup(o,{emit:C}){let w=C;return(o,C)=>(s(),r(l(e),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:u([o.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:C[2]||=e=>w(`select`)},{default:c(()=>[n(`div`,f,[n(`div`,p,[n(`h3`,m,d(o.name),1),o.isActive?(s(),a(`div`,h,C[3]||=[n(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):i(``,!0)]),o.description?(s(),a(`p`,g,d(o.description),1)):i(``,!0),n(`div`,_,[n(`div`,null,`v`+d(o.version),1),n(`div`,v,[n(`div`,y,[C[4]||=n(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),n(`span`,null,d(o.consciousnessModel),1)]),n(`div`,b,[C[5]||=n(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),n(`span`,null,d(o.voiceModel),1)])])])]),n(`div`,x,[n(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:o.isActive,onClick:C[0]||=t(e=>w(`activate`),[`stop`])},[n(`div`,{class:u([o.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),o.id===`default`?i(``,!0):(s(),a(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:C[1]||=t(e=>w(`delete`),[`stop`])},C[6]||=[n(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]))])]),_:1},8,[`class`]))}}),w=C;export{w as b}; \ No newline at end of file +import{ce as e,dP as t,dT as n,dU as r,dV as i,dW as a,dZ as o,e5 as s,ed as c,ek as l,el as u,eo as d}from"./index-D1IGsMK6.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=o({__name:`CardListItem`,props:{id:{},name:{},description:{},isActive:{type:Boolean},isSelected:{type:Boolean},version:{},consciousnessModel:{},voiceModel:{}},emits:[`select`,`activate`,`delete`],setup(o,{emit:C}){let w=C;return(o,C)=>(s(),r(l(e),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:u([o.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:C[2]||=e=>w(`select`)},{default:c(()=>[n(`div`,f,[n(`div`,p,[n(`h3`,m,d(o.name),1),o.isActive?(s(),a(`div`,h,C[3]||=[n(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):i(``,!0)]),o.description?(s(),a(`p`,g,d(o.description),1)):i(``,!0),n(`div`,_,[n(`div`,null,`v`+d(o.version),1),n(`div`,v,[n(`div`,y,[C[4]||=n(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),n(`span`,null,d(o.consciousnessModel),1)]),n(`div`,b,[C[5]||=n(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),n(`span`,null,d(o.voiceModel),1)])])])]),n(`div`,x,[n(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:o.isActive,onClick:C[0]||=t(e=>w(`activate`),[`stop`])},[n(`div`,{class:u([o.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),o.id===`default`?i(``,!0):(s(),a(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:C[1]||=t(e=>w(`delete`),[`stop`])},C[6]||=[n(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]))])]),_:1},8,[`class`]))}}),w=C;export{w as b}; \ No newline at end of file diff --git a/assets/CardListItem-CckqVk0d.js b/assets/CardListItem-CckqVk0d.js deleted file mode 100644 index f5a6fd1804a61e0f25b113a840d3fb0e2dafef09..0000000000000000000000000000000000000000 --- a/assets/CardListItem-CckqVk0d.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./CardListItem-H_UE8PfW.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-DDliOhdn.js b/assets/CardListItem-DDliOhdn.js new file mode 100644 index 0000000000000000000000000000000000000000..14cf2b9cd1a28645509eb575d3094eebac681e29 --- /dev/null +++ b/assets/CardListItem-DDliOhdn.js @@ -0,0 +1 @@ +import{b as e}from"./CardListItem-4sQIRPZf.js";export{e as default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-BGVlI37-.js b/assets/DeleteCardDialog-BGVlI37-.js deleted file mode 100644 index ed327b0eb52d61911655f773807625a44f542cf3..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-BGVlI37-.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./DeleteCardDialog-Cb8qVSVb.js";import"./DialogTitle-DcCyxlil.js";export{e as default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-Cb8qVSVb.js b/assets/DeleteCardDialog-Bc1chq43.js similarity index 97% rename from assets/DeleteCardDialog-Cb8qVSVb.js rename to assets/DeleteCardDialog-Bc1chq43.js index caa89e46c152412fcdcbeeb032dc5734416d8c73..3ada20a2f5daa425c49c841fb7c377da88914197 100644 --- a/assets/DeleteCardDialog-Cb8qVSVb.js +++ b/assets/DeleteCardDialog-Bc1chq43.js @@ -1 +1 @@ -import{b as e}from"./DialogTitle-DcCyxlil.js";import{c$ as t,cU as n,cV as r,cW as i,cX as a,cY as o,cZ as s,c_ as c,ci as l,d0 as u,d1 as d,dP as f,dT as p,dU as m,dX as h,dY as g,dZ as _,d_ as v,e1 as y,e2 as b,e3 as x,e5 as S,e7 as C,ed as w,eg as T,ek as E,em as D,eo as O,z as k}from"./index-BqrqTEsQ.js";var A=_({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e;t();let r=o();return(e,t)=>(S(),m(E(s),y(n,{type:e.as===`button`?`button`:void 0,onClick:t[0]||=e=>E(r).onOpenChange(!1)}),{default:w(()=>[C(e.$slots,`default`)]),_:3},16,[`type`]))}}),j=A,M=_({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let n=e;t();let r=o();return(e,t)=>(S(),m(E(s),y(n,{id:E(r).descriptionId}),{default:w(()=>[C(e.$slots,`default`)]),_:3},16,[`id`]))}}),N=M,P=_({__name:`AlertDialogAction`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e;return t(),(e,t)=>(S(),m(E(j),D(v(n)),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),F=P;const[I,L]=d(`AlertDialogContent`);var R=_({__name:`AlertDialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:n}){let r=e,a=n,o=u(a);t();let s=T();return L({onCancelElementChange:e=>{s.value=e}}),(e,t)=>(S(),m(E(i),y({...r,...E(o)},{role:`alertdialog`,onPointerDownOutside:t[0]||=f(()=>{},[`prevent`]),onInteractOutside:t[1]||=f(()=>{},[`prevent`]),onOpenAutoFocus:t[2]||=()=>{b(()=>{s.value?.focus({preventScroll:!0})})}}),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),z=R,B=_({__name:`AlertDialogCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e,r=I(),{forwardRef:i,currentElement:a}=t();return x(()=>{r.onCancelElementChange(a.value)}),(e,t)=>(S(),m(E(j),y(n,{ref:E(i)}),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),V=B,H=_({__name:`AlertDialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let n=e;return t(),(e,t)=>(S(),m(E(N),D(v(n)),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),U=H,W=_({__name:`AlertDialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let n=e;return t(),(e,t)=>(S(),m(E(r),D(v(n)),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),G=W,K=_({__name:`AlertDialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,r)=>(S(),m(E(n),D(v(t)),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),q=K,J=_({__name:`AlertDialogRoot`,props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1}},emits:[`update:open`],setup(e,{emit:n}){let r=e,i=n,o=c(r,i);return t(),(e,t)=>(S(),m(E(a),y(E(o),{modal:!0}),{default:w(t=>[C(e.$slots,`default`,D(v(t)))]),_:3},16))}}),Y=J,X=_({__name:`AlertDialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(n){let r=n;return t(),(t,n)=>(S(),m(E(e),D(v(r)),{default:w(()=>[C(t.$slots,`default`)]),_:3},16))}}),Z=X;const Q={class:`flex flex-row justify-end gap-3`};var $=_({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:{}},emits:[`update:modelValue`,`confirm`,`cancel`],setup(e,{emit:t}){let n=t,{t:r}=k();function i(){n(`update:modelValue`,!1),n(`cancel`)}function a(){n(`update:modelValue`,!1),n(`confirm`)}return(e,t)=>(S(),m(E(Y),{open:e.modelValue,"onUpdate:open":t[0]||=e=>n(`update:modelValue`,e)},{default:w(()=>[g(E(q),null,{default:w(()=>[g(E(G),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),g(E(z),{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:w(()=>[g(E(Z),{class:`mb-4 text-xl font-normal`},{default:w(()=>[h(O(E(r)(`settings.pages.card.delete_card`)),1)]),_:1}),g(E(U),{class:`mb-6`},{default:w(()=>[h(O(E(r)(`settings.pages.card.delete_confirmation`))+` `,1),p(`b`,null,`"`+O(e.cardName||``)+`"`,1)]),_:1}),p(`div`,Q,[g(E(V),{"as-child":``},{default:w(()=>[g(E(l),{variant:`secondary`,label:E(r)(`settings.pages.card.cancel`),onClick:i},null,8,[`label`])]),_:1}),g(E(F),{"as-child":``},{default:w(()=>[g(E(l),{variant:`danger`,label:E(r)(`settings.pages.card.delete`),onClick:a},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),ee=$;export{ee as b}; \ No newline at end of file +import{b as e}from"./DialogTitle-CaB1D00q.js";import{c$ as t,cU as n,cV as r,cW as i,cX as a,cY as o,cZ as s,c_ as c,ci as l,d0 as u,d1 as d,dP as f,dT as p,dU as m,dX as h,dY as g,dZ as _,d_ as v,e1 as y,e2 as b,e3 as x,e5 as S,e7 as C,ed as w,eg as T,ek as E,em as D,eo as O,z as k}from"./index-D1IGsMK6.js";var A=_({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e;t();let r=o();return(e,t)=>(S(),m(E(s),y(n,{type:e.as===`button`?`button`:void 0,onClick:t[0]||=e=>E(r).onOpenChange(!1)}),{default:w(()=>[C(e.$slots,`default`)]),_:3},16,[`type`]))}}),j=A,M=_({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let n=e;t();let r=o();return(e,t)=>(S(),m(E(s),y(n,{id:E(r).descriptionId}),{default:w(()=>[C(e.$slots,`default`)]),_:3},16,[`id`]))}}),N=M,P=_({__name:`AlertDialogAction`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e;return t(),(e,t)=>(S(),m(E(j),D(v(n)),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),F=P;const[I,L]=d(`AlertDialogContent`);var R=_({__name:`AlertDialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:n}){let r=e,a=n,o=u(a);t();let s=T();return L({onCancelElementChange:e=>{s.value=e}}),(e,t)=>(S(),m(E(i),y({...r,...E(o)},{role:`alertdialog`,onPointerDownOutside:t[0]||=f(()=>{},[`prevent`]),onInteractOutside:t[1]||=f(()=>{},[`prevent`]),onOpenAutoFocus:t[2]||=()=>{b(()=>{s.value?.focus({preventScroll:!0})})}}),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),z=R,B=_({__name:`AlertDialogCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e,r=I(),{forwardRef:i,currentElement:a}=t();return x(()=>{r.onCancelElementChange(a.value)}),(e,t)=>(S(),m(E(j),y(n,{ref:E(i)}),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),V=B,H=_({__name:`AlertDialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let n=e;return t(),(e,t)=>(S(),m(E(N),D(v(n)),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),U=H,W=_({__name:`AlertDialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let n=e;return t(),(e,t)=>(S(),m(E(r),D(v(n)),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),G=W,K=_({__name:`AlertDialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,r)=>(S(),m(E(n),D(v(t)),{default:w(()=>[C(e.$slots,`default`)]),_:3},16))}}),q=K,J=_({__name:`AlertDialogRoot`,props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1}},emits:[`update:open`],setup(e,{emit:n}){let r=e,i=n,o=c(r,i);return t(),(e,t)=>(S(),m(E(a),y(E(o),{modal:!0}),{default:w(t=>[C(e.$slots,`default`,D(v(t)))]),_:3},16))}}),Y=J,X=_({__name:`AlertDialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(n){let r=n;return t(),(t,n)=>(S(),m(E(e),D(v(r)),{default:w(()=>[C(t.$slots,`default`)]),_:3},16))}}),Z=X;const Q={class:`flex flex-row justify-end gap-3`};var $=_({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:{}},emits:[`update:modelValue`,`confirm`,`cancel`],setup(e,{emit:t}){let n=t,{t:r}=k();function i(){n(`update:modelValue`,!1),n(`cancel`)}function a(){n(`update:modelValue`,!1),n(`confirm`)}return(e,t)=>(S(),m(E(Y),{open:e.modelValue,"onUpdate:open":t[0]||=e=>n(`update:modelValue`,e)},{default:w(()=>[g(E(q),null,{default:w(()=>[g(E(G),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),g(E(z),{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:w(()=>[g(E(Z),{class:`mb-4 text-xl font-normal`},{default:w(()=>[h(O(E(r)(`settings.pages.card.delete_card`)),1)]),_:1}),g(E(U),{class:`mb-6`},{default:w(()=>[h(O(E(r)(`settings.pages.card.delete_confirmation`))+` `,1),p(`b`,null,`"`+O(e.cardName||``)+`"`,1)]),_:1}),p(`div`,Q,[g(E(V),{"as-child":``},{default:w(()=>[g(E(l),{variant:`secondary`,label:E(r)(`settings.pages.card.cancel`),onClick:i},null,8,[`label`])]),_:1}),g(E(F),{"as-child":``},{default:w(()=>[g(E(l),{variant:`danger`,label:E(r)(`settings.pages.card.delete`),onClick:a},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),ee=$;export{ee as b}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-BdkMZt0z.js b/assets/DeleteCardDialog-BdkMZt0z.js new file mode 100644 index 0000000000000000000000000000000000000000..cdfae60d884d9678ec0d5f8320e360432d753e34 --- /dev/null +++ b/assets/DeleteCardDialog-BdkMZt0z.js @@ -0,0 +1 @@ +import{b as e}from"./DeleteCardDialog-Bc1chq43.js";import"./DialogTitle-CaB1D00q.js";export{e as default}; \ No newline at end of file diff --git a/assets/DialogTitle-DcCyxlil.js b/assets/DialogTitle-CaB1D00q.js similarity index 83% rename from assets/DialogTitle-DcCyxlil.js rename to assets/DialogTitle-CaB1D00q.js index 87611863affc657a54e8dda6906a971f923b6efb..3e7fc67d2d6e1f7199b7c10265ef968345ac2c6e 100644 --- a/assets/DialogTitle-DcCyxlil.js +++ b/assets/DialogTitle-CaB1D00q.js @@ -1 +1 @@ -import{c$ as e,cY as t,cZ as n,dU as r,dZ as i,e1 as a,e5 as o,e7 as s,ed as c,ek as l}from"./index-BqrqTEsQ.js";var u=i({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(i){let u=i,d=t();return e(),(e,t)=>(o(),r(l(n),a(u,{id:l(d).titleId}),{default:c(()=>[s(e.$slots,`default`)]),_:3},16,[`id`]))}}),d=u;export{d as b}; \ No newline at end of file +import{c$ as e,cY as t,cZ as n,dU as r,dZ as i,e1 as a,e5 as o,e7 as s,ed as c,ek as l}from"./index-D1IGsMK6.js";var u=i({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(i){let u=i,d=t();return e(),(e,t)=>(o(),r(l(n),a(u,{id:l(d).titleId}),{default:c(()=>[s(e.$slots,`default`)]),_:3},16,[`id`]))}}),d=u;export{d as b}; \ No newline at end of file diff --git a/assets/HeaderLink-D6jJjgut.js b/assets/HeaderLink-CSWG6G--.js similarity index 91% rename from assets/HeaderLink-D6jJjgut.js rename to assets/HeaderLink-CSWG6G--.js index d958f32a32dae1b670cb746ee2c2cd4085b6f255..ea45c9be2227db69875a3ae29f7aa7f078e89936 100644 --- a/assets/HeaderLink-D6jJjgut.js +++ b/assets/HeaderLink-CSWG6G--.js @@ -1 +1 @@ -import{cN as e,d2 as t,dT as n,dU as r,dW as i,dZ as a,db as o,e5 as s,ed as c,ek as l}from"./index-BqrqTEsQ.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(e){let a=o();return(e,o)=>(s(),r(l(t),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:c(()=>[l(a)?(s(),i(`img`,{key:0,src:l(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(s(),i(`img`,{key:1,src:l(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),o[0]||=n(`div`,{"translate-y":`[2px]`,"font-quicksand":``,"font-semibold":``},[n(`span`,null,`AIRI`)],-1)]),_:1,__:[0]}))}}),h=e(m,[[`__scopeId`,`data-v-242dcb19`]]);export{h as b,d as c,u as d}; \ No newline at end of file +import{cN as e,d2 as t,dT as n,dU as r,dW as i,dZ as a,db as o,e5 as s,ed as c,ek as l}from"./index-D1IGsMK6.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(e){let a=o();return(e,o)=>(s(),r(l(t),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:c(()=>[l(a)?(s(),i(`img`,{key:0,src:l(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(s(),i(`img`,{key:1,src:l(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),o[0]||=n(`div`,{"translate-y":`[2px]`,"font-quicksand":``,"font-semibold":``},[n(`span`,null,`AIRI`)],-1)]),_:1,__:[0]}))}}),h=e(m,[[`__scopeId`,`data-v-242dcb19`]]);export{h as b,d as c,u as d}; \ No newline at end of file diff --git a/assets/IconAnimation-eACnDPFz.js b/assets/IconAnimation-9_sNHXpR.js similarity index 95% rename from assets/IconAnimation-eACnDPFz.js rename to assets/IconAnimation-9_sNHXpR.js index 83da374ae52c46664fe235aaae3bf62a32690a24..70c7c7510ed237a976b8bdaba55643060adbe104 100644 --- a/assets/IconAnimation-eACnDPFz.js +++ b/assets/IconAnimation-9_sNHXpR.js @@ -1 +1 @@ -import{dS as e,dT as t,dW as n,dZ as r,e5 as i,ec as a,eg as o,el as s,en as c}from"./index-BqrqTEsQ.js";var l=r({__name:`IconAnimation`,props:{icon:{},iconSize:{},position:{},duration:{},started:{type:Boolean},textColor:{},isReverse:{type:Boolean},zIndex:{}},emits:[`animationEnded`],setup(r,{emit:l}){let u=r,d=l,f=o(!1);a(()=>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=o([]),h=o(!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,r)=>(i(),n(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:c({zIndex:h.value?e.zIndex:void 0})},[t(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:c({opacity:p.value.opacity,transitionDuration:`${e.duration}ms`})},null,4),t(`div`,{fixed:``,"inset-0":``,"ease-in-out":``,style:c({width:`${p.value.size}rem`,height:`${p.value.size}rem`,transform:`translate(${p.value.position})`,transitionDuration:`${e.duration}ms`}),class:s([p.value.textColor,u.icon,{"transition-all":f.value}]),onTransitionend:g},null,38)],4))}}),u=l;export{u as b}; \ No newline at end of file +import{dS as e,dT as t,dW as n,dZ as r,e5 as i,ec as a,eg as o,el as s,en as c}from"./index-D1IGsMK6.js";var l=r({__name:`IconAnimation`,props:{icon:{},iconSize:{},position:{},duration:{},started:{type:Boolean},textColor:{},isReverse:{type:Boolean},zIndex:{}},emits:[`animationEnded`],setup(r,{emit:l}){let u=r,d=l,f=o(!1);a(()=>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=o([]),h=o(!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,r)=>(i(),n(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:c({zIndex:h.value?e.zIndex:void 0})},[t(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:c({opacity:p.value.opacity,transitionDuration:`${e.duration}ms`})},null,4),t(`div`,{fixed:``,"inset-0":``,"ease-in-out":``,style:c({width:`${p.value.size}rem`,height:`${p.value.size}rem`,transform:`translate(${p.value.position})`,transitionDuration:`${e.duration}ms`}),class:s([p.value.textColor,u.icon,{"transition-all":f.value}]),onTransitionend:g},null,38)],4))}}),u=l;export{u as b}; \ No newline at end of file diff --git a/assets/InputFile-ClfQXb90.js b/assets/InputFile-CrEM0anr.js similarity index 96% rename from assets/InputFile-ClfQXb90.js rename to assets/InputFile-CrEM0anr.js index 5c26df9dd4cfabcb794f4f3b01331a8784a4281d..7d5e0ee6eb52b2dfe925edac643f0c5cad4085d2 100644 --- a/assets/InputFile-ClfQXb90.js +++ b/assets/InputFile-CrEM0anr.js @@ -1 +1 @@ -import{dT as e,dW as t,dZ as n,dm as r,e0 as i,e5 as a,e7 as o,ea as s,eg as c,ek as l,el as u}from"./index-BqrqTEsQ.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:i({accept:{},multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let i=s(n,`modelValue`),m=c(),h=c(!1),g=r(h,150);function _(e){let t=e.target;t.files&&t.files.length>0&&(m.value=t.files[0]),i.value=Array.from(t.files||[]),h.value=!1}return(n,r)=>(a(),t(`label`,{relative:``,class:u([`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:r[0]||=e=>h.value=!0,onDragleave:r[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),o(n.$slots,`default`,{isDragging:l(g),firstFile:m.value,files:i.value},()=>[e(`div`,{class:u([`flex flex-col items-center`,[l(g)?`text-primary-500 dark:text-primary-400`:`text-neutral-400 dark:text-neutral-500`]])},[r[2]||=e(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),r[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 b}; \ No newline at end of file +import{dT as e,dW as t,dZ as n,dm as r,e0 as i,e5 as a,e7 as o,ea as s,eg as c,ek as l,el as u}from"./index-D1IGsMK6.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:i({accept:{},multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let i=s(n,`modelValue`),m=c(),h=c(!1),g=r(h,150);function _(e){let t=e.target;t.files&&t.files.length>0&&(m.value=t.files[0]),i.value=Array.from(t.files||[]),h.value=!1}return(n,r)=>(a(),t(`label`,{relative:``,class:u([`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:r[0]||=e=>h.value=!0,onDragleave:r[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),o(n.$slots,`default`,{isDragging:l(g),firstFile:m.value,files:i.value},()=>[e(`div`,{class:u([`flex flex-col items-center`,[l(g)?`text-primary-500 dark:text-primary-400`:`text-neutral-400 dark:text-neutral-500`]])},[r[2]||=e(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),r[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 b}; \ No newline at end of file diff --git a/assets/Scenes-2Kp3NQ_V.js b/assets/Scenes-ZY5GY3Yk.js similarity index 99% rename from assets/Scenes-2Kp3NQ_V.js rename to assets/Scenes-ZY5GY3Yk.js index deff833d0ab73bc15006f89695d19af4e190085a..1d388590e85ca3f20bfb44b47915e2f0102405c9 100644 --- a/assets/Scenes-2Kp3NQ_V.js +++ b/assets/Scenes-ZY5GY3Yk.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-BFBX2XSs.js","assets/index-BqrqTEsQ.js","assets/index-DStbve3n.css","assets/default-node-DyYIhEXm.js","assets/import-url-browser-DIrMeXJ_.js","assets/import-url-browser-D0zVIqhu.js","assets/duckdb-mvp-P5KShsBk.js","assets/import-url-node-Dl605kiZ.js"])))=>i.map(i=>d[i]); -import{b$ as e,bT as t,bU as n,bV as r,bW as i,bX as a,bY as o,bZ as s,b_ as c,c0 as l,c1 as u,c2 as d,c3 as f,c4 as p,cb as m,cc as h,cg as g,ct as _,cu as v,cv as y,cy as b,cz as x,d6 as S,d7 as C,d8 as w,d9 as T,dA as E,dB as D,dC as O,dD as k,dE as A,dF as j,dG as M,dH as ee,dI as te,dJ as N,dO as ne,dQ as P,dS as re,dT as ie,dU as ae,dV as oe,dW as se,dY as ce,dZ as le,db as ue,dd as de,dg as fe,dp as pe,dq as me,dr as he,ds as ge,dt as _e,du as ve,dv as ye,dw as be,dx as xe,dy as Se,dz as Ce,e3 as we,e4 as Te,e5 as Ee,e7 as De,ec as Oe,ed as ke,ee as Ae,eg as je,eh as Me,ej as Ne,ek as Pe,ep as Fe,eq as Ie,er as Le,es as Re,et as ze,n as Be,o as Ve,q as He,r as Ue,u as We,v as Ge,x as Ke}from"./index-BqrqTEsQ.js";import{b as qe}from"./import-url-browser-D0zVIqhu.js"; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-DgcibqnP.js","assets/index-D1IGsMK6.js","assets/index-DStbve3n.css","assets/default-node-BtQ98lhg.js","assets/import-url-browser-DIrMeXJ_.js","assets/import-url-browser-D0zVIqhu.js","assets/duckdb-mvp-P5KShsBk.js","assets/import-url-node-Dl605kiZ.js"])))=>i.map(i=>d[i]); +import{b$ as e,bT as t,bU as n,bV as r,bW as i,bX as a,bY as o,bZ as s,b_ as c,c0 as l,c1 as u,c2 as d,c3 as f,c4 as p,cb as m,cc as h,cg as g,ct as _,cu as v,cv as y,cy as b,cz as x,d6 as S,d7 as C,d8 as w,d9 as T,dA as E,dB as D,dC as O,dD as k,dE as A,dF as j,dG as M,dH as ee,dI as te,dJ as N,dO as ne,dQ as P,dS as re,dT as ie,dU as ae,dV as oe,dW as se,dY as ce,dZ as le,db as ue,dd as de,dg as fe,dp as pe,dq as me,dr as he,ds as ge,dt as _e,du as ve,dv as ye,dw as be,dx as xe,dy as Se,dz as Ce,e3 as we,e4 as Te,e5 as Ee,e7 as De,ec as Oe,ed as ke,ee as Ae,eg as je,eh as Me,ej as Ne,ek as Pe,ep as Fe,eq as Ie,er as Le,es as Re,et as ze,n as Be,o as Ve,q as He,r as Ue,u as We,v as Ge,x as Ke}from"./index-D1IGsMK6.js";import{b as qe}from"./import-url-browser-D0zVIqhu.js"; /*! * @pixi/constants - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC @@ -3244,11 +3244,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE */ (function(n){typeof exports==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof Le==`function`&&Le;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 Le==`function`&&Le,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` \0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){"use strict";var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{var e=function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){"use strict";for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function ee(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function ne(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,N(e.strm)}function P(e,t){e.pending_buf[e.pending++]=t}function re(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ie(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function ae(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ae(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,ne(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(ne(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(ne(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(ne(e,!1),e.strm.avail_out),O)}),new ce(4,4,8,4,oe),new ce(4,5,16,8,oe),new ce(4,6,32,32,oe),new ce(4,4,16,16,se),new ce(8,16,32,32,se),new ce(8,16,128,128,se),new ce(8,32,128,256,se),new ce(32,128,258,1024,se),new ce(32,258,258,4096,se)],n.deflateInit=function(e,t){return fe(e,t,g,15,8,0)},n.deflateInit2=fe,n.deflateReset=de,n.deflateResetKeep=ue,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),P(i,i.gzhead.time>>16&255),P(i,i.gzhead.time>>24&255),P(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),P(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(P(i,255&i.gzhead.extra.length),P(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(P(i,0),P(i,0),P(i,0),P(i,0),P(i,0),P(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),P(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,re(i,p),i.strstart!==0&&(re(i,e.adler>>>16),re(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),N(e),o=i.pending,i.pending!==i.pending_buf_size));)P(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),N(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),N(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&N(e),i.pending+2<=i.pending_buf_size&&(P(i,255&e.adler),P(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(N(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&ee(t)<=ee(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(ae(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(ne(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(ne(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(ne(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(ae(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(ne(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(ne(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(ne(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(te(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),N(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(P(i,255&e.adler),P(i,e.adler>>8&255),P(i,e.adler>>16&255),P(i,e.adler>>24&255),P(i,255&e.total_in),P(i,e.total_in>>8&255),P(i,e.total_in>>16&255),P(i,e.total_in>>24&255)):(re(i,e.adler>>>16),re(i,65535&e.adler)),N(e),0=n.w_size&&(s===0&&(te(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,ae(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,ae,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,N=8+(15&(b>>>=4)),n.wbits===0)n.wbits=N;else if(N>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(ae[0]=255&b,ae[1]=b>>>8&255,n.check=a(n.check,ae,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,ae[2]=b>>>16&255,ae[3]=b>>>24&255,n.check=a(n.check,ae,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(ae[0]=255&b,ae[1]=b>>>8&255,n.check=a(n.check,ae,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,ae,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(N=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,N)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;N=p[g+ E++],n.head&&N&&n.length<65536&&(n.head.name+=String.fromCharCode(N)),N&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[oe[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},ne=s(0,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,ne){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&ie,!((k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(re=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}N=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(re=k+3;x>>=k)),b>>>=3,x-=3}else{for(re=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=N}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,P={bits:n.lenbits},ne=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,ne){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},ne=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,ne){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(ie=n.lencode[b&(1<>>16&255,j=65535&ie,!((k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&ie,!(M+(k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(re=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(ie=n.distcode[b&(1<>>16&255,j=65535&ie,!((k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&ie,!(M+(k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(re=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=P[re+d[w]],ee[te+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--N[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function P(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function re(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function oe(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=ae(a[s]++,s))}}function se(e){var t;for(t=0;t>1;1<=n;n--)ue(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ue(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,ue(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?ge(e,t,n,r):e.strategy===4||s===o?(re(e,2+(r?1:0),3),de(e,T,E)):(re(e,4+(r?1:0),3),function(e,t,n,r){var i;for(re(e,t-257,5),re(e,n-1,5),re(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*ne(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){re(e,2,3),ie(e,_,T),function(e){e.bi_valid===16?(P(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){"use strict";if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})})),kf=ze(Of());dl.zipReader=(e,t)=>kf.default.loadAsync(e);const Af=dl.createSettings;dl.createSettings=async e=>{let t=Object.keys(e.files);return t.find(e=>jf(e))?Af(e):Pf(t)};function jf(e){return e.endsWith(`model3.json`)}function Mf(e){return e.endsWith(`.moc3`)}function Nf(e){return e.split(/[\\/]/).pop()}function Pf(e){let t=e.filter(e=>Mf(e));if(t.length!==1){let e=t.length?`(${t.map(e=>`"${e}"`).join(`,`)})`:``;throw Error(`Expected exactly one moc file, got ${t.length} ${e}`)}let n=t[0],r=Nf(n).replace(/\.moc3?/,``),i=e.filter(e=>e.endsWith(`.png`));if(!i.length)throw Error(`Textures not found`);let a=e.filter(e=>e.endsWith(`.mtn`)||e.endsWith(`.motion3.json`)),o=e.find(e=>e.includes(`physics`)),s=e.find(e=>e.includes(`pose`)),c=new pl({url:`${r}.model3.json`,Version:3,FileReferences:{Moc:n,Textures:i,Physics:o,Pose:s,Motions:a.length?{"":a.map(e=>({File:e}))}:void 0}});return c.name=r,c._objectURL=`example://${c.url}`,c}dl.readText=(e,t)=>{let n=e.file(t);if(!n)throw Error(`Cannot find file: ${t}`);return n.async(`text`)},dl.getFilePaths=e=>{let t=[];return e.forEach(e=>t.push(e)),Promise.resolve(t)},dl.getFiles=(e,t)=>Promise.all(t.map(async t=>{let n=t.slice(t.lastIndexOf(`/`)+1),r=await e.file(t).async(`blob`);return new File([r],n)}));var Ff=le({__name:`Live2D`,props:{paused:{type:Boolean,default:!1},mouthOpenSize:{default:0},focusAt:{default:()=>({x:0,y:0})},disableFocusAt:{type:Boolean},xOffset:{},yOffset:{},scale:{default:1}},setup(e){return(e,t)=>(Ee(),ae(g,{relative:``},{default:ke(({width:t,height:n})=>[ce(Cl,{width:t,height:n,resolution:2,"max-h":`100dvh`},{default:ke(({app:r})=>[ce(Df,{app:r,"mouth-open-size":e.mouthOpenSize,width:t,height:n,paused:e.paused,"focus-at":e.focusAt,"x-offset":e.xOffset,"y-offset":e.yOffset,scale:e.scale,"disable-focus-at":e.disableFocusAt},null,8,[`app`,`mouth-open-size`,`width`,`height`,`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`,`disable-focus-at`])]),_:2},1032,[`width`,`height`])]),_:1}))}}),If=Ff;function Lf(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 Rf(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 L(e){return this instanceof L?(this.v=e,this):new L(e)}function zf(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 L?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 Bf(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:L(e[r](t)),done:!1}:i?i(t):t}:i}}function Vf(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Rf==`function`?Rf(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 Hf=new TextDecoder(`utf-8`),Uf=e=>Hf.decode(e),Wf=new TextEncoder,Gf=e=>Wf.encode(e),Kf=e=>typeof e==`number`,qf=e=>typeof e==`boolean`,Jf=e=>typeof e==`function`,Yf=e=>e!=null&&Object(e)===e,Xf=e=>Yf(e)&&Jf(e.then),Zf=e=>Yf(e)&&Jf(e[Symbol.iterator]),Qf=e=>Yf(e)&&Jf(e[Symbol.asyncIterator]),$f=e=>Yf(e)&&Yf(e.schema),ep=e=>Yf(e)&&`done`in e&&`value`in e,tp=e=>Yf(e)&&Jf(e.stat)&&Kf(e.fd),np=e=>Yf(e)&&ap(e.body),rp=e=>`_getDOMStream`in e&&`_getNodeStream`in e,ip=e=>Yf(e)&&Jf(e.abort)&&Jf(e.getWriter)&&!rp(e),ap=e=>Yf(e)&&Jf(e.cancel)&&Jf(e.getReader)&&!rp(e),op=e=>Yf(e)&&Jf(e.end)&&Jf(e.write)&&qf(e.writable)&&!rp(e),sp=e=>Yf(e)&&Jf(e.read)&&Jf(e.pipe)&&qf(e.readable)&&!rp(e),cp=e=>Yf(e)&&Jf(e.clear)&&Jf(e.bytes)&&Jf(e.position)&&Jf(e.setPosition)&&Jf(e.capacity)&&Jf(e.getBufferIdentifier)&&Jf(e.createLong),lp=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function up(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;++cpp(Int32Array,e),hp=e=>pp(BigInt64Array,e),gp=e=>pp(Uint8Array,e),_p=e=>(e.next(),e);function*vp(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof lp?n(t):Zf(t)?t:n(t);return yield*_p((function*(t){let n=null;do n=t.next(yield pp(e,n));while(!n.done)})(r[Symbol.iterator]())),new e}const yp=e=>vp(Uint8Array,e);function bp(e,t){return zf(this,arguments,function*(){if(Xf(t))return yield L(yield L(yield*Bf(Vf(bp(e,yield L(t))))));let n=function(e){return zf(this,arguments,function*(){yield yield L(yield L(e))})},r=function(e){return zf(this,arguments,function*(){yield L(yield*Bf(Vf(_p((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 lp?n(t):Zf(t)?r(t):Qf(t)?t:n(t);return yield L(yield*Bf(Vf(_p((function(t){return zf(this,arguments,function*(){let n=null;do n=yield L(t.next(yield yield L(pp(e,n))));while(!n.done)})})(i[Symbol.asyncIterator]()))))),yield L(new e)})}const xp=e=>bp(Uint8Array,e);function Sp(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*Ep(e){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?fp(r,o)[0]:([i,r,s]=fp(r,o),i)}({cmd:a,size:o}=(yield(()=>null)())||{cmd:`read`,size:0});let l=yp(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=xp(e)[Symbol.asyncIterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?yield L(l.next()):yield L(l.next(o-s)),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield L(c()));while(onull)()))||{cmd:`read`,size:0});let l=new kp(e);try{do if({done:t,value:i}=Number.isNaN(o-s)?yield L(l.read()):yield L(l.read(o-s)),!t&&i.byteLength>0&&(r.push(gp(i)),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield L(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 Lf(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 Lf(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=gp(t)),t})}};const Ap=(e,t)=>{let n=e=>r([t,e]),r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]};function jp(e){return zf(this,arguments,function*(){let t=[],n=`error`,r=!1,i=null,a,o,s=0,c=[],l;function u(){return a===`peek`?fp(c,o)[0]:([l,c,s]=fp(c,o),l)}if({cmd:a,size:o}=(yield yield L((()=>null)()))||{cmd:`read`,size:0},e.isTTY)return yield yield L(new Uint8Array),yield L(null);try{t[0]=Ap(e,`end`),t[1]=Ap(e,`error`);do{if(t[2]=Ap(e,`readable`),[n,i]=yield L(Promise.race(t.map(e=>e[2]))),n===`error`)break;if((r=n===`end`)||(Number.isFinite(o-s)?(l=gp(e.read(o-s)),l.byteLength0&&(c.push(l),s+=l.byteLength)),r||o<=s)do({cmd:a,size:o}=yield yield L(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 Mp;(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`})(Mp||={});var Np;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(Np||={});var Pp;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(Pp||={});var Fp;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(Fp||={});var Ip;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})(Ip||={});var Lp;(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`})(Lp||={});const Rp=2,zp=4,Bp=4,Vp=4,Hp=new Int32Array(2),Up=new Float32Array(Hp.buffer),Wp=new Float64Array(Hp.buffer),Gp=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var Kp;(function(e){e[e.UTF8_BYTES=1]=`UTF8_BYTES`,e[e.UTF16_STRING=2]=`UTF16_STRING`})(Kp||={});var qp=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){Up[0]=t,this.writeInt32(e,Hp[0])}writeFloat64(e,t){Wp[0]=t,this.writeInt32(e,Hp[Gp?0:1]),this.writeInt32(e+4,Hp[Gp?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)*Rp;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,zp+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)}},Tm=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()+Vp),(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)}},Em;(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`})(Em||={});var Dm=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()+Vp),(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):Em.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 am).__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 om).__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,Em.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}},Om=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()+Vp),(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):nm.Little}fields(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new Dm).__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 om).__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,nm.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)}},km;(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`})(km||={});var R;(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`})(R||={});var Am;(function(e){e[e.OFFSET=0]=`OFFSET`,e[e.DATA=1]=`DATA`,e[e.VALIDITY=2]=`VALIDITY`,e[e.TYPE=3]=`TYPE`})(Am||={});const jm=void 0;function Mm(e){if(e===null)return`null`;if(e===jm)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=>Mm(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function Nm(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 Pm(e,t){return Nm(e/t)+Nm(e%t)/Nm(t)}const Fm=Symbol.for(`isArrowBigNum`);function Im(e,...t){return t.length===0?Object.setPrototypeOf(pp(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}Im.prototype[Fm]=!0,Im.prototype.toJSON=function(){return`"${Um(this)}"`},Im.prototype.valueOf=function(e){return Hm(this,e)},Im.prototype.toString=function(){return Um(this)},Im.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return Hm(this);case`string`:return Um(this);case`default`:return Wm(this)}return Um(this)};function Lm(...e){return Im.apply(this,e)}function Rm(...e){return Im.apply(this,e)}function zm(...e){return Im.apply(this,e)}Object.setPrototypeOf(Lm.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(Rm.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(zm.prototype,Object.create(Uint32Array.prototype)),Object.assign(Lm.prototype,Im.prototype,{constructor:Lm,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(Rm.prototype,Im.prototype,{constructor:Rm,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(zm.prototype,Im.prototype,{constructor:zm,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const Bm=BigInt(4294967296)*BigInt(4294967296),Vm=Bm-BigInt(1);function Hm(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 Gm(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`))(z.prototype);var hh=class extends z{constructor(){super(R.Null)}toString(){return`Null`}};Jm=Symbol.toStringTag,hh[Jm]=(e=>e[Symbol.toStringTag]=`Null`)(hh.prototype);var gh=class extends z{constructor(e,t){super(R.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}`}};Ym=Symbol.toStringTag,gh[Ym]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(gh.prototype);var _h=class extends gh{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},vh=class extends gh{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},yh=class extends gh{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},bh=class extends gh{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},xh=class extends gh{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Sh=class extends gh{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},Ch=class extends gh{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},wh=class extends gh{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(_h.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(vh.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(yh.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(bh.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(xh.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(Sh.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Ch.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(wh.prototype,`ArrayType`,{value:BigUint64Array});var Th=class extends z{constructor(e){super(R.Float),this.precision=e}get ArrayType(){switch(this.precision){case Pp.HALF:return Uint16Array;case Pp.SINGLE:return Float32Array;case Pp.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};Xm=Symbol.toStringTag,Th[Xm]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(Th.prototype);var Eh=class extends Th{constructor(){super(Pp.HALF)}},Dh=class extends Th{constructor(){super(Pp.SINGLE)}},Oh=class extends Th{constructor(){super(Pp.DOUBLE)}};Object.defineProperty(Eh.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Dh.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(Oh.prototype,`ArrayType`,{value:Float64Array});var kh=class extends z{constructor(){super(R.Binary)}toString(){return`Binary`}};Zm=Symbol.toStringTag,kh[Zm]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(kh.prototype);var Ah=class extends z{constructor(){super(R.LargeBinary)}toString(){return`LargeBinary`}};Qm=Symbol.toStringTag,Ah[Qm]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(Ah.prototype);var jh=class extends z{constructor(){super(R.Utf8)}toString(){return`Utf8`}};$m=Symbol.toStringTag,jh[$m]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(jh.prototype);var Mh=class extends z{constructor(){super(R.LargeUtf8)}toString(){return`LargeUtf8`}};eh=Symbol.toStringTag,Mh[eh]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(Mh.prototype);var Nh=class extends z{constructor(){super(R.Bool)}toString(){return`Bool`}};th=Symbol.toStringTag,Nh[th]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(Nh.prototype);var Ph=class extends z{constructor(e,t,n=128){super(R.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};nh=Symbol.toStringTag,Ph[nh]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Ph.prototype);var Fh=class extends z{constructor(e){super(R.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${Fp[this.unit]}>`}get ArrayType(){return this.unit===Fp.DAY?Int32Array:BigInt64Array}};rh=Symbol.toStringTag,Fh[rh]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(Fh.prototype);var Ih=class extends z{constructor(e,t){super(R.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${Ip[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};ih=Symbol.toStringTag,Ih[ih]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(Ih.prototype);var Lh=class extends z{constructor(e,t){super(R.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${Ip[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};ah=Symbol.toStringTag,Lh[ah]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(Lh.prototype);var Rh=class extends z{constructor(e){super(R.Interval),this.unit=e}toString(){return`Interval<${Lp[this.unit]}>`}};oh=Symbol.toStringTag,Rh[oh]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(Rh.prototype);var zh=class extends z{constructor(e){super(R.Duration),this.unit=e}toString(){return`Duration<${Ip[this.unit]}>`}};sh=Symbol.toStringTag,zh[sh]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(zh.prototype);var Bh=class extends z{constructor(e){super(R.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}};ch=Symbol.toStringTag,Bh[ch]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(Bh.prototype);var Vh=class extends z{constructor(e){super(R.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};lh=Symbol.toStringTag,Vh[lh]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(Vh.prototype);var Hh=class extends z{constructor(e,t,n){super(R.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(` | `)}>`}};uh=Symbol.toStringTag,Hh[uh]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(Hh.prototype);var Uh=class extends z{constructor(e){super(R.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};dh=Symbol.toStringTag,Uh[dh]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(Uh.prototype);var Wh=class extends z{constructor(e,t){super(R.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}>`}};fh=Symbol.toStringTag,Wh[fh]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(Wh.prototype);var Gh=class extends z{constructor(e,t=!1){var n,r,i;if(super(R.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(`, `)}}>`}};ph=Symbol.toStringTag,Gh[ph]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(Gh.prototype);const Kh=(e=>()=>++e)(-1);var qh=class extends z{constructor(e,t,n,r){super(R.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?Kh():Nm(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}>`}};mh=Symbol.toStringTag,qh[mh]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(qh.prototype);function Jh(e){let t=e;switch(e.typeId){case R.Decimal:return e.bitWidth/32;case R.Interval:return 1+t.unit;case R.FixedSizeList:return t.listSize;case R.FixedSizeBinary:return t.byteWidth;default:return 1}}var Yh=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 Xh(this,e,t)}getVisitFnByTypeId(e,t=!0){return Zh(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 Xh(e,t,n=!0){return typeof t==`number`?Zh(e,t,n):typeof t==`string`&&t in R?Zh(e,R[t],n):t&&t instanceof z?Zh(e,Qh(t),n):t?.type&&t.type instanceof z?Zh(e,Qh(t.type),n):Zh(e,R.NONE,n)}function Zh(e,t,n=!0){let r=null;switch(t){case R.Null:r=e.visitNull;break;case R.Bool:r=e.visitBool;break;case R.Int:r=e.visitInt;break;case R.Int8:r=e.visitInt8||e.visitInt;break;case R.Int16:r=e.visitInt16||e.visitInt;break;case R.Int32:r=e.visitInt32||e.visitInt;break;case R.Int64:r=e.visitInt64||e.visitInt;break;case R.Uint8:r=e.visitUint8||e.visitInt;break;case R.Uint16:r=e.visitUint16||e.visitInt;break;case R.Uint32:r=e.visitUint32||e.visitInt;break;case R.Uint64:r=e.visitUint64||e.visitInt;break;case R.Float:r=e.visitFloat;break;case R.Float16:r=e.visitFloat16||e.visitFloat;break;case R.Float32:r=e.visitFloat32||e.visitFloat;break;case R.Float64:r=e.visitFloat64||e.visitFloat;break;case R.Utf8:r=e.visitUtf8;break;case R.LargeUtf8:r=e.visitLargeUtf8;break;case R.Binary:r=e.visitBinary;break;case R.LargeBinary:r=e.visitLargeBinary;break;case R.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case R.Date:r=e.visitDate;break;case R.DateDay:r=e.visitDateDay||e.visitDate;break;case R.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case R.Timestamp:r=e.visitTimestamp;break;case R.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case R.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case R.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case R.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case R.Time:r=e.visitTime;break;case R.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case R.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case R.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case R.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case R.Decimal:r=e.visitDecimal;break;case R.List:r=e.visitList;break;case R.Struct:r=e.visitStruct;break;case R.Union:r=e.visitUnion;break;case R.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case R.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case R.Dictionary:r=e.visitDictionary;break;case R.Interval:r=e.visitInterval;break;case R.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case R.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case R.Duration:r=e.visitDuration;break;case R.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case R.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case R.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case R.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case R.FixedSizeList:r=e.visitFixedSizeList;break;case R.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${R[t]}'`)}function Qh(e){switch(e.typeId){case R.Null:return R.Null;case R.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?R.Int8:R.Uint8;case 16:return n?R.Int16:R.Uint16;case 32:return n?R.Int32:R.Uint32;case 64:return n?R.Int64:R.Uint64}return R.Int}case R.Float:switch(e.precision){case Pp.HALF:return R.Float16;case Pp.SINGLE:return R.Float32;case Pp.DOUBLE:return R.Float64}return R.Float;case R.Binary:return R.Binary;case R.LargeBinary:return R.LargeBinary;case R.Utf8:return R.Utf8;case R.LargeUtf8:return R.LargeUtf8;case R.Bool:return R.Bool;case R.Decimal:return R.Decimal;case R.Time:switch(e.unit){case Ip.SECOND:return R.TimeSecond;case Ip.MILLISECOND:return R.TimeMillisecond;case Ip.MICROSECOND:return R.TimeMicrosecond;case Ip.NANOSECOND:return R.TimeNanosecond}return R.Time;case R.Timestamp:switch(e.unit){case Ip.SECOND:return R.TimestampSecond;case Ip.MILLISECOND:return R.TimestampMillisecond;case Ip.MICROSECOND:return R.TimestampMicrosecond;case Ip.NANOSECOND:return R.TimestampNanosecond}return R.Timestamp;case R.Date:switch(e.unit){case Fp.DAY:return R.DateDay;case Fp.MILLISECOND:return R.DateMillisecond}return R.Date;case R.Interval:switch(e.unit){case Lp.DAY_TIME:return R.IntervalDayTime;case Lp.YEAR_MONTH:return R.IntervalYearMonth}return R.Interval;case R.Duration:switch(e.unit){case Ip.SECOND:return R.DurationSecond;case Ip.MILLISECOND:return R.DurationMillisecond;case Ip.MICROSECOND:return R.DurationMicrosecond;case Ip.NANOSECOND:return R.DurationNanosecond}return R.Duration;case R.Map:return R.Map;case R.List:return R.List;case R.Struct:return R.Struct;case R.Union:switch(e.mode){case Np.Dense:return R.DenseUnion;case Np.Sparse:return R.SparseUnion}return R.Union;case R.FixedSizeBinary:return R.FixedSizeBinary;case R.FixedSizeList:return R.FixedSizeList;case R.Dictionary:return R.Dictionary}throw Error(`Unrecognized type '${R[e.typeId]}'`)}Yh.prototype.visitInt8=null,Yh.prototype.visitInt16=null,Yh.prototype.visitInt32=null,Yh.prototype.visitInt64=null,Yh.prototype.visitUint8=null,Yh.prototype.visitUint16=null,Yh.prototype.visitUint32=null,Yh.prototype.visitUint64=null,Yh.prototype.visitFloat16=null,Yh.prototype.visitFloat32=null,Yh.prototype.visitFloat64=null,Yh.prototype.visitDateDay=null,Yh.prototype.visitDateMillisecond=null,Yh.prototype.visitTimestampSecond=null,Yh.prototype.visitTimestampMillisecond=null,Yh.prototype.visitTimestampMicrosecond=null,Yh.prototype.visitTimestampNanosecond=null,Yh.prototype.visitTimeSecond=null,Yh.prototype.visitTimeMillisecond=null,Yh.prototype.visitTimeMicrosecond=null,Yh.prototype.visitTimeNanosecond=null,Yh.prototype.visitDenseUnion=null,Yh.prototype.visitSparseUnion=null,Yh.prototype.visitIntervalDayTime=null,Yh.prototype.visitIntervalYearMonth=null,Yh.prototype.visitDuration=null,Yh.prototype.visitDurationSecond=null,Yh.prototype.visitDurationMillisecond=null,Yh.prototype.visitDurationMicrosecond=null,Yh.prototype.visitDurationNanosecond=null;const $h=new Float64Array(1),eg=new Uint32Array($h.buffer);function tg(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 ng(e){if(e!==e)return 32256;$h[0]=e;let t=(eg[1]&2147483648)>>16&65535,n=eg[1]&2146435072,r=0;return n>=1089470464?eg[0]>0?n=31744:(n=(n&2080374784)>>16,r=(eg[1]&1048575)>>10):n<=1056964608?(r=1048576+(eg[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(eg[1]&1048575)+512>>10),t|n|r&65535}var rg=class extends Yh{};function ig(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const ag=(e,t,n)=>{e[t]=Math.floor(n/864e5)},og=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},lg=({values:e},t,n)=>{e[t]=n},ug=({values:e},t,n)=>{e[t]=ng(n)},dg=(e,t,n)=>{switch(e.type.precision){case Pp.HALF:return ug(e,t,n);case Pp.SINGLE:case Pp.DOUBLE:return lg(e,t,n)}},fg=({values:e},t,n)=>{ag(e,t,n.valueOf())},pg=({values:e},t,n)=>{e[t]=BigInt(n)},mg=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},hg=({values:e,valueOffsets:t},n,r)=>og(e,t,n,r),gg=({values:e,valueOffsets:t},n,r)=>og(e,t,n,Gf(r)),_g=(e,t,n)=>{e.type.unit===Fp.DAY?fg(e,t,n):pg(e,t,n)},vg=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},yg=({values:e},t,n)=>{e[t]=BigInt(n)},bg=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},xg=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},Sg=(e,t,n)=>{switch(e.type.unit){case Ip.SECOND:return vg(e,t,n);case Ip.MILLISECOND:return yg(e,t,n);case Ip.MICROSECOND:return bg(e,t,n);case Ip.NANOSECOND:return xg(e,t,n)}},Cg=({values:e},t,n)=>{e[t]=n},wg=({values:e},t,n)=>{e[t]=n},Tg=({values:e},t,n)=>{e[t]=n},Eg=({values:e},t,n)=>{e[t]=n},Dg=(e,t,n)=>{switch(e.type.unit){case Ip.SECOND:return Cg(e,t,n);case Ip.MILLISECOND:return wg(e,t,n);case Ip.MICROSECOND:return Tg(e,t,n);case Ip.NANOSECOND:return Eg(e,t,n)}},Og=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},kg=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=Yg.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=Yg.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},jg=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),Mg=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),Ng=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),Pg=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),Fg=(e,t,n)=>{let r=e.type.children.map(e=>Yg.getVisitFn(e.type)),i=n instanceof Map?Ng(t,n):n instanceof qv?Mg(t,n):Array.isArray(n)?jg(t,n):Pg(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},Ig=(e,t,n)=>{e.type.mode===Np.Dense?Lg(e,t,n):Rg(e,t,n)},Lg=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Yg.visit(i,e.valueOffsets[t],n)},Rg=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Yg.visit(i,t,n)},zg=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},Bg=(e,t,n)=>{e.type.unit===Lp.DAY_TIME?Vg(e,t,n):Hg(e,t,n)},Vg=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},Hg=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},Ug=({values:e},t,n)=>{e[t]=n},Wg=({values:e},t,n)=>{e[t]=n},Gg=({values:e},t,n)=>{e[t]=n},Kg=({values:e},t,n)=>{e[t]=n},qg=(e,t,n)=>{switch(e.type.unit){case Ip.SECOND:return Ug(e,t,n);case Ip.MILLISECOND:return Wg(e,t,n);case Ip.MICROSECOND:return Gg(e,t,n);case Ip.NANOSECOND:return Kg(e,t,n)}},Jg=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=Yg.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${Mm(e)}: ${Mm(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new $g(this[Xg],this[Zg])}},$g=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[Xg].type.children.findIndex(e=>e.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[Xg].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[Xg].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=G_.visit(e[Xg].children[n],e[Zg]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[Xg].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(Yg.visit(e[Xg].children[r],e[Zg],n),Reflect.set(e,t,n))}},t_=class extends Yh{};function n_(e){return(t,n)=>t.getValid(n)?e(t,n):null}const r_=(e,t)=>864e5*e[t],i_=(e,t)=>null,a_=(e,t,n)=>{if(n+1>=t.length)return null;let r=Nm(t[n]),i=Nm(t[n+1]);return e.subarray(r,i)},o_=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<r_(e,t),c_=({values:e},t)=>Nm(e[t]),l_=({stride:e,values:t},n)=>t[e*n],u_=({stride:e,values:t},n)=>tg(t[e*n]),d_=({values:e},t)=>e[t],f_=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),p_=({values:e,valueOffsets:t},n)=>a_(e,t,n),m_=({values:e,valueOffsets:t},n)=>{let r=a_(e,t,n);return r===null?null:Uf(r)},h_=({values:e},t)=>e[t],g_=({type:e,values:t},n)=>e.precision===Pp.HALF?tg(t[n]):t[n],__=(e,t)=>e.type.unit===Fp.DAY?s_(e,t):c_(e,t),v_=({values:e},t)=>1e3*Nm(e[t]),y_=({values:e},t)=>Nm(e[t]),b_=({values:e},t)=>Pm(e[t],BigInt(1e3)),x_=({values:e},t)=>Pm(e[t],BigInt(1e6)),S_=(e,t)=>{switch(e.type.unit){case Ip.SECOND:return v_(e,t);case Ip.MILLISECOND:return y_(e,t);case Ip.MICROSECOND:return b_(e,t);case Ip.NANOSECOND:return x_(e,t)}},C_=({values:e},t)=>e[t],w_=({values:e},t)=>e[t],T_=({values:e},t)=>e[t],E_=({values:e},t)=>e[t],D_=(e,t)=>{switch(e.type.unit){case Ip.SECOND:return C_(e,t);case Ip.MILLISECOND:return w_(e,t);case Ip.MICROSECOND:return T_(e,t);case Ip.NANOSECOND:return E_(e,t)}},O_=({values:e,stride:t},n)=>Km.decimal(e.subarray(t*n,t*(n+1))),k_=(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 qv([c])},A_=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new X_(o.slice(i,a-i))},j_=(e,t)=>new Qg(e,t),M_=(e,t)=>e.type.mode===Np.Dense?N_(e,t):P_(e,t),N_=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return G_.visit(r,e.valueOffsets[t])},P_=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return G_.visit(r,t)},F_=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},I_=(e,t)=>e.type.unit===Lp.DAY_TIME?L_(e,t):R_(e,t),L_=({values:e},t)=>e.subarray(2*t,2*(t+1)),R_=({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},z_=({values:e},t)=>e[t],B_=({values:e},t)=>e[t],V_=({values:e},t)=>e[t],H_=({values:e},t)=>e[t],U_=(e,t)=>{switch(e.type.unit){case Ip.SECOND:return z_(e,t);case Ip.MILLISECOND:return B_(e,t);case Ip.MICROSECOND:return V_(e,t);case Ip.NANOSECOND:return H_(e,t)}},W_=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new qv([a])};t_.prototype.visitNull=n_(i_),t_.prototype.visitBool=n_(o_),t_.prototype.visitInt=n_(h_),t_.prototype.visitInt8=n_(l_),t_.prototype.visitInt16=n_(l_),t_.prototype.visitInt32=n_(l_),t_.prototype.visitInt64=n_(d_),t_.prototype.visitUint8=n_(l_),t_.prototype.visitUint16=n_(l_),t_.prototype.visitUint32=n_(l_),t_.prototype.visitUint64=n_(d_),t_.prototype.visitFloat=n_(g_),t_.prototype.visitFloat16=n_(u_),t_.prototype.visitFloat32=n_(l_),t_.prototype.visitFloat64=n_(l_),t_.prototype.visitUtf8=n_(m_),t_.prototype.visitLargeUtf8=n_(m_),t_.prototype.visitBinary=n_(p_),t_.prototype.visitLargeBinary=n_(p_),t_.prototype.visitFixedSizeBinary=n_(f_),t_.prototype.visitDate=n_(__),t_.prototype.visitDateDay=n_(s_),t_.prototype.visitDateMillisecond=n_(c_),t_.prototype.visitTimestamp=n_(S_),t_.prototype.visitTimestampSecond=n_(v_),t_.prototype.visitTimestampMillisecond=n_(y_),t_.prototype.visitTimestampMicrosecond=n_(b_),t_.prototype.visitTimestampNanosecond=n_(x_),t_.prototype.visitTime=n_(D_),t_.prototype.visitTimeSecond=n_(C_),t_.prototype.visitTimeMillisecond=n_(w_),t_.prototype.visitTimeMicrosecond=n_(T_),t_.prototype.visitTimeNanosecond=n_(E_),t_.prototype.visitDecimal=n_(O_),t_.prototype.visitList=n_(k_),t_.prototype.visitStruct=n_(j_),t_.prototype.visitUnion=n_(M_),t_.prototype.visitDenseUnion=n_(N_),t_.prototype.visitSparseUnion=n_(P_),t_.prototype.visitDictionary=n_(F_),t_.prototype.visitInterval=n_(I_),t_.prototype.visitIntervalDayTime=n_(L_),t_.prototype.visitIntervalYearMonth=n_(R_),t_.prototype.visitDuration=n_(U_),t_.prototype.visitDurationSecond=n_(z_),t_.prototype.visitDurationMillisecond=n_(B_),t_.prototype.visitDurationMicrosecond=n_(V_),t_.prototype.visitDurationNanosecond=n_(H_),t_.prototype.visitFixedSizeList=n_(W_),t_.prototype.visitMap=n_(A_);const G_=new t_,K_=Symbol.for(`keys`),q_=Symbol.for(`vals`),J_=Symbol.for(`kKeysAsStrings`),Y_=Symbol.for(`_kKeysAsStrings`);var X_=class{constructor(e){return this[K_]=new qv([e.children[0]]).memoize(),this[q_]=e.children[1],new Proxy(this,new Q_)}get[J_](){return this[Y_]||(this[Y_]=Array.from(this[K_].toArray(),String))}[Symbol.iterator](){return new Z_(this[K_],this[q_])}get size(){return this[K_].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[K_],t=this[q_],n={};for(let r=-1,i=e.length;++r`${Mm(e)}: ${Mm(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},Z_=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)]})}},Q_=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[J_]}has(e,t){return e[J_].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[J_].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[J_].indexOf(t);if(n!==-1){let r=G_.visit(Reflect.get(e,q_),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[J_].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(Yg.visit(Reflect.get(e,q_),r,n),Reflect.set(e,t,n))}};Object.defineProperties(X_.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[K_]:{writable:!0,enumerable:!1,configurable:!1,value:null},[q_]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Y_]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let $_;function ev(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 tv=(e,t)=>e<0?t+e:e,nv=e=>e!==e;function rv(e){let t=typeof e;if(t!==`object`||e===null)return nv(e)?nv: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?Cp(e,t):!1:e instanceof Map?av(e):Array.isArray(e)?iv(e):e instanceof qv?ov(e):sv(e,!0)}function iv(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 lv(e,n);case Map:return dv(e,n,n.keys());case X_:case Qg:case Object:case void 0:return dv(e,n,t||Object.keys(n))}return n instanceof qv?uv(e,n):!1}}function lv(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r>r}function mv(e,t,n){let r=n.byteLength+7&-8;if(e>0||n.byteLength>3):hv(new gv(n,e,t,null,fv)).subarray(0,r)),i}return n}function hv(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 gv=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 _v(e,t,i)+_v(e,r,n)+vv(e,i>>3,r-i>>3)}function vv(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+=yv(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=yv(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=yv(a.getUint8(i)),i+=1;return r}function yv(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const bv=-1;var xv=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 z.isSparseUnion(e)||z.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(z.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=bv&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-_v(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=Jh(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(z.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===Np.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(mv(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===R.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(mv(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[Am.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[Am.TYPE])&&(a[Am.TYPE]=i.subarray(e,e+t)),(i=a[Am.OFFSET])&&(a[Am.OFFSET]=i.subarray(e,e+t+1))||(i=a[Am.DATA])&&(a[Am.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};xv.prototype.children=Object.freeze([]);var Sv=class e extends Yh{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new xv(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=gp(e.data),i=gp(e.nullBitmap),a=mp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xv(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=gp(e.data),i=gp(e.nullBitmap),a=hp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xv(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=gp(e.data),i=gp(e.nullBitmap),a=mp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xv(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=gp(e.data),i=gp(e.nullBitmap),a=hp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xv(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length/Jh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length/Jh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length/Jh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length/Jh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length/Jh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=gp(e.nullBitmap),a=mp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new xv(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=gp(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=pp(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(z.isSparseUnion(t))return new xv(t,n,a,o,[void 0,void 0,void 0,i],r);let s=mp(e.valueOffsets);return new xv(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=gp(t.nullBitmap),a=pp(n.indices.ArrayType,t.data),{dictionary:o=new qv([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new xv(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length/Jh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new xv(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=gp(e.nullBitmap),i=pp(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new xv(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=gp(t.nullBitmap),{length:o=i.length/Jh(n),nullCount:s=t.nullBitmap?-1:0}=t;return new xv(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=gp(t.nullBitmap),o=mp(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new xv(n,r,s,c,[o,void 0,a],[i])}};const Cv=new Sv;function wv(e){return Cv.visit(e)}var Tv=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 Dv(e){return e.reduce((e,t)=>e+t.nullCount,0)}function Ov(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function kv(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 Av(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function Lv(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new gv(n,e.offset+(t||0),e.length,n,fv)){if(!i)return r;++r}return-1}function Rv(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case R.Union:break;case R.Dictionary:break;default:return Lv(e,n)}let r=G_.getVisitFn(e),i=rv(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 Tv(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new Hv(a)})}var Hv=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof xv)))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}=Gv[o.typeId],r=a[0];this.isValid=e=>jv(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,Kv[o.typeId]),this._offsets=Ov(a);break}this.data=a,this.type=o,this.stride=Jh(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 Ev(this.data)}get nullCount(){return Dv(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${R[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(tv(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Uv.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(ev(this,t,n,({data:e,_offsets:t},n,r)=>kv(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case R.Int:case R.Float:case R.Decimal:case R.Time:case R.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 z.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(z.isDictionary(this.type)){let t=new Jv(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new Jv(this)}unmemoize(){if(z.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}};Wv=Symbol.toStringTag,qv[Wv]=(e=>{e.type=z.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(R).map(e=>R[e]).filter(e=>typeof e==`number`&&e!==R.NONE);for(let n of t){let t=G_.getVisitFnByTypeId(n),r=Yg.getVisitFnByTypeId(n),i=Bv.getVisitFnByTypeId(n);Gv[n]={get:t,set:r,indexOf:i},Kv[n]=Object.create(e,{isValid:{value:Mv(jv)},get:{value:Mv(G_.getVisitFnByTypeId(n))},set:{value:Nv(Yg.getVisitFnByTypeId(n))},indexOf:{value:Pv(Bv.getVisitFnByTypeId(n))}})}return`Vector`})(qv.prototype);var Jv=class e extends qv{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 qv(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},Yv=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()}},Xv=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()+Vp),(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):Mp.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new Om).__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 Yv).__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 Yv).__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 om).__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,Mp.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)}},Zv=class e{constructor(e=[],t,n,r=Mp.V5){this.fields=e||[],this.metadata=t||new Map,n||=ey(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=$v($v(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:$v($v(new Map,r[t].metadata),e.metadata)}))&&!1:!0}),o=ey(a,new Map);return new e([...r,...a],i,new Map([...this.dictionaries,...o]))}};Zv.prototype.fields=null,Zv.prototype.metadata=null,Zv.prototype.dictionaries=null;var Qv=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)}};Qv.prototype.type=null,Qv.prototype.name=null,Qv.prototype.nullable=null,Qv.prototype.metadata=null;function $v(e,t){return new Map([...e||new Map,...t||new Map])}function ey(e,t=new Map){for(let n=-1,r=e.length;++n0&&ey(i.children,t)}return t}var ty=Jp,ny=qp,ry=class{static decode(e){e=new ny(gp(e));let t=Xv.getRootAsFooter(e),n=Zv.decode(t.schema(),new Map,t.version());return new iy(n,t)}static encode(e){let t=new ty,n=Zv.encode(t,e.schema);Xv.startRecordBatchesVector(t,e.numRecordBatches);for(let n of[...e.recordBatches()].slice().reverse())ay.encode(t,n);let r=t.endVector();Xv.startDictionariesVector(t,e.numDictionaries);for(let n of[...e.dictionaryBatches()].slice().reverse())ay.encode(t,n);let i=t.endVector();return Xv.startFooter(t),Xv.addSchema(t,n),Xv.addVersion(t,Mp.V5),Xv.addRecordBatches(t,r),Xv.addDictionaries(t,i),Xv.finishFooterBuffer(t,Xv.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=Mp.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 Lf(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(oy);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return wp.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return wp.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return Lf(this,void 0,void 0,function*(){return yield this.abort(e),oy})}return(e){return Lf(this,void 0,void 0,function*(){return yield this.close(),oy})}read(e){return Lf(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return Lf(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(oy)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(`AsyncQueue is closed`)}},uy=class extends ly{write(e){if((e=gp(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Uf(this.toUint8Array(!0)):this.toUint8Array(!1).then(Uf)}toUint8Array(e=!1){return e?fp(this._values)[0]:(()=>Lf(this,void 0,void 0,function*(){var e,t,n,r;let i=[],a=0;try{for(var o=!0,s=Vf(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 fp(i,a)[0]}))()}},dy=class{constructor(e){e&&(this.source=new py(wp.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)}},fy=class e{constructor(t){t instanceof e?this.source=t.source:t instanceof uy?this.source=new my(wp.fromAsyncIterable(t)):sp(t)?this.source=new my(wp.fromNodeStream(t)):ap(t)?this.source=new my(wp.fromDOMStream(t)):np(t)?this.source=new my(wp.fromDOMStream(t.body)):Zf(t)?this.source=new my(wp.fromIterable(t)):(Xf(t)||Qf(t))&&(this.source=new my(wp.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)}},py=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)||oy)}return(e){return Object.create(this.source.return&&this.source.return(e)||oy)}},my=class{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return Lf(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return Lf(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return Lf(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(e){return Lf(this,arguments,void 0,function*(e,t=`read`){return yield this.source.next({cmd:t,size:e})})}throw(e){return Lf(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||oy;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return Lf(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||oy;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},hy=class extends dy{constructor(e,t){super(),this.position=0,this.buffer=gp(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),eLf(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return Lf(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 Lf(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`${vy(this.buffer[3])} ${vy(this.buffer[2])} ${vy(this.buffer[1])} ${vy(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)}},Ey=class extends Ty{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:hv(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return pp(Uint8Array,pp(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return pp(Uint8Array,pp(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:n}=this;return z.isTimestamp(e)||(z.isInt(e)||z.isTime(e))&&e.bitWidth===64||z.isDuration(e)||z.isDate(e)&&e.unit===Fp.MILLISECOND?pp(Uint8Array,Cy.convertArray(n[t])):z.isDecimal(e)?pp(Uint8Array,wy.convertArray(n[t])):z.isBinary(e)||z.isLargeBinary(e)||z.isFixedSizeBinary(e)?Dy(n[t]):z.isBool(e)?hv(n[t]):z.isUtf8(e)||z.isLargeUtf8(e)?Gf(n[t].join(``)):pp(Uint8Array,pp(e.ArrayType,n[t].map(e=>+e)))}};function Dy(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 V=class extends Yh{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 Oy(e,t){return t instanceof e.constructor}function ky(e,t){return e===t||Oy(e,t)}function Ay(e,t){return e===t||Oy(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function jy(e,t){return e===t||Oy(e,t)&&e.precision===t.precision}function My(e,t){return e===t||Oy(e,t)&&e.byteWidth===t.byteWidth}function Ny(e,t){return e===t||Oy(e,t)&&e.unit===t.unit}function Py(e,t){return e===t||Oy(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function Fy(e,t){return e===t||Oy(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function Iy(e,t){return e===t||Oy(e,t)&&e.children.length===t.children.length&&Wy.compareManyFields(e.children,t.children)}function Ly(e,t){return e===t||Oy(e,t)&&e.children.length===t.children.length&&Wy.compareManyFields(e.children,t.children)}function Ry(e,t){return e===t||Oy(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&Wy.compareManyFields(e.children,t.children)}function zy(e,t){return e===t||Oy(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&Wy.visit(e.indices,t.indices)&&Wy.visit(e.dictionary,t.dictionary)}function By(e,t){return e===t||Oy(e,t)&&e.unit===t.unit}function Vy(e,t){return e===t||Oy(e,t)&&e.unit===t.unit}function Hy(e,t){return e===t||Oy(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&Wy.compareManyFields(e.children,t.children)}function Uy(e,t){return e===t||Oy(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&Wy.compareManyFields(e.children,t.children)}V.prototype.visitNull=ky,V.prototype.visitBool=ky,V.prototype.visitInt=Ay,V.prototype.visitInt8=Ay,V.prototype.visitInt16=Ay,V.prototype.visitInt32=Ay,V.prototype.visitInt64=Ay,V.prototype.visitUint8=Ay,V.prototype.visitUint16=Ay,V.prototype.visitUint32=Ay,V.prototype.visitUint64=Ay,V.prototype.visitFloat=jy,V.prototype.visitFloat16=jy,V.prototype.visitFloat32=jy,V.prototype.visitFloat64=jy,V.prototype.visitUtf8=ky,V.prototype.visitLargeUtf8=ky,V.prototype.visitBinary=ky,V.prototype.visitLargeBinary=ky,V.prototype.visitFixedSizeBinary=My,V.prototype.visitDate=Ny,V.prototype.visitDateDay=Ny,V.prototype.visitDateMillisecond=Ny,V.prototype.visitTimestamp=Py,V.prototype.visitTimestampSecond=Py,V.prototype.visitTimestampMillisecond=Py,V.prototype.visitTimestampMicrosecond=Py,V.prototype.visitTimestampNanosecond=Py,V.prototype.visitTime=Fy,V.prototype.visitTimeSecond=Fy,V.prototype.visitTimeMillisecond=Fy,V.prototype.visitTimeMicrosecond=Fy,V.prototype.visitTimeNanosecond=Fy,V.prototype.visitDecimal=ky,V.prototype.visitList=Iy,V.prototype.visitStruct=Ly,V.prototype.visitUnion=Ry,V.prototype.visitDenseUnion=Ry,V.prototype.visitSparseUnion=Ry,V.prototype.visitDictionary=zy,V.prototype.visitInterval=By,V.prototype.visitIntervalDayTime=By,V.prototype.visitIntervalYearMonth=By,V.prototype.visitDuration=Vy,V.prototype.visitDurationSecond=Vy,V.prototype.visitDurationMillisecond=Vy,V.prototype.visitDurationMicrosecond=Vy,V.prototype.visitDurationNanosecond=Vy,V.prototype.visitFixedSizeList=Hy,V.prototype.visitMap=Uy;const Wy=new V;function Gy(e,t){return Wy.compareSchemas(e,t)}function Ky(e,t){return qy(e,t.map(e=>e.data.concat()))}function qy(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++]=wv({type:new Vh(n),length:o,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map(t=>new Qy(e,t))]}function Jy(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))??wv({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return n}var Yy,Xy=class e{constructor(...t){var n,r;if(t.length===0)return this.batches=[],this.schema=new Zv([]),this._offsets=[0],this;let i,a;t[0]instanceof Zv&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(a=t.pop());let o=t=>{if(t){if(t instanceof Qy)return[t];if(t instanceof e)return t.batches;if(t instanceof xv){if(t.type instanceof Vh)return[new Qy(new Zv(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 qv([t[e]])),r=i??new Zv(e.map((e,t)=>new Qv(String(e),n[t].type,n[t].nullable))),[,a]=Ky(r,n);return a.length===0?[new Qy(t)]:a}}return[]},s=t.flatMap(e=>o(e));if(i=(r=i??(n=s[0])?.schema)??new Zv([]),!(i instanceof Zv))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);for(let e of s){if(!(e instanceof Qy))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);if(!Gy(i,e.schema))throw TypeError(`Table and inner RecordBatch schemas must be equivalent.`)}this.schema=i,this.batches=s,this._offsets=a??Ov(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=Dv(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(tv(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?Uv.visit(new qv(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 Qy(n,e)))}slice(t,n){let r=this.schema;[t,n]=ev({length:this.numRows},t,n);let i=kv(this.data,this._offsets,t,n);return new e(r,i.map(e=>new Qy(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=wv({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new qv(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]=Ky(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(...Ky(a,o))}};Yy=Symbol.toStringTag,Xy[Yy]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=Mv(jv),e.get=Mv(G_.getVisitFn(R.Struct)),e.set=Nv(Yg.getVisitFn(R.Struct)),e.indexOf=Pv(Bv.getVisitFn(R.Struct)),`Table`))(Xy.prototype);var Zy,Qy=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof Zv)||([,this.data=wv({nullCount:0,type:new Vh(this.schema.fields),children:this.schema.fields.map(e=>wv({type:e.type,nullCount:0}))})]=e,!(this.data instanceof xv)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=$y(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]=Qv.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new Zv(n),o=wv({type:new Vh(n),length:i,children:r,nullCount:0});[this.schema,this.data]=$y(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||=eb(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 G_.visit(this.data,e)}at(e){return this.get(tv(e,this.numRows))}set(e,t){return Yg.visit(this.data,e,t)}indexOf(e,t){return Bv.visit(this.data,e,t)}[Symbol.iterator](){return Uv.visit(new qv([this.data]))}toArray(){return[...this]}concat(...e){return new Xy(this.schema,[this,...e])}slice(t,n){let[r]=new qv([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,wv({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=wv({type:new Vh(n.fields),length:this.numRows,children:r});return new e(n,i)}};Zy=Symbol.toStringTag,Qy[Zy]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(Qy.prototype);function $y(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))??wv({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),wv({type:new Vh(i),length:n,children:a})]}function eb(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;++rwv({type:e.type})),n=wv({type:new Vh(e.fields),nullCount:0,children:t});super(e,n)}},nb=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()+Vp),(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):Mp.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):km.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 om).__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,Mp.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,km.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)}},rb=class extends Yh{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return bm.startNull(t),bm.endNull(t)}visitInt(e,t){return im.startInt(t),im.addBitWidth(t,e.bitWidth),im.addIsSigned(t,e.isSigned),im.endInt(t)}visitFloat(e,t){return mm.startFloatingPoint(t),mm.addPrecision(t,e.precision),mm.endFloatingPoint(t)}visitBinary(e,t){return sm.startBinary(t),sm.endBinary(t)}visitLargeBinary(e,t){return gm.startLargeBinary(t),gm.endLargeBinary(t)}visitBool(e,t){return cm.startBool(t),cm.endBool(t)}visitUtf8(e,t){return Tm.startUtf8(t),Tm.endUtf8(t)}visitLargeUtf8(e,t){return _m.startLargeUtf8(t),_m.endLargeUtf8(t)}visitDecimal(e,t){return um.startDecimal(t),um.addScale(t,e.scale),um.addPrecision(t,e.precision),um.addBitWidth(t,e.bitWidth),um.endDecimal(t)}visitDate(e,t){return lm.startDate(t),lm.addUnit(t,e.unit),lm.endDate(t)}visitTime(e,t){return Sm.startTime(t),Sm.addUnit(t,e.unit),Sm.addBitWidth(t,e.bitWidth),Sm.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return Cm.startTimestamp(t),Cm.addUnit(t,e.unit),n!==void 0&&Cm.addTimezone(t,n),Cm.endTimestamp(t)}visitInterval(e,t){return hm.startInterval(t),hm.addUnit(t,e.unit),hm.endInterval(t)}visitDuration(e,t){return dm.startDuration(t),dm.addUnit(t,e.unit),dm.endDuration(t)}visitList(e,t){return vm.startList(t),vm.endList(t)}visitStruct(e,t){return xm.startStruct_(t),xm.endStruct_(t)}visitUnion(e,t){wm.startTypeIdsVector(t,e.typeIds.length);let n=wm.createTypeIdsVector(t,e.typeIds);return wm.startUnion(t),wm.addMode(t,e.mode),wm.addTypeIds(t,n),wm.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return am.startDictionaryEncoding(t),am.addId(t,BigInt(e.id)),am.addIsOrdered(t,e.isOrdered),n!==void 0&&am.addIndexType(t,n),am.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return fm.startFixedSizeBinary(t),fm.addByteWidth(t,e.byteWidth),fm.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return pm.startFixedSizeList(t),pm.addListSize(t,e.listSize),pm.endFixedSizeList(t)}visitMap(e,t){return ym.startMap(t),ym.addKeysSorted(t,e.keysSorted),ym.endMap(t)}};const ib=new rb;function ab(e,t=new Map){return new Zv(cb(e,t),mb(e.metadata),t)}function ob(e){return new bb(e.count,ub(e.columns),db(e.columns))}function sb(e){return new xb(ob(e.data),e.id,e.isDelta)}function cb(e,t){return(e.fields||[]).filter(Boolean).map(e=>Qv.fromJSON(e,t))}function lb(e,t){return(e.children||[]).filter(Boolean).map(e=>Qv.fromJSON(e,t))}function ub(e){return(e||[]).reduce((e,t)=>[...e,new Cb(t.count,fb(t.VALIDITY)),...ub(t.children)],[])}function db(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function pb(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=gb(e,lb(e,t)),i=new Qv(e.name,o,e.nullable,mb(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?hb(r):new yh,s=new qh(t.get(n),r,n,a.isOrdered),i=new Qv(e.name,s,e.nullable,mb(e.metadata))):(r=(r=a.indexType)?hb(r):new yh,t.set(n,o=gb(e,lb(e,t))),s=new qh(o,r,n,a.isOrdered),i=new Qv(e.name,s,e.nullable,mb(e.metadata))),i||null}function mb(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function hb(e){return new gh(e.isSigned,e.bitWidth)}function gb(e,t){let n=e.type.name;switch(n){case`NONE`:return new hh;case`null`:return new hh;case`binary`:return new kh;case`largebinary`:return new Ah;case`utf8`:return new jh;case`largeutf8`:return new Mh;case`bool`:return new Nh;case`list`:return new Bh((t||[])[0]);case`struct`:return new Vh(t||[]);case`struct_`:return new Vh(t||[])}switch(n){case`int`:{let t=e.type;return new gh(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new Th(Pp[t.precision])}case`decimal`:{let t=e.type;return new Ph(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new Fh(Fp[t.unit])}case`time`:{let t=e.type;return new Ih(Ip[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new Lh(Ip[t.unit],t.timezone)}case`interval`:{let t=e.type;return new Rh(Lp[t.unit])}case`duration`:{let t=e.type;return new zh(Ip[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new Hh(Np[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new Uh(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new Wh(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new Gh((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var _b=Jp,vb=qp,yb=class e{static fromJSON(t,n){let r=new e(0,Mp.V5,n);return r._createHeader=wb(t,n),r}static decode(t){t=new vb(gp(t));let n=nb.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=Tb(n,a),o}static encode(e){let t=new _b,n=-1;return e.isSchema()?n=Zv.encode(t,e.header()):e.isRecordBatch()?n=bb.encode(t,e.header()):e.isDictionaryBatch()&&(n=xb.encode(t,e.header())),nb.startMessage(t),nb.addVersion(t,Mp.V5),nb.addHeader(t,n),nb.addHeaderType(t,e.headerType),nb.addBodyLength(t,BigInt(e.bodyLength)),nb.finishMessageBuffer(t,nb.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof Zv)return new e(0,Mp.V5,km.Schema,t);if(t instanceof bb)return new e(n,Mp.V5,km.RecordBatch,t);if(t instanceof xb)return new e(n,Mp.V5,km.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===km.Schema}isRecordBatch(){return this.headerType===km.RecordBatch}isDictionaryBatch(){return this.headerType===km.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=Nm(e)}},bb=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=Nm(e)}},xb=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=Nm(t)}},Sb=class{constructor(e,t){this.offset=Nm(e),this.length=Nm(t)}},Cb=class{constructor(e,t){this.length=Nm(e),this.nullCount=Nm(t)}};function wb(e,t){return(()=>{switch(t){case km.Schema:return Zv.fromJSON(e);case km.RecordBatch:return bb.fromJSON(e);case km.DictionaryBatch:return xb.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${km[t]}, type: ${t} }`)})}function Tb(e,t){return(()=>{switch(t){case km.Schema:return Zv.decode(e.header(new Om),new Map,e.version());case km.RecordBatch:return bb.decode(e.header(new em),e.version());case km.DictionaryBatch:return xb.decode(e.header(new tm),e.version())}throw Error(`Unrecognized Message type: { name: ${km[t]}, type: ${t} }`)})}Qv.encode=Bb,Qv.decode=Fb,Qv.fromJSON=pb,Zv.encode=zb,Zv.decode=Eb,Zv.fromJSON=ab,bb.encode=Vb,bb.decode=Db,bb.fromJSON=ob,xb.encode=Hb,xb.decode=Ob,xb.fromJSON=sb,Cb.encode=Ub,Cb.decode=Ab,Sb.encode=Wb,Sb.decode=kb;function Eb(e,t=new Map,n=Mp.V5){let r=Nb(e,t);return new Zv(r,Ib(e),t,n)}function Db(e,t=Mp.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new bb(e.length(),jb(e),Mb(e,t))}function Ob(e,t=Mp.V5){return new xb(bb.decode(e.data(),t),e.id(),e.isDelta())}function kb(e){return new Sb(e.offset(),e.length())}function Ab(e){return new Cb(e.length(),e.nullCount())}function jb(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++rQv.encode(e,t));Om.startFieldsVector(e,n.length);let r=Om.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?Om.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return om.startKeyValue(e),om.addKey(e,r),om.addValue(e,i),om.endKeyValue(e)})):-1;return Om.startSchema(e),Om.addFields(e,r),Om.addEndianness(e,Gb?nm.Little:nm.Big),i!==-1&&Om.addCustomMetadata(e,i),Om.endSchema(e)}function Bb(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;z.isDictionary(a)?(o=a.dictionary.typeId,i=ib.visit(a,e),r=ib.visit(a.dictionary,e)):r=ib.visit(a,e);let s=(a.children||[]).map(t=>Qv.encode(e,t)),c=Dm.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?Dm.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return om.startKeyValue(e),om.addKey(e,r),om.addValue(e,i),om.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),Dm.startField(e),Dm.addType(e,r),Dm.addTypeType(e,o),Dm.addChildren(e,c),Dm.addNullable(e,!!t.nullable),n!==-1&&Dm.addName(e,n),i!==-1&&Dm.addDictionary(e,i),l!==-1&&Dm.addCustomMetadata(e,l),Dm.endField(e)}function Vb(e,t){let n=t.nodes||[],r=t.buffers||[];em.startNodesVector(e,n.length);for(let t of n.slice().reverse())Cb.encode(e,t);let i=e.endVector();em.startBuffersVector(e,r.length);for(let t of r.slice().reverse())Sb.encode(e,t);let a=e.endVector();return em.startRecordBatch(e),em.addLength(e,BigInt(t.length)),em.addNodes(e,i),em.addBuffers(e,a),em.endRecordBatch(e)}function Hb(e,t){let n=bb.encode(e,t.data);return tm.startDictionaryBatch(e),tm.addId(e,BigInt(t.id)),tm.addIsDelta(e,t.isDelta),tm.addData(e,n),tm.endDictionaryBatch(e)}function Ub(e,t){return $p.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function Wb(e,t){return Qp.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const Gb=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),Kb=e=>`Expected ${km[e]} Message in stream, but was null or length 0.`,qb=e=>`Header pointer of flatbuffer-encoded ${km[e]} Message is null or length 0.`,Jb=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,Yb=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var Xb=class{constructor(e){this.source=e instanceof dy?e:new dy(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?oy: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(Kb(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=gp(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(Kb(e));return t.value}readSchema(){let e=km.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(qb(e));return n}};const $b=4,ex=`ARROW1`,tx=new Uint8Array(6);for(let e=0;e<6;e+=1)tx[e]=ex.codePointAt(e);function nx(e,t=0){for(let n=-1,r=tx.length;++nthis):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 wp.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return wp.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:$f(t)?bx(t):tp(t)?Cx(t):Xf(t)?(()=>Lf(this,void 0,void 0,function*(){return yield e.from(yield t)}))():np(t)||ap(t)||sp(t)||Qf(t)?Sx(new fy(t)):xx(new dy(t))}static readAll(t){return t instanceof e?t.isSync()?vx(t):yx(t):$f(t)||ArrayBuffer.isView(t)||Zf(t)||ep(t)?vx(t):yx(t)}},sx=class extends ox{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return zf(this,arguments,function*(){yield L(yield*Bf(Vf(this[Symbol.iterator]())))})}},cx=class extends ox{constructor(e){super(e),this._impl=e}readAll(){return Lf(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=Vf(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]()}},lx=class extends sx{constructor(e){super(e),this._impl=e}},ux=class extends cx{constructor(e){super(e),this._impl=e}},dx=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=wv({type:new Vh(this.schema.fields),length:e.length,children:n});return new Qy(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 qv(c)):new qv(c)).memoize()}_loadVectors(e,t,n){return new Ty(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},fx=class extends dx{constructor(e,t){super(t),this._reader=$f(e)?new Qb(this._handle=e):new Xb(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=_x(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):oy}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):oy}next(){if(this.closed)return oy;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 tb(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},px=class extends dx{constructor(e,t){super(t),this._reader=new Zb(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Lf(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 Lf(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=_x(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Lf(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):oy})}return(e){return Lf(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):oy})}next(){return Lf(this,void 0,void 0,function*(){if(this.closed)return oy;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 tb(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Lf(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},mx=class extends fx{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 hy?e:new hy(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(km.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(km.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-ix,n=e.readInt32(t),r=e.readAt(t-n,n);return ry.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Lf(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 Lf(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(km.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 Lf(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(km.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 Lf(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-ix,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return ry.decode(r)})}_readNextMessageAndValidate(e){return Lf(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?nx(t)?new lx(new mx(e.read())):new sx(new fx(e)):new sx(new fx(function*(){}()))}function Sx(e){return Lf(this,void 0,void 0,function*(){let t=yield e.peek(rx+7&-8);return t&&t.byteLength>=4?nx(t)?new lx(new mx(yield e.read())):new cx(new px(e)):new cx(new px(function(){return zf(this,arguments,function*(){})}()))})}function Cx(e){return Lf(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new gy(e,t);return t>=ax&&nx(yield n.readAt(0,rx+7&-8))?new ux(new hx(n)):new cx(new px(n))})}var wx=class e extends Yh{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof Qy?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 qv)return this.visitMany(e.data),this;let{type:t}=e;if(!z.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(z.isUnion(t))this.nodes.push(new Cb(n,0));else{let{nullCount:r}=e;z.isNull(t)||Tx.call(this,r<=0?new Uint8Array:mv(e.offset,n,e.nullBitmap)),this.nodes.push(new Cb(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 Tx(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new Sb(this._byteLength,t)),this._byteLength+=t,this}function Ex(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(Tx.call(this,i),n.mode===Np.Sparse)return jx.call(this,e);if(n.mode===Np.Dense){if(e.offset<=0)return Tx.call(this,a),jx.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 Dx(e){let t;return e.nullCount>=e.length?Tx.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?Tx.call(this,mv(e.offset,e.length,t)):Tx.call(this,hv(e.values))}function Ox(e){return Tx.call(this,e.values.subarray(0,e.length*e.stride))}function kx(e){let{length:t,values:n,valueOffsets:r}=e,i=Nm(r[0]),a=Nm(r[t]),o=Math.min(a-i,n.byteLength-i);return Tx.call(this,Sp(-i,t+1,r)),Tx.call(this,n.subarray(i,i+o)),this}function Ax(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return Tx.call(this,Sp(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function jx(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}wx.prototype.visitBool=Dx,wx.prototype.visitInt=Ox,wx.prototype.visitFloat=Ox,wx.prototype.visitUtf8=kx,wx.prototype.visitLargeUtf8=kx,wx.prototype.visitBinary=kx,wx.prototype.visitLargeBinary=kx,wx.prototype.visitFixedSizeBinary=Ox,wx.prototype.visitDate=Ox,wx.prototype.visitTimestamp=Ox,wx.prototype.visitTime=Ox,wx.prototype.visitDecimal=Ox,wx.prototype.visitList=Ax,wx.prototype.visitStruct=jx,wx.prototype.visitUnion=Ex,wx.prototype.visitInterval=Ox,wx.prototype.visitDuration=Ox,wx.prototype.visitFixedSizeList=Ax,wx.prototype.visitMap=Ax;var Mx=class extends cy{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 uy,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Yf(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 Xf(e)?e.then(e=>this.writeAll(e)):Qf(e)?Ix(this,e):Fx(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 uy?this._sink=e:(this._sink=new uy,e&&ip(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&op(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||!Gy(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 Xy&&!(t=e.schema)||e instanceof Qy&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!Gy(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Qy?e instanceof tb||this._writeRecordBatch(e):e instanceof Xy?this.writeAll(e.batches):Zf(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=yb.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===km.RecordBatch?this._recordBatchBlocks.push(new ay(o,e.bodyLength,this._position)):e.headerType===km.DictionaryBatch&&this._dictionaryBlocks.push(new ay(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=gp(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(yb.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(tx)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=wx.assemble(e),a=new bb(e.numRows,n,r),o=yb.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}=wx.assemble(new qv([e])),s=new bb(e.length,i,a),c=new xb(s,t,n),l=yb.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)):Qf(t)?Ix(r,t):Fx(r,t)}},Px=class e extends Mx{static writeAll(t){let n=new e;return Xf(t)?t.then(e=>n.writeAll(e)):Qf(t)?Ix(n,t):Fx(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=ry.encode(new ry(e,Mp.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function Fx(e,t){let n=t;t instanceof Xy&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function Ix(e,t){return Lf(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=Vf(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 Lx(e,t=`stream`){return(t===`stream`?Nx:Px).writeAll(e).toUint8Array(!0)}var Rx=Object.create,zx=Object.defineProperty,Bx=Object.getOwnPropertyDescriptor,Vx=Object.getOwnPropertyNames,Hx=Object.getPrototypeOf,Ux=Object.prototype.hasOwnProperty,Wx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gx=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Vx(t))!Ux.call(e,i)&&i!==n&&zx(e,i,{get:()=>t[i],enumerable:!(r=Bx(t,i))||r.enumerable});return e},Kx=(e,t,n)=>(n=e==null?{}:Rx(Hx(e)),Gx(t||!e||!e.__esModule?zx(n,`default`,{value:e,enumerable:!0}):n,e)),qx=Wx((e,t)=>{t.exports=Worker}),Jx=(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))(Jx||{}),Yx=(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))(Yx||{}),Xx=(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))(Xx||{}),Zx=(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))(Zx||{}),Qx=(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))(Qx||{}),$x=(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))($x||{}),eS=class{log(e){}},tS=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},nS=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(nS||{}),rS=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=ox.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new Xy(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 iS(this._bindings,this._conn,n),i=await ox.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 aS(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=Lx(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)}},iS=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}},aS=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=ox.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new Xy(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new iS(this.bindings,this.connectionId,t),r=await ox.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},oS=(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))(oS||{}),sS=(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))(sS||{}),cS=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 lS(e){switch(e.typeId){case R.Binary:return{sqlType:`binary`};case R.Bool:return{sqlType:`bool`};case R.Date:return{sqlType:`date`};case R.DateDay:return{sqlType:`date32[d]`};case R.DateMillisecond:return{sqlType:`date64[ms]`};case R.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case R.Float:return{sqlType:`float`};case R.Float16:return{sqlType:`float16`};case R.Float32:return{sqlType:`float32`};case R.Float64:return{sqlType:`float64`};case R.Int:return{sqlType:`int32`};case R.Int16:return{sqlType:`int16`};case R.Int32:return{sqlType:`int32`};case R.Int64:return{sqlType:`int64`};case R.Uint16:return{sqlType:`uint16`};case R.Uint32:return{sqlType:`uint32`};case R.Uint64:return{sqlType:`uint64`};case R.Uint8:return{sqlType:`uint8`};case R.IntervalDayTime:return{sqlType:`interval[dt]`};case R.IntervalYearMonth:return{sqlType:`interval[m]`};case R.List:return{sqlType:`list`,valueType:lS(e.valueType)};case R.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case R.Null:return{sqlType:`null`};case R.Utf8:return{sqlType:`utf8`};case R.Struct:return{sqlType:`struct`,fields:e.children.map(e=>uS(e.name,e.type))};case R.Map:{let t=e;return{sqlType:`map`,keyType:lS(t.keyType),valueType:lS(t.valueType)}}case R.Time:return{sqlType:`time[s]`};case R.TimeMicrosecond:return{sqlType:`time[us]`};case R.TimeMillisecond:return{sqlType:`time[ms]`};case R.TimeNanosecond:return{sqlType:`time[ns]`};case R.TimeSecond:return{sqlType:`time[s]`};case R.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case R.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case R.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case R.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case R.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function uS(e,t){let n=lS(t);return n.name=e,n}var dS=new TextEncoder,fS=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 cS(`RESET`,null);return await this.postTask(e)}async ping(){let e=new cS(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new cS(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new cS(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new cS(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new cS(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new cS(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new cS(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new cS(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new cS(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new cS(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new rS(this,e)}async disconnect(e){let t=new cS(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new cS(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new cS(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new cS(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new cS(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new cS(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new cS(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new cS(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new cS(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new cS(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new cS(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new cS(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=dS.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new cS(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new cS(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new cS(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new cS(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new cS(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new cS(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new cS(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new cS(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new cS(`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(uS(t,r))}n.columnsFlat=e,delete n.columns}let r=new cS(`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(uS(t,r))}n.columnsFlat=e,delete n.columns}let r=new cS(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function pS(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}pS();var mS=(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))(mS||{}),hS=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])),gS=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])),_S=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])),vS=()=>(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])),yS={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`}}};yS.name,yS.version;var bS=yS.version.split(`.`);bS[0],bS[1],bS[2];var xS=()=>typeof navigator>`u`,SS=null,CS=null,wS=null,TS=null,ES=null;async function DS(){return SS??=typeof BigInt64Array<`u`,CS??=await gS(),wS??=await vS(),TS??=await _S(),ES??=await hS(),{bigInt64Array:SS,crossOriginIsolated:xS()||globalThis.crossOriginIsolated||!1,wasmExceptions:CS,wasmSIMD:TS,wasmThreads:wS,wasmBulkMemory:ES}}async function OS(e){let t=await DS();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}}Kx(qx()),Symbol.for(`constructDateFrom`);const kS={},AS={};function jS(e,t){try{let n=kS[e]||=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format,r=n(t).split(`GMT`)[1]||``;return r in AS?AS[r]:NS(r,r.split(`:`))}catch{if(e in AS)return AS[e];let t=e?.match(MS);return t?NS(e,t.slice(1)):NaN}}const MS=/([+-]\d\d):?(\d\d)?/;function NS(e,t){let n=+t[0],r=+(t[1]||0);return AS[e]=n>0?n*60+r:n*60-r}var PS=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(jS(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)),RS(this,NaN),IS(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-jS(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),IS(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const FS=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!FS.test(e))return;let t=e.replace(FS,`$1UTC`);PS.prototype[t]&&(e.startsWith(`get`)?PS.prototype[e]=function(){return this.internal[t]()}:(PS.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),LS(this),+this},PS.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),IS(this),+this}))});function IS(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function LS(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()),RS(e)}function RS(e){let t=jS(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=jS(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=jS(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))}}(class e extends PS{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} (${zS(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 zS(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const BS=new TextDecoder(`utf-8`),VS=e=>BS.decode(e),HS=new TextEncoder,US=e=>HS.encode(e),WS=e=>typeof e==`function`,GS=e=>e!=null&&Object(e)===e,KS=e=>GS(e)&&WS(e.then),qS=e=>GS(e)&&WS(e[Symbol.iterator]),JS=e=>GS(e)&&WS(e[Symbol.asyncIterator]),YS=e=>GS(e)&&`done`in e&&`value`in e,XS=e=>GS(e)&&WS(e.clear)&&WS(e.bytes)&&WS(e.position)&&WS(e.setPosition)&&WS(e.capacity)&&WS(e.getBufferIdentifier)&&WS(e.createLong);var ZS={};Ie(ZS,{compareArrayLike:()=>IC,joinUint8Arrays:()=>tC,memcpy:()=>eC,rebaseValueOffsets:()=>FC,toArrayBufferView:()=>nC,toArrayBufferViewAsyncIterator:()=>TC,toArrayBufferViewIterator:()=>hC,toBigInt64Array:()=>oC,toBigUint64Array:()=>uC,toFloat32Array:()=>dC,toFloat32ArrayAsyncIterator:()=>MC,toFloat32ArrayIterator:()=>SC,toFloat64Array:()=>fC,toFloat64ArrayAsyncIterator:()=>NC,toFloat64ArrayIterator:()=>CC,toInt16Array:()=>iC,toInt16ArrayAsyncIterator:()=>DC,toInt16ArrayIterator:()=>_C,toInt32Array:()=>aC,toInt32ArrayAsyncIterator:()=>OC,toInt32ArrayIterator:()=>vC,toInt8Array:()=>rC,toInt8ArrayAsyncIterator:()=>EC,toInt8ArrayIterator:()=>gC,toUint16Array:()=>cC,toUint16ArrayAsyncIterator:()=>AC,toUint16ArrayIterator:()=>bC,toUint32Array:()=>lC,toUint32ArrayAsyncIterator:()=>jC,toUint32ArrayIterator:()=>xC,toUint8Array:()=>sC,toUint8ArrayAsyncIterator:()=>kC,toUint8ArrayIterator:()=>yC,toUint8ClampedArray:()=>pC,toUint8ClampedArrayAsyncIterator:()=>PC,toUint8ClampedArrayIterator:()=>wC});const QS=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function $S(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;++cnC(Int8Array,e),iC=e=>nC(Int16Array,e),aC=e=>nC(Int32Array,e),oC=e=>nC(BigInt64Array,e),sC=e=>nC(Uint8Array,e),cC=e=>nC(Uint16Array,e),lC=e=>nC(Uint32Array,e),uC=e=>nC(BigUint64Array,e),dC=e=>nC(Float32Array,e),fC=e=>nC(Float64Array,e),pC=e=>nC(Uint8ClampedArray,e),mC=e=>(e.next(),e);function*hC(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof QS?n(t):qS(t)?t:n(t);return yield*mC((function*(t){let n=null;do n=t.next(yield nC(e,n));while(!n.done)})(r[Symbol.iterator]())),new e}const gC=e=>hC(Int8Array,e),_C=e=>hC(Int16Array,e),vC=e=>hC(Int32Array,e),yC=e=>hC(Uint8Array,e),bC=e=>hC(Uint16Array,e),xC=e=>hC(Uint32Array,e),SC=e=>hC(Float32Array,e),CC=e=>hC(Float64Array,e),wC=e=>hC(Uint8ClampedArray,e);function TC(e,t){return zf(this,arguments,function*(){if(KS(t))return yield L(yield L(yield*Bf(Vf(TC(e,yield L(t))))));let n=function(e){return zf(this,arguments,function*(){yield yield L(yield L(e))})},r=function(e){return zf(this,arguments,function*(){yield L(yield*Bf(Vf(mC((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 QS?n(t):qS(t)?r(t):JS(t)?t:n(t);return yield L(yield*Bf(Vf(mC((function(t){return zf(this,arguments,function*(){let n=null;do n=yield L(t.next(yield yield L(nC(e,n))));while(!n.done)})})(i[Symbol.asyncIterator]()))))),yield L(new e)})}const EC=e=>TC(Int8Array,e),DC=e=>TC(Int16Array,e),OC=e=>TC(Int32Array,e),kC=e=>TC(Uint8Array,e),AC=e=>TC(Uint16Array,e),jC=e=>TC(Uint32Array,e),MC=e=>TC(Float32Array,e),NC=e=>TC(Float64Array,e),PC=e=>TC(Uint8ClampedArray,e);function FC(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(++nGC});const WC=void 0;function GC(e){if(e===null)return`null`;if(e===WC)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=>GC(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function KC(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 qC(e,t){return KC(e/t)+KC(e%t)/KC(t)}var JC={};Ie(JC,{BN:()=>ow,bigNumToBigInt:()=>iw,bigNumToNumber:()=>nw,bigNumToString:()=>rw,isArrowBigNumSymbol:()=>YC});const YC=Symbol.for(`isArrowBigNum`);function XC(e,...t){return t.length===0?Object.setPrototypeOf(nC(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}XC.prototype[YC]=!0,XC.prototype.toJSON=function(){return`"${rw(this)}"`},XC.prototype.valueOf=function(e){return nw(this,e)},XC.prototype.toString=function(){return rw(this)},XC.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return nw(this);case`string`:return rw(this);case`default`:return iw(this)}return rw(this)};function ZC(...e){return XC.apply(this,e)}function QC(...e){return XC.apply(this,e)}function $C(...e){return XC.apply(this,e)}Object.setPrototypeOf(ZC.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(QC.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf($C.prototype,Object.create(Uint32Array.prototype)),Object.assign(ZC.prototype,XC.prototype,{constructor:ZC,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(QC.prototype,XC.prototype,{constructor:QC,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign($C.prototype,XC.prototype,{constructor:$C,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const ew=BigInt(4294967296)*BigInt(4294967296),tw=ew-BigInt(1);function nw(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=KC(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return KC(c)}function rw(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return aw(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return aw(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`))(U.prototype);var kw=class extends U{constructor(){super(H.Null)}toString(){return`Null`}};cw=Symbol.toStringTag,kw[cw]=(e=>e[Symbol.toStringTag]=`Null`)(kw.prototype);var Aw=class extends U{constructor(e,t){super(H.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}`}};lw=Symbol.toStringTag,Aw[lw]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(Aw.prototype);var jw=class extends Aw{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},Mw=class extends Aw{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},Nw=class extends Aw{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},Pw=class extends Aw{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},Fw=class extends Aw{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Iw=class extends Aw{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},Lw=class extends Aw{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},Rw=class extends Aw{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(jw.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(Mw.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(Nw.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(Pw.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(Fw.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(Iw.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Lw.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(Rw.prototype,`ArrayType`,{value:BigUint64Array});var zw=class extends U{constructor(e){super(H.Float),this.precision=e}get ArrayType(){switch(this.precision){case RC.HALF:return Uint16Array;case RC.SINGLE:return Float32Array;case RC.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};uw=Symbol.toStringTag,zw[uw]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(zw.prototype);var Bw=class extends zw{constructor(){super(RC.HALF)}},Vw=class extends zw{constructor(){super(RC.SINGLE)}},Hw=class extends zw{constructor(){super(RC.DOUBLE)}};Object.defineProperty(Bw.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Vw.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(Hw.prototype,`ArrayType`,{value:Float64Array});var Uw=class extends U{constructor(){super(H.Binary)}toString(){return`Binary`}};dw=Symbol.toStringTag,Uw[dw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(Uw.prototype);var Ww=class extends U{constructor(){super(H.LargeBinary)}toString(){return`LargeBinary`}};fw=Symbol.toStringTag,Ww[fw]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(Ww.prototype);var Gw=class extends U{constructor(){super(H.Utf8)}toString(){return`Utf8`}};pw=Symbol.toStringTag,Gw[pw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(Gw.prototype);var Kw=class extends U{constructor(){super(H.LargeUtf8)}toString(){return`LargeUtf8`}};mw=Symbol.toStringTag,Kw[mw]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(Kw.prototype);var qw=class extends U{constructor(){super(H.Bool)}toString(){return`Bool`}};hw=Symbol.toStringTag,qw[hw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(qw.prototype);var Jw=class extends U{constructor(e,t,n=128){super(H.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};gw=Symbol.toStringTag,Jw[gw]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Jw.prototype);var Yw=class extends U{constructor(e){super(H.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${zC[this.unit]}>`}get ArrayType(){return this.unit===zC.DAY?Int32Array:BigInt64Array}};_w=Symbol.toStringTag,Yw[_w]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(Yw.prototype);var Xw=class extends U{constructor(e,t){super(H.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${BC[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};vw=Symbol.toStringTag,Xw[vw]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(Xw.prototype);var Zw=class extends U{constructor(e,t){super(H.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${BC[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};yw=Symbol.toStringTag,Zw[yw]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(Zw.prototype);var Qw=class extends U{constructor(e){super(H.Interval),this.unit=e}toString(){return`Interval<${VC[this.unit]}>`}};bw=Symbol.toStringTag,Qw[bw]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(Qw.prototype);var $w=class extends U{constructor(e){super(H.Duration),this.unit=e}toString(){return`Duration<${BC[this.unit]}>`}};xw=Symbol.toStringTag,$w[xw]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))($w.prototype);var eT=class extends U{constructor(e){super(H.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}};Sw=Symbol.toStringTag,eT[Sw]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(eT.prototype);var tT=class extends U{constructor(e){super(H.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};Cw=Symbol.toStringTag,tT[Cw]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(tT.prototype);var nT=class extends U{constructor(e,t,n){super(H.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(` | `)}>`}};ww=Symbol.toStringTag,nT[ww]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(nT.prototype);var rT=class extends U{constructor(e){super(H.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};Tw=Symbol.toStringTag,rT[Tw]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(rT.prototype);var iT=class extends U{constructor(e,t){super(H.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}>`}};Ew=Symbol.toStringTag,iT[Ew]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(iT.prototype);var aT=class extends U{constructor(e,t=!1){var n,r,i;if(super(H.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(`, `)}}>`}};Dw=Symbol.toStringTag,aT[Dw]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(aT.prototype);const oT=(e=>()=>++e)(-1);var sT=class extends U{constructor(e,t,n,r){super(H.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?oT():KC(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}>`}};Ow=Symbol.toStringTag,sT[Ow]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(sT.prototype);function cT(e){let t=e;switch(e.typeId){case H.Decimal:return e.bitWidth/32;case H.Interval:return t.unit===VC.MONTH_DAY_NANO?4:1+t.unit;case H.FixedSizeList:return t.listSize;case H.FixedSizeBinary:return t.byteWidth;default:return 1}}var lT=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 uT(this,e,t)}getVisitFnByTypeId(e,t=!0){return dT(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 uT(e,t,n=!0){return typeof t==`number`?dT(e,t,n):typeof t==`string`&&t in H?dT(e,H[t],n):t&&t instanceof U?dT(e,fT(t),n):t?.type&&t.type instanceof U?dT(e,fT(t.type),n):dT(e,H.NONE,n)}function dT(e,t,n=!0){let r=null;switch(t){case H.Null:r=e.visitNull;break;case H.Bool:r=e.visitBool;break;case H.Int:r=e.visitInt;break;case H.Int8:r=e.visitInt8||e.visitInt;break;case H.Int16:r=e.visitInt16||e.visitInt;break;case H.Int32:r=e.visitInt32||e.visitInt;break;case H.Int64:r=e.visitInt64||e.visitInt;break;case H.Uint8:r=e.visitUint8||e.visitInt;break;case H.Uint16:r=e.visitUint16||e.visitInt;break;case H.Uint32:r=e.visitUint32||e.visitInt;break;case H.Uint64:r=e.visitUint64||e.visitInt;break;case H.Float:r=e.visitFloat;break;case H.Float16:r=e.visitFloat16||e.visitFloat;break;case H.Float32:r=e.visitFloat32||e.visitFloat;break;case H.Float64:r=e.visitFloat64||e.visitFloat;break;case H.Utf8:r=e.visitUtf8;break;case H.LargeUtf8:r=e.visitLargeUtf8;break;case H.Binary:r=e.visitBinary;break;case H.LargeBinary:r=e.visitLargeBinary;break;case H.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case H.Date:r=e.visitDate;break;case H.DateDay:r=e.visitDateDay||e.visitDate;break;case H.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case H.Timestamp:r=e.visitTimestamp;break;case H.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case H.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case H.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case H.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case H.Time:r=e.visitTime;break;case H.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case H.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case H.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case H.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case H.Decimal:r=e.visitDecimal;break;case H.List:r=e.visitList;break;case H.Struct:r=e.visitStruct;break;case H.Union:r=e.visitUnion;break;case H.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case H.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case H.Dictionary:r=e.visitDictionary;break;case H.Interval:r=e.visitInterval;break;case H.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case H.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case H.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case H.Duration:r=e.visitDuration;break;case H.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case H.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case H.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case H.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case H.FixedSizeList:r=e.visitFixedSizeList;break;case H.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${H[t]}'`)}function fT(e){switch(e.typeId){case H.Null:return H.Null;case H.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?H.Int8:H.Uint8;case 16:return n?H.Int16:H.Uint16;case 32:return n?H.Int32:H.Uint32;case 64:return n?H.Int64:H.Uint64}return H.Int}case H.Float:switch(e.precision){case RC.HALF:return H.Float16;case RC.SINGLE:return H.Float32;case RC.DOUBLE:return H.Float64}return H.Float;case H.Binary:return H.Binary;case H.LargeBinary:return H.LargeBinary;case H.Utf8:return H.Utf8;case H.LargeUtf8:return H.LargeUtf8;case H.Bool:return H.Bool;case H.Decimal:return H.Decimal;case H.Time:switch(e.unit){case BC.SECOND:return H.TimeSecond;case BC.MILLISECOND:return H.TimeMillisecond;case BC.MICROSECOND:return H.TimeMicrosecond;case BC.NANOSECOND:return H.TimeNanosecond}return H.Time;case H.Timestamp:switch(e.unit){case BC.SECOND:return H.TimestampSecond;case BC.MILLISECOND:return H.TimestampMillisecond;case BC.MICROSECOND:return H.TimestampMicrosecond;case BC.NANOSECOND:return H.TimestampNanosecond}return H.Timestamp;case H.Date:switch(e.unit){case zC.DAY:return H.DateDay;case zC.MILLISECOND:return H.DateMillisecond}return H.Date;case H.Interval:switch(e.unit){case VC.DAY_TIME:return H.IntervalDayTime;case VC.YEAR_MONTH:return H.IntervalYearMonth;case VC.MONTH_DAY_NANO:return H.IntervalMonthDayNano}return H.Interval;case H.Duration:switch(e.unit){case BC.SECOND:return H.DurationSecond;case BC.MILLISECOND:return H.DurationMillisecond;case BC.MICROSECOND:return H.DurationMicrosecond;case BC.NANOSECOND:return H.DurationNanosecond}return H.Duration;case H.Map:return H.Map;case H.List:return H.List;case H.Struct:return H.Struct;case H.Union:switch(e.mode){case LC.Dense:return H.DenseUnion;case LC.Sparse:return H.SparseUnion}return H.Union;case H.FixedSizeBinary:return H.FixedSizeBinary;case H.FixedSizeList:return H.FixedSizeList;case H.Dictionary:return H.Dictionary}throw Error(`Unrecognized type '${H[e.typeId]}'`)}lT.prototype.visitInt8=null,lT.prototype.visitInt16=null,lT.prototype.visitInt32=null,lT.prototype.visitInt64=null,lT.prototype.visitUint8=null,lT.prototype.visitUint16=null,lT.prototype.visitUint32=null,lT.prototype.visitUint64=null,lT.prototype.visitFloat16=null,lT.prototype.visitFloat32=null,lT.prototype.visitFloat64=null,lT.prototype.visitDateDay=null,lT.prototype.visitDateMillisecond=null,lT.prototype.visitTimestampSecond=null,lT.prototype.visitTimestampMillisecond=null,lT.prototype.visitTimestampMicrosecond=null,lT.prototype.visitTimestampNanosecond=null,lT.prototype.visitTimeSecond=null,lT.prototype.visitTimeMillisecond=null,lT.prototype.visitTimeMicrosecond=null,lT.prototype.visitTimeNanosecond=null,lT.prototype.visitDenseUnion=null,lT.prototype.visitSparseUnion=null,lT.prototype.visitIntervalDayTime=null,lT.prototype.visitIntervalYearMonth=null,lT.prototype.visitIntervalMonthDayNano=null,lT.prototype.visitDuration=null,lT.prototype.visitDurationSecond=null,lT.prototype.visitDurationMillisecond=null,lT.prototype.visitDurationMicrosecond=null,lT.prototype.visitDurationNanosecond=null;var pT={};Ie(pT,{float64ToUint16:()=>_T,uint16ToFloat64:()=>gT});const mT=new Float64Array(1),hT=new Uint32Array(mT.buffer);function gT(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 _T(e){if(e!==e)return 32256;mT[0]=e;let t=(hT[1]&2147483648)>>16&65535,n=hT[1]&2146435072,r=0;return n>=1089470464?hT[0]>0?n=31744:(n=(n&2080374784)>>16,r=(hT[1]&1048575)>>10):n<=1056964608?(r=1048576+(hT[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(hT[1]&1048575)+512>>10),t|n|r&65535}var W=class extends lT{};function vT(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const yT=(e,t,n)=>{e[t]=Math.floor(n/864e5)},bT=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},CT=({values:e},t,n)=>{e[t]=n},wT=({values:e},t,n)=>{e[t]=_T(n)},TT=(e,t,n)=>{switch(e.type.precision){case RC.HALF:return wT(e,t,n);case RC.SINGLE:case RC.DOUBLE:return CT(e,t,n)}},ET=({values:e},t,n)=>{yT(e,t,n.valueOf())},DT=({values:e},t,n)=>{e[t]=BigInt(n)},OT=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},kT=({values:e,valueOffsets:t},n,r)=>bT(e,t,n,r),AT=({values:e,valueOffsets:t},n,r)=>bT(e,t,n,US(r)),jT=(e,t,n)=>{e.type.unit===zC.DAY?ET(e,t,n):DT(e,t,n)},MT=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},NT=({values:e},t,n)=>{e[t]=BigInt(n)},PT=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},FT=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},IT=(e,t,n)=>{switch(e.type.unit){case BC.SECOND:return MT(e,t,n);case BC.MILLISECOND:return NT(e,t,n);case BC.MICROSECOND:return PT(e,t,n);case BC.NANOSECOND:return FT(e,t,n)}},LT=({values:e},t,n)=>{e[t]=n},RT=({values:e},t,n)=>{e[t]=n},zT=({values:e},t,n)=>{e[t]=n},BT=({values:e},t,n)=>{e[t]=n},VT=(e,t,n)=>{switch(e.type.unit){case BC.SECOND:return LT(e,t,n);case BC.MILLISECOND:return RT(e,t,n);case BC.MICROSECOND:return zT(e,t,n);case BC.NANOSECOND:return BT(e,t,n)}},HT=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},UT=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=uE.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=uE.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},GT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),KT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),qT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),JT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),YT=(e,t,n)=>{let r=e.type.children.map(e=>uE.getVisitFn(e.type)),i=n instanceof Map?qT(t,n):n instanceof cO?KT(t,n):Array.isArray(n)?GT(t,n):JT(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},XT=(e,t,n)=>{e.type.mode===LC.Dense?ZT(e,t,n):QT(e,t,n)},ZT=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];uE.visit(i,e.valueOffsets[t],n)},QT=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];uE.visit(i,t,n)},$T=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},eE=(e,t,n)=>{switch(e.type.unit){case VC.YEAR_MONTH:return nE(e,t,n);case VC.DAY_TIME:return tE(e,t,n);case VC.MONTH_DAY_NANO:return rE(e,t,n)}},tE=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},nE=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},rE=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},iE=({values:e},t,n)=>{e[t]=n},aE=({values:e},t,n)=>{e[t]=n},oE=({values:e},t,n)=>{e[t]=n},sE=({values:e},t,n)=>{e[t]=n},cE=(e,t,n)=>{switch(e.type.unit){case BC.SECOND:return iE(e,t,n);case BC.MILLISECOND:return aE(e,t,n);case BC.MICROSECOND:return oE(e,t,n);case BC.NANOSECOND:return sE(e,t,n)}},lE=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=uE.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${GC(e)}: ${GC(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new mE(this[dE],this[fE])}},mE=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[dE].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[dE].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[dE].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=oD.visit(e[dE].children[n],e[fE]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[dE].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(uE.visit(e[dE].children[r],e[fE],n),Reflect.set(e,t,n))}};const gE=new hE;var G=class extends lT{};function K(e){return(t,n)=>t.getValid(n)?e(t,n):null}const _E=(e,t)=>864e5*e[t],vE=(e,t)=>null,yE=(e,t,n)=>{if(n+1>=t.length)return null;let r=KC(t[n]),i=KC(t[n+1]);return e.subarray(r,i)},bE=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<_E(e,t),SE=({values:e},t)=>KC(e[t]),CE=({stride:e,values:t},n)=>t[e*n],wE=({stride:e,values:t},n)=>gT(t[e*n]),TE=({values:e},t)=>e[t],EE=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),DE=({values:e,valueOffsets:t},n)=>yE(e,t,n),OE=({values:e,valueOffsets:t},n)=>{let r=yE(e,t,n);return r===null?null:VS(r)},kE=({values:e},t)=>e[t],AE=({type:e,values:t},n)=>e.precision===RC.HALF?gT(t[n]):t[n],jE=(e,t)=>e.type.unit===zC.DAY?xE(e,t):SE(e,t),ME=({values:e},t)=>1e3*KC(e[t]),NE=({values:e},t)=>KC(e[t]),PE=({values:e},t)=>qC(e[t],BigInt(1e3)),FE=({values:e},t)=>qC(e[t],BigInt(1e6)),IE=(e,t)=>{switch(e.type.unit){case BC.SECOND:return ME(e,t);case BC.MILLISECOND:return NE(e,t);case BC.MICROSECOND:return PE(e,t);case BC.NANOSECOND:return FE(e,t)}},LE=({values:e},t)=>e[t],RE=({values:e},t)=>e[t],zE=({values:e},t)=>e[t],BE=({values:e},t)=>e[t],VE=(e,t)=>{switch(e.type.unit){case BC.SECOND:return LE(e,t);case BC.MILLISECOND:return RE(e,t);case BC.MICROSECOND:return zE(e,t);case BC.NANOSECOND:return BE(e,t)}},HE=({values:e,stride:t},n)=>ow.decimal(e.subarray(t*n,t*(n+1))),UE=(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 cO([c])},WE=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new dD(o.slice(i,a-i))},GE=(e,t)=>new pE(e,t),KE=(e,t)=>e.type.mode===LC.Dense?qE(e,t):JE(e,t),qE=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return oD.visit(r,e.valueOffsets[t])},JE=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return oD.visit(r,t)},YE=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},XE=(e,t)=>e.type.unit===VC.MONTH_DAY_NANO?$E(e,t):e.type.unit===VC.DAY_TIME?ZE(e,t):QE(e,t),ZE=({values:e},t)=>e.subarray(2*t,2*(t+1)),QE=({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},$E=({values:e},t)=>e.subarray(4*t,4*(t+1)),eD=({values:e},t)=>e[t],tD=({values:e},t)=>e[t],nD=({values:e},t)=>e[t],rD=({values:e},t)=>e[t],iD=(e,t)=>{switch(e.type.unit){case BC.SECOND:return eD(e,t);case BC.MILLISECOND:return tD(e,t);case BC.MICROSECOND:return nD(e,t);case BC.NANOSECOND:return rD(e,t)}},aD=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new cO([a])};G.prototype.visitNull=K(vE),G.prototype.visitBool=K(bE),G.prototype.visitInt=K(kE),G.prototype.visitInt8=K(CE),G.prototype.visitInt16=K(CE),G.prototype.visitInt32=K(CE),G.prototype.visitInt64=K(TE),G.prototype.visitUint8=K(CE),G.prototype.visitUint16=K(CE),G.prototype.visitUint32=K(CE),G.prototype.visitUint64=K(TE),G.prototype.visitFloat=K(AE),G.prototype.visitFloat16=K(wE),G.prototype.visitFloat32=K(CE),G.prototype.visitFloat64=K(CE),G.prototype.visitUtf8=K(OE),G.prototype.visitLargeUtf8=K(OE),G.prototype.visitBinary=K(DE),G.prototype.visitLargeBinary=K(DE),G.prototype.visitFixedSizeBinary=K(EE),G.prototype.visitDate=K(jE),G.prototype.visitDateDay=K(xE),G.prototype.visitDateMillisecond=K(SE),G.prototype.visitTimestamp=K(IE),G.prototype.visitTimestampSecond=K(ME),G.prototype.visitTimestampMillisecond=K(NE),G.prototype.visitTimestampMicrosecond=K(PE),G.prototype.visitTimestampNanosecond=K(FE),G.prototype.visitTime=K(VE),G.prototype.visitTimeSecond=K(LE),G.prototype.visitTimeMillisecond=K(RE),G.prototype.visitTimeMicrosecond=K(zE),G.prototype.visitTimeNanosecond=K(BE),G.prototype.visitDecimal=K(HE),G.prototype.visitList=K(UE),G.prototype.visitStruct=K(GE),G.prototype.visitUnion=K(KE),G.prototype.visitDenseUnion=K(qE),G.prototype.visitSparseUnion=K(JE),G.prototype.visitDictionary=K(YE),G.prototype.visitInterval=K(XE),G.prototype.visitIntervalDayTime=K(ZE),G.prototype.visitIntervalYearMonth=K(QE),G.prototype.visitIntervalMonthDayNano=K($E),G.prototype.visitDuration=K(iD),G.prototype.visitDurationSecond=K(eD),G.prototype.visitDurationMillisecond=K(tD),G.prototype.visitDurationMicrosecond=K(nD),G.prototype.visitDurationNanosecond=K(rD),G.prototype.visitFixedSizeList=K(aD),G.prototype.visitMap=K(WE);const oD=new G,sD=Symbol.for(`keys`),cD=Symbol.for(`vals`),lD=Symbol.for(`kKeysAsStrings`),uD=Symbol.for(`_kKeysAsStrings`);var dD=class{constructor(e){return this[sD]=new cO([e.children[0]]).memoize(),this[cD]=e.children[1],new Proxy(this,new pD)}get[lD](){return this[uD]||(this[uD]=Array.from(this[sD].toArray(),String))}[Symbol.iterator](){return new fD(this[sD],this[cD])}get size(){return this[sD].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[sD],t=this[cD],n={};for(let r=-1,i=e.length;++r`${GC(e)}: ${GC(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},fD=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),oD.visit(this.vals,e)]})}},pD=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[lD]}has(e,t){return e[lD].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[lD].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[lD].indexOf(t);if(n!==-1){let r=oD.visit(Reflect.get(e,cD),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[lD].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(uE.visit(Reflect.get(e,cD),r,n),Reflect.set(e,t,n))}};Object.defineProperties(dD.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[sD]:{writable:!0,enumerable:!1,configurable:!1,value:null},[cD]:{writable:!0,enumerable:!1,configurable:!1,value:null},[uD]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var mD={};Ie(mD,{clampRange:()=>gD,createElementComparator:()=>yD,wrapIndex:()=>_D});let hD;function gD(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 _D=(e,t)=>e<0?t+e:e,vD=e=>e!==e;function yD(e){let t=typeof e;if(t!==`object`||e===null)return vD(e)?vD: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?IC(e,t):!1:e instanceof Map?xD(e):Array.isArray(e)?bD(e):e instanceof cO?SD(e):CD(e,!0)}function bD(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 TD(e,n);case Map:return DD(e,n,n.keys());case dD:case pE:case Object:case void 0:return DD(e,n,t||Object.keys(n))}return n instanceof cO?ED(e,n):!1}}function TD(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rPD,getBit:()=>AD,getBool:()=>kD,packBools:()=>ND,popcnt_array:()=>ID,popcnt_bit_range:()=>FD,popcnt_uint32:()=>LD,setBool:()=>jD,truncateBitmap:()=>MD});function kD(e,t,n,r){return(n&1<>r}function jD(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):ND(new PD(n,e,t,null,kD)).subarray(0,r)),i}return n}function ND(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 PD=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 FD(e,t,i)+FD(e,r,n)+ID(e,i>>3,r-i>>3)}function ID(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+=LD(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=LD(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=LD(a.getUint8(i)),i+=1;return r}function LD(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const RD=-1;var zD=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 U.isSparseUnion(e)||U.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(U.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=RD&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-FD(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=cT(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(U.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===LC.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(MD(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===H.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(MD(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[HC.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[HC.TYPE])&&(a[HC.TYPE]=i.subarray(e,e+t)),(i=a[HC.OFFSET])&&(a[HC.OFFSET]=i.subarray(e,e+t+1))||(i=a[HC.DATA])&&(a[HC.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};zD.prototype.children=Object.freeze([]);var BD=class e extends lT{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new zD(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=sC(e.data),i=sC(e.nullBitmap),a=aC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=sC(e.data),i=sC(e.nullBitmap),a=oC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=sC(e.data),i=sC(e.nullBitmap),a=aC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=sC(e.data),i=sC(e.nullBitmap),a=oC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=sC(e.nullBitmap),a=aC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=sC(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=nC(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(U.isSparseUnion(t))return new zD(t,n,a,o,[void 0,void 0,void 0,i],r);let s=aC(e.valueOffsets);return new zD(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=sC(t.nullBitmap),a=nC(n.indices.ArrayType,t.data),{dictionary:o=new cO([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new zD(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new zD(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=sC(t.nullBitmap),{length:o=i.length/cT(n),nullCount:s=t.nullBitmap?-1:0}=t;return new zD(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=sC(t.nullBitmap),o=aC(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new zD(n,r,s,c,[o,void 0,a],[i])}};new BD;var VD=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 UD(e){return e.reduce((e,t)=>e+t.nullCount,0)}function WD(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function GD(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 KD(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function QD(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new PD(n,e.offset+(t||0),e.length,n,kD)){if(!i)return r;++r}return-1}function $D(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case H.Union:break;case H.Dictionary:break;default:return QD(e,n)}let r=oD.getVisitFn(e),i=yD(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 VD(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new rO(a)})}var rO=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof zD)))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}=oO[o.typeId],r=a[0];this.isValid=e=>qD(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,sO[o.typeId]),this._offsets=WD(a);break}this.data=a,this.type=o,this.stride=cT(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 HD(this.data)}get nullCount(){return UD(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${H[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(_D(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return iO.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(gD(this,t,n,({data:e,_offsets:t},n,r)=>GD(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case H.Int:case H.Float:case H.Decimal:case H.Time:case H.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 U.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(U.isDictionary(this.type)){let t=new lO(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new lO(this)}unmemoize(){if(U.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}};aO=Symbol.toStringTag,cO[aO]=(e=>{e.type=U.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(H).map(e=>H[e]).filter(e=>typeof e==`number`&&e!==H.NONE);for(let n of t){let t=oD.getVisitFnByTypeId(n),r=uE.getVisitFnByTypeId(n),i=tO.getVisitFnByTypeId(n);oO[n]={get:t,set:r,indexOf:i},sO[n]=Object.create(e,{isValid:{value:JD(qD)},get:{value:JD(oD.getVisitFnByTypeId(n))},set:{value:YD(uE.getVisitFnByTypeId(n))},indexOf:{value:XD(tO.getVisitFnByTypeId(n))}})}return`Vector`})(cO.prototype);var lO=class e extends cO{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 cO(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},uO={};Ie(uO,{BaseInt64:()=>hO,Int128:()=>vO,Int64:()=>_O,Uint64:()=>gO});const dO=65536;function fO(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const pO=8,mO=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var hO=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`${fO(this.buffer[3])} ${fO(this.buffer[2])} ${fO(this.buffer[1])} ${fO(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;nbO,toIntervalDayTimeObjects:()=>SO,toIntervalMonthDayNanoInt32Array:()=>xO,toIntervalMonthDayNanoObjects:()=>CO});function bO(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 SO(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 Y=class extends lT{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 wO(e,t){return t instanceof e.constructor}function TO(e,t){return e===t||wO(e,t)}function EO(e,t){return e===t||wO(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function DO(e,t){return e===t||wO(e,t)&&e.precision===t.precision}function OO(e,t){return e===t||wO(e,t)&&e.byteWidth===t.byteWidth}function kO(e,t){return e===t||wO(e,t)&&e.unit===t.unit}function AO(e,t){return e===t||wO(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function jO(e,t){return e===t||wO(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function MO(e,t){return e===t||wO(e,t)&&e.children.length===t.children.length&&BO.compareManyFields(e.children,t.children)}function NO(e,t){return e===t||wO(e,t)&&e.children.length===t.children.length&&BO.compareManyFields(e.children,t.children)}function PO(e,t){return e===t||wO(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&BO.compareManyFields(e.children,t.children)}function FO(e,t){return e===t||wO(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&BO.visit(e.indices,t.indices)&&BO.visit(e.dictionary,t.dictionary)}function IO(e,t){return e===t||wO(e,t)&&e.unit===t.unit}function LO(e,t){return e===t||wO(e,t)&&e.unit===t.unit}function RO(e,t){return e===t||wO(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&BO.compareManyFields(e.children,t.children)}function zO(e,t){return e===t||wO(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&BO.compareManyFields(e.children,t.children)}Y.prototype.visitNull=TO,Y.prototype.visitBool=TO,Y.prototype.visitInt=EO,Y.prototype.visitInt8=EO,Y.prototype.visitInt16=EO,Y.prototype.visitInt32=EO,Y.prototype.visitInt64=EO,Y.prototype.visitUint8=EO,Y.prototype.visitUint16=EO,Y.prototype.visitUint32=EO,Y.prototype.visitUint64=EO,Y.prototype.visitFloat=DO,Y.prototype.visitFloat16=DO,Y.prototype.visitFloat32=DO,Y.prototype.visitFloat64=DO,Y.prototype.visitUtf8=TO,Y.prototype.visitLargeUtf8=TO,Y.prototype.visitBinary=TO,Y.prototype.visitLargeBinary=TO,Y.prototype.visitFixedSizeBinary=OO,Y.prototype.visitDate=kO,Y.prototype.visitDateDay=kO,Y.prototype.visitDateMillisecond=kO,Y.prototype.visitTimestamp=AO,Y.prototype.visitTimestampSecond=AO,Y.prototype.visitTimestampMillisecond=AO,Y.prototype.visitTimestampMicrosecond=AO,Y.prototype.visitTimestampNanosecond=AO,Y.prototype.visitTime=jO,Y.prototype.visitTimeSecond=jO,Y.prototype.visitTimeMillisecond=jO,Y.prototype.visitTimeMicrosecond=jO,Y.prototype.visitTimeNanosecond=jO,Y.prototype.visitDecimal=TO,Y.prototype.visitList=MO,Y.prototype.visitStruct=NO,Y.prototype.visitUnion=PO,Y.prototype.visitDenseUnion=PO,Y.prototype.visitSparseUnion=PO,Y.prototype.visitDictionary=FO,Y.prototype.visitInterval=IO,Y.prototype.visitIntervalDayTime=IO,Y.prototype.visitIntervalYearMonth=IO,Y.prototype.visitIntervalMonthDayNano=IO,Y.prototype.visitDuration=LO,Y.prototype.visitDurationSecond=LO,Y.prototype.visitDurationMillisecond=LO,Y.prototype.visitDurationMicrosecond=LO,Y.prototype.visitDurationNanosecond=LO,Y.prototype.visitFixedSizeList=RO,Y.prototype.visitMap=zO;const BO=new Y;function VO(e,t){return BO.compareSchemas(e,t)}function HO(e,t){return BO.compareFields(e,t)}function UO(e,t){return BO.visit(e,t)}const WO=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},JC),uO),OD),pT),ZS),mD),UC),yO),{compareSchemas:VO,compareFields:HO,compareTypes:UO}),GO=365.2425,KO=6048e5,qO=864e5,JO=3600,YO=JO*24;YO*7;const XO=YO*GO,ZO=XO/12;ZO*3;const QO=Symbol.for(`constructDateFrom`);function $O(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&QO in e?e[QO](t):e instanceof Date?new e.constructor(t):new Date(t)}function ek(e,t){return $O(t||e,e)}let tk={};function nk(){return tk}function rk(e,t){let n=nk(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ek(e,t?.in),a=i.getDay(),o=(a=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ok(e){let t=ek(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 sk(e,...t){let n=$O.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function ck(e,t){let n=ek(e,t?.in);return n.setHours(0,0,0,0),n}function lk(e,t,n){let[r,i]=sk(n?.in,e,t),a=ck(r),o=ck(i),s=+a-ok(a),c=+o-ok(o);return Math.round((s-c)/qO)}function uk(e,t){let n=ak(e,t),r=$O(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ik(r)}function dk(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function fk(e){return!(!dk(e)&&typeof e!=`number`||isNaN(+ek(e)))}function pk(e,t){let n=ek(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const mk={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`}},hk=(e,t,n)=>{let r,i=mk[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 gk(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const _k={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},vk={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},yk={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},bk={date:gk({formats:_k,defaultWidth:`full`}),time:gk({formats:vk,defaultWidth:`full`}),dateTime:gk({formats:yk,defaultWidth:`full`})},xk={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Sk=(e,t,n,r)=>xk[e];function Ck(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 wk={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},Tk={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},Ek={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`]},Dk={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`]},Ok={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`}},kk={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`}},Ak=(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`},jk={ordinalNumber:Ak,era:Ck({values:wk,defaultWidth:`wide`}),quarter:Ck({values:Tk,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Ck({values:Ek,defaultWidth:`wide`}),day:Ck({values:Dk,defaultWidth:`wide`}),dayPeriod:Ck({values:Ok,defaultWidth:`wide`,formattingValues:kk,defaultFormattingWidth:`wide`})};function Mk(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)?Pk(s,e=>e.test(o)):Nk(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 Nk(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Pk(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 Ik=/^(\d+)(th|st|nd|rd)?/i,Lk=/\d+/i,Rk={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},zk={any:[/^b/i,/^(a|c)/i]},Bk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vk={any:[/1/i,/2/i,/3/i,/4/i]},Hk={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},Uk={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]},Wk={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},Gk={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]},Kk={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},qk={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}},Jk={ordinalNumber:Fk({matchPattern:Ik,parsePattern:Lk,valueCallback:e=>parseInt(e,10)}),era:Mk({matchPatterns:Rk,defaultMatchWidth:`wide`,parsePatterns:zk,defaultParseWidth:`any`}),quarter:Mk({matchPatterns:Bk,defaultMatchWidth:`wide`,parsePatterns:Vk,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:Mk({matchPatterns:Hk,defaultMatchWidth:`wide`,parsePatterns:Uk,defaultParseWidth:`any`}),day:Mk({matchPatterns:Wk,defaultMatchWidth:`wide`,parsePatterns:Gk,defaultParseWidth:`any`}),dayPeriod:Mk({matchPatterns:Kk,defaultMatchWidth:`any`,parsePatterns:qk,defaultParseWidth:`any`})},Yk={code:`en-US`,formatDistance:hk,formatLong:bk,formatRelative:Sk,localize:jk,match:Jk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xk(e,t){let n=ek(e,t?.in),r=lk(n,pk(n)),i=r+1;return i}function Zk(e,t){let n=ek(e,t?.in),r=ik(n)-+uk(n);return Math.round(r/KO)+1}function Qk(e,t){let n=ek(e,t?.in),r=n.getFullYear(),i=nk(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=$O(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=rk(o,t),c=$O(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=rk(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function $k(e,t){let n=nk(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Qk(e,t),a=$O(t?.in||e,0);a.setFullYear(i,0,r),a.setHours(0,0,0,0);let o=rk(a,t);return o}function eA(e,t){let n=ek(e,t?.in),r=rk(n,t)-+$k(n,t);return Math.round(r/KO)+1}function tA(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const nA={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return tA(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):tA(n+1,2)},d(e,t){return tA(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 tA(e.getHours()%12||12,t.length)},H(e,t){return tA(e.getHours(),t.length)},m(e,t){return tA(e.getMinutes(),t.length)},s(e,t){return tA(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return tA(i,t.length)}},rA={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},iA={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 nA.y(e,t)},Y:function(e,t,n,r){let i=Qk(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return tA(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):tA(a,t.length)},R:function(e,t){let n=ak(e);return tA(n,t.length)},u:function(e,t){let n=e.getFullYear();return tA(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 tA(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 tA(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 nA.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 tA(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=eA(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):tA(i,t.length)},I:function(e,t,n){let r=Zk(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):tA(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):nA.d(e,t)},D:function(e,t,n){let r=Xk(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):tA(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 tA(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 tA(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 tA(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?rA.noon:r===0?rA.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?rA.evening:r>=12?rA.afternoon:r>=4?rA.morning:rA.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 nA.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):nA.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):tA(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):tA(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):nA.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):nA.s(e,t)},S:function(e,t){return nA.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return oA(r);case`XXXX`:case`XX`:return sA(r);case`XXXXX`:case`XXX`:default:return sA(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return oA(r);case`xxxx`:case`xx`:return sA(r);case`xxxxx`:case`xxx`:default:return sA(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+aA(r,`:`);case`OOOO`:default:return`GMT`+sA(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+aA(r,`:`);case`zzzz`:default:return`GMT`+sA(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return tA(r,t.length)},T:function(e,t,n){return tA(+e,t.length)}};function aA(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+tA(a,2)}function oA(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+tA(Math.abs(e)/60,2)}return sA(e,t)}function sA(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=tA(Math.trunc(r/60),2),a=tA(r%60,2);return n+i+t+a}const cA=(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`})}},lA=(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`})}},uA=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return cA(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}}`,cA(r,t)).replace(`{{time}}`,lA(i,t))},dA={p:lA,P:uA},fA=/^D+$/,pA=/^Y+$/,mA=[`D`,`DD`,`YY`,`YYYY`];function hA(e){return fA.test(e)}function gA(e){return pA.test(e)}function _A(e,t,n){let r=vA(e,t,n);if(console.warn(r),mA.includes(e))throw RangeError(r)}function vA(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 yA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xA=/^'([^]*?)'?$/,SA=/''/g,CA=/[a-zA-Z]/;function wA(e,t,n){let r=nk(),i=n?.locale??r.locale??Yk,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=ek(e,n?.in);if(!fk(s))throw RangeError(`Invalid time value`);let c=t.match(bA).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=dA[t];return n(e,i.formatLong)}return e}).join(``).match(yA).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:TA(e)};if(iA[t])return{isToken:!0,value:e};if(t.match(CA))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&gA(a)||!n?.useAdditionalDayOfYearTokens&&hA(a))&&_A(a,t,String(e));let o=iA[a[0]];return o(s,a,i.localize,l)}).join(``)}function TA(e){let t=e.match(xA);return t?t[1].replace(SA,`'`):e}function EA(e,t){return ek(e*1e3,t?.in)}function DA(e,t){let n=OA(t)?new t(0):$O(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function OA(e){return typeof e==`function`&&e.prototype?.constructor===e}function kA(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 AA(e){return e==null}function jA(e){return e!=null}async function MA(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await S(()=>import(`./__vite-browser-external-BFBX2XSs.js`).then(Re(1)),__vite__mapDeps([0,1,2]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function NA(e){return AA(e)?!1:U.isInt(e.type)&&!zA(e)||PA(e)}function PA(e){return AA(e)?!1:U.isInt(e.type)&&e.type.isSigned===!1}function FA(e){return AA(e)?!1:U.isFloat(e.type)??!1}function IA(e){return AA(e)?!1:U.isDecimal(e.type)}function LA(e){return AA(e)?!1:U.isBool(e.type)}function RA(e){return AA(e)?!1:U.isDuration(e.type)}function zA(e){return AA(e)?!1:U.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function BA(e){return AA(e)?!1:U.isTimestamp(e.type)}function VA(e){return AA(e)?!1:U.isDate(e.type)}function HA(e){return AA(e)?!1:U.isTime(e.type)}function UA(e){return AA(e)?!1:U.isList(e.type)||U.isFixedSizeList(e.type)}function WA(e){return AA(e)?!1:U.isStruct(e.type)||U.isMap(e.type)}function GA(e){return AA(e)?!1:U.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||U.isInterval(e.type)}new Date(1970,0,1);function KA(e,t){let n;if(t===BC.MILLISECOND)n=1e3;else if(t===BC.MICROSECOND)n=1e3*1e3;else if(t===BC.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 qA(e,t){let n=KA(e,t?.type?.unit??BC.SECOND);return EA(n)}function JA(e,t){let n=qA(e,t);return wA(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function YA(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?wA(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function XA(e,t){if(!(e instanceof Date||typeof e==`number`&&Number.isFinite(e)))return console.warn(`Unsupported datetime value: ${e}`),null;let n,r=t?.type?.timezone;return n=r?new PS(e,r):new PS(e),DA(n,Date)}function ZA(e,t){let n=t?.type?.scale||0,r=WO.bigNumToString(new WO.BN(e)).padStart(n,`0`);if(n===0)return r;let i=``;r.startsWith(`-`)&&(i=`-`,r=r.slice(1));let a=r.slice(0,-n)||`0`,o=kA(r.slice(-n),`0`)||``;return`${i}${a}${o?`.${o}`:``}`}new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function QA(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 $A(e,t){if(U.isInterval(t?.type))return QA(e);let n=t&&t.metadata.get(`ARROW:extension:name`);if(n&&n===`pandas.interval`){let n=JSON.parse(t.metadata.get(`ARROW:extension:metadata`)),{closed:r}=n,i=e.toJSON(),a=r===`both`||r===`left`?`[`:`(`,o=r===`both`||r===`right`?`]`:`)`,s=tj(i.left,t.type?.children?.[0]),c=tj(i.right,t.type?.children?.[1]);return`${a+s}, ${c+o}`}return String(e)}function ej(e,t){return t?.type instanceof tT?JSON.parse(JSON.stringify(e,(e,t)=>{if(jA(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function tj(e,t){if(AA(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&VA(t))return YA(e);if(typeof e==`bigint`&&HA(t))return JA(Number(e),t);if(n&&BA(t))return XA(e,t);if(zA(t))throw Error(`Period type is not supported yet`);if(GA(t))return $A(e,t);if(RA(t))throw Error(`Duration type is not supported yet`);return IA(t)?ZA(e,t):FA(t)&&Number.isFinite(e)||NA(t)?e:WA(t)||UA(t)?ej(e,t):LA(t)?!!e:String(e)}function nj(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=tj(t[e.name],e)),t));return n}let rj=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function ij(e){let t=he(e,{logger:!1}),n,r,i=await MA();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await S(async()=>{let{getBundles:e}=await import(`./default-browser-ZWdN_TIR.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await OS(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await S(async()=>{let{getBundles:e}=await import(`./default-node-DyYIhEXm.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]));t.bundles=await e()}r=await OS(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await S(()=>import(`./browser-DPkKpj_5.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new tS:t.logger===!1?new eS:t.logger;let o=new fS(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case rj.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 rj.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:nj(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:nj(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 aj(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 oj(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 X=Symbol.for(`drizzle:entityKind`);Symbol.for(`drizzle:hasOwnEntityKind`);function Z(e,t){if(!e||typeof e!=`object`)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,X))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(X in n&&n[X]===t[X])return!0;n=Object.getPrototypeOf(n)}return!1}var sj=class{constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity}static[X]=`Column`;name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!==`byDefault`}},cj=class{static[X]=`ColumnBuilder`;config;constructor(e,t,n){this.config={name:e,keyAsName:e===``,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:n,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}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===``&&(this.config.name=e)}};const lj=Symbol.for(`drizzle:Name`);var uj=class{static[X]=`PgForeignKeyBuilder`;reference;_onUpdate=`no action`;_onDelete=`no action`;constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:r}=e();return{name:t,columns:n,foreignTable:r[0].table,foreignColumns:r}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.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 dj(e,this)}},dj=class{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static[X]=`PgForeignKey`;reference;onUpdate;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[lj],...r,n[0].table[lj],...i];return e??`${a.join(`_`)}_fk`}};function fj(e,...t){return e(...t)}function pj(e,t){return`${e[lj]}_${t.join(`_`)}_unique`}function mj(e,t,n){for(let r=t;rArray.isArray(e)?_j(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var vj=class extends cj{foreignKeyConfigs=[];static[X]=`PgColumnBuilder`;array(e){return new xj(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})=>fj((n,r)=>{let i=new uj(()=>{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 bj(e,this.config)}},yj=class extends sj{constructor(e,t){t.uniqueName||=pj(e,[t.name]),super(e,t),this.table=e}static[X]=`PgColumn`},bj=class extends yj{static[X]=`ExtraConfigColumn`;getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??`asc`,nulls:this.config.nulls??`last`,opClass:this.config.opClass};defaultConfig={order:`asc`,nulls:`last`,opClass:void 0};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}},xj=class extends vj{static[X]=`PgArrayBuilder`;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 Sj(e,this.config,t)}},Sj=class e extends yj{constructor(e,t,n,r){super(e,t),this.baseColumn=n,this.range=r,this.size=t.size}size;static[X]=`PgArray`;getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==`number`?this.size:``}]`}mapFromDriverValue(e){return typeof e==`string`&&(e=gj(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(t,n=!1){let r=t.map(t=>t===null?null:Z(this.baseColumn,e)?this.baseColumn.mapToDriverValue(t,!0):this.baseColumn.mapToDriverValue(t));return n?r:_j(r)}};const Cj=Symbol.for(`drizzle:isPgEnum`);function wj(e){return!!e&&typeof e==`function`&&Cj in e&&e[Cj]===!0}var Tj=class{static[X]=`Subquery`;constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},Ej=class extends Tj{static[X]=`WithSubquery`},Dj=`0.44.4`;let Oj,kj;const Aj={startActiveSpan(e,t){return Oj?(kj||=Oj.trace.getTracer(`drizzle-orm`,Dj),fj((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()}}),Oj,kj)):t()}},jj=Symbol.for(`drizzle:ViewBaseConfig`),Mj=Symbol.for(`drizzle:Schema`),Nj=Symbol.for(`drizzle:Columns`),Pj=Symbol.for(`drizzle:ExtraConfigColumns`),Fj=Symbol.for(`drizzle:OriginalName`),Ij=Symbol.for(`drizzle:BaseName`),Lj=Symbol.for(`drizzle:IsAlias`),Rj=Symbol.for(`drizzle:ExtraConfigBuilder`),zj=Symbol.for(`drizzle:IsDrizzleTable`);var Q=class{static[X]=`Table`;static Symbol={Name:lj,Schema:Mj,OriginalName:Fj,Columns:Nj,ExtraConfigColumns:Pj,BaseName:Ij,IsAlias:Lj,ExtraConfigBuilder:Rj};[lj];[Fj];[Mj];[Nj];[Pj];[Ij];[Lj]=!1;[zj]=!0;[Rj]=void 0;constructor(e,t,n){this[lj]=this[Fj]=e,this[Mj]=t,this[Ij]=n}};function Bj(e){return e[lj]}function Vj(e){return`${e[Mj]??`public`}.${e[lj]}`}function Hj(e){return e!=null&&typeof e.getSQL==`function`}function Uj(e){let t={sql:``,params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||=[],t.typings.push(...n.typings));return t}var Wj=class{static[X]=`StringChunk`;value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new Gj([this])}},Gj=class e{constructor(e){this.queryChunks=e;for(let t of e)if(Z(t,Q)){let e=t[Q.Symbol.Schema];this.usedTables.push(e===void 0?t[Q.Symbol.Name]:e+`.`+t[Q.Symbol.Name])}}static[X]=`SQL`;decoder=Jj;shouldInlineParams=!1;usedTables=[];append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return Aj.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(t,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 Uj(t.map(t=>{if(Z(t,Wj))return{sql:t.value.join(``),params:[]};if(Z(t,Kj))return{sql:a(t.value),params:[]};if(t===void 0)return{sql:``,params:[]};if(Array.isArray(t)){let e=[new Wj(`(`)];for(let[n,r]of t.entries())e.push(r),ne},Yj={mapToDriverValue:e=>e};({...Jj,...Yj});var Xj=class{constructor(e,t=Yj){this.value=e,this.encoder=t}static[X]=`Param`;brand;getSQL(){return new Gj([this])}};function $(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new Wj(e[0]));for(let[r,i]of t.entries())n.push(i,new Wj(e[r+1]));return new Gj(n)}(e=>{function t(){return new Gj([])}e.empty=t;function n(e){return new Gj(e)}e.fromList=n;function r(e){return new Gj([new Wj(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 Gj(n)}e.join=i;function a(e){return new Kj(e)}e.identifier=a;function o(e){return new Zj(e)}e.placeholder=o;function s(e,t){return new Xj(e,t)}e.param=s})($||={}),(e=>{class t{constructor(e,t){this.sql=e,this.fieldAlias=t}static[X]=`SQL.Aliased`;isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(Gj||={});var Zj=class{constructor(e){this.name=e}static[X]=`Placeholder`;getSQL(){return new Gj([this])}};function Qj(e,t){return e.map(e=>{if(Z(e,Zj)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(Z(e,Xj)&&Z(e.value,Zj)){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 $j=Symbol.for(`drizzle:IsDrizzleView`);var eM=class{static[X]=`View`;[jj];[$j]=!0;constructor({name:e,schema:t,selectedFields:n,query:r}){this[jj]={name:e,originalName:e,schema:t,selectedFields:n,query:r,isExisting:!r,isAlias:!1}}getSQL(){return new Gj([this])}};sj.prototype.getSQL=function(){return new Gj([this])},Q.prototype.getSQL=function(){return new Gj([this])},Tj.prototype.getSQL=function(){return new Gj([this])};var tM=class{constructor(e){this.table=e}static[X]=`ColumnAliasProxyHandler`;get(e,t){return t===`table`?this.table:e[t]}},nM=class{constructor(e,t){this.alias=e,this.replaceOriginalName=t}static[X]=`TableAliasProxyHandler`;get(e,t){if(t===Q.Symbol.IsAlias)return!0;if(t===Q.Symbol.Name||this.replaceOriginalName&&t===Q.Symbol.OriginalName)return this.alias;if(t===jj)return{...e[jj],name:this.alias,isAlias:!0};if(t===Q.Symbol.Columns){let t=e[Q.Symbol.Columns];if(!t)return t;let n={};return Object.keys(t).map(r=>{n[r]=new Proxy(t[r],new tM(new Proxy(e,this)))}),n}let n=e[t];return Z(n,sj)?new Proxy(n,new tM(new Proxy(e,this))):n}};function rM(e,t){return new Proxy(e,new nM(t,!1))}function iM(e,t){return new Proxy(e,new tM(new Proxy(e.table,new nM(t,!1))))}function aM(e,t){return new Gj.Aliased(oM(e.sql,t),e.fieldAlias)}function oM(e,t){return $.join(e.queryChunks.map(e=>Z(e,sj)?iM(e,t):Z(e,Gj)?oM(e,t):Z(e,Gj.Aliased)?aM(e,t):e))}var sM=class extends Error{static[X]=`DrizzleError`;constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},cM=class e extends Error{constructor(t,n,r){super(`Failed query: ${t} + `)}\n]`}concat(...t){let n=this.schema,r=this.data.concat(t.flatMap(({data:e})=>e));return new e(n,r.map(e=>new Qy(n,e)))}slice(t,n){let r=this.schema;[t,n]=ev({length:this.numRows},t,n);let i=kv(this.data,this._offsets,t,n);return new e(r,i.map(e=>new Qy(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=wv({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new qv(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]=Ky(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(...Ky(a,o))}};Yy=Symbol.toStringTag,Xy[Yy]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=Mv(jv),e.get=Mv(G_.getVisitFn(R.Struct)),e.set=Nv(Yg.getVisitFn(R.Struct)),e.indexOf=Pv(Bv.getVisitFn(R.Struct)),`Table`))(Xy.prototype);var Zy,Qy=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof Zv)||([,this.data=wv({nullCount:0,type:new Vh(this.schema.fields),children:this.schema.fields.map(e=>wv({type:e.type,nullCount:0}))})]=e,!(this.data instanceof xv)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=$y(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]=Qv.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new Zv(n),o=wv({type:new Vh(n),length:i,children:r,nullCount:0});[this.schema,this.data]=$y(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||=eb(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 G_.visit(this.data,e)}at(e){return this.get(tv(e,this.numRows))}set(e,t){return Yg.visit(this.data,e,t)}indexOf(e,t){return Bv.visit(this.data,e,t)}[Symbol.iterator](){return Uv.visit(new qv([this.data]))}toArray(){return[...this]}concat(...e){return new Xy(this.schema,[this,...e])}slice(t,n){let[r]=new qv([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,wv({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=wv({type:new Vh(n.fields),length:this.numRows,children:r});return new e(n,i)}};Zy=Symbol.toStringTag,Qy[Zy]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(Qy.prototype);function $y(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))??wv({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),wv({type:new Vh(i),length:n,children:a})]}function eb(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;++rwv({type:e.type})),n=wv({type:new Vh(e.fields),nullCount:0,children:t});super(e,n)}},nb=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()+Vp),(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):Mp.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):km.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 om).__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,Mp.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,km.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)}},rb=class extends Yh{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return bm.startNull(t),bm.endNull(t)}visitInt(e,t){return im.startInt(t),im.addBitWidth(t,e.bitWidth),im.addIsSigned(t,e.isSigned),im.endInt(t)}visitFloat(e,t){return mm.startFloatingPoint(t),mm.addPrecision(t,e.precision),mm.endFloatingPoint(t)}visitBinary(e,t){return sm.startBinary(t),sm.endBinary(t)}visitLargeBinary(e,t){return gm.startLargeBinary(t),gm.endLargeBinary(t)}visitBool(e,t){return cm.startBool(t),cm.endBool(t)}visitUtf8(e,t){return Tm.startUtf8(t),Tm.endUtf8(t)}visitLargeUtf8(e,t){return _m.startLargeUtf8(t),_m.endLargeUtf8(t)}visitDecimal(e,t){return um.startDecimal(t),um.addScale(t,e.scale),um.addPrecision(t,e.precision),um.addBitWidth(t,e.bitWidth),um.endDecimal(t)}visitDate(e,t){return lm.startDate(t),lm.addUnit(t,e.unit),lm.endDate(t)}visitTime(e,t){return Sm.startTime(t),Sm.addUnit(t,e.unit),Sm.addBitWidth(t,e.bitWidth),Sm.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return Cm.startTimestamp(t),Cm.addUnit(t,e.unit),n!==void 0&&Cm.addTimezone(t,n),Cm.endTimestamp(t)}visitInterval(e,t){return hm.startInterval(t),hm.addUnit(t,e.unit),hm.endInterval(t)}visitDuration(e,t){return dm.startDuration(t),dm.addUnit(t,e.unit),dm.endDuration(t)}visitList(e,t){return vm.startList(t),vm.endList(t)}visitStruct(e,t){return xm.startStruct_(t),xm.endStruct_(t)}visitUnion(e,t){wm.startTypeIdsVector(t,e.typeIds.length);let n=wm.createTypeIdsVector(t,e.typeIds);return wm.startUnion(t),wm.addMode(t,e.mode),wm.addTypeIds(t,n),wm.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return am.startDictionaryEncoding(t),am.addId(t,BigInt(e.id)),am.addIsOrdered(t,e.isOrdered),n!==void 0&&am.addIndexType(t,n),am.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return fm.startFixedSizeBinary(t),fm.addByteWidth(t,e.byteWidth),fm.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return pm.startFixedSizeList(t),pm.addListSize(t,e.listSize),pm.endFixedSizeList(t)}visitMap(e,t){return ym.startMap(t),ym.addKeysSorted(t,e.keysSorted),ym.endMap(t)}};const ib=new rb;function ab(e,t=new Map){return new Zv(cb(e,t),mb(e.metadata),t)}function ob(e){return new bb(e.count,ub(e.columns),db(e.columns))}function sb(e){return new xb(ob(e.data),e.id,e.isDelta)}function cb(e,t){return(e.fields||[]).filter(Boolean).map(e=>Qv.fromJSON(e,t))}function lb(e,t){return(e.children||[]).filter(Boolean).map(e=>Qv.fromJSON(e,t))}function ub(e){return(e||[]).reduce((e,t)=>[...e,new Cb(t.count,fb(t.VALIDITY)),...ub(t.children)],[])}function db(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function pb(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=gb(e,lb(e,t)),i=new Qv(e.name,o,e.nullable,mb(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?hb(r):new yh,s=new qh(t.get(n),r,n,a.isOrdered),i=new Qv(e.name,s,e.nullable,mb(e.metadata))):(r=(r=a.indexType)?hb(r):new yh,t.set(n,o=gb(e,lb(e,t))),s=new qh(o,r,n,a.isOrdered),i=new Qv(e.name,s,e.nullable,mb(e.metadata))),i||null}function mb(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function hb(e){return new gh(e.isSigned,e.bitWidth)}function gb(e,t){let n=e.type.name;switch(n){case`NONE`:return new hh;case`null`:return new hh;case`binary`:return new kh;case`largebinary`:return new Ah;case`utf8`:return new jh;case`largeutf8`:return new Mh;case`bool`:return new Nh;case`list`:return new Bh((t||[])[0]);case`struct`:return new Vh(t||[]);case`struct_`:return new Vh(t||[])}switch(n){case`int`:{let t=e.type;return new gh(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new Th(Pp[t.precision])}case`decimal`:{let t=e.type;return new Ph(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new Fh(Fp[t.unit])}case`time`:{let t=e.type;return new Ih(Ip[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new Lh(Ip[t.unit],t.timezone)}case`interval`:{let t=e.type;return new Rh(Lp[t.unit])}case`duration`:{let t=e.type;return new zh(Ip[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new Hh(Np[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new Uh(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new Wh(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new Gh((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var _b=Jp,vb=qp,yb=class e{static fromJSON(t,n){let r=new e(0,Mp.V5,n);return r._createHeader=wb(t,n),r}static decode(t){t=new vb(gp(t));let n=nb.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=Tb(n,a),o}static encode(e){let t=new _b,n=-1;return e.isSchema()?n=Zv.encode(t,e.header()):e.isRecordBatch()?n=bb.encode(t,e.header()):e.isDictionaryBatch()&&(n=xb.encode(t,e.header())),nb.startMessage(t),nb.addVersion(t,Mp.V5),nb.addHeader(t,n),nb.addHeaderType(t,e.headerType),nb.addBodyLength(t,BigInt(e.bodyLength)),nb.finishMessageBuffer(t,nb.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof Zv)return new e(0,Mp.V5,km.Schema,t);if(t instanceof bb)return new e(n,Mp.V5,km.RecordBatch,t);if(t instanceof xb)return new e(n,Mp.V5,km.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===km.Schema}isRecordBatch(){return this.headerType===km.RecordBatch}isDictionaryBatch(){return this.headerType===km.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=Nm(e)}},bb=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=Nm(e)}},xb=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=Nm(t)}},Sb=class{constructor(e,t){this.offset=Nm(e),this.length=Nm(t)}},Cb=class{constructor(e,t){this.length=Nm(e),this.nullCount=Nm(t)}};function wb(e,t){return(()=>{switch(t){case km.Schema:return Zv.fromJSON(e);case km.RecordBatch:return bb.fromJSON(e);case km.DictionaryBatch:return xb.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${km[t]}, type: ${t} }`)})}function Tb(e,t){return(()=>{switch(t){case km.Schema:return Zv.decode(e.header(new Om),new Map,e.version());case km.RecordBatch:return bb.decode(e.header(new em),e.version());case km.DictionaryBatch:return xb.decode(e.header(new tm),e.version())}throw Error(`Unrecognized Message type: { name: ${km[t]}, type: ${t} }`)})}Qv.encode=Bb,Qv.decode=Fb,Qv.fromJSON=pb,Zv.encode=zb,Zv.decode=Eb,Zv.fromJSON=ab,bb.encode=Vb,bb.decode=Db,bb.fromJSON=ob,xb.encode=Hb,xb.decode=Ob,xb.fromJSON=sb,Cb.encode=Ub,Cb.decode=Ab,Sb.encode=Wb,Sb.decode=kb;function Eb(e,t=new Map,n=Mp.V5){let r=Nb(e,t);return new Zv(r,Ib(e),t,n)}function Db(e,t=Mp.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new bb(e.length(),jb(e),Mb(e,t))}function Ob(e,t=Mp.V5){return new xb(bb.decode(e.data(),t),e.id(),e.isDelta())}function kb(e){return new Sb(e.offset(),e.length())}function Ab(e){return new Cb(e.length(),e.nullCount())}function jb(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++rQv.encode(e,t));Om.startFieldsVector(e,n.length);let r=Om.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?Om.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return om.startKeyValue(e),om.addKey(e,r),om.addValue(e,i),om.endKeyValue(e)})):-1;return Om.startSchema(e),Om.addFields(e,r),Om.addEndianness(e,Gb?nm.Little:nm.Big),i!==-1&&Om.addCustomMetadata(e,i),Om.endSchema(e)}function Bb(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;z.isDictionary(a)?(o=a.dictionary.typeId,i=ib.visit(a,e),r=ib.visit(a.dictionary,e)):r=ib.visit(a,e);let s=(a.children||[]).map(t=>Qv.encode(e,t)),c=Dm.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?Dm.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return om.startKeyValue(e),om.addKey(e,r),om.addValue(e,i),om.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),Dm.startField(e),Dm.addType(e,r),Dm.addTypeType(e,o),Dm.addChildren(e,c),Dm.addNullable(e,!!t.nullable),n!==-1&&Dm.addName(e,n),i!==-1&&Dm.addDictionary(e,i),l!==-1&&Dm.addCustomMetadata(e,l),Dm.endField(e)}function Vb(e,t){let n=t.nodes||[],r=t.buffers||[];em.startNodesVector(e,n.length);for(let t of n.slice().reverse())Cb.encode(e,t);let i=e.endVector();em.startBuffersVector(e,r.length);for(let t of r.slice().reverse())Sb.encode(e,t);let a=e.endVector();return em.startRecordBatch(e),em.addLength(e,BigInt(t.length)),em.addNodes(e,i),em.addBuffers(e,a),em.endRecordBatch(e)}function Hb(e,t){let n=bb.encode(e,t.data);return tm.startDictionaryBatch(e),tm.addId(e,BigInt(t.id)),tm.addIsDelta(e,t.isDelta),tm.addData(e,n),tm.endDictionaryBatch(e)}function Ub(e,t){return $p.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function Wb(e,t){return Qp.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const Gb=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),Kb=e=>`Expected ${km[e]} Message in stream, but was null or length 0.`,qb=e=>`Header pointer of flatbuffer-encoded ${km[e]} Message is null or length 0.`,Jb=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,Yb=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var Xb=class{constructor(e){this.source=e instanceof dy?e:new dy(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?oy: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(Kb(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=gp(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(Kb(e));return t.value}readSchema(){let e=km.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(qb(e));return n}};const $b=4,ex=`ARROW1`,tx=new Uint8Array(6);for(let e=0;e<6;e+=1)tx[e]=ex.codePointAt(e);function nx(e,t=0){for(let n=-1,r=tx.length;++nthis):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 wp.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return wp.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:$f(t)?bx(t):tp(t)?Cx(t):Xf(t)?(()=>Lf(this,void 0,void 0,function*(){return yield e.from(yield t)}))():np(t)||ap(t)||sp(t)||Qf(t)?Sx(new fy(t)):xx(new dy(t))}static readAll(t){return t instanceof e?t.isSync()?vx(t):yx(t):$f(t)||ArrayBuffer.isView(t)||Zf(t)||ep(t)?vx(t):yx(t)}},sx=class extends ox{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return zf(this,arguments,function*(){yield L(yield*Bf(Vf(this[Symbol.iterator]())))})}},cx=class extends ox{constructor(e){super(e),this._impl=e}readAll(){return Lf(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=Vf(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]()}},lx=class extends sx{constructor(e){super(e),this._impl=e}},ux=class extends cx{constructor(e){super(e),this._impl=e}},dx=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=wv({type:new Vh(this.schema.fields),length:e.length,children:n});return new Qy(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 qv(c)):new qv(c)).memoize()}_loadVectors(e,t,n){return new Ty(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},fx=class extends dx{constructor(e,t){super(t),this._reader=$f(e)?new Qb(this._handle=e):new Xb(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=_x(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):oy}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):oy}next(){if(this.closed)return oy;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 tb(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},px=class extends dx{constructor(e,t){super(t),this._reader=new Zb(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Lf(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 Lf(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=_x(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Lf(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):oy})}return(e){return Lf(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):oy})}next(){return Lf(this,void 0,void 0,function*(){if(this.closed)return oy;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 tb(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Lf(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},mx=class extends fx{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 hy?e:new hy(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(km.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(km.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-ix,n=e.readInt32(t),r=e.readAt(t-n,n);return ry.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Lf(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 Lf(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(km.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 Lf(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(km.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 Lf(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-ix,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return ry.decode(r)})}_readNextMessageAndValidate(e){return Lf(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?nx(t)?new lx(new mx(e.read())):new sx(new fx(e)):new sx(new fx(function*(){}()))}function Sx(e){return Lf(this,void 0,void 0,function*(){let t=yield e.peek(rx+7&-8);return t&&t.byteLength>=4?nx(t)?new lx(new mx(yield e.read())):new cx(new px(e)):new cx(new px(function(){return zf(this,arguments,function*(){})}()))})}function Cx(e){return Lf(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new gy(e,t);return t>=ax&&nx(yield n.readAt(0,rx+7&-8))?new ux(new hx(n)):new cx(new px(n))})}var wx=class e extends Yh{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof Qy?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 qv)return this.visitMany(e.data),this;let{type:t}=e;if(!z.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(z.isUnion(t))this.nodes.push(new Cb(n,0));else{let{nullCount:r}=e;z.isNull(t)||Tx.call(this,r<=0?new Uint8Array:mv(e.offset,n,e.nullBitmap)),this.nodes.push(new Cb(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 Tx(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new Sb(this._byteLength,t)),this._byteLength+=t,this}function Ex(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(Tx.call(this,i),n.mode===Np.Sparse)return jx.call(this,e);if(n.mode===Np.Dense){if(e.offset<=0)return Tx.call(this,a),jx.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 Dx(e){let t;return e.nullCount>=e.length?Tx.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?Tx.call(this,mv(e.offset,e.length,t)):Tx.call(this,hv(e.values))}function Ox(e){return Tx.call(this,e.values.subarray(0,e.length*e.stride))}function kx(e){let{length:t,values:n,valueOffsets:r}=e,i=Nm(r[0]),a=Nm(r[t]),o=Math.min(a-i,n.byteLength-i);return Tx.call(this,Sp(-i,t+1,r)),Tx.call(this,n.subarray(i,i+o)),this}function Ax(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return Tx.call(this,Sp(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function jx(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}wx.prototype.visitBool=Dx,wx.prototype.visitInt=Ox,wx.prototype.visitFloat=Ox,wx.prototype.visitUtf8=kx,wx.prototype.visitLargeUtf8=kx,wx.prototype.visitBinary=kx,wx.prototype.visitLargeBinary=kx,wx.prototype.visitFixedSizeBinary=Ox,wx.prototype.visitDate=Ox,wx.prototype.visitTimestamp=Ox,wx.prototype.visitTime=Ox,wx.prototype.visitDecimal=Ox,wx.prototype.visitList=Ax,wx.prototype.visitStruct=jx,wx.prototype.visitUnion=Ex,wx.prototype.visitInterval=Ox,wx.prototype.visitDuration=Ox,wx.prototype.visitFixedSizeList=Ax,wx.prototype.visitMap=Ax;var Mx=class extends cy{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 uy,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Yf(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 Xf(e)?e.then(e=>this.writeAll(e)):Qf(e)?Ix(this,e):Fx(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 uy?this._sink=e:(this._sink=new uy,e&&ip(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&op(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||!Gy(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 Xy&&!(t=e.schema)||e instanceof Qy&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!Gy(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Qy?e instanceof tb||this._writeRecordBatch(e):e instanceof Xy?this.writeAll(e.batches):Zf(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=yb.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===km.RecordBatch?this._recordBatchBlocks.push(new ay(o,e.bodyLength,this._position)):e.headerType===km.DictionaryBatch&&this._dictionaryBlocks.push(new ay(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=gp(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(yb.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(tx)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=wx.assemble(e),a=new bb(e.numRows,n,r),o=yb.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}=wx.assemble(new qv([e])),s=new bb(e.length,i,a),c=new xb(s,t,n),l=yb.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)):Qf(t)?Ix(r,t):Fx(r,t)}},Px=class e extends Mx{static writeAll(t){let n=new e;return Xf(t)?t.then(e=>n.writeAll(e)):Qf(t)?Ix(n,t):Fx(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=ry.encode(new ry(e,Mp.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function Fx(e,t){let n=t;t instanceof Xy&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function Ix(e,t){return Lf(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=Vf(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 Lx(e,t=`stream`){return(t===`stream`?Nx:Px).writeAll(e).toUint8Array(!0)}var Rx=Object.create,zx=Object.defineProperty,Bx=Object.getOwnPropertyDescriptor,Vx=Object.getOwnPropertyNames,Hx=Object.getPrototypeOf,Ux=Object.prototype.hasOwnProperty,Wx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gx=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Vx(t))!Ux.call(e,i)&&i!==n&&zx(e,i,{get:()=>t[i],enumerable:!(r=Bx(t,i))||r.enumerable});return e},Kx=(e,t,n)=>(n=e==null?{}:Rx(Hx(e)),Gx(t||!e||!e.__esModule?zx(n,`default`,{value:e,enumerable:!0}):n,e)),qx=Wx((e,t)=>{t.exports=Worker}),Jx=(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))(Jx||{}),Yx=(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))(Yx||{}),Xx=(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))(Xx||{}),Zx=(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))(Zx||{}),Qx=(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))(Qx||{}),$x=(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))($x||{}),eS=class{log(e){}},tS=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},nS=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(nS||{}),rS=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=ox.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new Xy(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 iS(this._bindings,this._conn,n),i=await ox.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 aS(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=Lx(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)}},iS=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}},aS=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=ox.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new Xy(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new iS(this.bindings,this.connectionId,t),r=await ox.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},oS=(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))(oS||{}),sS=(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))(sS||{}),cS=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 lS(e){switch(e.typeId){case R.Binary:return{sqlType:`binary`};case R.Bool:return{sqlType:`bool`};case R.Date:return{sqlType:`date`};case R.DateDay:return{sqlType:`date32[d]`};case R.DateMillisecond:return{sqlType:`date64[ms]`};case R.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case R.Float:return{sqlType:`float`};case R.Float16:return{sqlType:`float16`};case R.Float32:return{sqlType:`float32`};case R.Float64:return{sqlType:`float64`};case R.Int:return{sqlType:`int32`};case R.Int16:return{sqlType:`int16`};case R.Int32:return{sqlType:`int32`};case R.Int64:return{sqlType:`int64`};case R.Uint16:return{sqlType:`uint16`};case R.Uint32:return{sqlType:`uint32`};case R.Uint64:return{sqlType:`uint64`};case R.Uint8:return{sqlType:`uint8`};case R.IntervalDayTime:return{sqlType:`interval[dt]`};case R.IntervalYearMonth:return{sqlType:`interval[m]`};case R.List:return{sqlType:`list`,valueType:lS(e.valueType)};case R.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case R.Null:return{sqlType:`null`};case R.Utf8:return{sqlType:`utf8`};case R.Struct:return{sqlType:`struct`,fields:e.children.map(e=>uS(e.name,e.type))};case R.Map:{let t=e;return{sqlType:`map`,keyType:lS(t.keyType),valueType:lS(t.valueType)}}case R.Time:return{sqlType:`time[s]`};case R.TimeMicrosecond:return{sqlType:`time[us]`};case R.TimeMillisecond:return{sqlType:`time[ms]`};case R.TimeNanosecond:return{sqlType:`time[ns]`};case R.TimeSecond:return{sqlType:`time[s]`};case R.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case R.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case R.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case R.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case R.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function uS(e,t){let n=lS(t);return n.name=e,n}var dS=new TextEncoder,fS=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 cS(`RESET`,null);return await this.postTask(e)}async ping(){let e=new cS(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new cS(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new cS(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new cS(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new cS(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new cS(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new cS(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new cS(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new cS(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new cS(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new rS(this,e)}async disconnect(e){let t=new cS(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new cS(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new cS(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new cS(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new cS(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new cS(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new cS(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new cS(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new cS(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new cS(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new cS(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new cS(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=dS.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new cS(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new cS(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new cS(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new cS(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new cS(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new cS(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new cS(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new cS(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new cS(`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(uS(t,r))}n.columnsFlat=e,delete n.columns}let r=new cS(`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(uS(t,r))}n.columnsFlat=e,delete n.columns}let r=new cS(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function pS(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}pS();var mS=(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))(mS||{}),hS=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])),gS=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])),_S=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])),vS=()=>(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])),yS={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`}}};yS.name,yS.version;var bS=yS.version.split(`.`);bS[0],bS[1],bS[2];var xS=()=>typeof navigator>`u`,SS=null,CS=null,wS=null,TS=null,ES=null;async function DS(){return SS??=typeof BigInt64Array<`u`,CS??=await gS(),wS??=await vS(),TS??=await _S(),ES??=await hS(),{bigInt64Array:SS,crossOriginIsolated:xS()||globalThis.crossOriginIsolated||!1,wasmExceptions:CS,wasmSIMD:TS,wasmThreads:wS,wasmBulkMemory:ES}}async function OS(e){let t=await DS();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}}Kx(qx()),Symbol.for(`constructDateFrom`);const kS={},AS={};function jS(e,t){try{let n=kS[e]||=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format,r=n(t).split(`GMT`)[1]||``;return r in AS?AS[r]:NS(r,r.split(`:`))}catch{if(e in AS)return AS[e];let t=e?.match(MS);return t?NS(e,t.slice(1)):NaN}}const MS=/([+-]\d\d):?(\d\d)?/;function NS(e,t){let n=+t[0],r=+(t[1]||0);return AS[e]=n>0?n*60+r:n*60-r}var PS=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(jS(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)),RS(this,NaN),IS(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-jS(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),IS(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const FS=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!FS.test(e))return;let t=e.replace(FS,`$1UTC`);PS.prototype[t]&&(e.startsWith(`get`)?PS.prototype[e]=function(){return this.internal[t]()}:(PS.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),LS(this),+this},PS.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),IS(this),+this}))});function IS(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function LS(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()),RS(e)}function RS(e){let t=jS(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=jS(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=jS(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))}}(class e extends PS{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} (${zS(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 zS(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const BS=new TextDecoder(`utf-8`),VS=e=>BS.decode(e),HS=new TextEncoder,US=e=>HS.encode(e),WS=e=>typeof e==`function`,GS=e=>e!=null&&Object(e)===e,KS=e=>GS(e)&&WS(e.then),qS=e=>GS(e)&&WS(e[Symbol.iterator]),JS=e=>GS(e)&&WS(e[Symbol.asyncIterator]),YS=e=>GS(e)&&`done`in e&&`value`in e,XS=e=>GS(e)&&WS(e.clear)&&WS(e.bytes)&&WS(e.position)&&WS(e.setPosition)&&WS(e.capacity)&&WS(e.getBufferIdentifier)&&WS(e.createLong);var ZS={};Ie(ZS,{compareArrayLike:()=>IC,joinUint8Arrays:()=>tC,memcpy:()=>eC,rebaseValueOffsets:()=>FC,toArrayBufferView:()=>nC,toArrayBufferViewAsyncIterator:()=>TC,toArrayBufferViewIterator:()=>hC,toBigInt64Array:()=>oC,toBigUint64Array:()=>uC,toFloat32Array:()=>dC,toFloat32ArrayAsyncIterator:()=>MC,toFloat32ArrayIterator:()=>SC,toFloat64Array:()=>fC,toFloat64ArrayAsyncIterator:()=>NC,toFloat64ArrayIterator:()=>CC,toInt16Array:()=>iC,toInt16ArrayAsyncIterator:()=>DC,toInt16ArrayIterator:()=>_C,toInt32Array:()=>aC,toInt32ArrayAsyncIterator:()=>OC,toInt32ArrayIterator:()=>vC,toInt8Array:()=>rC,toInt8ArrayAsyncIterator:()=>EC,toInt8ArrayIterator:()=>gC,toUint16Array:()=>cC,toUint16ArrayAsyncIterator:()=>AC,toUint16ArrayIterator:()=>bC,toUint32Array:()=>lC,toUint32ArrayAsyncIterator:()=>jC,toUint32ArrayIterator:()=>xC,toUint8Array:()=>sC,toUint8ArrayAsyncIterator:()=>kC,toUint8ArrayIterator:()=>yC,toUint8ClampedArray:()=>pC,toUint8ClampedArrayAsyncIterator:()=>PC,toUint8ClampedArrayIterator:()=>wC});const QS=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function $S(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;++cnC(Int8Array,e),iC=e=>nC(Int16Array,e),aC=e=>nC(Int32Array,e),oC=e=>nC(BigInt64Array,e),sC=e=>nC(Uint8Array,e),cC=e=>nC(Uint16Array,e),lC=e=>nC(Uint32Array,e),uC=e=>nC(BigUint64Array,e),dC=e=>nC(Float32Array,e),fC=e=>nC(Float64Array,e),pC=e=>nC(Uint8ClampedArray,e),mC=e=>(e.next(),e);function*hC(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof QS?n(t):qS(t)?t:n(t);return yield*mC((function*(t){let n=null;do n=t.next(yield nC(e,n));while(!n.done)})(r[Symbol.iterator]())),new e}const gC=e=>hC(Int8Array,e),_C=e=>hC(Int16Array,e),vC=e=>hC(Int32Array,e),yC=e=>hC(Uint8Array,e),bC=e=>hC(Uint16Array,e),xC=e=>hC(Uint32Array,e),SC=e=>hC(Float32Array,e),CC=e=>hC(Float64Array,e),wC=e=>hC(Uint8ClampedArray,e);function TC(e,t){return zf(this,arguments,function*(){if(KS(t))return yield L(yield L(yield*Bf(Vf(TC(e,yield L(t))))));let n=function(e){return zf(this,arguments,function*(){yield yield L(yield L(e))})},r=function(e){return zf(this,arguments,function*(){yield L(yield*Bf(Vf(mC((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 QS?n(t):qS(t)?r(t):JS(t)?t:n(t);return yield L(yield*Bf(Vf(mC((function(t){return zf(this,arguments,function*(){let n=null;do n=yield L(t.next(yield yield L(nC(e,n))));while(!n.done)})})(i[Symbol.asyncIterator]()))))),yield L(new e)})}const EC=e=>TC(Int8Array,e),DC=e=>TC(Int16Array,e),OC=e=>TC(Int32Array,e),kC=e=>TC(Uint8Array,e),AC=e=>TC(Uint16Array,e),jC=e=>TC(Uint32Array,e),MC=e=>TC(Float32Array,e),NC=e=>TC(Float64Array,e),PC=e=>TC(Uint8ClampedArray,e);function FC(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(++nGC});const WC=void 0;function GC(e){if(e===null)return`null`;if(e===WC)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=>GC(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function KC(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 qC(e,t){return KC(e/t)+KC(e%t)/KC(t)}var JC={};Ie(JC,{BN:()=>ow,bigNumToBigInt:()=>iw,bigNumToNumber:()=>nw,bigNumToString:()=>rw,isArrowBigNumSymbol:()=>YC});const YC=Symbol.for(`isArrowBigNum`);function XC(e,...t){return t.length===0?Object.setPrototypeOf(nC(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}XC.prototype[YC]=!0,XC.prototype.toJSON=function(){return`"${rw(this)}"`},XC.prototype.valueOf=function(e){return nw(this,e)},XC.prototype.toString=function(){return rw(this)},XC.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return nw(this);case`string`:return rw(this);case`default`:return iw(this)}return rw(this)};function ZC(...e){return XC.apply(this,e)}function QC(...e){return XC.apply(this,e)}function $C(...e){return XC.apply(this,e)}Object.setPrototypeOf(ZC.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(QC.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf($C.prototype,Object.create(Uint32Array.prototype)),Object.assign(ZC.prototype,XC.prototype,{constructor:ZC,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(QC.prototype,XC.prototype,{constructor:QC,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign($C.prototype,XC.prototype,{constructor:$C,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const ew=BigInt(4294967296)*BigInt(4294967296),tw=ew-BigInt(1);function nw(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=KC(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return KC(c)}function rw(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return aw(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return aw(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`))(U.prototype);var kw=class extends U{constructor(){super(H.Null)}toString(){return`Null`}};cw=Symbol.toStringTag,kw[cw]=(e=>e[Symbol.toStringTag]=`Null`)(kw.prototype);var Aw=class extends U{constructor(e,t){super(H.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}`}};lw=Symbol.toStringTag,Aw[lw]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(Aw.prototype);var jw=class extends Aw{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},Mw=class extends Aw{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},Nw=class extends Aw{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},Pw=class extends Aw{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},Fw=class extends Aw{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Iw=class extends Aw{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},Lw=class extends Aw{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},Rw=class extends Aw{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(jw.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(Mw.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(Nw.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(Pw.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(Fw.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(Iw.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Lw.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(Rw.prototype,`ArrayType`,{value:BigUint64Array});var zw=class extends U{constructor(e){super(H.Float),this.precision=e}get ArrayType(){switch(this.precision){case RC.HALF:return Uint16Array;case RC.SINGLE:return Float32Array;case RC.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};uw=Symbol.toStringTag,zw[uw]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(zw.prototype);var Bw=class extends zw{constructor(){super(RC.HALF)}},Vw=class extends zw{constructor(){super(RC.SINGLE)}},Hw=class extends zw{constructor(){super(RC.DOUBLE)}};Object.defineProperty(Bw.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Vw.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(Hw.prototype,`ArrayType`,{value:Float64Array});var Uw=class extends U{constructor(){super(H.Binary)}toString(){return`Binary`}};dw=Symbol.toStringTag,Uw[dw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(Uw.prototype);var Ww=class extends U{constructor(){super(H.LargeBinary)}toString(){return`LargeBinary`}};fw=Symbol.toStringTag,Ww[fw]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(Ww.prototype);var Gw=class extends U{constructor(){super(H.Utf8)}toString(){return`Utf8`}};pw=Symbol.toStringTag,Gw[pw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(Gw.prototype);var Kw=class extends U{constructor(){super(H.LargeUtf8)}toString(){return`LargeUtf8`}};mw=Symbol.toStringTag,Kw[mw]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(Kw.prototype);var qw=class extends U{constructor(){super(H.Bool)}toString(){return`Bool`}};hw=Symbol.toStringTag,qw[hw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(qw.prototype);var Jw=class extends U{constructor(e,t,n=128){super(H.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};gw=Symbol.toStringTag,Jw[gw]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Jw.prototype);var Yw=class extends U{constructor(e){super(H.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${zC[this.unit]}>`}get ArrayType(){return this.unit===zC.DAY?Int32Array:BigInt64Array}};_w=Symbol.toStringTag,Yw[_w]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(Yw.prototype);var Xw=class extends U{constructor(e,t){super(H.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${BC[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};vw=Symbol.toStringTag,Xw[vw]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(Xw.prototype);var Zw=class extends U{constructor(e,t){super(H.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${BC[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};yw=Symbol.toStringTag,Zw[yw]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(Zw.prototype);var Qw=class extends U{constructor(e){super(H.Interval),this.unit=e}toString(){return`Interval<${VC[this.unit]}>`}};bw=Symbol.toStringTag,Qw[bw]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(Qw.prototype);var $w=class extends U{constructor(e){super(H.Duration),this.unit=e}toString(){return`Duration<${BC[this.unit]}>`}};xw=Symbol.toStringTag,$w[xw]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))($w.prototype);var eT=class extends U{constructor(e){super(H.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}};Sw=Symbol.toStringTag,eT[Sw]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(eT.prototype);var tT=class extends U{constructor(e){super(H.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};Cw=Symbol.toStringTag,tT[Cw]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(tT.prototype);var nT=class extends U{constructor(e,t,n){super(H.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(` | `)}>`}};ww=Symbol.toStringTag,nT[ww]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(nT.prototype);var rT=class extends U{constructor(e){super(H.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};Tw=Symbol.toStringTag,rT[Tw]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(rT.prototype);var iT=class extends U{constructor(e,t){super(H.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}>`}};Ew=Symbol.toStringTag,iT[Ew]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(iT.prototype);var aT=class extends U{constructor(e,t=!1){var n,r,i;if(super(H.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(`, `)}}>`}};Dw=Symbol.toStringTag,aT[Dw]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(aT.prototype);const oT=(e=>()=>++e)(-1);var sT=class extends U{constructor(e,t,n,r){super(H.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?oT():KC(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}>`}};Ow=Symbol.toStringTag,sT[Ow]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(sT.prototype);function cT(e){let t=e;switch(e.typeId){case H.Decimal:return e.bitWidth/32;case H.Interval:return t.unit===VC.MONTH_DAY_NANO?4:1+t.unit;case H.FixedSizeList:return t.listSize;case H.FixedSizeBinary:return t.byteWidth;default:return 1}}var lT=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 uT(this,e,t)}getVisitFnByTypeId(e,t=!0){return dT(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 uT(e,t,n=!0){return typeof t==`number`?dT(e,t,n):typeof t==`string`&&t in H?dT(e,H[t],n):t&&t instanceof U?dT(e,fT(t),n):t?.type&&t.type instanceof U?dT(e,fT(t.type),n):dT(e,H.NONE,n)}function dT(e,t,n=!0){let r=null;switch(t){case H.Null:r=e.visitNull;break;case H.Bool:r=e.visitBool;break;case H.Int:r=e.visitInt;break;case H.Int8:r=e.visitInt8||e.visitInt;break;case H.Int16:r=e.visitInt16||e.visitInt;break;case H.Int32:r=e.visitInt32||e.visitInt;break;case H.Int64:r=e.visitInt64||e.visitInt;break;case H.Uint8:r=e.visitUint8||e.visitInt;break;case H.Uint16:r=e.visitUint16||e.visitInt;break;case H.Uint32:r=e.visitUint32||e.visitInt;break;case H.Uint64:r=e.visitUint64||e.visitInt;break;case H.Float:r=e.visitFloat;break;case H.Float16:r=e.visitFloat16||e.visitFloat;break;case H.Float32:r=e.visitFloat32||e.visitFloat;break;case H.Float64:r=e.visitFloat64||e.visitFloat;break;case H.Utf8:r=e.visitUtf8;break;case H.LargeUtf8:r=e.visitLargeUtf8;break;case H.Binary:r=e.visitBinary;break;case H.LargeBinary:r=e.visitLargeBinary;break;case H.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case H.Date:r=e.visitDate;break;case H.DateDay:r=e.visitDateDay||e.visitDate;break;case H.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case H.Timestamp:r=e.visitTimestamp;break;case H.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case H.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case H.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case H.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case H.Time:r=e.visitTime;break;case H.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case H.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case H.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case H.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case H.Decimal:r=e.visitDecimal;break;case H.List:r=e.visitList;break;case H.Struct:r=e.visitStruct;break;case H.Union:r=e.visitUnion;break;case H.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case H.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case H.Dictionary:r=e.visitDictionary;break;case H.Interval:r=e.visitInterval;break;case H.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case H.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case H.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case H.Duration:r=e.visitDuration;break;case H.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case H.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case H.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case H.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case H.FixedSizeList:r=e.visitFixedSizeList;break;case H.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${H[t]}'`)}function fT(e){switch(e.typeId){case H.Null:return H.Null;case H.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?H.Int8:H.Uint8;case 16:return n?H.Int16:H.Uint16;case 32:return n?H.Int32:H.Uint32;case 64:return n?H.Int64:H.Uint64}return H.Int}case H.Float:switch(e.precision){case RC.HALF:return H.Float16;case RC.SINGLE:return H.Float32;case RC.DOUBLE:return H.Float64}return H.Float;case H.Binary:return H.Binary;case H.LargeBinary:return H.LargeBinary;case H.Utf8:return H.Utf8;case H.LargeUtf8:return H.LargeUtf8;case H.Bool:return H.Bool;case H.Decimal:return H.Decimal;case H.Time:switch(e.unit){case BC.SECOND:return H.TimeSecond;case BC.MILLISECOND:return H.TimeMillisecond;case BC.MICROSECOND:return H.TimeMicrosecond;case BC.NANOSECOND:return H.TimeNanosecond}return H.Time;case H.Timestamp:switch(e.unit){case BC.SECOND:return H.TimestampSecond;case BC.MILLISECOND:return H.TimestampMillisecond;case BC.MICROSECOND:return H.TimestampMicrosecond;case BC.NANOSECOND:return H.TimestampNanosecond}return H.Timestamp;case H.Date:switch(e.unit){case zC.DAY:return H.DateDay;case zC.MILLISECOND:return H.DateMillisecond}return H.Date;case H.Interval:switch(e.unit){case VC.DAY_TIME:return H.IntervalDayTime;case VC.YEAR_MONTH:return H.IntervalYearMonth;case VC.MONTH_DAY_NANO:return H.IntervalMonthDayNano}return H.Interval;case H.Duration:switch(e.unit){case BC.SECOND:return H.DurationSecond;case BC.MILLISECOND:return H.DurationMillisecond;case BC.MICROSECOND:return H.DurationMicrosecond;case BC.NANOSECOND:return H.DurationNanosecond}return H.Duration;case H.Map:return H.Map;case H.List:return H.List;case H.Struct:return H.Struct;case H.Union:switch(e.mode){case LC.Dense:return H.DenseUnion;case LC.Sparse:return H.SparseUnion}return H.Union;case H.FixedSizeBinary:return H.FixedSizeBinary;case H.FixedSizeList:return H.FixedSizeList;case H.Dictionary:return H.Dictionary}throw Error(`Unrecognized type '${H[e.typeId]}'`)}lT.prototype.visitInt8=null,lT.prototype.visitInt16=null,lT.prototype.visitInt32=null,lT.prototype.visitInt64=null,lT.prototype.visitUint8=null,lT.prototype.visitUint16=null,lT.prototype.visitUint32=null,lT.prototype.visitUint64=null,lT.prototype.visitFloat16=null,lT.prototype.visitFloat32=null,lT.prototype.visitFloat64=null,lT.prototype.visitDateDay=null,lT.prototype.visitDateMillisecond=null,lT.prototype.visitTimestampSecond=null,lT.prototype.visitTimestampMillisecond=null,lT.prototype.visitTimestampMicrosecond=null,lT.prototype.visitTimestampNanosecond=null,lT.prototype.visitTimeSecond=null,lT.prototype.visitTimeMillisecond=null,lT.prototype.visitTimeMicrosecond=null,lT.prototype.visitTimeNanosecond=null,lT.prototype.visitDenseUnion=null,lT.prototype.visitSparseUnion=null,lT.prototype.visitIntervalDayTime=null,lT.prototype.visitIntervalYearMonth=null,lT.prototype.visitIntervalMonthDayNano=null,lT.prototype.visitDuration=null,lT.prototype.visitDurationSecond=null,lT.prototype.visitDurationMillisecond=null,lT.prototype.visitDurationMicrosecond=null,lT.prototype.visitDurationNanosecond=null;var pT={};Ie(pT,{float64ToUint16:()=>_T,uint16ToFloat64:()=>gT});const mT=new Float64Array(1),hT=new Uint32Array(mT.buffer);function gT(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 _T(e){if(e!==e)return 32256;mT[0]=e;let t=(hT[1]&2147483648)>>16&65535,n=hT[1]&2146435072,r=0;return n>=1089470464?hT[0]>0?n=31744:(n=(n&2080374784)>>16,r=(hT[1]&1048575)>>10):n<=1056964608?(r=1048576+(hT[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(hT[1]&1048575)+512>>10),t|n|r&65535}var W=class extends lT{};function vT(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const yT=(e,t,n)=>{e[t]=Math.floor(n/864e5)},bT=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},CT=({values:e},t,n)=>{e[t]=n},wT=({values:e},t,n)=>{e[t]=_T(n)},TT=(e,t,n)=>{switch(e.type.precision){case RC.HALF:return wT(e,t,n);case RC.SINGLE:case RC.DOUBLE:return CT(e,t,n)}},ET=({values:e},t,n)=>{yT(e,t,n.valueOf())},DT=({values:e},t,n)=>{e[t]=BigInt(n)},OT=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},kT=({values:e,valueOffsets:t},n,r)=>bT(e,t,n,r),AT=({values:e,valueOffsets:t},n,r)=>bT(e,t,n,US(r)),jT=(e,t,n)=>{e.type.unit===zC.DAY?ET(e,t,n):DT(e,t,n)},MT=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},NT=({values:e},t,n)=>{e[t]=BigInt(n)},PT=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},FT=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},IT=(e,t,n)=>{switch(e.type.unit){case BC.SECOND:return MT(e,t,n);case BC.MILLISECOND:return NT(e,t,n);case BC.MICROSECOND:return PT(e,t,n);case BC.NANOSECOND:return FT(e,t,n)}},LT=({values:e},t,n)=>{e[t]=n},RT=({values:e},t,n)=>{e[t]=n},zT=({values:e},t,n)=>{e[t]=n},BT=({values:e},t,n)=>{e[t]=n},VT=(e,t,n)=>{switch(e.type.unit){case BC.SECOND:return LT(e,t,n);case BC.MILLISECOND:return RT(e,t,n);case BC.MICROSECOND:return zT(e,t,n);case BC.NANOSECOND:return BT(e,t,n)}},HT=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},UT=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=uE.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=uE.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},GT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),KT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),qT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),JT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),YT=(e,t,n)=>{let r=e.type.children.map(e=>uE.getVisitFn(e.type)),i=n instanceof Map?qT(t,n):n instanceof cO?KT(t,n):Array.isArray(n)?GT(t,n):JT(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},XT=(e,t,n)=>{e.type.mode===LC.Dense?ZT(e,t,n):QT(e,t,n)},ZT=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];uE.visit(i,e.valueOffsets[t],n)},QT=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];uE.visit(i,t,n)},$T=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},eE=(e,t,n)=>{switch(e.type.unit){case VC.YEAR_MONTH:return nE(e,t,n);case VC.DAY_TIME:return tE(e,t,n);case VC.MONTH_DAY_NANO:return rE(e,t,n)}},tE=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},nE=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},rE=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},iE=({values:e},t,n)=>{e[t]=n},aE=({values:e},t,n)=>{e[t]=n},oE=({values:e},t,n)=>{e[t]=n},sE=({values:e},t,n)=>{e[t]=n},cE=(e,t,n)=>{switch(e.type.unit){case BC.SECOND:return iE(e,t,n);case BC.MILLISECOND:return aE(e,t,n);case BC.MICROSECOND:return oE(e,t,n);case BC.NANOSECOND:return sE(e,t,n)}},lE=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=uE.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${GC(e)}: ${GC(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new mE(this[dE],this[fE])}},mE=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[dE].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[dE].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[dE].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=oD.visit(e[dE].children[n],e[fE]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[dE].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(uE.visit(e[dE].children[r],e[fE],n),Reflect.set(e,t,n))}};const gE=new hE;var G=class extends lT{};function K(e){return(t,n)=>t.getValid(n)?e(t,n):null}const _E=(e,t)=>864e5*e[t],vE=(e,t)=>null,yE=(e,t,n)=>{if(n+1>=t.length)return null;let r=KC(t[n]),i=KC(t[n+1]);return e.subarray(r,i)},bE=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<_E(e,t),SE=({values:e},t)=>KC(e[t]),CE=({stride:e,values:t},n)=>t[e*n],wE=({stride:e,values:t},n)=>gT(t[e*n]),TE=({values:e},t)=>e[t],EE=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),DE=({values:e,valueOffsets:t},n)=>yE(e,t,n),OE=({values:e,valueOffsets:t},n)=>{let r=yE(e,t,n);return r===null?null:VS(r)},kE=({values:e},t)=>e[t],AE=({type:e,values:t},n)=>e.precision===RC.HALF?gT(t[n]):t[n],jE=(e,t)=>e.type.unit===zC.DAY?xE(e,t):SE(e,t),ME=({values:e},t)=>1e3*KC(e[t]),NE=({values:e},t)=>KC(e[t]),PE=({values:e},t)=>qC(e[t],BigInt(1e3)),FE=({values:e},t)=>qC(e[t],BigInt(1e6)),IE=(e,t)=>{switch(e.type.unit){case BC.SECOND:return ME(e,t);case BC.MILLISECOND:return NE(e,t);case BC.MICROSECOND:return PE(e,t);case BC.NANOSECOND:return FE(e,t)}},LE=({values:e},t)=>e[t],RE=({values:e},t)=>e[t],zE=({values:e},t)=>e[t],BE=({values:e},t)=>e[t],VE=(e,t)=>{switch(e.type.unit){case BC.SECOND:return LE(e,t);case BC.MILLISECOND:return RE(e,t);case BC.MICROSECOND:return zE(e,t);case BC.NANOSECOND:return BE(e,t)}},HE=({values:e,stride:t},n)=>ow.decimal(e.subarray(t*n,t*(n+1))),UE=(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 cO([c])},WE=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new dD(o.slice(i,a-i))},GE=(e,t)=>new pE(e,t),KE=(e,t)=>e.type.mode===LC.Dense?qE(e,t):JE(e,t),qE=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return oD.visit(r,e.valueOffsets[t])},JE=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return oD.visit(r,t)},YE=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},XE=(e,t)=>e.type.unit===VC.MONTH_DAY_NANO?$E(e,t):e.type.unit===VC.DAY_TIME?ZE(e,t):QE(e,t),ZE=({values:e},t)=>e.subarray(2*t,2*(t+1)),QE=({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},$E=({values:e},t)=>e.subarray(4*t,4*(t+1)),eD=({values:e},t)=>e[t],tD=({values:e},t)=>e[t],nD=({values:e},t)=>e[t],rD=({values:e},t)=>e[t],iD=(e,t)=>{switch(e.type.unit){case BC.SECOND:return eD(e,t);case BC.MILLISECOND:return tD(e,t);case BC.MICROSECOND:return nD(e,t);case BC.NANOSECOND:return rD(e,t)}},aD=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new cO([a])};G.prototype.visitNull=K(vE),G.prototype.visitBool=K(bE),G.prototype.visitInt=K(kE),G.prototype.visitInt8=K(CE),G.prototype.visitInt16=K(CE),G.prototype.visitInt32=K(CE),G.prototype.visitInt64=K(TE),G.prototype.visitUint8=K(CE),G.prototype.visitUint16=K(CE),G.prototype.visitUint32=K(CE),G.prototype.visitUint64=K(TE),G.prototype.visitFloat=K(AE),G.prototype.visitFloat16=K(wE),G.prototype.visitFloat32=K(CE),G.prototype.visitFloat64=K(CE),G.prototype.visitUtf8=K(OE),G.prototype.visitLargeUtf8=K(OE),G.prototype.visitBinary=K(DE),G.prototype.visitLargeBinary=K(DE),G.prototype.visitFixedSizeBinary=K(EE),G.prototype.visitDate=K(jE),G.prototype.visitDateDay=K(xE),G.prototype.visitDateMillisecond=K(SE),G.prototype.visitTimestamp=K(IE),G.prototype.visitTimestampSecond=K(ME),G.prototype.visitTimestampMillisecond=K(NE),G.prototype.visitTimestampMicrosecond=K(PE),G.prototype.visitTimestampNanosecond=K(FE),G.prototype.visitTime=K(VE),G.prototype.visitTimeSecond=K(LE),G.prototype.visitTimeMillisecond=K(RE),G.prototype.visitTimeMicrosecond=K(zE),G.prototype.visitTimeNanosecond=K(BE),G.prototype.visitDecimal=K(HE),G.prototype.visitList=K(UE),G.prototype.visitStruct=K(GE),G.prototype.visitUnion=K(KE),G.prototype.visitDenseUnion=K(qE),G.prototype.visitSparseUnion=K(JE),G.prototype.visitDictionary=K(YE),G.prototype.visitInterval=K(XE),G.prototype.visitIntervalDayTime=K(ZE),G.prototype.visitIntervalYearMonth=K(QE),G.prototype.visitIntervalMonthDayNano=K($E),G.prototype.visitDuration=K(iD),G.prototype.visitDurationSecond=K(eD),G.prototype.visitDurationMillisecond=K(tD),G.prototype.visitDurationMicrosecond=K(nD),G.prototype.visitDurationNanosecond=K(rD),G.prototype.visitFixedSizeList=K(aD),G.prototype.visitMap=K(WE);const oD=new G,sD=Symbol.for(`keys`),cD=Symbol.for(`vals`),lD=Symbol.for(`kKeysAsStrings`),uD=Symbol.for(`_kKeysAsStrings`);var dD=class{constructor(e){return this[sD]=new cO([e.children[0]]).memoize(),this[cD]=e.children[1],new Proxy(this,new pD)}get[lD](){return this[uD]||(this[uD]=Array.from(this[sD].toArray(),String))}[Symbol.iterator](){return new fD(this[sD],this[cD])}get size(){return this[sD].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[sD],t=this[cD],n={};for(let r=-1,i=e.length;++r`${GC(e)}: ${GC(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},fD=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),oD.visit(this.vals,e)]})}},pD=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[lD]}has(e,t){return e[lD].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[lD].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[lD].indexOf(t);if(n!==-1){let r=oD.visit(Reflect.get(e,cD),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[lD].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(uE.visit(Reflect.get(e,cD),r,n),Reflect.set(e,t,n))}};Object.defineProperties(dD.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[sD]:{writable:!0,enumerable:!1,configurable:!1,value:null},[cD]:{writable:!0,enumerable:!1,configurable:!1,value:null},[uD]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var mD={};Ie(mD,{clampRange:()=>gD,createElementComparator:()=>yD,wrapIndex:()=>_D});let hD;function gD(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 _D=(e,t)=>e<0?t+e:e,vD=e=>e!==e;function yD(e){let t=typeof e;if(t!==`object`||e===null)return vD(e)?vD: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?IC(e,t):!1:e instanceof Map?xD(e):Array.isArray(e)?bD(e):e instanceof cO?SD(e):CD(e,!0)}function bD(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 TD(e,n);case Map:return DD(e,n,n.keys());case dD:case pE:case Object:case void 0:return DD(e,n,t||Object.keys(n))}return n instanceof cO?ED(e,n):!1}}function TD(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rPD,getBit:()=>AD,getBool:()=>kD,packBools:()=>ND,popcnt_array:()=>ID,popcnt_bit_range:()=>FD,popcnt_uint32:()=>LD,setBool:()=>jD,truncateBitmap:()=>MD});function kD(e,t,n,r){return(n&1<>r}function jD(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):ND(new PD(n,e,t,null,kD)).subarray(0,r)),i}return n}function ND(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 PD=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 FD(e,t,i)+FD(e,r,n)+ID(e,i>>3,r-i>>3)}function ID(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+=LD(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=LD(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=LD(a.getUint8(i)),i+=1;return r}function LD(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const RD=-1;var zD=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 U.isSparseUnion(e)||U.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(U.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=RD&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-FD(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=cT(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(U.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===LC.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(MD(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===H.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(MD(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[HC.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[HC.TYPE])&&(a[HC.TYPE]=i.subarray(e,e+t)),(i=a[HC.OFFSET])&&(a[HC.OFFSET]=i.subarray(e,e+t+1))||(i=a[HC.DATA])&&(a[HC.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};zD.prototype.children=Object.freeze([]);var BD=class e extends lT{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new zD(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=sC(e.data),i=sC(e.nullBitmap),a=aC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=sC(e.data),i=sC(e.nullBitmap),a=oC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=sC(e.data),i=sC(e.nullBitmap),a=aC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=sC(e.data),i=sC(e.nullBitmap),a=oC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=sC(e.nullBitmap),a=aC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new zD(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=sC(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=nC(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(U.isSparseUnion(t))return new zD(t,n,a,o,[void 0,void 0,void 0,i],r);let s=aC(e.valueOffsets);return new zD(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=sC(t.nullBitmap),a=nC(n.indices.ArrayType,t.data),{dictionary:o=new cO([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new zD(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length/cT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new zD(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=sC(e.nullBitmap),i=nC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new zD(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=sC(t.nullBitmap),{length:o=i.length/cT(n),nullCount:s=t.nullBitmap?-1:0}=t;return new zD(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=sC(t.nullBitmap),o=aC(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new zD(n,r,s,c,[o,void 0,a],[i])}};new BD;var VD=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 UD(e){return e.reduce((e,t)=>e+t.nullCount,0)}function WD(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function GD(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 KD(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function QD(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new PD(n,e.offset+(t||0),e.length,n,kD)){if(!i)return r;++r}return-1}function $D(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case H.Union:break;case H.Dictionary:break;default:return QD(e,n)}let r=oD.getVisitFn(e),i=yD(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 VD(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new rO(a)})}var rO=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof zD)))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}=oO[o.typeId],r=a[0];this.isValid=e=>qD(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,sO[o.typeId]),this._offsets=WD(a);break}this.data=a,this.type=o,this.stride=cT(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 HD(this.data)}get nullCount(){return UD(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${H[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(_D(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return iO.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(gD(this,t,n,({data:e,_offsets:t},n,r)=>GD(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case H.Int:case H.Float:case H.Decimal:case H.Time:case H.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 U.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(U.isDictionary(this.type)){let t=new lO(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new lO(this)}unmemoize(){if(U.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}};aO=Symbol.toStringTag,cO[aO]=(e=>{e.type=U.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(H).map(e=>H[e]).filter(e=>typeof e==`number`&&e!==H.NONE);for(let n of t){let t=oD.getVisitFnByTypeId(n),r=uE.getVisitFnByTypeId(n),i=tO.getVisitFnByTypeId(n);oO[n]={get:t,set:r,indexOf:i},sO[n]=Object.create(e,{isValid:{value:JD(qD)},get:{value:JD(oD.getVisitFnByTypeId(n))},set:{value:YD(uE.getVisitFnByTypeId(n))},indexOf:{value:XD(tO.getVisitFnByTypeId(n))}})}return`Vector`})(cO.prototype);var lO=class e extends cO{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 cO(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},uO={};Ie(uO,{BaseInt64:()=>hO,Int128:()=>vO,Int64:()=>_O,Uint64:()=>gO});const dO=65536;function fO(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const pO=8,mO=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var hO=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`${fO(this.buffer[3])} ${fO(this.buffer[2])} ${fO(this.buffer[1])} ${fO(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;nbO,toIntervalDayTimeObjects:()=>SO,toIntervalMonthDayNanoInt32Array:()=>xO,toIntervalMonthDayNanoObjects:()=>CO});function bO(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 SO(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 Y=class extends lT{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 wO(e,t){return t instanceof e.constructor}function TO(e,t){return e===t||wO(e,t)}function EO(e,t){return e===t||wO(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function DO(e,t){return e===t||wO(e,t)&&e.precision===t.precision}function OO(e,t){return e===t||wO(e,t)&&e.byteWidth===t.byteWidth}function kO(e,t){return e===t||wO(e,t)&&e.unit===t.unit}function AO(e,t){return e===t||wO(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function jO(e,t){return e===t||wO(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function MO(e,t){return e===t||wO(e,t)&&e.children.length===t.children.length&&BO.compareManyFields(e.children,t.children)}function NO(e,t){return e===t||wO(e,t)&&e.children.length===t.children.length&&BO.compareManyFields(e.children,t.children)}function PO(e,t){return e===t||wO(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&BO.compareManyFields(e.children,t.children)}function FO(e,t){return e===t||wO(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&BO.visit(e.indices,t.indices)&&BO.visit(e.dictionary,t.dictionary)}function IO(e,t){return e===t||wO(e,t)&&e.unit===t.unit}function LO(e,t){return e===t||wO(e,t)&&e.unit===t.unit}function RO(e,t){return e===t||wO(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&BO.compareManyFields(e.children,t.children)}function zO(e,t){return e===t||wO(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&BO.compareManyFields(e.children,t.children)}Y.prototype.visitNull=TO,Y.prototype.visitBool=TO,Y.prototype.visitInt=EO,Y.prototype.visitInt8=EO,Y.prototype.visitInt16=EO,Y.prototype.visitInt32=EO,Y.prototype.visitInt64=EO,Y.prototype.visitUint8=EO,Y.prototype.visitUint16=EO,Y.prototype.visitUint32=EO,Y.prototype.visitUint64=EO,Y.prototype.visitFloat=DO,Y.prototype.visitFloat16=DO,Y.prototype.visitFloat32=DO,Y.prototype.visitFloat64=DO,Y.prototype.visitUtf8=TO,Y.prototype.visitLargeUtf8=TO,Y.prototype.visitBinary=TO,Y.prototype.visitLargeBinary=TO,Y.prototype.visitFixedSizeBinary=OO,Y.prototype.visitDate=kO,Y.prototype.visitDateDay=kO,Y.prototype.visitDateMillisecond=kO,Y.prototype.visitTimestamp=AO,Y.prototype.visitTimestampSecond=AO,Y.prototype.visitTimestampMillisecond=AO,Y.prototype.visitTimestampMicrosecond=AO,Y.prototype.visitTimestampNanosecond=AO,Y.prototype.visitTime=jO,Y.prototype.visitTimeSecond=jO,Y.prototype.visitTimeMillisecond=jO,Y.prototype.visitTimeMicrosecond=jO,Y.prototype.visitTimeNanosecond=jO,Y.prototype.visitDecimal=TO,Y.prototype.visitList=MO,Y.prototype.visitStruct=NO,Y.prototype.visitUnion=PO,Y.prototype.visitDenseUnion=PO,Y.prototype.visitSparseUnion=PO,Y.prototype.visitDictionary=FO,Y.prototype.visitInterval=IO,Y.prototype.visitIntervalDayTime=IO,Y.prototype.visitIntervalYearMonth=IO,Y.prototype.visitIntervalMonthDayNano=IO,Y.prototype.visitDuration=LO,Y.prototype.visitDurationSecond=LO,Y.prototype.visitDurationMillisecond=LO,Y.prototype.visitDurationMicrosecond=LO,Y.prototype.visitDurationNanosecond=LO,Y.prototype.visitFixedSizeList=RO,Y.prototype.visitMap=zO;const BO=new Y;function VO(e,t){return BO.compareSchemas(e,t)}function HO(e,t){return BO.compareFields(e,t)}function UO(e,t){return BO.visit(e,t)}const WO=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},JC),uO),OD),pT),ZS),mD),UC),yO),{compareSchemas:VO,compareFields:HO,compareTypes:UO}),GO=365.2425,KO=6048e5,qO=864e5,JO=3600,YO=JO*24;YO*7;const XO=YO*GO,ZO=XO/12;ZO*3;const QO=Symbol.for(`constructDateFrom`);function $O(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&QO in e?e[QO](t):e instanceof Date?new e.constructor(t):new Date(t)}function ek(e,t){return $O(t||e,e)}let tk={};function nk(){return tk}function rk(e,t){let n=nk(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ek(e,t?.in),a=i.getDay(),o=(a=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ok(e){let t=ek(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 sk(e,...t){let n=$O.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function ck(e,t){let n=ek(e,t?.in);return n.setHours(0,0,0,0),n}function lk(e,t,n){let[r,i]=sk(n?.in,e,t),a=ck(r),o=ck(i),s=+a-ok(a),c=+o-ok(o);return Math.round((s-c)/qO)}function uk(e,t){let n=ak(e,t),r=$O(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ik(r)}function dk(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function fk(e){return!(!dk(e)&&typeof e!=`number`||isNaN(+ek(e)))}function pk(e,t){let n=ek(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const mk={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`}},hk=(e,t,n)=>{let r,i=mk[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 gk(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const _k={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},vk={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},yk={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},bk={date:gk({formats:_k,defaultWidth:`full`}),time:gk({formats:vk,defaultWidth:`full`}),dateTime:gk({formats:yk,defaultWidth:`full`})},xk={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Sk=(e,t,n,r)=>xk[e];function Ck(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 wk={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},Tk={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},Ek={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`]},Dk={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`]},Ok={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`}},kk={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`}},Ak=(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`},jk={ordinalNumber:Ak,era:Ck({values:wk,defaultWidth:`wide`}),quarter:Ck({values:Tk,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Ck({values:Ek,defaultWidth:`wide`}),day:Ck({values:Dk,defaultWidth:`wide`}),dayPeriod:Ck({values:Ok,defaultWidth:`wide`,formattingValues:kk,defaultFormattingWidth:`wide`})};function Mk(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)?Pk(s,e=>e.test(o)):Nk(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 Nk(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Pk(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 Ik=/^(\d+)(th|st|nd|rd)?/i,Lk=/\d+/i,Rk={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},zk={any:[/^b/i,/^(a|c)/i]},Bk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vk={any:[/1/i,/2/i,/3/i,/4/i]},Hk={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},Uk={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]},Wk={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},Gk={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]},Kk={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},qk={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}},Jk={ordinalNumber:Fk({matchPattern:Ik,parsePattern:Lk,valueCallback:e=>parseInt(e,10)}),era:Mk({matchPatterns:Rk,defaultMatchWidth:`wide`,parsePatterns:zk,defaultParseWidth:`any`}),quarter:Mk({matchPatterns:Bk,defaultMatchWidth:`wide`,parsePatterns:Vk,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:Mk({matchPatterns:Hk,defaultMatchWidth:`wide`,parsePatterns:Uk,defaultParseWidth:`any`}),day:Mk({matchPatterns:Wk,defaultMatchWidth:`wide`,parsePatterns:Gk,defaultParseWidth:`any`}),dayPeriod:Mk({matchPatterns:Kk,defaultMatchWidth:`any`,parsePatterns:qk,defaultParseWidth:`any`})},Yk={code:`en-US`,formatDistance:hk,formatLong:bk,formatRelative:Sk,localize:jk,match:Jk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xk(e,t){let n=ek(e,t?.in),r=lk(n,pk(n)),i=r+1;return i}function Zk(e,t){let n=ek(e,t?.in),r=ik(n)-+uk(n);return Math.round(r/KO)+1}function Qk(e,t){let n=ek(e,t?.in),r=n.getFullYear(),i=nk(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=$O(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=rk(o,t),c=$O(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=rk(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function $k(e,t){let n=nk(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Qk(e,t),a=$O(t?.in||e,0);a.setFullYear(i,0,r),a.setHours(0,0,0,0);let o=rk(a,t);return o}function eA(e,t){let n=ek(e,t?.in),r=rk(n,t)-+$k(n,t);return Math.round(r/KO)+1}function tA(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const nA={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return tA(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):tA(n+1,2)},d(e,t){return tA(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 tA(e.getHours()%12||12,t.length)},H(e,t){return tA(e.getHours(),t.length)},m(e,t){return tA(e.getMinutes(),t.length)},s(e,t){return tA(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return tA(i,t.length)}},rA={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},iA={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 nA.y(e,t)},Y:function(e,t,n,r){let i=Qk(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return tA(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):tA(a,t.length)},R:function(e,t){let n=ak(e);return tA(n,t.length)},u:function(e,t){let n=e.getFullYear();return tA(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 tA(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 tA(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 nA.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 tA(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=eA(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):tA(i,t.length)},I:function(e,t,n){let r=Zk(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):tA(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):nA.d(e,t)},D:function(e,t,n){let r=Xk(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):tA(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 tA(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 tA(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 tA(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?rA.noon:r===0?rA.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?rA.evening:r>=12?rA.afternoon:r>=4?rA.morning:rA.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 nA.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):nA.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):tA(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):tA(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):nA.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):nA.s(e,t)},S:function(e,t){return nA.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return oA(r);case`XXXX`:case`XX`:return sA(r);case`XXXXX`:case`XXX`:default:return sA(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return oA(r);case`xxxx`:case`xx`:return sA(r);case`xxxxx`:case`xxx`:default:return sA(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+aA(r,`:`);case`OOOO`:default:return`GMT`+sA(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+aA(r,`:`);case`zzzz`:default:return`GMT`+sA(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return tA(r,t.length)},T:function(e,t,n){return tA(+e,t.length)}};function aA(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+tA(a,2)}function oA(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+tA(Math.abs(e)/60,2)}return sA(e,t)}function sA(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=tA(Math.trunc(r/60),2),a=tA(r%60,2);return n+i+t+a}const cA=(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`})}},lA=(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`})}},uA=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return cA(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}}`,cA(r,t)).replace(`{{time}}`,lA(i,t))},dA={p:lA,P:uA},fA=/^D+$/,pA=/^Y+$/,mA=[`D`,`DD`,`YY`,`YYYY`];function hA(e){return fA.test(e)}function gA(e){return pA.test(e)}function _A(e,t,n){let r=vA(e,t,n);if(console.warn(r),mA.includes(e))throw RangeError(r)}function vA(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 yA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xA=/^'([^]*?)'?$/,SA=/''/g,CA=/[a-zA-Z]/;function wA(e,t,n){let r=nk(),i=n?.locale??r.locale??Yk,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=ek(e,n?.in);if(!fk(s))throw RangeError(`Invalid time value`);let c=t.match(bA).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=dA[t];return n(e,i.formatLong)}return e}).join(``).match(yA).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:TA(e)};if(iA[t])return{isToken:!0,value:e};if(t.match(CA))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&gA(a)||!n?.useAdditionalDayOfYearTokens&&hA(a))&&_A(a,t,String(e));let o=iA[a[0]];return o(s,a,i.localize,l)}).join(``)}function TA(e){let t=e.match(xA);return t?t[1].replace(SA,`'`):e}function EA(e,t){return ek(e*1e3,t?.in)}function DA(e,t){let n=OA(t)?new t(0):$O(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function OA(e){return typeof e==`function`&&e.prototype?.constructor===e}function kA(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 AA(e){return e==null}function jA(e){return e!=null}async function MA(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await S(()=>import(`./__vite-browser-external-DgcibqnP.js`).then(Re(1)),__vite__mapDeps([0,1,2]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function NA(e){return AA(e)?!1:U.isInt(e.type)&&!zA(e)||PA(e)}function PA(e){return AA(e)?!1:U.isInt(e.type)&&e.type.isSigned===!1}function FA(e){return AA(e)?!1:U.isFloat(e.type)??!1}function IA(e){return AA(e)?!1:U.isDecimal(e.type)}function LA(e){return AA(e)?!1:U.isBool(e.type)}function RA(e){return AA(e)?!1:U.isDuration(e.type)}function zA(e){return AA(e)?!1:U.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function BA(e){return AA(e)?!1:U.isTimestamp(e.type)}function VA(e){return AA(e)?!1:U.isDate(e.type)}function HA(e){return AA(e)?!1:U.isTime(e.type)}function UA(e){return AA(e)?!1:U.isList(e.type)||U.isFixedSizeList(e.type)}function WA(e){return AA(e)?!1:U.isStruct(e.type)||U.isMap(e.type)}function GA(e){return AA(e)?!1:U.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||U.isInterval(e.type)}new Date(1970,0,1);function KA(e,t){let n;if(t===BC.MILLISECOND)n=1e3;else if(t===BC.MICROSECOND)n=1e3*1e3;else if(t===BC.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 qA(e,t){let n=KA(e,t?.type?.unit??BC.SECOND);return EA(n)}function JA(e,t){let n=qA(e,t);return wA(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function YA(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?wA(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function XA(e,t){if(!(e instanceof Date||typeof e==`number`&&Number.isFinite(e)))return console.warn(`Unsupported datetime value: ${e}`),null;let n,r=t?.type?.timezone;return n=r?new PS(e,r):new PS(e),DA(n,Date)}function ZA(e,t){let n=t?.type?.scale||0,r=WO.bigNumToString(new WO.BN(e)).padStart(n,`0`);if(n===0)return r;let i=``;r.startsWith(`-`)&&(i=`-`,r=r.slice(1));let a=r.slice(0,-n)||`0`,o=kA(r.slice(-n),`0`)||``;return`${i}${a}${o?`.${o}`:``}`}new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function QA(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 $A(e,t){if(U.isInterval(t?.type))return QA(e);let n=t&&t.metadata.get(`ARROW:extension:name`);if(n&&n===`pandas.interval`){let n=JSON.parse(t.metadata.get(`ARROW:extension:metadata`)),{closed:r}=n,i=e.toJSON(),a=r===`both`||r===`left`?`[`:`(`,o=r===`both`||r===`right`?`]`:`)`,s=tj(i.left,t.type?.children?.[0]),c=tj(i.right,t.type?.children?.[1]);return`${a+s}, ${c+o}`}return String(e)}function ej(e,t){return t?.type instanceof tT?JSON.parse(JSON.stringify(e,(e,t)=>{if(jA(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function tj(e,t){if(AA(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&VA(t))return YA(e);if(typeof e==`bigint`&&HA(t))return JA(Number(e),t);if(n&&BA(t))return XA(e,t);if(zA(t))throw Error(`Period type is not supported yet`);if(GA(t))return $A(e,t);if(RA(t))throw Error(`Duration type is not supported yet`);return IA(t)?ZA(e,t):FA(t)&&Number.isFinite(e)||NA(t)?e:WA(t)||UA(t)?ej(e,t):LA(t)?!!e:String(e)}function nj(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=tj(t[e.name],e)),t));return n}let rj=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function ij(e){let t=he(e,{logger:!1}),n,r,i=await MA();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await S(async()=>{let{getBundles:e}=await import(`./default-browser-ZWdN_TIR.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await OS(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await S(async()=>{let{getBundles:e}=await import(`./default-node-BtQ98lhg.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]));t.bundles=await e()}r=await OS(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await S(()=>import(`./browser-DPkKpj_5.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new tS:t.logger===!1?new eS:t.logger;let o=new fS(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case rj.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 rj.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:nj(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:nj(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 aj(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 oj(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 X=Symbol.for(`drizzle:entityKind`);Symbol.for(`drizzle:hasOwnEntityKind`);function Z(e,t){if(!e||typeof e!=`object`)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,X))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(X in n&&n[X]===t[X])return!0;n=Object.getPrototypeOf(n)}return!1}var sj=class{constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity}static[X]=`Column`;name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!==`byDefault`}},cj=class{static[X]=`ColumnBuilder`;config;constructor(e,t,n){this.config={name:e,keyAsName:e===``,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:n,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}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===``&&(this.config.name=e)}};const lj=Symbol.for(`drizzle:Name`);var uj=class{static[X]=`PgForeignKeyBuilder`;reference;_onUpdate=`no action`;_onDelete=`no action`;constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:r}=e();return{name:t,columns:n,foreignTable:r[0].table,foreignColumns:r}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.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 dj(e,this)}},dj=class{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static[X]=`PgForeignKey`;reference;onUpdate;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[lj],...r,n[0].table[lj],...i];return e??`${a.join(`_`)}_fk`}};function fj(e,...t){return e(...t)}function pj(e,t){return`${e[lj]}_${t.join(`_`)}_unique`}function mj(e,t,n){for(let r=t;rArray.isArray(e)?_j(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var vj=class extends cj{foreignKeyConfigs=[];static[X]=`PgColumnBuilder`;array(e){return new xj(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})=>fj((n,r)=>{let i=new uj(()=>{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 bj(e,this.config)}},yj=class extends sj{constructor(e,t){t.uniqueName||=pj(e,[t.name]),super(e,t),this.table=e}static[X]=`PgColumn`},bj=class extends yj{static[X]=`ExtraConfigColumn`;getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??`asc`,nulls:this.config.nulls??`last`,opClass:this.config.opClass};defaultConfig={order:`asc`,nulls:`last`,opClass:void 0};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}},xj=class extends vj{static[X]=`PgArrayBuilder`;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 Sj(e,this.config,t)}},Sj=class e extends yj{constructor(e,t,n,r){super(e,t),this.baseColumn=n,this.range=r,this.size=t.size}size;static[X]=`PgArray`;getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==`number`?this.size:``}]`}mapFromDriverValue(e){return typeof e==`string`&&(e=gj(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(t,n=!1){let r=t.map(t=>t===null?null:Z(this.baseColumn,e)?this.baseColumn.mapToDriverValue(t,!0):this.baseColumn.mapToDriverValue(t));return n?r:_j(r)}};const Cj=Symbol.for(`drizzle:isPgEnum`);function wj(e){return!!e&&typeof e==`function`&&Cj in e&&e[Cj]===!0}var Tj=class{static[X]=`Subquery`;constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},Ej=class extends Tj{static[X]=`WithSubquery`},Dj=`0.44.4`;let Oj,kj;const Aj={startActiveSpan(e,t){return Oj?(kj||=Oj.trace.getTracer(`drizzle-orm`,Dj),fj((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()}}),Oj,kj)):t()}},jj=Symbol.for(`drizzle:ViewBaseConfig`),Mj=Symbol.for(`drizzle:Schema`),Nj=Symbol.for(`drizzle:Columns`),Pj=Symbol.for(`drizzle:ExtraConfigColumns`),Fj=Symbol.for(`drizzle:OriginalName`),Ij=Symbol.for(`drizzle:BaseName`),Lj=Symbol.for(`drizzle:IsAlias`),Rj=Symbol.for(`drizzle:ExtraConfigBuilder`),zj=Symbol.for(`drizzle:IsDrizzleTable`);var Q=class{static[X]=`Table`;static Symbol={Name:lj,Schema:Mj,OriginalName:Fj,Columns:Nj,ExtraConfigColumns:Pj,BaseName:Ij,IsAlias:Lj,ExtraConfigBuilder:Rj};[lj];[Fj];[Mj];[Nj];[Pj];[Ij];[Lj]=!1;[zj]=!0;[Rj]=void 0;constructor(e,t,n){this[lj]=this[Fj]=e,this[Mj]=t,this[Ij]=n}};function Bj(e){return e[lj]}function Vj(e){return`${e[Mj]??`public`}.${e[lj]}`}function Hj(e){return e!=null&&typeof e.getSQL==`function`}function Uj(e){let t={sql:``,params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||=[],t.typings.push(...n.typings));return t}var Wj=class{static[X]=`StringChunk`;value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new Gj([this])}},Gj=class e{constructor(e){this.queryChunks=e;for(let t of e)if(Z(t,Q)){let e=t[Q.Symbol.Schema];this.usedTables.push(e===void 0?t[Q.Symbol.Name]:e+`.`+t[Q.Symbol.Name])}}static[X]=`SQL`;decoder=Jj;shouldInlineParams=!1;usedTables=[];append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return Aj.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(t,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 Uj(t.map(t=>{if(Z(t,Wj))return{sql:t.value.join(``),params:[]};if(Z(t,Kj))return{sql:a(t.value),params:[]};if(t===void 0)return{sql:``,params:[]};if(Array.isArray(t)){let e=[new Wj(`(`)];for(let[n,r]of t.entries())e.push(r),ne},Yj={mapToDriverValue:e=>e};({...Jj,...Yj});var Xj=class{constructor(e,t=Yj){this.value=e,this.encoder=t}static[X]=`Param`;brand;getSQL(){return new Gj([this])}};function $(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new Wj(e[0]));for(let[r,i]of t.entries())n.push(i,new Wj(e[r+1]));return new Gj(n)}(e=>{function t(){return new Gj([])}e.empty=t;function n(e){return new Gj(e)}e.fromList=n;function r(e){return new Gj([new Wj(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 Gj(n)}e.join=i;function a(e){return new Kj(e)}e.identifier=a;function o(e){return new Zj(e)}e.placeholder=o;function s(e,t){return new Xj(e,t)}e.param=s})($||={}),(e=>{class t{constructor(e,t){this.sql=e,this.fieldAlias=t}static[X]=`SQL.Aliased`;isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(Gj||={});var Zj=class{constructor(e){this.name=e}static[X]=`Placeholder`;getSQL(){return new Gj([this])}};function Qj(e,t){return e.map(e=>{if(Z(e,Zj)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(Z(e,Xj)&&Z(e.value,Zj)){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 $j=Symbol.for(`drizzle:IsDrizzleView`);var eM=class{static[X]=`View`;[jj];[$j]=!0;constructor({name:e,schema:t,selectedFields:n,query:r}){this[jj]={name:e,originalName:e,schema:t,selectedFields:n,query:r,isExisting:!r,isAlias:!1}}getSQL(){return new Gj([this])}};sj.prototype.getSQL=function(){return new Gj([this])},Q.prototype.getSQL=function(){return new Gj([this])},Tj.prototype.getSQL=function(){return new Gj([this])};var tM=class{constructor(e){this.table=e}static[X]=`ColumnAliasProxyHandler`;get(e,t){return t===`table`?this.table:e[t]}},nM=class{constructor(e,t){this.alias=e,this.replaceOriginalName=t}static[X]=`TableAliasProxyHandler`;get(e,t){if(t===Q.Symbol.IsAlias)return!0;if(t===Q.Symbol.Name||this.replaceOriginalName&&t===Q.Symbol.OriginalName)return this.alias;if(t===jj)return{...e[jj],name:this.alias,isAlias:!0};if(t===Q.Symbol.Columns){let t=e[Q.Symbol.Columns];if(!t)return t;let n={};return Object.keys(t).map(r=>{n[r]=new Proxy(t[r],new tM(new Proxy(e,this)))}),n}let n=e[t];return Z(n,sj)?new Proxy(n,new tM(new Proxy(e,this))):n}};function rM(e,t){return new Proxy(e,new nM(t,!1))}function iM(e,t){return new Proxy(e,new tM(new Proxy(e.table,new nM(t,!1))))}function aM(e,t){return new Gj.Aliased(oM(e.sql,t),e.fieldAlias)}function oM(e,t){return $.join(e.queryChunks.map(e=>Z(e,sj)?iM(e,t):Z(e,Gj)?oM(e,t):Z(e,Gj.Aliased)?aM(e,t):e))}var sM=class extends Error{static[X]=`DrizzleError`;constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},cM=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)}},lM=class extends sM{static[X]=`TransactionRollbackError`;constructor(){super({message:`Rollback`})}},uM=class{static[X]=`ConsoleLogWriter`;write(e){console.log(e)}},dM=class{static[X]=`DefaultLogger`;writer;constructor(e){this.writer=e?.writer??new uM}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}`)}},fM=class{static[X]=`NoopLogger`;logQuery(){}},pM=class{static[X]=`QueryPromise`;[Symbol.toStringTag]=`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)}};function mM(e,t){return Object.entries(e).reduce((e,[n,r])=>{if(typeof n!=`string`)return e;let i=t?[...t,n]:[n];return Z(r,sj)||Z(r,Gj)||Z(r,Gj.Aliased)?e.push({path:i,field:r}):Z(r,Q)?e.push(...mM(r[Q.Symbol.Columns],i)):e.push(...mM(r,i)),e},[])}function hM(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 gM(e,t){let n=Object.entries(t).filter(([,e])=>e!==void 0).map(([t,n])=>Z(n,Gj)||Z(n,sj)?[t,n]:[t,new Xj(n,e[Q.Symbol.Columns][t])]);if(n.length===0)throw Error(`No values to set`);return Object.fromEntries(n)}function _M(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 vM(e){return e[Q.Symbol.Columns]}function yM(e){return Z(e,Tj)?e._.alias:Z(e,eM)?e[jj].name:Z(e,Gj)?void 0:e[Q.Symbol.IsAlias]?e[Q.Symbol.Name]:e[Q.Symbol.BaseName]}function bM(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 xM=class extends yj{static[X]=`PgDate`;getSQLType(){return`date`}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}},SM=class extends yj{static[X]=`PgDateString`;getSQLType(){return`date`}},CM=class extends yj{static[X]=`PgJson`;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}},wM=class extends yj{static[X]=`PgJsonb`;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}},TM=class extends yj{static[X]=`PgNumeric`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.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})`}},EM=class extends yj{static[X]=`PgTime`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`time${e}${this.withTimezone?` with time zone`:``}`}},DM=class extends yj{static[X]=`PgTimestamp`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=this.precision===void 0?``:` (${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}mapFromDriverValue=e=>new Date(this.withTimezone?e:e+`+0000`);mapToDriverValue=e=>e.toISOString()},OM=class extends yj{static[X]=`PgTimestampString`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},kM=class extends yj{static[X]=`PgUUID`;getSQLType(){return`uuid`}};const AM=Symbol.for(`drizzle:PgInlineForeignKeys`),jM=Symbol.for(`drizzle:EnableRLS`);var MM=class extends Q{static[X]=`PgTable`;static Symbol=Object.assign({},Q.Symbol,{InlineForeignKeys:AM,EnableRLS:jM});[AM]=[];[jM]=!1;[Q.Symbol.ExtraConfigBuilder]=void 0;[Q.Symbol.ExtraConfigColumns]={}},NM=class{static[X]=`PgPrimaryKeyBuilder`;columns;name;constructor(e,t){this.columns=e,this.name=t}build(e){return new PM(e,this.columns,this.name)}},PM=class{constructor(e,t,n){this.table=e,this.columns=t,this.name=n}static[X]=`PgPrimaryKey`;columns;name;getName(){return this.name??`${this.table[MM.Symbol.Name]}_${this.columns.map(e=>e.name).join(`_`)}_pk`}};function FM(e,t){return qj(t)&&!Hj(e)&&!Z(e,Xj)&&!Z(e,Zj)&&!Z(e,sj)&&!Z(e,Q)&&!Z(e,eM)?new Xj(e,t):e}const IM=(e,t)=>$`${e} = ${FM(t,e)}`,LM=(e,t)=>$`${e} <> ${FM(t,e)}`;function RM(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Gj(t):new Gj([new Wj(`(`),$.join(t,new Wj(` and `)),new Wj(`)`)])}function zM(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Gj(t):new Gj([new Wj(`(`),$.join(t,new Wj(` or `)),new Wj(`)`)])}function BM(e){return $`not ${e}`}const VM=(e,t)=>$`${e} > ${FM(t,e)}`,HM=(e,t)=>$`${e} >= ${FM(t,e)}`,UM=(e,t)=>$`${e} < ${FM(t,e)}`,WM=(e,t)=>$`${e} <= ${FM(t,e)}`;function GM(e,t){return Array.isArray(t)?t.length===0?$`false`:$`${e} in ${t.map(t=>FM(t,e))}`:$`${e} in ${FM(t,e)}`}function KM(e,t){return Array.isArray(t)?t.length===0?$`true`:$`${e} not in ${t.map(t=>FM(t,e))}`:$`${e} not in ${FM(t,e)}`}function qM(e){return $`${e} is null`}function JM(e){return $`${e} is not null`}function YM(e){return $`exists ${e}`}function XM(e){return $`not exists ${e}`}function ZM(e,t,n){return $`${e} between ${FM(t,e)} and ${FM(n,e)}`}function QM(e,t,n){return $`${e} not between ${FM(t,e)} and ${FM(n,e)}`}function $M(e,t){return $`${e} like ${t}`}function eN(e,t){return $`${e} not like ${t}`}function tN(e,t){return $`${e} ilike ${t}`}function nN(e,t){return $`${e} not ilike ${t}`}function rN(e){return $`${e} asc`}function iN(e){return $`${e} desc`}var aN=class{constructor(e,t,n){this.sourceTable=e,this.referencedTable=t,this.relationName=n,this.referencedTableName=t[Q.Symbol.Name]}static[X]=`Relation`;referencedTableName;fieldName},oN=class{constructor(e,t){this.table=e,this.config=t}static[X]=`Relations`},sN=class e extends aN{constructor(e,t,n,r){super(e,t,n?.relationName),this.config=n,this.isNullable=r}static[X]=`One`;withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config,this.isNullable);return n.fieldName=t,n}},cN=class e extends aN{constructor(e,t,n){super(e,t,n?.relationName),this.config=n}static[X]=`Many`;withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config);return n.fieldName=t,n}};function lN(){return{and:RM,between:ZM,eq:IM,exists:YM,gt:VM,gte:HM,ilike:tN,inArray:GM,isNull:qM,isNotNull:JM,like:$M,lt:UM,lte:WM,ne:LM,not:BM,notBetween:QM,notExists:XM,notLike:eN,notIlike:nN,notInArray:KM,or:zM,sql:$}}function uN(){return{sql:$,asc:rN,desc:iN}}function dN(e,t){Object.keys(e).length===1&&`default`in e&&!Z(e.default,Q)&&(e=e.default);let n={},r={},i={};for(let[a,o]of Object.entries(e))if(Z(o,Q)){let e=Vj(o),t=r[e];n[e]=a,i[a]={tsName:a,dbName:o[Q.Symbol.Name],schema:o[Q.Symbol.Schema],columns:o[Q.Symbol.Columns],relations:t?.relations??{},primaryKey:t?.primaryKey??[]};for(let e of Object.values(o[Q.Symbol.Columns]))e.primary&&i[a].primaryKey.push(e);let s=o[Q.Symbol.ExtraConfigBuilder]?.(o[Q.Symbol.ExtraConfigColumns]);if(s)for(let e of Object.values(s))Z(e,NM)&&i[a].primaryKey.push(...e.columns)}else if(Z(o,oN)){let e=Vj(o.table),a=n[e],s=o.config(t(o.table)),c;for(let[t,n]of Object.entries(s))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 fN(e){return function(t,n){return new sN(e,t,n,n?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)}}function pN(e){return function(t,n){return new cN(e,t,n)}}function mN(e,t,n){if(Z(n,sN)&&n.config)return{fields:n.config.fields,references:n.config.references};let r=t[Vj(n.referencedTable)];if(!r)throw Error(`Table "${n.referencedTable[Q.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[Vj(a)];if(!o)throw Error(`Table "${a[Q.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[Q.Symbol.Name]}". Please specify relation name`);if(s[0]&&Z(s[0],sN)&&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 hN(e){return{one:fN(e),many:pN(e)}}function gN(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]=Z(r,sN)?l&&gN(e,e[s.relationTableTsKey],l,s.selection,i):l.map(t=>gN(e,e[s.relationTableTsKey],t,s.selection,i))}else{let e=i(n[o]),t=s.field,r;r=Z(t,sj)?t:Z(t,Gj)?t.decoder:t.sql.decoder,a[s.tsKey]=e===null?null:r.mapFromDriverValue(e)}return a}var _N=class e{static[X]=`SelectionProxyHandler`;config;constructor(e){this.config={...e}}get(t,n){if(n===`_`)return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(n===jj)return{...t[jj],selectedFields:new Proxy(t[jj].selectedFields,this)};if(typeof n==`symbol`)return t[n];let r=Z(t,Tj)?t._.selectedFields:Z(t,eM)?t[jj].selectedFields:t,i=r[n];if(Z(i,Gj.Aliased)){if(this.config.sqlAliasedBehavior===`sql`&&!i.isSelectionField)return i.sql;let e=i.clone();return e.isSelectionField=!0,e}if(Z(i,Gj)){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 Z(i,sj)?this.config.alias?new Proxy(i,new tM(new Proxy(i.table,new nM(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!=`object`||!i?i:new Proxy(i,new e(this.config))}};function vN(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 yN(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 bN(e){return e}var xN=class{static[X]=`CasingCache`;cache={};cachedTables={};convert;constructor(e){this.convert=e===`snake_case`?vN:e===`camelCase`?yN:bN}getColumnCasing(e){if(!e.keyAsName)return e.name;let t=e.table[Q.Symbol.Schema]??`public`,n=e.table[Q.Symbol.OriginalName],r=`${t}.${n}.${e.name}`;return this.cache[r]||this.cacheTable(e.table),this.cache[r]}cacheTable(e){let t=e[Q.Symbol.Schema]??`public`,n=e[Q.Symbol.OriginalName],r=`${t}.${n}`;if(!this.cachedTables[r]){for(let t of Object.values(e[Q.Symbol.Columns])){let e=`${r}.${t.name}`;this.cache[e]=this.convert(t.name)}this.cachedTables[r]=!0}}clearCache(){this.cache={},this.cachedTables={}}},SN=class extends eM{static[X]=`PgViewBase`},CN=class{static[X]=`PgDialect`;casing;constructor(e){this.casing=new xN(e?.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)t[e]!==void 0||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(Z(e,Gj.Aliased)&&e.isSelectionField)i.push($.identifier(e.fieldAlias));else if(Z(e,Gj.Aliased)||Z(e,Gj)){let n=Z(e,Gj.Aliased)?e.sql:e;t?i.push(new Gj(n.queryChunks.map(e=>Z(e,yj)?$.identifier(this.casing.getColumnCasing(e)):e))):i.push(n),Z(e,Gj.Aliased)&&i.push($` as ${$.identifier(e.fieldAlias)}`)}else Z(e,sj)&&(t?i.push($.identifier(this.casing.getColumnCasing(e))):i.push(e));return ro?.some(({alias:t})=>t===(e[Q.Symbol.IsAlias]?Bj(e):e[Q.Symbol.BaseName])))(e.field.table)){let t=Bj(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(Z(t,yj))e.push($.identifier(t.name));else if(Z(t,Gj)){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[Q.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;Z(e,Gj)?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||Z(i,Xj)&&i.value===void 0)if(t.defaultFn!==void 0){let e=t.defaultFn(),n=Z(e,Gj)?e:$.param(e,t);r.push(n)}else if(!t.default&&t.onUpdateFn!==void 0){let e=t.onUpdateFn(),n=Z(e,Gj)?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:iM(t,o),relationTableTsKey:void 0,isJson:!1,selection:[]}))}else{let r=Object.fromEntries(Object.entries(i.columns).map(([e,t])=>[e,iM(t,o)]));if(a.where){let e=typeof a.where==`function`?a.where(r,lN()):a.where;p=e&&oM(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=>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:aM(t,o)})}for(let{tsKey:e,value:t}of s)l.push({dbKey:Z(t,Gj.Aliased)?t.fieldAlias:i.columns[e].name,tsKey:e,field:Z(t,sj)?iM(t,o):t,relationTableTsKey:void 0,isJson:!1,selection:[]});let _=typeof a.orderBy==`function`?a.orderBy(r,uN()):a.orderBy??[];Array.isArray(_)||(_=[_]),f=_.map(e=>Z(e,sj)?iM(e,o):oM(e,o)),u=a.limit,d=a.offset;for(let{tsKey:r,queryConfig:i,relation:a}of h){let s=mN(t,n,a),c=Vj(a.referencedTable),u=n[c],d=`${o}_${r}`,f=RM(...s.fields.map((e,t)=>IM(iM(s.references[t],d),iM(e,o)))),p=this.buildRelationalQueryWithoutPK({fullSchema:e,schema:t,tableNamesMap:n,table:e[u],tableConfig:t[u],queryConfig:Z(a,sN)?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 Tj(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 sM({message:`No fields selected for table "${i.tsName}" ("${o}")`});let h;if(p=RM(c,p),s){let e=$`json_build_array(${$.join(l.map(({field:e,tsKey:t,isJson:n})=>n?$`${$.identifier(`${o}_${t}`)}.${$.identifier(`data`)}`:Z(e,Gj.Aliased)?e.sql:e),$`, `)})`;Z(s,cN)&&(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:rM(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=rM(r,o),h=this.buildSelectQuery({table:Z(h,MM)?h:new Tj(h,{},o),fields:{},fieldsFlat:t.map(({field:e})=>({path:[],field:Z(e,sj)?iM(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]})}else h=this.buildSelectQuery({table:rM(r,o),fields:{},fieldsFlat:l.map(({field:e})=>({path:[],field:Z(e,sj)?iM(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]});return{tableTsKey:i.tsName,sql:h,selection:l}}},wN=class{static[X]=`TypedQueryBuilder`;getSelectedFields(){return this._.selectedFields}},TN=class{static[X]=`PgSelectBuilder`;fields;session;dialect;withList=[];distinct;constructor(e){this.fields=e.fields,this.session=e.session,this.dialect=e.dialect,e.withList&&(this.withList=e.withList),this.distinct=e.distinct}authToken;setToken(e){return this.authToken=e,this}from(e){let t=!!this.fields,n=e,r;return r=this.fields?this.fields:Z(n,Tj)?Object.fromEntries(Object.keys(n._.selectedFields).map(e=>[e,n[e]])):Z(n,SN)?n[jj].selectedFields:Z(n,Gj)?{}:vM(n),new DN({table:n,fields:r,isPartialSelect:t,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}},EN=class extends wN{static[X]=`PgSelectQueryBuilder`;_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:e,fields:t,isPartialSelect:n,session:r,dialect:i,withList:a,distinct:o}){super(),this.config={withList:a,table:e,fields:{...t},distinct:o,setOperators:[]},this.isPartialSelect=n,this.session=r,this.dialect=i,this._={selectedFields:t,config:this.config},this.tableName=yM(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{};for(let t of LN(e))this.usedTables.add(t)}getUsedTables(){return[...this.usedTables]}createJoin(e,t){return(n,r)=>{let i=this.tableName,a=yM(n);for(let e of LN(n))this.usedTables.add(e);if(typeof a==`string`&&this.config.joins?.some(e=>e.alias===a))throw Error(`Alias "${a}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof i==`string`&&(this.config.fields={[i]:this.config.fields}),typeof a==`string`&&!Z(n,Gj))){let e=Z(n,Tj)?n._.selectedFields:Z(n,eM)?n[jj].selectedFields:n[Q.Symbol.Columns];this.config.fields[a]=e}if(typeof r==`function`&&(r=r(new Proxy(this.config.fields,new _N({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:r,table:n,joinType:e,alias:a,lateral:t}),typeof a==`string`)switch(e){case`left`:this.joinsNotNullableMap[a]=!1;break;case`right`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[a]=!0;break;case`cross`:case`inner`:this.joinsNotNullableMap[a]=!0;break;case`full`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[a]=!1;break}return this}}leftJoin=this.createJoin(`left`,!1);leftJoinLateral=this.createJoin(`left`,!0);rightJoin=this.createJoin(`right`,!1);innerJoin=this.createJoin(`inner`,!1);innerJoinLateral=this.createJoin(`inner`,!0);fullJoin=this.createJoin(`full`,!1);crossJoin=this.createJoin(`cross`,!1);crossJoinLateral=this.createJoin(`cross`,!0);createSetOperator(e,t){return n=>{let r=typeof n==`function`?n(kN()):n;if(!hM(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}}union=this.createSetOperator(`union`,!1);unionAll=this.createSetOperator(`union`,!0);intersect=this.createSetOperator(`intersect`,!1);intersectAll=this.createSetOperator(`intersect`,!0);except=this.createSetOperator(`except`,!1);exceptAll=this.createSetOperator(`except`,!0);addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new _N({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.where=e,this}having(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new _N({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 _N({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 _N({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(...LN(this.config.table)),this.config.joins)for(let e of this.config.joins)t.push(...LN(e.table));return new Proxy(new Tj(this.getSQL(),this.config.fields,e,!1,[...new Set(t)]),new _N({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`}))}getSelectedFields(){return new Proxy(this.config.fields,new _N({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}},DN=class extends EN{static[X]=`PgSelect`;_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 Aj.startActiveSpan(`drizzle.prepareQuery`,()=>{let n=mM(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)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))};_M(DN,[pM]);function ON(e,t){return(n,r,...i)=>{let a=[r,...i].map(n=>({type:e,isAll:t,rightSelect:n}));for(let e of a)if(!hM(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 kN=()=>({union:AN,unionAll:jN,intersect:MN,intersectAll:NN,except:PN,exceptAll:FN}),AN=ON(`union`,!1),jN=ON(`union`,!0),MN=ON(`intersect`,!1),NN=ON(`intersect`,!0),PN=ON(`except`,!1),FN=ON(`except`,!0);var IN=class{static[X]=`PgQueryBuilder`;dialect;dialectConfig;constructor(e){this.dialect=Z(e,CN)?e:void 0,this.dialectConfig=Z(e,CN)?void 0:e}$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(n)),new Proxy(new Ej(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new _N({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};with(...e){let t=this;function n(n){return new TN({fields:n??void 0,session:void 0,dialect:t.getDialect(),withList:e})}function r(e){return new TN({fields:e??void 0,session:void 0,dialect:t.getDialect(),distinct:!0})}function i(e,n){return new TN({fields:n??void 0,session:void 0,dialect:t.getDialect(),distinct:{on:e}})}return{select:n,selectDistinct:r,selectDistinctOn:i}}select(e){return new TN({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new TN({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(e,t){return new TN({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:e}})}getDialect(){return this.dialect||=new CN(this.dialectConfig),this.dialect}};function LN(e){return Z(e,MM)?[e[Mj]?`${e[Mj]}.${e[Q.Symbol.BaseName]}`:e[Q.Symbol.BaseName]]:Z(e,Tj)?e._.usedTables??[]:Z(e,Gj)?e.usedTables??[]:[]}var RN=class extends pM{constructor(e,t,n,r){super(),this.session=t,this.dialect=n,this.config={table:e,withList:r}}static[X]=`PgDelete`;config;cacheConfig;where(e){return this.config.where=e,this}returning(e=this.config.table[Q.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=mM(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return Aj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`delete`,tables:LN(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new _N({alias:Bj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},zN=class{constructor(e,t,n,r,i){this.table=e,this.session=t,this.dialect=n,this.withList=r,this.overridingSystemValue_=i}static[X]=`PgInsertBuilder`;authToken;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[Q.Symbol.Columns];for(let r of Object.keys(e)){let i=e[r];t[r]=Z(i,Gj)?i:new Xj(i,n[r])}return t});return new BN(this.table,t,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(e){let t=typeof e==`function`?e(new IN):e;if(!Z(t,Gj)&&!hM(this.table[Nj],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 BN(this.table,t,this.session,this.dialect,this.withList,!0)}},BN=class extends pM{constructor(e,t,n,r,i,a,o){super(),this.session=n,this.dialect=r,this.config={table:e,values:t,withList:i,select:a,overridingSystemValue_:o}}static[X]=`PgInsert`;config;cacheConfig;returning(e=this.config.table[Q.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=mM(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,gM(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 Aj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:LN(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new _N({alias:Bj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},VN=class extends pM{constructor(e,t,n){super(),this.session=t,this.dialect=n,this.config={view:e}}static[X]=`PgRefreshMaterializedView`;config;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 Aj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))},HN=class{constructor(e,t,n,r){this.table=e,this.session=t,this.dialect=n,this.withList=r}static[X]=`PgUpdateBuilder`;authToken;setToken(e){return this.authToken=e,this}set(e){return new UN(this.table,gM(this.table,e),this.session,this.dialect,this.withList).setToken(this.authToken)}},UN=class extends pM{constructor(e,t,n,r,i){super(),this.session=n,this.dialect=r,this.config={set:t,table:e,withList:i,joins:[]},this.tableName=yM(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{}}static[X]=`PgUpdate`;config;tableName;joinsNotNullableMap;cacheConfig;from(e){let t=e,n=yM(t);return typeof n==`string`&&(this.joinsNotNullableMap[n]=!0),this.config.from=t,this}getTableLikeFields(e){return Z(e,MM)?e[Q.Symbol.Columns]:Z(e,Tj)?e._.selectedFields:e[jj].selectedFields}createJoin(e){return(t,n)=>{let r=yM(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&&!Z(this.config.from,Gj)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[Q.Symbol.Columns],new _N({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})),e&&new Proxy(e,new _N({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}}leftJoin=this.createJoin(`left`);rightJoin=this.createJoin(`right`);innerJoin=this.createJoin(`inner`);fullJoin=this.createJoin(`full`);where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[Q.Symbol.Columns]),this.config.from)){let t=yM(this.config.from);if(typeof t==`string`&&this.config.from&&!Z(this.config.from,Gj)){let n=this.getTableLikeFields(this.config.from);e[t]=n}for(let t of this.config.joins){let n=yM(t.table);if(typeof n==`string`&&!Z(t.table,Gj)){let r=this.getTableLikeFields(t.table);e[n]=r}}}return this.config.returningFields=e,this.config.returning=mM(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:LN(this.config.table)},this.cacheConfig);return t.joinsNotNullableMap=this.joinsNotNullableMap,t}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>this._prepare().execute(e,this.authToken);getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new _N({alias:Bj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},WN=class e extends Gj{constructor(t){super(e.buildEmbeddedCount(t.source,t.filters).queryChunks),this.params=t,this.mapWith(Number),this.session=t.session,this.sql=e.buildCount(t.source,t.filters)}sql;token;static[X]=`PgCountBuilder`;[Symbol.toStringTag]=`PgCountBuilder`;session;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})}},GN=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}static[X]=`PgRelationalQueryBuilder`;findMany(e){return new KN(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},`many`)}findFirst(e){return new KN(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},`first`)}},KN=class extends pM{constructor(e,t,n,r,i,a,o,s,c){super(),this.fullSchema=e,this.schema=t,this.tableNamesMap=n,this.table=r,this.tableConfig=i,this.dialect=a,this.session=o,this.config=s,this.mode=c}static[X]=`PgRelationalQuery`;_prepare(e){return Aj.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=>gN(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}authToken;setToken(e){return this.authToken=e,this}execute(){return Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(void 0,this.authToken))}},qN=class extends pM{constructor(e,t,n,r){super(),this.execute=e,this.sql=t,this.query=n,this.mapBatchResult=r}static[X]=`PgRaw`;getSQL(){return this.sql}getQuery(){return this.query}mapResult(e,t){return t?this.mapBatchResult(e):e}_prepare(){return this}isResponseInArrayMode(){return!1}},JN=class{constructor(e,t,n){if(this.dialect=e,this.session=t,this._=n?{schema:n.schema,fullSchema:n.fullSchema,tableNamesMap:n.tableNamesMap,session:t}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:t},this.query={},this._.schema)for(let[r,i]of Object.entries(this._.schema))this.query[r]=new GN(n.fullSchema,this._.schema,this._.tableNamesMap,n.fullSchema[r],i,e,t);this.$cache={invalidate:async e=>{}}}static[X]=`PgDatabase`;query;$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(new IN(n.dialect))),new Proxy(new Ej(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new _N({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};$count(e,t){return new WN({source:e,filters:t,session:this.session})}$cache;with(...e){let t=this;function n(n){return new TN({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e})}function r(n){return new TN({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})}function i(n,r){return new TN({fields:r??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:{on:n}})}function a(n){return new HN(n,t.session,t.dialect,e)}function o(n){return new zN(n,t.session,t.dialect,e)}function s(n){return new RN(n,t.session,t.dialect,e)}return{select:n,selectDistinct:r,selectDistinctOn:i,update:a,insert:o,delete:s}}select(e){return new TN({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new TN({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(e,t){return new TN({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:{on:e}})}update(e){return new HN(e,this.session,this.dialect)}insert(e){return new zN(e,this.session,this.dialect)}delete(e){return new RN(e,this.session,this.dialect)}refreshMaterializedView(e){return new VN(e,this.session,this.dialect)}authToken;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 qN(()=>r.execute(void 0,this.authToken),t,n,e=>r.mapResult(e,!0))}transaction(e,t){return this.session.transaction(e,t)}},YN=class{static[X]=`Cache`},XN=class extends YN{strategy(){return`all`}static[X]=`NoopCache`;async get(e){}async put(e,t,n,r){}async onMutate(e){}};async function ZN(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 QN=class{constructor(e,t,n,r){this.query=e,this.cache=t,this.queryMetadata=n,this.cacheConfig=r,t&&t.strategy()===`all`&&r===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),this.cacheConfig?.enable||(this.cacheConfig=void 0)}authToken;getQuery(){return this.query}mapResult(e,t){return e}setToken(e){return this.authToken=e,this}static[X]=`PgPreparedQuery`;joinsNotNullableMap;async queryWithCache(e,t,n){if(this.cache===void 0||Z(this.cache,XN)||this.queryMetadata===void 0)try{return await n()}catch(n){throw new cM(e,t,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await n()}catch(n){throw new cM(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 cM(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new cM(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await ZN(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 cM(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await ZN(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 cM(e,t,n)}}},$N=class{constructor(e){this.dialect=e}static[X]=`PgSession`;execute(e,t){return Aj.startActiveSpan(`drizzle.operation`,()=>{let n=Aj.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)}},eP=class extends JN{constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}static[X]=`PgTransaction`;rollback(){throw new lM}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)}`)}};function tP(e){return typeof e==`string`&&/^true$/i.test(e)}function nP(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&&tP(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case rj.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:rj.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&tP(e)&&{accessMode:Jx.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var rP=class extends QN{static[X]=`DuckDBWasmPreparedQuery`;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=Qj(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=Qj(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},iP=class e extends $N{static[X]=`DuckDBWasmSession`;logger;constructor(e,t,n,r={}){super(t),this.client=e,this.schema=n,this.options=r,this.logger=r.logger??new fM}prepareQuery(e,t,n,r,i){return new rP(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(t,n){return aj(this.client,async r=>{let i=new e(r,this.dialect,this.schema,this.options),a=new aP(this.dialect,i,this.schema);return n&&await a.setTransaction(n),t(a)})}},aP=class e extends eP{static[X]=`DuckDBWasmTransaction`;dialect;session;constructor(e,t,n,r=0){super(e,t,n,r),this.dialect=e,this.session=t}async transaction(t){return oj(this.session.client,``,async n=>{let r=new iP(n,this.dialect,this.schema,this.session.options),i=new e(this.dialect,r,this.schema);return t(i)})}},oP=class extends JN{static[X]=`DuckDBWasmDatabase`};function sP(e,t={}){let n=new CN({casing:t.casing}),r;t.logger===!0?r=new dM:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=dN(t.schema,hN);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new iP(e,n,i,{logger:r}),o=new oP(n,a,i);return o.$client=e,o}function cP(e,t){let n=nP(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await MA();switch(e){case`browser`:return(await S(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-browser-DIrMeXJ_.js`);return{getImportUrlBundles:e}},__vite__mapDeps([4,5,6]))).getImportUrlBundles();case`node`:return await(await S(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-Dl605kiZ.js`);return{getImportUrlBundles:e}},__vite__mapDeps([7,6]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await MA();switch(e){case`browser`:return(await S(async()=>{let{getBundles:e}=await import(`./default-browser-ZWdN_TIR.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await S(async()=>{let{getBundles:e}=await import(`./default-node-DyYIhEXm.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return sP(ij({bundles:r,logger:n.logger?new tS:void 0,storage:n.storage}),t)}function lP(...e){if(typeof e[0]==`string`)return cP(e[0],e[1]);if(bM(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return sP(n,r);if(typeof t==`string`)return cP(t,r);if(t===void 0)throw Error(`connection option is required`);return sP(ij({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return sP(e[0],e[1])}(function(e){function t(e){return sP({options:{parsers:{},serializers:{}}},e)}e.mock=t})(lP||={});var uP=le({__name:`VRM`,emits:[`loadModelProgress`,`error`],setup(e,{expose:t,emit:n}){let r=n,{x:i,y:a}=fe(),o=je(),{width:s,height:c}=de(o),{selectedModel:l,cameraFOV:u,cameraPosition:d,cameraDistance:f,modelOrigin:p,trackingMode:m,lookAtTarget:h,eyeHeight:g}=C(Be()),_=je(),v=Me(new E),y=je(),b=!0,x=je(!1),S=je(!1),w=je(!1),T=new A,O=new ee;Oe(u,e=>{v.value&&(v.value.fov=e,v.value.updateProjectionMatrix())}),Oe(()=>y.value?.controls,e=>{if(e&&v.value){x.value=!0;let t=()=>{if(b)return;b=!0;let e=v.value.position,t=y.value.controls.getDistance(),n=Math.abs(d.value.x-e.x)>1e-6||Math.abs(d.value.y-e.y)>1e-6||Math.abs(d.value.z-e.z)>1e-6,r=Math.abs(f.value-t)>1e-6;(n||r)&&(d.value={x:e.x,y:e.y,z:e.z},f.value=t),b=!1};e.addEventListener(`change`,t),Te(()=>{e.removeEventListener(`change`,t)})}});function k(){S.value=!0}Oe([x,S],([e,t])=>{if(e&&t&&v.value&&y.value&&y.value.controls){b=!0;try{v.value.aspect=s.value/c.value,v.value.fov=u.value,y.value.setTarget(p.value),v.value.position.set(d.value.x,d.value.y,d.value.z),v.value.updateProjectionMatrix(),y.value.controls.update(),f.value=y.value.controls.getDistance()}finally{b=!1,w.value=!0}}}),Oe(f,e=>{if(!b&&v.value&&y.value&&y.value.controls){b=!0;let t=new te,n=y.value.controls.target,r=new te().subVectors(v.value.position,n).normalize();t.copy(n).addScaledVector(r,e),v.value.position.set(t.x,t.y,t.z),y.value.update(),d.value={x:t.x,y:t.y,z:t.z}}b=!1});function j(e){_.value?.lookAtUpdate(e),h.value=e}function M(e,t){O.x=e/window.innerWidth*2-1,O.y=-(t/window.innerHeight)*2+1,T.setFromCamera(O,v.value);let n=new te;v.value.getWorldDirection(n);let r=new D;r.setFromNormalAndCoplanarPoint(n,v.value.position.clone().add(n.multiplyScalar(1)));let i=new te;T.ray.intersectPlane(r,i),h.value={x:i.x,y:i.y,z:i.z},_.value?.lookAtUpdate(h.value)}return Oe(d,e=>{!w.value||!_.value||m.value===`camera`&&j(e)},{deep:!0}),Oe([i,a],()=>{!w.value||!_.value||m.value===`mouse`&&M(i.value,a.value)}),Oe(m,e=>{!w.value||!_.value||(e===`camera`?j(d.value):e===`mouse`?M(i.value,a.value):h.value={x:0,y:g.value,z:-1e3})}),t({setExpression:e=>{_.value?.setExpression(e)}}),(e,t)=>(Ee(),se(`div`,{ref_key:`vrmContainerRef`,ref:o,w:`100%`,h:`100%`},[v.value?Ae((Ee(),ae(Pe(_e),{key:0,camera:v.value,alpha:!0,antialias:!0,width:Pe(s),height:Pe(c)},{default:ke(()=>[ce(Pe(HP),{ref_key:`controlsRef`,ref:y},null,512),t[2]||=ie(`TresDirectionalLight`,{color:16777215,intensity:1.8,position:[1,1,-10]},null,-1),t[3]||=ie(`TresAmbientLight`,{color:16777215,intensity:1.2},null,-1),(Ee(),ae(Pe(_P),{ref_key:`modelRef`,ref:_,key:Pe(l),model:Pe(l),"idle-animation":`/assets/vrm/animations/idle_loop.vrma`,paused:!1,onLoadModelProgress:t[0]||=e=>r(`loadModelProgress`,e),onModelReady:k,onError:t[1]||=e=>r(`error`,e)},null,8,[`model`])),t[4]||=ie(`TresAxesHelper`,{size:1},null,-1)]),_:1,__:[2,3,4]},8,[`camera`,`width`,`height`])),[[ne,w.value]]):oe(``,!0)],512))}}),dP=uP;const fP={relative:``},pP={"h-full":``,"w-full":``};var mP=le({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:{},xOffset:{},yOffset:{},scale:{default:1}},setup(e){let t=je(),n=je(),{stageView:r,stageViewControlsEnabled:i,live2dDisableFocus:a}=C(Ve()),{mouthOpenSize:o}=C(h()),{audioContext:s,calculateVolume:c}=m(),{onBeforeMessageComposed:l,onBeforeSend:g,onTokenLiteral:x,onTokenSpecial:S,onStreamEnd:w,onAssistantResponseEnd:T}=Ue(),E=Ke(),D=je(),O=je(!1),k=je(!1),A=p({handlers:[e=>new Promise(t=>{let n=s.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(s.destination),n.connect(D.value),O.value=!0,n.start(0),n.onended=()=>{O.value=!1,t()}})]}),j=We(),{ssmlEnabled:M,activeSpeechProvider:ee,activeSpeechModel:te,activeSpeechVoice:N,pitch:ne}=C(j);async function P(e){try{if(!ee.value){console.warn(`No active speech provider configured`);return}if(!N.value){console.warn(`No active speech voice configured`);return}let t=await E.getProviderInstance(ee.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=E.getProviderConfig(ee.value),r=M.value?j.generateSSML(e.data,N.value,{...n,pitch:ne.value}):e.data,i=await Ge({...t.speech(te.value,n),input:r,voice:N.value.id}),a=await s.decodeAudioData(i);await A.add({audioBuffer:a,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let re=p({handlers:[P]});re.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let ce=f(re),{currentMotion:le}=C(He()),ue=p({handlers:[async e=>{if(r.value===`3d`){let t=y[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(le.value={group:v[e.data]})}]}),de=d(ue);de.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let fe=u();fe.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function pe(){requestAnimationFrame(pe),O.value&&(o.value=c(D.value,`linear`))}function me(){k.value||(pe(),s.resume(),k.value=!0)}function he(){D.value||=s.createAnalyser()}return l(async()=>{he(),me()}),g(async()=>{le.value={group:b}}),x(async e=>{await ce.add(e)}),S(async e=>{await fe.add(e),await de.add(e)}),w(async()=>{await fe.add(_)}),T(async e=>{}),Te(()=>{k.value=!1}),we(async()=>{t.value=lP({connection:{bundles:qe()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(e,t)=>(Ee(),se(`div`,fP,[ie(`div`,pP,[Pe(r)===`2d`?(Ee(),ae(If,{key:0,"focus-at":e.focusAt,"mouth-open-size":Pe(o),"min-w":`50% {if(!h.value){console.warn(`Scene is not ready, cannot load VRM model.`);return}try{let e=await n(u.model,{scene:h.value,lookAt:!0,positionOffset:[b.value.x,b.value.y,b.value.z],onProgress:e=>d(`loadModelProgress`,Number((100*e.loaded/e.total).toFixed(2)))});if(!e||!e._vrm){console.warn(`No VRM model loaded`);return}let{_vrm:a,_vrmGroup:o,modelCenter:s,modelSize:c,initialCameraOffset:l}=e;j.value=o,w.value={x:s.x+l.x,y:s.y+l.y,z:s.z+l.z},x.value={x:s.x,y:s.y,z:s.z},S.value={x:c.x,y:c.y,z:c.z};let y=new te(0,0,-1),C=a.lookAt,ee=new O;if(C){let e=C.faceFront;ee.setFromUnitVectors(e.normalize(),y.normalize()),o.quaternion.premultiply(ee),o.updateMatrixWorld(!0)}else console.warn(`No look-at target found in VRM model`);E.value=0;function ne(e){let t=a.humanoid?.getNormalizedBoneNode(`hips`);if(!t){console.warn(`No hips node found in VRM model.`);return}t.updateMatrixWorld(!0);let n=new te;t.getWorldPosition(n);let r=e.tracks.find(e=>e.name.endsWith(`Hips.position`));if(!(r instanceof N)){console.warn(`No Hips.position track of type VectorKeyframeTrack found in animation.`);return}let i=new te(r.values[0],r.values[1],r.values[2]),o=new te().subVectors(i,n);e.tracks.forEach(e=>{if(e.name.endsWith(`.position`)&&e instanceof N)for(let t=0;t{m.value?.update(e),p.value?.update(e),p.value?.lookAt?.update?.(e),_.update(p.value,e),M.update(p.value,D,e),v.value?.update(e)}).off}catch(e){T.value=!1,d(`error`,e)}}),Oe(b,()=>{j.value&&j.value.position.set(b.value.x,b.value.y,b.value.z)},{deep:!0}),Oe(E,e=>{p.value&&j.value&&(j.value.rotation.y=Ce.degToRad(e))}),c({setExpression(e){v.value?.setEmotionWithResetAfter(e,1e3)},scene:re(()=>p.value?.scene),lookAtUpdate(e){M.instantUpdate(p.value,e)}});let{pause:ee,resume:ne}=ve();Oe(()=>u.paused,e=>{e?ee():ne()});function P(){f?.(),p.value&&(p.value.scene.removeFromParent(),s.deepDispose(p.value.scene))}return Te(()=>{P()}),(e,t)=>De(e.$slots,`default`)}}),_P=gP;const vP={type:`change`},yP={type:`start`},bP={type:`end`},xP=new k,SP=new D,CP=Math.cos(70*Ce.DEG2RAD),wP=new te,TP=2*Math.PI,EP={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},DP=1e-6;var OP=class extends xe{constructor(e,t=null){super(e,t),this.state=EP.NONE,this.target=new te,this.cursor=new te,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,BOTTOM:`ArrowDown`},this.mouseButtons={LEFT:Se.ROTATE,MIDDLE:Se.DOLLY,RIGHT:Se.PAN},this.touches={ONE:M.ROTATE,TWO:M.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new te,this._lastQuaternion=new O,this._lastTargetPosition=new te,this._quat=new O().setFromUnitVectors(e.up,new te(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new j,this._sphericalDelta=new j,this._scale=1,this._panOffset=new te,this._rotateStart=new ee,this._rotateEnd=new ee,this._rotateDelta=new ee,this._panStart=new ee,this._panEnd=new ee,this._panDelta=new ee,this._dollyStart=new ee,this._dollyEnd=new ee,this._dollyDelta=new ee,this._dollyDirection=new te,this._mouse=new ee,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=AP.bind(this),this._onPointerDown=kP.bind(this),this._onPointerUp=jP.bind(this),this._onContextMenu=RP.bind(this),this._onMouseWheel=PP.bind(this),this._onKeyDown=FP.bind(this),this._onTouchStart=IP.bind(this),this._onTouchMove=LP.bind(this),this._onMouseDown=MP.bind(this),this._onMouseMove=NP.bind(this),this._interceptControlDown=zP.bind(this),this._interceptControlUp=BP.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener(`pointerdown`,this._onPointerDown),this.domElement.addEventListener(`pointercancel`,this._onPointerUp),this.domElement.addEventListener(`contextmenu`,this._onContextMenu),this.domElement.addEventListener(`wheel`,this._onMouseWheel,{passive:!1});let t=this.domElement.getRootNode();t.addEventListener(`keydown`,this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction=`none`}disconnect(){this.domElement.removeEventListener(`pointerdown`,this._onPointerDown),this.domElement.removeEventListener(`pointermove`,this._onPointerMove),this.domElement.removeEventListener(`pointerup`,this._onPointerUp),this.domElement.removeEventListener(`pointercancel`,this._onPointerUp),this.domElement.removeEventListener(`wheel`,this._onMouseWheel),this.domElement.removeEventListener(`contextmenu`,this._onContextMenu),this.stopListenToKeyEvents();let e=this.domElement.getRootNode();e.removeEventListener(`keydown`,this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction=`auto`}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener(`keydown`,this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener(`keydown`,this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(vP),this.update(),this.state=EP.NONE}update(e=null){let t=this.object.position;wP.copy(t).sub(this.target),wP.applyQuaternion(this._quat),this._spherical.setFromVector3(wP),this.autoRotate&&this.state===EP.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(n)&&isFinite(r)&&(n<-Math.PI?n+=TP:n>Math.PI&&(n-=TP),r<-Math.PI?r+=TP:r>Math.PI&&(r-=TP),n<=r?this._spherical.theta=Math.max(n,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+r)/2?Math.max(n,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let i=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{let e=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),i=e!=this._spherical.radius}if(wP.setFromSpherical(this._spherical),wP.applyQuaternion(this._quatInverse),t.copy(this.target).add(wP),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let e=null;if(this.object.isPerspectiveCamera){let t=wP.length();e=this._clampDistance(t*this._scale);let n=t-e;this.object.position.addScaledVector(this._dollyDirection,n),this.object.updateMatrixWorld(),i=!!n}else if(this.object.isOrthographicCamera){let t=new te(this._mouse.x,this._mouse.y,0);t.unproject(this.object);let n=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),i=n!==this.object.zoom;let r=new te(this._mouse.x,this._mouse.y,0);r.unproject(this.object),this.object.position.sub(r).add(t),this.object.updateMatrixWorld(),e=wP.length()}else console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.`),this.zoomToCursor=!1;e!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(e).add(this.object.position):(xP.origin.copy(this.object.position),xP.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(xP.direction))DP||8*(1-this._lastQuaternion.dot(this.object.quaternion))>DP||this._lastTargetPosition.distanceToSquared(this.target)>DP?(this.dispatchEvent(vP),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e===null?TP/60/60*this.autoRotateSpeed:TP/60*this.autoRotateSpeed*e}_getZoomScale(e){let t=Math.abs(e*.01);return .95**(this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){wP.setFromMatrixColumn(t,0),wP.multiplyScalar(-e),this._panOffset.add(wP)}_panUp(e,t){this.screenSpacePanning===!0?wP.setFromMatrixColumn(t,1):(wP.setFromMatrixColumn(t,0),wP.crossVectors(this.object.up,wP)),wP.multiplyScalar(e),this._panOffset.add(wP)}_pan(e,t){let n=this.domElement;if(this.object.isPerspectiveCamera){let r=this.object.position;wP.copy(r).sub(this.target);let i=wP.length();i*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*i/n.clientHeight,this.object.matrix),this._panUp(2*t*i/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.`),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;let n=this.domElement.getBoundingClientRect(),r=e-n.left,i=t-n.top,a=n.width,o=n.height;this._mouse.x=r/a*2-1,this._mouse.y=-(i/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(TP*this._rotateDelta.x/t.clientHeight),this._rotateUp(TP*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(TP*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-TP*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(TP*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-TP*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateStart.set(n,r)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panStart.set(n,r)}}_handleTouchStartDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);this._dollyStart.set(0,i)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(TP*this._rotateDelta.x/t.clientHeight),this._rotateUp(TP*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panEnd.set(n,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);this._dollyEnd.set(0,i),this._dollyDelta.set(0,(this._dollyEnd.y/this._dollyStart.y)**+this.zoomSpeed),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);let a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t{n.value&&r.value?.domElement&&(i.value=new OP(n.value,r.value.domElement),i.value.enableDamping=!0,i.value.dampingFactor=.5,i.value.mouseButtons={LEFT:Se.ROTATE,MIDDLE:Se.DOLLY,RIGHT:Se.PAN},i.value.touches={ONE:M.ROTATE,TWO:M.DOLLY_PAN},i.value.enablePan=!1,i.value.minDistance=a.value.z,i.value.maxDistance=a.value.z*20,i.value.update(),o.value=i.value.getDistance())}),t({controls:i,getDistance:()=>i.value?.getDistance(),update:()=>i.value?.update(),setTarget:e=>{i.value&&(i.value.target.set(e.x,e.y,e.z),i.value.update())}}),(e,t)=>De(e.$slots,`default`)}}),HP=VP;export{hP as b,dP as c,tA as d,fk as e,ek as f,If as g,Of as h,Df as i,wl as j,Cl as k}; \ No newline at end of file + `;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)t[e]!==void 0||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(Z(e,Gj.Aliased)&&e.isSelectionField)i.push($.identifier(e.fieldAlias));else if(Z(e,Gj.Aliased)||Z(e,Gj)){let n=Z(e,Gj.Aliased)?e.sql:e;t?i.push(new Gj(n.queryChunks.map(e=>Z(e,yj)?$.identifier(this.casing.getColumnCasing(e)):e))):i.push(n),Z(e,Gj.Aliased)&&i.push($` as ${$.identifier(e.fieldAlias)}`)}else Z(e,sj)&&(t?i.push($.identifier(this.casing.getColumnCasing(e))):i.push(e));return ro?.some(({alias:t})=>t===(e[Q.Symbol.IsAlias]?Bj(e):e[Q.Symbol.BaseName])))(e.field.table)){let t=Bj(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(Z(t,yj))e.push($.identifier(t.name));else if(Z(t,Gj)){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[Q.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;Z(e,Gj)?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||Z(i,Xj)&&i.value===void 0)if(t.defaultFn!==void 0){let e=t.defaultFn(),n=Z(e,Gj)?e:$.param(e,t);r.push(n)}else if(!t.default&&t.onUpdateFn!==void 0){let e=t.onUpdateFn(),n=Z(e,Gj)?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:iM(t,o),relationTableTsKey:void 0,isJson:!1,selection:[]}))}else{let r=Object.fromEntries(Object.entries(i.columns).map(([e,t])=>[e,iM(t,o)]));if(a.where){let e=typeof a.where==`function`?a.where(r,lN()):a.where;p=e&&oM(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=>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:aM(t,o)})}for(let{tsKey:e,value:t}of s)l.push({dbKey:Z(t,Gj.Aliased)?t.fieldAlias:i.columns[e].name,tsKey:e,field:Z(t,sj)?iM(t,o):t,relationTableTsKey:void 0,isJson:!1,selection:[]});let _=typeof a.orderBy==`function`?a.orderBy(r,uN()):a.orderBy??[];Array.isArray(_)||(_=[_]),f=_.map(e=>Z(e,sj)?iM(e,o):oM(e,o)),u=a.limit,d=a.offset;for(let{tsKey:r,queryConfig:i,relation:a}of h){let s=mN(t,n,a),c=Vj(a.referencedTable),u=n[c],d=`${o}_${r}`,f=RM(...s.fields.map((e,t)=>IM(iM(s.references[t],d),iM(e,o)))),p=this.buildRelationalQueryWithoutPK({fullSchema:e,schema:t,tableNamesMap:n,table:e[u],tableConfig:t[u],queryConfig:Z(a,sN)?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 Tj(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 sM({message:`No fields selected for table "${i.tsName}" ("${o}")`});let h;if(p=RM(c,p),s){let e=$`json_build_array(${$.join(l.map(({field:e,tsKey:t,isJson:n})=>n?$`${$.identifier(`${o}_${t}`)}.${$.identifier(`data`)}`:Z(e,Gj.Aliased)?e.sql:e),$`, `)})`;Z(s,cN)&&(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:rM(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=rM(r,o),h=this.buildSelectQuery({table:Z(h,MM)?h:new Tj(h,{},o),fields:{},fieldsFlat:t.map(({field:e})=>({path:[],field:Z(e,sj)?iM(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]})}else h=this.buildSelectQuery({table:rM(r,o),fields:{},fieldsFlat:l.map(({field:e})=>({path:[],field:Z(e,sj)?iM(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]});return{tableTsKey:i.tsName,sql:h,selection:l}}},wN=class{static[X]=`TypedQueryBuilder`;getSelectedFields(){return this._.selectedFields}},TN=class{static[X]=`PgSelectBuilder`;fields;session;dialect;withList=[];distinct;constructor(e){this.fields=e.fields,this.session=e.session,this.dialect=e.dialect,e.withList&&(this.withList=e.withList),this.distinct=e.distinct}authToken;setToken(e){return this.authToken=e,this}from(e){let t=!!this.fields,n=e,r;return r=this.fields?this.fields:Z(n,Tj)?Object.fromEntries(Object.keys(n._.selectedFields).map(e=>[e,n[e]])):Z(n,SN)?n[jj].selectedFields:Z(n,Gj)?{}:vM(n),new DN({table:n,fields:r,isPartialSelect:t,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}},EN=class extends wN{static[X]=`PgSelectQueryBuilder`;_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:e,fields:t,isPartialSelect:n,session:r,dialect:i,withList:a,distinct:o}){super(),this.config={withList:a,table:e,fields:{...t},distinct:o,setOperators:[]},this.isPartialSelect=n,this.session=r,this.dialect=i,this._={selectedFields:t,config:this.config},this.tableName=yM(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{};for(let t of LN(e))this.usedTables.add(t)}getUsedTables(){return[...this.usedTables]}createJoin(e,t){return(n,r)=>{let i=this.tableName,a=yM(n);for(let e of LN(n))this.usedTables.add(e);if(typeof a==`string`&&this.config.joins?.some(e=>e.alias===a))throw Error(`Alias "${a}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof i==`string`&&(this.config.fields={[i]:this.config.fields}),typeof a==`string`&&!Z(n,Gj))){let e=Z(n,Tj)?n._.selectedFields:Z(n,eM)?n[jj].selectedFields:n[Q.Symbol.Columns];this.config.fields[a]=e}if(typeof r==`function`&&(r=r(new Proxy(this.config.fields,new _N({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:r,table:n,joinType:e,alias:a,lateral:t}),typeof a==`string`)switch(e){case`left`:this.joinsNotNullableMap[a]=!1;break;case`right`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[a]=!0;break;case`cross`:case`inner`:this.joinsNotNullableMap[a]=!0;break;case`full`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[a]=!1;break}return this}}leftJoin=this.createJoin(`left`,!1);leftJoinLateral=this.createJoin(`left`,!0);rightJoin=this.createJoin(`right`,!1);innerJoin=this.createJoin(`inner`,!1);innerJoinLateral=this.createJoin(`inner`,!0);fullJoin=this.createJoin(`full`,!1);crossJoin=this.createJoin(`cross`,!1);crossJoinLateral=this.createJoin(`cross`,!0);createSetOperator(e,t){return n=>{let r=typeof n==`function`?n(kN()):n;if(!hM(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}}union=this.createSetOperator(`union`,!1);unionAll=this.createSetOperator(`union`,!0);intersect=this.createSetOperator(`intersect`,!1);intersectAll=this.createSetOperator(`intersect`,!0);except=this.createSetOperator(`except`,!1);exceptAll=this.createSetOperator(`except`,!0);addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new _N({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.where=e,this}having(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new _N({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 _N({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 _N({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(...LN(this.config.table)),this.config.joins)for(let e of this.config.joins)t.push(...LN(e.table));return new Proxy(new Tj(this.getSQL(),this.config.fields,e,!1,[...new Set(t)]),new _N({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`}))}getSelectedFields(){return new Proxy(this.config.fields,new _N({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}},DN=class extends EN{static[X]=`PgSelect`;_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 Aj.startActiveSpan(`drizzle.prepareQuery`,()=>{let n=mM(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)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))};_M(DN,[pM]);function ON(e,t){return(n,r,...i)=>{let a=[r,...i].map(n=>({type:e,isAll:t,rightSelect:n}));for(let e of a)if(!hM(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 kN=()=>({union:AN,unionAll:jN,intersect:MN,intersectAll:NN,except:PN,exceptAll:FN}),AN=ON(`union`,!1),jN=ON(`union`,!0),MN=ON(`intersect`,!1),NN=ON(`intersect`,!0),PN=ON(`except`,!1),FN=ON(`except`,!0);var IN=class{static[X]=`PgQueryBuilder`;dialect;dialectConfig;constructor(e){this.dialect=Z(e,CN)?e:void 0,this.dialectConfig=Z(e,CN)?void 0:e}$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(n)),new Proxy(new Ej(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new _N({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};with(...e){let t=this;function n(n){return new TN({fields:n??void 0,session:void 0,dialect:t.getDialect(),withList:e})}function r(e){return new TN({fields:e??void 0,session:void 0,dialect:t.getDialect(),distinct:!0})}function i(e,n){return new TN({fields:n??void 0,session:void 0,dialect:t.getDialect(),distinct:{on:e}})}return{select:n,selectDistinct:r,selectDistinctOn:i}}select(e){return new TN({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new TN({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(e,t){return new TN({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:e}})}getDialect(){return this.dialect||=new CN(this.dialectConfig),this.dialect}};function LN(e){return Z(e,MM)?[e[Mj]?`${e[Mj]}.${e[Q.Symbol.BaseName]}`:e[Q.Symbol.BaseName]]:Z(e,Tj)?e._.usedTables??[]:Z(e,Gj)?e.usedTables??[]:[]}var RN=class extends pM{constructor(e,t,n,r){super(),this.session=t,this.dialect=n,this.config={table:e,withList:r}}static[X]=`PgDelete`;config;cacheConfig;where(e){return this.config.where=e,this}returning(e=this.config.table[Q.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=mM(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return Aj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`delete`,tables:LN(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new _N({alias:Bj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},zN=class{constructor(e,t,n,r,i){this.table=e,this.session=t,this.dialect=n,this.withList=r,this.overridingSystemValue_=i}static[X]=`PgInsertBuilder`;authToken;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[Q.Symbol.Columns];for(let r of Object.keys(e)){let i=e[r];t[r]=Z(i,Gj)?i:new Xj(i,n[r])}return t});return new BN(this.table,t,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(e){let t=typeof e==`function`?e(new IN):e;if(!Z(t,Gj)&&!hM(this.table[Nj],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 BN(this.table,t,this.session,this.dialect,this.withList,!0)}},BN=class extends pM{constructor(e,t,n,r,i,a,o){super(),this.session=n,this.dialect=r,this.config={table:e,values:t,withList:i,select:a,overridingSystemValue_:o}}static[X]=`PgInsert`;config;cacheConfig;returning(e=this.config.table[Q.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=mM(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,gM(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 Aj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:LN(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new _N({alias:Bj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},VN=class extends pM{constructor(e,t,n){super(),this.session=t,this.dialect=n,this.config={view:e}}static[X]=`PgRefreshMaterializedView`;config;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 Aj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))},HN=class{constructor(e,t,n,r){this.table=e,this.session=t,this.dialect=n,this.withList=r}static[X]=`PgUpdateBuilder`;authToken;setToken(e){return this.authToken=e,this}set(e){return new UN(this.table,gM(this.table,e),this.session,this.dialect,this.withList).setToken(this.authToken)}},UN=class extends pM{constructor(e,t,n,r,i){super(),this.session=n,this.dialect=r,this.config={set:t,table:e,withList:i,joins:[]},this.tableName=yM(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{}}static[X]=`PgUpdate`;config;tableName;joinsNotNullableMap;cacheConfig;from(e){let t=e,n=yM(t);return typeof n==`string`&&(this.joinsNotNullableMap[n]=!0),this.config.from=t,this}getTableLikeFields(e){return Z(e,MM)?e[Q.Symbol.Columns]:Z(e,Tj)?e._.selectedFields:e[jj].selectedFields}createJoin(e){return(t,n)=>{let r=yM(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&&!Z(this.config.from,Gj)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[Q.Symbol.Columns],new _N({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})),e&&new Proxy(e,new _N({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}}leftJoin=this.createJoin(`left`);rightJoin=this.createJoin(`right`);innerJoin=this.createJoin(`inner`);fullJoin=this.createJoin(`full`);where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[Q.Symbol.Columns]),this.config.from)){let t=yM(this.config.from);if(typeof t==`string`&&this.config.from&&!Z(this.config.from,Gj)){let n=this.getTableLikeFields(this.config.from);e[t]=n}for(let t of this.config.joins){let n=yM(t.table);if(typeof n==`string`&&!Z(t.table,Gj)){let r=this.getTableLikeFields(t.table);e[n]=r}}}return this.config.returningFields=e,this.config.returning=mM(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:LN(this.config.table)},this.cacheConfig);return t.joinsNotNullableMap=this.joinsNotNullableMap,t}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>this._prepare().execute(e,this.authToken);getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new _N({alias:Bj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},WN=class e extends Gj{constructor(t){super(e.buildEmbeddedCount(t.source,t.filters).queryChunks),this.params=t,this.mapWith(Number),this.session=t.session,this.sql=e.buildCount(t.source,t.filters)}sql;token;static[X]=`PgCountBuilder`;[Symbol.toStringTag]=`PgCountBuilder`;session;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})}},GN=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}static[X]=`PgRelationalQueryBuilder`;findMany(e){return new KN(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},`many`)}findFirst(e){return new KN(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},`first`)}},KN=class extends pM{constructor(e,t,n,r,i,a,o,s,c){super(),this.fullSchema=e,this.schema=t,this.tableNamesMap=n,this.table=r,this.tableConfig=i,this.dialect=a,this.session=o,this.config=s,this.mode=c}static[X]=`PgRelationalQuery`;_prepare(e){return Aj.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=>gN(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}authToken;setToken(e){return this.authToken=e,this}execute(){return Aj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(void 0,this.authToken))}},qN=class extends pM{constructor(e,t,n,r){super(),this.execute=e,this.sql=t,this.query=n,this.mapBatchResult=r}static[X]=`PgRaw`;getSQL(){return this.sql}getQuery(){return this.query}mapResult(e,t){return t?this.mapBatchResult(e):e}_prepare(){return this}isResponseInArrayMode(){return!1}},JN=class{constructor(e,t,n){if(this.dialect=e,this.session=t,this._=n?{schema:n.schema,fullSchema:n.fullSchema,tableNamesMap:n.tableNamesMap,session:t}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:t},this.query={},this._.schema)for(let[r,i]of Object.entries(this._.schema))this.query[r]=new GN(n.fullSchema,this._.schema,this._.tableNamesMap,n.fullSchema[r],i,e,t);this.$cache={invalidate:async e=>{}}}static[X]=`PgDatabase`;query;$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(new IN(n.dialect))),new Proxy(new Ej(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new _N({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};$count(e,t){return new WN({source:e,filters:t,session:this.session})}$cache;with(...e){let t=this;function n(n){return new TN({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e})}function r(n){return new TN({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})}function i(n,r){return new TN({fields:r??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:{on:n}})}function a(n){return new HN(n,t.session,t.dialect,e)}function o(n){return new zN(n,t.session,t.dialect,e)}function s(n){return new RN(n,t.session,t.dialect,e)}return{select:n,selectDistinct:r,selectDistinctOn:i,update:a,insert:o,delete:s}}select(e){return new TN({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new TN({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(e,t){return new TN({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:{on:e}})}update(e){return new HN(e,this.session,this.dialect)}insert(e){return new zN(e,this.session,this.dialect)}delete(e){return new RN(e,this.session,this.dialect)}refreshMaterializedView(e){return new VN(e,this.session,this.dialect)}authToken;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 qN(()=>r.execute(void 0,this.authToken),t,n,e=>r.mapResult(e,!0))}transaction(e,t){return this.session.transaction(e,t)}},YN=class{static[X]=`Cache`},XN=class extends YN{strategy(){return`all`}static[X]=`NoopCache`;async get(e){}async put(e,t,n,r){}async onMutate(e){}};async function ZN(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 QN=class{constructor(e,t,n,r){this.query=e,this.cache=t,this.queryMetadata=n,this.cacheConfig=r,t&&t.strategy()===`all`&&r===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),this.cacheConfig?.enable||(this.cacheConfig=void 0)}authToken;getQuery(){return this.query}mapResult(e,t){return e}setToken(e){return this.authToken=e,this}static[X]=`PgPreparedQuery`;joinsNotNullableMap;async queryWithCache(e,t,n){if(this.cache===void 0||Z(this.cache,XN)||this.queryMetadata===void 0)try{return await n()}catch(n){throw new cM(e,t,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await n()}catch(n){throw new cM(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 cM(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new cM(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await ZN(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 cM(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await ZN(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 cM(e,t,n)}}},$N=class{constructor(e){this.dialect=e}static[X]=`PgSession`;execute(e,t){return Aj.startActiveSpan(`drizzle.operation`,()=>{let n=Aj.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)}},eP=class extends JN{constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}static[X]=`PgTransaction`;rollback(){throw new lM}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)}`)}};function tP(e){return typeof e==`string`&&/^true$/i.test(e)}function nP(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&&tP(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case rj.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:rj.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&tP(e)&&{accessMode:Jx.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var rP=class extends QN{static[X]=`DuckDBWasmPreparedQuery`;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=Qj(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=Qj(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},iP=class e extends $N{static[X]=`DuckDBWasmSession`;logger;constructor(e,t,n,r={}){super(t),this.client=e,this.schema=n,this.options=r,this.logger=r.logger??new fM}prepareQuery(e,t,n,r,i){return new rP(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(t,n){return aj(this.client,async r=>{let i=new e(r,this.dialect,this.schema,this.options),a=new aP(this.dialect,i,this.schema);return n&&await a.setTransaction(n),t(a)})}},aP=class e extends eP{static[X]=`DuckDBWasmTransaction`;dialect;session;constructor(e,t,n,r=0){super(e,t,n,r),this.dialect=e,this.session=t}async transaction(t){return oj(this.session.client,``,async n=>{let r=new iP(n,this.dialect,this.schema,this.session.options),i=new e(this.dialect,r,this.schema);return t(i)})}},oP=class extends JN{static[X]=`DuckDBWasmDatabase`};function sP(e,t={}){let n=new CN({casing:t.casing}),r;t.logger===!0?r=new dM:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=dN(t.schema,hN);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new iP(e,n,i,{logger:r}),o=new oP(n,a,i);return o.$client=e,o}function cP(e,t){let n=nP(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await MA();switch(e){case`browser`:return(await S(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-browser-DIrMeXJ_.js`);return{getImportUrlBundles:e}},__vite__mapDeps([4,5,6]))).getImportUrlBundles();case`node`:return await(await S(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-Dl605kiZ.js`);return{getImportUrlBundles:e}},__vite__mapDeps([7,6]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await MA();switch(e){case`browser`:return(await S(async()=>{let{getBundles:e}=await import(`./default-browser-ZWdN_TIR.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await S(async()=>{let{getBundles:e}=await import(`./default-node-BtQ98lhg.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return sP(ij({bundles:r,logger:n.logger?new tS:void 0,storage:n.storage}),t)}function lP(...e){if(typeof e[0]==`string`)return cP(e[0],e[1]);if(bM(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return sP(n,r);if(typeof t==`string`)return cP(t,r);if(t===void 0)throw Error(`connection option is required`);return sP(ij({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return sP(e[0],e[1])}(function(e){function t(e){return sP({options:{parsers:{},serializers:{}}},e)}e.mock=t})(lP||={});var uP=le({__name:`VRM`,emits:[`loadModelProgress`,`error`],setup(e,{expose:t,emit:n}){let r=n,{x:i,y:a}=fe(),o=je(),{width:s,height:c}=de(o),{selectedModel:l,cameraFOV:u,cameraPosition:d,cameraDistance:f,modelOrigin:p,trackingMode:m,lookAtTarget:h,eyeHeight:g}=C(Be()),_=je(),v=Me(new E),y=je(),b=!0,x=je(!1),S=je(!1),w=je(!1),T=new A,O=new ee;Oe(u,e=>{v.value&&(v.value.fov=e,v.value.updateProjectionMatrix())}),Oe(()=>y.value?.controls,e=>{if(e&&v.value){x.value=!0;let t=()=>{if(b)return;b=!0;let e=v.value.position,t=y.value.controls.getDistance(),n=Math.abs(d.value.x-e.x)>1e-6||Math.abs(d.value.y-e.y)>1e-6||Math.abs(d.value.z-e.z)>1e-6,r=Math.abs(f.value-t)>1e-6;(n||r)&&(d.value={x:e.x,y:e.y,z:e.z},f.value=t),b=!1};e.addEventListener(`change`,t),Te(()=>{e.removeEventListener(`change`,t)})}});function k(){S.value=!0}Oe([x,S],([e,t])=>{if(e&&t&&v.value&&y.value&&y.value.controls){b=!0;try{v.value.aspect=s.value/c.value,v.value.fov=u.value,y.value.setTarget(p.value),v.value.position.set(d.value.x,d.value.y,d.value.z),v.value.updateProjectionMatrix(),y.value.controls.update(),f.value=y.value.controls.getDistance()}finally{b=!1,w.value=!0}}}),Oe(f,e=>{if(!b&&v.value&&y.value&&y.value.controls){b=!0;let t=new te,n=y.value.controls.target,r=new te().subVectors(v.value.position,n).normalize();t.copy(n).addScaledVector(r,e),v.value.position.set(t.x,t.y,t.z),y.value.update(),d.value={x:t.x,y:t.y,z:t.z}}b=!1});function j(e){_.value?.lookAtUpdate(e),h.value=e}function M(e,t){O.x=e/window.innerWidth*2-1,O.y=-(t/window.innerHeight)*2+1,T.setFromCamera(O,v.value);let n=new te;v.value.getWorldDirection(n);let r=new D;r.setFromNormalAndCoplanarPoint(n,v.value.position.clone().add(n.multiplyScalar(1)));let i=new te;T.ray.intersectPlane(r,i),h.value={x:i.x,y:i.y,z:i.z},_.value?.lookAtUpdate(h.value)}return Oe(d,e=>{!w.value||!_.value||m.value===`camera`&&j(e)},{deep:!0}),Oe([i,a],()=>{!w.value||!_.value||m.value===`mouse`&&M(i.value,a.value)}),Oe(m,e=>{!w.value||!_.value||(e===`camera`?j(d.value):e===`mouse`?M(i.value,a.value):h.value={x:0,y:g.value,z:-1e3})}),t({setExpression:e=>{_.value?.setExpression(e)}}),(e,t)=>(Ee(),se(`div`,{ref_key:`vrmContainerRef`,ref:o,w:`100%`,h:`100%`},[v.value?Ae((Ee(),ae(Pe(_e),{key:0,camera:v.value,alpha:!0,antialias:!0,width:Pe(s),height:Pe(c)},{default:ke(()=>[ce(Pe(HP),{ref_key:`controlsRef`,ref:y},null,512),t[2]||=ie(`TresDirectionalLight`,{color:16777215,intensity:1.8,position:[1,1,-10]},null,-1),t[3]||=ie(`TresAmbientLight`,{color:16777215,intensity:1.2},null,-1),(Ee(),ae(Pe(_P),{ref_key:`modelRef`,ref:_,key:Pe(l),model:Pe(l),"idle-animation":`/assets/vrm/animations/idle_loop.vrma`,paused:!1,onLoadModelProgress:t[0]||=e=>r(`loadModelProgress`,e),onModelReady:k,onError:t[1]||=e=>r(`error`,e)},null,8,[`model`])),t[4]||=ie(`TresAxesHelper`,{size:1},null,-1)]),_:1,__:[2,3,4]},8,[`camera`,`width`,`height`])),[[ne,w.value]]):oe(``,!0)],512))}}),dP=uP;const fP={relative:``},pP={"h-full":``,"w-full":``};var mP=le({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:{},xOffset:{},yOffset:{},scale:{default:1}},setup(e){let t=je(),n=je(),{stageView:r,stageViewControlsEnabled:i,live2dDisableFocus:a}=C(Ve()),{mouthOpenSize:o}=C(h()),{audioContext:s,calculateVolume:c}=m(),{onBeforeMessageComposed:l,onBeforeSend:g,onTokenLiteral:x,onTokenSpecial:S,onStreamEnd:w,onAssistantResponseEnd:T}=Ue(),E=Ke(),D=je(),O=je(!1),k=je(!1),A=p({handlers:[e=>new Promise(t=>{let n=s.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(s.destination),n.connect(D.value),O.value=!0,n.start(0),n.onended=()=>{O.value=!1,t()}})]}),j=We(),{ssmlEnabled:M,activeSpeechProvider:ee,activeSpeechModel:te,activeSpeechVoice:N,pitch:ne}=C(j);async function P(e){try{if(!ee.value){console.warn(`No active speech provider configured`);return}if(!N.value){console.warn(`No active speech voice configured`);return}let t=await E.getProviderInstance(ee.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=E.getProviderConfig(ee.value),r=M.value?j.generateSSML(e.data,N.value,{...n,pitch:ne.value}):e.data,i=await Ge({...t.speech(te.value,n),input:r,voice:N.value.id}),a=await s.decodeAudioData(i);await A.add({audioBuffer:a,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let re=p({handlers:[P]});re.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let ce=f(re),{currentMotion:le}=C(He()),ue=p({handlers:[async e=>{if(r.value===`3d`){let t=y[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(le.value={group:v[e.data]})}]}),de=d(ue);de.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let fe=u();fe.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function pe(){requestAnimationFrame(pe),O.value&&(o.value=c(D.value,`linear`))}function me(){k.value||(pe(),s.resume(),k.value=!0)}function he(){D.value||=s.createAnalyser()}return l(async()=>{he(),me()}),g(async()=>{le.value={group:b}}),x(async e=>{await ce.add(e)}),S(async e=>{await fe.add(e),await de.add(e)}),w(async()=>{await fe.add(_)}),T(async e=>{}),Te(()=>{k.value=!1}),we(async()=>{t.value=lP({connection:{bundles:qe()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(e,t)=>(Ee(),se(`div`,fP,[ie(`div`,pP,[Pe(r)===`2d`?(Ee(),ae(If,{key:0,"focus-at":e.focusAt,"mouth-open-size":Pe(o),"min-w":`50% {if(!h.value){console.warn(`Scene is not ready, cannot load VRM model.`);return}try{let e=await n(u.model,{scene:h.value,lookAt:!0,positionOffset:[b.value.x,b.value.y,b.value.z],onProgress:e=>d(`loadModelProgress`,Number((100*e.loaded/e.total).toFixed(2)))});if(!e||!e._vrm){console.warn(`No VRM model loaded`);return}let{_vrm:a,_vrmGroup:o,modelCenter:s,modelSize:c,initialCameraOffset:l}=e;j.value=o,w.value={x:s.x+l.x,y:s.y+l.y,z:s.z+l.z},x.value={x:s.x,y:s.y,z:s.z},S.value={x:c.x,y:c.y,z:c.z};let y=new te(0,0,-1),C=a.lookAt,ee=new O;if(C){let e=C.faceFront;ee.setFromUnitVectors(e.normalize(),y.normalize()),o.quaternion.premultiply(ee),o.updateMatrixWorld(!0)}else console.warn(`No look-at target found in VRM model`);E.value=0;function ne(e){let t=a.humanoid?.getNormalizedBoneNode(`hips`);if(!t){console.warn(`No hips node found in VRM model.`);return}t.updateMatrixWorld(!0);let n=new te;t.getWorldPosition(n);let r=e.tracks.find(e=>e.name.endsWith(`Hips.position`));if(!(r instanceof N)){console.warn(`No Hips.position track of type VectorKeyframeTrack found in animation.`);return}let i=new te(r.values[0],r.values[1],r.values[2]),o=new te().subVectors(i,n);e.tracks.forEach(e=>{if(e.name.endsWith(`.position`)&&e instanceof N)for(let t=0;t{m.value?.update(e),p.value?.update(e),p.value?.lookAt?.update?.(e),_.update(p.value,e),M.update(p.value,D,e),v.value?.update(e)}).off}catch(e){T.value=!1,d(`error`,e)}}),Oe(b,()=>{j.value&&j.value.position.set(b.value.x,b.value.y,b.value.z)},{deep:!0}),Oe(E,e=>{p.value&&j.value&&(j.value.rotation.y=Ce.degToRad(e))}),c({setExpression(e){v.value?.setEmotionWithResetAfter(e,1e3)},scene:re(()=>p.value?.scene),lookAtUpdate(e){M.instantUpdate(p.value,e)}});let{pause:ee,resume:ne}=ve();Oe(()=>u.paused,e=>{e?ee():ne()});function P(){f?.(),p.value&&(p.value.scene.removeFromParent(),s.deepDispose(p.value.scene))}return Te(()=>{P()}),(e,t)=>De(e.$slots,`default`)}}),_P=gP;const vP={type:`change`},yP={type:`start`},bP={type:`end`},xP=new k,SP=new D,CP=Math.cos(70*Ce.DEG2RAD),wP=new te,TP=2*Math.PI,EP={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},DP=1e-6;var OP=class extends xe{constructor(e,t=null){super(e,t),this.state=EP.NONE,this.target=new te,this.cursor=new te,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,BOTTOM:`ArrowDown`},this.mouseButtons={LEFT:Se.ROTATE,MIDDLE:Se.DOLLY,RIGHT:Se.PAN},this.touches={ONE:M.ROTATE,TWO:M.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new te,this._lastQuaternion=new O,this._lastTargetPosition=new te,this._quat=new O().setFromUnitVectors(e.up,new te(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new j,this._sphericalDelta=new j,this._scale=1,this._panOffset=new te,this._rotateStart=new ee,this._rotateEnd=new ee,this._rotateDelta=new ee,this._panStart=new ee,this._panEnd=new ee,this._panDelta=new ee,this._dollyStart=new ee,this._dollyEnd=new ee,this._dollyDelta=new ee,this._dollyDirection=new te,this._mouse=new ee,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=AP.bind(this),this._onPointerDown=kP.bind(this),this._onPointerUp=jP.bind(this),this._onContextMenu=RP.bind(this),this._onMouseWheel=PP.bind(this),this._onKeyDown=FP.bind(this),this._onTouchStart=IP.bind(this),this._onTouchMove=LP.bind(this),this._onMouseDown=MP.bind(this),this._onMouseMove=NP.bind(this),this._interceptControlDown=zP.bind(this),this._interceptControlUp=BP.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener(`pointerdown`,this._onPointerDown),this.domElement.addEventListener(`pointercancel`,this._onPointerUp),this.domElement.addEventListener(`contextmenu`,this._onContextMenu),this.domElement.addEventListener(`wheel`,this._onMouseWheel,{passive:!1});let t=this.domElement.getRootNode();t.addEventListener(`keydown`,this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction=`none`}disconnect(){this.domElement.removeEventListener(`pointerdown`,this._onPointerDown),this.domElement.removeEventListener(`pointermove`,this._onPointerMove),this.domElement.removeEventListener(`pointerup`,this._onPointerUp),this.domElement.removeEventListener(`pointercancel`,this._onPointerUp),this.domElement.removeEventListener(`wheel`,this._onMouseWheel),this.domElement.removeEventListener(`contextmenu`,this._onContextMenu),this.stopListenToKeyEvents();let e=this.domElement.getRootNode();e.removeEventListener(`keydown`,this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction=`auto`}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener(`keydown`,this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener(`keydown`,this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(vP),this.update(),this.state=EP.NONE}update(e=null){let t=this.object.position;wP.copy(t).sub(this.target),wP.applyQuaternion(this._quat),this._spherical.setFromVector3(wP),this.autoRotate&&this.state===EP.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(n)&&isFinite(r)&&(n<-Math.PI?n+=TP:n>Math.PI&&(n-=TP),r<-Math.PI?r+=TP:r>Math.PI&&(r-=TP),n<=r?this._spherical.theta=Math.max(n,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+r)/2?Math.max(n,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let i=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{let e=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),i=e!=this._spherical.radius}if(wP.setFromSpherical(this._spherical),wP.applyQuaternion(this._quatInverse),t.copy(this.target).add(wP),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let e=null;if(this.object.isPerspectiveCamera){let t=wP.length();e=this._clampDistance(t*this._scale);let n=t-e;this.object.position.addScaledVector(this._dollyDirection,n),this.object.updateMatrixWorld(),i=!!n}else if(this.object.isOrthographicCamera){let t=new te(this._mouse.x,this._mouse.y,0);t.unproject(this.object);let n=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),i=n!==this.object.zoom;let r=new te(this._mouse.x,this._mouse.y,0);r.unproject(this.object),this.object.position.sub(r).add(t),this.object.updateMatrixWorld(),e=wP.length()}else console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.`),this.zoomToCursor=!1;e!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(e).add(this.object.position):(xP.origin.copy(this.object.position),xP.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(xP.direction))DP||8*(1-this._lastQuaternion.dot(this.object.quaternion))>DP||this._lastTargetPosition.distanceToSquared(this.target)>DP?(this.dispatchEvent(vP),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e===null?TP/60/60*this.autoRotateSpeed:TP/60*this.autoRotateSpeed*e}_getZoomScale(e){let t=Math.abs(e*.01);return .95**(this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){wP.setFromMatrixColumn(t,0),wP.multiplyScalar(-e),this._panOffset.add(wP)}_panUp(e,t){this.screenSpacePanning===!0?wP.setFromMatrixColumn(t,1):(wP.setFromMatrixColumn(t,0),wP.crossVectors(this.object.up,wP)),wP.multiplyScalar(e),this._panOffset.add(wP)}_pan(e,t){let n=this.domElement;if(this.object.isPerspectiveCamera){let r=this.object.position;wP.copy(r).sub(this.target);let i=wP.length();i*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*i/n.clientHeight,this.object.matrix),this._panUp(2*t*i/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.`),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;let n=this.domElement.getBoundingClientRect(),r=e-n.left,i=t-n.top,a=n.width,o=n.height;this._mouse.x=r/a*2-1,this._mouse.y=-(i/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(TP*this._rotateDelta.x/t.clientHeight),this._rotateUp(TP*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(TP*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-TP*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(TP*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-TP*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateStart.set(n,r)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panStart.set(n,r)}}_handleTouchStartDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);this._dollyStart.set(0,i)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(TP*this._rotateDelta.x/t.clientHeight),this._rotateUp(TP*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panEnd.set(n,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);this._dollyEnd.set(0,i),this._dollyDelta.set(0,(this._dollyEnd.y/this._dollyStart.y)**+this.zoomSpeed),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);let a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t{n.value&&r.value?.domElement&&(i.value=new OP(n.value,r.value.domElement),i.value.enableDamping=!0,i.value.dampingFactor=.5,i.value.mouseButtons={LEFT:Se.ROTATE,MIDDLE:Se.DOLLY,RIGHT:Se.PAN},i.value.touches={ONE:M.ROTATE,TWO:M.DOLLY_PAN},i.value.enablePan=!1,i.value.minDistance=a.value.z,i.value.maxDistance=a.value.z*20,i.value.update(),o.value=i.value.getDistance())}),t({controls:i,getDistance:()=>i.value?.getDistance(),update:()=>i.value?.update(),setTarget:e=>{i.value&&(i.value.target.set(e.x,e.y,e.z),i.value.update())}}),(e,t)=>De(e.$slots,`default`)}}),HP=VP;export{hP as b,dP as c,tA as d,fk as e,ek as f,If as g,Of as h,Df as i,wl as j,Cl as k}; \ No newline at end of file diff --git a/assets/Textarea-CQXjp80_.js b/assets/Textarea-D9rLaih7.js similarity index 83% rename from assets/Textarea-CQXjp80_.js rename to assets/Textarea-D9rLaih7.js index 6f61795b4bdb0b17f1ef873a7ea563b7077e5d3f..349aa8df0928275790760687cce5adf132b89c0c 100644 --- a/assets/Textarea-CQXjp80_.js +++ b/assets/Textarea-D9rLaih7.js @@ -1 +1 @@ -import{b as e}from"./Basic-6NscZoIc.js";import{dU as t,dZ as n,e5 as r,ea as i}from"./index-BqrqTEsQ.js";var a=n({__name:`Textarea`,props:{modelValue:{default:``},modelModifiers:{}},emits:[`update:modelValue`],setup(n){let a=i(n,`modelValue`);return(n,i)=>(r(),t(e,{modelValue:a.value,"onUpdate:modelValue":i[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 b}; \ No newline at end of file +import{b as e}from"./Basic-JYGX2D37.js";import{dU as t,dZ as n,e5 as r,ea as i}from"./index-D1IGsMK6.js";var a=n({__name:`Textarea`,props:{modelValue:{default:``},modelModifiers:{}},emits:[`update:modelValue`],setup(n){let a=i(n,`modelValue`);return(n,i)=>(r(),t(e,{modelValue:a.value,"onUpdate:modelValue":i[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 b}; \ No newline at end of file diff --git a/assets/_...all_-cevFm6qe.js b/assets/_...all_-Cod6qNfE.js similarity index 86% rename from assets/_...all_-cevFm6qe.js rename to assets/_...all_-Cod6qNfE.js index 46456fd156c24b1bc7fd971a3339a6878a698cfe..c5062a5f2605150e094928e87dd013f5bc0089e9 100644 --- a/assets/_...all_-cevFm6qe.js +++ b/assets/_...all_-Cod6qNfE.js @@ -1 +1 @@ -import{ci as e,d5 as t,dT as n,dW as r,dX as i,dY as a,dZ as o,e5 as s,ed as c,ek as l}from"./index-BqrqTEsQ.js";const u={"h-full":``,"w-full":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``,"gap-4":``};var d=o({__name:`[...all]`,setup(o){let d=t();return(t,o)=>(s(),r(`div`,u,[o[2]||=n(`div`,{"text-3xl":``},` Where are we? `,-1),n(`div`,null,[a(l(e),{onClick:o[0]||=e=>l(d).go(-1)},{default:c(()=>o[1]||=[i(` Go Back `,-1)]),_:1,__:[1]})])]))}}),f=d;export{f as default}; \ No newline at end of file +import{ci as e,d5 as t,dT as n,dW as r,dX as i,dY as a,dZ as o,e5 as s,ed as c,ek as l}from"./index-D1IGsMK6.js";const u={"h-full":``,"w-full":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``,"gap-4":``};var d=o({__name:`[...all]`,setup(o){let d=t();return(t,o)=>(s(),r(`div`,u,[o[2]||=n(`div`,{"text-3xl":``},` Where are we? `,-1),n(`div`,null,[a(l(e),{onClick:o[0]||=e=>l(d).go(-1)},{default:c(()=>o[1]||=[i(` Go Back `,-1)]),_:1,__:[1]})])]))}}),f=d;export{f as default}; \ No newline at end of file diff --git a/assets/__vite-browser-external-BFBX2XSs.js b/assets/__vite-browser-external-BFBX2XSs.js deleted file mode 100644 index 8c86654eefa6d3262f7097f756b580910d8885c0..0000000000000000000000000000000000000000 --- a/assets/__vite-browser-external-BFBX2XSs.js +++ /dev/null @@ -1 +0,0 @@ -import{ep as e}from"./index-BqrqTEsQ.js";var t=e(((exports,t)=>{t.exports={}}));export default t(); \ No newline at end of file diff --git a/assets/__vite-browser-external-DgcibqnP.js b/assets/__vite-browser-external-DgcibqnP.js new file mode 100644 index 0000000000000000000000000000000000000000..8c9352a4e48c48bd52aa3b394ce00745e9dacc55 --- /dev/null +++ b/assets/__vite-browser-external-DgcibqnP.js @@ -0,0 +1 @@ +import{ep as e}from"./index-D1IGsMK6.js";var t=e(((exports,t)=>{t.exports={}}));export default t(); \ No newline at end of file diff --git a/assets/airi-card-CFHe9iJm.js b/assets/airi-card-Q3k0tIwN.js similarity index 93% rename from assets/airi-card-CFHe9iJm.js rename to assets/airi-card-Q3k0tIwN.js index cb8f68161df4d379d34c0b01c9401ec101983d5b..d5c968d26808440552bc62bdb3a0861063a1bf05 100644 --- a/assets/airi-card-CFHe9iJm.js +++ b/assets/airi-card-Q3k0tIwN.js @@ -1 +1 @@ -import{b as e}from"./DeleteCardDialog-Cb8qVSVb.js";import"./DialogTitle-DcCyxlil.js";import{b as t}from"./InputFile-ClfQXb90.js";import{cH as n,cm as r,d7 as ee,dN as te,dQ as i,dS as a,dT as o,dU as s,dV as c,dW as l,dX as u,dY as d,dZ as f,e5 as p,e6 as m,e9 as h,ec as g,ed as _,ee as v,eg as y,ek as b,el as ne,eo as x,t as re,z as ie}from"./index-BqrqTEsQ.js";import{b as S}from"./route-block-gWR0cCIm.js";import{b as C}from"./CardCreate-1xbHbXXu.js";import{b as w}from"./CardCreationDialog-gKrswwkx.js";import{b as T}from"./CardDetailDialog-CFL4TUGk.js";import{b as E}from"./CardListItem-H_UE8PfW.js";const D={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ae={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},oe={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},se=[`placeholder`],O={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},k={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},A={key:0,flex:``,"flex-col":``,"items-center":``},j={"font-medium":``,text:`neutral-600 dark:neutral-300`},M={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},N={key:1,flex:``,"flex-col":``,"items-center":``},P={"font-medium":``,text:`primary-600 dark:primary-300`},F={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`},I={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 L=f({__name:`index`,setup(f){let{t:S}=ie(),L=re(),{addCard:R,removeCard:z}=L,{cards:B,activeCardId:V}=ee(L),H=y(``),U=y(!1),W=y(!1),G=y(``),K=y(`nameAsc`),q=y([]);g(q,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);H.value=R(n),U.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let J=a(()=>Array.from(B.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),ce=a(()=>{if(!G.value)return J.value;let e=G.value.toLowerCase();return J.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),Y=a(()=>{let e=[...ce.value];return K.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):K.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):K.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),X=y(!1),Z=y(null);function Q(){Z.value&&(z(Z.value),Z.value=null,X.value=!1)}function le(e){Z.value=e,X.value=!0}function ue(e){H.value=e,U.value=!0}function de(){W.value=!0}function fe(e){V.value=e}function pe(e){let t=B.value.get(e);return t?.version||`1.0.0`}function $(e,t){let n=B.value.get(e);if(!n||!n.extensions?.airi?.modules)return`default`;let r=n.extensions.airi.modules;return t===`consciousness`?r.consciousness?.model&&r.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&r.speech?.voice_id||`default`}return(ee,a)=>{let f=h(`motion`);return p(),l(i,null,[o(`div`,D,[o(`div`,ae,[o(`div`,oe,[a[7]||=o(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[o(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),v(o(`input`,{"onUpdate:modelValue":a[0]||=e=>G.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:b(S)(`settings.pages.card.search`)},null,8,se),[[te,G.value]])]),o(`div`,O,[o(`div`,k,x(b(S)(`settings.pages.card.sort_by`))+`: `,1),d(b(n),{modelValue:K.value,"onUpdate:modelValue":a[1]||=e=>K.value=e,options:[{value:`nameAsc`,label:b(S)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:b(S)(`settings.pages.card.name_desc`)},{value:`recent`,label:b(S)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),o(`div`,{class:ne([`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))]":b(B).size>0}])},[d(b(t),{modelValue:q.value,"onUpdate:modelValue":a[2]||=e=>q.value=e,accept:`*.json`},{default:_(({isDragging:e})=>[e?(p(),l(`div`,N,[a[9]||=o(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),o(`p`,P,x(b(S)(`settings.pages.card.drop_here`)),1)])):(p(),l(`div`,A,[a[8]||=o(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),o(`p`,j,x(b(S)(`settings.pages.card.upload`)),1),o(`p`,M,x(b(S)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),d(C,{onClick:de}),b(B).size>0?(p(!0),l(i,{key:0},m(Y.value,e=>(p(),s(E,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===b(V),"is-selected":e.id===H.value&&U.value,version:pe(e.id),"consciousness-model":$(e.id,`consciousness`),"voice-model":$(e.id,`voice`),onSelect:t=>ue(e.id),onActivate:t=>fe(e.id),onDelete:t=>le(e.id)},null,8,[`id`,`name`,`description`,`is-active`,`is-selected`,`version`,`consciousness-model`,`voice-model`,`onSelect`,`onActivate`,`onDelete`]))),128)):c(``,!0),b(B).size===0?(p(),l(`div`,F,[a[10]||=o(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),o(`p`,null,x(b(S)(`settings.pages.card.no_cards`)),1)])):c(``,!0),G.value&&Y.value.length===0?(p(),s(b(r),{key:2,type:`warning`},{title:_(()=>[u(x(b(S)(`settings.pages.card.no_results`)),1)]),content:_(()=>[u(x(b(S)(`settings.pages.card.try_different_search`)),1)]),_:1})):c(``,!0)],2)]),d(e,{modelValue:X.value,"onUpdate:modelValue":a[3]||=e=>X.value=e,"card-name":Z.value?b(L).getCard(Z.value)?.name:``,onConfirm:Q,onCancel:a[4]||=e=>Z.value=null},null,8,[`modelValue`,`card-name`]),d(T,{modelValue:U.value,"onUpdate:modelValue":a[5]||=e=>U.value=e,"card-id":H.value},null,8,[`modelValue`,`card-id`]),d(w,{modelValue:W.value,"onUpdate:modelValue":a[6]||=e=>W.value=e},null,8,[`modelValue`]),v((p(),l(`div`,I,a[11]||=[o(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof S==`function`&&S(L);var R=L;export{R as default}; \ No newline at end of file +import{b as e}from"./DeleteCardDialog-Bc1chq43.js";import"./DialogTitle-CaB1D00q.js";import{b as t}from"./InputFile-CrEM0anr.js";import{cH as n,cm as r,d7 as ee,dN as te,dQ as i,dS as a,dT as o,dU as s,dV as c,dW as l,dX as u,dY as d,dZ as f,e5 as p,e6 as m,e9 as h,ec as g,ed as _,ee as v,eg as y,ek as b,el as ne,eo as x,t as re,z as ie}from"./index-D1IGsMK6.js";import{b as S}from"./route-block-gWR0cCIm.js";import{b as C}from"./CardCreate-BnRABIEk.js";import{b as w}from"./CardCreationDialog-xeCipFWo.js";import{b as T}from"./CardDetailDialog-42_DgObP.js";import{b as E}from"./CardListItem-4sQIRPZf.js";const D={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ae={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},oe={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},se=[`placeholder`],O={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},k={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},A={key:0,flex:``,"flex-col":``,"items-center":``},j={"font-medium":``,text:`neutral-600 dark:neutral-300`},M={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},N={key:1,flex:``,"flex-col":``,"items-center":``},P={"font-medium":``,text:`primary-600 dark:primary-300`},F={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`},I={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 L=f({__name:`index`,setup(f){let{t:S}=ie(),L=re(),{addCard:R,removeCard:z}=L,{cards:B,activeCardId:V}=ee(L),H=y(``),U=y(!1),W=y(!1),G=y(``),K=y(`nameAsc`),q=y([]);g(q,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);H.value=R(n),U.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let J=a(()=>Array.from(B.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),ce=a(()=>{if(!G.value)return J.value;let e=G.value.toLowerCase();return J.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),Y=a(()=>{let e=[...ce.value];return K.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):K.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):K.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),X=y(!1),Z=y(null);function Q(){Z.value&&(z(Z.value),Z.value=null,X.value=!1)}function le(e){Z.value=e,X.value=!0}function ue(e){H.value=e,U.value=!0}function de(){W.value=!0}function fe(e){V.value=e}function pe(e){let t=B.value.get(e);return t?.version||`1.0.0`}function $(e,t){let n=B.value.get(e);if(!n||!n.extensions?.airi?.modules)return`default`;let r=n.extensions.airi.modules;return t===`consciousness`?r.consciousness?.model&&r.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&r.speech?.voice_id||`default`}return(ee,a)=>{let f=h(`motion`);return p(),l(i,null,[o(`div`,D,[o(`div`,ae,[o(`div`,oe,[a[7]||=o(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[o(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),v(o(`input`,{"onUpdate:modelValue":a[0]||=e=>G.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:b(S)(`settings.pages.card.search`)},null,8,se),[[te,G.value]])]),o(`div`,O,[o(`div`,k,x(b(S)(`settings.pages.card.sort_by`))+`: `,1),d(b(n),{modelValue:K.value,"onUpdate:modelValue":a[1]||=e=>K.value=e,options:[{value:`nameAsc`,label:b(S)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:b(S)(`settings.pages.card.name_desc`)},{value:`recent`,label:b(S)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),o(`div`,{class:ne([`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))]":b(B).size>0}])},[d(b(t),{modelValue:q.value,"onUpdate:modelValue":a[2]||=e=>q.value=e,accept:`*.json`},{default:_(({isDragging:e})=>[e?(p(),l(`div`,N,[a[9]||=o(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),o(`p`,P,x(b(S)(`settings.pages.card.drop_here`)),1)])):(p(),l(`div`,A,[a[8]||=o(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),o(`p`,j,x(b(S)(`settings.pages.card.upload`)),1),o(`p`,M,x(b(S)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),d(C,{onClick:de}),b(B).size>0?(p(!0),l(i,{key:0},m(Y.value,e=>(p(),s(E,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===b(V),"is-selected":e.id===H.value&&U.value,version:pe(e.id),"consciousness-model":$(e.id,`consciousness`),"voice-model":$(e.id,`voice`),onSelect:t=>ue(e.id),onActivate:t=>fe(e.id),onDelete:t=>le(e.id)},null,8,[`id`,`name`,`description`,`is-active`,`is-selected`,`version`,`consciousness-model`,`voice-model`,`onSelect`,`onActivate`,`onDelete`]))),128)):c(``,!0),b(B).size===0?(p(),l(`div`,F,[a[10]||=o(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),o(`p`,null,x(b(S)(`settings.pages.card.no_cards`)),1)])):c(``,!0),G.value&&Y.value.length===0?(p(),s(b(r),{key:2,type:`warning`},{title:_(()=>[u(x(b(S)(`settings.pages.card.no_results`)),1)]),content:_(()=>[u(x(b(S)(`settings.pages.card.try_different_search`)),1)]),_:1})):c(``,!0)],2)]),d(e,{modelValue:X.value,"onUpdate:modelValue":a[3]||=e=>X.value=e,"card-name":Z.value?b(L).getCard(Z.value)?.name:``,onConfirm:Q,onCancel:a[4]||=e=>Z.value=null},null,8,[`modelValue`,`card-name`]),d(T,{modelValue:U.value,"onUpdate:modelValue":a[5]||=e=>U.value=e,"card-id":H.value},null,8,[`modelValue`,`card-id`]),d(w,{modelValue:W.value,"onUpdate:modelValue":a[6]||=e=>W.value=e},null,8,[`modelValue`]),v((p(),l(`div`,I,a[11]||=[o(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof S==`function`&&S(L);var R=L;export{R as default}; \ No newline at end of file diff --git a/assets/alibaba-cloud-model-studio-COHJiWXk.js b/assets/alibaba-cloud-model-studio-3eKy2f7l.js similarity index 97% rename from assets/alibaba-cloud-model-studio-COHJiWXk.js rename to assets/alibaba-cloud-model-studio-3eKy2f7l.js index 30762edf0781f6f1f0dcfca7889642d29d873dae..7efbc3d483e9c8a2ade80ee110a5c12d6bed6b9e 100644 --- a/assets/alibaba-cloud-model-studio-COHJiWXk.js +++ b/assets/alibaba-cloud-model-studio-3eKy2f7l.js @@ -1 +1 @@ -import{cM as e,d7 as t,dS as n,dT as r,dU as i,dY as a,dZ as o,e as s,e3 as c,e5 as l,ec as u,ed as d,eg as f,ek as p,f as m,u as h,x as g,z as _}from"./index-BqrqTEsQ.js";import{b as v}from"./route-block-gWR0cCIm.js";const y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`;var S=o({__name:`alibaba-cloud-model-studio`,setup(o){let v={speed:1},S=f(0),C=f(1),w=f(0),T=h(),E=g(),{providers:D}=t(E),{t:O}=_(),k=n(()=>!!D.value[b]?.apiKey),A=n(()=>T.availableVoices[b]||[]);async function j(e,t,n){let r=await 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 c(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)}),u(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),u(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),u(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),u(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}),(t,n)=>(l(),i(p(s),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":d(()=>[r(`div`,y,[a(p(e),{modelValue:S.value,"onUpdate:modelValue":n[0]||=e=>S.value=e,label:p(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:p(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`]),a(p(e),{modelValue:C.value,"onUpdate:modelValue":n[1]||=e=>C.value=e,label:p(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:p(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),a(p(e),{modelValue:w.value,"onUpdate:modelValue":n[2]||=e=>w.value=e,label:p(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:p(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:d(()=>[a(p(m),{"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{cM as e,d7 as t,dS as n,dT as r,dU as i,dY as a,dZ as o,e as s,e3 as c,e5 as l,ec as u,ed as d,eg as f,ek as p,f as m,u as h,x as g,z as _}from"./index-D1IGsMK6.js";import{b as v}from"./route-block-gWR0cCIm.js";const y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`;var S=o({__name:`alibaba-cloud-model-studio`,setup(o){let v={speed:1},S=f(0),C=f(1),w=f(0),T=h(),E=g(),{providers:D}=t(E),{t:O}=_(),k=n(()=>!!D.value[b]?.apiKey),A=n(()=>T.availableVoices[b]||[]);async function j(e,t,n){let r=await 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 c(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)}),u(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),u(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),u(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),u(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}),(t,n)=>(l(),i(p(s),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":d(()=>[r(`div`,y,[a(p(e),{modelValue:S.value,"onUpdate:modelValue":n[0]||=e=>S.value=e,label:p(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:p(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`]),a(p(e),{modelValue:C.value,"onUpdate:modelValue":n[1]||=e=>C.value=e,label:p(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:p(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),a(p(e),{modelValue:w.value,"onUpdate:modelValue":n[2]||=e=>w.value=e,label:p(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:p(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:d(()=>[a(p(m),{"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-CUlO-W3r.js b/assets/anthropic-BFqros6g.js similarity index 97% rename from assets/anthropic-CUlO-W3r.js rename to assets/anthropic-BFqros6g.js index b1cb34c60b7f4f6cbad360609cad35f36223aa59..36a76533b302e44986d61255880f21b38564bd0b 100644 --- a/assets/anthropic-CUlO-W3r.js +++ b/assets/anthropic-BFqros6g.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dT as r,dU as i,dX as a,dY as o,dZ as s,e3 as c,e5 as l,ec as u,ed as d,ek as f,eo as p,g as m,h,i as g,j as _,k as v,l as y,x as b,z as x}from"./index-BqrqTEsQ.js";import{b as S}from"./route-block-gWR0cCIm.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=s({__name:`anthropic`,setup(s){let{t:S}=x(),D=e(),O=b(),{providers:k}=t(O),A=n(()=>O.getProviderMetadata(E)),j=n({get:()=>k.value[E]?.apiKey||``,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=n({get:()=>k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});c(()=>{k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=k.value[E]?.apiKey||``,M.value=k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`}),u([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,t)=>(l(),i(f(m),{"provider-name":A.value?.localizedName||`Anthropic | Claude`,"provider-icon":A.value?.icon,"on-back":()=>f(D).back()},{default:d(()=>[r(`div`,C,[r(`h2`,w,p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),r(`p`,null,[a(p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),r(`a`,T,p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),a(`, `+p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),t[2]||=r(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),a(` `+p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),r(`p`,null,[a(p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),t[3]||=r(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),a(` `+p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),o(f(h),null,{default:d(()=>[o(f(g),{title:f(S)(`settings.pages.providers.common.section.basic.title`),description:f(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:d(()=>[o(f(v),{modelValue:j.value,"onUpdate:modelValue":t[0]||=e=>j.value=e,"provider-name":A.value?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),o(f(y),{title:f(S)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[o(f(_),{modelValue:M.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dT as r,dU as i,dX as a,dY as o,dZ as s,e3 as c,e5 as l,ec as u,ed as d,ek as f,eo as p,g as m,h,i as g,j as _,k as v,l as y,x as b,z as x}from"./index-D1IGsMK6.js";import{b as S}from"./route-block-gWR0cCIm.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=s({__name:`anthropic`,setup(s){let{t:S}=x(),D=e(),O=b(),{providers:k}=t(O),A=n(()=>O.getProviderMetadata(E)),j=n({get:()=>k.value[E]?.apiKey||``,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=n({get:()=>k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});c(()=>{k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=k.value[E]?.apiKey||``,M.value=k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`}),u([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,t)=>(l(),i(f(m),{"provider-name":A.value?.localizedName||`Anthropic | Claude`,"provider-icon":A.value?.icon,"on-back":()=>f(D).back()},{default:d(()=>[r(`div`,C,[r(`h2`,w,p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),r(`p`,null,[a(p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),r(`a`,T,p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),a(`, `+p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),t[2]||=r(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),a(` `+p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),r(`p`,null,[a(p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),t[3]||=r(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),a(` `+p(f(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),o(f(h),null,{default:d(()=>[o(f(g),{title:f(S)(`settings.pages.providers.common.section.basic.title`),description:f(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:d(()=>[o(f(v),{modelValue:j.value,"onUpdate:modelValue":t[0]||=e=>j.value=e,"provider-name":A.value?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),o(f(y),{title:f(S)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[o(f(_),{modelValue:M.value,"onUpdate:modelValue":t[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-BIDEdXyM.js b/assets/appearance-Be6MT6gl.js similarity index 96% rename from assets/appearance-BIDEdXyM.js rename to assets/appearance-Be6MT6gl.js index bb6649c853d91d3890ab5dee0acbb1e6bf0c75f1..1e8bc4b4840260f098646c2b21a11f3eebff2b6a 100644 --- a/assets/appearance-BIDEdXyM.js +++ b/assets/appearance-Be6MT6gl.js @@ -1 +1 @@ -import{co as e,dQ as t,dS as n,dT as r,dU as i,dW as a,dZ as o,e5 as s,e6 as c,e9 as l,ee as u,ek as d,en as f,z as p}from"./index-BqrqTEsQ.js";import{b as m}from"./route-block-gWR0cCIm.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=o({__name:`index`,setup(o){let{t:m}=p(),y=n(()=>[{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(n,o)=>{let p=l(`motion`);return s(),a(`div`,h,[o[0]||=r(`div`,null,null,-1),r(`div`,g,[(s(!0),a(t,null,c(y.value,(t,n)=>u((s(),i(d(e),{key:t.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:f({transitionDelay:`${n*50}ms`}),title:t.title,description:t.description,icon:t.icon,to:t.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[p]])),128))]),u((s(),a(`div`,_,[u(r(`div`,v,null,512),[[p]])])),[[p]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file +import{co as e,dQ as t,dS as n,dT as r,dU as i,dW as a,dZ as o,e5 as s,e6 as c,e9 as l,ee as u,ek as d,en as f,z as p}from"./index-D1IGsMK6.js";import{b as m}from"./route-block-gWR0cCIm.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=o({__name:`index`,setup(o){let{t:m}=p(),y=n(()=>[{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(n,o)=>{let p=l(`motion`);return s(),a(`div`,h,[o[0]||=r(`div`,null,null,-1),r(`div`,g,[(s(!0),a(t,null,c(y.value,(t,n)=>u((s(),i(d(e),{key:t.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:f({transitionDelay:`${n*50}ms`}),title:t.title,description:t.description,icon:t.icon,to:t.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[p]])),128))]),u((s(),a(`div`,_,[u(r(`div`,v,null,512),[[p]])])),[[p]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file diff --git a/assets/audio-DMDuWRzR.js b/assets/audio-C8SmZBs_.js similarity index 75% rename from assets/audio-DMDuWRzR.js rename to assets/audio-C8SmZBs_.js index 5d83b97a4931671f3083127a1c1a06a32801c069..624b09e9be4579ddc8aa41c326e735f9ed0375e1 100644 --- a/assets/audio-DMDuWRzR.js +++ b/assets/audio-C8SmZBs_.js @@ -1 +1 @@ -import{dT as e,dW as t,dZ as n,e5 as r,eg as i}from"./index-BqrqTEsQ.js";var a=n({__name:`audio`,setup(n){let a=i(),o=i();function s(e){if(!e)return;let t=o.value?.files?.[0];if(!t)return;let n=document.createElement(`audio`);a.value?.appendChild(n),n.src=URL.createObjectURL(t),n.controls=!0,n.load(),n.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{dT as e,dW as t,dZ as n,e5 as r,eg as i}from"./index-D1IGsMK6.js";var a=n({__name:`audio`,setup(n){let a=i(),o=i();function s(e){if(!e)return;let t=o.value?.files?.[0];if(!t)return;let n=document.createElement(`audio`);a.value?.appendChild(n),n.src=URL.createObjectURL(t),n.controls=!0,n.load(),n.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/audio-record-Cosszn5h.js b/assets/audio-record-Dm-nsCuP.js similarity index 97% rename from assets/audio-record-Cosszn5h.js rename to assets/audio-record-Dm-nsCuP.js index 5f941588386e2be175281b728cbc80871fe11789..7787d5d8917813d601c46e011737539f3adcd837 100644 --- a/assets/audio-record-Cosszn5h.js +++ b/assets/audio-record-Dm-nsCuP.js @@ -1 +1 @@ -import{cH as e,ci as t,d$ as n,dQ as r,dS as i,dT as a,dU as o,dW as s,dX as c,dY as l,dZ as u,dc as d,dl as f,do as p,e1 as m,e3 as h,e4 as g,e5 as _,e6 as v,e7 as y,ec as b,ed as x,ef as S,eg as C,ej as w,ek as T,eo as E}from"./index-BqrqTEsQ.js";var D=u({__name:`Option`,props:{value:{},label:{},active:{type:Boolean}},setup(e){let t=e,r=n(`selectOption`),i=n(`hide`);return(e,n)=>(_(),s(`div`,m({...e.$attrs,class:null,style:null},{class:[`cursor-pointer rounded px-2 py-1 text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800`,{"bg-neutral-100 dark:bg-neutral-800":t.active}],"line-clamp-1":``,"overflow-hidden":``,"text-ellipsis":``,"whitespace-pre-wrap":``,text:`xs sm:sm`,"transition-colors":``,"duration-150":``,"ease-in-out":``,"will-change-background-color":``,"will-change-color":``,onClick:n[0]||=()=>{T(r)(t.value),T(i)()}}),[y(e.$slots,`default`,{},()=>[c(E(t.label),1)])],16))}}),O=D;function k(){let e=d({constraints:{audio:!0},requestPermissions:!1}),t=C(e.audioInputs.value[0]?.deviceId||``),n=C(),r=i(()=>e.audioInputs.value),a=C({audio:!0}),o=f({constraints:a,autoSwitch:!0,enabled:!1});async function s(){e.permissionGranted.value||e.isSupported.value&&await e.ensurePermissions()}b(t,()=>{t.value&&(a.value={audio:{deviceId:{exact:t.value}}})},{immediate:!0}),b(e.audioInputs,()=>{n.value=r.value.find(e=>e.deviceId===t.value)},{immediate:!0}),b([e.permissionGranted,r,t],async()=>{await s(),e.permissionGranted.value&&r.value.length!==0&&(n.value||=r.value[0])},{immediate:!0});async function c(){await s(),e.permissionGranted.value&&n.value&&(o.enabled.value&&o.restart(),o.start())}function l(){o.stop()}return{selectedAudioInputId:t,selectedAudioInput:n,audioInputs:r,start:c,stop:l,request:s,media:o}}function A(e,t=()=>Promise.resolve()){let n=C(),r=w(e);async function i(){if(await t(),await p(r).toBeTruthy(),!r.value){console.error(`No media media available`);return}n.value=new MediaRecorder(r.value),n.value.start()}function a(){n.value&&(n.value.stop(),n.value.ondataavailable=e=>{let t=e.data,n=URL.createObjectURL(t),r=new Audio(n);r.play()})}return{startRecord:i,stopRecord:a}}const j={class:`mt-4 w-full flex justify-center gap-2`};var M=u({__name:`audio-record`,setup(n){let{audioInputs:i,selectedAudioInputId:u,start:d,stop:f,media:p,request:m}=k(),{startRecord:y,stopRecord:b}=A(p.stream,d);return h(()=>m()),g(()=>f()),(n,f)=>(_(),s(`div`,null,[l(T(e),{modelValue:T(u),"onUpdate:modelValue":f[0]||=e=>S(u)?u.value=e:null,onChange:f[1]||=()=>T(d)()},{default:x(({value:e})=>[a(`div`,null,E(e?T(i).find(t=>t.deviceId===e)?.label:`Select Audio Input`),1)]),options:x(({hide:e})=>[(_(!0),s(r,null,v(T(i),t=>(_(),o(T(O),{key:t.deviceId,value:t.deviceId,active:t.deviceId===T(u),onClick:t=>e()},{default:x(()=>[c(E(t.label),1)]),_:2},1032,[`value`,`active`,`onClick`]))),128))]),_:1},8,[`modelValue`]),a(`div`,j,[l(T(t),{onClick:T(y)},{default:x(()=>f[2]||=[c(` Start Recording `,-1)]),_:1,__:[2]},8,[`onClick`]),l(T(t),{onClick:T(b)},{default:x(()=>f[3]||=[c(` Stop Recording `,-1)]),_:1,__:[3]},8,[`onClick`])])]))}}),N=M;export{N as default}; \ No newline at end of file +import{cH as e,ci as t,d$ as n,dQ as r,dS as i,dT as a,dU as o,dW as s,dX as c,dY as l,dZ as u,dc as d,dl as f,do as p,e1 as m,e3 as h,e4 as g,e5 as _,e6 as v,e7 as y,ec as b,ed as x,ef as S,eg as C,ej as w,ek as T,eo as E}from"./index-D1IGsMK6.js";var D=u({__name:`Option`,props:{value:{},label:{},active:{type:Boolean}},setup(e){let t=e,r=n(`selectOption`),i=n(`hide`);return(e,n)=>(_(),s(`div`,m({...e.$attrs,class:null,style:null},{class:[`cursor-pointer rounded px-2 py-1 text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800`,{"bg-neutral-100 dark:bg-neutral-800":t.active}],"line-clamp-1":``,"overflow-hidden":``,"text-ellipsis":``,"whitespace-pre-wrap":``,text:`xs sm:sm`,"transition-colors":``,"duration-150":``,"ease-in-out":``,"will-change-background-color":``,"will-change-color":``,onClick:n[0]||=()=>{T(r)(t.value),T(i)()}}),[y(e.$slots,`default`,{},()=>[c(E(t.label),1)])],16))}}),O=D;function k(){let e=d({constraints:{audio:!0},requestPermissions:!1}),t=C(e.audioInputs.value[0]?.deviceId||``),n=C(),r=i(()=>e.audioInputs.value),a=C({audio:!0}),o=f({constraints:a,autoSwitch:!0,enabled:!1});async function s(){e.permissionGranted.value||e.isSupported.value&&await e.ensurePermissions()}b(t,()=>{t.value&&(a.value={audio:{deviceId:{exact:t.value}}})},{immediate:!0}),b(e.audioInputs,()=>{n.value=r.value.find(e=>e.deviceId===t.value)},{immediate:!0}),b([e.permissionGranted,r,t],async()=>{await s(),e.permissionGranted.value&&r.value.length!==0&&(n.value||=r.value[0])},{immediate:!0});async function c(){await s(),e.permissionGranted.value&&n.value&&(o.enabled.value&&o.restart(),o.start())}function l(){o.stop()}return{selectedAudioInputId:t,selectedAudioInput:n,audioInputs:r,start:c,stop:l,request:s,media:o}}function A(e,t=()=>Promise.resolve()){let n=C(),r=w(e);async function i(){if(await t(),await p(r).toBeTruthy(),!r.value){console.error(`No media media available`);return}n.value=new MediaRecorder(r.value),n.value.start()}function a(){n.value&&(n.value.stop(),n.value.ondataavailable=e=>{let t=e.data,n=URL.createObjectURL(t),r=new Audio(n);r.play()})}return{startRecord:i,stopRecord:a}}const j={class:`mt-4 w-full flex justify-center gap-2`};var M=u({__name:`audio-record`,setup(n){let{audioInputs:i,selectedAudioInputId:u,start:d,stop:f,media:p,request:m}=k(),{startRecord:y,stopRecord:b}=A(p.stream,d);return h(()=>m()),g(()=>f()),(n,f)=>(_(),s(`div`,null,[l(T(e),{modelValue:T(u),"onUpdate:modelValue":f[0]||=e=>S(u)?u.value=e:null,onChange:f[1]||=()=>T(d)()},{default:x(({value:e})=>[a(`div`,null,E(e?T(i).find(t=>t.deviceId===e)?.label:`Select Audio Input`),1)]),options:x(({hide:e})=>[(_(!0),s(r,null,v(T(i),t=>(_(),o(T(O),{key:t.deviceId,value:t.deviceId,active:t.deviceId===T(u),onClick:t=>e()},{default:x(()=>[c(E(t.label),1)]),_:2},1032,[`value`,`active`,`onClick`]))),128))]),_:1},8,[`modelValue`]),a(`div`,j,[l(T(t),{onClick:T(y)},{default:x(()=>f[2]||=[c(` Start Recording `,-1)]),_:1,__:[2]},8,[`onClick`]),l(T(t),{onClick:T(b)},{default:x(()=>f[3]||=[c(` Stop Recording `,-1)]),_:1,__:[3]},8,[`onClick`])])]))}}),N=M;export{N as default}; \ No newline at end of file diff --git a/assets/azure-ai-foundry-ByIXKIr5.js b/assets/azure-ai-foundry-BUoQbmRd.js similarity index 97% rename from assets/azure-ai-foundry-ByIXKIr5.js rename to assets/azure-ai-foundry-BUoQbmRd.js index 94d3d9e41321cd06a52852843053ceca6da61928..c3f370e3614a1f7ac8e6d30638dd431ade225fc3 100644 --- a/assets/azure-ai-foundry-ByIXKIr5.js +++ b/assets/azure-ai-foundry-BUoQbmRd.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,k as m,l as h,m as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`azure-ai-foundry`;var x=a({__name:`azure-ai-foundry`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.resourceName||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].resourceName=e}}),D=n({get:()=>C.value[b]?.apiVersion||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiVersion=e}}),O=n({get:()=>C.value[b]?.modelId||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].modelId=e}});o(()=>{C.value[b]||(C.value[b]={}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.resourceName||``,D.value=C.value[b]?.apiVersion||``,O.value=C.value[b]?.modelId||``}),c([T,E,D,O],()=>{C.value[b]={...C.value[b],apiKey:T.value,resourceName:E.value,apiVersion:D.value,modelId:O.value}});function k(){C.value[b]={}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName||`Azure OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":k},{default:l(()=>[i(u(m),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`Azure OpenAI`,placeholder:`...`,required:``},null,8,[`modelValue`,`provider-name`]),i(u(g),{modelValue:E.value,"onUpdate:modelValue":t[1]||=e=>E.value=e,label:`Resouce name`,placeholder:`...`,description:`Prefix used in https://.services.ai.azure.com`,required:``},null,8,[`modelValue`]),i(u(g),{modelValue:O.value,"onUpdate:modelValue":t[2]||=e=>O.value=e,label:`Model id`,placeholder:`...`,description:`Model ID on Azure AI Foundry`,required:``},null,8,[`modelValue`])]),_:1},8,[`title`,`description`]),i(u(h),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(g),{modelValue:D.value,"onUpdate:modelValue":t[3]||=e=>D.value=e,label:`API version`,placeholder:`e.g. 2025-04-01-preview`,description:`API version for snapshot of the models`},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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,k as m,l as h,m as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`azure-ai-foundry`;var x=a({__name:`azure-ai-foundry`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.resourceName||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].resourceName=e}}),D=n({get:()=>C.value[b]?.apiVersion||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiVersion=e}}),O=n({get:()=>C.value[b]?.modelId||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].modelId=e}});o(()=>{C.value[b]||(C.value[b]={}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.resourceName||``,D.value=C.value[b]?.apiVersion||``,O.value=C.value[b]?.modelId||``}),c([T,E,D,O],()=>{C.value[b]={...C.value[b],apiKey:T.value,resourceName:E.value,apiVersion:D.value,modelId:O.value}});function k(){C.value[b]={}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName||`Azure OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":k},{default:l(()=>[i(u(m),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`Azure OpenAI`,placeholder:`...`,required:``},null,8,[`modelValue`,`provider-name`]),i(u(g),{modelValue:E.value,"onUpdate:modelValue":t[1]||=e=>E.value=e,label:`Resouce name`,placeholder:`...`,description:`Prefix used in https://.services.ai.azure.com`,required:``},null,8,[`modelValue`]),i(u(g),{modelValue:O.value,"onUpdate:modelValue":t[2]||=e=>O.value=e,label:`Model id`,placeholder:`...`,description:`Model ID on Azure AI Foundry`,required:``},null,8,[`modelValue`])]),_:1},8,[`title`,`description`]),i(u(h),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(g),{modelValue:D.value,"onUpdate:modelValue":t[3]||=e=>D.value=e,label:`API version`,placeholder:`e.g. 2025-04-01-preview`,description:`API version for snapshot of the models`},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/background-gradient-blending-Dc6neL0J.js b/assets/background-gradient-blending-BFp2Vmjq.js similarity index 99% rename from assets/background-gradient-blending-Dc6neL0J.js rename to assets/background-gradient-blending-BFp2Vmjq.js index e0095dc76a2b07e0456eb4f5e691a85d0df7a7a3..84d0ea9603bbd91f9ba0a3917aba1113e78fa0da 100644 --- a/assets/background-gradient-blending-Dc6neL0J.js +++ b/assets/background-gradient-blending-BFp2Vmjq.js @@ -1,4 +1,4 @@ -import{d as e}from"./theme-color-DipcFg9a.js";import{cA as t,cN as n,dQ as r,dS as i,dT as a,dW as o,dX as s,dY as c,dZ as l,dm as u,e0 as d,e2 as f,e3 as p,e4 as m,e5 as h,e6 as g,e7 as _,ea as v,eb as y,ec as b,ed as x,eg as S,ek as C,el as w,en as T,eo as E}from"./index-BqrqTEsQ.js";import{b as ee}from"./browser-bFm1l1qg.js";const D=[`accept`,`multiple`];var te=l({__name:`BasicInputFile`,props:d({accept:{},multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=v(e,`modelValue`),n=S(),r=S(!1),i=u(r,150);function s(e){let i=e.target;i.files&&i.files.length>0&&(n.value=i.files[0]),t.value=Array.from(i.files||[]),r.value=!1}return(e,c)=>(h(),o(`label`,{relative:``,"cursor-pointer":``,onDragover:c[0]||=e=>r.value=!0,onDragleave:c[1]||=e=>r.value=!1},[a(`input`,{type:`file`,accept:e.accept,multiple:e.multiple,class:`absolute inset-0 h-full w-full opacity-0`,onChange:s},null,40,D),_(e.$slots,`default`,{isDragging:C(i),firstFile:n.value,files:t.value})],32))}}),ne=te,O=function(e,t){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},O(e,t)};function k(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);O(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var re=function(){return re=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]=55296&&i<=56319&&n>10)+55296,o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},ce=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,le=typeof Uint8Array>`u`?[]:new Uint8Array(256),ue=0;ue`u`?[]:new Uint8Array(256),pe=0;pe>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},he=function(e){for(var t=e.length,n=[],r=0;r>_e,Se=1<<_e,Ce=Se-1,we=1024>>_e,Te=xe+we,Ee=Te,De=32,Oe=Ee+De,ke=65536>>ve,Ae=1<=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>_e],t=(t<>_e)],t=(t<>ve),t=this.index[t],t+=e>>_e&je,t=this.index[t],t=(t<`u`?[]:new Uint8Array(256),Re=0;ReBe?(i.push(!0),o-=Be):i.push(!1),[`normal`,`auto`,`loose`].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(e)!==-1)return r.push(a),n.push(tt);if(o===We||o===Xe){if(a===0)return r.push(a),n.push(mt);var s=n[a-1];return It.indexOf(s)===-1?(r.push(r[a-1]),n.push(s)):(r.push(a),n.push(mt))}if(r.push(a),o===ht)return n.push(t===`strict`?ot:xt);if(o===Et||o===pt)return n.push(mt);if(o===Dt)return e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(xt):n.push(mt);n.push(o)}),[r,n,i]},Bt=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?e.indexOf(i)!==-1:e===i)for(var a=n;a<=r.length;){a++;var o=r[a];if(o===t)return!0;if(o!==Ye)break}if(i===Ye)for(var a=n;a>0;){a--;var s=r[a];if(Array.isArray(e)?e.indexOf(s)!==-1:e===s)for(var c=n;c<=r.length;){c++;var o=r[c];if(o===t)return!0;if(o!==Ye)break}if(s!==Ye)break}return!1},Vt=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r===Ye)n--;else return r}return 0},Ht=function(e,t,n,r,i){if(n[r]===0)return F;var a=r-1;if(Array.isArray(i)&&i[a]===!0)return F;var o=a-1,s=a+1,c=t[a],l=o>=0?t[o]:0,u=t[s];if(c===He&&u===Ue)return F;if(Nt.indexOf(c)!==-1)return kt;if(Nt.indexOf(u)!==-1||Pt.indexOf(u)!==-1)return F;if(Vt(a,t)===qe)return At;if(jt.get(e[a])===Xe||(c===gt||c===_t)&&jt.get(e[s])===Xe||c===Ke||u===Ke||c===Je||[Ye,Qe,et].indexOf(c)===-1&&u===Je||[nt,rt,it,lt,ft].indexOf(u)!==-1||Vt(a,t)===st||Bt(ct,st,a,t)||Bt([nt,rt],ot,a,t)||Bt(Ze,Ze,a,t))return F;if(c===Ye)return At;if(c===ct||u===ct)return F;if(u===tt||c===tt)return At;if([Qe,et,ot].indexOf(u)!==-1||c===$e||l===bt&&Rt.indexOf(c)!==-1||c===ft&&u===bt||u===at||Mt.indexOf(u)!==-1&&c===P||Mt.indexOf(c)!==-1&&u===P||c===dt&&[xt,gt,_t].indexOf(u)!==-1||[xt,gt,_t].indexOf(c)!==-1&&u===ut||Mt.indexOf(c)!==-1&&Ft.indexOf(u)!==-1||Ft.indexOf(c)!==-1&&Mt.indexOf(u)!==-1||[dt,ut].indexOf(c)!==-1&&(u===P||[st,et].indexOf(u)!==-1&&t[s+1]===P)||[st,et].indexOf(c)!==-1&&u===P||c===P&&[P,ft,lt].indexOf(u)!==-1)return F;if([P,ft,lt,nt,rt].indexOf(u)!==-1)for(var d=a;d>=0;){var f=t[d];if(f===P)return F;if([ft,lt].indexOf(f)!==-1)d--;else break}if([dt,ut].indexOf(u)!==-1)for(var d=[nt,rt].indexOf(c)===-1?a:o;d>=0;){var f=t[d];if(f===P)return F;if([ft,lt].indexOf(f)!==-1)d--;else break}if(St===c&&[St,Ct,vt,yt].indexOf(u)!==-1||[Ct,vt].indexOf(c)!==-1&&[Ct,wt].indexOf(u)!==-1||[wt,yt].indexOf(c)!==-1&&u===wt||Lt.indexOf(c)!==-1&&[at,ut].indexOf(u)!==-1||Lt.indexOf(u)!==-1&&c===dt||Mt.indexOf(c)!==-1&&Mt.indexOf(u)!==-1||c===lt&&Mt.indexOf(u)!==-1||Mt.concat(P).indexOf(c)!==-1&&u===st&&Ot.indexOf(e[s])===-1||Mt.concat(P).indexOf(u)!==-1&&c===rt)return F;if(c===Tt&&u===Tt){for(var p=n[a],m=1;p>0&&(p--,t[p]===Tt);)m++;if(m%2!=0)return F}return c===gt&&u===_t?F:At},Ut=function(e,t){t||={lineBreak:`normal`,wordBreak:`normal`};var n=zt(e,t.lineBreak),r=n[0],i=n[1],a=n[2];(t.wordBreak===`break-all`||t.wordBreak===`break-word`)&&(i=i.map(function(e){return[P,mt,Et].indexOf(e)===-1?e:xt}));var o=t.wordBreak===`keep-all`?a.map(function(t,n){return t&&e[n]>=19968&&e[n]<=40959}):void 0;return[r,i,o]},Wt=function(){function e(e,t,n,r){this.codePoints=e,this.required=t===kt,this.start=n,this.end=r}return e.prototype.slice=function(){return N.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),Gt=function(e,t){var n=se(e),r=Ut(n,t),i=r[0],a=r[1],o=r[2],s=n.length,c=0,l=0;return{next:function(){if(l>=s)return{done:!0,value:null};for(var e=F;l=Rn&&e<=57},Yn=function(e){return e>=55296&&e<=57343},Xn=function(e){return L(e)||e>=Wn&&e<=Kn||e>=zn&&e<=Vn},Zn=function(e){return e>=zn&&e<=Un},Qn=function(e){return e>=Wn&&e<=Jn},$n=function(e){return Zn(e)||Qn(e)},er=function(e){return e>=Cn},tr=function(e){return e===Xt||e===$t||e===en},nr=function(e){return $n(e)||er(e)||e===un},rr=function(e){return nr(e)||L(e)||e===I},ir=function(e){return e>=jn&&e<=Mn||e===Nn||e>=Pn&&e<=Fn||e===In},ar=function(e,t){return e===Qt?t!==Xt:!1},or=function(e,t,n){return e===I?nr(t)||ar(t,n):nr(e)?!0:!!(e===Qt&&ar(e,t))},sr=function(e,t,n){return e===En||e===I?L(t)?!0:t===An&&L(n):L(e===An?t:e)},cr=function(e){var t=0,n=1;(e[t]===En||e[t]===I)&&(e[t]===I&&(n=-1),t++);for(var r=[];L(e[t]);)r.push(e[t++]);var i=r.length?parseInt(N.apply(void 0,r),10):0;e[t]===An&&t++;for(var a=[];L(e[t]);)a.push(e[t++]);var o=a.length,s=o?parseInt(N.apply(void 0,a),10):0;(e[t]===Gn||e[t]===Bn)&&t++;var c=1;(e[t]===En||e[t]===I)&&(e[t]===I&&(c=-1),t++);for(var l=[];L(e[t]);)l.push(e[t++]);var u=l.length?parseInt(N.apply(void 0,l),10):0;return n*(i+s*10**-o)*10**(c*u)},lr={type:2},ur={type:3},dr={type:4},fr={type:13},pr={type:8},mr={type:21},hr={type:9},gr={type:10},_r={type:11},vr={type:12},yr={type:14},br={type:23},xr={type:1},Sr={type:25},Cr={type:24},wr={type:26},Tr={type:27},Er={type:28},Dr={type:29},Or={type:31},kr={type:32},Ar=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(se(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==kr;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case tn:return this.consumeStringToken(tn);case rn:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(rr(t)||ar(n,r)){var i=or(t,n,r)?qt:Kt,a=this.consumeName();return{type:5,value:a,flags:i}}break;case an:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),fr;break;case sn:return this.consumeStringToken(sn);case cn:return lr;case ln:return ur;case Tn:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),yr;break;case En:if(sr(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Dn:return dr;case I:var o=e,s=this.peekCodePoint(0),c=this.peekCodePoint(1);if(sr(o,s,c))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(or(o,s,c))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(s===I&&c===pn)return this.consumeCodePoint(),this.consumeCodePoint(),Cr;break;case An:if(sr(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Zt:if(this.peekCodePoint(0)===Tn)for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(l===Tn&&(l=this.consumeCodePoint(),l===Zt)||l===Ln)return this.consumeToken()}break;case On:return wr;case kn:return Tr;case fn:if(this.peekCodePoint(0)===dn&&this.peekCodePoint(1)===I&&this.peekCodePoint(2)===I)return this.consumeCodePoint(),this.consumeCodePoint(),Sr;break;case mn:var u=this.peekCodePoint(0),d=this.peekCodePoint(1),f=this.peekCodePoint(2);if(or(u,d,f)){var a=this.consumeName();return{type:7,value:a}}break;case hn:return Er;case Qt:if(ar(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case gn:return Dr;case _n:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),pr;break;case vn:return _r;case bn:return vr;case Hn:case qn:var p=this.peekCodePoint(0),m=this.peekCodePoint(1);return p===En&&(Xn(m)||m===yn)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case xn:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),hr;if(this.peekCodePoint(0)===xn)return this.consumeCodePoint(),mr;break;case Sn:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),gr;break;case Ln:return kr}return tr(e)?(this.consumeWhiteSpace(),Or):L(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):nr(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:N(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return e===void 0?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Xn(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===yn&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var r=parseInt(N.apply(void 0,e.map(function(e){return e===yn?Rn:e})),16),i=parseInt(N.apply(void 0,e.map(function(e){return e===yn?Kn:e})),16);return{type:30,start:r,end:i}}var a=parseInt(N.apply(void 0,e),16);if(this.peekCodePoint(0)===I&&Xn(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var o=[];Xn(t)&&o.length<6;)o.push(t),t=this.consumeCodePoint();var i=parseInt(N.apply(void 0,o),16);return{type:30,start:a,end:i}}else return{type:30,start:a,end:a}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()===`url`&&this.peekCodePoint(0)===cn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===cn?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ln)return{type:22,value:``};var t=this.peekCodePoint(0);if(t===sn||t===tn){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ln||this.peekCodePoint(0)===ln)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),br)}for(;;){var r=this.consumeCodePoint();if(r===Ln||r===ln)return{type:22,value:N.apply(void 0,e)};if(tr(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ln||this.peekCodePoint(0)===ln?(this.consumeCodePoint(),{type:22,value:N.apply(void 0,e)}):(this.consumeBadUrlRemnants(),br);if(r===tn||r===sn||r===cn||ir(r))return this.consumeBadUrlRemnants(),br;if(r===Qt)if(ar(r,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),br;else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;tr(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===ln||e===Ln)return;ar(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t=5e4,n=``;e>0;){var r=Math.min(t,e);n+=N.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),n},e.prototype.consumeStringToken=function(e){var t=``,n=0;do{var r=this._value[n];if(r===Ln||r===void 0||r===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(r===Xt)return this._value.splice(0,n),xr;if(r===Qt){var i=this._value[n+1];i!==Ln&&i!==void 0&&(i===Xt?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):ar(r,i)&&(t+=this.consumeStringSlice(n),t+=N(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},e.prototype.consumeNumber=function(){var e=[],t=Jt,n=this.peekCodePoint(0);for((n===En||n===I)&&e.push(this.consumeCodePoint());L(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(n===An&&L(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Yt;L(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((n===Gn||n===Bn)&&((r===En||r===I)&&L(i)||L(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Yt;L(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[cr(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),a=this.peekCodePoint(2);if(or(r,i,a)){var o=this.consumeName();return{type:15,number:t,flags:n,unit:o}}return r===on?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Xn(e)){for(var t=N(e);Xn(this.peekCodePoint(0))&&t.length<6;)t+=N(this.consumeCodePoint());tr(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return n===0||Yn(n)||n>1114111?wn:n}return e===Ln?wn:e},e.prototype.consumeName=function(){for(var e=``;;){var t=this.consumeCodePoint();if(rr(t))e+=N(t);else if(ar(t,this.peekCodePoint(0)))e+=N(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},e}(),jr=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Ar;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw SyntaxError(`Error parsing CSS component value, unexpected EOF`);this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw SyntaxError(`Error parsing CSS component value, multiple values found when expecting only one`)},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===32)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(n.type===32||zr(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return e===void 0?kr:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Mr=function(e){return e.type===15},Nr=function(e){return e.type===17},R=function(e){return e.type===20},Pr=function(e){return e.type===0},Fr=function(e,t){return R(e)&&e.value===t},Ir=function(e){return e.type!==31},Lr=function(e){return e.type!==31&&e.type!==4},Rr=function(e){var t=[],n=[];return e.forEach(function(e){if(e.type===4){if(n.length===0)throw Error(`Error parsing function args, zero tokens for arg`);t.push(n),n=[];return}e.type!==31&&n.push(e)}),n.length&&t.push(n),t},zr=function(e,t){return t===11&&e.type===12||t===28&&e.type===29?!0:t===2&&e.type===3},Br=function(e){return e.type===17||e.type===15},z=function(e){return e.type===16||Br(e)},Vr=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},B={type:17,number:0,flags:Jt},Hr={type:16,number:50,flags:Jt},Ur={type:16,number:100,flags:Jt},Wr=function(e,t,n){var r=e[0],i=e[1];return[V(r,t),V(i===void 0?r:i,n)]},V=function(e,t){if(e.type===16)return e.number/100*t;if(Mr(e))switch(e.unit){case`rem`:case`em`:return 16*e.number;case`px`:default:return e.number}return e.number},Gr=`deg`,Kr=`grad`,qr=`rad`,Jr=`turn`,Yr={name:`angle`,parse:function(e,t){if(t.type===15)switch(t.unit){case Gr:return Math.PI*t.number/180;case Kr:return Math.PI/200*t.number;case qr:return t.number;case Jr:return Math.PI*2*t.number}throw Error(`Unsupported angle type`)}},Xr=function(e){return e.type===15&&(e.unit===Gr||e.unit===Kr||e.unit===qr||e.unit===Jr)},Zr=function(e){var t=e.filter(R).map(function(e){return e.value}).join(` `);switch(t){case`to bottom right`:case`to right bottom`:case`left top`:case`top left`:return[B,B];case`to top`:case`bottom`:return H(0);case`to bottom left`:case`to left bottom`:case`right top`:case`top right`:return[B,Ur];case`to right`:case`left`:return H(90);case`to top left`:case`to left top`:case`right bottom`:case`bottom right`:return[Ur,Ur];case`to bottom`:case`top`:return H(180);case`to top right`:case`to right top`:case`left bottom`:case`bottom left`:return[Ur,B];case`to left`:case`right`:return H(270)}return 0},H=function(e){return Math.PI*e/180},Qr={name:`color`,parse:function(e,t){if(t.type===18){var n=ai[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported color function "`+t.name+`"`);return n(e,t.values)}if(t.type===5){if(t.value.length===3){var r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);return ei(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(t.value.length===4){var r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3),o=t.value.substring(3,4);return ei(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16)/255)}if(t.value.length===6){var r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6);return ei(parseInt(r,16),parseInt(i,16),parseInt(a,16),1)}if(t.value.length===8){var r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6),o=t.value.substring(6,8);return ei(parseInt(r,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(t.type===20){var s=si[t.value.toUpperCase()];if(s!==void 0)return s}return si.TRANSPARENT}},$r=function(e){return(255&e)==0},U=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?`rgba(`+i+`,`+r+`,`+n+`,`+t/255+`)`:`rgb(`+i+`,`+r+`,`+n+`)`},ei=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(r*255)<<0)>>>0},ti=function(e,t){if(e.type===17)return e.number;if(e.type===16){var n=t===3?1:255;return t===3?e.number/100*n:Math.round(e.number/100*n)}return 0},ni=function(e,t){var n=t.filter(Lr);if(n.length===3){var r=n.map(ti),i=r[0],a=r[1],o=r[2];return ei(i,a,o,1)}if(n.length===4){var s=n.map(ti),i=s[0],a=s[1],o=s[2],c=s[3];return ei(i,a,o,c)}return 0};function ri(e,t,n){return n<0&&(n+=1),n>=1&&--n,n<1/6?(t-e)*n*6+e:n<1/2?t:n<2/3?(t-e)*6*(2/3-n)+e:e}var ii=function(e,t){var n=t.filter(Lr),r=n[0],i=n[1],a=n[2],o=n[3],s=(r.type===17?H(r.number):Yr.parse(e,r))/(Math.PI*2),c=z(i)?i.number/100:0,l=z(a)?a.number/100:0,u=o!==void 0&&z(o)?V(o,1):1;if(c===0)return ei(l*255,l*255,l*255,1);var d=l<=.5?l*(c+1):l+c-l*c,f=l*2-d,p=ri(f,d,s+1/3),m=ri(f,d,s),h=ri(f,d,s-1/3);return ei(p*255,m*255,h*255,u)},ai={hsl:ii,hsla:ii,rgb:ni,rgba:ni},oi=function(e,t){return Qr.parse(e,jr.create(t).parseComponentValue())},si={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ci={name:`background-clip`,initialValue:`border-box`,prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(R(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2}return 0})}},li={name:`background-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},ui=function(e,t){var n=Qr.parse(e,t[0]),r=t[1];return r&&z(r)?{color:n,stop:r}:{color:n,stop:null}},di=function(e,t){var n=e[0],r=e[e.length-1];n.stop===null&&(n.stop=B),r.stop===null&&(r.stop=Ur);for(var i=[],a=0,o=0;oa?i.push(c):i.push(a),a=c}else i.push(null)}for(var l=null,o=0;oe.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},hi=function(e,t,n,r,i){var a=0,o=0;switch(e.size){case 0:e.shape===0?a=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(e.shape===0)a=o=Math.min(W(t,n),W(t,n-i),W(t-r,n),W(t-r,n-i));else if(e.shape===1){var s=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),c=mi(r,i,t,n,!0),l=c[0],u=c[1];a=W(l-t,(u-n)/s),o=s*a}break;case 1:e.shape===0?a=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(e.shape===0)a=o=Math.max(W(t,n),W(t,n-i),W(t-r,n),W(t-r,n-i));else if(e.shape===1){var s=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r)),d=mi(r,i,t,n,!1),l=d[0],u=d[1];a=W(l-t,(u-n)/s),o=s*a}break}return Array.isArray(e.size)&&(a=V(e.size[0],r),o=e.size.length===2?V(e.size[1],i):a),[a,o]},gi=function(e,t){var n=H(180),r=[];return Rr(t).forEach(function(t,i){if(i===0){var a=t[0];if(a.type===20&&a.value===`to`){n=Zr(t);return}else if(Xr(a)){n=Yr.parse(e,a);return}}var o=ui(e,t);r.push(o)}),{angle:n,stops:r,type:1}},_i=function(e,t){var n=H(180),r=[];return Rr(t).forEach(function(t,i){if(i===0){var a=t[0];if(a.type===20&&[`top`,`left`,`right`,`bottom`].indexOf(a.value)!==-1){n=Zr(t);return}else if(Xr(a)){n=(Yr.parse(e,a)+H(270))%H(360);return}}var o=ui(e,t);r.push(o)}),{angle:n,stops:r,type:1}},vi=function(e,t){var n=H(180),r=[],i=1,a=0,o=3,s=[];return Rr(t).forEach(function(t,n){var a=t[0];if(n===0){if(R(a)&&a.value===`linear`){i=1;return}else if(R(a)&&a.value===`radial`){i=2;return}}if(a.type===18){if(a.name===`from`){var o=Qr.parse(e,a.values[0]);r.push({stop:B,color:o})}else if(a.name===`to`){var o=Qr.parse(e,a.values[0]);r.push({stop:Ur,color:o})}else if(a.name===`color-stop`){var s=a.values.filter(Lr);if(s.length===2){var o=Qr.parse(e,s[1]),c=s[0];Nr(c)&&r.push({stop:{type:16,number:c.number*100,flags:c.flags},color:o})}}}}),i===1?{angle:(n+H(180))%H(360),stops:r,type:i}:{size:o,shape:a,stops:r,position:s,type:i}},yi=`closest-side`,bi=`farthest-side`,xi=`closest-corner`,Si=`farthest-corner`,Ci=`circle`,wi=`ellipse`,Ti=`cover`,Ei=`contain`,Di=function(e,t){var n=0,r=3,i=[],a=[];return Rr(t).forEach(function(t,o){var s=!0;if(o===0){var c=!1;s=t.reduce(function(e,t){if(c)if(R(t))switch(t.value){case`center`:return a.push(Hr),e;case`top`:case`left`:return a.push(B),e;case`right`:case`bottom`:return a.push(Ur),e}else (z(t)||Br(t))&&a.push(t);else if(R(t))switch(t.value){case Ci:return n=0,!1;case wi:return n=1,!1;case`at`:return c=!0,!1;case yi:return r=0,!1;case Ti:case bi:return r=1,!1;case Ei:case xi:return r=2,!1;case Si:return r=3,!1}else if(Br(t)||z(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)}if(s){var l=ui(e,t);i.push(l)}}),{size:r,shape:n,stops:i,position:a,type:2}},Oi=function(e,t){var n=0,r=3,i=[],a=[];return Rr(t).forEach(function(t,o){var s=!0;if(o===0?s=t.reduce(function(e,t){if(R(t))switch(t.value){case`center`:return a.push(Hr),!1;case`top`:case`left`:return a.push(B),!1;case`right`:case`bottom`:return a.push(Ur),!1}else if(z(t)||Br(t))return a.push(t),!1;return e},s):o===1&&(s=t.reduce(function(e,t){if(R(t))switch(t.value){case Ci:return n=0,!1;case wi:return n=1,!1;case Ei:case yi:return r=0,!1;case bi:return r=1,!1;case xi:return r=2,!1;case Ti:case Si:return r=3,!1}else if(Br(t)||z(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)),s){var c=ui(e,t);i.push(c)}}),{size:r,shape:n,stops:i,position:a,type:2}},ki=function(e){return e.type===1},Ai=function(e){return e.type===2},ji={name:`image`,parse:function(e,t){if(t.type===22){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(t.type===18){var r=Ni[t.name];if(r===void 0)throw Error(`Attempting to parse an unsupported image function "`+t.name+`"`);return r(e,t.values)}throw Error(`Unsupported image type `+t.type)}};function Mi(e){return!(e.type===20&&e.value===`none`)&&(e.type!==18||!!Ni[e.name])}var Ni={"linear-gradient":gi,"-moz-linear-gradient":_i,"-ms-linear-gradient":_i,"-o-linear-gradient":_i,"-webkit-linear-gradient":_i,"radial-gradient":Di,"-moz-radial-gradient":Oi,"-ms-radial-gradient":Oi,"-o-radial-gradient":Oi,"-webkit-radial-gradient":Oi,"-webkit-gradient":vi},Pi={name:`background-image`,initialValue:`none`,type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var n=t[0];return n.type===20&&n.value===`none`?[]:t.filter(function(e){return Lr(e)&&Mi(e)}).map(function(t){return ji.parse(e,t)})}},Fi={name:`background-origin`,initialValue:`border-box`,prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(R(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2}return 0})}},Ii={name:`background-position`,initialValue:`0% 0%`,type:1,prefix:!1,parse:function(e,t){return Rr(t).map(function(e){return e.filter(z)}).map(Vr)}},Li={name:`background-repeat`,initialValue:`repeat`,prefix:!1,type:1,parse:function(e,t){return Rr(t).map(function(e){return e.filter(R).map(function(e){return e.value}).join(` `)}).map(Ri)}},Ri=function(e){switch(e){case`no-repeat`:return 1;case`repeat-x`:case`repeat no-repeat`:return 2;case`repeat-y`:case`no-repeat repeat`:return 3;case`repeat`:default:return 0}},zi;(function(e){e.AUTO=`auto`,e.CONTAIN=`contain`,e.COVER=`cover`})(zi||={});var Bi={name:`background-size`,initialValue:`0`,prefix:!1,type:1,parse:function(e,t){return Rr(t).map(function(e){return e.filter(Vi)})}},Vi=function(e){return R(e)||z(e)},Hi=function(e){return{name:`border-`+e+`-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`}},Ui=Hi(`top`),Wi=Hi(`right`),Gi=Hi(`bottom`),Ki=Hi(`left`),qi=function(e){return{name:`border-radius-`+e,initialValue:`0 0`,prefix:!1,type:1,parse:function(e,t){return Vr(t.filter(z))}}},Ji=qi(`top-left`),Yi=qi(`top-right`),Xi=qi(`bottom-right`),Zi=qi(`bottom-left`),Qi=function(e){return{name:`border-`+e+`-style`,initialValue:`solid`,prefix:!1,type:2,parse:function(e,t){switch(t){case`none`:return 0;case`dashed`:return 2;case`dotted`:return 3;case`double`:return 4}return 1}}},$i=Qi(`top`),ea=Qi(`right`),ta=Qi(`bottom`),na=Qi(`left`),ra=function(e){return{name:`border-`+e+`-width`,initialValue:`0`,type:0,prefix:!1,parse:function(e,t){return Mr(t)?t.number:0}}},ia=ra(`top`),aa=ra(`right`),oa=ra(`bottom`),sa=ra(`left`),ca={name:`color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},la={name:`direction`,initialValue:`ltr`,prefix:!1,type:2,parse:function(e,t){switch(t){case`rtl`:return 1;case`ltr`:default:return 0}}},ua={name:`display`,initialValue:`inline-block`,prefix:!1,type:1,parse:function(e,t){return t.filter(R).reduce(function(e,t){return e|da(t.value)},0)}},da=function(e){switch(e){case`block`:case`-webkit-box`:return 2;case`inline`:return 4;case`run-in`:return 8;case`flow`:return 16;case`flow-root`:return 32;case`table`:return 64;case`flex`:case`-webkit-flex`:return 128;case`grid`:case`-ms-grid`:return 256;case`ruby`:return 512;case`subgrid`:return 1024;case`list-item`:return 2048;case`table-row-group`:return 4096;case`table-header-group`:return 8192;case`table-footer-group`:return 16384;case`table-row`:return 32768;case`table-cell`:return 65536;case`table-column-group`:return 131072;case`table-column`:return 262144;case`table-caption`:return 524288;case`ruby-base`:return 1048576;case`ruby-text`:return 2097152;case`ruby-base-container`:return 4194304;case`ruby-text-container`:return 8388608;case`contents`:return 16777216;case`inline-block`:return 33554432;case`inline-list-item`:return 67108864;case`inline-table`:return 134217728;case`inline-flex`:return 268435456;case`inline-grid`:return 536870912}return 0},fa={name:`float`,initialValue:`none`,prefix:!1,type:2,parse:function(e,t){switch(t){case`left`:return 1;case`right`:return 2;case`inline-start`:return 3;case`inline-end`:return 4}return 0}},pa={name:`letter-spacing`,initialValue:`0`,prefix:!1,type:0,parse:function(e,t){return t.type===20&&t.value===`normal`?0:t.type===17||t.type===15?t.number:0}},ma;(function(e){e.NORMAL=`normal`,e.STRICT=`strict`})(ma||={});var ha={name:`line-break`,initialValue:`normal`,prefix:!1,type:2,parse:function(e,t){switch(t){case`strict`:return ma.STRICT;case`normal`:default:return ma.NORMAL}}},ga={name:`line-height`,initialValue:`normal`,prefix:!1,type:4},_a=function(e,t){return R(e)&&e.value===`normal`?1.2*t:e.type===17?t*e.number:z(e)?V(e,t):t},va={name:`list-style-image`,initialValue:`none`,type:0,prefix:!1,parse:function(e,t){return t.type===20&&t.value===`none`?null:ji.parse(e,t)}},ya={name:`list-style-position`,initialValue:`outside`,prefix:!1,type:2,parse:function(e,t){switch(t){case`inside`:return 0;case`outside`:default:return 1}}},ba={name:`list-style-type`,initialValue:`none`,prefix:!1,type:2,parse:function(e,t){switch(t){case`disc`:return 0;case`circle`:return 1;case`square`:return 2;case`decimal`:return 3;case`cjk-decimal`:return 4;case`decimal-leading-zero`:return 5;case`lower-roman`:return 6;case`upper-roman`:return 7;case`lower-greek`:return 8;case`lower-alpha`:return 9;case`upper-alpha`:return 10;case`arabic-indic`:return 11;case`armenian`:return 12;case`bengali`:return 13;case`cambodian`:return 14;case`cjk-earthly-branch`:return 15;case`cjk-heavenly-stem`:return 16;case`cjk-ideographic`:return 17;case`devanagari`:return 18;case`ethiopic-numeric`:return 19;case`georgian`:return 20;case`gujarati`:return 21;case`gurmukhi`:return 22;case`hebrew`:return 22;case`hiragana`:return 23;case`hiragana-iroha`:return 24;case`japanese-formal`:return 25;case`japanese-informal`:return 26;case`kannada`:return 27;case`katakana`:return 28;case`katakana-iroha`:return 29;case`khmer`:return 30;case`korean-hangul-formal`:return 31;case`korean-hanja-formal`:return 32;case`korean-hanja-informal`:return 33;case`lao`:return 34;case`lower-armenian`:return 35;case`malayalam`:return 36;case`mongolian`:return 37;case`myanmar`:return 38;case`oriya`:return 39;case`persian`:return 40;case`simp-chinese-formal`:return 41;case`simp-chinese-informal`:return 42;case`tamil`:return 43;case`telugu`:return 44;case`thai`:return 45;case`tibetan`:return 46;case`trad-chinese-formal`:return 47;case`trad-chinese-informal`:return 48;case`upper-armenian`:return 49;case`disclosure-open`:return 50;case`disclosure-closed`:return 51;case`none`:default:return-1}}},xa=function(e){return{name:`margin-`+e,initialValue:`0`,prefix:!1,type:4}},Sa=xa(`top`),Ca=xa(`right`),wa=xa(`bottom`),Ta=xa(`left`),Ea={name:`overflow`,initialValue:`visible`,prefix:!1,type:1,parse:function(e,t){return t.filter(R).map(function(e){switch(e.value){case`hidden`:return 1;case`scroll`:return 2;case`clip`:return 3;case`auto`:return 4;case`visible`:default:return 0}})}},Da={name:`overflow-wrap`,initialValue:`normal`,prefix:!1,type:2,parse:function(e,t){switch(t){case`break-word`:return`break-word`;case`normal`:default:return`normal`}}},Oa=function(e){return{name:`padding-`+e,initialValue:`0`,prefix:!1,type:3,format:`length-percentage`}},ka=Oa(`top`),Aa=Oa(`right`),ja=Oa(`bottom`),Ma=Oa(`left`),Na={name:`text-align`,initialValue:`left`,prefix:!1,type:2,parse:function(e,t){switch(t){case`right`:return 2;case`center`:case`justify`:return 1;case`left`:default:return 0}}},Pa={name:`position`,initialValue:`static`,prefix:!1,type:2,parse:function(e,t){switch(t){case`relative`:return 1;case`absolute`:return 2;case`fixed`:return 3;case`sticky`:return 4}return 0}},Fa={name:`text-shadow`,initialValue:`none`,type:1,prefix:!1,parse:function(e,t){return t.length===1&&Fr(t[0],`none`)?[]:Rr(t).map(function(t){for(var n={color:si.TRANSPARENT,offsetX:B,offsetY:B,blur:B},r=0,i=0;i1?1:0],this.overflowWrap=K(e,Da,t.overflowWrap),this.paddingTop=K(e,ka,t.paddingTop),this.paddingRight=K(e,Aa,t.paddingRight),this.paddingBottom=K(e,ja,t.paddingBottom),this.paddingLeft=K(e,Ma,t.paddingLeft),this.paintOrder=K(e,uo,t.paintOrder),this.position=K(e,Pa,t.position),this.textAlign=K(e,Na,t.textAlign),this.textDecorationColor=K(e,Xa,(n=t.textDecorationColor)??t.color),this.textDecorationLine=K(e,Za,(r=t.textDecorationLine)??t.textDecoration),this.textShadow=K(e,Fa,t.textShadow),this.textTransform=K(e,Ia,t.textTransform),this.transform=K(e,La,t.transform),this.transformOrigin=K(e,Ua,t.transformOrigin),this.visibility=K(e,Wa,t.visibility),this.webkitTextStrokeColor=K(e,fo,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=K(e,po,t.webkitTextStrokeWidth),this.wordBreak=K(e,Ka,t.wordBreak),this.zIndex=K(e,qa,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return $r(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return G(this.display,4)||G(this.display,33554432)||G(this.display,268435456)||G(this.display,536870912)||G(this.display,67108864)||G(this.display,134217728)},e}(),ho=function(){function e(e,t){this.content=K(e,ro,t.content),this.quotes=K(e,so,t.quotes)}return e}(),go=function(){function e(e,t){this.counterIncrement=K(e,io,t.counterIncrement),this.counterReset=K(e,ao,t.counterReset)}return e}(),K=function(e,t,n){var r=new Ar,i=n==null?t.initialValue:n.toString();r.write(i);var a=new jr(r.read());switch(t.type){case 2:var o=a.parseComponentValue();return t.parse(e,R(o)?o.value:t.initialValue);case 0:return t.parse(e,a.parseComponentValue());case 1:return t.parse(e,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(t.format){case`angle`:return Yr.parse(e,a.parseComponentValue());case`color`:return Qr.parse(e,a.parseComponentValue());case`image`:return ji.parse(e,a.parseComponentValue());case`length`:var s=a.parseComponentValue();return Br(s)?s:B;case`length-percentage`:var c=a.parseComponentValue();return z(c)?c:B;case`time`:return Ja.parse(e,a.parseComponentValue())}break}},_o=`data-html2canvas-debug`,vo=function(e){var t=e.getAttribute(_o);switch(t){case`all`:return 1;case`clone`:return 2;case`parse`:return 3;case`render`:return 4;default:return 0}},yo=function(e,t){var n=vo(e);return n===1||t===n},bo=function(){function e(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,yo(t,3))debugger;this.styles=new mo(e,window.getComputedStyle(t,null)),mc(t)&&(this.styles.animationDuration.some(function(e){return e>0})&&(t.style.animationDuration=`0s`),this.styles.transform!==null&&(t.style.transform=`none`)),this.bounds=ae(this.context,t),yo(t,4)&&(this.flags|=16)}return e}(),xo=`AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=`,So=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Co=typeof Uint8Array>`u`?[]:new Uint8Array(256),wo=0;wo>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},Eo=function(e){for(var t=e.length,n=[],r=0;r>Oo,No=1<>Oo,Io=Mo+Fo,Lo=Io,Ro=32,zo=Lo+Ro,Bo=65536>>ko,Vo=1<=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>Oo],t=(t<>Oo)],t=(t<>ko),t=this.index[t],t+=e>>Oo&Ho,t=this.index[t],t=(t<`u`?[]:new Uint8Array(256),Yo=0;Yo=55296&&i<=56319&&n>10)+55296,o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},ms=Go(xo),hs=`×`,gs=`÷`,_s=function(e){return ms.get(e)},vs=function(e,t,n){var r=n-2,i=t[r],a=t[n-1],o=t[n];if(a===Zo&&o===Qo)return hs;if(a===Zo||a===Qo||a===$o||o===Zo||o===Qo||o===$o)return gs;if(a===ns&&[ns,rs,ss,cs].indexOf(o)!==-1||(a===ss||a===rs)&&(o===rs||o===os)||(a===cs||a===os)&&o===os||o===ls||o===es||o===ts||a===Xo)return hs;if(a===ls&&o===us){for(;i===es;)i=t[--r];if(i===us)return hs}if(a===ds&&o===ds){for(var s=0;i===ds;)s++,i=t[--r];if(s%2==0)return hs}return gs},ys=function(e){var t=fs(e),n=t.length,r=0,i=0,a=t.map(_s);return{next:function(){if(r>=n)return{done:!0,value:null};for(var e=hs;ro.x||i.y>o.y;return o=i,t===0?!0:s});return e.body.removeChild(t),s},Cs=function(){return new Image().crossOrigin!==void 0},ws=function(){return typeof new XMLHttpRequest().responseType==`string`},Ts=function(e){var t=new Image,n=e.createElement(`canvas`),r=n.getContext(`2d`);if(!r)return!1;t.src=`data:image/svg+xml,`;try{r.drawImage(t,0,0),n.toDataURL()}catch{return!1}return!0},Es=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},Ds=function(e){var t=e.createElement(`canvas`),n=100;t.width=n,t.height=n;var r=t.getContext(`2d`);if(!r)return Promise.reject(!1);r.fillStyle=`rgb(0, 255, 0)`,r.fillRect(0,0,n,n);var i=new Image,a=t.toDataURL();i.src=a;var o=Os(n,n,0,0,i);return r.fillStyle=`red`,r.fillRect(0,0,n,n),ks(o).then(function(t){r.drawImage(t,0,0);var i=r.getImageData(0,0,n,n).data;r.fillStyle=`red`,r.fillRect(0,0,n,n);var o=e.createElement(`div`);return o.style.backgroundImage=`url(`+a+`)`,o.style.height=n+`px`,Es(i)?ks(Os(n,n,0,0,o)):Promise.reject(!1)}).then(function(e){return r.drawImage(e,0,0),Es(r.getImageData(0,0,n,n).data)}).catch(function(){return!1})},Os=function(e,t,n,r,i){var a=`http://www.w3.org/2000/svg`,o=document.createElementNS(a,`svg`),s=document.createElementNS(a,`foreignObject`);return o.setAttributeNS(null,`width`,e.toString()),o.setAttributeNS(null,`height`,t.toString()),s.setAttributeNS(null,`width`,`100%`),s.setAttributeNS(null,`height`,`100%`),s.setAttributeNS(null,`x`,n.toString()),s.setAttributeNS(null,`y`,r.toString()),s.setAttributeNS(null,`externalResourcesRequired`,`true`),o.appendChild(s),s.appendChild(i),o},ks=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src=`data:image/svg+xml;charset=utf-8,`+encodeURIComponent(new XMLSerializer().serializeToString(e))})},q={get SUPPORT_RANGE_BOUNDS(){var e=xs(document);return Object.defineProperty(q,`SUPPORT_RANGE_BOUNDS`,{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=q.SUPPORT_RANGE_BOUNDS&&Ss(document);return Object.defineProperty(q,`SUPPORT_WORD_BREAKING`,{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=Ts(document);return Object.defineProperty(q,`SUPPORT_SVG_DRAWING`,{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from==`function`&&typeof window.fetch==`function`?Ds(document):Promise.resolve(!1);return Object.defineProperty(q,`SUPPORT_FOREIGNOBJECT_DRAWING`,{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=Cs();return Object.defineProperty(q,`SUPPORT_CORS_IMAGES`,{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=ws();return Object.defineProperty(q,`SUPPORT_RESPONSE_TYPE`,{value:e}),e},get SUPPORT_CORS_XHR(){var e=`withCredentials`in new XMLHttpRequest;return Object.defineProperty(q,`SUPPORT_CORS_XHR`,{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<`u`&&Intl.Segmenter);return Object.defineProperty(q,`SUPPORT_NATIVE_TEXT_SEGMENTATION`,{value:e}),e}},As=function(){function e(e,t){this.text=e,this.bounds=t}return e}(),js=function(e,t,n,r){var i=Is(t,n),a=[],o=0;return i.forEach(function(t){if(n.textDecorationLine.length||t.trim().length>0)if(q.SUPPORT_RANGE_BOUNDS){var i=Ns(r,o,t.length).getClientRects();if(i.length>1){var s=Ps(t),c=0;s.forEach(function(t){a.push(new As(t,M.fromDOMRectList(e,Ns(r,c+o,t.length).getClientRects()))),c+=t.length})}else a.push(new As(t,M.fromDOMRectList(e,i)))}else{var l=r.splitText(t.length);a.push(new As(t,Ms(e,r))),r=l}else q.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));o+=t.length}),a},Ms=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement(`html2canvaswrapper`);r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var a=ae(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),a}}return M.EMPTY},Ns=function(e,t,n){var r=e.ownerDocument;if(!r)throw Error(`Node has no owner document`);var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},Ps=function(e){if(q.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:`grapheme`});return Array.from(t.segment(e)).map(function(e){return e.segment})}return bs(e)},Fs=function(e,t){if(q.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:`word`});return Array.from(n.segment(e)).map(function(e){return e.segment})}return Rs(e,t)},Is=function(e,t){return t.letterSpacing===0?Fs(e,t):Ps(e)},Ls=[32,160,4961,65792,65793,4153,4241],Rs=function(e,t){for(var n=Gt(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap===`break-word`?`break-word`:t.wordBreak}),r=[],i,a=function(){if(i.value){var e=i.value.slice(),t=se(e),n=``;t.forEach(function(e){Ls.indexOf(e)===-1?n+=N(e):(n.length&&r.push(n),r.push(N(e)),n=``)}),n.length&&r.push(n)}};!(i=n.next()).done;)a();return r},zs=function(){function e(e,t,n){this.text=Bs(t.data,n.textTransform),this.textBounds=js(e,this.text,n,t)}return e}(),Bs=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Vs,Hs);case 2:return e.toUpperCase();default:return e}},Vs=/(^|\s|:|-|\(|\))([a-z])/g,Hs=function(e,t,n){return e.length>0?t+n.toUpperCase():e},Us=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return t}(bo),Ws=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return t}(bo),Gs=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=new XMLSerializer,a=ae(t,n);return n.setAttribute(`width`,a.width+`px`),n.setAttribute(`height`,a.height+`px`),r.svg=`data:image/svg+xml,`+encodeURIComponent(i.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return t}(bo),Ks=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t}(bo),qs=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.start=n.start,r.reversed=typeof n.reversed==`boolean`&&n.reversed===!0,r}return t}(bo),Js=[{type:15,flags:0,unit:`px`,number:3}],Ys=[{type:16,flags:0,number:50}],Xs=function(e){return e.width>e.height?new M(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width0)n.textNodes.push(new zs(e,i,n.styles));else if(pc(i))if(Ac(i)&&i.assignedNodes)i.assignedNodes().forEach(function(t){return sc(e,t,n,r)});else{var o=cc(e,i);o.styles.isVisible()&&(uc(i,o,r)?o.flags|=4:dc(o.styles)&&(o.flags|=2),oc.indexOf(i.tagName)!==-1&&(o.flags|=8),n.elements.push(o),i.slot,i.shadowRoot?sc(e,i.shadowRoot,o,r):!Oc(i)&&!bc(i)&&!kc(i)&&sc(e,i,o,r))}},cc=function(e,t){return wc(t)?new Us(e,t):Sc(t)?new Ws(e,t):bc(t)?new Gs(e,t):gc(t)?new Ks(e,t):_c(t)?new qs(e,t):vc(t)?new nc(e,t):kc(t)?new rc(e,t):Oc(t)?new ic(e,t):Tc(t)?new ac(e,t):new bo(e,t)},lc=function(e,t){var n=cc(e,t);return n.flags|=4,sc(e,t,n,n),n},uc=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||xc(e)&&n.styles.isTransparent()},dc=function(e){return e.isPositioned()||e.isFloating()},fc=function(e){return e.nodeType===Node.TEXT_NODE},pc=function(e){return e.nodeType===Node.ELEMENT_NODE},mc=function(e){return pc(e)&&e.style!==void 0&&!hc(e)},hc=function(e){return typeof e.className==`object`},gc=function(e){return e.tagName===`LI`},_c=function(e){return e.tagName===`OL`},vc=function(e){return e.tagName===`INPUT`},yc=function(e){return e.tagName===`HTML`},bc=function(e){return e.tagName===`svg`},xc=function(e){return e.tagName===`BODY`},Sc=function(e){return e.tagName===`CANVAS`},Cc=function(e){return e.tagName===`VIDEO`},wc=function(e){return e.tagName===`IMG`},Tc=function(e){return e.tagName===`IFRAME`},Ec=function(e){return e.tagName===`STYLE`},Dc=function(e){return e.tagName===`SCRIPT`},Oc=function(e){return e.tagName===`TEXTAREA`},kc=function(e){return e.tagName===`SELECT`},Ac=function(e){return e.tagName===`SLOT`},jc=function(e){return e.tagName.indexOf(`-`)>0},Mc=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach(function(e){return t.counters[e].pop()})},e.prototype.parse=function(e){var t=this,n=e.counterIncrement,r=e.counterReset,i=!0;n!==null&&n.forEach(function(e){var n=t.counters[e.counter];n&&e.increment!==0&&(i=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=e.increment)});var a=[];return i&&r.forEach(function(e){var n=t.counters[e.counter];a.push(e.counter),n||=t.counters[e.counter]=[],n.push(e.reset)}),a},e}(),Nc={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:[`M`,`CM`,`D`,`CD`,`C`,`XC`,`L`,`XL`,`X`,`IX`,`V`,`IV`,`I`]},Pc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:`Ք.Փ.Ւ.Ց.Ր.Տ.Վ.Ս.Ռ.Ջ.Պ.Չ.Ո.Շ.Ն.Յ.Մ.Ճ.Ղ.Ձ.Հ.Կ.Ծ.Խ.Լ.Ի.Ժ.Թ.Ը.Է.Զ.Ե.Դ.Գ.Բ.Ա`.split(`.`)},Fc={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:`י׳.ט׳.ח׳.ז׳.ו׳.ה׳.ד׳.ג׳.ב׳.א׳.ת.ש.ר.ק.צ.פ.ע.ס.נ.מ.ל.כ.יט.יח.יז.טז.טו.י.ט.ח.ז.ו.ה.ד.ג.ב.א`.split(`.`)},Ic={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:`ჵ.ჰ.ჯ.ჴ.ხ.ჭ.წ.ძ.ც.ჩ.შ.ყ.ღ.ქ.ფ.ჳ.ტ.ს.რ.ჟ.პ.ო.ჲ.ნ.მ.ლ.კ.ი.თ.ჱ.ზ.ვ.ე.დ.გ.ბ.ა`.split(`.`)},Lc=function(e,t,n,r,i,a){return en?Yc(e,i,a.length>0):r.integers.reduce(function(t,n,i){for(;e>=n;)e-=n,t+=r.values[i];return t},``)+a},Rc=function(e,t,n,r){var i=``;do n||e--,i=r(e)+i,e/=t;while(e*t>=t);return i},J=function(e,t,n,r,i){var a=n-t+1;return(e<0?`-`:``)+(Rc(Math.abs(e),a,r,function(e){return N(Math.floor(e%a)+t)})+i)},zc=function(e,t,n){n===void 0&&(n=`. `);var r=t.length;return Rc(Math.abs(e),r,!1,function(e){return t[Math.floor(e%r)]})+n},Bc=1,Vc=2,Hc=4,Uc=8,Wc=function(e,t,n,r,i,a){if(e<-9999||e>9999)return Yc(e,4,i.length>0);var o=Math.abs(e),s=i;if(o===0)return t[0]+s;for(var c=0;o>0&&c<=4;c++){var l=o%10;l===0&&G(a,Bc)&&s!==``?s=t[l]+s:l>1||l===1&&c===0||l===1&&c===1&&G(a,Vc)||l===1&&c===1&&G(a,Hc)&&e>100||l===1&&c>1&&G(a,Uc)?s=t[l]+(c>0?n[c-1]:``)+s:l===1&&c>0&&(s=n[c-1]+s),o=Math.floor(o/10)}return(e<0?r:``)+s},Gc=`十百千萬`,Kc=`拾佰仟萬`,qc=`マイナス`,Jc=`마이너스`,Yc=function(e,t,n){var r=n?`. `:``,i=n?`、`:``,a=n?`, `:``,o=n?` `:``;switch(t){case 0:return`•`+o;case 1:return`◦`+o;case 2:return`◾`+o;case 5:var s=J(e,48,57,!0,r);return s.length<4?`0`+s:s;case 4:return zc(e,`〇一二三四五六七八九`,i);case 6:return Lc(e,1,3999,Nc,3,r).toLowerCase();case 7:return Lc(e,1,3999,Nc,3,r);case 8:return J(e,945,969,!1,r);case 9:return J(e,97,122,!1,r);case 10:return J(e,65,90,!1,r);case 11:return J(e,1632,1641,!0,r);case 12:case 49:return Lc(e,1,9999,Pc,3,r);case 35:return Lc(e,1,9999,Pc,3,r).toLowerCase();case 13:return J(e,2534,2543,!0,r);case 14:case 30:return J(e,6112,6121,!0,r);case 15:return zc(e,`子丑寅卯辰巳午未申酉戌亥`,i);case 16:return zc(e,`甲乙丙丁戊己庚辛壬癸`,i);case 17:case 48:return Wc(e,`零一二三四五六七八九`,Gc,`負`,i,Vc|Hc|Uc);case 47:return Wc(e,`零壹貳參肆伍陸柒捌玖`,Kc,`負`,i,Bc|Vc|Hc|Uc);case 42:return Wc(e,`零一二三四五六七八九`,Gc,`负`,i,Vc|Hc|Uc);case 41:return Wc(e,`零壹贰叁肆伍陆柒捌玖`,Kc,`负`,i,Bc|Vc|Hc|Uc);case 26:return Wc(e,`〇一二三四五六七八九`,`十百千万`,qc,i,0);case 25:return Wc(e,`零壱弐参四伍六七八九`,`拾百千万`,qc,i,Bc|Vc|Hc);case 31:return Wc(e,`영일이삼사오육칠팔구`,`십백천만`,Jc,a,Bc|Vc|Hc);case 33:return Wc(e,`零一二三四五六七八九`,`十百千萬`,Jc,a,0);case 32:return Wc(e,`零壹貳參四五六七八九`,`拾百千`,Jc,a,Bc|Vc|Hc);case 18:return J(e,2406,2415,!0,r);case 20:return Lc(e,1,19999,Ic,3,r);case 21:return J(e,2790,2799,!0,r);case 22:return J(e,2662,2671,!0,r);case 22:return Lc(e,1,10999,Fc,3,r);case 23:return zc(e,`あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん`);case 24:return zc(e,`いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす`);case 27:return J(e,3302,3311,!0,r);case 28:return zc(e,`アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン`,i);case 29:return zc(e,`イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス`,i);case 34:return J(e,3792,3801,!0,r);case 37:return J(e,6160,6169,!0,r);case 38:return J(e,4160,4169,!0,r);case 39:return J(e,2918,2927,!0,r);case 40:return J(e,1776,1785,!0,r);case 43:return J(e,3046,3055,!0,r);case 44:return J(e,3174,3183,!0,r);case 45:return J(e,3664,3673,!0,r);case 46:return J(e,3872,3881,!0,r);case 3:default:return J(e,48,57,!0,r)}},Xc=`data-html2canvas-ignore`,Zc=function(){function e(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new Mc,this.quoteDepth=0,!t.ownerDocument)throw Error(`Cloned element does not have an owner document`);this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var n=this,r=$c(e,t);if(!r.contentWindow)return Promise.reject(`Unable to find iframe window`);var i=e.defaultView.pageXOffset,a=e.defaultView.pageYOffset,o=r.contentWindow,s=o.document,c=nl(r).then(function(){return A(n,void 0,void 0,function(){var e,n;return j(this,function(i){switch(i.label){case 0:return this.scrolledElements.forEach(sl),o&&(o.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(o.scrollY!==t.top||o.scrollX!==t.left)&&(this.context.logger.warn(`Unable to restore scroll position for cloned document`),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-t.left,o.scrollY-t.top,0,0))),e=this.options.onclone,n=this.clonedReferenceElement,n===void 0?[2,Promise.reject(`Error finding the `+this.referenceElement.nodeName+` in the cloned document`)]:s.fonts&&s.fonts.ready?[4,s.fonts.ready]:[3,2];case 1:i.sent(),i.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,tl(s)]:[3,4];case 3:i.sent(),i.label=4;case 4:return typeof e==`function`?[2,Promise.resolve().then(function(){return e(s,n)}).then(function(){return r})]:[2,r]}})})});return s.open(),s.write(al(document.doctype)+``),ol(this.referenceElement.ownerDocument,i,a),s.replaceChild(s.adoptNode(this.documentElement),s.documentElement),s.close(),c},e.prototype.createElementClone=function(e){if(yo(e,2))debugger;if(Sc(e))return this.createCanvasClone(e);if(Cc(e))return this.createVideoClone(e);if(Ec(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return wc(t)&&(wc(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=``),t.loading===`lazy`&&(t.loading=`eager`)),jc(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement(`html2canvascustomelement`);return il(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce(function(e,t){return t&&typeof t.cssText==`string`?e+t.cssText:e},``),r=e.cloneNode(!1);return r.textContent=n,r}}catch(e){if(this.context.logger.error(`Unable to access cssRules property`,e),e.name!==`SecurityError`)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement(`img`);try{return n.src=e.toDataURL(),n}catch{this.context.logger.info(`Unable to inline canvas contents, canvas is tainted`,e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var i=e.getContext(`2d`),a=r.getContext(`2d`);if(a)if(!this.options.allowTaint&&i)a.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var o=(t=e.getContext(`webgl2`))??e.getContext(`webgl`);if(o){var s=o.getContextAttributes();s?.preserveDrawingBuffer===!1&&this.context.logger.warn(`Unable to clone WebGL context as it has preserveDrawingBuffer=false`,e)}a.drawImage(e,0,0)}return r}catch{this.context.logger.info(`Unable to clone canvas as it is tainted`,e)}return r},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement(`canvas`);t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext(`2d`);try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info(`Unable to clone video as it is tainted`,e)}var r=e.ownerDocument.createElement(`canvas`);return r.width=e.offsetWidth,r.height=e.offsetHeight,r},e.prototype.appendChildNode=function(e,t,n){(!pc(t)||!Dc(t)&&!t.hasAttribute(Xc)&&(typeof this.options.ignoreElements!=`function`||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!pc(t)||!Ec(t))&&e.appendChild(this.cloneNode(t,n))},e.prototype.cloneChildNodes=function(e,t,n){for(var r=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(pc(i)&&Ac(i)&&typeof i.assignedNodes==`function`){var a=i.assignedNodes();a.length&&a.forEach(function(e){return r.appendChildNode(t,e,n)})}else this.appendChildNode(t,i,n)},e.prototype.cloneNode=function(e,t){if(fc(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&pc(e)&&(mc(e)||hc(e))){var r=this.createElementClone(e);r.style.transitionProperty=`none`;var i=n.getComputedStyle(e),a=n.getComputedStyle(e,`:before`),o=n.getComputedStyle(e,`:after`);this.referenceElement===e&&mc(r)&&(this.clonedReferenceElement=r),xc(r)&&pl(r);var s=this.counters.parse(new go(this.context,i)),c=this.resolvePseudoContent(e,r,a,Qc.BEFORE);jc(e)&&(t=!0),Cc(e)||this.cloneChildNodes(e,r,t),c&&r.insertBefore(c,r.firstChild);var l=this.resolvePseudoContent(e,r,o,Qc.AFTER);return l&&r.appendChild(l),this.counters.pop(s),(i&&(this.options.copyStyles||hc(e))&&!Tc(e)||t)&&il(i,r),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(Oc(e)||kc(e))&&(Oc(r)||kc(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,r){var i=this;if(n){var a=n.content,o=t.ownerDocument;if(!(!o||!a||a===`none`||a===`-moz-alt-content`||n.display===`none`)){this.counters.parse(new go(this.context,n));var s=new ho(this.context,n),c=o.createElement(`html2canvaspseudoelement`);il(n,c),s.content.forEach(function(t){if(t.type===0)c.appendChild(o.createTextNode(t.value));else if(t.type===22){var n=o.createElement(`img`);n.src=t.value,n.style.opacity=`1`,c.appendChild(n)}else if(t.type===18){if(t.name===`attr`){var r=t.values.filter(R);r.length&&c.appendChild(o.createTextNode(e.getAttribute(r[0].value)||``))}else if(t.name===`counter`){var a=t.values.filter(Lr),l=a[0],u=a[1];if(l&&R(l)){var d=i.counters.getCounterValue(l.value),f=u&&R(u)?ba.parse(i.context,u.value):3;c.appendChild(o.createTextNode(Yc(d,f,!1)))}}else if(t.name===`counters`){var p=t.values.filter(Lr),l=p[0],m=p[1],u=p[2];if(l&&R(l)){var h=i.counters.getCounterValues(l.value),g=u&&R(u)?ba.parse(i.context,u.value):3,_=m&&m.type===0?m.value:``,v=h.map(function(e){return Yc(e,g,!1)}).join(_);c.appendChild(o.createTextNode(v))}}}else if(t.type===20)switch(t.value){case`open-quote`:c.appendChild(o.createTextNode(co(s.quotes,i.quoteDepth++,!0)));break;case`close-quote`:c.appendChild(o.createTextNode(co(s.quotes,--i.quoteDepth,!1)));break;default:c.appendChild(o.createTextNode(t.value))}}),c.className=ul+` `+dl;var l=r===Qc.BEFORE?` `+ul:` `+dl;return hc(t)?t.className.baseValue+=l:t.className+=l,c}}},e.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},e}(),Qc;(function(e){e[e.BEFORE=0]=`BEFORE`,e[e.AFTER=1]=`AFTER`})(Qc||={});var $c=function(e,t){var n=e.createElement(`iframe`);return n.className=`html2canvas-container`,n.style.visibility=`hidden`,n.style.position=`fixed`,n.style.left=`-10000px`,n.style.top=`0px`,n.style.border=`0`,n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling=`no`,n.setAttribute(Xc,`true`),e.body.appendChild(n),n},el=function(e){return new Promise(function(t){if(e.complete){t();return}if(!e.src){t();return}e.onload=t,e.onerror=t})},tl=function(e){return Promise.all([].slice.call(e.images,0).map(el))},nl=function(e){return new Promise(function(t,n){var r=e.contentWindow;if(!r)return n(`No window assigned for iframe`);var i=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var n=setInterval(function(){i.body.childNodes.length>0&&i.readyState===`complete`&&(clearInterval(n),t(e))},50)}})},rl=[`all`,`d`,`content`],il=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);rl.indexOf(r)===-1&&t.style.setProperty(r,e.getPropertyValue(r))}return t},al=function(e){var t=``;return e&&(t+=``),t},ol=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},sl=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},cl=`:before`,ll=`:after`,ul=`___html2canvas___pseudoelement_before`,dl=`___html2canvas___pseudoelement_after`,fl=`{ +import{d as e}from"./theme-color-mhr1g0fO.js";import{cA as t,cN as n,dQ as r,dS as i,dT as a,dW as o,dX as s,dY as c,dZ as l,dm as u,e0 as d,e2 as f,e3 as p,e4 as m,e5 as h,e6 as g,e7 as _,ea as v,eb as y,ec as b,ed as x,eg as S,ek as C,el as w,en as T,eo as E}from"./index-D1IGsMK6.js";import{b as ee}from"./browser-bFm1l1qg.js";const D=[`accept`,`multiple`];var te=l({__name:`BasicInputFile`,props:d({accept:{},multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=v(e,`modelValue`),n=S(),r=S(!1),i=u(r,150);function s(e){let i=e.target;i.files&&i.files.length>0&&(n.value=i.files[0]),t.value=Array.from(i.files||[]),r.value=!1}return(e,c)=>(h(),o(`label`,{relative:``,"cursor-pointer":``,onDragover:c[0]||=e=>r.value=!0,onDragleave:c[1]||=e=>r.value=!1},[a(`input`,{type:`file`,accept:e.accept,multiple:e.multiple,class:`absolute inset-0 h-full w-full opacity-0`,onChange:s},null,40,D),_(e.$slots,`default`,{isDragging:C(i),firstFile:n.value,files:t.value})],32))}}),ne=te,O=function(e,t){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},O(e,t)};function k(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);O(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var re=function(){return re=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]=55296&&i<=56319&&n>10)+55296,o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},ce=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,le=typeof Uint8Array>`u`?[]:new Uint8Array(256),ue=0;ue`u`?[]:new Uint8Array(256),pe=0;pe>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},he=function(e){for(var t=e.length,n=[],r=0;r>_e,Se=1<<_e,Ce=Se-1,we=1024>>_e,Te=xe+we,Ee=Te,De=32,Oe=Ee+De,ke=65536>>ve,Ae=1<=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>_e],t=(t<>_e)],t=(t<>ve),t=this.index[t],t+=e>>_e&je,t=this.index[t],t=(t<`u`?[]:new Uint8Array(256),Re=0;ReBe?(i.push(!0),o-=Be):i.push(!1),[`normal`,`auto`,`loose`].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(e)!==-1)return r.push(a),n.push(tt);if(o===We||o===Xe){if(a===0)return r.push(a),n.push(mt);var s=n[a-1];return It.indexOf(s)===-1?(r.push(r[a-1]),n.push(s)):(r.push(a),n.push(mt))}if(r.push(a),o===ht)return n.push(t===`strict`?ot:xt);if(o===Et||o===pt)return n.push(mt);if(o===Dt)return e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(xt):n.push(mt);n.push(o)}),[r,n,i]},Bt=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?e.indexOf(i)!==-1:e===i)for(var a=n;a<=r.length;){a++;var o=r[a];if(o===t)return!0;if(o!==Ye)break}if(i===Ye)for(var a=n;a>0;){a--;var s=r[a];if(Array.isArray(e)?e.indexOf(s)!==-1:e===s)for(var c=n;c<=r.length;){c++;var o=r[c];if(o===t)return!0;if(o!==Ye)break}if(s!==Ye)break}return!1},Vt=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r===Ye)n--;else return r}return 0},Ht=function(e,t,n,r,i){if(n[r]===0)return F;var a=r-1;if(Array.isArray(i)&&i[a]===!0)return F;var o=a-1,s=a+1,c=t[a],l=o>=0?t[o]:0,u=t[s];if(c===He&&u===Ue)return F;if(Nt.indexOf(c)!==-1)return kt;if(Nt.indexOf(u)!==-1||Pt.indexOf(u)!==-1)return F;if(Vt(a,t)===qe)return At;if(jt.get(e[a])===Xe||(c===gt||c===_t)&&jt.get(e[s])===Xe||c===Ke||u===Ke||c===Je||[Ye,Qe,et].indexOf(c)===-1&&u===Je||[nt,rt,it,lt,ft].indexOf(u)!==-1||Vt(a,t)===st||Bt(ct,st,a,t)||Bt([nt,rt],ot,a,t)||Bt(Ze,Ze,a,t))return F;if(c===Ye)return At;if(c===ct||u===ct)return F;if(u===tt||c===tt)return At;if([Qe,et,ot].indexOf(u)!==-1||c===$e||l===bt&&Rt.indexOf(c)!==-1||c===ft&&u===bt||u===at||Mt.indexOf(u)!==-1&&c===P||Mt.indexOf(c)!==-1&&u===P||c===dt&&[xt,gt,_t].indexOf(u)!==-1||[xt,gt,_t].indexOf(c)!==-1&&u===ut||Mt.indexOf(c)!==-1&&Ft.indexOf(u)!==-1||Ft.indexOf(c)!==-1&&Mt.indexOf(u)!==-1||[dt,ut].indexOf(c)!==-1&&(u===P||[st,et].indexOf(u)!==-1&&t[s+1]===P)||[st,et].indexOf(c)!==-1&&u===P||c===P&&[P,ft,lt].indexOf(u)!==-1)return F;if([P,ft,lt,nt,rt].indexOf(u)!==-1)for(var d=a;d>=0;){var f=t[d];if(f===P)return F;if([ft,lt].indexOf(f)!==-1)d--;else break}if([dt,ut].indexOf(u)!==-1)for(var d=[nt,rt].indexOf(c)===-1?a:o;d>=0;){var f=t[d];if(f===P)return F;if([ft,lt].indexOf(f)!==-1)d--;else break}if(St===c&&[St,Ct,vt,yt].indexOf(u)!==-1||[Ct,vt].indexOf(c)!==-1&&[Ct,wt].indexOf(u)!==-1||[wt,yt].indexOf(c)!==-1&&u===wt||Lt.indexOf(c)!==-1&&[at,ut].indexOf(u)!==-1||Lt.indexOf(u)!==-1&&c===dt||Mt.indexOf(c)!==-1&&Mt.indexOf(u)!==-1||c===lt&&Mt.indexOf(u)!==-1||Mt.concat(P).indexOf(c)!==-1&&u===st&&Ot.indexOf(e[s])===-1||Mt.concat(P).indexOf(u)!==-1&&c===rt)return F;if(c===Tt&&u===Tt){for(var p=n[a],m=1;p>0&&(p--,t[p]===Tt);)m++;if(m%2!=0)return F}return c===gt&&u===_t?F:At},Ut=function(e,t){t||={lineBreak:`normal`,wordBreak:`normal`};var n=zt(e,t.lineBreak),r=n[0],i=n[1],a=n[2];(t.wordBreak===`break-all`||t.wordBreak===`break-word`)&&(i=i.map(function(e){return[P,mt,Et].indexOf(e)===-1?e:xt}));var o=t.wordBreak===`keep-all`?a.map(function(t,n){return t&&e[n]>=19968&&e[n]<=40959}):void 0;return[r,i,o]},Wt=function(){function e(e,t,n,r){this.codePoints=e,this.required=t===kt,this.start=n,this.end=r}return e.prototype.slice=function(){return N.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),Gt=function(e,t){var n=se(e),r=Ut(n,t),i=r[0],a=r[1],o=r[2],s=n.length,c=0,l=0;return{next:function(){if(l>=s)return{done:!0,value:null};for(var e=F;l=Rn&&e<=57},Yn=function(e){return e>=55296&&e<=57343},Xn=function(e){return L(e)||e>=Wn&&e<=Kn||e>=zn&&e<=Vn},Zn=function(e){return e>=zn&&e<=Un},Qn=function(e){return e>=Wn&&e<=Jn},$n=function(e){return Zn(e)||Qn(e)},er=function(e){return e>=Cn},tr=function(e){return e===Xt||e===$t||e===en},nr=function(e){return $n(e)||er(e)||e===un},rr=function(e){return nr(e)||L(e)||e===I},ir=function(e){return e>=jn&&e<=Mn||e===Nn||e>=Pn&&e<=Fn||e===In},ar=function(e,t){return e===Qt?t!==Xt:!1},or=function(e,t,n){return e===I?nr(t)||ar(t,n):nr(e)?!0:!!(e===Qt&&ar(e,t))},sr=function(e,t,n){return e===En||e===I?L(t)?!0:t===An&&L(n):L(e===An?t:e)},cr=function(e){var t=0,n=1;(e[t]===En||e[t]===I)&&(e[t]===I&&(n=-1),t++);for(var r=[];L(e[t]);)r.push(e[t++]);var i=r.length?parseInt(N.apply(void 0,r),10):0;e[t]===An&&t++;for(var a=[];L(e[t]);)a.push(e[t++]);var o=a.length,s=o?parseInt(N.apply(void 0,a),10):0;(e[t]===Gn||e[t]===Bn)&&t++;var c=1;(e[t]===En||e[t]===I)&&(e[t]===I&&(c=-1),t++);for(var l=[];L(e[t]);)l.push(e[t++]);var u=l.length?parseInt(N.apply(void 0,l),10):0;return n*(i+s*10**-o)*10**(c*u)},lr={type:2},ur={type:3},dr={type:4},fr={type:13},pr={type:8},mr={type:21},hr={type:9},gr={type:10},_r={type:11},vr={type:12},yr={type:14},br={type:23},xr={type:1},Sr={type:25},Cr={type:24},wr={type:26},Tr={type:27},Er={type:28},Dr={type:29},Or={type:31},kr={type:32},Ar=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(se(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==kr;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case tn:return this.consumeStringToken(tn);case rn:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(rr(t)||ar(n,r)){var i=or(t,n,r)?qt:Kt,a=this.consumeName();return{type:5,value:a,flags:i}}break;case an:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),fr;break;case sn:return this.consumeStringToken(sn);case cn:return lr;case ln:return ur;case Tn:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),yr;break;case En:if(sr(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Dn:return dr;case I:var o=e,s=this.peekCodePoint(0),c=this.peekCodePoint(1);if(sr(o,s,c))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(or(o,s,c))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(s===I&&c===pn)return this.consumeCodePoint(),this.consumeCodePoint(),Cr;break;case An:if(sr(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Zt:if(this.peekCodePoint(0)===Tn)for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(l===Tn&&(l=this.consumeCodePoint(),l===Zt)||l===Ln)return this.consumeToken()}break;case On:return wr;case kn:return Tr;case fn:if(this.peekCodePoint(0)===dn&&this.peekCodePoint(1)===I&&this.peekCodePoint(2)===I)return this.consumeCodePoint(),this.consumeCodePoint(),Sr;break;case mn:var u=this.peekCodePoint(0),d=this.peekCodePoint(1),f=this.peekCodePoint(2);if(or(u,d,f)){var a=this.consumeName();return{type:7,value:a}}break;case hn:return Er;case Qt:if(ar(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case gn:return Dr;case _n:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),pr;break;case vn:return _r;case bn:return vr;case Hn:case qn:var p=this.peekCodePoint(0),m=this.peekCodePoint(1);return p===En&&(Xn(m)||m===yn)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case xn:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),hr;if(this.peekCodePoint(0)===xn)return this.consumeCodePoint(),mr;break;case Sn:if(this.peekCodePoint(0)===nn)return this.consumeCodePoint(),gr;break;case Ln:return kr}return tr(e)?(this.consumeWhiteSpace(),Or):L(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):nr(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:N(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return e===void 0?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Xn(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===yn&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var r=parseInt(N.apply(void 0,e.map(function(e){return e===yn?Rn:e})),16),i=parseInt(N.apply(void 0,e.map(function(e){return e===yn?Kn:e})),16);return{type:30,start:r,end:i}}var a=parseInt(N.apply(void 0,e),16);if(this.peekCodePoint(0)===I&&Xn(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var o=[];Xn(t)&&o.length<6;)o.push(t),t=this.consumeCodePoint();var i=parseInt(N.apply(void 0,o),16);return{type:30,start:a,end:i}}else return{type:30,start:a,end:a}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()===`url`&&this.peekCodePoint(0)===cn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===cn?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ln)return{type:22,value:``};var t=this.peekCodePoint(0);if(t===sn||t===tn){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ln||this.peekCodePoint(0)===ln)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),br)}for(;;){var r=this.consumeCodePoint();if(r===Ln||r===ln)return{type:22,value:N.apply(void 0,e)};if(tr(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ln||this.peekCodePoint(0)===ln?(this.consumeCodePoint(),{type:22,value:N.apply(void 0,e)}):(this.consumeBadUrlRemnants(),br);if(r===tn||r===sn||r===cn||ir(r))return this.consumeBadUrlRemnants(),br;if(r===Qt)if(ar(r,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),br;else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;tr(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===ln||e===Ln)return;ar(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t=5e4,n=``;e>0;){var r=Math.min(t,e);n+=N.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),n},e.prototype.consumeStringToken=function(e){var t=``,n=0;do{var r=this._value[n];if(r===Ln||r===void 0||r===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(r===Xt)return this._value.splice(0,n),xr;if(r===Qt){var i=this._value[n+1];i!==Ln&&i!==void 0&&(i===Xt?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):ar(r,i)&&(t+=this.consumeStringSlice(n),t+=N(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},e.prototype.consumeNumber=function(){var e=[],t=Jt,n=this.peekCodePoint(0);for((n===En||n===I)&&e.push(this.consumeCodePoint());L(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(n===An&&L(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Yt;L(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((n===Gn||n===Bn)&&((r===En||r===I)&&L(i)||L(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=Yt;L(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[cr(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),a=this.peekCodePoint(2);if(or(r,i,a)){var o=this.consumeName();return{type:15,number:t,flags:n,unit:o}}return r===on?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Xn(e)){for(var t=N(e);Xn(this.peekCodePoint(0))&&t.length<6;)t+=N(this.consumeCodePoint());tr(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return n===0||Yn(n)||n>1114111?wn:n}return e===Ln?wn:e},e.prototype.consumeName=function(){for(var e=``;;){var t=this.consumeCodePoint();if(rr(t))e+=N(t);else if(ar(t,this.peekCodePoint(0)))e+=N(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},e}(),jr=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Ar;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw SyntaxError(`Error parsing CSS component value, unexpected EOF`);this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw SyntaxError(`Error parsing CSS component value, multiple values found when expecting only one`)},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===32)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(n.type===32||zr(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return e===void 0?kr:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Mr=function(e){return e.type===15},Nr=function(e){return e.type===17},R=function(e){return e.type===20},Pr=function(e){return e.type===0},Fr=function(e,t){return R(e)&&e.value===t},Ir=function(e){return e.type!==31},Lr=function(e){return e.type!==31&&e.type!==4},Rr=function(e){var t=[],n=[];return e.forEach(function(e){if(e.type===4){if(n.length===0)throw Error(`Error parsing function args, zero tokens for arg`);t.push(n),n=[];return}e.type!==31&&n.push(e)}),n.length&&t.push(n),t},zr=function(e,t){return t===11&&e.type===12||t===28&&e.type===29?!0:t===2&&e.type===3},Br=function(e){return e.type===17||e.type===15},z=function(e){return e.type===16||Br(e)},Vr=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},B={type:17,number:0,flags:Jt},Hr={type:16,number:50,flags:Jt},Ur={type:16,number:100,flags:Jt},Wr=function(e,t,n){var r=e[0],i=e[1];return[V(r,t),V(i===void 0?r:i,n)]},V=function(e,t){if(e.type===16)return e.number/100*t;if(Mr(e))switch(e.unit){case`rem`:case`em`:return 16*e.number;case`px`:default:return e.number}return e.number},Gr=`deg`,Kr=`grad`,qr=`rad`,Jr=`turn`,Yr={name:`angle`,parse:function(e,t){if(t.type===15)switch(t.unit){case Gr:return Math.PI*t.number/180;case Kr:return Math.PI/200*t.number;case qr:return t.number;case Jr:return Math.PI*2*t.number}throw Error(`Unsupported angle type`)}},Xr=function(e){return e.type===15&&(e.unit===Gr||e.unit===Kr||e.unit===qr||e.unit===Jr)},Zr=function(e){var t=e.filter(R).map(function(e){return e.value}).join(` `);switch(t){case`to bottom right`:case`to right bottom`:case`left top`:case`top left`:return[B,B];case`to top`:case`bottom`:return H(0);case`to bottom left`:case`to left bottom`:case`right top`:case`top right`:return[B,Ur];case`to right`:case`left`:return H(90);case`to top left`:case`to left top`:case`right bottom`:case`bottom right`:return[Ur,Ur];case`to bottom`:case`top`:return H(180);case`to top right`:case`to right top`:case`left bottom`:case`bottom left`:return[Ur,B];case`to left`:case`right`:return H(270)}return 0},H=function(e){return Math.PI*e/180},Qr={name:`color`,parse:function(e,t){if(t.type===18){var n=ai[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported color function "`+t.name+`"`);return n(e,t.values)}if(t.type===5){if(t.value.length===3){var r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);return ei(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(t.value.length===4){var r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3),o=t.value.substring(3,4);return ei(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16)/255)}if(t.value.length===6){var r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6);return ei(parseInt(r,16),parseInt(i,16),parseInt(a,16),1)}if(t.value.length===8){var r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6),o=t.value.substring(6,8);return ei(parseInt(r,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(t.type===20){var s=si[t.value.toUpperCase()];if(s!==void 0)return s}return si.TRANSPARENT}},$r=function(e){return(255&e)==0},U=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?`rgba(`+i+`,`+r+`,`+n+`,`+t/255+`)`:`rgb(`+i+`,`+r+`,`+n+`)`},ei=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(r*255)<<0)>>>0},ti=function(e,t){if(e.type===17)return e.number;if(e.type===16){var n=t===3?1:255;return t===3?e.number/100*n:Math.round(e.number/100*n)}return 0},ni=function(e,t){var n=t.filter(Lr);if(n.length===3){var r=n.map(ti),i=r[0],a=r[1],o=r[2];return ei(i,a,o,1)}if(n.length===4){var s=n.map(ti),i=s[0],a=s[1],o=s[2],c=s[3];return ei(i,a,o,c)}return 0};function ri(e,t,n){return n<0&&(n+=1),n>=1&&--n,n<1/6?(t-e)*n*6+e:n<1/2?t:n<2/3?(t-e)*6*(2/3-n)+e:e}var ii=function(e,t){var n=t.filter(Lr),r=n[0],i=n[1],a=n[2],o=n[3],s=(r.type===17?H(r.number):Yr.parse(e,r))/(Math.PI*2),c=z(i)?i.number/100:0,l=z(a)?a.number/100:0,u=o!==void 0&&z(o)?V(o,1):1;if(c===0)return ei(l*255,l*255,l*255,1);var d=l<=.5?l*(c+1):l+c-l*c,f=l*2-d,p=ri(f,d,s+1/3),m=ri(f,d,s),h=ri(f,d,s-1/3);return ei(p*255,m*255,h*255,u)},ai={hsl:ii,hsla:ii,rgb:ni,rgba:ni},oi=function(e,t){return Qr.parse(e,jr.create(t).parseComponentValue())},si={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ci={name:`background-clip`,initialValue:`border-box`,prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(R(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2}return 0})}},li={name:`background-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},ui=function(e,t){var n=Qr.parse(e,t[0]),r=t[1];return r&&z(r)?{color:n,stop:r}:{color:n,stop:null}},di=function(e,t){var n=e[0],r=e[e.length-1];n.stop===null&&(n.stop=B),r.stop===null&&(r.stop=Ur);for(var i=[],a=0,o=0;oa?i.push(c):i.push(a),a=c}else i.push(null)}for(var l=null,o=0;oe.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},hi=function(e,t,n,r,i){var a=0,o=0;switch(e.size){case 0:e.shape===0?a=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(e.shape===0)a=o=Math.min(W(t,n),W(t,n-i),W(t-r,n),W(t-r,n-i));else if(e.shape===1){var s=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),c=mi(r,i,t,n,!0),l=c[0],u=c[1];a=W(l-t,(u-n)/s),o=s*a}break;case 1:e.shape===0?a=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(e.shape===0)a=o=Math.max(W(t,n),W(t,n-i),W(t-r,n),W(t-r,n-i));else if(e.shape===1){var s=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r)),d=mi(r,i,t,n,!1),l=d[0],u=d[1];a=W(l-t,(u-n)/s),o=s*a}break}return Array.isArray(e.size)&&(a=V(e.size[0],r),o=e.size.length===2?V(e.size[1],i):a),[a,o]},gi=function(e,t){var n=H(180),r=[];return Rr(t).forEach(function(t,i){if(i===0){var a=t[0];if(a.type===20&&a.value===`to`){n=Zr(t);return}else if(Xr(a)){n=Yr.parse(e,a);return}}var o=ui(e,t);r.push(o)}),{angle:n,stops:r,type:1}},_i=function(e,t){var n=H(180),r=[];return Rr(t).forEach(function(t,i){if(i===0){var a=t[0];if(a.type===20&&[`top`,`left`,`right`,`bottom`].indexOf(a.value)!==-1){n=Zr(t);return}else if(Xr(a)){n=(Yr.parse(e,a)+H(270))%H(360);return}}var o=ui(e,t);r.push(o)}),{angle:n,stops:r,type:1}},vi=function(e,t){var n=H(180),r=[],i=1,a=0,o=3,s=[];return Rr(t).forEach(function(t,n){var a=t[0];if(n===0){if(R(a)&&a.value===`linear`){i=1;return}else if(R(a)&&a.value===`radial`){i=2;return}}if(a.type===18){if(a.name===`from`){var o=Qr.parse(e,a.values[0]);r.push({stop:B,color:o})}else if(a.name===`to`){var o=Qr.parse(e,a.values[0]);r.push({stop:Ur,color:o})}else if(a.name===`color-stop`){var s=a.values.filter(Lr);if(s.length===2){var o=Qr.parse(e,s[1]),c=s[0];Nr(c)&&r.push({stop:{type:16,number:c.number*100,flags:c.flags},color:o})}}}}),i===1?{angle:(n+H(180))%H(360),stops:r,type:i}:{size:o,shape:a,stops:r,position:s,type:i}},yi=`closest-side`,bi=`farthest-side`,xi=`closest-corner`,Si=`farthest-corner`,Ci=`circle`,wi=`ellipse`,Ti=`cover`,Ei=`contain`,Di=function(e,t){var n=0,r=3,i=[],a=[];return Rr(t).forEach(function(t,o){var s=!0;if(o===0){var c=!1;s=t.reduce(function(e,t){if(c)if(R(t))switch(t.value){case`center`:return a.push(Hr),e;case`top`:case`left`:return a.push(B),e;case`right`:case`bottom`:return a.push(Ur),e}else (z(t)||Br(t))&&a.push(t);else if(R(t))switch(t.value){case Ci:return n=0,!1;case wi:return n=1,!1;case`at`:return c=!0,!1;case yi:return r=0,!1;case Ti:case bi:return r=1,!1;case Ei:case xi:return r=2,!1;case Si:return r=3,!1}else if(Br(t)||z(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)}if(s){var l=ui(e,t);i.push(l)}}),{size:r,shape:n,stops:i,position:a,type:2}},Oi=function(e,t){var n=0,r=3,i=[],a=[];return Rr(t).forEach(function(t,o){var s=!0;if(o===0?s=t.reduce(function(e,t){if(R(t))switch(t.value){case`center`:return a.push(Hr),!1;case`top`:case`left`:return a.push(B),!1;case`right`:case`bottom`:return a.push(Ur),!1}else if(z(t)||Br(t))return a.push(t),!1;return e},s):o===1&&(s=t.reduce(function(e,t){if(R(t))switch(t.value){case Ci:return n=0,!1;case wi:return n=1,!1;case Ei:case yi:return r=0,!1;case bi:return r=1,!1;case xi:return r=2,!1;case Ti:case Si:return r=3,!1}else if(Br(t)||z(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)),s){var c=ui(e,t);i.push(c)}}),{size:r,shape:n,stops:i,position:a,type:2}},ki=function(e){return e.type===1},Ai=function(e){return e.type===2},ji={name:`image`,parse:function(e,t){if(t.type===22){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(t.type===18){var r=Ni[t.name];if(r===void 0)throw Error(`Attempting to parse an unsupported image function "`+t.name+`"`);return r(e,t.values)}throw Error(`Unsupported image type `+t.type)}};function Mi(e){return!(e.type===20&&e.value===`none`)&&(e.type!==18||!!Ni[e.name])}var Ni={"linear-gradient":gi,"-moz-linear-gradient":_i,"-ms-linear-gradient":_i,"-o-linear-gradient":_i,"-webkit-linear-gradient":_i,"radial-gradient":Di,"-moz-radial-gradient":Oi,"-ms-radial-gradient":Oi,"-o-radial-gradient":Oi,"-webkit-radial-gradient":Oi,"-webkit-gradient":vi},Pi={name:`background-image`,initialValue:`none`,type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var n=t[0];return n.type===20&&n.value===`none`?[]:t.filter(function(e){return Lr(e)&&Mi(e)}).map(function(t){return ji.parse(e,t)})}},Fi={name:`background-origin`,initialValue:`border-box`,prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(R(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2}return 0})}},Ii={name:`background-position`,initialValue:`0% 0%`,type:1,prefix:!1,parse:function(e,t){return Rr(t).map(function(e){return e.filter(z)}).map(Vr)}},Li={name:`background-repeat`,initialValue:`repeat`,prefix:!1,type:1,parse:function(e,t){return Rr(t).map(function(e){return e.filter(R).map(function(e){return e.value}).join(` `)}).map(Ri)}},Ri=function(e){switch(e){case`no-repeat`:return 1;case`repeat-x`:case`repeat no-repeat`:return 2;case`repeat-y`:case`no-repeat repeat`:return 3;case`repeat`:default:return 0}},zi;(function(e){e.AUTO=`auto`,e.CONTAIN=`contain`,e.COVER=`cover`})(zi||={});var Bi={name:`background-size`,initialValue:`0`,prefix:!1,type:1,parse:function(e,t){return Rr(t).map(function(e){return e.filter(Vi)})}},Vi=function(e){return R(e)||z(e)},Hi=function(e){return{name:`border-`+e+`-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`}},Ui=Hi(`top`),Wi=Hi(`right`),Gi=Hi(`bottom`),Ki=Hi(`left`),qi=function(e){return{name:`border-radius-`+e,initialValue:`0 0`,prefix:!1,type:1,parse:function(e,t){return Vr(t.filter(z))}}},Ji=qi(`top-left`),Yi=qi(`top-right`),Xi=qi(`bottom-right`),Zi=qi(`bottom-left`),Qi=function(e){return{name:`border-`+e+`-style`,initialValue:`solid`,prefix:!1,type:2,parse:function(e,t){switch(t){case`none`:return 0;case`dashed`:return 2;case`dotted`:return 3;case`double`:return 4}return 1}}},$i=Qi(`top`),ea=Qi(`right`),ta=Qi(`bottom`),na=Qi(`left`),ra=function(e){return{name:`border-`+e+`-width`,initialValue:`0`,type:0,prefix:!1,parse:function(e,t){return Mr(t)?t.number:0}}},ia=ra(`top`),aa=ra(`right`),oa=ra(`bottom`),sa=ra(`left`),ca={name:`color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},la={name:`direction`,initialValue:`ltr`,prefix:!1,type:2,parse:function(e,t){switch(t){case`rtl`:return 1;case`ltr`:default:return 0}}},ua={name:`display`,initialValue:`inline-block`,prefix:!1,type:1,parse:function(e,t){return t.filter(R).reduce(function(e,t){return e|da(t.value)},0)}},da=function(e){switch(e){case`block`:case`-webkit-box`:return 2;case`inline`:return 4;case`run-in`:return 8;case`flow`:return 16;case`flow-root`:return 32;case`table`:return 64;case`flex`:case`-webkit-flex`:return 128;case`grid`:case`-ms-grid`:return 256;case`ruby`:return 512;case`subgrid`:return 1024;case`list-item`:return 2048;case`table-row-group`:return 4096;case`table-header-group`:return 8192;case`table-footer-group`:return 16384;case`table-row`:return 32768;case`table-cell`:return 65536;case`table-column-group`:return 131072;case`table-column`:return 262144;case`table-caption`:return 524288;case`ruby-base`:return 1048576;case`ruby-text`:return 2097152;case`ruby-base-container`:return 4194304;case`ruby-text-container`:return 8388608;case`contents`:return 16777216;case`inline-block`:return 33554432;case`inline-list-item`:return 67108864;case`inline-table`:return 134217728;case`inline-flex`:return 268435456;case`inline-grid`:return 536870912}return 0},fa={name:`float`,initialValue:`none`,prefix:!1,type:2,parse:function(e,t){switch(t){case`left`:return 1;case`right`:return 2;case`inline-start`:return 3;case`inline-end`:return 4}return 0}},pa={name:`letter-spacing`,initialValue:`0`,prefix:!1,type:0,parse:function(e,t){return t.type===20&&t.value===`normal`?0:t.type===17||t.type===15?t.number:0}},ma;(function(e){e.NORMAL=`normal`,e.STRICT=`strict`})(ma||={});var ha={name:`line-break`,initialValue:`normal`,prefix:!1,type:2,parse:function(e,t){switch(t){case`strict`:return ma.STRICT;case`normal`:default:return ma.NORMAL}}},ga={name:`line-height`,initialValue:`normal`,prefix:!1,type:4},_a=function(e,t){return R(e)&&e.value===`normal`?1.2*t:e.type===17?t*e.number:z(e)?V(e,t):t},va={name:`list-style-image`,initialValue:`none`,type:0,prefix:!1,parse:function(e,t){return t.type===20&&t.value===`none`?null:ji.parse(e,t)}},ya={name:`list-style-position`,initialValue:`outside`,prefix:!1,type:2,parse:function(e,t){switch(t){case`inside`:return 0;case`outside`:default:return 1}}},ba={name:`list-style-type`,initialValue:`none`,prefix:!1,type:2,parse:function(e,t){switch(t){case`disc`:return 0;case`circle`:return 1;case`square`:return 2;case`decimal`:return 3;case`cjk-decimal`:return 4;case`decimal-leading-zero`:return 5;case`lower-roman`:return 6;case`upper-roman`:return 7;case`lower-greek`:return 8;case`lower-alpha`:return 9;case`upper-alpha`:return 10;case`arabic-indic`:return 11;case`armenian`:return 12;case`bengali`:return 13;case`cambodian`:return 14;case`cjk-earthly-branch`:return 15;case`cjk-heavenly-stem`:return 16;case`cjk-ideographic`:return 17;case`devanagari`:return 18;case`ethiopic-numeric`:return 19;case`georgian`:return 20;case`gujarati`:return 21;case`gurmukhi`:return 22;case`hebrew`:return 22;case`hiragana`:return 23;case`hiragana-iroha`:return 24;case`japanese-formal`:return 25;case`japanese-informal`:return 26;case`kannada`:return 27;case`katakana`:return 28;case`katakana-iroha`:return 29;case`khmer`:return 30;case`korean-hangul-formal`:return 31;case`korean-hanja-formal`:return 32;case`korean-hanja-informal`:return 33;case`lao`:return 34;case`lower-armenian`:return 35;case`malayalam`:return 36;case`mongolian`:return 37;case`myanmar`:return 38;case`oriya`:return 39;case`persian`:return 40;case`simp-chinese-formal`:return 41;case`simp-chinese-informal`:return 42;case`tamil`:return 43;case`telugu`:return 44;case`thai`:return 45;case`tibetan`:return 46;case`trad-chinese-formal`:return 47;case`trad-chinese-informal`:return 48;case`upper-armenian`:return 49;case`disclosure-open`:return 50;case`disclosure-closed`:return 51;case`none`:default:return-1}}},xa=function(e){return{name:`margin-`+e,initialValue:`0`,prefix:!1,type:4}},Sa=xa(`top`),Ca=xa(`right`),wa=xa(`bottom`),Ta=xa(`left`),Ea={name:`overflow`,initialValue:`visible`,prefix:!1,type:1,parse:function(e,t){return t.filter(R).map(function(e){switch(e.value){case`hidden`:return 1;case`scroll`:return 2;case`clip`:return 3;case`auto`:return 4;case`visible`:default:return 0}})}},Da={name:`overflow-wrap`,initialValue:`normal`,prefix:!1,type:2,parse:function(e,t){switch(t){case`break-word`:return`break-word`;case`normal`:default:return`normal`}}},Oa=function(e){return{name:`padding-`+e,initialValue:`0`,prefix:!1,type:3,format:`length-percentage`}},ka=Oa(`top`),Aa=Oa(`right`),ja=Oa(`bottom`),Ma=Oa(`left`),Na={name:`text-align`,initialValue:`left`,prefix:!1,type:2,parse:function(e,t){switch(t){case`right`:return 2;case`center`:case`justify`:return 1;case`left`:default:return 0}}},Pa={name:`position`,initialValue:`static`,prefix:!1,type:2,parse:function(e,t){switch(t){case`relative`:return 1;case`absolute`:return 2;case`fixed`:return 3;case`sticky`:return 4}return 0}},Fa={name:`text-shadow`,initialValue:`none`,type:1,prefix:!1,parse:function(e,t){return t.length===1&&Fr(t[0],`none`)?[]:Rr(t).map(function(t){for(var n={color:si.TRANSPARENT,offsetX:B,offsetY:B,blur:B},r=0,i=0;i1?1:0],this.overflowWrap=K(e,Da,t.overflowWrap),this.paddingTop=K(e,ka,t.paddingTop),this.paddingRight=K(e,Aa,t.paddingRight),this.paddingBottom=K(e,ja,t.paddingBottom),this.paddingLeft=K(e,Ma,t.paddingLeft),this.paintOrder=K(e,uo,t.paintOrder),this.position=K(e,Pa,t.position),this.textAlign=K(e,Na,t.textAlign),this.textDecorationColor=K(e,Xa,(n=t.textDecorationColor)??t.color),this.textDecorationLine=K(e,Za,(r=t.textDecorationLine)??t.textDecoration),this.textShadow=K(e,Fa,t.textShadow),this.textTransform=K(e,Ia,t.textTransform),this.transform=K(e,La,t.transform),this.transformOrigin=K(e,Ua,t.transformOrigin),this.visibility=K(e,Wa,t.visibility),this.webkitTextStrokeColor=K(e,fo,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=K(e,po,t.webkitTextStrokeWidth),this.wordBreak=K(e,Ka,t.wordBreak),this.zIndex=K(e,qa,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return $r(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return G(this.display,4)||G(this.display,33554432)||G(this.display,268435456)||G(this.display,536870912)||G(this.display,67108864)||G(this.display,134217728)},e}(),ho=function(){function e(e,t){this.content=K(e,ro,t.content),this.quotes=K(e,so,t.quotes)}return e}(),go=function(){function e(e,t){this.counterIncrement=K(e,io,t.counterIncrement),this.counterReset=K(e,ao,t.counterReset)}return e}(),K=function(e,t,n){var r=new Ar,i=n==null?t.initialValue:n.toString();r.write(i);var a=new jr(r.read());switch(t.type){case 2:var o=a.parseComponentValue();return t.parse(e,R(o)?o.value:t.initialValue);case 0:return t.parse(e,a.parseComponentValue());case 1:return t.parse(e,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(t.format){case`angle`:return Yr.parse(e,a.parseComponentValue());case`color`:return Qr.parse(e,a.parseComponentValue());case`image`:return ji.parse(e,a.parseComponentValue());case`length`:var s=a.parseComponentValue();return Br(s)?s:B;case`length-percentage`:var c=a.parseComponentValue();return z(c)?c:B;case`time`:return Ja.parse(e,a.parseComponentValue())}break}},_o=`data-html2canvas-debug`,vo=function(e){var t=e.getAttribute(_o);switch(t){case`all`:return 1;case`clone`:return 2;case`parse`:return 3;case`render`:return 4;default:return 0}},yo=function(e,t){var n=vo(e);return n===1||t===n},bo=function(){function e(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,yo(t,3))debugger;this.styles=new mo(e,window.getComputedStyle(t,null)),mc(t)&&(this.styles.animationDuration.some(function(e){return e>0})&&(t.style.animationDuration=`0s`),this.styles.transform!==null&&(t.style.transform=`none`)),this.bounds=ae(this.context,t),yo(t,4)&&(this.flags|=16)}return e}(),xo=`AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=`,So=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Co=typeof Uint8Array>`u`?[]:new Uint8Array(256),wo=0;wo>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},Eo=function(e){for(var t=e.length,n=[],r=0;r>Oo,No=1<>Oo,Io=Mo+Fo,Lo=Io,Ro=32,zo=Lo+Ro,Bo=65536>>ko,Vo=1<=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>Oo],t=(t<>Oo)],t=(t<>ko),t=this.index[t],t+=e>>Oo&Ho,t=this.index[t],t=(t<`u`?[]:new Uint8Array(256),Yo=0;Yo=55296&&i<=56319&&n>10)+55296,o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},ms=Go(xo),hs=`×`,gs=`÷`,_s=function(e){return ms.get(e)},vs=function(e,t,n){var r=n-2,i=t[r],a=t[n-1],o=t[n];if(a===Zo&&o===Qo)return hs;if(a===Zo||a===Qo||a===$o||o===Zo||o===Qo||o===$o)return gs;if(a===ns&&[ns,rs,ss,cs].indexOf(o)!==-1||(a===ss||a===rs)&&(o===rs||o===os)||(a===cs||a===os)&&o===os||o===ls||o===es||o===ts||a===Xo)return hs;if(a===ls&&o===us){for(;i===es;)i=t[--r];if(i===us)return hs}if(a===ds&&o===ds){for(var s=0;i===ds;)s++,i=t[--r];if(s%2==0)return hs}return gs},ys=function(e){var t=fs(e),n=t.length,r=0,i=0,a=t.map(_s);return{next:function(){if(r>=n)return{done:!0,value:null};for(var e=hs;ro.x||i.y>o.y;return o=i,t===0?!0:s});return e.body.removeChild(t),s},Cs=function(){return new Image().crossOrigin!==void 0},ws=function(){return typeof new XMLHttpRequest().responseType==`string`},Ts=function(e){var t=new Image,n=e.createElement(`canvas`),r=n.getContext(`2d`);if(!r)return!1;t.src=`data:image/svg+xml,`;try{r.drawImage(t,0,0),n.toDataURL()}catch{return!1}return!0},Es=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},Ds=function(e){var t=e.createElement(`canvas`),n=100;t.width=n,t.height=n;var r=t.getContext(`2d`);if(!r)return Promise.reject(!1);r.fillStyle=`rgb(0, 255, 0)`,r.fillRect(0,0,n,n);var i=new Image,a=t.toDataURL();i.src=a;var o=Os(n,n,0,0,i);return r.fillStyle=`red`,r.fillRect(0,0,n,n),ks(o).then(function(t){r.drawImage(t,0,0);var i=r.getImageData(0,0,n,n).data;r.fillStyle=`red`,r.fillRect(0,0,n,n);var o=e.createElement(`div`);return o.style.backgroundImage=`url(`+a+`)`,o.style.height=n+`px`,Es(i)?ks(Os(n,n,0,0,o)):Promise.reject(!1)}).then(function(e){return r.drawImage(e,0,0),Es(r.getImageData(0,0,n,n).data)}).catch(function(){return!1})},Os=function(e,t,n,r,i){var a=`http://www.w3.org/2000/svg`,o=document.createElementNS(a,`svg`),s=document.createElementNS(a,`foreignObject`);return o.setAttributeNS(null,`width`,e.toString()),o.setAttributeNS(null,`height`,t.toString()),s.setAttributeNS(null,`width`,`100%`),s.setAttributeNS(null,`height`,`100%`),s.setAttributeNS(null,`x`,n.toString()),s.setAttributeNS(null,`y`,r.toString()),s.setAttributeNS(null,`externalResourcesRequired`,`true`),o.appendChild(s),s.appendChild(i),o},ks=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src=`data:image/svg+xml;charset=utf-8,`+encodeURIComponent(new XMLSerializer().serializeToString(e))})},q={get SUPPORT_RANGE_BOUNDS(){var e=xs(document);return Object.defineProperty(q,`SUPPORT_RANGE_BOUNDS`,{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=q.SUPPORT_RANGE_BOUNDS&&Ss(document);return Object.defineProperty(q,`SUPPORT_WORD_BREAKING`,{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=Ts(document);return Object.defineProperty(q,`SUPPORT_SVG_DRAWING`,{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from==`function`&&typeof window.fetch==`function`?Ds(document):Promise.resolve(!1);return Object.defineProperty(q,`SUPPORT_FOREIGNOBJECT_DRAWING`,{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=Cs();return Object.defineProperty(q,`SUPPORT_CORS_IMAGES`,{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=ws();return Object.defineProperty(q,`SUPPORT_RESPONSE_TYPE`,{value:e}),e},get SUPPORT_CORS_XHR(){var e=`withCredentials`in new XMLHttpRequest;return Object.defineProperty(q,`SUPPORT_CORS_XHR`,{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<`u`&&Intl.Segmenter);return Object.defineProperty(q,`SUPPORT_NATIVE_TEXT_SEGMENTATION`,{value:e}),e}},As=function(){function e(e,t){this.text=e,this.bounds=t}return e}(),js=function(e,t,n,r){var i=Is(t,n),a=[],o=0;return i.forEach(function(t){if(n.textDecorationLine.length||t.trim().length>0)if(q.SUPPORT_RANGE_BOUNDS){var i=Ns(r,o,t.length).getClientRects();if(i.length>1){var s=Ps(t),c=0;s.forEach(function(t){a.push(new As(t,M.fromDOMRectList(e,Ns(r,c+o,t.length).getClientRects()))),c+=t.length})}else a.push(new As(t,M.fromDOMRectList(e,i)))}else{var l=r.splitText(t.length);a.push(new As(t,Ms(e,r))),r=l}else q.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));o+=t.length}),a},Ms=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement(`html2canvaswrapper`);r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var a=ae(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),a}}return M.EMPTY},Ns=function(e,t,n){var r=e.ownerDocument;if(!r)throw Error(`Node has no owner document`);var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},Ps=function(e){if(q.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:`grapheme`});return Array.from(t.segment(e)).map(function(e){return e.segment})}return bs(e)},Fs=function(e,t){if(q.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:`word`});return Array.from(n.segment(e)).map(function(e){return e.segment})}return Rs(e,t)},Is=function(e,t){return t.letterSpacing===0?Fs(e,t):Ps(e)},Ls=[32,160,4961,65792,65793,4153,4241],Rs=function(e,t){for(var n=Gt(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap===`break-word`?`break-word`:t.wordBreak}),r=[],i,a=function(){if(i.value){var e=i.value.slice(),t=se(e),n=``;t.forEach(function(e){Ls.indexOf(e)===-1?n+=N(e):(n.length&&r.push(n),r.push(N(e)),n=``)}),n.length&&r.push(n)}};!(i=n.next()).done;)a();return r},zs=function(){function e(e,t,n){this.text=Bs(t.data,n.textTransform),this.textBounds=js(e,this.text,n,t)}return e}(),Bs=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Vs,Hs);case 2:return e.toUpperCase();default:return e}},Vs=/(^|\s|:|-|\(|\))([a-z])/g,Hs=function(e,t,n){return e.length>0?t+n.toUpperCase():e},Us=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return t}(bo),Ws=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return t}(bo),Gs=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=new XMLSerializer,a=ae(t,n);return n.setAttribute(`width`,a.width+`px`),n.setAttribute(`height`,a.height+`px`),r.svg=`data:image/svg+xml,`+encodeURIComponent(i.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return t}(bo),Ks=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t}(bo),qs=function(e){k(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.start=n.start,r.reversed=typeof n.reversed==`boolean`&&n.reversed===!0,r}return t}(bo),Js=[{type:15,flags:0,unit:`px`,number:3}],Ys=[{type:16,flags:0,number:50}],Xs=function(e){return e.width>e.height?new M(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width0)n.textNodes.push(new zs(e,i,n.styles));else if(pc(i))if(Ac(i)&&i.assignedNodes)i.assignedNodes().forEach(function(t){return sc(e,t,n,r)});else{var o=cc(e,i);o.styles.isVisible()&&(uc(i,o,r)?o.flags|=4:dc(o.styles)&&(o.flags|=2),oc.indexOf(i.tagName)!==-1&&(o.flags|=8),n.elements.push(o),i.slot,i.shadowRoot?sc(e,i.shadowRoot,o,r):!Oc(i)&&!bc(i)&&!kc(i)&&sc(e,i,o,r))}},cc=function(e,t){return wc(t)?new Us(e,t):Sc(t)?new Ws(e,t):bc(t)?new Gs(e,t):gc(t)?new Ks(e,t):_c(t)?new qs(e,t):vc(t)?new nc(e,t):kc(t)?new rc(e,t):Oc(t)?new ic(e,t):Tc(t)?new ac(e,t):new bo(e,t)},lc=function(e,t){var n=cc(e,t);return n.flags|=4,sc(e,t,n,n),n},uc=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||xc(e)&&n.styles.isTransparent()},dc=function(e){return e.isPositioned()||e.isFloating()},fc=function(e){return e.nodeType===Node.TEXT_NODE},pc=function(e){return e.nodeType===Node.ELEMENT_NODE},mc=function(e){return pc(e)&&e.style!==void 0&&!hc(e)},hc=function(e){return typeof e.className==`object`},gc=function(e){return e.tagName===`LI`},_c=function(e){return e.tagName===`OL`},vc=function(e){return e.tagName===`INPUT`},yc=function(e){return e.tagName===`HTML`},bc=function(e){return e.tagName===`svg`},xc=function(e){return e.tagName===`BODY`},Sc=function(e){return e.tagName===`CANVAS`},Cc=function(e){return e.tagName===`VIDEO`},wc=function(e){return e.tagName===`IMG`},Tc=function(e){return e.tagName===`IFRAME`},Ec=function(e){return e.tagName===`STYLE`},Dc=function(e){return e.tagName===`SCRIPT`},Oc=function(e){return e.tagName===`TEXTAREA`},kc=function(e){return e.tagName===`SELECT`},Ac=function(e){return e.tagName===`SLOT`},jc=function(e){return e.tagName.indexOf(`-`)>0},Mc=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach(function(e){return t.counters[e].pop()})},e.prototype.parse=function(e){var t=this,n=e.counterIncrement,r=e.counterReset,i=!0;n!==null&&n.forEach(function(e){var n=t.counters[e.counter];n&&e.increment!==0&&(i=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=e.increment)});var a=[];return i&&r.forEach(function(e){var n=t.counters[e.counter];a.push(e.counter),n||=t.counters[e.counter]=[],n.push(e.reset)}),a},e}(),Nc={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:[`M`,`CM`,`D`,`CD`,`C`,`XC`,`L`,`XL`,`X`,`IX`,`V`,`IV`,`I`]},Pc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:`Ք.Փ.Ւ.Ց.Ր.Տ.Վ.Ս.Ռ.Ջ.Պ.Չ.Ո.Շ.Ն.Յ.Մ.Ճ.Ղ.Ձ.Հ.Կ.Ծ.Խ.Լ.Ի.Ժ.Թ.Ը.Է.Զ.Ե.Դ.Գ.Բ.Ա`.split(`.`)},Fc={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:`י׳.ט׳.ח׳.ז׳.ו׳.ה׳.ד׳.ג׳.ב׳.א׳.ת.ש.ר.ק.צ.פ.ע.ס.נ.מ.ל.כ.יט.יח.יז.טז.טו.י.ט.ח.ז.ו.ה.ד.ג.ב.א`.split(`.`)},Ic={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:`ჵ.ჰ.ჯ.ჴ.ხ.ჭ.წ.ძ.ც.ჩ.შ.ყ.ღ.ქ.ფ.ჳ.ტ.ს.რ.ჟ.პ.ო.ჲ.ნ.მ.ლ.კ.ი.თ.ჱ.ზ.ვ.ე.დ.გ.ბ.ა`.split(`.`)},Lc=function(e,t,n,r,i,a){return en?Yc(e,i,a.length>0):r.integers.reduce(function(t,n,i){for(;e>=n;)e-=n,t+=r.values[i];return t},``)+a},Rc=function(e,t,n,r){var i=``;do n||e--,i=r(e)+i,e/=t;while(e*t>=t);return i},J=function(e,t,n,r,i){var a=n-t+1;return(e<0?`-`:``)+(Rc(Math.abs(e),a,r,function(e){return N(Math.floor(e%a)+t)})+i)},zc=function(e,t,n){n===void 0&&(n=`. `);var r=t.length;return Rc(Math.abs(e),r,!1,function(e){return t[Math.floor(e%r)]})+n},Bc=1,Vc=2,Hc=4,Uc=8,Wc=function(e,t,n,r,i,a){if(e<-9999||e>9999)return Yc(e,4,i.length>0);var o=Math.abs(e),s=i;if(o===0)return t[0]+s;for(var c=0;o>0&&c<=4;c++){var l=o%10;l===0&&G(a,Bc)&&s!==``?s=t[l]+s:l>1||l===1&&c===0||l===1&&c===1&&G(a,Vc)||l===1&&c===1&&G(a,Hc)&&e>100||l===1&&c>1&&G(a,Uc)?s=t[l]+(c>0?n[c-1]:``)+s:l===1&&c>0&&(s=n[c-1]+s),o=Math.floor(o/10)}return(e<0?r:``)+s},Gc=`十百千萬`,Kc=`拾佰仟萬`,qc=`マイナス`,Jc=`마이너스`,Yc=function(e,t,n){var r=n?`. `:``,i=n?`、`:``,a=n?`, `:``,o=n?` `:``;switch(t){case 0:return`•`+o;case 1:return`◦`+o;case 2:return`◾`+o;case 5:var s=J(e,48,57,!0,r);return s.length<4?`0`+s:s;case 4:return zc(e,`〇一二三四五六七八九`,i);case 6:return Lc(e,1,3999,Nc,3,r).toLowerCase();case 7:return Lc(e,1,3999,Nc,3,r);case 8:return J(e,945,969,!1,r);case 9:return J(e,97,122,!1,r);case 10:return J(e,65,90,!1,r);case 11:return J(e,1632,1641,!0,r);case 12:case 49:return Lc(e,1,9999,Pc,3,r);case 35:return Lc(e,1,9999,Pc,3,r).toLowerCase();case 13:return J(e,2534,2543,!0,r);case 14:case 30:return J(e,6112,6121,!0,r);case 15:return zc(e,`子丑寅卯辰巳午未申酉戌亥`,i);case 16:return zc(e,`甲乙丙丁戊己庚辛壬癸`,i);case 17:case 48:return Wc(e,`零一二三四五六七八九`,Gc,`負`,i,Vc|Hc|Uc);case 47:return Wc(e,`零壹貳參肆伍陸柒捌玖`,Kc,`負`,i,Bc|Vc|Hc|Uc);case 42:return Wc(e,`零一二三四五六七八九`,Gc,`负`,i,Vc|Hc|Uc);case 41:return Wc(e,`零壹贰叁肆伍陆柒捌玖`,Kc,`负`,i,Bc|Vc|Hc|Uc);case 26:return Wc(e,`〇一二三四五六七八九`,`十百千万`,qc,i,0);case 25:return Wc(e,`零壱弐参四伍六七八九`,`拾百千万`,qc,i,Bc|Vc|Hc);case 31:return Wc(e,`영일이삼사오육칠팔구`,`십백천만`,Jc,a,Bc|Vc|Hc);case 33:return Wc(e,`零一二三四五六七八九`,`十百千萬`,Jc,a,0);case 32:return Wc(e,`零壹貳參四五六七八九`,`拾百千`,Jc,a,Bc|Vc|Hc);case 18:return J(e,2406,2415,!0,r);case 20:return Lc(e,1,19999,Ic,3,r);case 21:return J(e,2790,2799,!0,r);case 22:return J(e,2662,2671,!0,r);case 22:return Lc(e,1,10999,Fc,3,r);case 23:return zc(e,`あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん`);case 24:return zc(e,`いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす`);case 27:return J(e,3302,3311,!0,r);case 28:return zc(e,`アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン`,i);case 29:return zc(e,`イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス`,i);case 34:return J(e,3792,3801,!0,r);case 37:return J(e,6160,6169,!0,r);case 38:return J(e,4160,4169,!0,r);case 39:return J(e,2918,2927,!0,r);case 40:return J(e,1776,1785,!0,r);case 43:return J(e,3046,3055,!0,r);case 44:return J(e,3174,3183,!0,r);case 45:return J(e,3664,3673,!0,r);case 46:return J(e,3872,3881,!0,r);case 3:default:return J(e,48,57,!0,r)}},Xc=`data-html2canvas-ignore`,Zc=function(){function e(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new Mc,this.quoteDepth=0,!t.ownerDocument)throw Error(`Cloned element does not have an owner document`);this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var n=this,r=$c(e,t);if(!r.contentWindow)return Promise.reject(`Unable to find iframe window`);var i=e.defaultView.pageXOffset,a=e.defaultView.pageYOffset,o=r.contentWindow,s=o.document,c=nl(r).then(function(){return A(n,void 0,void 0,function(){var e,n;return j(this,function(i){switch(i.label){case 0:return this.scrolledElements.forEach(sl),o&&(o.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(o.scrollY!==t.top||o.scrollX!==t.left)&&(this.context.logger.warn(`Unable to restore scroll position for cloned document`),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-t.left,o.scrollY-t.top,0,0))),e=this.options.onclone,n=this.clonedReferenceElement,n===void 0?[2,Promise.reject(`Error finding the `+this.referenceElement.nodeName+` in the cloned document`)]:s.fonts&&s.fonts.ready?[4,s.fonts.ready]:[3,2];case 1:i.sent(),i.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,tl(s)]:[3,4];case 3:i.sent(),i.label=4;case 4:return typeof e==`function`?[2,Promise.resolve().then(function(){return e(s,n)}).then(function(){return r})]:[2,r]}})})});return s.open(),s.write(al(document.doctype)+``),ol(this.referenceElement.ownerDocument,i,a),s.replaceChild(s.adoptNode(this.documentElement),s.documentElement),s.close(),c},e.prototype.createElementClone=function(e){if(yo(e,2))debugger;if(Sc(e))return this.createCanvasClone(e);if(Cc(e))return this.createVideoClone(e);if(Ec(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return wc(t)&&(wc(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=``),t.loading===`lazy`&&(t.loading=`eager`)),jc(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement(`html2canvascustomelement`);return il(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce(function(e,t){return t&&typeof t.cssText==`string`?e+t.cssText:e},``),r=e.cloneNode(!1);return r.textContent=n,r}}catch(e){if(this.context.logger.error(`Unable to access cssRules property`,e),e.name!==`SecurityError`)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement(`img`);try{return n.src=e.toDataURL(),n}catch{this.context.logger.info(`Unable to inline canvas contents, canvas is tainted`,e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var i=e.getContext(`2d`),a=r.getContext(`2d`);if(a)if(!this.options.allowTaint&&i)a.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var o=(t=e.getContext(`webgl2`))??e.getContext(`webgl`);if(o){var s=o.getContextAttributes();s?.preserveDrawingBuffer===!1&&this.context.logger.warn(`Unable to clone WebGL context as it has preserveDrawingBuffer=false`,e)}a.drawImage(e,0,0)}return r}catch{this.context.logger.info(`Unable to clone canvas as it is tainted`,e)}return r},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement(`canvas`);t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext(`2d`);try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info(`Unable to clone video as it is tainted`,e)}var r=e.ownerDocument.createElement(`canvas`);return r.width=e.offsetWidth,r.height=e.offsetHeight,r},e.prototype.appendChildNode=function(e,t,n){(!pc(t)||!Dc(t)&&!t.hasAttribute(Xc)&&(typeof this.options.ignoreElements!=`function`||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!pc(t)||!Ec(t))&&e.appendChild(this.cloneNode(t,n))},e.prototype.cloneChildNodes=function(e,t,n){for(var r=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(pc(i)&&Ac(i)&&typeof i.assignedNodes==`function`){var a=i.assignedNodes();a.length&&a.forEach(function(e){return r.appendChildNode(t,e,n)})}else this.appendChildNode(t,i,n)},e.prototype.cloneNode=function(e,t){if(fc(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&pc(e)&&(mc(e)||hc(e))){var r=this.createElementClone(e);r.style.transitionProperty=`none`;var i=n.getComputedStyle(e),a=n.getComputedStyle(e,`:before`),o=n.getComputedStyle(e,`:after`);this.referenceElement===e&&mc(r)&&(this.clonedReferenceElement=r),xc(r)&&pl(r);var s=this.counters.parse(new go(this.context,i)),c=this.resolvePseudoContent(e,r,a,Qc.BEFORE);jc(e)&&(t=!0),Cc(e)||this.cloneChildNodes(e,r,t),c&&r.insertBefore(c,r.firstChild);var l=this.resolvePseudoContent(e,r,o,Qc.AFTER);return l&&r.appendChild(l),this.counters.pop(s),(i&&(this.options.copyStyles||hc(e))&&!Tc(e)||t)&&il(i,r),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(Oc(e)||kc(e))&&(Oc(r)||kc(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,r){var i=this;if(n){var a=n.content,o=t.ownerDocument;if(!(!o||!a||a===`none`||a===`-moz-alt-content`||n.display===`none`)){this.counters.parse(new go(this.context,n));var s=new ho(this.context,n),c=o.createElement(`html2canvaspseudoelement`);il(n,c),s.content.forEach(function(t){if(t.type===0)c.appendChild(o.createTextNode(t.value));else if(t.type===22){var n=o.createElement(`img`);n.src=t.value,n.style.opacity=`1`,c.appendChild(n)}else if(t.type===18){if(t.name===`attr`){var r=t.values.filter(R);r.length&&c.appendChild(o.createTextNode(e.getAttribute(r[0].value)||``))}else if(t.name===`counter`){var a=t.values.filter(Lr),l=a[0],u=a[1];if(l&&R(l)){var d=i.counters.getCounterValue(l.value),f=u&&R(u)?ba.parse(i.context,u.value):3;c.appendChild(o.createTextNode(Yc(d,f,!1)))}}else if(t.name===`counters`){var p=t.values.filter(Lr),l=p[0],m=p[1],u=p[2];if(l&&R(l)){var h=i.counters.getCounterValues(l.value),g=u&&R(u)?ba.parse(i.context,u.value):3,_=m&&m.type===0?m.value:``,v=h.map(function(e){return Yc(e,g,!1)}).join(_);c.appendChild(o.createTextNode(v))}}}else if(t.type===20)switch(t.value){case`open-quote`:c.appendChild(o.createTextNode(co(s.quotes,i.quoteDepth++,!0)));break;case`close-quote`:c.appendChild(o.createTextNode(co(s.quotes,--i.quoteDepth,!1)));break;default:c.appendChild(o.createTextNode(t.value))}}),c.className=ul+` `+dl;var l=r===Qc.BEFORE?` `+ul:` `+dl;return hc(t)?t.className.baseValue+=l:t.className+=l,c}}},e.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},e}(),Qc;(function(e){e[e.BEFORE=0]=`BEFORE`,e[e.AFTER=1]=`AFTER`})(Qc||={});var $c=function(e,t){var n=e.createElement(`iframe`);return n.className=`html2canvas-container`,n.style.visibility=`hidden`,n.style.position=`fixed`,n.style.left=`-10000px`,n.style.top=`0px`,n.style.border=`0`,n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling=`no`,n.setAttribute(Xc,`true`),e.body.appendChild(n),n},el=function(e){return new Promise(function(t){if(e.complete){t();return}if(!e.src){t();return}e.onload=t,e.onerror=t})},tl=function(e){return Promise.all([].slice.call(e.images,0).map(el))},nl=function(e){return new Promise(function(t,n){var r=e.contentWindow;if(!r)return n(`No window assigned for iframe`);var i=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var n=setInterval(function(){i.body.childNodes.length>0&&i.readyState===`complete`&&(clearInterval(n),t(e))},50)}})},rl=[`all`,`d`,`content`],il=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);rl.indexOf(r)===-1&&t.style.setProperty(r,e.getPropertyValue(r))}return t},al=function(e){var t=``;return e&&(t+=``),t},ol=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},sl=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},cl=`:before`,ll=`:after`,ul=`___html2canvas___pseudoelement_before`,dl=`___html2canvas___pseudoelement_after`,fl=`{ content: "" !important; display: none !important; }`,pl=function(e){ml(e,`.`+ul+cl+fl+` diff --git a/assets/background-remove-CfzWeaPN.js b/assets/background-remove-D40tSYmj.js similarity index 94% rename from assets/background-remove-CfzWeaPN.js rename to assets/background-remove-D40tSYmj.js index 708b667e300ea72e2dba874353c27398fbdb8de9..773d9c3359b51f976e65fe368953eb147a4a7975 100644 --- a/assets/background-remove-CfzWeaPN.js +++ b/assets/background-remove-D40tSYmj.js @@ -1 +1 @@ -import{b as e}from"./InputFile-ClfQXb90.js";import{dQ as t,dS as n,dT as r,dV as i,dW as a,dY as o,dZ as s,e3 as c,e5 as l,e6 as u,eg as d,ek as f,en as p,eo as m,y as h}from"./index-BqrqTEsQ.js";import{b as g,c as _,d as v,f as y}from"./transformers.web-DwlcaNlo.js";const b={flex:``,"flex-col":``,"items-center":``,"gap-4":``},x=[`disabled`],S={"h-full":``,"w-full":``,flex:``,"gap-2":``},C={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,"overflow-hidden":``,"rounded-lg":``},w=[`src`],T={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,relative:``,"overflow-hidden":``,"rounded-lg":``},E={key:0,bg:`black/50`,absolute:``,"inset-0":``,"z-10":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``},D={"mb-4":``,"text-white":``,"font-medium":``},O={bg:`gray-200/30`,w:`70%`,"h-2":``,"overflow-hidden":``,"rounded-full":``},k=[`src`],A={bg:`black/0 group-hover:black/20`,absolute:``,"inset-0":``,flex:``,"items-center":``,"justify-center":``,"transition-all":``,"duration-200":``},j=[`onClick`],M={key:1,absolute:``,"bottom-2":``,"right-2":``};var N=s({__name:`background-remove`,setup(s){let N=d(),P=d(),F=d(),I=d(),L=d(!1),R=d(0),z=d(),B=d(),V=d([]),H=n(()=>V.value.map(e=>URL.createObjectURL(e)));c(async()=>{try{if(!(await h()).supported)throw Error(`WebGPU is not supported in this browser.`);let e=`Xenova/modnet`;y.backends.onnx.wasm.proxy=!1,N.value??=await g.from_pretrained(e,{device:`webgpu`}),P.value??=await _.from_pretrained(e,{})}catch(e){F.value=e}I.value=!1});async function U(){if(!N.value||!P.value)return;L.value=!0,R.value=0,z.value=[];let e=H.value.length;for(let t=0;t=z.value.length||!V.value[e])return;let t=V.value[e].name,n=t.substring(0,t.lastIndexOf(`.`))||t,r=t.substring(t.lastIndexOf(`.`))||`.png`,i=`${n}-background-removed${r}`,a=document.createElement(`a`);a.href=z.value[e],a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}function G(){!z.value||z.value.length===0||z.value.forEach((e,t)=>{setTimeout(()=>W(t),t*100)})}return(n,s)=>(l(),a(`div`,b,[r(`button`,{bg:`neutral-100 dark:neutral-800`,"w-full":``,"cursor-pointer":``,"rounded-lg":``,"px-3":``,"py-2":``,disabled:L.value,onClick:U},m(L.value?`Processing...`:`Process`),9,x),r(`div`,S,[r(`div`,C,[(l(!0),a(t,null,u(H.value,(e,t)=>(l(),a(`img`,{key:t,src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,w))),128))]),r(`div`,T,[L.value?(l(),a(`div`,E,[r(`div`,D,m(R.value)+`% `,1),r(`div`,O,[r(`div`,{bg:`emerald-500`,"h-full":``,style:p({width:`${R.value}%`}),"transition-all":``,"duration-200":``},null,4)])])):i(``,!0),(l(!0),a(t,null,u(z.value,(e,t)=>(l(),a(`div`,{key:t,relative:``,class:`group`,"h-full":``,"w-full":``},[r(`img`,{src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,k),r(`div`,A,[r(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,"opacity-0":``,"transition-all":``,"duration-200":``,"group-hover:opacity-100":``,onClick:e=>W(t)},s[1]||=[r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[r(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4`})],-1)],8,j)])]))),128)),z.value&&z.value.length>1?(l(),a(`div`,M,[r(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,onClick:G},s[2]||=[r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[r(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12`})],-1)])])):i(``,!0)])]),o(f(e),{modelValue:V.value,"onUpdate:modelValue":s[0]||=e=>V.value=e,"w-full":``},null,8,[`modelValue`])]))}}),P=N;export{P as default}; \ No newline at end of file +import{b as e}from"./InputFile-CrEM0anr.js";import{dQ as t,dS as n,dT as r,dV as i,dW as a,dY as o,dZ as s,e3 as c,e5 as l,e6 as u,eg as d,ek as f,en as p,eo as m,y as h}from"./index-D1IGsMK6.js";import{b as g,c as _,d as v,f as y}from"./transformers.web-B7NywNTw.js";const b={flex:``,"flex-col":``,"items-center":``,"gap-4":``},x=[`disabled`],S={"h-full":``,"w-full":``,flex:``,"gap-2":``},C={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,"overflow-hidden":``,"rounded-lg":``},w=[`src`],T={w:`[50%]`,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"min-h":`120`,h:`auto`,relative:``,"overflow-hidden":``,"rounded-lg":``},E={key:0,bg:`black/50`,absolute:``,"inset-0":``,"z-10":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``},D={"mb-4":``,"text-white":``,"font-medium":``},O={bg:`gray-200/30`,w:`70%`,"h-2":``,"overflow-hidden":``,"rounded-full":``},k=[`src`],A={bg:`black/0 group-hover:black/20`,absolute:``,"inset-0":``,flex:``,"items-center":``,"justify-center":``,"transition-all":``,"duration-200":``},j=[`onClick`],M={key:1,absolute:``,"bottom-2":``,"right-2":``};var N=s({__name:`background-remove`,setup(s){let N=d(),P=d(),F=d(),I=d(),L=d(!1),R=d(0),z=d(),B=d(),V=d([]),H=n(()=>V.value.map(e=>URL.createObjectURL(e)));c(async()=>{try{if(!(await h()).supported)throw Error(`WebGPU is not supported in this browser.`);let e=`Xenova/modnet`;y.backends.onnx.wasm.proxy=!1,N.value??=await g.from_pretrained(e,{device:`webgpu`}),P.value??=await _.from_pretrained(e,{})}catch(e){F.value=e}I.value=!1});async function U(){if(!N.value||!P.value)return;L.value=!0,R.value=0,z.value=[];let e=H.value.length;for(let t=0;t=z.value.length||!V.value[e])return;let t=V.value[e].name,n=t.substring(0,t.lastIndexOf(`.`))||t,r=t.substring(t.lastIndexOf(`.`))||`.png`,i=`${n}-background-removed${r}`,a=document.createElement(`a`);a.href=z.value[e],a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}function G(){!z.value||z.value.length===0||z.value.forEach((e,t)=>{setTimeout(()=>W(t),t*100)})}return(n,s)=>(l(),a(`div`,b,[r(`button`,{bg:`neutral-100 dark:neutral-800`,"w-full":``,"cursor-pointer":``,"rounded-lg":``,"px-3":``,"py-2":``,disabled:L.value,onClick:U},m(L.value?`Processing...`:`Process`),9,x),r(`div`,S,[r(`div`,C,[(l(!0),a(t,null,u(H.value,(e,t)=>(l(),a(`img`,{key:t,src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,w))),128))]),r(`div`,T,[L.value?(l(),a(`div`,E,[r(`div`,D,m(R.value)+`% `,1),r(`div`,O,[r(`div`,{bg:`emerald-500`,"h-full":``,style:p({width:`${R.value}%`}),"transition-all":``,"duration-200":``},null,4)])])):i(``,!0),(l(!0),a(t,null,u(z.value,(e,t)=>(l(),a(`div`,{key:t,relative:``,class:`group`,"h-full":``,"w-full":``},[r(`img`,{src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,k),r(`div`,A,[r(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,"opacity-0":``,"transition-all":``,"duration-200":``,"group-hover:opacity-100":``,onClick:e=>W(t)},s[1]||=[r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[r(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4`})],-1)],8,j)])]))),128)),z.value&&z.value.length>1?(l(),a(`div`,M,[r(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,onClick:G},s[2]||=[r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[r(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12`})],-1)])])):i(``,!0)])]),o(f(e),{modelValue:V.value,"onUpdate:modelValue":s[0]||=e=>V.value=e,"w-full":``},null,8,[`modelValue`])]))}}),P=N;export{P as default}; \ No newline at end of file diff --git a/assets/chat-BNaBa8nr.js b/assets/chat-BpPMC4QJ.js similarity index 99% rename from assets/chat-BNaBa8nr.js rename to assets/chat-BpPMC4QJ.js index 8e3cb225a9f7abb81e5632f3fc2bb2b8d616673d..7a1410ba7b5d0827930dcb993f525591066ee9f8 100644 --- a/assets/chat-BNaBa8nr.js +++ b/assets/chat-BpPMC4QJ.js @@ -1,3 +1,3 @@ -import{bR as e,dN as t,dQ as n,dT as r,dV as i,dW as a,dZ as o,df as s,e5 as c,e6 as l,ee as u,ef as d,eg as f,ei as p,ek as m,eo as h}from"./index-BqrqTEsQ.js";const g=()=>{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}}}},_=new WeakMap,v=new WeakMap;let y=0,b=0;const x=e=>{let t=`${y++}`,n={debugLabel:e?.debugLabel??t,include:e=>r.has(e),with:i=>{let a=`${b++}`,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),v.set(o,n),o}},r=new WeakSet;_.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},S=e=>typeof e==`object`&&e?_.has(e):!1,C=e=>typeof e==`object`&&e?v.get(e):void 0,w=e=>typeof e==`object`&&!!e&&`data`in e,T=e=>e!=null&&typeof e.then==`function`;function E(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 D.set(t,e),t}var A=class extends TransformStream{constructor(){super({transform:(e,t)=>{C(e)&&t.enqueue(JSON.stringify({data:e.data,uniqueId:C(e).uniqueId})+` +import{bR as e,dN as t,dQ as n,dT as r,dV as i,dW as a,dZ as o,df as s,e5 as c,e6 as l,ee as u,ef as d,eg as f,ei as p,ek as m,eo as h}from"./index-D1IGsMK6.js";const g=()=>{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}}}},_=new WeakMap,v=new WeakMap;let y=0,b=0;const x=e=>{let t=`${y++}`,n={debugLabel:e?.debugLabel??t,include:e=>r.has(e),with:i=>{let a=`${b++}`,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),v.set(o,n),o}},r=new WeakSet;_.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},S=e=>typeof e==`object`&&e?_.has(e):!1,C=e=>typeof e==`object`&&e?v.get(e):void 0,w=e=>typeof e==`object`&&!!e&&`data`in e,T=e=>e!=null&&typeof e.then==`function`;function E(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 D.set(t,e),t}var A=class extends TransformStream{constructor(){super({transform:(e,t)=>{C(e)&&t.enqueue(JSON.stringify({data:e.data,uniqueId:C(e).uniqueId})+` `)}})}},j=class extends TransformStream{#eventMap;constructor(e){super({transform:(e,t)=>{let n=e.split(` `).map(e=>e.trim()).filter(e=>e.length>0);n.forEach(e=>{let n=JSON.parse(e),r=Object.values(this.#eventMap).find(e=>e.uniqueId===n.uniqueId);if(r){let e=r.with(n.data);t.enqueue(e)}else console.warn(`Unknown event: ${n.uniqueId}`)})}}),this.#eventMap=e}},M=class e extends ReadableStream{#stream;#subscribable;on(e,t){return this.#subscribable.subscribe(n=>{e.include(n)&&t(n)})}constructor(e,t){if(!e&&!t)throw TypeError(`Either subscribable or root stream must be provided`);if(super(),e){this.#subscribable=e;let n;this.#stream=t??new ReadableStream({start:t=>{n=e.subscribe(e=>{t.enqueue(e)})},cancel:()=>{n()}})}else{this.#subscribable=k(),this.#stream=t.pipeThrough(new TransformStream({transform:(e,t)=>{this.#subscribable.publish(e),t.enqueue(e)}}));return}}static fromReadableStream(t){return new e(null,t.pipeThrough(new TransformStream({transform:(e,t)=>{t.enqueue(e)}})))}static fromResponse(t,n){let r=t.body;if(!r)throw Error(`Response body is not readable`);return new e(null,r.pipeThrough(new TextDecoderStream).pipeThrough(new j(n)))}toResponse(e,t=new A){return new Response(this.#stream.pipeThrough(t).pipeThrough(new TextEncoderStream),e)}get locked(){return this.#stream.locked}[Symbol.asyncIterator](){return this.#stream[Symbol.asyncIterator]()}cancel(e){return this.#stream.cancel(e)}getReader(){return this.#stream.getReader()}pipeThrough(t,n){let r=this.#stream.pipeThrough(t,n);return new e(null,r)}pipeTo(e,t){return this.#stream.pipeTo(e,t)}tee(){let[t,n]=this.#stream.tee();return[new e(this.#subscribable,t),new e(this.#subscribable,n)]}forEach(e){return this.#stream.pipeTo(new WritableStream({write:t=>{e(t)}}))}map(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(e(t))}}))}values(e){return this.#stream.values(e)}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):S(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):S(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 N=g();function P(){let e=N.getStore();if(!e)throw Error(`No current context found`);return e}const F=g(),I=new WeakMap,L=({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);F.run(l,()=>{let e=[...new Set([...O(s.__internal__call_context),...O(u.__internal__call_context)])];N.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}T(e)?(l.async=!0,l.pending=e.then(e=>(w(e)&&u.sendEvent(e),e))):w(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=E(e,i);return t.length===e.length}).map(([e,a])=>{let o=E(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=k();s.__internal__call_send_event.subscribe(n=>{let r=I.get(n);for(;r;){if(r===e){t.publish(n);break}r=r.prev}}),n=new M(t,null)}return n},get signal(){return e.abortController.signal},sendEvent:(...n)=>{n.forEach(n=>{I.set(n,e),e.outputs.push(n),t.push(n),s.__internal__call_send_event.publish(n,e),r(e)})},__internal__call_context:k(),__internal__call_send_event:k()}},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},R=()=>{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 L({listeners:e.steps})}}};function z(e,t){let n=(...e)=>{let n=t.filter(([t])=>t.every((t,n)=>t.include(e[n]))).map(([e,t])=>t),r=P(),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=P();return n(t.safeSendEvent,...e)};return e.handle(t,r)},createContext(){let t=e.createContext();return t.__internal__call_context.subscribe((e,t)=>{P().safeSendEvent=n(...e.inputs),t(e)}),t}}}async function B(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 V={flex:``,"flex-col":``,"gap-2":``},H={flex:`~ col`,"gap-2":``},U={flex:``,"flex-col":``,"gap-2":``},W={grid:``,"grid-cols-2":``,"gap-2":``},G={flex:``,"items-center":``,"gap-2":``},K={flex:``,"items-center":``,"gap-2":``},q={flex:``,"items-center":``,"gap-2":``},J={key:0},Y={key:1};var X=o({__name:`chat`,setup(o){let g=s(`settings/llm/baseUrl`,`https://openrouter.ai/api/v1/`),_=s(`settings/llm/apiKey`,``),v=s(`settings/llm/model`,`openai/gpt-4o-mini`),y=f(``),b=f([]),S=f({role:`assistant`,content:``}),C=f(!1),w=x(),T=x(),E=x(),D=x(),O=x();async function k(){C.value=!0;try{let t=z(R(),[[[w],[T,O]],[[T],[E]],[[E],[D]]]);t.handle([w],async()=>{let{sendEvent:n}=t.createContext();S.value={role:`assistant`,content:``},b.value.push({role:`user`,content:y.value}),b.value.push(S.value);let r=await e({baseURL:g.value,apiKey:_.value,model:v.value,messages:b.value.slice(0,b.value.length-1).map(e=>p(e))});for await(let e of r.fullStream)e.type===`text-delta`&&n(T.with(e.text||``));return O.with()}),t.handle([T],async e=>{S.value.content?S.value.content+=e.data:S.value.content=e.data}),await B(t,w.with(),O)}catch(e){console.error(e)}finally{C.value=!1}}return(e,o)=>(c(),a(`div`,V,[r(`div`,H,[r(`div`,U,[o[7]||=r(`div`,null,[r(`span`,{"text-neutral-500":``,"dark:text-neutral-400":``},`LLM`)],-1),r(`div`,W,[r(`label`,G,[o[4]||=r(`span`,{"text-nowrap":``},` Base URL `,-1),u(r(`input`,{"onUpdate:modelValue":o[0]||=e=>d(g)?g.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),[[t,m(g)]])]),r(`label`,K,[o[5]||=r(`span`,{"text-nowrap":``},` API Key `,-1),u(r(`input`,{"onUpdate:modelValue":o[1]||=e=>d(_)?_.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),[[t,m(_)]])]),r(`label`,q,[o[6]||=r(`span`,{"text-nowrap":``},` Model `,-1),u(r(`input`,{"onUpdate:modelValue":o[2]||=e=>d(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),[[t,m(v)]])])])]),r(`div`,null,[u(r(`textarea`,{"onUpdate:modelValue":o[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),[[t,y.value]])]),r(`button`,{"rounded-lg":``,bg:`blue-100 dark:blue-900`,"px-4":``,"py-2":``,onClick:k},` Send `),r(`div`,null,[(c(!0),a(n,null,l(b.value,(e,t)=>(c(),a(`div`,{key:t},[e.role===`user`?(c(),a(`div`,J,[r(`span`,null,h(e.content),1)])):i(``,!0),e.role===`assistant`?(c(),a(`div`,Y,[r(`span`,null,h(e.content),1)])):i(``,!0)]))),128))])])]))}}),Z=X;export{Z as default}; \ No newline at end of file diff --git a/assets/cloudflare-workers-ai-BipstjwR.js b/assets/cloudflare-workers-ai-ZTPk31zu.js similarity index 96% rename from assets/cloudflare-workers-ai-BipstjwR.js rename to assets/cloudflare-workers-ai-ZTPk31zu.js index 6831c285175bebb81bfdfe270364fd935e0a8ea2..8945da146542f8df647aaeefad505b28781188fd 100644 --- a/assets/cloudflare-workers-ai-BipstjwR.js +++ b/assets/cloudflare-workers-ai-ZTPk31zu.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,k as m,m as h,x as g,z as _}from"./index-BqrqTEsQ.js";import{b as v}from"./route-block-gWR0cCIm.js";const y=`cloudflare-workers-ai`;var b=a({__name:`cloudflare-workers-ai`,setup(a){let{t:v}=_(),b=e(),x=g(),{providers:S}=t(x),C=n(()=>x.getProviderMetadata(y)),w=n({get:()=>S.value[y]?.apiKey||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=n({get:()=>S.value[y]?.accountId||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});o(()=>{x.initializeProvider(y),w.value=S.value[y]?.apiKey||``,T.value=S.value[y]?.accountId||``}),c([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){S.value[y]={...C.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":C.value?.localizedName,"provider-icon-color":C.value?.iconColor,"on-back":()=>u(b).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(v)(`settings.pages.providers.common.section.basic.title`),description:u(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:l(()=>[i(u(m),{modelValue:w.value,"onUpdate:modelValue":t[0]||=e=>w.value=e,"provider-name":C.value?.localizedName,placeholder:u(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[1]||=e=>T.value=e,label:u(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:u(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:u(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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,k as m,m as h,x as g,z as _}from"./index-D1IGsMK6.js";import{b as v}from"./route-block-gWR0cCIm.js";const y=`cloudflare-workers-ai`;var b=a({__name:`cloudflare-workers-ai`,setup(a){let{t:v}=_(),b=e(),x=g(),{providers:S}=t(x),C=n(()=>x.getProviderMetadata(y)),w=n({get:()=>S.value[y]?.apiKey||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=n({get:()=>S.value[y]?.accountId||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});o(()=>{x.initializeProvider(y),w.value=S.value[y]?.apiKey||``,T.value=S.value[y]?.accountId||``}),c([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){S.value[y]={...C.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":C.value?.localizedName,"provider-icon-color":C.value?.iconColor,"on-back":()=>u(b).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(v)(`settings.pages.providers.common.section.basic.title`),description:u(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:l(()=>[i(u(m),{modelValue:w.value,"onUpdate:modelValue":t[0]||=e=>w.value=e,"provider-name":C.value?.localizedName,placeholder:u(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[1]||=e=>T.value=e,label:u(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:u(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:u(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-B0eJBuo7.js b/assets/color-scheme-CvisfZEM.js similarity index 97% rename from assets/color-scheme-B0eJBuo7.js rename to assets/color-scheme-CvisfZEM.js index 0beba30e4a5ed9be161ca96bb860a0bd54058a63..298ecdf78f96796d4ca0a08f7d05e41e533f5989 100644 --- a/assets/color-scheme-B0eJBuo7.js +++ b/assets/color-scheme-CvisfZEM.js @@ -1 +1 @@ -import{b as e,cJ as t,cN as n,cp as r,dL as i,dQ as a,dT as o,dU as s,dW as c,dX as l,dY as u,dZ as d,e5 as f,e6 as p,e9 as m,ed as h,ee as g,ek as _,eo as v,o as y,z as b}from"./index-BqrqTEsQ.js";import{b as x}from"./route-block-gWR0cCIm.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:250,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 text-[10px] md:text-base sm:text-xs`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:320,delay:350,transition:`all ease-in-out duration-250`},D={"text-white":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:330,delay:400,transition:`all ease-in-out duration-250`},O={class:`color-bar transparency-grid text-[10px] md:text-base sm:text-xs`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:340,delay:450,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=d({__name:`color-scheme`,setup(n){let d=y(),{t:x}=b();return(n,y)=>{let b=m(`motion`);return f(),c(a,null,[g((f(),s(_(r),{"mb-2":``,title:_(x)(`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:200,transition:`all ease-in-out duration-250`},{default:h(()=>[g((f(),c(`div`,C,[o(`span`,w,v(n.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),o(`label`,T,[g(o(`input`,{"onUpdate:modelValue":y[0]||=e=>_(d).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[i,_(d).themeColorsHueDynamic]]),y[2]||=o(`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),l(` `+v(n.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[b]]),g(u(_(t),{modelValue:_(d).themeColorsHue,"onUpdate:modelValue":y[1]||=e=>_(d).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:300,disabled:_(d).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[b]]),g((f(),c(`div`,E,[y[4]||=o(`span`,{"bg-primary-50":``},`50`,-1),y[5]||=o(`span`,{"bg-primary-100":``},`100`,-1),y[6]||=o(`span`,{"bg-primary-200":``},`200`,-1),y[7]||=o(`span`,{"bg-primary-300":``},`300`,-1),y[8]||=o(`span`,{"bg-primary-400":``},`400`,-1),y[9]||=o(`span`,{"bg-primary-500":``},`500`,-1),g((f(),c(`div`,D,y[3]||=[o(`span`,{"bg-primary-600":``},`600`,-1),o(`span`,{"bg-primary-700":``},`700`,-1),o(`span`,{"bg-primary-800":``},`800`,-1),o(`span`,{"bg-primary-900":``},`900`,-1),o(`span`,{"bg-primary-950":``},`950`,-1)])),[[b]])])),[[b]]),g((f(),c(`div`,O,y[10]||=[o(`span`,{bg:`primary-500/5`},`500/5`,-1),o(`span`,{bg:`primary-500/10`},`500/10`,-1),o(`span`,{bg:`primary-500/20`},`500/20`,-1),o(`span`,{bg:`primary-500/30`},`500/30`,-1),o(`span`,{bg:`primary-500/40`},`500/40`,-1),o(`span`,{bg:`primary-500/50`},`500/50`,-1),o(`span`,{bg:`primary-500/60`},`500/60`,-1),o(`span`,{bg:`primary-500/70`},`500/70`,-1),o(`span`,{bg:`primary-500/80`},`500/80`,-1),o(`span`,{bg:`primary-500/90`},`500/90`,-1),o(`span`,{bg:`primary-500`},`500`,-1)])),[[b]])]),_:1},8,[`title`])),[[b]]),g((f(),s(_(r),{"mb-2":``,title:_(x)(`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:500,transition:`all ease-in-out duration-250`},{default:h(()=>[(f(!0),c(a,null,p(n.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:t,description:r,colors:i},a)=>g((f(),c(`div`,{key:a,class:`w-full flex flex-col items-start justify-between gap-2 rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out md:flex-row md:items-center md:gap-0`,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+a*10,delay:550+a*50,transition:`all ease-in-out duration-250`},[o(`div`,null,[o(`span`,A,v(n.$rt(t)),1),o(`div`,j,v(n.$rt(r)),1)]),u(_(e),{colors:i.map((e,t)=>({hex:_(S)[a][t],name:n.$rt(e)}))},null,8,[`colors`])],8,k)),[[b]])),128))]),_:1},8,[`title`])),[[b]]),g((f(),c(`div`,M,y[11]||=[o(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[b]])],64)}}});typeof x==`function`&&x(N);var P=n(N,[[`__scopeId`,`data-v-659ad349`]]);export{P as default}; \ No newline at end of file +import{b as e,cJ as t,cN as n,cp as r,dL as i,dQ as a,dT as o,dU as s,dW as c,dX as l,dY as u,dZ as d,e5 as f,e6 as p,e9 as m,ed as h,ee as g,ek as _,eo as v,o as y,z as b}from"./index-D1IGsMK6.js";import{b as x}from"./route-block-gWR0cCIm.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:250,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 text-[10px] md:text-base sm:text-xs`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:320,delay:350,transition:`all ease-in-out duration-250`},D={"text-white":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:330,delay:400,transition:`all ease-in-out duration-250`},O={class:`color-bar transparency-grid text-[10px] md:text-base sm:text-xs`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:340,delay:450,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=d({__name:`color-scheme`,setup(n){let d=y(),{t:x}=b();return(n,y)=>{let b=m(`motion`);return f(),c(a,null,[g((f(),s(_(r),{"mb-2":``,title:_(x)(`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:200,transition:`all ease-in-out duration-250`},{default:h(()=>[g((f(),c(`div`,C,[o(`span`,w,v(n.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),o(`label`,T,[g(o(`input`,{"onUpdate:modelValue":y[0]||=e=>_(d).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[i,_(d).themeColorsHueDynamic]]),y[2]||=o(`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),l(` `+v(n.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[b]]),g(u(_(t),{modelValue:_(d).themeColorsHue,"onUpdate:modelValue":y[1]||=e=>_(d).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:300,disabled:_(d).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[b]]),g((f(),c(`div`,E,[y[4]||=o(`span`,{"bg-primary-50":``},`50`,-1),y[5]||=o(`span`,{"bg-primary-100":``},`100`,-1),y[6]||=o(`span`,{"bg-primary-200":``},`200`,-1),y[7]||=o(`span`,{"bg-primary-300":``},`300`,-1),y[8]||=o(`span`,{"bg-primary-400":``},`400`,-1),y[9]||=o(`span`,{"bg-primary-500":``},`500`,-1),g((f(),c(`div`,D,y[3]||=[o(`span`,{"bg-primary-600":``},`600`,-1),o(`span`,{"bg-primary-700":``},`700`,-1),o(`span`,{"bg-primary-800":``},`800`,-1),o(`span`,{"bg-primary-900":``},`900`,-1),o(`span`,{"bg-primary-950":``},`950`,-1)])),[[b]])])),[[b]]),g((f(),c(`div`,O,y[10]||=[o(`span`,{bg:`primary-500/5`},`500/5`,-1),o(`span`,{bg:`primary-500/10`},`500/10`,-1),o(`span`,{bg:`primary-500/20`},`500/20`,-1),o(`span`,{bg:`primary-500/30`},`500/30`,-1),o(`span`,{bg:`primary-500/40`},`500/40`,-1),o(`span`,{bg:`primary-500/50`},`500/50`,-1),o(`span`,{bg:`primary-500/60`},`500/60`,-1),o(`span`,{bg:`primary-500/70`},`500/70`,-1),o(`span`,{bg:`primary-500/80`},`500/80`,-1),o(`span`,{bg:`primary-500/90`},`500/90`,-1),o(`span`,{bg:`primary-500`},`500`,-1)])),[[b]])]),_:1},8,[`title`])),[[b]]),g((f(),s(_(r),{"mb-2":``,title:_(x)(`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:500,transition:`all ease-in-out duration-250`},{default:h(()=>[(f(!0),c(a,null,p(n.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:t,description:r,colors:i},a)=>g((f(),c(`div`,{key:a,class:`w-full flex flex-col items-start justify-between gap-2 rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out md:flex-row md:items-center md:gap-0`,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+a*10,delay:550+a*50,transition:`all ease-in-out duration-250`},[o(`div`,null,[o(`span`,A,v(n.$rt(t)),1),o(`div`,j,v(n.$rt(r)),1)]),u(_(e),{colors:i.map((e,t)=>({hex:_(S)[a][t],name:n.$rt(e)}))},null,8,[`colors`])],8,k)),[[b]])),128))]),_:1},8,[`title`])),[[b]]),g((f(),c(`div`,M,y[11]||=[o(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[b]])],64)}}});typeof x==`function`&&x(N);var P=n(N,[[`__scopeId`,`data-v-659ad349`]]);export{P as default}; \ No newline at end of file diff --git a/assets/consciousness-CCWI3pUe.js b/assets/consciousness-D-yG2Hnx.js similarity index 99% rename from assets/consciousness-CCWI3pUe.js rename to assets/consciousness-D-yG2Hnx.js index 71613a07e394531b0756390e953b2286f45813f7..477e2752d73a816cda2ab7f4f2bcee12e6641910 100644 --- a/assets/consciousness-CCWI3pUe.js +++ b/assets/consciousness-D-yG2Hnx.js @@ -1 +1 @@ -import{ch as e,ck as t,cl as ee,cm as te,d2 as n,d7 as r,dN as ne,dQ as i,dT as a,dU as o,dV as s,dW as c,dX as l,dY as u,dZ as d,e3 as f,e5 as p,e6 as re,e9 as m,ed as h,ee as g,ef as _,ek as v,eo as y,w as ie,x as ae,z as oe}from"./index-BqrqTEsQ.js";import{b}from"./route-block-gWR0cCIm.js";const se={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},x={flex:`~ col gap-4`},S={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},C={text:`neutral-400 dark:neutral-400`},w={"max-w-full":``},T={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},E={key:1},D={key:0},O={flex:`~ col gap-4`},k={class:`text-lg md:text-2xl`},A={text:`neutral-400 dark:neutral-400`},j={key:0,class:`flex items-center justify-center py-4`},M={key:1},N={flex:`~ col gap-4`},P={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},F={text:`neutral-400 dark:neutral-500`},I={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`},ce={class:`flex flex-col`},L={class:`font-medium`},R={class:`text-sm text-primary-600 dark:text-primary-400`},z={class:`mt-2`},B={class:`mb-1 block text-sm font-medium`},V=[`placeholder`],H={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 U=d({__name:`consciousness`,setup(d){let b=ae(),U=ie(),{configuredChatProvidersMetadata:W}=r(b),{activeProvider:G,activeModel:K,customModelName:le,modelSearchQuery:q,supportsModelListing:J,providerModels:Y,isLoadingActiveProviderModels:X,activeProviderModelError:Z}=r(U),{t:Q}=oe();f(async()=>{await U.loadModelsForProvider(G.value)});function $(e){le.value=e}return(r,d)=>{let f=m(`motion`);return p(),c(i,null,[a(`div`,se,[a(`div`,null,[a(`div`,x,[a(`div`,null,[a(`h2`,S,y(v(Q)(`settings.pages.providers.title`)),1),a(`div`,C,[a(`span`,null,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),a(`div`,w,[v(W).length>0?(p(),c(`fieldset`,T,[(p(!0),c(i,null,re(v(W),e=>(p(),o(v(t),{id:e.id,key:e.id,modelValue:v(G),"onUpdate:modelValue":d[0]||=e=>_(G)?G.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(p(),c(`div`,E,[u(v(n),{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(()=>d[4]||=[a(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),a(`div`,{class:`flex flex-col`},[a(`span`,{class:`font-medium`},`No Providers Configured`),a(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),a(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),v(G)&&v(J)?(p(),c(`div`,D,[a(`div`,O,[a(`div`,null,[a(`h2`,k,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),a(`div`,A,[a(`span`,null,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),v(X)?(p(),c(`div`,j,[d[5]||=a(`div`,{class:`mr-2 animate-spin`},[a(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),a(`span`,null,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):v(Z)?(p(),o(v(e),{key:1,title:v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:v(Z)},null,8,[`title`,`error`])):v(Y).length===0&&!v(X)?(p(),o(v(te),{key:2,type:`warning`},{title:h(()=>[l(y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:h(()=>[l(y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):v(Y).length>0?(p(),o(v(ee),{key:3,modelValue:v(K),"onUpdate:modelValue":d[1]||=e=>_(K)?K.value=e:null,"search-query":v(q),"onUpdate:searchQuery":d[2]||=e=>_(q)?q.value=e:null,items:v(Y).sort((e,t)=>e.id===v(K)?-1:t.id===v(K)?1:0),searchable:!0,"search-placeholder":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:v(q)}),"search-results-text":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":$},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`])):s(``,!0)])])):v(G)&&!v(J)?(p(),c(`div`,M,[a(`div`,N,[a(`div`,null,[a(`h2`,P,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),a(`div`,F,[a(`span`,null,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),a(`div`,I,[d[6]||=a(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),a(`div`,ce,[a(`span`,L,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),a(`span`,R,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),a(`div`,z,[a(`label`,B,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),g(a(`input`,{"onUpdate:modelValue":d[3]||=e=>_(K)?K.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:v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,V),[[ne,v(K)]])])])])):s(``,!0)]),g((p(),c(`div`,H,d[7]||=[a(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof b==`function`&&b(U);var W=U;export{W as default}; \ No newline at end of file +import{ch as e,ck as t,cl as ee,cm as te,d2 as n,d7 as r,dN as ne,dQ as i,dT as a,dU as o,dV as s,dW as c,dX as l,dY as u,dZ as d,e3 as f,e5 as p,e6 as re,e9 as m,ed as h,ee as g,ef as _,ek as v,eo as y,w as ie,x as ae,z as oe}from"./index-D1IGsMK6.js";import{b}from"./route-block-gWR0cCIm.js";const se={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},x={flex:`~ col gap-4`},S={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},C={text:`neutral-400 dark:neutral-400`},w={"max-w-full":``},T={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},E={key:1},D={key:0},O={flex:`~ col gap-4`},k={class:`text-lg md:text-2xl`},A={text:`neutral-400 dark:neutral-400`},j={key:0,class:`flex items-center justify-center py-4`},M={key:1},N={flex:`~ col gap-4`},P={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},F={text:`neutral-400 dark:neutral-500`},I={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`},ce={class:`flex flex-col`},L={class:`font-medium`},R={class:`text-sm text-primary-600 dark:text-primary-400`},z={class:`mt-2`},B={class:`mb-1 block text-sm font-medium`},V=[`placeholder`],H={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 U=d({__name:`consciousness`,setup(d){let b=ae(),U=ie(),{configuredChatProvidersMetadata:W}=r(b),{activeProvider:G,activeModel:K,customModelName:le,modelSearchQuery:q,supportsModelListing:J,providerModels:Y,isLoadingActiveProviderModels:X,activeProviderModelError:Z}=r(U),{t:Q}=oe();f(async()=>{await U.loadModelsForProvider(G.value)});function $(e){le.value=e}return(r,d)=>{let f=m(`motion`);return p(),c(i,null,[a(`div`,se,[a(`div`,null,[a(`div`,x,[a(`div`,null,[a(`h2`,S,y(v(Q)(`settings.pages.providers.title`)),1),a(`div`,C,[a(`span`,null,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),a(`div`,w,[v(W).length>0?(p(),c(`fieldset`,T,[(p(!0),c(i,null,re(v(W),e=>(p(),o(v(t),{id:e.id,key:e.id,modelValue:v(G),"onUpdate:modelValue":d[0]||=e=>_(G)?G.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(p(),c(`div`,E,[u(v(n),{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(()=>d[4]||=[a(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),a(`div`,{class:`flex flex-col`},[a(`span`,{class:`font-medium`},`No Providers Configured`),a(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),a(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),v(G)&&v(J)?(p(),c(`div`,D,[a(`div`,O,[a(`div`,null,[a(`h2`,k,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),a(`div`,A,[a(`span`,null,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),v(X)?(p(),c(`div`,j,[d[5]||=a(`div`,{class:`mr-2 animate-spin`},[a(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),a(`span`,null,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):v(Z)?(p(),o(v(e),{key:1,title:v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:v(Z)},null,8,[`title`,`error`])):v(Y).length===0&&!v(X)?(p(),o(v(te),{key:2,type:`warning`},{title:h(()=>[l(y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:h(()=>[l(y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):v(Y).length>0?(p(),o(v(ee),{key:3,modelValue:v(K),"onUpdate:modelValue":d[1]||=e=>_(K)?K.value=e:null,"search-query":v(q),"onUpdate:searchQuery":d[2]||=e=>_(q)?q.value=e:null,items:v(Y).sort((e,t)=>e.id===v(K)?-1:t.id===v(K)?1:0),searchable:!0,"search-placeholder":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:v(q)}),"search-results-text":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":$},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`])):s(``,!0)])])):v(G)&&!v(J)?(p(),c(`div`,M,[a(`div`,N,[a(`div`,null,[a(`h2`,P,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),a(`div`,F,[a(`span`,null,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),a(`div`,I,[d[6]||=a(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),a(`div`,ce,[a(`span`,L,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),a(`span`,R,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),a(`div`,z,[a(`label`,B,y(v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),g(a(`input`,{"onUpdate:modelValue":d[3]||=e=>_(K)?K.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:v(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,V),[[ne,v(K)]])])])])):s(``,!0)]),g((p(),c(`div`,H,d[7]||=[a(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof b==`function`&&b(U);var W=U;export{W as default}; \ No newline at end of file diff --git a/assets/core-BFxHI69x.js b/assets/core-BnIgvjB7.js similarity index 98% rename from assets/core-BFxHI69x.js rename to assets/core-BnIgvjB7.js index 1ee7e6367d0041c1d04e3afdec35fc3bdd2d4bb1..d6f4e2b5da1461c54eac8630001657ba0a2588ed 100644 --- a/assets/core-BFxHI69x.js +++ b/assets/core-BnIgvjB7.js @@ -1 +1 @@ -import{$ as ee,A as te,B as e,C as t,D as n,E as r,F as i,G as a,H as o,I as s,J as c,K as l,L as u,M as d,N as f,O as p,P as m,Q as h,R as g,S as _,T as v,U as y,V as b,W as x,X as S,Y as C,Z as w,_ as T,a$ as E,a1 as D,a2 as O,a3 as k,a4 as A,a5 as j,a6 as M,a7 as N,a8 as P,a9 as F,aA as I,aB as L,aC as R,aD as z,aE as B,aF as V,aG as H,aH as U,aI as W,aJ as G,aK as K,aL as q,aM as J,aN as Y,aO as X,aP as Z,aQ as Q,aR as ne,aS as re,aT as ie,aU as ae,aV as oe,aW as se,aX as ce,aY as le,aZ as ue,a_ as de,aa as fe,ab as pe,ac as me,ad as he,ae as ge,af as _e,ag as ve,ah as ye,ai as be,aj as xe,ak as Se,al as $,am as Ce,an as we,ao as Te,ap as Ee,aq as De,ar as Oe,as as ke,at as Ae,au as je,av as Me,aw as Ne,ax as Pe,ay as Fe,az as Ie,b0 as Le,b1 as Re,b2 as ze,b3 as Be,b4 as Ve,b5 as He,b6 as Ue,b7 as We,b8 as Ge,b9 as Ke,bA as qe,bB as Je,bC as Ye,bD as Xe,bE as Ze,bF as Qe,bG as $e,bH as et,bI as tt,bJ as nt,bK as rt,bL as it,bM as at,bN as ot,bO as st,ba as ct,bb as lt,bc as ut,bd as dt,be as ft,bf as pt,bg as mt,bh as ht,bi as gt,bj as _t,bk as vt,bl as yt,bm as bt,bn as xt,bo as St,bp as Ct,bq as wt,br as Tt,bs as Et,bt as Dt,bu as Ot,bv as kt,bw as At,bx as jt,by as Mt,bz as Nt}from"./index-BqrqTEsQ.js";export{Pe as $ZodArray,it as $ZodAsyncError,Fe as $ZodBase64,Ie as $ZodBase64URL,I as $ZodBoolean,L as $ZodCIDRv4,R as $ZodCIDRv6,z as $ZodCUID,B as $ZodCUID2,V as $ZodCatch,vt as $ZodCheck,yt as $ZodCheckEndsWith,bt as $ZodCheckGreaterThan,xt as $ZodCheckIncludes,St as $ZodCheckLengthEquals,Ct as $ZodCheckLessThan,wt as $ZodCheckLowerCase,Tt as $ZodCheckMaxLength,Et as $ZodCheckMinLength,Dt as $ZodCheckMultipleOf,Ot as $ZodCheckNumberFormat,kt as $ZodCheckOverwrite,At as $ZodCheckRegex,jt as $ZodCheckStartsWith,Mt as $ZodCheckStringFormat,Nt as $ZodCheckUpperCase,H as $ZodCustom,U as $ZodDefault,W as $ZodE164,G as $ZodEmail,K as $ZodEmoji,q as $ZodEnum,$e as $ZodError,J as $ZodGUID,Y as $ZodIPv4,X as $ZodIPv6,Z as $ZodISODate,Q as $ZodISODateTime,ne as $ZodISODuration,re as $ZodISOTime,ie as $ZodIntersection,ae as $ZodJWT,oe as $ZodKSUID,se as $ZodNanoID,ce as $ZodNever,le as $ZodNonOptional,ue as $ZodNullable,de as $ZodNumber,E as $ZodNumberFormat,Le as $ZodObject,Re as $ZodOptional,ze as $ZodPipe,Be as $ZodPrefault,Ve as $ZodReadonly,et as $ZodRealError,je as $ZodRegistry,He as $ZodString,Ue as $ZodStringFormat,We as $ZodTransform,Ge as $ZodType,Ke as $ZodULID,ct as $ZodURL,lt as $ZodUUID,ut as $ZodUnion,dt as $ZodUnknown,ft as $ZodXID,at as $constructor,_t as Doc,te as JSONSchemaGenerator,t as _array,n as _base64,r as _base64url,i as _boolean,a as _check,o as _cidrv4,s as _cidrv6,c as _cuid,l as _cuid2,u as _e164,d as _email,f as _emoji,p as _endsWith,m as _gt,h as _gte,h as _min,g as _guid,_ as _includes,v as _int,y as _ipv4,b as _ipv6,x as _isoDate,S as _isoDateTime,C as _isoDuration,w as _isoTime,T as _jwt,ee as _ksuid,D as _length,O as _lowercase,k as _lt,A as _lte,A as _max,j as _maxLength,M as _minLength,N as _multipleOf,P as _nanoid,F as _never,fe as _normalize,pe as _number,me as _overwrite,qe as _parse,Je as _parseAsync,he as _refine,ge as _regex,Ye as _safeParse,Xe as _safeParseAsync,_e as _startsWith,ve as _string,ye as _superRefine,be as _toLowerCase,xe as _toUpperCase,Se as _trim,$ as _ulid,Ce as _unknown,we as _uppercase,Te as _url,Ee as _uuid,De as _uuidv4,Oe as _uuidv6,ke as _uuidv7,Ae as _xid,rt as clone,ot as config,tt as flattenError,nt as formatError,st as globalConfig,Me as globalRegistry,pt as isValidBase64,mt as isValidBase64URL,ht as isValidJWT,Ne as registry,Ze as safeParse,Qe as safeParseAsync,e as toJSONSchema,gt as version}; \ No newline at end of file +import{$ as ee,A as te,B as e,C as t,D as n,E as r,F as i,G as a,H as o,I as s,J as c,K as l,L as u,M as d,N as f,O as p,P as m,Q as h,R as g,S as _,T as v,U as y,V as b,W as x,X as S,Y as C,Z as w,_ as T,a$ as E,a1 as D,a2 as O,a3 as k,a4 as A,a5 as j,a6 as M,a7 as N,a8 as P,a9 as F,aA as I,aB as L,aC as R,aD as z,aE as B,aF as V,aG as H,aH as U,aI as W,aJ as G,aK as K,aL as q,aM as J,aN as Y,aO as X,aP as Z,aQ as Q,aR as ne,aS as re,aT as ie,aU as ae,aV as oe,aW as se,aX as ce,aY as le,aZ as ue,a_ as de,aa as fe,ab as pe,ac as me,ad as he,ae as ge,af as _e,ag as ve,ah as ye,ai as be,aj as xe,ak as Se,al as $,am as Ce,an as we,ao as Te,ap as Ee,aq as De,ar as Oe,as as ke,at as Ae,au as je,av as Me,aw as Ne,ax as Pe,ay as Fe,az as Ie,b0 as Le,b1 as Re,b2 as ze,b3 as Be,b4 as Ve,b5 as He,b6 as Ue,b7 as We,b8 as Ge,b9 as Ke,bA as qe,bB as Je,bC as Ye,bD as Xe,bE as Ze,bF as Qe,bG as $e,bH as et,bI as tt,bJ as nt,bK as rt,bL as it,bM as at,bN as ot,bO as st,ba as ct,bb as lt,bc as ut,bd as dt,be as ft,bf as pt,bg as mt,bh as ht,bi as gt,bj as _t,bk as vt,bl as yt,bm as bt,bn as xt,bo as St,bp as Ct,bq as wt,br as Tt,bs as Et,bt as Dt,bu as Ot,bv as kt,bw as At,bx as jt,by as Mt,bz as Nt}from"./index-D1IGsMK6.js";export{Pe as $ZodArray,it as $ZodAsyncError,Fe as $ZodBase64,Ie as $ZodBase64URL,I as $ZodBoolean,L as $ZodCIDRv4,R as $ZodCIDRv6,z as $ZodCUID,B as $ZodCUID2,V as $ZodCatch,vt as $ZodCheck,yt as $ZodCheckEndsWith,bt as $ZodCheckGreaterThan,xt as $ZodCheckIncludes,St as $ZodCheckLengthEquals,Ct as $ZodCheckLessThan,wt as $ZodCheckLowerCase,Tt as $ZodCheckMaxLength,Et as $ZodCheckMinLength,Dt as $ZodCheckMultipleOf,Ot as $ZodCheckNumberFormat,kt as $ZodCheckOverwrite,At as $ZodCheckRegex,jt as $ZodCheckStartsWith,Mt as $ZodCheckStringFormat,Nt as $ZodCheckUpperCase,H as $ZodCustom,U as $ZodDefault,W as $ZodE164,G as $ZodEmail,K as $ZodEmoji,q as $ZodEnum,$e as $ZodError,J as $ZodGUID,Y as $ZodIPv4,X as $ZodIPv6,Z as $ZodISODate,Q as $ZodISODateTime,ne as $ZodISODuration,re as $ZodISOTime,ie as $ZodIntersection,ae as $ZodJWT,oe as $ZodKSUID,se as $ZodNanoID,ce as $ZodNever,le as $ZodNonOptional,ue as $ZodNullable,de as $ZodNumber,E as $ZodNumberFormat,Le as $ZodObject,Re as $ZodOptional,ze as $ZodPipe,Be as $ZodPrefault,Ve as $ZodReadonly,et as $ZodRealError,je as $ZodRegistry,He as $ZodString,Ue as $ZodStringFormat,We as $ZodTransform,Ge as $ZodType,Ke as $ZodULID,ct as $ZodURL,lt as $ZodUUID,ut as $ZodUnion,dt as $ZodUnknown,ft as $ZodXID,at as $constructor,_t as Doc,te as JSONSchemaGenerator,t as _array,n as _base64,r as _base64url,i as _boolean,a as _check,o as _cidrv4,s as _cidrv6,c as _cuid,l as _cuid2,u as _e164,d as _email,f as _emoji,p as _endsWith,m as _gt,h as _gte,h as _min,g as _guid,_ as _includes,v as _int,y as _ipv4,b as _ipv6,x as _isoDate,S as _isoDateTime,C as _isoDuration,w as _isoTime,T as _jwt,ee as _ksuid,D as _length,O as _lowercase,k as _lt,A as _lte,A as _max,j as _maxLength,M as _minLength,N as _multipleOf,P as _nanoid,F as _never,fe as _normalize,pe as _number,me as _overwrite,qe as _parse,Je as _parseAsync,he as _refine,ge as _regex,Ye as _safeParse,Xe as _safeParseAsync,_e as _startsWith,ve as _string,ye as _superRefine,be as _toLowerCase,xe as _toUpperCase,Se as _trim,$ as _ulid,Ce as _unknown,we as _uppercase,Te as _url,Ee as _uuid,De as _uuidv4,Oe as _uuidv6,ke as _uuidv7,Ae as _xid,rt as clone,ot as config,tt as flattenError,nt as formatError,st as globalConfig,Me as globalRegistry,pt as isValidBase64,mt as isValidBase64URL,ht as isValidJWT,Ne as registry,Ze as safeParse,Qe as safeParseAsync,e as toJSONSchema,gt as version}; \ No newline at end of file diff --git a/assets/deepseek-cNrwxt-l.js b/assets/deepseek-Cqa3r5er.js similarity index 96% rename from assets/deepseek-cNrwxt-l.js rename to assets/deepseek-Cqa3r5er.js index f54762cb57b83791df8d83a5621d5f49bc2f10bd..2bd8eb081d8d844c303eadff7b5f345289f9292d 100644 --- a/assets/deepseek-cNrwxt-l.js +++ b/assets/deepseek-Cqa3r5er.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`deepseek`;var x=a({__name:`deepseek`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`deepseek`;var x=a({__name:`deepseek`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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-CZpOWzAg.js b/assets/default-BxAUVEXe.js similarity index 79% rename from assets/default-CZpOWzAg.js rename to assets/default-BxAUVEXe.js index bc6849187cc3f97567fffb27bba46e40602c3c25..15fc6850316687353a7ffa0acd8bd220d849cfa2 100644 --- a/assets/default-CZpOWzAg.js +++ b/assets/default-BxAUVEXe.js @@ -1 +1 @@ -import{d3 as e,dT as t,dW as n,dY as r,dZ as i,e5 as a,ek as o}from"./index-BqrqTEsQ.js";import{b as s}from"./HeaderLink-D6jJjgut.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`,h:`[calc(100%-56px)]`};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{d3 as e,dT as t,dW as n,dY as r,dZ as i,e5 as a,ek as o}from"./index-D1IGsMK6.js";import{b as s}from"./HeaderLink-CSWG6G--.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`,h:`[calc(100%-56px)]`};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-DyYIhEXm.js b/assets/default-node-BtQ98lhg.js similarity index 70% rename from assets/default-node-DyYIhEXm.js rename to assets/default-node-BtQ98lhg.js index 0bef57d6c78ef0cc4f10bd4c9c24fc14a7eccf7a..fd687d25a1a71775b86f65bd8a1bd0117f2ec92c 100644 --- a/assets/default-node-DyYIhEXm.js +++ b/assets/default-node-BtQ98lhg.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-BFBX2XSs.js","assets/index-BqrqTEsQ.js","assets/index-DStbve3n.css"])))=>i.map(i=>d[i]); -import{d6 as e,es as t}from"./index-BqrqTEsQ.js";async function n(){let{createRequire:n}=await e(async()=>{let{createRequire:e}=await import(`./__vite-browser-external-BFBX2XSs.js`).then(t(1));return{createRequire:e}},__vite__mapDeps([0,1,2])),{dirname:r,resolve:i}=await e(async()=>{let{dirname:e,resolve:n}=await import(`./__vite-browser-external-BFBX2XSs.js`).then(t(1));return{dirname:e,resolve:n}},__vite__mapDeps([0,1,2])),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-DgcibqnP.js","assets/index-D1IGsMK6.js","assets/index-DStbve3n.css"])))=>i.map(i=>d[i]); +import{d6 as e,es as t}from"./index-D1IGsMK6.js";async function n(){let{createRequire:n}=await e(async()=>{let{createRequire:e}=await import(`./__vite-browser-external-DgcibqnP.js`).then(t(1));return{createRequire:e}},__vite__mapDeps([0,1,2])),{dirname:r,resolve:i}=await e(async()=>{let{dirname:e,resolve:n}=await import(`./__vite-browser-external-DgcibqnP.js`).then(t(1));return{dirname:e,resolve:n}},__vite__mapDeps([0,1,2])),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-_8LoyGoG.js b/assets/delays-DIhxEe_R.js similarity index 82% rename from assets/delays-_8LoyGoG.js rename to assets/delays-DIhxEe_R.js index 256807e2eec199d6483600bb084b48a9d84271e8..b5cc88157e80efeaf79f88085a409d1db950ca47 100644 --- a/assets/delays-_8LoyGoG.js +++ b/assets/delays-DIhxEe_R.js @@ -1 +1 @@ -import"./Basic-6NscZoIc.js";import{b as e}from"./Textarea-CQXjp80_.js";import{c1 as t,ct as n,dQ as r,dT as i,dW as a,dY as o,dZ as s,e5 as c,e6 as l,eg as u,ek as d,eo as f}from"./index-BqrqTEsQ.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=s({__name:`delays`,setup(s){let y=u(``),b=u([]),x=u([]),S=u(!1),C=t();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(n),y.value=``,S.value=!1}return(t,n)=>(c(),a(`div`,p,[i(`div`,m,[o(d(e),{modelValue:y.value,"onUpdate:modelValue":n[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`]),i(`button`,h,f(S.value?`Processing...`:`Send`),1)]),i(`div`,g,[i(`div`,_,[n[1]||=i(`h3`,{"font-normal":``},` Emotion Message `,-1),(c(!0),a(r,null,l(b.value,e=>(c(),a(`div`,{key:e},[i(`div`,null,f(e),1)]))),128))]),i(`div`,v,[n[2]||=i(`h3`,{"font-normal":``},` Delays `,-1),(c(!0),a(r,null,l(x.value,e=>(c(),a(`div`,{key:e},[i(`div`,null,f(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file +import"./Basic-JYGX2D37.js";import{b as e}from"./Textarea-D9rLaih7.js";import{c1 as t,ct as n,dQ as r,dT as i,dW as a,dY as o,dZ as s,e5 as c,e6 as l,eg as u,ek as d,eo as f}from"./index-D1IGsMK6.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=s({__name:`delays`,setup(s){let y=u(``),b=u([]),x=u([]),S=u(!1),C=t();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(n),y.value=``,S.value=!1}return(t,n)=>(c(),a(`div`,p,[i(`div`,m,[o(d(e),{modelValue:y.value,"onUpdate:modelValue":n[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`]),i(`button`,h,f(S.value?`Processing...`:`Send`),1)]),i(`div`,g,[i(`div`,_,[n[1]||=i(`h3`,{"font-normal":``},` Emotion Message `,-1),(c(!0),a(r,null,l(b.value,e=>(c(),a(`div`,{key:e},[i(`div`,null,f(e),1)]))),128))]),i(`div`,v,[n[2]||=i(`h3`,{"font-normal":``},` Delays `,-1),(c(!0),a(r,null,l(x.value,e=>(c(),a(`div`,{key:e},[i(`div`,null,f(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/developer-Bwq9EOSe.js b/assets/developer-50jFEq_D.js similarity index 97% rename from assets/developer-Bwq9EOSe.js rename to assets/developer-50jFEq_D.js index 7e520e6099c77a96c2918ca25a644c0481228f9a..7aa122b373b8bae2406c090179163d100990c8ee 100644 --- a/assets/developer-Bwq9EOSe.js +++ b/assets/developer-50jFEq_D.js @@ -1 +1 @@ -import{dK as e,dL as t,dQ as n,dT as r,dV as i,dW as a,dX as o,dY as s,dZ as c,e0 as l,e5 as u,e9 as d,ea as f,ed as p,ee as m,ek as h,el as g,eo as _,o as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={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`},x=[`aria-checked`],S={key:0,text:`sm neutral-500`};var C=c({__name:`CheckBar`,props:l({text:{},iconOn:{},iconOff:{},description:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let c=f(n,`modelValue`);return(n,l)=>(u(),a(`label`,b,[m(r(`input`,{"onUpdate:modelValue":l[0]||=e=>c.value=e,"aria-checked":c.value,type:`checkbox`,hidden:``},null,8,x),[[t,c.value]]),r(`div`,null,[o(_(n.$t(n.text))+` `,1),n.description?(u(),a(`div`,S,_(n.$t(n.description)),1)):i(``,!0)]),s(e,{name:`slide-away`,mode:`out-in`},{default:p(()=>[c.value?(u(),a(`div`,{key:0,class:g(n.iconOn),transition:`all ease-in-out duration-250`},null,2)):(u(),a(`div`,{key:1,class:g(n.iconOff),transition:`all ease-in-out duration-250`},null,2))]),_:1})]))}}),w=C;const T={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 E=c({__name:`developer`,setup(e){let t=v();return(e,i)=>{let o=d(`motion`);return u(),a(n,null,[m(s(w,{modelValue:h(t).disableTransitions,"onUpdate:modelValue":i[0]||=e=>h(t).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:950,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[o]]),m(s(w,{modelValue:h(t).usePageSpecificTransitions,"onUpdate:modelValue":i[1]||=e=>h(t).usePageSpecificTransitions=e,disabled:h(t).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:1e3,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[o]]),m((u(),a(`div`,T,i[2]||=[r(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[o]])],64)}}});typeof y==`function`&&y(E);var D=E;export{D as default}; \ No newline at end of file +import{dK as e,dL as t,dQ as n,dT as r,dV as i,dW as a,dX as o,dY as s,dZ as c,e0 as l,e5 as u,e9 as d,ea as f,ed as p,ee as m,ek as h,el as g,eo as _,o as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={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`},x=[`aria-checked`],S={key:0,text:`sm neutral-500`};var C=c({__name:`CheckBar`,props:l({text:{},iconOn:{},iconOff:{},description:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let c=f(n,`modelValue`);return(n,l)=>(u(),a(`label`,b,[m(r(`input`,{"onUpdate:modelValue":l[0]||=e=>c.value=e,"aria-checked":c.value,type:`checkbox`,hidden:``},null,8,x),[[t,c.value]]),r(`div`,null,[o(_(n.$t(n.text))+` `,1),n.description?(u(),a(`div`,S,_(n.$t(n.description)),1)):i(``,!0)]),s(e,{name:`slide-away`,mode:`out-in`},{default:p(()=>[c.value?(u(),a(`div`,{key:0,class:g(n.iconOn),transition:`all ease-in-out duration-250`},null,2)):(u(),a(`div`,{key:1,class:g(n.iconOff),transition:`all ease-in-out duration-250`},null,2))]),_:1})]))}}),w=C;const T={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 E=c({__name:`developer`,setup(e){let t=v();return(e,i)=>{let o=d(`motion`);return u(),a(n,null,[m(s(w,{modelValue:h(t).disableTransitions,"onUpdate:modelValue":i[0]||=e=>h(t).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:950,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[o]]),m(s(w,{modelValue:h(t).usePageSpecificTransitions,"onUpdate:modelValue":i[1]||=e=>h(t).usePageSpecificTransitions=e,disabled:h(t).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:1e3,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[o]]),m((u(),a(`div`,T,i[2]||=[r(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[o]])],64)}}});typeof y==`function`&&y(E);var D=E;export{D as default}; \ No newline at end of file diff --git a/assets/effect--zg3C1LQ-DHHO_5U1.js b/assets/effect--zg3C1LQ-BJsXVcIa.js similarity index 72% rename from assets/effect--zg3C1LQ-DHHO_5U1.js rename to assets/effect--zg3C1LQ-BJsXVcIa.js index 19dab0f849d184b9a2167d6276b0ea2f5a1799c8..685d82a9cf84c0ed7a9a399de156c9c0307d8914 100644 --- a/assets/effect--zg3C1LQ-DHHO_5U1.js +++ b/assets/effect--zg3C1LQ-BJsXVcIa.js @@ -1 +1 @@ -import{bQ as e,d6 as t}from"./index-BqrqTEsQ.js";const n=async()=>{let{JSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_effect_xsschema-BcDABPW0.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{bQ as e,d6 as t}from"./index-D1IGsMK6.js";const n=async()=>{let{JSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_effect_xsschema-BcDABPW0.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/elevenlabs-9MwHykd2.js b/assets/elevenlabs-qXHu46wy.js similarity index 98% rename from assets/elevenlabs-9MwHykd2.js rename to assets/elevenlabs-qXHu46wy.js index fc371af946b8a786a0b917869f11a9ad57c387c7..63a0172c9aa4dd0903f4dba0a51f9721c030a249 100644 --- a/assets/elevenlabs-9MwHykd2.js +++ b/assets/elevenlabs-qXHu46wy.js @@ -1 +1 @@ -import{cM as e,cR as t,d7 as n,dS as r,dT as i,dU as a,dY as o,dZ as s,e as c,e3 as l,e5 as u,ec as d,ed as f,eg as p,ek as m,f as h,u as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=s({__name:`elevenlabs`,setup(s){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=p(0),w=p(1),T=p(0),E=p(0),D=p(.5),O=p(.75),k=p(!1),A=g(),j=_(),{providers:M}=n(j),{t:N}=v(),P=r(()=>!!M.value[x]?.apiKey),F=r(()=>A.availableVoices[x]||[]);async function I(e,t,n){let r=await 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 l(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}),(n,r)=>(u(),a(m(c),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":f(()=>[i(`div`,b,[o(m(e),{modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,label:m(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:m(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`]),o(m(e),{modelValue:w.value,"onUpdate:modelValue":r[1]||=e=>w.value=e,label:m(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(e),{modelValue:T.value,"onUpdate:modelValue":r[2]||=e=>T.value=e,label:m(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:m(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`]),o(m(e),{modelValue:E.value,"onUpdate:modelValue":r[3]||=e=>E.value=e,label:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(e),{modelValue:D.value,"onUpdate:modelValue":r[4]||=e=>D.value=e,label:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(e),{modelValue:O.value,"onUpdate:modelValue":r[5]||=e=>O.value=e,label:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(t),{modelValue:k.value,"onUpdate:modelValue":r[6]||=e=>k.value=e,label:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:f(()=>[o(m(h),{"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{cM as e,cR as t,d7 as n,dS as r,dT as i,dU as a,dY as o,dZ as s,e as c,e3 as l,e5 as u,ec as d,ed as f,eg as p,ek as m,f as h,u as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=s({__name:`elevenlabs`,setup(s){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=p(0),w=p(1),T=p(0),E=p(0),D=p(.5),O=p(.75),k=p(!1),A=g(),j=_(),{providers:M}=n(j),{t:N}=v(),P=r(()=>!!M.value[x]?.apiKey),F=r(()=>A.availableVoices[x]||[]);async function I(e,t,n){let r=await 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 l(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}),(n,r)=>(u(),a(m(c),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":f(()=>[i(`div`,b,[o(m(e),{modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,label:m(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:m(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`]),o(m(e),{modelValue:w.value,"onUpdate:modelValue":r[1]||=e=>w.value=e,label:m(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(e),{modelValue:T.value,"onUpdate:modelValue":r[2]||=e=>T.value=e,label:m(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:m(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`]),o(m(e),{modelValue:E.value,"onUpdate:modelValue":r[3]||=e=>E.value=e,label:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(e),{modelValue:D.value,"onUpdate:modelValue":r[4]||=e=>D.value=e,label:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(e),{modelValue:O.value,"onUpdate:modelValue":r[5]||=e=>O.value=e,label:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(t),{modelValue:k.value,"onUpdate:modelValue":r[6]||=e=>k.value=e,label:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:m(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:f(()=>[o(m(h),{"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-DH9tsdiE.js b/assets/emotions-De0hw4UU.js similarity index 86% rename from assets/emotions-DH9tsdiE.js rename to assets/emotions-De0hw4UU.js index 10954cd9e81e33aa981c38582c8b4f2134a66401..92450dc078888a74cb504310ebfdb32ca4ea30db 100644 --- a/assets/emotions-DH9tsdiE.js +++ b/assets/emotions-De0hw4UU.js @@ -1 +1 @@ -import"./Basic-6NscZoIc.js";import{b as e}from"./Textarea-CQXjp80_.js";import{c2 as t,c4 as n,ct as r,dQ as i,dT as a,dW as o,dY as s,dZ as c,e5 as l,e6 as u,eg as d,ek as f,eo as p}from"./index-BqrqTEsQ.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=c({__name:`emotions`,setup(c){let b=d(``),x=d([]),S=d([]),C=d(!1),w=n({handlers:[async e=>{S.value.push(e.data)}]}),T=t(w);function E(){C.value=!0;let e=b.value.split(``);for(let t of e)T.add(t);T.add(r),b.value=``,C.value=!1}return(t,n)=>(l(),o(`div`,m,[a(`div`,h,[s(f(e),{modelValue:b.value,"onUpdate:modelValue":n[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`]),a(`button`,g,p(C.value?`Processing...`:`Send`),1)]),a(`div`,_,[a(`div`,v,[n[1]||=a(`h3`,{"font-normal":``},` Messages `,-1),(l(!0),o(i,null,u(x.value,e=>(l(),o(`div`,{key:e},[a(`div`,null,p(e),1)]))),128))]),a(`div`,y,[n[2]||=a(`h3`,{"font-normal":``},` Emotions `,-1),(l(!0),o(i,null,u(S.value,e=>(l(),o(`div`,{key:e},[a(`div`,null,p(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file +import"./Basic-JYGX2D37.js";import{b as e}from"./Textarea-D9rLaih7.js";import{c2 as t,c4 as n,ct as r,dQ as i,dT as a,dW as o,dY as s,dZ as c,e5 as l,e6 as u,eg as d,ek as f,eo as p}from"./index-D1IGsMK6.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=c({__name:`emotions`,setup(c){let b=d(``),x=d([]),S=d([]),C=d(!1),w=n({handlers:[async e=>{S.value.push(e.data)}]}),T=t(w);function E(){C.value=!0;let e=b.value.split(``);for(let t of e)T.add(t);T.add(r),b.value=``,C.value=!1}return(t,n)=>(l(),o(`div`,m,[a(`div`,h,[s(f(e),{modelValue:b.value,"onUpdate:modelValue":n[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`]),a(`button`,g,p(C.value?`Processing...`:`Send`),1)]),a(`div`,_,[a(`div`,v,[n[1]||=a(`h3`,{"font-normal":``},` Messages `,-1),(l(!0),o(i,null,u(x.value,e=>(l(),o(`div`,{key:e},[a(`div`,null,p(e),1)]))),128))]),a(`div`,y,[n[2]||=a(`h3`,{"font-normal":``},` Emotions `,-1),(l(!0),o(i,null,u(S.value,e=>(l(),o(`div`,{key:e},[a(`div`,null,p(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file diff --git a/assets/featherless-ai-B299Ssok.js b/assets/featherless-ai-MWKHOxPl.js similarity index 96% rename from assets/featherless-ai-B299Ssok.js rename to assets/featherless-ai-MWKHOxPl.js index aa6e651212a445e8c9301e4aa94e3e7de9787c78..09f0d53ab7c2377d46ed5bcc0291a3ee9235639b 100644 --- a/assets/featherless-ai-B299Ssok.js +++ b/assets/featherless-ai-MWKHOxPl.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`featherless-ai`;var x=a({__name:`featherless-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`featherless-ai`;var x=a({__name:`featherless-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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-CSSXhkMx.js b/assets/filter-message-C0Hk6aB0.js similarity index 85% rename from assets/filter-message-CSSXhkMx.js rename to assets/filter-message-C0Hk6aB0.js index c0c076d3930865963ef183f200c7f5e508982f9d..dcf113f98a5a34cb514d31b84f7cd0f119ff4da3 100644 --- a/assets/filter-message-CSSXhkMx.js +++ b/assets/filter-message-C0Hk6aB0.js @@ -1 +1 @@ -import"./Basic-6NscZoIc.js";import{b as e}from"./Textarea-CQXjp80_.js";import{c9 as t,dT as n,dW as r,dY as i,dZ as a,e5 as o,eg as s,ek as c,eo as l}from"./index-BqrqTEsQ.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=a({__name:`filter-message`,setup(a){let m=s(``),h=s(!1),g=s({content:``});async function _(){h.value=!0;let e=m.value.split(``),n=function(e){return e.Literal=`literal`,e.Special=`special`,e}({}),r=n.Literal,i=``;for(let a of e){await t(50);let e=r;a===`<`?e=n.Special:a===`>`&&(e=n.Literal),r===n.Literal&&e===n.Special&&(g.value.content+=i,i=``),r===n.Special&&e===n.Literal&&(i=``),r===n.Literal&&e===n.Literal&&(g.value.content+=a,i=``),r=e}i&&(g.value.content+=i),m.value=``,h.value=!1}return(t,a)=>(o(),r(`div`,u,[n(`div`,d,[i(c(e),{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`]),n(`button`,f,l(h.value?`Processing...`:`Send`),1)]),n(`div`,p,[a[1]||=n(`h3`,{"font-normal":``},` Streaming Message `,-1),n(`div`,null,l(g.value.content),1)])]))}}),h=m;export{h as default}; \ No newline at end of file +import"./Basic-JYGX2D37.js";import{b as e}from"./Textarea-D9rLaih7.js";import{c9 as t,dT as n,dW as r,dY as i,dZ as a,e5 as o,eg as s,ek as c,eo as l}from"./index-D1IGsMK6.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=a({__name:`filter-message`,setup(a){let m=s(``),h=s(!1),g=s({content:``});async function _(){h.value=!0;let e=m.value.split(``),n=function(e){return e.Literal=`literal`,e.Special=`special`,e}({}),r=n.Literal,i=``;for(let a of e){await t(50);let e=r;a===`<`?e=n.Special:a===`>`&&(e=n.Literal),r===n.Literal&&e===n.Special&&(g.value.content+=i,i=``),r===n.Special&&e===n.Literal&&(i=``),r===n.Literal&&e===n.Literal&&(g.value.content+=a,i=``),r=e}i&&(g.value.content+=i),m.value=``,h.value=!1}return(t,a)=>(o(),r(`div`,u,[n(`div`,d,[i(c(e),{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`]),n(`button`,f,l(h.value?`Processing...`:`Send`),1)]),n(`div`,p,[a[1]||=n(`h3`,{"font-normal":``},` Streaming Message `,-1),n(`div`,null,l(g.value.content),1)])]))}}),h=m;export{h as default}; \ No newline at end of file diff --git a/assets/fireworks-ai-Ld2MWu8B.js b/assets/fireworks-ai-Ba-jqHwG.js similarity index 96% rename from assets/fireworks-ai-Ld2MWu8B.js rename to assets/fireworks-ai-Ba-jqHwG.js index 63dfd95c05e1bfb72c37946d43bf0d5ee07ea900..6aabde96d315c45eae4a9c15a1d4c7c690fc0f6e 100644 --- a/assets/fireworks-ai-Ld2MWu8B.js +++ b/assets/fireworks-ai-Ba-jqHwG.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`fireworks-ai`;var x=a({__name:`fireworks-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`fireworks-ai`;var x=a({__name:`fireworks-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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-DSsVebJ9.js b/assets/general-yjkLwtKb.js similarity index 95% rename from assets/general-DSsVebJ9.js rename to assets/general-yjkLwtKb.js index c9eba95fcfab256a498cdd1e15c06a070a0ea9df..e100073de7105f6bd9b6cae4df1e34b43060fb40 100644 --- a/assets/general-DSsVebJ9.js +++ b/assets/general-yjkLwtKb.js @@ -1 +1 @@ -import{cL as e,cR as t,dS as n,dT as r,dW as i,dY as a,dZ as o,db as s,e5 as c,e9 as l,ee as u,ef as d,ek as f,o as p,z as m}from"./index-BqrqTEsQ.js";import{b as h}from"./route-block-gWR0cCIm.js";const g={"rounded-lg":``,"bg-neutral-50":``,"p-4":``,"dark:bg-neutral-800":``,flex:`~ col gap-4`},_={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 v=o({__name:`general`,setup(o){let h=p(),{t:v,messages:y}=m(),b=s(),x=n(()=>Object.keys(y.value).map(e=>({label:v(`settings.language.options.${e}`),value:e})));return(n,o)=>{let s=l(`motion`);return c(),i(`div`,g,[u(a(f(t),{modelValue:f(b),"onUpdate:modelValue":o[0]||=e=>d(b)?b.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:100,label:f(v)(`settings.theme.title`),description:f(v)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[s]]),u(a(f(e),{modelValue:f(h).language,"onUpdate:modelValue":o[1]||=e=>f(h).language=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:150,transition:`all ease-in-out duration-250`,label:f(v)(`settings.language.title`),description:f(v)(`settings.language.description`),options:x.value},null,8,[`modelValue`,`label`,`description`,`options`]),[[s]]),u((c(),i(`div`,_,o[2]||=[r(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[s]])])}}});typeof h==`function`&&h(v);var y=v;export{y as default}; \ No newline at end of file +import{cL as e,cR as t,dS as n,dT as r,dW as i,dY as a,dZ as o,db as s,e5 as c,e9 as l,ee as u,ef as d,ek as f,o as p,z as m}from"./index-D1IGsMK6.js";import{b as h}from"./route-block-gWR0cCIm.js";const g={"rounded-lg":``,"bg-neutral-50":``,"p-4":``,"dark:bg-neutral-800":``,flex:`~ col gap-4`},_={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 v=o({__name:`general`,setup(o){let h=p(),{t:v,messages:y}=m(),b=s(),x=n(()=>Object.keys(y.value).map(e=>({label:v(`settings.language.options.${e}`),value:e})));return(n,o)=>{let s=l(`motion`);return c(),i(`div`,g,[u(a(f(t),{modelValue:f(b),"onUpdate:modelValue":o[0]||=e=>d(b)?b.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:100,label:f(v)(`settings.theme.title`),description:f(v)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[s]]),u(a(f(e),{modelValue:f(h).language,"onUpdate:modelValue":o[1]||=e=>f(h).language=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:150,transition:`all ease-in-out duration-250`,label:f(v)(`settings.language.title`),description:f(v)(`settings.language.description`),options:x.value},null,8,[`modelValue`,`label`,`description`,`options`]),[[s]]),u((c(),i(`div`,_,o[2]||=[r(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[s]])])}}});typeof h==`function`&&h(v);var y=v;export{y as default}; \ No newline at end of file diff --git a/assets/gesture-circle-CtlpzRIp.js b/assets/gesture-circle-DTzEVNvY.js similarity index 97% rename from assets/gesture-circle-CtlpzRIp.js rename to assets/gesture-circle-DTzEVNvY.js index 46d59415ee0985e525e3297860d754dd01447548..a919cb227fc82f1ae67c11760a46835f40912db0 100644 --- a/assets/gesture-circle-CtlpzRIp.js +++ b/assets/gesture-circle-DTzEVNvY.js @@ -1 +1 @@ -import{dS as e,dT as t,dW as n,dZ as r,dd as i,di as a,dj as o,dm as s,dn as c,e5 as l,ec as u,eg as d,ek as f,eo as p}from"./index-BqrqTEsQ.js";import{b as m}from"./route-block-gWR0cCIm.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=d(),v=d(),y=d(),b=d(),{x,y:S}=a({target:y}),C=i(v,{immediate:!0,windowResize:!0}),w=e(()=>({x:x.value,y:S.value}));o(v,e=>{let t=e[0],{width:n,height:r}=t.contentRect;y.value&&(y.value.width=n,y.value.height=r)}),u(v,e=>{if(!e)return;let t=document.createElement(`canvas`);t.width=C.width.value,t.height=C.height.value,t.style.objectFit=`contain`;let n=t.getContext(`2d`);b.value=n,y.value=t,v.value?.appendChild(t)});let T=c(w,50),E=s(w,50),D=d(E.value),O=d(0),k=d(0),A=d(!1),j=d([]),M=d(!1);return u([x,S],()=>{b.value&&(b.value.beginPath(),b.value.fillStyle=`red`,b.value.arc(x.value-20,S.value-40-40,4,0,2*Math.PI),b.value.closePath(),b.value.fill())}),u(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=[]}),u(T,e=>{j.value.push(e)}),(e,r)=>(l(),n(`div`,{ref_key:`containerRef`,ref:m,h:`[calc(100dvh-40px)]`},[t(`div`,h,[t(`div`,g,[r[0]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointThrottled: `,-1),t(`div`,null,p(f(T)),1),r[1]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointDebounced: `,-1),t(`div`,null,p(f(E)),1),r[2]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoint: `,-1),t(`div`,null,p(D.value),1),r[3]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` distance: `,-1),t(`div`,null,p(O.value),1),r[4]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` count: `,-1),t(`div`,null,p(k.value),1),r[5]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` show: `,-1),t(`div`,null,p(A.value),1),r[6]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoints: `,-1),t(`div`,null,p(j.value),1),r[7]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` isCircle: `,-1),t(`div`,null,p(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{dS as e,dT as t,dW as n,dZ as r,dd as i,di as a,dj as o,dm as s,dn as c,e5 as l,ec as u,eg as d,ek as f,eo as p}from"./index-D1IGsMK6.js";import{b as m}from"./route-block-gWR0cCIm.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=d(),v=d(),y=d(),b=d(),{x,y:S}=a({target:y}),C=i(v,{immediate:!0,windowResize:!0}),w=e(()=>({x:x.value,y:S.value}));o(v,e=>{let t=e[0],{width:n,height:r}=t.contentRect;y.value&&(y.value.width=n,y.value.height=r)}),u(v,e=>{if(!e)return;let t=document.createElement(`canvas`);t.width=C.width.value,t.height=C.height.value,t.style.objectFit=`contain`;let n=t.getContext(`2d`);b.value=n,y.value=t,v.value?.appendChild(t)});let T=c(w,50),E=s(w,50),D=d(E.value),O=d(0),k=d(0),A=d(!1),j=d([]),M=d(!1);return u([x,S],()=>{b.value&&(b.value.beginPath(),b.value.fillStyle=`red`,b.value.arc(x.value-20,S.value-40-40,4,0,2*Math.PI),b.value.closePath(),b.value.fill())}),u(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=[]}),u(T,e=>{j.value.push(e)}),(e,r)=>(l(),n(`div`,{ref_key:`containerRef`,ref:m,h:`[calc(100dvh-40px)]`},[t(`div`,h,[t(`div`,g,[r[0]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointThrottled: `,-1),t(`div`,null,p(f(T)),1),r[1]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointDebounced: `,-1),t(`div`,null,p(f(E)),1),r[2]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoint: `,-1),t(`div`,null,p(D.value),1),r[3]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` distance: `,-1),t(`div`,null,p(O.value),1),r[4]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` count: `,-1),t(`div`,null,p(k.value),1),r[5]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` show: `,-1),t(`div`,null,p(A.value),1),r[6]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoints: `,-1),t(`div`,null,p(j.value),1),r[7]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` isCircle: `,-1),t(`div`,null,p(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-DZieEaGY.js b/assets/google-generative-ai-B99V0T18.js similarity index 96% rename from assets/google-generative-ai-DZieEaGY.js rename to assets/google-generative-ai-B99V0T18.js index 1e6dcd2d6210337b4b5267534ab4d7452892eadf..4d9bbddec8367cd9a08057c2ab12a97acb90492b 100644 --- a/assets/google-generative-ai-DZieEaGY.js +++ b/assets/google-generative-ai-B99V0T18.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`google-generative-ai`;var x=a({__name:`google-generative-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.anthropic.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`}),c([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,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName||`Google | Gemini`,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`Google`,placeholder:`GEMINI_API_KEY`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`google-generative-ai`;var x=a({__name:`google-generative-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.anthropic.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`}),c([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,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName||`Google | Gemini`,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`Google`,placeholder:`GEMINI_API_KEY`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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/hearing-CP0gq0in.js b/assets/hearing-HxzT9Wif.js similarity index 99% rename from assets/hearing-CP0gq0in.js rename to assets/hearing-HxzT9Wif.js index 7b44fb5f2c1005c575c230dcb53778d9a0295b5f..7ed086796e631e64a033d4fb6a9b8e2ab98dc524 100644 --- a/assets/hearing-CP0gq0in.js +++ b/assets/hearing-HxzT9Wif.js @@ -1 +1 @@ -import{c7 as e,cB as t,cC as n,cD as r,cL as i,cM as a,cR as o,cb as s,ch as c,ci as l,ck as ee,cl as te,cm as ne,cs as re,d7 as u,dQ as ie,dS as ae,dT as d,dU as f,dV as p,dW as m,dX as h,dY as g,dZ as oe,e3 as se,e4 as ce,e5 as _,e6 as v,e8 as le,ec as y,ed as b,ef as x,eg as S,ek as C,el as ue,eo as w,p as de,s as fe,x as pe,z as me}from"./index-BqrqTEsQ.js";import{b as T,e as E}from"./transformers.web-DwlcaNlo.js";import{b as D}from"./route-block-gWR0cCIm.js";function he(){let e=S(),t=S(),n=S(),r=S([]),i=S(0),a=S();function o(e){r.value.push(e)}function s(){let a=()=>{if(!e.value||!t.value)return;e.value.getByteFrequencyData(t.value);let o=0;for(let e=0;e{let{buffer:t}=e.data;t&&t.length>0&&await this.vad.processAudio(new Float32Array(t))}}catch(e){throw console.error(`Failed to initialize audio worklet:`,e),e}}async start(e){if(!this.audioContext||!this.audioWorkletNode)throw Error(`Audio system not initialized. Call initialize() first.`);try{this.audioContext.state===`suspended`&&await this.audioContext.resume(),this.mediaStream=e,this.sourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.sourceNode.connect(this.audioWorkletNode);let t=this.audioContext.createGain();t.gain.value=0,this.audioWorkletNode.connect(t),t.connect(this.audioContext.destination)}catch(e){throw console.error(`Failed to start microphone:`,e),e}}stop(){this.sourceNode&&this.audioWorkletNode&&(this.sourceNode.disconnect(),this.audioWorkletNode.disconnect()),this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null),this.audioContext&&this.audioContext.state!==`closed`&&this.audioContext.suspend(),this.sourceNode=null,this.audioWorkletNode?.disconnect(),this.audioWorkletNode=null}dispose(){this.stop(),this.audioContext&&this.audioContext.state!==`closed`&&(this.audioContext.close(),this.audioContext=null),this.workletInitialized=!1}},O=class{config;model;state;sampleRateTensor;buffer;bufferPointer=0;isRecording=!1;postSpeechSamples=0;prevBuffers=[];inferenceChain=Promise.resolve();eventListeners={};isReady=!1;constructor(e={}){let t={sampleRate:16e3,speechThreshold:.3,exitThreshold:.1,minSilenceDurationMs:400,speechPadMs:80,minSpeechDurationMs:250,maxBufferDuration:30,newBufferSize:512};this.config={...t,...e},this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.sampleRateTensor=new E(`int64`,[this.config.sampleRate],[]),this.state=new E(`float32`,new Float32Array(256),[2,1,128])}async initialize(){try{this.emit(`status`,{type:`info`,message:`Loading VAD model...`}),this.model=await T.from_pretrained(`onnx-community/silero-vad`,{config:{model_type:`custom`},dtype:`fp32`}),this.isReady=!0,this.emit(`status`,{type:`info`,message:`VAD model loaded successfully`})}catch(e){throw this.emit(`status`,{type:`error`,message:`Failed to load VAD model: ${e}`}),e}}on(e,t){this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t)}off(e,t){this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t))}emit(e,t){if(this.eventListeners[e])for(let n of this.eventListeners[e])n(t)}async processAudio(e){if(!this.isReady)throw Error(`VAD model is not initialized. Call initialize() first.`);let t=this.isRecording,n=await this.detectSpeech(e),r=this.config.sampleRate/1e3,i=this.config.minSilenceDurationMs*r,a=this.config.speechPadMs*r,o=this.config.minSpeechDurationMs*r,s=Math.ceil(a/this.config.newBufferSize);if(!t&&!n){this.prevBuffers.length>=s&&this.prevBuffers.shift(),this.prevBuffers.push(e.slice(0));return}let c=this.buffer.length-this.bufferPointer;if(e.length>=c){this.buffer.set(e.subarray(0,c),this.bufferPointer),this.bufferPointer+=c;let t=e.subarray(c);this.processSpeechSegment(t);return}else this.buffer.set(e,this.bufferPointer),this.bufferPointer+=e.length;if(n){this.isRecording||(this.emit(`speech-start`,void 0),this.emit(`status`,{type:`info`,message:`Speech detected`})),this.isRecording=!0,this.postSpeechSamples=0;return}if(this.postSpeechSamples+=e.length,this.postSpeechSamples>=i){if(this.bufferPointerthis.model?.({input:t,sr:this.sampleRateTensor,state:this.state})));this.state=n;let i=r.data[0];return this.emit(`debug`,{message:`VAD score`,data:{probability:i}}),i>this.config.speechThreshold||this.isRecording&&i>=this.config.exitThreshold}processSpeechSegment(e){let t=this.config.sampleRate/1e3,n=this.config.speechPadMs*t,r=this.bufferPointer/this.config.sampleRate*1e3,i=e?.length??0,a=this.prevBuffers.reduce((e,t)=>e+t.length,0),o=new Float32Array(a+this.bufferPointer+n),s=0;for(let e of this.prevBuffers)o.set(e,s),s+=e.length;o.set(this.buffer.slice(0,this.bufferPointer+n),s),this.emit(`speech-end`,void 0),this.emit(`speech-ready`,{buffer:o,duration:r}),e&&this.buffer.set(e,0),this.reset(i)}reset(e=0){this.buffer.fill(0,e),this.bufferPointer=e,this.isRecording=!1,this.postSpeechSamples=0,this.prevBuffers=[]}updateConfig(e){this.config={...this.config,...e},(e.maxBufferDuration||e.sampleRate)&&(this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.bufferPointer=0),e.sampleRate&&(this.sampleRateTensor=new E(`int64`,[this.config.sampleRate],[]))}getLastProbability(){return 0}isCurrentlyRecording(){return this.isRecording}};async function ve(e){let t=new O(e);return await t.initialize(),t}const ye={flex:`~ col md:row gap-6`},be={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`h-fit w-full md:w-[40%]`},xe={flex:`~ col gap-4`},Se={flex:`~ col gap-4`},Ce={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},we={text:`neutral-400 dark:neutral-400`},Te={"max-w-full":``},Ee={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},De={key:1},Oe={key:0},ke={flex:`~ col gap-4`},Ae={class:`text-lg md:text-2xl`},je={text:`neutral-400 dark:neutral-400`},Me={key:0,class:`flex items-center justify-center py-4`},Ne={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Pe={"w-full":``,"rounded-xl":``},Fe={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},Ie={class:`inline-flex items-center gap-4`},Le=[`src`],Re={key:0,class:`mt-2 text-sm text-neutral-500 dark:text-neutral-400`},ze={flex:`~ col gap-4`},Be={class:`space-y-4`},Ve={class:`space-y-3`},He={key:1,class:`space-y-3`},Ue={key:2,class:`space-y-3`},We={class:`flex items-center gap-3`},Ge={class:`text-sm font-medium`},Ke={class:`ml-auto text-xs text-neutral-500`},qe={class:`border-t border-neutral-200 pt-3 dark:border-neutral-700`},Je={key:0,class:`mt-3 space-y-2`},Ye={key:0,class:`flex items-center gap-2 text-primary-600 dark:text-primary-400`},Xe={key:2,class:`flex items-center gap-2 text-green-600 dark:text-green-400`},Ze={class:`ml-auto text-xs text-neutral-500`},Qe={key:0,class:`border-t border-neutral-200 pt-4 dark:border-neutral-700`},$e={key:0,class:`mt-3`},et={key:1,class:`border border-amber-200 rounded-lg bg-amber-50 p-3 dark:border-amber-800 dark:bg-amber-900/20`},tt=50;var k=oe({__name:`hearing`,setup(oe){let{t:T}=me(),E=fe(),{activeTranscriptionProvider:D,activeTranscriptionModel:O,providerModels:k,activeProviderModelError:A,isLoadingActiveProviderModels:nt,supportsModelListing:rt,transcriptionModelSearchQuery:j,activeCustomModelName:it}=u(E),at=pe(),{configuredTranscriptionProvidersMetadata:ot}=u(at),{stopStream:st,startStream:ct}=de(),{audioInputs:lt,selectedAudioInput:M,stream:N}=u(de()),{startRecord:ut,stopRecord:dt,onStopRecord:ft}=e(N),{startAnalyzer:pt,stopAnalyzer:mt,onAnalyzerUpdate:ht,volumeLevel:gt}=he(),{audioContext:P}=u(s()),F=S(``),I=S(``),L=S(!1),R=S(!1),z=S(),B=S(),V=S(!1),H=S(25),U=S(50),W=S(),G=S(!1),K=S(!1),q=S(!0),J=S(0),Y=S(.5),X=S([]),_t=S([]),vt=S([]),yt=ae(()=>_t.value.map(e=>{let t=URL.createObjectURL(e);return vt.value.push(()=>URL.revokeObjectURL(t)),t})),Z=S([]);async function bt(){if(!(G.value||K.value)){K.value=!0,I.value=``;try{let e=await ve({sampleRate:16e3,speechThreshold:Y.value,exitThreshold:Y.value*.3,minSilenceDurationMs:400});e.on(`speech-start`,()=>{V.value=!0,ut()}),e.on(`speech-end`,()=>{V.value=!1,dt()}),e.on(`debug`,({data:e})=>{e?.probability!==void 0&&(J.value=e.probability,X.value.push(e.probability),X.value.length>tt&&X.value.shift())}),e.on(`status`,({type:e,message:t})=>{e===`error`&&(I.value=t)});let t=new _e(e,{minChunkSize:512,audioContextOptions:{sampleRate:16e3,latencyHint:`interactive`}});await t.initialize(ge),W.value=t,G.value=!0}catch(e){I.value=e instanceof Error?e.message:String(e),console.error(`Failed to load VAD model:`,e)}finally{K.value=!1}}}async function Q(){try{if(!M.value){console.warn(`No audio input device selected`);return}if(await $(),await ct(),!N.value){console.warn(`No audio stream available`);return}ft(async e=>{if(e)try{if(e&&e.size>0){_t.value.push(e);let t=await at.getProviderInstance(D.value);if(!t)throw Error(`Failed to initialize speech provider`);let n=O.value,r=await E.transcription(t,n,new File([e],`recording.wav`));Z.value.push(r.text)}}catch(e){F.value=e instanceof Error?e.message:String(e),console.error(`Error generating transcription:`,F.value)}});let e=P.value.createMediaStreamSource(N.value),t=pt(P.value);ht(e=>{(!q.value||!G.value)&&(V.value=e>H.value)}),z.value=P.value.createGain(),z.value.gain.value=R.value?U.value/100:0,t&&e.connect(t),R.value&&(e.connect(z.value),z.value.connect(P.value.destination)),q.value&&(await bt(),W.value&&await W.value.start(N.value))}catch(e){console.error(`Error setting up audio monitoring:`,e),I.value=e instanceof Error?e.message:String(e)}}async function $(){B.value&&(cancelAnimationFrame(B.value),B.value=void 0),W.value&&await W.value.stop(),N.value&&st(),mt(),z.value=void 0,V.value=!1,J.value=0,X.value=[]}async function xt(){!P.value||!z.value||(R.value?(z.value.gain.value=U.value/100,z.value.connect(P.value.destination)):(z.value.gain.value=0,z.value.disconnect()))}y(M,async()=>{L.value&&await Q()}),y(R,xt),y(U,()=>{z.value&&R.value&&(z.value.gain.value=U.value/100)}),y(Y,()=>{W.value&&G.value});async function St(){L.value?(await $(),L.value=!1):(await Q(),L.value=!0)}let Ct=ae(()=>{if(!q.value||!G.value)return V.value?`bg-green-500 shadow-lg shadow-green-500/50`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`;let e=J.value,t=Y.value;return e>t?`bg-green-500 shadow-lg shadow-green-500/50`:e>t*.5?`bg-yellow-500 shadow-lg shadow-yellow-500/30`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`});function wt(e){it.value=e}return se(async()=>{await E.loadModelsForProvider(D.value)}),ce(()=>{$(),W.value&&W.value.dispose(),vt.value.forEach(e=>e())}),(e,s)=>{let u=le(`RouterLink`);return _(),m(`div`,ye,[d(`div`,be,[d(`div`,xe,[d(`div`,null,[g(C(i),{modelValue:C(M),"onUpdate:modelValue":s[0]||=e=>x(M)?M.value=e:null,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:C(lt).map(e=>({label:e.label||e.deviceId,value:e.deviceId})),placeholder:`Select an audio input device`,layout:`vertical`},null,8,[`modelValue`,`options`])]),d(`div`,Se,[d(`div`,null,[d(`h2`,Ce,w(C(T)(`settings.pages.providers.title`)),1),d(`div`,we,[d(`span`,null,w(C(T)(`settings.pages.modules.hearing.sections.section.provider-model-selection.description`)),1)])]),d(`div`,Te,[C(ot).length>0?(_(),m(`fieldset`,Ee,[(_(!0),m(ie,null,v(C(ot),e=>(_(),f(C(ee),{id:e.id,key:e.id,modelValue:C(D),"onUpdate:modelValue":s[1]||=e=>x(D)?D.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(_(),m(`div`,De,[g(u,{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:b(()=>s[9]||=[d(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),d(`div`,{class:`flex flex-col`},[d(`span`,{class:`font-medium`},`No Providers Configured`),d(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your Transcription providers`)],-1),d(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[9]})]))])]),C(D)&&C(rt)?(_(),m(`div`,Oe,[d(`div`,ke,[d(`div`,null,[d(`h2`,Ae,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),d(`div`,je,[d(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),C(nt)?(_(),m(`div`,Me,[s[10]||=d(`div`,{class:`mr-2 animate-spin`},[d(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),d(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):C(A)?(_(),f(C(c),{key:1,title:C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:C(A)},null,8,[`title`,`error`])):C(k).length===0&&!C(nt)?(_(),f(C(ne),{key:2,type:`warning`},{title:b(()=>[h(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:b(()=>[h(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):C(k).length>0?(_(),f(C(te),{key:3,modelValue:C(O),"onUpdate:modelValue":s[2]||=e=>x(O)?O.value=e:null,"search-query":C(j),"onUpdate:searchQuery":s[3]||=e=>x(j)?j.value=e:null,items:C(k).sort((e,t)=>e.id===C(O)?-1:t.id===C(O)?1:0),searchable:!0,"search-placeholder":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:C(j)}),"search-results-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":wt},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`])):p(``,!0)])])):p(``,!0)])]),d(`div`,Ne,[d(`div`,Pe,[d(`h2`,Fe,[d(`div`,Ie,[g(C(n)),d(`div`,null,w(C(T)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),F.value?(_(),f(C(c),{key:0,title:`Error occurred`,error:F.value,"mb-4":``},null,8,[`error`])):p(``,!0),g(C(l),{class:`mb-4`,"w-full":``,onClick:St},{default:b(()=>[h(w(L.value?`Stop Monitoring`:`Start Monitoring`),1)]),_:1}),d(`div`,null,[(_(!0),m(ie,null,v(yt.value,(e,t)=>(_(),m(`div`,{key:t,class:`mb-2`},[d(`audio`,{src:e,controls:``,class:`w-full`},null,8,Le),Z.value[t]?(_(),m(`div`,Re,w(Z.value[t]),1)):p(``,!0)]))),128))]),d(`div`,ze,[d(`div`,Be,[d(`div`,Ve,[g(C(r),{level:C(gt),label:`Input Level`},null,8,[`level`]),q.value&&G.value?(_(),f(C(t),{key:0,value:J.value,threshold:Y.value,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`])):p(``,!0),q.value&&G.value?(_(),m(`div`,He,[g(C(a),{modelValue:Y.value,"onUpdate:modelValue":s[4]||=e=>Y.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:.1,max:.9,step:.05,"format-value":e=>`${(e*100).toFixed(0)}%`},null,8,[`modelValue`,`format-value`])])):(_(),m(`div`,Ue,[g(C(a),{modelValue:H.value,"onUpdate:modelValue":s[5]||=e=>H.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:1,max:80,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])),d(`div`,We,[d(`div`,{class:ue([`h-4 w-4 rounded-full transition-all duration-200`,Ct.value])},null,2),d(`span`,Ge,w(V.value?`Speaking Detected`:`Silence`),1),d(`span`,Ke,w(q.value&&G.value?`Model Based`:`Volume Based`),1)]),d(`div`,qe,[g(C(o),{modelValue:q.value,"onUpdate:modelValue":s[6]||=e=>q.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),q.value?(_(),m(`div`,Je,[K.value?(_(),m(`div`,Ye,s[11]||=[d(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),d(`span`,{class:`text-sm`},`Loading...`,-1)])):I.value?(_(),f(C(c),{key:1,title:`Inference error`,error:I.value},null,8,[`error`])):G.value?(_(),m(`div`,Xe,[s[12]||=d(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),s[13]||=d(`span`,{class:`text-sm`},`Activated`,-1),d(`span`,Ze,` Probability: `+w((J.value*100).toFixed(1))+`% `,1)])):p(``,!0)])):p(``,!0)]),q.value&&G.value?(_(),f(C(re),{key:3,history:X.value,"current-value":J.value,threshold:Y.value,"is-active":V.value,title:`Voice Activity`,subtitle:`Last 2 seconds`,"active-label":`Speaking`,"active-legend-label":`Voice detected`,"inactive-legend-label":`Silence`,"threshold-label":`Speech threshold`},null,8,[`history`,`current-value`,`threshold`,`is-active`])):p(``,!0)]),L.value?(_(),m(`div`,Qe,[g(C(o),{modelValue:R.value,"onUpdate:modelValue":s[7]||=e=>R.value=e,label:`Monitor Audio (Listen)`,description:`Enable audio playback monitoring (like OBS). Be careful of feedback!`},null,8,[`modelValue`]),R.value?(_(),m(`div`,$e,[g(C(a),{modelValue:U.value,"onUpdate:modelValue":s[8]||=e=>U.value=e,label:`Monitor Volume`,description:`Control the volume of audio monitoring playback`,min:0,max:100,step:5,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])):p(``,!0)])):p(``,!0),R.value?(_(),m(`div`,et,s[14]||=[d(`div`,{class:`flex items-center gap-2 text-amber-700 dark:text-amber-300`},[d(`div`,{class:`text-sm`,"i-solar:warning-circle-bold-duotone":``}),d(`span`,{class:`text-sm font-medium`},`Audio feedback warning`)],-1),d(`div`,{class:`mt-1 text-xs text-amber-600 dark:text-amber-400`},` Use headphones to prevent audio feedback. Lower the monitor volume if you hear echoing. `,-1)])):p(``,!0)])])])])])}}});typeof D==`function`&&D(k);var A=k;export{A as default}; \ No newline at end of file +import{c7 as e,cB as t,cC as n,cD as r,cL as i,cM as a,cR as o,cb as s,ch as c,ci as l,ck as ee,cl as te,cm as ne,cs as re,d7 as u,dQ as ie,dS as ae,dT as d,dU as f,dV as p,dW as m,dX as h,dY as g,dZ as oe,e3 as se,e4 as ce,e5 as _,e6 as v,e8 as le,ec as y,ed as b,ef as x,eg as S,ek as C,el as ue,eo as w,p as de,s as fe,x as pe,z as me}from"./index-D1IGsMK6.js";import{b as T,e as E}from"./transformers.web-B7NywNTw.js";import{b as D}from"./route-block-gWR0cCIm.js";function he(){let e=S(),t=S(),n=S(),r=S([]),i=S(0),a=S();function o(e){r.value.push(e)}function s(){let a=()=>{if(!e.value||!t.value)return;e.value.getByteFrequencyData(t.value);let o=0;for(let e=0;e{let{buffer:t}=e.data;t&&t.length>0&&await this.vad.processAudio(new Float32Array(t))}}catch(e){throw console.error(`Failed to initialize audio worklet:`,e),e}}async start(e){if(!this.audioContext||!this.audioWorkletNode)throw Error(`Audio system not initialized. Call initialize() first.`);try{this.audioContext.state===`suspended`&&await this.audioContext.resume(),this.mediaStream=e,this.sourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.sourceNode.connect(this.audioWorkletNode);let t=this.audioContext.createGain();t.gain.value=0,this.audioWorkletNode.connect(t),t.connect(this.audioContext.destination)}catch(e){throw console.error(`Failed to start microphone:`,e),e}}stop(){this.sourceNode&&this.audioWorkletNode&&(this.sourceNode.disconnect(),this.audioWorkletNode.disconnect()),this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null),this.audioContext&&this.audioContext.state!==`closed`&&this.audioContext.suspend(),this.sourceNode=null,this.audioWorkletNode?.disconnect(),this.audioWorkletNode=null}dispose(){this.stop(),this.audioContext&&this.audioContext.state!==`closed`&&(this.audioContext.close(),this.audioContext=null),this.workletInitialized=!1}},O=class{config;model;state;sampleRateTensor;buffer;bufferPointer=0;isRecording=!1;postSpeechSamples=0;prevBuffers=[];inferenceChain=Promise.resolve();eventListeners={};isReady=!1;constructor(e={}){let t={sampleRate:16e3,speechThreshold:.3,exitThreshold:.1,minSilenceDurationMs:400,speechPadMs:80,minSpeechDurationMs:250,maxBufferDuration:30,newBufferSize:512};this.config={...t,...e},this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.sampleRateTensor=new E(`int64`,[this.config.sampleRate],[]),this.state=new E(`float32`,new Float32Array(256),[2,1,128])}async initialize(){try{this.emit(`status`,{type:`info`,message:`Loading VAD model...`}),this.model=await T.from_pretrained(`onnx-community/silero-vad`,{config:{model_type:`custom`},dtype:`fp32`}),this.isReady=!0,this.emit(`status`,{type:`info`,message:`VAD model loaded successfully`})}catch(e){throw this.emit(`status`,{type:`error`,message:`Failed to load VAD model: ${e}`}),e}}on(e,t){this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t)}off(e,t){this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t))}emit(e,t){if(this.eventListeners[e])for(let n of this.eventListeners[e])n(t)}async processAudio(e){if(!this.isReady)throw Error(`VAD model is not initialized. Call initialize() first.`);let t=this.isRecording,n=await this.detectSpeech(e),r=this.config.sampleRate/1e3,i=this.config.minSilenceDurationMs*r,a=this.config.speechPadMs*r,o=this.config.minSpeechDurationMs*r,s=Math.ceil(a/this.config.newBufferSize);if(!t&&!n){this.prevBuffers.length>=s&&this.prevBuffers.shift(),this.prevBuffers.push(e.slice(0));return}let c=this.buffer.length-this.bufferPointer;if(e.length>=c){this.buffer.set(e.subarray(0,c),this.bufferPointer),this.bufferPointer+=c;let t=e.subarray(c);this.processSpeechSegment(t);return}else this.buffer.set(e,this.bufferPointer),this.bufferPointer+=e.length;if(n){this.isRecording||(this.emit(`speech-start`,void 0),this.emit(`status`,{type:`info`,message:`Speech detected`})),this.isRecording=!0,this.postSpeechSamples=0;return}if(this.postSpeechSamples+=e.length,this.postSpeechSamples>=i){if(this.bufferPointerthis.model?.({input:t,sr:this.sampleRateTensor,state:this.state})));this.state=n;let i=r.data[0];return this.emit(`debug`,{message:`VAD score`,data:{probability:i}}),i>this.config.speechThreshold||this.isRecording&&i>=this.config.exitThreshold}processSpeechSegment(e){let t=this.config.sampleRate/1e3,n=this.config.speechPadMs*t,r=this.bufferPointer/this.config.sampleRate*1e3,i=e?.length??0,a=this.prevBuffers.reduce((e,t)=>e+t.length,0),o=new Float32Array(a+this.bufferPointer+n),s=0;for(let e of this.prevBuffers)o.set(e,s),s+=e.length;o.set(this.buffer.slice(0,this.bufferPointer+n),s),this.emit(`speech-end`,void 0),this.emit(`speech-ready`,{buffer:o,duration:r}),e&&this.buffer.set(e,0),this.reset(i)}reset(e=0){this.buffer.fill(0,e),this.bufferPointer=e,this.isRecording=!1,this.postSpeechSamples=0,this.prevBuffers=[]}updateConfig(e){this.config={...this.config,...e},(e.maxBufferDuration||e.sampleRate)&&(this.buffer=new Float32Array(this.config.maxBufferDuration*this.config.sampleRate),this.bufferPointer=0),e.sampleRate&&(this.sampleRateTensor=new E(`int64`,[this.config.sampleRate],[]))}getLastProbability(){return 0}isCurrentlyRecording(){return this.isRecording}};async function ve(e){let t=new O(e);return await t.initialize(),t}const ye={flex:`~ col md:row gap-6`},be={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`h-fit w-full md:w-[40%]`},xe={flex:`~ col gap-4`},Se={flex:`~ col gap-4`},Ce={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},we={text:`neutral-400 dark:neutral-400`},Te={"max-w-full":``},Ee={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},De={key:1},Oe={key:0},ke={flex:`~ col gap-4`},Ae={class:`text-lg md:text-2xl`},je={text:`neutral-400 dark:neutral-400`},Me={key:0,class:`flex items-center justify-center py-4`},Ne={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Pe={"w-full":``,"rounded-xl":``},Fe={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},Ie={class:`inline-flex items-center gap-4`},Le=[`src`],Re={key:0,class:`mt-2 text-sm text-neutral-500 dark:text-neutral-400`},ze={flex:`~ col gap-4`},Be={class:`space-y-4`},Ve={class:`space-y-3`},He={key:1,class:`space-y-3`},Ue={key:2,class:`space-y-3`},We={class:`flex items-center gap-3`},Ge={class:`text-sm font-medium`},Ke={class:`ml-auto text-xs text-neutral-500`},qe={class:`border-t border-neutral-200 pt-3 dark:border-neutral-700`},Je={key:0,class:`mt-3 space-y-2`},Ye={key:0,class:`flex items-center gap-2 text-primary-600 dark:text-primary-400`},Xe={key:2,class:`flex items-center gap-2 text-green-600 dark:text-green-400`},Ze={class:`ml-auto text-xs text-neutral-500`},Qe={key:0,class:`border-t border-neutral-200 pt-4 dark:border-neutral-700`},$e={key:0,class:`mt-3`},et={key:1,class:`border border-amber-200 rounded-lg bg-amber-50 p-3 dark:border-amber-800 dark:bg-amber-900/20`},tt=50;var k=oe({__name:`hearing`,setup(oe){let{t:T}=me(),E=fe(),{activeTranscriptionProvider:D,activeTranscriptionModel:O,providerModels:k,activeProviderModelError:A,isLoadingActiveProviderModels:nt,supportsModelListing:rt,transcriptionModelSearchQuery:j,activeCustomModelName:it}=u(E),at=pe(),{configuredTranscriptionProvidersMetadata:ot}=u(at),{stopStream:st,startStream:ct}=de(),{audioInputs:lt,selectedAudioInput:M,stream:N}=u(de()),{startRecord:ut,stopRecord:dt,onStopRecord:ft}=e(N),{startAnalyzer:pt,stopAnalyzer:mt,onAnalyzerUpdate:ht,volumeLevel:gt}=he(),{audioContext:P}=u(s()),F=S(``),I=S(``),L=S(!1),R=S(!1),z=S(),B=S(),V=S(!1),H=S(25),U=S(50),W=S(),G=S(!1),K=S(!1),q=S(!0),J=S(0),Y=S(.5),X=S([]),_t=S([]),vt=S([]),yt=ae(()=>_t.value.map(e=>{let t=URL.createObjectURL(e);return vt.value.push(()=>URL.revokeObjectURL(t)),t})),Z=S([]);async function bt(){if(!(G.value||K.value)){K.value=!0,I.value=``;try{let e=await ve({sampleRate:16e3,speechThreshold:Y.value,exitThreshold:Y.value*.3,minSilenceDurationMs:400});e.on(`speech-start`,()=>{V.value=!0,ut()}),e.on(`speech-end`,()=>{V.value=!1,dt()}),e.on(`debug`,({data:e})=>{e?.probability!==void 0&&(J.value=e.probability,X.value.push(e.probability),X.value.length>tt&&X.value.shift())}),e.on(`status`,({type:e,message:t})=>{e===`error`&&(I.value=t)});let t=new _e(e,{minChunkSize:512,audioContextOptions:{sampleRate:16e3,latencyHint:`interactive`}});await t.initialize(ge),W.value=t,G.value=!0}catch(e){I.value=e instanceof Error?e.message:String(e),console.error(`Failed to load VAD model:`,e)}finally{K.value=!1}}}async function Q(){try{if(!M.value){console.warn(`No audio input device selected`);return}if(await $(),await ct(),!N.value){console.warn(`No audio stream available`);return}ft(async e=>{if(e)try{if(e&&e.size>0){_t.value.push(e);let t=await at.getProviderInstance(D.value);if(!t)throw Error(`Failed to initialize speech provider`);let n=O.value,r=await E.transcription(t,n,new File([e],`recording.wav`));Z.value.push(r.text)}}catch(e){F.value=e instanceof Error?e.message:String(e),console.error(`Error generating transcription:`,F.value)}});let e=P.value.createMediaStreamSource(N.value),t=pt(P.value);ht(e=>{(!q.value||!G.value)&&(V.value=e>H.value)}),z.value=P.value.createGain(),z.value.gain.value=R.value?U.value/100:0,t&&e.connect(t),R.value&&(e.connect(z.value),z.value.connect(P.value.destination)),q.value&&(await bt(),W.value&&await W.value.start(N.value))}catch(e){console.error(`Error setting up audio monitoring:`,e),I.value=e instanceof Error?e.message:String(e)}}async function $(){B.value&&(cancelAnimationFrame(B.value),B.value=void 0),W.value&&await W.value.stop(),N.value&&st(),mt(),z.value=void 0,V.value=!1,J.value=0,X.value=[]}async function xt(){!P.value||!z.value||(R.value?(z.value.gain.value=U.value/100,z.value.connect(P.value.destination)):(z.value.gain.value=0,z.value.disconnect()))}y(M,async()=>{L.value&&await Q()}),y(R,xt),y(U,()=>{z.value&&R.value&&(z.value.gain.value=U.value/100)}),y(Y,()=>{W.value&&G.value});async function St(){L.value?(await $(),L.value=!1):(await Q(),L.value=!0)}let Ct=ae(()=>{if(!q.value||!G.value)return V.value?`bg-green-500 shadow-lg shadow-green-500/50`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`;let e=J.value,t=Y.value;return e>t?`bg-green-500 shadow-lg shadow-green-500/50`:e>t*.5?`bg-yellow-500 shadow-lg shadow-yellow-500/30`:`bg-white dark:bg-neutral-900 border-2 border-neutral-300 dark:border-neutral-600`});function wt(e){it.value=e}return se(async()=>{await E.loadModelsForProvider(D.value)}),ce(()=>{$(),W.value&&W.value.dispose(),vt.value.forEach(e=>e())}),(e,s)=>{let u=le(`RouterLink`);return _(),m(`div`,ye,[d(`div`,be,[d(`div`,xe,[d(`div`,null,[g(C(i),{modelValue:C(M),"onUpdate:modelValue":s[0]||=e=>x(M)?M.value=e:null,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:C(lt).map(e=>({label:e.label||e.deviceId,value:e.deviceId})),placeholder:`Select an audio input device`,layout:`vertical`},null,8,[`modelValue`,`options`])]),d(`div`,Se,[d(`div`,null,[d(`h2`,Ce,w(C(T)(`settings.pages.providers.title`)),1),d(`div`,we,[d(`span`,null,w(C(T)(`settings.pages.modules.hearing.sections.section.provider-model-selection.description`)),1)])]),d(`div`,Te,[C(ot).length>0?(_(),m(`fieldset`,Ee,[(_(!0),m(ie,null,v(C(ot),e=>(_(),f(C(ee),{id:e.id,key:e.id,modelValue:C(D),"onUpdate:modelValue":s[1]||=e=>x(D)?D.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(_(),m(`div`,De,[g(u,{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:b(()=>s[9]||=[d(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),d(`div`,{class:`flex flex-col`},[d(`span`,{class:`font-medium`},`No Providers Configured`),d(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your Transcription providers`)],-1),d(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[9]})]))])]),C(D)&&C(rt)?(_(),m(`div`,Oe,[d(`div`,ke,[d(`div`,null,[d(`h2`,Ae,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),d(`div`,je,[d(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),C(nt)?(_(),m(`div`,Me,[s[10]||=d(`div`,{class:`mr-2 animate-spin`},[d(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),d(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):C(A)?(_(),f(C(c),{key:1,title:C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:C(A)},null,8,[`title`,`error`])):C(k).length===0&&!C(nt)?(_(),f(C(ne),{key:2,type:`warning`},{title:b(()=>[h(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:b(()=>[h(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):C(k).length>0?(_(),f(C(te),{key:3,modelValue:C(O),"onUpdate:modelValue":s[2]||=e=>x(O)?O.value=e:null,"search-query":C(j),"onUpdate:searchQuery":s[3]||=e=>x(j)?j.value=e:null,items:C(k).sort((e,t)=>e.id===C(O)?-1:t.id===C(O)?1:0),searchable:!0,"search-placeholder":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:C(j)}),"search-results-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":wt},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`])):p(``,!0)])])):p(``,!0)])]),d(`div`,Ne,[d(`div`,Pe,[d(`h2`,Fe,[d(`div`,Ie,[g(C(n)),d(`div`,null,w(C(T)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),F.value?(_(),f(C(c),{key:0,title:`Error occurred`,error:F.value,"mb-4":``},null,8,[`error`])):p(``,!0),g(C(l),{class:`mb-4`,"w-full":``,onClick:St},{default:b(()=>[h(w(L.value?`Stop Monitoring`:`Start Monitoring`),1)]),_:1}),d(`div`,null,[(_(!0),m(ie,null,v(yt.value,(e,t)=>(_(),m(`div`,{key:t,class:`mb-2`},[d(`audio`,{src:e,controls:``,class:`w-full`},null,8,Le),Z.value[t]?(_(),m(`div`,Re,w(Z.value[t]),1)):p(``,!0)]))),128))]),d(`div`,ze,[d(`div`,Be,[d(`div`,Ve,[g(C(r),{level:C(gt),label:`Input Level`},null,8,[`level`]),q.value&&G.value?(_(),f(C(t),{key:0,value:J.value,threshold:Y.value,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`])):p(``,!0),q.value&&G.value?(_(),m(`div`,He,[g(C(a),{modelValue:Y.value,"onUpdate:modelValue":s[4]||=e=>Y.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:.1,max:.9,step:.05,"format-value":e=>`${(e*100).toFixed(0)}%`},null,8,[`modelValue`,`format-value`])])):(_(),m(`div`,Ue,[g(C(a),{modelValue:H.value,"onUpdate:modelValue":s[5]||=e=>H.value=e,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:1,max:80,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])),d(`div`,We,[d(`div`,{class:ue([`h-4 w-4 rounded-full transition-all duration-200`,Ct.value])},null,2),d(`span`,Ge,w(V.value?`Speaking Detected`:`Silence`),1),d(`span`,Ke,w(q.value&&G.value?`Model Based`:`Volume Based`),1)]),d(`div`,qe,[g(C(o),{modelValue:q.value,"onUpdate:modelValue":s[6]||=e=>q.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),q.value?(_(),m(`div`,Je,[K.value?(_(),m(`div`,Ye,s[11]||=[d(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),d(`span`,{class:`text-sm`},`Loading...`,-1)])):I.value?(_(),f(C(c),{key:1,title:`Inference error`,error:I.value},null,8,[`error`])):G.value?(_(),m(`div`,Xe,[s[12]||=d(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),s[13]||=d(`span`,{class:`text-sm`},`Activated`,-1),d(`span`,Ze,` Probability: `+w((J.value*100).toFixed(1))+`% `,1)])):p(``,!0)])):p(``,!0)]),q.value&&G.value?(_(),f(C(re),{key:3,history:X.value,"current-value":J.value,threshold:Y.value,"is-active":V.value,title:`Voice Activity`,subtitle:`Last 2 seconds`,"active-label":`Speaking`,"active-legend-label":`Voice detected`,"inactive-legend-label":`Silence`,"threshold-label":`Speech threshold`},null,8,[`history`,`current-value`,`threshold`,`is-active`])):p(``,!0)]),L.value?(_(),m(`div`,Qe,[g(C(o),{modelValue:R.value,"onUpdate:modelValue":s[7]||=e=>R.value=e,label:`Monitor Audio (Listen)`,description:`Enable audio playback monitoring (like OBS). Be careful of feedback!`},null,8,[`modelValue`]),R.value?(_(),m(`div`,$e,[g(C(a),{modelValue:U.value,"onUpdate:modelValue":s[8]||=e=>U.value=e,label:`Monitor Volume`,description:`Control the volume of audio monitoring playback`,min:0,max:100,step:5,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])):p(``,!0)])):p(``,!0),R.value?(_(),m(`div`,et,s[14]||=[d(`div`,{class:`flex items-center gap-2 text-amber-700 dark:text-amber-300`},[d(`div`,{class:`text-sm`,"i-solar:warning-circle-bold-duotone":``}),d(`span`,{class:`text-sm font-medium`},`Audio feedback warning`)],-1),d(`div`,{class:`mt-1 text-xs text-amber-600 dark:text-amber-400`},` Use headphones to prevent audio feedback. Lower the monitor volume if you hear echoing. `,-1)])):p(``,!0)])])])])])}}});typeof D==`function`&&D(k);var A=k;export{A as default}; \ No newline at end of file diff --git a/assets/home-yZcli0R-.js b/assets/home-VSi7cQy-.js similarity index 86% rename from assets/home-yZcli0R-.js rename to assets/home-VSi7cQy-.js index ca2cd63b8121717ea52c089d3bc0ee02b0cdef1f..57e2ed6874f162f424f745ec6783c037686bb7c0 100644 --- a/assets/home-yZcli0R-.js +++ b/assets/home-VSi7cQy-.js @@ -1 +1 @@ -import{d3 as e,dT as t,dW as n,dY as r,dZ as i,e5 as a,ek as o}from"./index-BqrqTEsQ.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{d3 as e,dT as t,dW as n,dY as r,dZ as i,e5 as a,ek as o}from"./index-D1IGsMK6.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/icon-animation-PuVIGmi0.js b/assets/icon-animation-DPHfIEG5.js similarity index 64% rename from assets/icon-animation-PuVIGmi0.js rename to assets/icon-animation-DPHfIEG5.js index 3df539c4ffd937442e83e8471a187ab0c5dc01b2..cd8ab69ad41a815f87deab2a274fb14b88659ebf 100644 --- a/assets/icon-animation-PuVIGmi0.js +++ b/assets/icon-animation-DPHfIEG5.js @@ -1 +1 @@ -import{dS as e,e3 as t,e4 as n,eg as r,o as i}from"./index-BqrqTEsQ.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 b}; \ No newline at end of file +import{dS as e,e3 as t,e4 as n,eg as r,o as i}from"./index-D1IGsMK6.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 b}; \ No newline at end of file diff --git a/assets/image-y7UfzUtG.js b/assets/image-D_-1HjPP.js similarity index 94% rename from assets/image-y7UfzUtG.js rename to assets/image-D_-1HjPP.js index 5acd78c398bd70918b53a3aa71c6c1a14a5dcc9f..98b54078fa3e11a647cf534f34e813c4aa3f3c24 100644 --- a/assets/image-y7UfzUtG.js +++ b/assets/image-D_-1HjPP.js @@ -1,2 +1,2 @@ -import{cN as e,dT as t,dV as n,dW as r,dZ as i,da as a,e5 as o,eg as s,ek as c,eo as l}from"./index-BqrqTEsQ.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=s(),m=s(``),{copy:h}=a({source:m});async function g(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result?.toString()||``)},r.onerror=e=>{n(e)},r.readAsDataURL(e)})}async function _(e){let t=e.target,n=t.files?.[0];if(n){i.value=n;let e=await g(n);m.value=e}}return(e,i)=>(o(),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?(o(),r(`div`,d,[t(`img`,{src:m.value,alt:`Uploaded Image`,"w-100":``},null,8,f),t(`pre`,p,` `+l(m.value)+` +import{cN as e,dT as t,dV as n,dW as r,dZ as i,da as a,e5 as o,eg as s,ek as c,eo as l}from"./index-D1IGsMK6.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=s(),m=s(``),{copy:h}=a({source:m});async function g(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result?.toString()||``)},r.onerror=e=>{n(e)},r.readAsDataURL(e)})}async function _(e){let t=e.target,n=t.files?.[0];if(n){i.value=n;let e=await g(n);m.value=e}}return(e,i)=>(o(),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?(o(),r(`div`,d,[t(`img`,{src:m.value,alt:`Uploaded Image`,"w-100":``},null,8,f),t(`pre`,p,` `+l(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-BqrqTEsQ.js b/assets/index-D1IGsMK6.js similarity index 99% rename from assets/index-BqrqTEsQ.js rename to assets/index-D1IGsMK6.js index 444f0313bd0d286bd955a9030ba4c1be1ed8890e..ea7d9664c0a27c87eb3251f0ba21cdd95a1879d4 100644 --- a/assets/index-BqrqTEsQ.js +++ b/assets/index-D1IGsMK6.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-CZpOWzAg.js","assets/HeaderLink-D6jJjgut.js","assets/HeaderLink-4n3ShASi.css","assets/settings-DWeVUT02.js","assets/theme-color-DipcFg9a.js","assets/pages-CD0qLry_.js","assets/AnimatedWave-CPwzka9L.js","assets/Scenes-2Kp3NQ_V.js","assets/import-url-browser-D0zVIqhu.js","assets/duckdb-mvp-P5KShsBk.js","assets/Basic-6NscZoIc.js","assets/AnimatedWave-CW4ij04Q.css","assets/route-block-gWR0cCIm.js","assets/background-gradient-blending-Dc6neL0J.js","assets/browser-bFm1l1qg.js","assets/background-gradient-blending-6ss5Fg2-.css","assets/background-remove-CfzWeaPN.js","assets/transformers.web-DwlcaNlo.js","assets/InputFile-ClfQXb90.js","assets/gesture-circle-CtlpzRIp.js","assets/image-y7UfzUtG.js","assets/image-BhuwcwI9.css","assets/polaroid-gAmjoIyd.js","assets/vibrant-Byz235YP.js","assets/settings-DM_cxWPe.js","assets/IconAnimation-eACnDPFz.js","assets/airi-card-CFHe9iJm.js","assets/CardCreate-1xbHbXXu.js","assets/CardCreationDialog-gKrswwkx.js","assets/DialogTitle-DcCyxlil.js","assets/CardCreationDialog-UIvAa4Bx.css","assets/CardDetailDialog-CFL4TUGk.js","assets/DeleteCardDialog-Cb8qVSVb.js","assets/CardListItem-H_UE8PfW.js","assets/CardCreate-BgwAv5Kv.js","assets/CardCreationDialog-mu1VLVYi.js","assets/CardDetailDialog-C-yU3tpO.js","assets/CardListItem-CckqVk0d.js","assets/DeleteCardDialog-BGVlI37-.js","assets/appearance-BIDEdXyM.js","assets/color-scheme-B0eJBuo7.js","assets/color-scheme-r2m6hu6X.css","assets/developer-Bwq9EOSe.js","assets/general-DSsVebJ9.js","assets/memory-Bo9CmtPV.js","assets/models-BlSfecLY.js","assets/icon-animation-PuVIGmi0.js","assets/modules-DvaXnAgf.js","assets/consciousness-CCWI3pUe.js","assets/hearing-CP0gq0in.js","assets/memory-long-term-BXPjIM3D.js","assets/memory-short-term-D8vgusDg.js","assets/speech-DJZRaUxH.js","assets/Textarea-CQXjp80_.js","assets/providers-CNT7nN_l.js","assets/alibaba-cloud-model-studio-COHJiWXk.js","assets/anthropic-CUlO-W3r.js","assets/azure-ai-foundry-ByIXKIr5.js","assets/cloudflare-workers-ai-BipstjwR.js","assets/deepseek-cNrwxt-l.js","assets/elevenlabs-9MwHykd2.js","assets/featherless-ai-B299Ssok.js","assets/fireworks-ai-Ld2MWu8B.js","assets/google-generative-ai-DZieEaGY.js","assets/microsoft-speech-Di7D-Awi.js","assets/mistral-ai-DaM_lNzJ.js","assets/moonshot-ai-CzeRIZgw.js","assets/novita-ai-B5_QZuND.js","assets/ollama-CIvy2V5T.js","assets/openai-CcptUYcJ.js","assets/openai-audio-speech-1dVJvi78.js","assets/openai-audio-transcription-BB_pETq3.js","assets/openrouter-ai-Cy1v1-nn.js","assets/player2-Xoxrm0dX.js","assets/player2-speech-C91OFlCt.js","assets/together-ai-EVG40fRk.js","assets/volcengine-B8eQhXRx.js","assets/xai-CVd0KgMK.js","assets/scene-TS-s_kmR.js","assets/stage-CaqiKODx.js","assets/filter-message-CSSXhkMx.js","assets/delays-_8LoyGoG.js","assets/emotions-DH9tsdiE.js","assets/messages-CgceS_ap.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-BxAUVEXe.js","assets/HeaderLink-CSWG6G--.js","assets/HeaderLink-4n3ShASi.css","assets/settings-BlRMq2Zz.js","assets/theme-color-mhr1g0fO.js","assets/pages-CsEDt6j8.js","assets/AnimatedWave-Ctq8iFvb.js","assets/Scenes-ZY5GY3Yk.js","assets/import-url-browser-D0zVIqhu.js","assets/duckdb-mvp-P5KShsBk.js","assets/Basic-JYGX2D37.js","assets/AnimatedWave-CW4ij04Q.css","assets/route-block-gWR0cCIm.js","assets/background-gradient-blending-BFp2Vmjq.js","assets/browser-bFm1l1qg.js","assets/background-gradient-blending-6ss5Fg2-.css","assets/background-remove-D40tSYmj.js","assets/transformers.web-B7NywNTw.js","assets/InputFile-CrEM0anr.js","assets/gesture-circle-DTzEVNvY.js","assets/image-D_-1HjPP.js","assets/image-BhuwcwI9.css","assets/polaroid-D5obYKPu.js","assets/vibrant-BT2fm70_.js","assets/settings-QwpRJEhc.js","assets/IconAnimation-9_sNHXpR.js","assets/airi-card-Q3k0tIwN.js","assets/CardCreate-BnRABIEk.js","assets/CardCreationDialog-xeCipFWo.js","assets/DialogTitle-CaB1D00q.js","assets/CardCreationDialog-UIvAa4Bx.css","assets/CardDetailDialog-42_DgObP.js","assets/DeleteCardDialog-Bc1chq43.js","assets/CardListItem-4sQIRPZf.js","assets/CardCreate-mWaFTW4v.js","assets/CardCreationDialog-qGwMbPGi.js","assets/CardDetailDialog-B-AcpLM4.js","assets/CardListItem-DDliOhdn.js","assets/DeleteCardDialog-BdkMZt0z.js","assets/appearance-Be6MT6gl.js","assets/color-scheme-CvisfZEM.js","assets/color-scheme-r2m6hu6X.css","assets/developer-50jFEq_D.js","assets/general-yjkLwtKb.js","assets/memory-ChG-vOFt.js","assets/models-Cr3L9UFF.js","assets/icon-animation-DPHfIEG5.js","assets/modules-BEoGi95f.js","assets/consciousness-D-yG2Hnx.js","assets/hearing-HxzT9Wif.js","assets/memory-long-term-Cd4DfbOC.js","assets/memory-short-term-By6tGgIb.js","assets/speech-BkDk1gxm.js","assets/Textarea-D9rLaih7.js","assets/providers-BPXI6kVS.js","assets/alibaba-cloud-model-studio-3eKy2f7l.js","assets/anthropic-BFqros6g.js","assets/azure-ai-foundry-BUoQbmRd.js","assets/cloudflare-workers-ai-ZTPk31zu.js","assets/deepseek-Cqa3r5er.js","assets/elevenlabs-qXHu46wy.js","assets/featherless-ai-MWKHOxPl.js","assets/fireworks-ai-Ba-jqHwG.js","assets/google-generative-ai-B99V0T18.js","assets/microsoft-speech-CGGcxjek.js","assets/mistral-ai-DvCen1CG.js","assets/moonshot-ai-CHsJXWmE.js","assets/novita-ai-DnXfEx2N.js","assets/ollama-BVrnvhnT.js","assets/openai-CQDdOtKc.js","assets/openai-audio-speech-yymAjo1X.js","assets/openai-audio-transcription-irFP0VIY.js","assets/openrouter-ai--dshV5bL.js","assets/player2-D8_1xZL8.js","assets/player2-speech-3AR5_77E.js","assets/together-ai-CQqUN16J.js","assets/volcengine-Br1b00Sw.js","assets/xai-a3vK2rb5.js","assets/scene-B0dmKhyc.js","assets/stage-D8eUtIds.js","assets/filter-message-C0Hk6aB0.js","assets/delays-DIhxEe_R.js","assets/emotions-De0hw4UU.js","assets/messages-D_H5Gb5B.js"])))=>i.map(i=>d[i]); var __create=Object.create,__defProp$1=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp$1=Object.prototype.hasOwnProperty,__esmMin=(fn$5,res)=>()=>(fn$5&&(res=fn$5(fn$5=0)),res),__commonJSMin=(cb$1,mod)=>()=>(mod||cb$1((mod={exports:{}}).exports,mod),mod.exports),__export=(target$1,all$3)=>{for(var name$2 in all$3)__defProp$1(target$1,name$2,{get:all$3[name$2],enumerable:!0})},__copyProps=(to$1,from,except,desc)=>{if(from&&typeof from==`object`||typeof from==`function`)for(var keys$3=__getOwnPropNames(from),i=0,n=keys$3.length,key$2;ifrom[k$3]).bind(null,key$2),enumerable:!(desc=__getOwnPropDesc(from,key$2))||desc.enumerable});return to$1},__toESM=(mod,isNodeMode,target$1)=>(target$1=mod==null?{}:__create(__getProtoOf(mod)),__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp$1(target$1,`default`,{value:mod,enumerable:!0}):target$1,mod)),__toCommonJS=mod=>__copyProps(__defProp$1({},`__esModule`,{value:!0}),mod),__toDynamicImportESM=isNodeMode=>mod=>__toESM(mod.default,isNodeMode),__require=(x$1=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(x$1,{get:(a$1,b$1)=>(typeof require<`u`?require:a$1)[b$1]}):x$1)(function(x$1){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+x$1+"\" in an environment that doesn't expose the `require` function.")});(function(){let relList=document.createElement(`link`).relList;if(relList&&relList.supports&&relList.supports(`modulepreload`))return;for(let link$1 of document.querySelectorAll(`link[rel="modulepreload"]`))processPreload(link$1);new MutationObserver(mutations$1=>{for(let mutation of mutations$1){if(mutation.type!==`childList`)continue;for(let node$1 of mutation.addedNodes)node$1.tagName===`LINK`&&node$1.rel===`modulepreload`&&processPreload(node$1)}}).observe(document,{childList:!0,subtree:!0});function getFetchOpts(link$1){let fetchOpts={};return link$1.integrity&&(fetchOpts.integrity=link$1.integrity),link$1.referrerPolicy&&(fetchOpts.referrerPolicy=link$1.referrerPolicy),link$1.crossOrigin===`use-credentials`?fetchOpts.credentials=`include`:link$1.crossOrigin===`anonymous`?fetchOpts.credentials=`omit`:fetchOpts.credentials=`same-origin`,fetchOpts}function processPreload(link$1){if(link$1.ep)return;link$1.ep=!0;let fetchOpts=getFetchOpts(link$1);fetch(link$1.href,fetchOpts)}})(); /** * @vue/shared v3.5.18 @@ -3848,7 +3848,7 @@ void main() { }`;var WebXRDepthSensing=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(depthData,renderState){if(this.texture===null){let texture=new ExternalTexture(depthData.texture);(depthData.depthNear!==renderState.depthNear||depthData.depthFar!==renderState.depthFar)&&(this.depthNear=depthData.depthNear,this.depthFar=depthData.depthFar),this.texture=texture}}getMesh(cameraXR){if(this.texture!==null&&this.mesh===null){let viewport=cameraXR.cameras[0].viewport,material=new ShaderMaterial({vertexShader:_occlusion_vertex,fragmentShader:_occlusion_fragment,uniforms:{depthColor:{value:this.texture},depthWidth:{value:viewport.z},depthHeight:{value:viewport.w}}});this.mesh=new Mesh(new PlaneGeometry(20,20),material)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},WebXRManager=class extends EventDispatcher{constructor(renderer$1,gl){super();let scope$1=this,session=null,framebufferScaleFactor=1,referenceSpace=null,referenceSpaceType=`local-floor`,foveation=1,customReferenceSpace=null,pose=null,glBinding=null,glProjLayer=null,glBaseLayer=null,xrFrame=null,depthSensing=new WebXRDepthSensing,cameraAccessTextures={},attributes=gl.getContextAttributes(),initialRenderTarget=null,newRenderTarget=null,controllers=[],controllerInputSources=[],currentSize=new Vector2,currentPixelRatio=null,cameraL=new PerspectiveCamera;cameraL.viewport=new Vector4;let cameraR=new PerspectiveCamera;cameraR.viewport=new Vector4;let cameras=[cameraL,cameraR],cameraXR=new ArrayCamera,_currentDepthNear=null,_currentDepthFar=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(index$1){let controller=controllers[index$1];return controller===void 0&&(controller=new WebXRController,controllers[index$1]=controller),controller.getTargetRaySpace()},this.getControllerGrip=function(index$1){let controller=controllers[index$1];return controller===void 0&&(controller=new WebXRController,controllers[index$1]=controller),controller.getGripSpace()},this.getHand=function(index$1){let controller=controllers[index$1];return controller===void 0&&(controller=new WebXRController,controllers[index$1]=controller),controller.getHandSpace()};function onSessionEvent(event){let controllerIndex=controllerInputSources.indexOf(event.inputSource);if(controllerIndex===-1)return;let controller=controllers[controllerIndex];controller!==void 0&&(controller.update(event.inputSource,event.frame,customReferenceSpace||referenceSpace),controller.dispatchEvent({type:event.type,data:event.inputSource}))}function onSessionEnd(){session.removeEventListener(`select`,onSessionEvent),session.removeEventListener(`selectstart`,onSessionEvent),session.removeEventListener(`selectend`,onSessionEvent),session.removeEventListener(`squeeze`,onSessionEvent),session.removeEventListener(`squeezestart`,onSessionEvent),session.removeEventListener(`squeezeend`,onSessionEvent),session.removeEventListener(`end`,onSessionEnd),session.removeEventListener(`inputsourceschange`,onInputSourcesChange);for(let i=0;i=0&&(controllerInputSources[index$1]=null,controllers[index$1].disconnect(inputSource))}for(let i=0;i=controllerInputSources.length){controllerInputSources.push(inputSource),controllerIndex=i$1;break}else if(controllerInputSources[i$1]===null){controllerInputSources[i$1]=inputSource,controllerIndex=i$1;break}if(controllerIndex===-1)break}let controller=controllers[controllerIndex];controller&&controller.connect(inputSource)}}let cameraLPos=new Vector3,cameraRPos=new Vector3;function setProjectionFromUnion(camera,cameraL$1,cameraR$1){cameraLPos.setFromMatrixPosition(cameraL$1.matrixWorld),cameraRPos.setFromMatrixPosition(cameraR$1.matrixWorld);let ipd=cameraLPos.distanceTo(cameraRPos),projL=cameraL$1.projectionMatrix.elements,projR=cameraR$1.projectionMatrix.elements,near=projL[14]/(projL[10]-1),far=projL[14]/(projL[10]+1),topFov=(projL[9]+1)/projL[5],bottomFov=(projL[9]-1)/projL[5],leftFov=(projL[8]-1)/projL[0],rightFov=(projR[8]+1)/projR[0],left=near*leftFov,right=near*rightFov,zOffset=ipd/(-leftFov+rightFov),xOffset=zOffset*-leftFov;if(cameraL$1.matrixWorld.decompose(camera.position,camera.quaternion,camera.scale),camera.translateX(xOffset),camera.translateZ(zOffset),camera.matrixWorld.compose(camera.position,camera.quaternion,camera.scale),camera.matrixWorldInverse.copy(camera.matrixWorld).invert(),projL[10]===-1)camera.projectionMatrix.copy(cameraL$1.projectionMatrix),camera.projectionMatrixInverse.copy(cameraL$1.projectionMatrixInverse);else{let near2=near+zOffset,far2=far+zOffset,left2=left-xOffset,right2=right+(ipd-xOffset),top2=topFov*far/far2*near2,bottom2=bottomFov*far/far2*near2;camera.projectionMatrix.makePerspective(left2,right2,top2,bottom2,near2,far2),camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert()}}function updateCamera(camera,parent){parent===null?camera.matrixWorld.copy(camera.matrix):camera.matrixWorld.multiplyMatrices(parent.matrixWorld,camera.matrix),camera.matrixWorldInverse.copy(camera.matrixWorld).invert()}this.updateCamera=function(camera){if(session===null)return;let depthNear=camera.near,depthFar=camera.far;depthSensing.texture!==null&&(depthSensing.depthNear>0&&(depthNear=depthSensing.depthNear),depthSensing.depthFar>0&&(depthFar=depthSensing.depthFar)),cameraXR.near=cameraR.near=cameraL.near=depthNear,cameraXR.far=cameraR.far=cameraL.far=depthFar,(_currentDepthNear!==cameraXR.near||_currentDepthFar!==cameraXR.far)&&(session.updateRenderState({depthNear:cameraXR.near,depthFar:cameraXR.far}),_currentDepthNear=cameraXR.near,_currentDepthFar=cameraXR.far),cameraXR.layers.mask=camera.layers.mask|6,cameraL.layers.mask=cameraXR.layers.mask&3,cameraR.layers.mask=cameraXR.layers.mask&5;let parent=camera.parent,cameras$1=cameraXR.cameras;updateCamera(cameraXR,parent);for(let i=0;i0&&(uniforms.alphaTest.value=material.alphaTest);let materialProperties=properties.get(material),envMap=materialProperties.envMap,envMapRotation=materialProperties.envMapRotation;envMap&&(uniforms.envMap.value=envMap,_e1.copy(envMapRotation),_e1.x*=-1,_e1.y*=-1,_e1.z*=-1,envMap.isCubeTexture&&envMap.isRenderTargetTexture===!1&&(_e1.y*=-1,_e1.z*=-1),uniforms.envMapRotation.value.setFromMatrix4(_m1.makeRotationFromEuler(_e1)),uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===!1?-1:1,uniforms.reflectivity.value=material.reflectivity,uniforms.ior.value=material.ior,uniforms.refractionRatio.value=material.refractionRatio),material.lightMap&&(uniforms.lightMap.value=material.lightMap,uniforms.lightMapIntensity.value=material.lightMapIntensity,refreshTransformUniform(material.lightMap,uniforms.lightMapTransform)),material.aoMap&&(uniforms.aoMap.value=material.aoMap,uniforms.aoMapIntensity.value=material.aoMapIntensity,refreshTransformUniform(material.aoMap,uniforms.aoMapTransform))}function refreshUniformsLine(uniforms,material){uniforms.diffuse.value.copy(material.color),uniforms.opacity.value=material.opacity,material.map&&(uniforms.map.value=material.map,refreshTransformUniform(material.map,uniforms.mapTransform))}function refreshUniformsDash(uniforms,material){uniforms.dashSize.value=material.dashSize,uniforms.totalSize.value=material.dashSize+material.gapSize,uniforms.scale.value=material.scale}function refreshUniformsPoints(uniforms,material,pixelRatio,height){uniforms.diffuse.value.copy(material.color),uniforms.opacity.value=material.opacity,uniforms.size.value=material.size*pixelRatio,uniforms.scale.value=height*.5,material.map&&(uniforms.map.value=material.map,refreshTransformUniform(material.map,uniforms.uvTransform)),material.alphaMap&&(uniforms.alphaMap.value=material.alphaMap,refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)),material.alphaTest>0&&(uniforms.alphaTest.value=material.alphaTest)}function refreshUniformsSprites(uniforms,material){uniforms.diffuse.value.copy(material.color),uniforms.opacity.value=material.opacity,uniforms.rotation.value=material.rotation,material.map&&(uniforms.map.value=material.map,refreshTransformUniform(material.map,uniforms.mapTransform)),material.alphaMap&&(uniforms.alphaMap.value=material.alphaMap,refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)),material.alphaTest>0&&(uniforms.alphaTest.value=material.alphaTest)}function refreshUniformsPhong(uniforms,material){uniforms.specular.value.copy(material.specular),uniforms.shininess.value=Math.max(material.shininess,1e-4)}function refreshUniformsToon(uniforms,material){material.gradientMap&&(uniforms.gradientMap.value=material.gradientMap)}function refreshUniformsStandard(uniforms,material){uniforms.metalness.value=material.metalness,material.metalnessMap&&(uniforms.metalnessMap.value=material.metalnessMap,refreshTransformUniform(material.metalnessMap,uniforms.metalnessMapTransform)),uniforms.roughness.value=material.roughness,material.roughnessMap&&(uniforms.roughnessMap.value=material.roughnessMap,refreshTransformUniform(material.roughnessMap,uniforms.roughnessMapTransform)),material.envMap&&(uniforms.envMapIntensity.value=material.envMapIntensity)}function refreshUniformsPhysical(uniforms,material,transmissionRenderTarget){uniforms.ior.value=material.ior,material.sheen>0&&(uniforms.sheenColor.value.copy(material.sheenColor).multiplyScalar(material.sheen),uniforms.sheenRoughness.value=material.sheenRoughness,material.sheenColorMap&&(uniforms.sheenColorMap.value=material.sheenColorMap,refreshTransformUniform(material.sheenColorMap,uniforms.sheenColorMapTransform)),material.sheenRoughnessMap&&(uniforms.sheenRoughnessMap.value=material.sheenRoughnessMap,refreshTransformUniform(material.sheenRoughnessMap,uniforms.sheenRoughnessMapTransform))),material.clearcoat>0&&(uniforms.clearcoat.value=material.clearcoat,uniforms.clearcoatRoughness.value=material.clearcoatRoughness,material.clearcoatMap&&(uniforms.clearcoatMap.value=material.clearcoatMap,refreshTransformUniform(material.clearcoatMap,uniforms.clearcoatMapTransform)),material.clearcoatRoughnessMap&&(uniforms.clearcoatRoughnessMap.value=material.clearcoatRoughnessMap,refreshTransformUniform(material.clearcoatRoughnessMap,uniforms.clearcoatRoughnessMapTransform)),material.clearcoatNormalMap&&(uniforms.clearcoatNormalMap.value=material.clearcoatNormalMap,refreshTransformUniform(material.clearcoatNormalMap,uniforms.clearcoatNormalMapTransform),uniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale),material.side===BackSide&&uniforms.clearcoatNormalScale.value.negate())),material.dispersion>0&&(uniforms.dispersion.value=material.dispersion),material.iridescence>0&&(uniforms.iridescence.value=material.iridescence,uniforms.iridescenceIOR.value=material.iridescenceIOR,uniforms.iridescenceThicknessMinimum.value=material.iridescenceThicknessRange[0],uniforms.iridescenceThicknessMaximum.value=material.iridescenceThicknessRange[1],material.iridescenceMap&&(uniforms.iridescenceMap.value=material.iridescenceMap,refreshTransformUniform(material.iridescenceMap,uniforms.iridescenceMapTransform)),material.iridescenceThicknessMap&&(uniforms.iridescenceThicknessMap.value=material.iridescenceThicknessMap,refreshTransformUniform(material.iridescenceThicknessMap,uniforms.iridescenceThicknessMapTransform))),material.transmission>0&&(uniforms.transmission.value=material.transmission,uniforms.transmissionSamplerMap.value=transmissionRenderTarget.texture,uniforms.transmissionSamplerSize.value.set(transmissionRenderTarget.width,transmissionRenderTarget.height),material.transmissionMap&&(uniforms.transmissionMap.value=material.transmissionMap,refreshTransformUniform(material.transmissionMap,uniforms.transmissionMapTransform)),uniforms.thickness.value=material.thickness,material.thicknessMap&&(uniforms.thicknessMap.value=material.thicknessMap,refreshTransformUniform(material.thicknessMap,uniforms.thicknessMapTransform)),uniforms.attenuationDistance.value=material.attenuationDistance,uniforms.attenuationColor.value.copy(material.attenuationColor)),material.anisotropy>0&&(uniforms.anisotropyVector.value.set(material.anisotropy*Math.cos(material.anisotropyRotation),material.anisotropy*Math.sin(material.anisotropyRotation)),material.anisotropyMap&&(uniforms.anisotropyMap.value=material.anisotropyMap,refreshTransformUniform(material.anisotropyMap,uniforms.anisotropyMapTransform))),uniforms.specularIntensity.value=material.specularIntensity,uniforms.specularColor.value.copy(material.specularColor),material.specularColorMap&&(uniforms.specularColorMap.value=material.specularColorMap,refreshTransformUniform(material.specularColorMap,uniforms.specularColorMapTransform)),material.specularIntensityMap&&(uniforms.specularIntensityMap.value=material.specularIntensityMap,refreshTransformUniform(material.specularIntensityMap,uniforms.specularIntensityMapTransform))}function refreshUniformsMatcap(uniforms,material){material.matcap&&(uniforms.matcap.value=material.matcap)}function refreshUniformsDistance(uniforms,material){let light=properties.get(material).light;uniforms.referencePosition.value.setFromMatrixPosition(light.matrixWorld),uniforms.nearDistance.value=light.shadow.camera.near,uniforms.farDistance.value=light.shadow.camera.far}return{refreshFogUniforms,refreshMaterialUniforms}}function WebGLUniformsGroups(gl,info,capabilities,state){let buffers={},updateList={},allocatedBindingPoints=[],maxBindingPoints=gl.getParameter(gl.MAX_UNIFORM_BUFFER_BINDINGS);function bind(uniformsGroup,program){let webglProgram=program.program;state.uniformBlockBinding(uniformsGroup,webglProgram)}function update(uniformsGroup,program){let buffer$1=buffers[uniformsGroup.id];buffer$1===void 0&&(prepareUniformsGroup(uniformsGroup),buffer$1=createBuffer(uniformsGroup),buffers[uniformsGroup.id]=buffer$1,uniformsGroup.addEventListener(`dispose`,onUniformsGroupsDispose));let webglProgram=program.program;state.updateUBOMapping(uniformsGroup,webglProgram);let frame$1=info.render.frame;updateList[uniformsGroup.id]!==frame$1&&(updateBufferData(uniformsGroup),updateList[uniformsGroup.id]=frame$1)}function createBuffer(uniformsGroup){let bindingPointIndex=allocateBindingPointIndex();uniformsGroup.__bindingPointIndex=bindingPointIndex;let buffer$1=gl.createBuffer(),size$2=uniformsGroup.__size,usage=uniformsGroup.usage;return gl.bindBuffer(gl.UNIFORM_BUFFER,buffer$1),gl.bufferData(gl.UNIFORM_BUFFER,size$2,usage),gl.bindBuffer(gl.UNIFORM_BUFFER,null),gl.bindBufferBase(gl.UNIFORM_BUFFER,bindingPointIndex,buffer$1),buffer$1}function allocateBindingPointIndex(){for(let i=0;i0&&(offset$2+=chunkSize-chunkOffset),uniformsGroup.__size=offset$2,uniformsGroup.__cache={},this}function getUniformSize(value$1){let info$1={boundary:0,storage:0};return typeof value$1==`number`||typeof value$1==`boolean`?(info$1.boundary=4,info$1.storage=4):value$1.isVector2?(info$1.boundary=8,info$1.storage=8):value$1.isVector3||value$1.isColor?(info$1.boundary=16,info$1.storage=12):value$1.isVector4?(info$1.boundary=16,info$1.storage=16):value$1.isMatrix3?(info$1.boundary=48,info$1.storage=48):value$1.isMatrix4?(info$1.boundary=64,info$1.storage=64):value$1.isTexture?console.warn(`THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.`):console.warn(`THREE.WebGLRenderer: Unsupported uniform value type.`,value$1),info$1}function onUniformsGroupsDispose(event){let uniformsGroup=event.target;uniformsGroup.removeEventListener(`dispose`,onUniformsGroupsDispose);let index$1=allocatedBindingPoints.indexOf(uniformsGroup.__bindingPointIndex);allocatedBindingPoints.splice(index$1,1),gl.deleteBuffer(buffers[uniformsGroup.id]),delete buffers[uniformsGroup.id],delete updateList[uniformsGroup.id]}function dispose$1(){for(let id in buffers)gl.deleteBuffer(buffers[id]);allocatedBindingPoints=[],buffers={},updateList={}}return{bind,update,dispose:dispose$1}}var WebGLRenderer=class{constructor(parameters={}){let{canvas=createCanvasElement(),context:context$1=null,depth=!0,stencil=!1,alpha:alpha$1=!1,antialias=!1,premultipliedAlpha=!0,preserveDrawingBuffer=!1,powerPreference=`default`,failIfMajorPerformanceCaveat=!1,reversedDepthBuffer=!1}=parameters;this.isWebGLRenderer=!0;let _alpha;if(context$1!==null){if(typeof WebGLRenderingContext<`u`&&context$1 instanceof WebGLRenderingContext)throw Error(`THREE.WebGLRenderer: WebGL 1 is not supported since r163.`);_alpha=context$1.getContextAttributes().alpha}else _alpha=alpha$1;let uintClearColor=new Uint32Array(4),intClearColor=new Int32Array(4),currentRenderList=null,currentRenderState=null,renderListStack=[],renderStateStack=[];this.domElement=canvas,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=NoToneMapping,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let _this=this,_isContextLost=!1;this._outputColorSpace=SRGBColorSpace;let _currentActiveCubeFace=0,_currentActiveMipmapLevel=0,_currentRenderTarget=null,_currentMaterialId=-1,_currentCamera=null,_currentViewport=new Vector4,_currentScissor=new Vector4,_currentScissorTest=null,_currentClearColor=new Color(0),_currentClearAlpha=0,_width=canvas.width,_height=canvas.height,_pixelRatio=1,_opaqueSort=null,_transparentSort=null,_viewport=new Vector4(0,0,_width,_height),_scissor=new Vector4(0,0,_width,_height),_scissorTest=!1,_frustum$2=new Frustum,_clippingEnabled=!1,_localClippingEnabled=!1,_projScreenMatrix$3=new Matrix4,_vector3$1=new Vector3,_vector4=new Vector4,_emptyScene={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},_renderBackground=!1;function getTargetPixelRatio(){return _currentRenderTarget===null?_pixelRatio:1}let _gl=context$1;function getContext$1(contextName,contextAttributes){return canvas.getContext(contextName,contextAttributes)}try{let contextAttributes={alpha:!0,depth,stencil,antialias,premultipliedAlpha,preserveDrawingBuffer,powerPreference,failIfMajorPerformanceCaveat};if(`setAttribute`in canvas&&canvas.setAttribute(`data-engine`,`three.js r${REVISION}`),canvas.addEventListener(`webglcontextlost`,onContextLost,!1),canvas.addEventListener(`webglcontextrestored`,onContextRestore,!1),canvas.addEventListener(`webglcontextcreationerror`,onContextCreationError,!1),_gl===null){let contextName=`webgl2`;if(_gl=getContext$1(contextName,contextAttributes),_gl===null)throw getContext$1(contextName)?Error(`Error creating WebGL context with your selected attributes.`):Error(`Error creating WebGL context.`)}}catch(error){throw console.error(`THREE.WebGLRenderer: `+error.message),error}let extensions,capabilities,state,info,properties,textures,cubemaps,cubeuvmaps,attributes,geometries,objects,programCache,materials,renderLists,renderStates,clipping,shadowMap,background,morphtargets,bufferRenderer,indexedBufferRenderer,utils$1,bindingStates,uniformsGroups;function initGLContext(){extensions=new WebGLExtensions(_gl),extensions.init(),utils$1=new WebGLUtils(_gl,extensions),capabilities=new WebGLCapabilities(_gl,extensions,parameters,utils$1),state=new WebGLState(_gl,extensions),capabilities.reversedDepthBuffer&&reversedDepthBuffer&&state.buffers.depth.setReversed(!0),info=new WebGLInfo(_gl),properties=new WebGLProperties,textures=new WebGLTextures(_gl,extensions,state,properties,capabilities,utils$1,info),cubemaps=new WebGLCubeMaps(_this),cubeuvmaps=new WebGLCubeUVMaps(_this),attributes=new WebGLAttributes(_gl),bindingStates=new WebGLBindingStates(_gl,attributes),geometries=new WebGLGeometries(_gl,attributes,info,bindingStates),objects=new WebGLObjects(_gl,geometries,attributes,info),morphtargets=new WebGLMorphtargets(_gl,capabilities,textures),clipping=new WebGLClipping(properties),programCache=new WebGLPrograms(_this,cubemaps,cubeuvmaps,extensions,capabilities,bindingStates,clipping),materials=new WebGLMaterials(_this,properties),renderLists=new WebGLRenderLists,renderStates=new WebGLRenderStates(extensions),background=new WebGLBackground(_this,cubemaps,cubeuvmaps,state,objects,_alpha,premultipliedAlpha),shadowMap=new WebGLShadowMap(_this,objects,capabilities),uniformsGroups=new WebGLUniformsGroups(_gl,info,capabilities,state),bufferRenderer=new WebGLBufferRenderer(_gl,extensions,info),indexedBufferRenderer=new WebGLIndexedBufferRenderer(_gl,extensions,info),info.programs=programCache.programs,_this.capabilities=capabilities,_this.extensions=extensions,_this.properties=properties,_this.renderLists=renderLists,_this.shadowMap=shadowMap,_this.state=state,_this.info=info}initGLContext();let xr$1=new WebXRManager(_this,_gl);this.xr=xr$1,this.getContext=function(){return _gl},this.getContextAttributes=function(){return _gl.getContextAttributes()},this.forceContextLoss=function(){let extension$1=extensions.get(`WEBGL_lose_context`);extension$1&&extension$1.loseContext()},this.forceContextRestore=function(){let extension$1=extensions.get(`WEBGL_lose_context`);extension$1&&extension$1.restoreContext()},this.getPixelRatio=function(){return _pixelRatio},this.setPixelRatio=function(value$1){value$1!==void 0&&(_pixelRatio=value$1,this.setSize(_width,_height,!1))},this.getSize=function(target$1){return target$1.set(_width,_height)},this.setSize=function(width,height,updateStyle=!0){if(xr$1.isPresenting){console.warn(`THREE.WebGLRenderer: Can't change size while VR device is presenting.`);return}_width=width,_height=height,canvas.width=Math.floor(width*_pixelRatio),canvas.height=Math.floor(height*_pixelRatio),updateStyle===!0&&(canvas.style.width=width+`px`,canvas.style.height=height+`px`),this.setViewport(0,0,width,height)},this.getDrawingBufferSize=function(target$1){return target$1.set(_width*_pixelRatio,_height*_pixelRatio).floor()},this.setDrawingBufferSize=function(width,height,pixelRatio){_width=width,_height=height,_pixelRatio=pixelRatio,canvas.width=Math.floor(width*pixelRatio),canvas.height=Math.floor(height*pixelRatio),this.setViewport(0,0,width,height)},this.getCurrentViewport=function(target$1){return target$1.copy(_currentViewport)},this.getViewport=function(target$1){return target$1.copy(_viewport)},this.setViewport=function(x$1,y,width,height){x$1.isVector4?_viewport.set(x$1.x,x$1.y,x$1.z,x$1.w):_viewport.set(x$1,y,width,height),state.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).round())},this.getScissor=function(target$1){return target$1.copy(_scissor)},this.setScissor=function(x$1,y,width,height){x$1.isVector4?_scissor.set(x$1.x,x$1.y,x$1.z,x$1.w):_scissor.set(x$1,y,width,height),state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).round())},this.getScissorTest=function(){return _scissorTest},this.setScissorTest=function(boolean$3){state.setScissorTest(_scissorTest=boolean$3)},this.setOpaqueSort=function(method){_opaqueSort=method},this.setTransparentSort=function(method){_transparentSort=method},this.getClearColor=function(target$1){return target$1.copy(background.getClearColor())},this.setClearColor=function(){background.setClearColor(...arguments)},this.getClearAlpha=function(){return background.getClearAlpha()},this.setClearAlpha=function(){background.setClearAlpha(...arguments)},this.clear=function(color$2=!0,depth$1=!0,stencil$1=!0){let bits=0;if(color$2){let isIntegerFormat=!1;if(_currentRenderTarget!==null){let targetFormat=_currentRenderTarget.texture.format;isIntegerFormat=targetFormat===RGBAIntegerFormat||targetFormat===RGIntegerFormat||targetFormat===RedIntegerFormat}if(isIntegerFormat){let targetType=_currentRenderTarget.texture.type,isUnsignedType=targetType===UnsignedByteType||targetType===UnsignedIntType||targetType===UnsignedShortType||targetType===UnsignedInt248Type||targetType===UnsignedShort4444Type||targetType===UnsignedShort5551Type,clearColor=background.getClearColor(),a$1=background.getClearAlpha(),r$1=clearColor.r,g=clearColor.g,b$1=clearColor.b;isUnsignedType?(uintClearColor[0]=r$1,uintClearColor[1]=g,uintClearColor[2]=b$1,uintClearColor[3]=a$1,_gl.clearBufferuiv(_gl.COLOR,0,uintClearColor)):(intClearColor[0]=r$1,intClearColor[1]=g,intClearColor[2]=b$1,intClearColor[3]=a$1,_gl.clearBufferiv(_gl.COLOR,0,intClearColor))}else bits|=_gl.COLOR_BUFFER_BIT}depth$1&&(bits|=_gl.DEPTH_BUFFER_BIT),stencil$1&&(bits|=_gl.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),_gl.clear(bits)},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(){canvas.removeEventListener(`webglcontextlost`,onContextLost,!1),canvas.removeEventListener(`webglcontextrestored`,onContextRestore,!1),canvas.removeEventListener(`webglcontextcreationerror`,onContextCreationError,!1),background.dispose(),renderLists.dispose(),renderStates.dispose(),properties.dispose(),cubemaps.dispose(),cubeuvmaps.dispose(),objects.dispose(),bindingStates.dispose(),uniformsGroups.dispose(),programCache.dispose(),xr$1.dispose(),xr$1.removeEventListener(`sessionstart`,onXRSessionStart),xr$1.removeEventListener(`sessionend`,onXRSessionEnd),animation.stop()};function onContextLost(event){event.preventDefault(),console.log(`THREE.WebGLRenderer: Context Lost.`),_isContextLost=!0}function onContextRestore(){console.log(`THREE.WebGLRenderer: Context Restored.`),_isContextLost=!1;let infoAutoReset=info.autoReset,shadowMapEnabled=shadowMap.enabled,shadowMapAutoUpdate=shadowMap.autoUpdate,shadowMapNeedsUpdate=shadowMap.needsUpdate,shadowMapType=shadowMap.type;initGLContext(),info.autoReset=infoAutoReset,shadowMap.enabled=shadowMapEnabled,shadowMap.autoUpdate=shadowMapAutoUpdate,shadowMap.needsUpdate=shadowMapNeedsUpdate,shadowMap.type=shadowMapType}function onContextCreationError(event){console.error(`THREE.WebGLRenderer: A WebGL context could not be created. Reason: `,event.statusMessage)}function onMaterialDispose(event){let material=event.target;material.removeEventListener(`dispose`,onMaterialDispose),deallocateMaterial(material)}function deallocateMaterial(material){releaseMaterialProgramReferences(material),properties.remove(material)}function releaseMaterialProgramReferences(material){let programs=properties.get(material).programs;programs!==void 0&&(programs.forEach(function(program){programCache.releaseProgram(program)}),material.isShaderMaterial&&programCache.releaseShaderCache(material))}this.renderBufferDirect=function(camera,scene,geometry,material,object$1,group){scene===null&&(scene=_emptyScene);let frontFaceCW=object$1.isMesh&&object$1.matrixWorld.determinant()<0,program=setProgram(camera,scene,geometry,material,object$1);state.setMaterial(material,frontFaceCW);let index$1=geometry.index,rangeFactor=1;if(material.wireframe===!0){if(index$1=geometries.getWireframeAttribute(geometry),index$1===void 0)return;rangeFactor=2}let drawRange=geometry.drawRange,position$2=geometry.attributes.position,drawStart=drawRange.start*rangeFactor,drawEnd=(drawRange.start+drawRange.count)*rangeFactor;group!==null&&(drawStart=Math.max(drawStart,group.start*rangeFactor),drawEnd=Math.min(drawEnd,(group.start+group.count)*rangeFactor)),index$1===null?position$2!=null&&(drawStart=Math.max(drawStart,0),drawEnd=Math.min(drawEnd,position$2.count)):(drawStart=Math.max(drawStart,0),drawEnd=Math.min(drawEnd,index$1.count));let drawCount=drawEnd-drawStart;if(drawCount<0||drawCount===1/0)return;bindingStates.setup(object$1,material,program,geometry,index$1);let attribute,renderer$1=bufferRenderer;if(index$1!==null&&(attribute=attributes.get(index$1),renderer$1=indexedBufferRenderer,renderer$1.setIndex(attribute)),object$1.isMesh)material.wireframe===!0?(state.setLineWidth(material.wireframeLinewidth*getTargetPixelRatio()),renderer$1.setMode(_gl.LINES)):renderer$1.setMode(_gl.TRIANGLES);else if(object$1.isLine){let lineWidth=material.linewidth;lineWidth===void 0&&(lineWidth=1),state.setLineWidth(lineWidth*getTargetPixelRatio()),object$1.isLineSegments?renderer$1.setMode(_gl.LINES):object$1.isLineLoop?renderer$1.setMode(_gl.LINE_LOOP):renderer$1.setMode(_gl.LINE_STRIP)}else object$1.isPoints?renderer$1.setMode(_gl.POINTS):object$1.isSprite&&renderer$1.setMode(_gl.TRIANGLES);if(object$1.isBatchedMesh)if(object$1._multiDrawInstances!==null)warnOnce$1(`THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.`),renderer$1.renderMultiDrawInstances(object$1._multiDrawStarts,object$1._multiDrawCounts,object$1._multiDrawCount,object$1._multiDrawInstances);else if(extensions.get(`WEBGL_multi_draw`))renderer$1.renderMultiDraw(object$1._multiDrawStarts,object$1._multiDrawCounts,object$1._multiDrawCount);else{let starts=object$1._multiDrawStarts,counts=object$1._multiDrawCounts,drawCount$1=object$1._multiDrawCount,bytesPerElement=index$1?attributes.get(index$1).bytesPerElement:1,uniforms=properties.get(material).currentProgram.getUniforms();for(let i=0;i{function checkMaterialsReady(){if(materials$1.forEach(function(material){let materialProperties=properties.get(material),program=materialProperties.currentProgram;program.isReady()&&materials$1.delete(material)}),materials$1.size===0){resolve$1(scene);return}setTimeout(checkMaterialsReady,10)}extensions.get(`KHR_parallel_shader_compile`)===null?setTimeout(checkMaterialsReady,10):checkMaterialsReady()})};let onAnimationFrameCallback=null;function onAnimationFrame(time$2){onAnimationFrameCallback&&onAnimationFrameCallback(time$2)}function onXRSessionStart(){animation.stop()}function onXRSessionEnd(){animation.start()}let animation=new WebGLAnimation;animation.setAnimationLoop(onAnimationFrame),typeof self<`u`&&animation.setContext(self),this.setAnimationLoop=function(callback){onAnimationFrameCallback=callback,xr$1.setAnimationLoop(callback),callback===null?animation.stop():animation.start()},xr$1.addEventListener(`sessionstart`,onXRSessionStart),xr$1.addEventListener(`sessionend`,onXRSessionEnd),this.render=function(scene,camera){if(camera!==void 0&&camera.isCamera!==!0){console.error(`THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.`);return}if(_isContextLost===!0)return;if(scene.matrixWorldAutoUpdate===!0&&scene.updateMatrixWorld(),camera.parent===null&&camera.matrixWorldAutoUpdate===!0&&camera.updateMatrixWorld(),xr$1.enabled===!0&&xr$1.isPresenting===!0&&(xr$1.cameraAutoUpdate===!0&&xr$1.updateCamera(camera),camera=xr$1.getCamera()),scene.isScene===!0&&scene.onBeforeRender(_this,scene,camera,_currentRenderTarget),currentRenderState=renderStates.get(scene,renderStateStack.length),currentRenderState.init(camera),renderStateStack.push(currentRenderState),_projScreenMatrix$3.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse),_frustum$2.setFromProjectionMatrix(_projScreenMatrix$3,WebGLCoordinateSystem,camera.reversedDepth),_localClippingEnabled=this.localClippingEnabled,_clippingEnabled=clipping.init(this.clippingPlanes,_localClippingEnabled),currentRenderList=renderLists.get(scene,renderListStack.length),currentRenderList.init(),renderListStack.push(currentRenderList),xr$1.enabled===!0&&xr$1.isPresenting===!0){let depthSensingMesh=_this.xr.getDepthSensingMesh();depthSensingMesh!==null&&projectObject(depthSensingMesh,camera,-1/0,_this.sortObjects)}projectObject(scene,camera,0,_this.sortObjects),currentRenderList.finish(),_this.sortObjects===!0&¤tRenderList.sort(_opaqueSort,_transparentSort),_renderBackground=xr$1.enabled===!1||xr$1.isPresenting===!1||xr$1.hasDepthSensing()===!1,_renderBackground&&background.addToRenderList(currentRenderList,scene),this.info.render.frame++,_clippingEnabled===!0&&clipping.beginShadows();let shadowsArray=currentRenderState.state.shadowsArray;shadowMap.render(shadowsArray,scene,camera),_clippingEnabled===!0&&clipping.endShadows(),this.info.autoReset===!0&&this.info.reset();let opaqueObjects=currentRenderList.opaque,transmissiveObjects=currentRenderList.transmissive;if(currentRenderState.setupLights(),camera.isArrayCamera){let cameras=camera.cameras;if(transmissiveObjects.length>0)for(let i=0,l=cameras.length;i0&&renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera),_renderBackground&&background.render(scene),renderScene(currentRenderList,scene,camera);_currentRenderTarget!==null&&_currentActiveMipmapLevel===0&&(textures.updateMultisampleRenderTarget(_currentRenderTarget),textures.updateRenderTargetMipmap(_currentRenderTarget)),scene.isScene===!0&&scene.onAfterRender(_this,scene,camera),bindingStates.resetDefaultState(),_currentMaterialId=-1,_currentCamera=null,renderStateStack.pop(),renderStateStack.length>0?(currentRenderState=renderStateStack[renderStateStack.length-1],_clippingEnabled===!0&&clipping.setGlobalState(_this.clippingPlanes,currentRenderState.state.camera)):currentRenderState=null,renderListStack.pop(),currentRenderList=renderListStack.length>0?renderListStack[renderListStack.length-1]:null};function projectObject(object$1,camera,groupOrder,sortObjects){if(object$1.visible===!1)return;let visible=object$1.layers.test(camera.layers);if(visible){if(object$1.isGroup)groupOrder=object$1.renderOrder;else if(object$1.isLOD)object$1.autoUpdate===!0&&object$1.update(camera);else if(object$1.isLight)currentRenderState.pushLight(object$1),object$1.castShadow&¤tRenderState.pushShadow(object$1);else if(object$1.isSprite){if(!object$1.frustumCulled||_frustum$2.intersectsSprite(object$1)){sortObjects&&_vector4.setFromMatrixPosition(object$1.matrixWorld).applyMatrix4(_projScreenMatrix$3);let geometry=objects.update(object$1),material=object$1.material;material.visible&¤tRenderList.push(object$1,geometry,material,groupOrder,_vector4.z,null)}}else if((object$1.isMesh||object$1.isLine||object$1.isPoints)&&(!object$1.frustumCulled||_frustum$2.intersectsObject(object$1))){let geometry=objects.update(object$1),material=object$1.material;if(sortObjects&&(object$1.boundingSphere===void 0?(geometry.boundingSphere===null&&geometry.computeBoundingSphere(),_vector4.copy(geometry.boundingSphere.center)):(object$1.boundingSphere===null&&object$1.computeBoundingSphere(),_vector4.copy(object$1.boundingSphere.center)),_vector4.applyMatrix4(object$1.matrixWorld).applyMatrix4(_projScreenMatrix$3)),Array.isArray(material)){let groups=geometry.groups;for(let i=0,l=groups.length;i0&&renderObjects(opaqueObjects,scene,camera),transmissiveObjects.length>0&&renderObjects(transmissiveObjects,scene,camera),transparentObjects.length>0&&renderObjects(transparentObjects,scene,camera),state.buffers.depth.setTest(!0),state.buffers.depth.setMask(!0),state.buffers.color.setMask(!0),state.setPolygonOffset(!1)}function renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera){let overrideMaterial=scene.isScene===!0?scene.overrideMaterial:null;if(overrideMaterial!==null)return;currentRenderState.state.transmissionRenderTarget[camera.id]===void 0&&(currentRenderState.state.transmissionRenderTarget[camera.id]=new WebGLRenderTarget(1,1,{generateMipmaps:!0,type:extensions.has(`EXT_color_buffer_half_float`)||extensions.has(`EXT_color_buffer_float`)?HalfFloatType:UnsignedByteType,minFilter:LinearMipmapLinearFilter,samples:4,stencilBuffer:stencil,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ColorManagement.workingColorSpace}));let transmissionRenderTarget=currentRenderState.state.transmissionRenderTarget[camera.id],activeViewport=camera.viewport||_currentViewport;transmissionRenderTarget.setSize(activeViewport.z*_this.transmissionResolutionScale,activeViewport.w*_this.transmissionResolutionScale);let currentRenderTarget=_this.getRenderTarget(),currentActiveCubeFace=_this.getActiveCubeFace(),currentActiveMipmapLevel=_this.getActiveMipmapLevel();_this.setRenderTarget(transmissionRenderTarget),_this.getClearColor(_currentClearColor),_currentClearAlpha=_this.getClearAlpha(),_currentClearAlpha<1&&_this.setClearColor(16777215,.5),_this.clear(),_renderBackground&&background.render(scene);let currentToneMapping=_this.toneMapping;_this.toneMapping=NoToneMapping;let currentCameraViewport=camera.viewport;if(camera.viewport!==void 0&&(camera.viewport=void 0),currentRenderState.setupLightsView(camera),_clippingEnabled===!0&&clipping.setGlobalState(_this.clippingPlanes,camera),renderObjects(opaqueObjects,scene,camera),textures.updateMultisampleRenderTarget(transmissionRenderTarget),textures.updateRenderTargetMipmap(transmissionRenderTarget),extensions.has(`WEBGL_multisampled_render_to_texture`)===!1){let renderTargetNeedsUpdate=!1;for(let i=0,l=transmissiveObjects.length;i0),morphTargets=!!geometry.morphAttributes.position,morphNormals=!!geometry.morphAttributes.normal,morphColors=!!geometry.morphAttributes.color,toneMapping=NoToneMapping;material.toneMapped&&(_currentRenderTarget===null||_currentRenderTarget.isXRRenderTarget===!0)&&(toneMapping=_this.toneMapping);let morphAttribute=geometry.morphAttributes.position||geometry.morphAttributes.normal||geometry.morphAttributes.color,morphTargetsCount=morphAttribute===void 0?0:morphAttribute.length,materialProperties=properties.get(material),lights=currentRenderState.state.lights;if(_clippingEnabled===!0&&(_localClippingEnabled===!0||camera!==_currentCamera)){let useCache=camera===_currentCamera&&material.id===_currentMaterialId;clipping.setState(material,camera,useCache)}let needsProgramChange=!1;material.version===materialProperties.__version?materialProperties.needsLights&&materialProperties.lightsStateVersion!==lights.state.version?needsProgramChange=!0:materialProperties.outputColorSpace===colorSpace?object$1.isBatchedMesh&&materialProperties.batching===!1||!object$1.isBatchedMesh&&materialProperties.batching===!0||object$1.isBatchedMesh&&materialProperties.batchingColor===!0&&object$1.colorTexture===null||object$1.isBatchedMesh&&materialProperties.batchingColor===!1&&object$1.colorTexture!==null||object$1.isInstancedMesh&&materialProperties.instancing===!1||!object$1.isInstancedMesh&&materialProperties.instancing===!0||object$1.isSkinnedMesh&&materialProperties.skinning===!1||!object$1.isSkinnedMesh&&materialProperties.skinning===!0||object$1.isInstancedMesh&&materialProperties.instancingColor===!0&&object$1.instanceColor===null||object$1.isInstancedMesh&&materialProperties.instancingColor===!1&&object$1.instanceColor!==null||object$1.isInstancedMesh&&materialProperties.instancingMorph===!0&&object$1.morphTexture===null||object$1.isInstancedMesh&&materialProperties.instancingMorph===!1&&object$1.morphTexture!==null?needsProgramChange=!0:materialProperties.envMap===envMap?material.fog===!0&&materialProperties.fog!==fog||materialProperties.numClippingPlanes!==void 0&&(materialProperties.numClippingPlanes!==clipping.numPlanes||materialProperties.numIntersection!==clipping.numIntersection)?needsProgramChange=!0:materialProperties.vertexAlphas===vertexAlphas&&materialProperties.vertexTangents===vertexTangents&&materialProperties.morphTargets===morphTargets&&materialProperties.morphNormals===morphNormals&&materialProperties.morphColors===morphColors&&materialProperties.toneMapping===toneMapping?materialProperties.morphTargetsCount!==morphTargetsCount&&(needsProgramChange=!0):needsProgramChange=!0:needsProgramChange=!0:needsProgramChange=!0:(needsProgramChange=!0,materialProperties.__version=material.version);let program=materialProperties.currentProgram;needsProgramChange===!0&&(program=getProgram(material,scene,object$1));let refreshProgram=!1,refreshMaterial=!1,refreshLights=!1,p_uniforms=program.getUniforms(),m_uniforms=materialProperties.uniforms;if(state.useProgram(program.program)&&(refreshProgram=!0,refreshMaterial=!0,refreshLights=!0),material.id!==_currentMaterialId&&(_currentMaterialId=material.id,refreshMaterial=!0),refreshProgram||_currentCamera!==camera){let reversedDepthBuffer$1=state.buffers.depth.getReversed();reversedDepthBuffer$1&&camera.reversedDepth!==!0&&(camera._reversedDepth=!0,camera.updateProjectionMatrix()),p_uniforms.setValue(_gl,`projectionMatrix`,camera.projectionMatrix),p_uniforms.setValue(_gl,`viewMatrix`,camera.matrixWorldInverse);let uCamPos=p_uniforms.map.cameraPosition;uCamPos!==void 0&&uCamPos.setValue(_gl,_vector3$1.setFromMatrixPosition(camera.matrixWorld)),capabilities.logarithmicDepthBuffer&&p_uniforms.setValue(_gl,`logDepthBufFC`,2/(Math.log(camera.far+1)/Math.LN2)),(material.isMeshPhongMaterial||material.isMeshToonMaterial||material.isMeshLambertMaterial||material.isMeshBasicMaterial||material.isMeshStandardMaterial||material.isShaderMaterial)&&p_uniforms.setValue(_gl,`isOrthographic`,camera.isOrthographicCamera===!0),_currentCamera!==camera&&(_currentCamera=camera,refreshMaterial=!0,refreshLights=!0)}if(object$1.isSkinnedMesh){p_uniforms.setOptional(_gl,object$1,`bindMatrix`),p_uniforms.setOptional(_gl,object$1,`bindMatrixInverse`);let skeleton=object$1.skeleton;skeleton&&(skeleton.boneTexture===null&&skeleton.computeBoneTexture(),p_uniforms.setValue(_gl,`boneTexture`,skeleton.boneTexture,textures))}object$1.isBatchedMesh&&(p_uniforms.setOptional(_gl,object$1,`batchingTexture`),p_uniforms.setValue(_gl,`batchingTexture`,object$1._matricesTexture,textures),p_uniforms.setOptional(_gl,object$1,`batchingIdTexture`),p_uniforms.setValue(_gl,`batchingIdTexture`,object$1._indirectTexture,textures),p_uniforms.setOptional(_gl,object$1,`batchingColorTexture`),object$1._colorsTexture!==null&&p_uniforms.setValue(_gl,`batchingColorTexture`,object$1._colorsTexture,textures));let morphAttributes=geometry.morphAttributes;if((morphAttributes.position!==void 0||morphAttributes.normal!==void 0||morphAttributes.color!==void 0)&&morphtargets.update(object$1,geometry,program),(refreshMaterial||materialProperties.receiveShadow!==object$1.receiveShadow)&&(materialProperties.receiveShadow=object$1.receiveShadow,p_uniforms.setValue(_gl,`receiveShadow`,object$1.receiveShadow)),material.isMeshGouraudMaterial&&material.envMap!==null&&(m_uniforms.envMap.value=envMap,m_uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===!1?-1:1),material.isMeshStandardMaterial&&material.envMap===null&&scene.environment!==null&&(m_uniforms.envMapIntensity.value=scene.environmentIntensity),refreshMaterial&&(p_uniforms.setValue(_gl,`toneMappingExposure`,_this.toneMappingExposure),materialProperties.needsLights&&markUniformsLightsNeedsUpdate(m_uniforms,refreshLights),fog&&material.fog===!0&&materials.refreshFogUniforms(m_uniforms,fog),materials.refreshMaterialUniforms(m_uniforms,material,_pixelRatio,_height,currentRenderState.state.transmissionRenderTarget[camera.id]),WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures)),material.isShaderMaterial&&material.uniformsNeedUpdate===!0&&(WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures),material.uniformsNeedUpdate=!1),material.isSpriteMaterial&&p_uniforms.setValue(_gl,`center`,object$1.center),p_uniforms.setValue(_gl,`modelViewMatrix`,object$1.modelViewMatrix),p_uniforms.setValue(_gl,`normalMatrix`,object$1.normalMatrix),p_uniforms.setValue(_gl,`modelMatrix`,object$1.matrixWorld),material.isShaderMaterial||material.isRawShaderMaterial){let groups=material.uniformsGroups;for(let i=0,l=groups.length;i0&&textures.useMultisampledRTT(renderTarget)===!1?properties.get(renderTarget).__webglMultisampledFramebuffer:Array.isArray(__webglFramebuffer)?__webglFramebuffer[activeMipmapLevel]:__webglFramebuffer,_currentViewport.copy(renderTarget.viewport),_currentScissor.copy(renderTarget.scissor),_currentScissorTest=renderTarget.scissorTest}else _currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor(),_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor(),_currentScissorTest=_scissorTest;activeMipmapLevel!==0&&(framebuffer=_scratchFrameBuffer);let framebufferBound=state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(framebufferBound&&useDefaultFramebuffer&&state.drawBuffers(renderTarget,framebuffer),state.viewport(_currentViewport),state.scissor(_currentScissor),state.setScissorTest(_currentScissorTest),isCube){let textureProperties=properties.get(renderTarget.texture);_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_CUBE_MAP_POSITIVE_X+activeCubeFace,textureProperties.__webglTexture,activeMipmapLevel)}else if(isRenderTarget3D){let layer=activeCubeFace;for(let i=0;i=0&&x$1<=renderTarget.width-width&&y>=0&&y<=renderTarget.height-height&&(renderTarget.textures.length>1&&_gl.readBuffer(_gl.COLOR_ATTACHMENT0+textureIndex),_gl.readPixels(x$1,y,width,height,utils$1.convert(textureFormat),utils$1.convert(textureType),buffer$1))}finally{let framebuffer$1=_currentRenderTarget===null?null:properties.get(_currentRenderTarget).__webglFramebuffer;state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer$1)}}},this.readRenderTargetPixelsAsync=async function(renderTarget,x$1,y,width,height,buffer$1,activeCubeFaceIndex,textureIndex=0){if(!(renderTarget&&renderTarget.isWebGLRenderTarget))throw Error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);let framebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget&&activeCubeFaceIndex!==void 0&&(framebuffer=framebuffer[activeCubeFaceIndex]),framebuffer)if(x$1>=0&&x$1<=renderTarget.width-width&&y>=0&&y<=renderTarget.height-height){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);let texture=renderTarget.textures[textureIndex],textureFormat=texture.format,textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.`);if(!capabilities.textureTypeReadable(textureType))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.`);let glBuffer=_gl.createBuffer();_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer),_gl.bufferData(_gl.PIXEL_PACK_BUFFER,buffer$1.byteLength,_gl.STREAM_READ),renderTarget.textures.length>1&&_gl.readBuffer(_gl.COLOR_ATTACHMENT0+textureIndex),_gl.readPixels(x$1,y,width,height,utils$1.convert(textureFormat),utils$1.convert(textureType),0);let currFramebuffer=_currentRenderTarget===null?null:properties.get(_currentRenderTarget).__webglFramebuffer;state.bindFramebuffer(_gl.FRAMEBUFFER,currFramebuffer);let sync$2=_gl.fenceSync(_gl.SYNC_GPU_COMMANDS_COMPLETE,0);return _gl.flush(),await probeAsync(_gl,sync$2,4),_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer),_gl.getBufferSubData(_gl.PIXEL_PACK_BUFFER,0,buffer$1),_gl.deleteBuffer(glBuffer),_gl.deleteSync(sync$2),buffer$1}else throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.`)},this.copyFramebufferToTexture=function(texture,position$2=null,level=0){let levelScale=2**-level,width=Math.floor(texture.image.width*levelScale),height=Math.floor(texture.image.height*levelScale),x$1=position$2===null?0:position$2.x,y=position$2===null?0:position$2.y;textures.setTexture2D(texture,0),_gl.copyTexSubImage2D(_gl.TEXTURE_2D,level,0,0,x$1,y,width,height),state.unbindTexture()};let _srcFramebuffer=_gl.createFramebuffer(),_dstFramebuffer=_gl.createFramebuffer();this.copyTextureToTexture=function(srcTexture,dstTexture,srcRegion=null,dstPosition=null,srcLevel=0,dstLevel=null){dstLevel===null&&(srcLevel===0?dstLevel=0:(warnOnce$1(`WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels.`),dstLevel=srcLevel,srcLevel=0));let width,height,depth$1,minX,minY,minZ,dstX,dstY,dstZ,image$1=srcTexture.isCompressedTexture?srcTexture.mipmaps[dstLevel]:srcTexture.image;if(srcRegion!==null)width=srcRegion.max.x-srcRegion.min.x,height=srcRegion.max.y-srcRegion.min.y,depth$1=srcRegion.isBox3?srcRegion.max.z-srcRegion.min.z:1,minX=srcRegion.min.x,minY=srcRegion.min.y,minZ=srcRegion.isBox3?srcRegion.min.z:0;else{let levelScale=2**-srcLevel;width=Math.floor(image$1.width*levelScale),height=Math.floor(image$1.height*levelScale),depth$1=srcTexture.isDataArrayTexture?image$1.depth:srcTexture.isData3DTexture?Math.floor(image$1.depth*levelScale):1,minX=0,minY=0,minZ=0}dstPosition===null?(dstX=0,dstY=0,dstZ=0):(dstX=dstPosition.x,dstY=dstPosition.y,dstZ=dstPosition.z);let glFormat=utils$1.convert(dstTexture.format),glType=utils$1.convert(dstTexture.type),glTarget;dstTexture.isData3DTexture?(textures.setTexture3D(dstTexture,0),glTarget=_gl.TEXTURE_3D):dstTexture.isDataArrayTexture||dstTexture.isCompressedArrayTexture?(textures.setTexture2DArray(dstTexture,0),glTarget=_gl.TEXTURE_2D_ARRAY):(textures.setTexture2D(dstTexture,0),glTarget=_gl.TEXTURE_2D),_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,dstTexture.flipY),_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,dstTexture.premultiplyAlpha),_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,dstTexture.unpackAlignment);let currentUnpackRowLen=_gl.getParameter(_gl.UNPACK_ROW_LENGTH),currentUnpackImageHeight=_gl.getParameter(_gl.UNPACK_IMAGE_HEIGHT),currentUnpackSkipPixels=_gl.getParameter(_gl.UNPACK_SKIP_PIXELS),currentUnpackSkipRows=_gl.getParameter(_gl.UNPACK_SKIP_ROWS),currentUnpackSkipImages=_gl.getParameter(_gl.UNPACK_SKIP_IMAGES);_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,image$1.width),_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,image$1.height),_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,minX),_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,minY),_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES,minZ);let isSrc3D=srcTexture.isDataArrayTexture||srcTexture.isData3DTexture,isDst3D=dstTexture.isDataArrayTexture||dstTexture.isData3DTexture;if(srcTexture.isDepthTexture){let srcTextureProperties=properties.get(srcTexture),dstTextureProperties=properties.get(dstTexture),srcRenderTargetProperties=properties.get(srcTextureProperties.__renderTarget),dstRenderTargetProperties=properties.get(dstTextureProperties.__renderTarget);state.bindFramebuffer(_gl.READ_FRAMEBUFFER,srcRenderTargetProperties.__webglFramebuffer),state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,dstRenderTargetProperties.__webglFramebuffer);for(let i=0;i{result.value=fn$5()},{...options$1,flush:(_a$2=options$1?.flush)??`sync`}),readonly$1(result)}function tryOnScopeDispose$1(fn$5){return getCurrentScope()?(onScopeDispose(fn$5),!0):!1}function createEventHook(){let fns=new Set,off=fn$5=>{fns.delete(fn$5)},clear=()=>{fns.clear()},on$1=fn$5=>{fns.add(fn$5);let offFn=()=>off(fn$5);return tryOnScopeDispose$1(offFn),{off:offFn}},trigger$1=(...args)=>Promise.all(Array.from(fns).map(fn$5=>fn$5(...args)));return{on:on$1,off,trigger:trigger$1,clear}}function createGlobalState(stateFactory){let initialized=!1,state,scope$1=effectScope(!0);return(...args)=>(initialized||(state=scope$1.run(()=>stateFactory(...args)),initialized=!0),state)}const localProvidedStateMap$1=new WeakMap,injectLocal$1=(...args)=>{var _a$2;let key$2=args[0],instance=(_a$2=getCurrentInstance())?.proxy;if(instance==null&&!hasInjectionContext())throw Error(`injectLocal must be called in setup`);return instance&&localProvidedStateMap$1.has(instance)&&key$2 in localProvidedStateMap$1.get(instance)?localProvidedStateMap$1.get(instance)[key$2]:inject(...args)};function createSharedComposable(composable){let subscribers=0,state,scope$1,dispose$1=()=>{--subscribers,scope$1&&subscribers<=0&&(scope$1.stop(),state=void 0,scope$1=void 0)};return(...args)=>(subscribers+=1,scope$1||(scope$1=effectScope(!0),state=scope$1.run(()=>composable(...args))),tryOnScopeDispose$1(dispose$1),state)}const isClient$1=typeof window<`u`&&typeof document<`u`,isWorker$1=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,isDef$1=val=>val!==void 0,notNullish$1=val=>val!=null,toString$3=Object.prototype.toString,isObject$5=val=>toString$3.call(val)===`[object Object]`,noop$4=()=>{},isIOS=getIsIOS();function getIsIOS(){var _a$2,_b;return isClient$1&&(_a$2=window==null?void 0:window.navigator)?.userAgent&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(_b=window==null?void 0:window.navigator)?.maxTouchPoints>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function createFilterWrapper$1(filter$1,fn$5){function wrapper(...args){return new Promise((resolve$1,reject)=>{Promise.resolve(filter$1(()=>fn$5.apply(this,args),{fn:fn$5,thisArg:this,args})).then(resolve$1).catch(reject)})}return wrapper}function debounceFilter$1(ms,options$1={}){let timer,maxTimer,lastRejector=noop$4,_clearTimeout=timer2=>{clearTimeout(timer2),lastRejector(),lastRejector=noop$4},lastInvoker,filter$1=invoke$1=>{let duration$2=toValue$1(ms),maxDuration$1=toValue$1(options$1.maxWait);return timer&&_clearTimeout(timer),duration$2<=0||maxDuration$1!==void 0&&maxDuration$1<=0?(maxTimer&&(_clearTimeout(maxTimer),maxTimer=null),Promise.resolve(invoke$1())):new Promise((resolve$1,reject)=>{lastRejector=options$1.rejectOnCancel?reject:resolve$1,lastInvoker=invoke$1,maxDuration$1&&!maxTimer&&(maxTimer=setTimeout(()=>{timer&&_clearTimeout(timer),maxTimer=null,resolve$1(lastInvoker())},maxDuration$1)),timer=setTimeout(()=>{maxTimer&&_clearTimeout(maxTimer),maxTimer=null,resolve$1(invoke$1())},duration$2)})};return filter$1}function cacheStringFunction$1(fn$5){let cache$1=Object.create(null);return str=>{let hit=cache$1[str];return hit||(cache$1[str]=fn$5(str))}}const hyphenateRE$1=/\B([A-Z])/g,hyphenate$1=cacheStringFunction$1(str=>str.replace(hyphenateRE$1,`-$1`).toLowerCase()),camelizeRE$1=/-(\w)/g,camelize$2=cacheStringFunction$1(str=>str.replace(camelizeRE$1,(_$1,c$3)=>c$3?c$3.toUpperCase():``));function pxValue$1(px$2){return px$2.endsWith(`rem`)?Number.parseFloat(px$2)*16:Number.parseFloat(px$2)}function objectPick$1(obj,keys$3,omitUndefined=!1){return keys$3.reduce((n,k$3)=>(k$3 in obj&&(!omitUndefined||obj[k$3]!==void 0)&&(n[k$3]=obj[k$3]),n),{})}function getLifeCycleTarget$1(target$1){return target$1||getCurrentInstance()}function toArray$1(value$1){return Array.isArray(value$1)?value$1:[value$1]}function refAutoReset(defaultValue,afterMs=1e4){return customRef((track$1,trigger$1)=>{let value$1=toValue$1(defaultValue),timer,resetAfter=()=>setTimeout(()=>{value$1=toValue$1(defaultValue),trigger$1()},toValue$1(afterMs));return tryOnScopeDispose$1(()=>{clearTimeout(timer)}),{get(){return track$1(),value$1},set(newValue){value$1=newValue,trigger$1(),clearTimeout(timer),timer=resetAfter()}}})}function useDebounceFn$1(fn$5,ms=200,options$1={}){return createFilterWrapper$1(debounceFilter$1(ms,options$1),fn$5)}function refDebounced$1(value$1,ms=200,options$1={}){let debounced=ref(value$1.value),updater=useDebounceFn$1(()=>{debounced.value=value$1.value},ms,options$1);return watch(value$1,()=>updater()),debounced}function toRefs$2(objectRef,options$1={}){if(!isRef(objectRef))return toRefs(objectRef);let result=Array.isArray(objectRef.value)?Array.from({length:objectRef.value.length}):{};for(let key$2 in objectRef.value)result[key$2]=customRef(()=>({get(){return objectRef.value[key$2]},set(v){var _a$2;let replaceRef=(_a$2=toValue$1(options$1.replaceRef))??!0;if(replaceRef)if(Array.isArray(objectRef.value)){let copy=[...objectRef.value];copy[key$2]=v,objectRef.value=copy}else{let newObject={...objectRef.value,[key$2]:v};Object.setPrototypeOf(newObject,Object.getPrototypeOf(objectRef.value)),objectRef.value=newObject}else objectRef.value[key$2]=v}}));return result}const toValue$2=toValue$1;function tryOnBeforeUnmount(fn$5,target$1){let instance=getLifeCycleTarget$1(target$1);instance&&onBeforeUnmount(fn$5,target$1)}function tryOnMounted$1(fn$5,sync$2=!0,target$1){let instance=getLifeCycleTarget$1();instance?onMounted(fn$5,target$1):sync$2?fn$5():nextTick(fn$5)}function useIntervalFn$1(cb$1,interval=1e3,options$1={}){let{immediate=!0,immediateCallback=!1}=options$1,timer=null,isActive=shallowRef(!1);function clean$3(){timer&&(clearInterval(timer),timer=null)}function pause(){isActive.value=!1,clean$3()}function resume(){let intervalValue=toValue$1(interval);intervalValue<=0||(isActive.value=!0,immediateCallback&&cb$1(),clean$3(),isActive.value&&(timer=setInterval(cb$1,intervalValue)))}if(immediate&&isClient$1&&resume(),isRef(interval)||typeof interval==`function`){let stopWatch=watch(interval,()=>{isActive.value&&isClient$1&&resume()});tryOnScopeDispose$1(stopWatch)}return tryOnScopeDispose$1(pause),{isActive,pause,resume}}function useTimeoutFn(cb$1,interval,options$1={}){let{immediate=!0,immediateCallback=!1}=options$1,isPending=shallowRef(!1),timer=null;function clear(){timer&&(clearTimeout(timer),timer=null)}function stop$1(){isPending.value=!1,clear()}function start(...args){immediateCallback&&cb$1(),clear(),isPending.value=!0,timer=setTimeout(()=>{isPending.value=!1,timer=null,cb$1(...args)},toValue$1(interval))}return immediate&&(isPending.value=!0,isClient$1&&start()),tryOnScopeDispose$1(stop$1),{isPending:readonly$1(isPending),start,stop:stop$1}}function watchImmediate$1(source,cb$1,options$1){return watch(source,cb$1,{...options$1,immediate:!0})}const defaultWindow=isClient$1?window:void 0,defaultDocument$1=isClient$1?window.document:void 0,defaultNavigator$1=isClient$1?window.navigator:void 0,defaultLocation$1=isClient$1?window.location:void 0;function unrefElement$1(elRef){var _a$2;let plain=toValue$1(elRef);return(_a$2=plain?.$el)??plain}function useEventListener$1(...args){let cleanups=[],cleanup=()=>{cleanups.forEach(fn$5=>fn$5()),cleanups.length=0},register=(el,event,listener,options$1)=>(el.addEventListener(event,listener,options$1),()=>el.removeEventListener(event,listener,options$1)),firstParamTargets=computed(()=>{let test$1=toArray$1(toValue$1(args[0])).filter(e$4=>e$4!=null);return test$1.every(e$4=>typeof e$4!=`string`)?test$1:void 0}),stopWatch=watchImmediate$1(()=>{var _a$2,_b;return[(_b=(_a$2=firstParamTargets.value)?.map(e$4=>unrefElement$1(e$4)))??[defaultWindow].filter(e$4=>e$4!=null),toArray$1(toValue$1(firstParamTargets.value?args[1]:args[0])),toArray$1(unref(firstParamTargets.value?args[2]:args[1])),toValue$1(firstParamTargets.value?args[3]:args[2])]},([raw_targets,raw_events,raw_listeners,raw_options])=>{if(cleanup(),!raw_targets?.length||!raw_events?.length||!raw_listeners?.length)return;let optionsClone=isObject$5(raw_options)?{...raw_options}:raw_options;cleanups.push(...raw_targets.flatMap(el=>raw_events.flatMap(event=>raw_listeners.map(listener=>register(el,event,listener,optionsClone)))))},{flush:`post`}),stop$1=()=>{stopWatch(),cleanup()};return tryOnScopeDispose$1(cleanup),stop$1}function useMounted(){let isMounted=shallowRef(!1),instance=getCurrentInstance();return instance&&onMounted(()=>{isMounted.value=!0},instance),isMounted}function useSupported$1(callback){let isMounted=useMounted();return computed(()=>(isMounted.value,!!callback()))}function useMutationObserver$1(target$1,callback,options$1={}){let{window:window$1=defaultWindow,...mutationOptions}=options$1,observer,isSupported=useSupported$1(()=>window$1&&`MutationObserver`in window$1),cleanup=()=>{observer&&(observer.disconnect(),observer=void 0)},targets=computed(()=>{let value$1=toValue$1(target$1),items=toArray$1(value$1).map(unrefElement$1).filter(notNullish$1);return new Set(items)}),stopWatch=watch(()=>targets.value,targets2=>{cleanup(),isSupported.value&&targets2.size&&(observer=new MutationObserver(callback),targets2.forEach(el=>observer.observe(el,mutationOptions)))},{immediate:!0,flush:`post`}),takeRecords=()=>observer?.takeRecords(),stop$1=()=>{stopWatch(),cleanup()};return tryOnScopeDispose$1(stop$1),{isSupported,stop:stop$1,takeRecords}}function createKeyPredicate(keyFilter){return typeof keyFilter==`function`?keyFilter:typeof keyFilter==`string`?event=>event.key===keyFilter:Array.isArray(keyFilter)?event=>keyFilter.includes(event.key):()=>!0}function onKeyStroke(...args){let key$2,handler,options$1={};args.length===3?(key$2=args[0],handler=args[1],options$1=args[2]):args.length===2?typeof args[1]==`object`?(key$2=!0,handler=args[0],options$1=args[1]):(key$2=args[0],handler=args[1]):(key$2=!0,handler=args[0]);let{target:target$1=defaultWindow,eventName=`keydown`,passive=!1,dedupe=!1}=options$1,predicate=createKeyPredicate(key$2),listener=e$4=>{!(e$4.repeat&&toValue$1(dedupe))&&predicate(e$4)&&handler(e$4)};return useEventListener$1(target$1,eventName,listener,passive)}function useRafFn(fn$5,options$1={}){let{immediate=!0,fpsLimit=void 0,window:window$1=defaultWindow,once=!1}=options$1,isActive=shallowRef(!1),intervalLimit=computed(()=>fpsLimit?1e3/toValue$1(fpsLimit):null),previousFrameTimestamp=0,rafId=null;function loop(timestamp$2){if(!isActive.value||!window$1)return;previousFrameTimestamp||=timestamp$2;let delta=timestamp$2-previousFrameTimestamp;if(intervalLimit.value&&deltawindow$1&&`matchMedia`in window$1&&typeof window$1.matchMedia==`function`),ssrSupport=shallowRef(typeof ssrWidth==`number`),mediaQuery=shallowRef(),matches$1=shallowRef(!1),handler=event=>{matches$1.value=event.matches};return watchEffect(()=>{if(ssrSupport.value){ssrSupport.value=!isSupported.value;let queryStrings=toValue$1(query).split(`,`);matches$1.value=queryStrings.some(queryString=>{let not=queryString.includes(`not all`),minWidth=queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),maxWidth=queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),res=!!(minWidth||maxWidth);return minWidth&&res&&(res=ssrWidth>=pxValue$1(minWidth[1])),maxWidth&&res&&(res=ssrWidth<=pxValue$1(maxWidth[1])),not?!res:res});return}isSupported.value&&(mediaQuery.value=window$1.matchMedia(toValue$1(query)),matches$1.value=mediaQuery.value.matches)}),useEventListener$1(mediaQuery,`change`,handler,{passive:!0}),computed(()=>matches$1.value)}function cloneFnJSON(source){return JSON.parse(JSON.stringify(source))}function useDevicePixelRatio(options$1={}){let{window:window$1=defaultWindow}=options$1,pixelRatio=shallowRef(1),query=useMediaQuery$1(()=>`(resolution: ${pixelRatio.value}dppx)`,options$1),stop$1=noop$4;return window$1&&(stop$1=watchImmediate$1(query,()=>pixelRatio.value=window$1.devicePixelRatio)),{pixelRatio:readonly$1(pixelRatio),stop:stop$1}}function useResizeObserver$1(target$1,callback,options$1={}){let{window:window$1=defaultWindow,...observerOptions}=options$1,observer,isSupported=useSupported$1(()=>window$1&&`ResizeObserver`in window$1),cleanup=()=>{observer&&(observer.disconnect(),observer=void 0)},targets=computed(()=>{let _targets=toValue$1(target$1);return Array.isArray(_targets)?_targets.map(el=>unrefElement$1(el)):[unrefElement$1(_targets)]}),stopWatch=watch(targets,els=>{if(cleanup(),isSupported.value&&window$1){observer=new ResizeObserver(callback);for(let _el of els)_el&&observer.observe(_el,observerOptions)}},{immediate:!0,flush:`post`}),stop$1=()=>{cleanup(),stopWatch()};return tryOnScopeDispose$1(stop$1),{isSupported,stop:stop$1}}function useElementBounding$1(target$1,options$1={}){let{reset=!0,windowResize=!0,windowScroll=!0,immediate=!0,updateTiming=`sync`}=options$1,height=shallowRef(0),bottom=shallowRef(0),left=shallowRef(0),right=shallowRef(0),top=shallowRef(0),width=shallowRef(0),x$1=shallowRef(0),y=shallowRef(0);function recalculate(){let el=unrefElement$1(target$1);if(!el){reset&&(height.value=0,bottom.value=0,left.value=0,right.value=0,top.value=0,width.value=0,x$1.value=0,y.value=0);return}let rect=el.getBoundingClientRect();height.value=rect.height,bottom.value=rect.bottom,left.value=rect.left,right.value=rect.right,top.value=rect.top,width.value=rect.width,x$1.value=rect.x,y.value=rect.y}function update(){updateTiming===`sync`?recalculate():updateTiming===`next-frame`&&requestAnimationFrame(()=>recalculate())}return useResizeObserver$1(target$1,update),watch(()=>unrefElement$1(target$1),ele=>!ele&&update()),useMutationObserver$1(target$1,update,{attributeFilter:[`style`,`class`]}),windowScroll&&useEventListener$1(`scroll`,update,{capture:!0,passive:!0}),windowResize&&useEventListener$1(`resize`,update,{passive:!0}),tryOnMounted$1(()=>{immediate&&update()}),{height,bottom,left,right,top,width,x:x$1,y,update}}function useElementSize(target$1,initialSize={width:0,height:0},options$1={}){let{window:window$1=defaultWindow,box=`content-box`}=options$1,isSVG=computed(()=>{var _a$2,_b;return(_b=(_a$2=unrefElement$1(target$1))?.namespaceURI)?.includes(`svg`)}),width=shallowRef(initialSize.width),height=shallowRef(initialSize.height),{stop:stop1}=useResizeObserver$1(target$1,([entry])=>{let boxSize=box===`border-box`?entry.borderBoxSize:box===`content-box`?entry.contentBoxSize:entry.devicePixelContentBoxSize;if(window$1&&isSVG.value){let $elem=unrefElement$1(target$1);if($elem){let rect=$elem.getBoundingClientRect();width.value=rect.width,height.value=rect.height}}else if(boxSize){let formatBoxSize=toArray$1(boxSize);width.value=formatBoxSize.reduce((acc,{inlineSize})=>acc+inlineSize,0),height.value=formatBoxSize.reduce((acc,{blockSize})=>acc+blockSize,0)}else width.value=entry.contentRect.width,height.value=entry.contentRect.height},options$1);tryOnMounted$1(()=>{let ele=unrefElement$1(target$1);ele&&(width.value=`offsetWidth`in ele?ele.offsetWidth:initialSize.width,height.value=`offsetHeight`in ele?ele.offsetHeight:initialSize.height)});let stop2=watch(()=>unrefElement$1(target$1),ele=>{width.value=ele?initialSize.width:0,height.value=ele?initialSize.height:0});function stop$1(){stop1(),stop2()}return{width,height,stop:stop$1}}function useFps(options$1){var _a$2;let fps=shallowRef(0);if(typeof performance>`u`)return fps;let every=(_a$2=options$1?.every)??10,last=performance.now(),ticks=0;return useRafFn(()=>{if(ticks+=1,ticks>=every){let now$1=performance.now(),diff=now$1-last;fps.value=Math.round(1e3/(diff/ticks)),last=now$1,ticks=0}}),fps}function useMemory(options$1={}){let memory=ref(),isSupported=useSupported$1(()=>typeof performance<`u`&&`memory`in performance);if(isSupported.value){let{interval=1e3}=options$1;useIntervalFn$1(()=>{memory.value=performance.memory},interval,{immediate:options$1.immediate,immediateCallback:options$1.immediateCallback})}return{isSupported,memory}}const defaultState$1={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},keys$2=Object.keys(defaultState$1);function usePointer$1(options$1={}){let{target:target$1=defaultWindow}=options$1,isInside=shallowRef(!1),state=ref(options$1.initialValue||{});Object.assign(state.value,defaultState$1,state.value);let handler=event=>{isInside.value=!0,!(options$1.pointerTypes&&!options$1.pointerTypes.includes(event.pointerType))&&(state.value=objectPick$1(event,keys$2,!1))};if(target$1){let listenerOptions={passive:!0};useEventListener$1(target$1,[`pointerdown`,`pointermove`,`pointerup`],handler,listenerOptions),useEventListener$1(target$1,`pointerleave`,()=>isInside.value=!1,listenerOptions)}return{...toRefs$2(state),isInside}}const DEFAULT_UNITS$1=[{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`}],DEFAULT_MESSAGES$1={justNow:`just now`,past:n=>n.match(/\d/)?`${n} ago`:n,future:n=>n.match(/\d/)?`in ${n}`:n,month:(n,past)=>n===1?past?`last month`:`next month`:`${n} month${n>1?`s`:``}`,year:(n,past)=>n===1?past?`last year`:`next year`:`${n} year${n>1?`s`:``}`,day:(n,past)=>n===1?past?`yesterday`:`tomorrow`:`${n} day${n>1?`s`:``}`,week:(n,past)=>n===1?past?`last week`:`next week`:`${n} week${n>1?`s`:``}`,hour:n=>`${n} hour${n>1?`s`:``}`,minute:n=>`${n} minute${n>1?`s`:``}`,second:n=>`${n} second${n>1?`s`:``}`,invalid:``};function useVModel(props,key$2,emit$1,options$1={}){var _a$2,_b,_c;let{clone:clone$3=!1,passive=!1,eventName,deep=!1,defaultValue,shouldEmit}=options$1,vm=getCurrentInstance(),_emit=emit$1||vm?.emit||(_a$2=vm?.$emit)?.bind(vm)||(_c=(_b=vm?.proxy)?.$emit)?.bind(vm?.proxy),event=eventName;key$2||=`modelValue`,event||=`update:${key$2.toString()}`;let cloneFn=val=>clone$3?typeof clone$3==`function`?clone$3(val):cloneFnJSON(val):val,getValue$2=()=>isDef$1(props[key$2])?cloneFn(props[key$2]):defaultValue,triggerEmit=value$1=>{shouldEmit?shouldEmit(value$1)&&_emit(event,value$1):_emit(event,value$1)};if(passive){let initialValue=getValue$2(),proxy=ref(initialValue),isUpdating=!1;return watch(()=>props[key$2],v=>{isUpdating||(isUpdating=!0,proxy.value=cloneFn(v),nextTick(()=>isUpdating=!1))}),watch(proxy,v=>{!isUpdating&&(v!==props[key$2]||deep)&&triggerEmit(v)},{deep}),proxy}else return computed({get(){return getValue$2()},set(value$1){triggerEmit(value$1)}})}function useWindowSize$1(options$1={}){let{window:window$1=defaultWindow,initialWidth=1/0,initialHeight=1/0,listenOrientation=!0,includeScrollbar=!0,type=`inner`}=options$1,width=shallowRef(initialWidth),height=shallowRef(initialHeight),update=()=>{if(window$1)if(type===`outer`)width.value=window$1.outerWidth,height.value=window$1.outerHeight;else if(type===`visual`&&window$1.visualViewport){let{width:visualViewportWidth,height:visualViewportHeight,scale:scale$1}=window$1.visualViewport;width.value=Math.round(visualViewportWidth*scale$1),height.value=Math.round(visualViewportHeight*scale$1)}else includeScrollbar?(width.value=window$1.innerWidth,height.value=window$1.innerHeight):(width.value=window$1.document.documentElement.clientWidth,height.value=window$1.document.documentElement.clientHeight)};update(),tryOnMounted$1(update);let listenerOptions={passive:!0};if(useEventListener$1(`resize`,update,listenerOptions),window$1&&type===`visual`&&window$1.visualViewport&&useEventListener$1(window$1.visualViewport,`resize`,update,listenerOptions),listenOrientation){let matches$1=useMediaQuery$1(`(orientation: portrait)`);watch(matches$1,()=>update())}return{width,height}}var At=Object.defineProperty,xt=(e$4,t$1,r$1)=>t$1 in e$4?At(e$4,t$1,{enumerable:!0,configurable:!0,writable:!0,value:r$1}):e$4[t$1]=r$1,de$1=(e$4,t$1,r$1)=>xt(e$4,typeof t$1==`symbol`?t$1:t$1+``,r$1);const gr=`@tresjs/core`,hr=`module`,vr=`4.3.6`,yr=`pnpm@10.6.3`,_r=`Declarative ThreeJS using Vue Components`,wr=`Alvaro Saburido (https://github.com/alvarosabu/)`,br=`MIT`,Mr={type:`git`,url:`git+https://github.com/Tresjs/tres.git`},Pr=[`vue`,`3d`,`threejs`,`three`,`threejs-vue`],Cr=!1,Er={".":{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`},"./*":`./*`},Tr=`./dist/tres.js`,Sr=`./dist/tres.js`,Ar=`./dist/index.d.ts`,xr=[`*.d.ts`,`dist`],kr={access:`public`},Lr={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`},Rr={three:`>=0.133`,vue:`>=3.4`},Or={"@alvarosabu/utils":`^3.2.0`,"@vue/devtools-api":`^6.6.3`,"@vueuse/core":`^12.5.0`},Dr={"@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`},jr={name:gr,type:hr,version:vr,packageManager:yr,description:_r,author:wr,license:br,repository:Mr,keywords:Pr,sideEffects:Cr,exports:Er,main:Tr,module:Sr,types:Ar,files:xr,publishConfig:kr,scripts:Lr,peerDependencies:Rr,dependencies:Or,devDependencies:Dr};var $r=class extends Mesh{constructor(...r$1){super(...r$1),de$1(this,`type`,`HightlightMesh`),de$1(this,`createTime`),this.createTime=Date.now()}onBeforeRender(){let n=(Date.now()-this.createTime)/1e3,s=1+.07*Math.sin(2.5*n);this.scale.set(s,s,s)}};function be(e$4){return typeof e$4>`u`}function ke(e$4){return Array.isArray(e$4)}function Hr(e$4){return typeof e$4==`number`}function dt$2(e$4){return typeof e$4==`string`}function Y(e$4){return typeof e$4==`function`}function j(e$4){return e$4===Object(e$4)&&!ke(e$4)&&!Y(e$4)}function N(e$4){return j(e$4)&&!!e$4.isObject3D}function mt$1(e$4){return j(e$4)&&!!e$4.isColor}function Ur(e$4){return e$4!=null&&(typeof e$4==`string`||typeof e$4==`number`||mt$1(e$4))}function Me(e$4){return typeof e$4==`object`&&!!e$4&&`set`in e$4&&typeof e$4.set==`function`}function Fr(e$4){return Me(e$4)&&`copy`in e$4&&typeof e$4.copy==`function`}function Wr(e$4){return!!(e$4!=null&&e$4.constructor)}function Ge(e$4){return e$4 instanceof Layers}function Ve(e$4){return j(e$4)&&!!e$4.isCamera}function Nr(e$4){return j(e$4)&&!!e$4.isBufferGeometry}function zr(e$4){return j(e$4)&&!!e$4.isMaterial}function Gr(e$4){return j(e$4)&&!!e$4.isLight}function Vr(e$4){return j(e$4)&&!!e$4.isFog}function Yr(e$4){return j(e$4)&&!!e$4.isScene}function ne(e$4){return N(e$4)||Nr(e$4)||zr(e$4)||Vr(e$4)}function qr(e$4){return j(e$4)&&!!e$4.isPrimitive}const gt$1=(e$4,t$1)=>{for(let r$1 of Object.keys(t$1))t$1[r$1]instanceof Object&&Object.assign(t$1[r$1],gt$1(e$4[r$1],t$1[r$1]));return Object.assign(e$4||{},t$1),e$4},Kr=`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`,Jr=Zr(Kr);function Ye(e$4){return e$4&&e$4.nodeType===1}function he(e$4){return e$4.replace(/-([a-z])/g,(t$1,r$1)=>r$1.toUpperCase())}const Qr=/\B([A-Z])/g;function Xr(e$4){return e$4.replace(Qr,`-$1`).toLowerCase()}function Zr(e$4,t$1){let r$1=Object.create(null),n=e$4.split(`,`);for(let o=0;o!!r$1[o.toLowerCase()]:o=>!!r$1[o]}const qe=(e$4,t$1)=>{if(!t$1)return;let r$1=Array.isArray(t$1)?t$1:t$1.match(/([^[.\]])+/g);return r$1?.reduce((n,o)=>n&&n[o],e$4)},en=(e$4,t$1,r$1)=>{let n=Array.isArray(t$1)?t$1:t$1.match(/([^[.\]])+/g);n&&n.reduce((o,l,s)=>(o[l]===void 0&&(o[l]={}),s===n.length-1&&(o[l]=r$1),o[l]),e$4)};function ht$1(e$4,t$1){if(Ye(e$4)&&Ye(t$1)){let o=e$4.attributes,l=t$1.attributes;return o.length===l.length?Array.from(o).every(({name:s,value:a$1})=>t$1.getAttribute(s)===a$1):!1}if(e$4===t$1)return!0;if(typeof e$4!=`object`||!e$4||typeof t$1!=`object`||!t$1)return!1;let r$1=Object.keys(e$4),n=Object.keys(t$1);if(r$1.length!==n.length)return!1;for(let o of r$1)if(!n.includes(o)||!ht$1(e$4[o],t$1[o]))return!1;return!0}function tn(e$4,t$1){if(!Array.isArray(e$4)||!Array.isArray(t$1)||e$4.length!==t$1.length)return!1;for(let r$1=0;r$1{if(c$3.uuid===t$1)return c$3;for(let i of c$3.children){let f$2=o(i);if(f$2)return f$2}},l=o(e$4);if(!l){console.warn(`Object with UUID not found in the scene.`);return}let s=l;for(let c$3=0;c$3vt$1(o)),!(e$4 instanceof Scene)){let o=e$4;e$4&&((n=e$4.dispose)==null||n.call(e$4)),o.geometry&&o.geometry.dispose(),Array.isArray(o.material)?o.material.forEach(l=>Ke(l)):o.material&&Ke(o.material)}}function ln(e$4,t$1){let r$1=0;for(let n=0;nr$1===0?t$1:t$1.charAt(0).toUpperCase()+t$1.slice(1)).join(``)}const Qe=/-\d+$/;function cn$1(e$4,t$1,r$1){if(dt$2(r$1)){if(Qe.test(r$1)){let l=r$1.replace(Qe,``),{target:s,key:a$1}=Pe(e$4,l);if(!Array.isArray(s[a$1])){let c$3=s[a$1],i=[];i.__tresDetach=()=>{i.every(f$2=>be(f$2))&&(s[a$1]=c$3)},s[a$1]=i}}let{target:n,key:o}=Pe(e$4,r$1);t$1.__tres.previousAttach=n[o],n[o]=J(t$1)}else t$1.__tres.previousAttach=r$1(e$4,t$1)}function un$2(e$4,t$1,r$1){var n,o,l;if(dt$2(r$1)){let{target:s,key:a$1}=Pe(e$4,r$1),c$3=t$1.__tres.previousAttach;c$3===void 0?delete s[a$1]:s[a$1]=c$3,`__tresDetach`in s&&s.__tresDetach()}else (o=(n=t$1.__tres)?.previousAttach)==null||o.call(n,e$4,t$1);(l=t$1.__tres)==null||delete l.previousAttach}function z(e$4,t$1,r$1){let n=e$4;return n.__tres={type:`unknown`,eventCount:0,root:r$1,handlers:{},memoizedProps:{},objects:[],parent:null,previousAttach:null,...t$1},n.__tres.attach||(n.isMaterial?n.__tres.attach=`material`:n.isBufferGeometry?n.__tres.attach=`geometry`:n.isFog&&(n.__tres.attach=`fog`)),n}function yt$1(e$4){var r$1;let t$1=(r$1=e$4?.__tres)?.root;t$1&&t$1.render&&t$1.render.canBeInvalidated.value&&t$1.invalidate()}function fn$4(e$4,t$1,r$1){var o;if(!Y(e$4.setPixelRatio))return;let n=0;if(r$1&&ke(r$1)&&r$1.length>=2){let[l,s]=r$1;n=MathUtils.clamp(t$1,l,s)}else n=Hr(r$1)?r$1:t$1;n!==(o=e$4.getPixelRatio)?.call(e$4)&&e$4.setPixelRatio(n)}function pn(e$4,t$1,r$1,n,o){let l=[...t$1.__tres.objects],s=J(t$1);if(e$4=J(e$4),s===e$4)return!0;let a$1=z(e$4,t$1.__tres??{},o),c$3=t$1.parent??t$1.__tres.parent??null,i={...t$1.__tres.memoizedProps};delete i.object;for(let f$2 of l)_t$1(f$2,o),wt$1(f$2,o);s.__tres.objects=[],n.remove(t$1);for(let[f$2,v]of Object.entries(i))n.patchProp(a$1,f$2,a$1[f$2],v);r$1(e$4),n.insert(t$1,c$3);for(let f$2 of l)n.insert(f$2,t$1);return!0}function J(e$4){return qr(e$4)?(e$4.object.__tres=e$4.__tres,e$4.object):e$4}function _t$1(e$4,t$1){var n,o,l,s;let r$1=(n=e$4.__tres)?.parent||t$1.scene.value;e$4.__tres&&(e$4.__tres.parent=null),r$1&&r$1.__tres&&`objects`in r$1.__tres&&ln(r$1.__tres.objects,a$1=>a$1!==e$4),(o=e$4.__tres)!=null&&o.attach?un$2(r$1,e$4,e$4.__tres.attach):((s=(l=e$4.parent)?.remove)==null||s.call(l,J(e$4)),e$4.parent=null)}function wt$1(e$4,t$1){var r$1;(r$1=e$4.traverse)==null||r$1.call(e$4,n=>{var o;t$1.deregisterCamera(n),(o=t$1.eventManager)==null||o.deregisterPointerMissedObject(n)}),t$1.deregisterCamera(e$4),yt$1(e$4)}async function dn(e$4,t$1){let r$1=new TextureLoader(t$1),n=o=>new Promise((l,s)=>{r$1.load(o,a$1=>l(a$1),()=>null,()=>{s(Error(`[useTextures] - Failed to load texture`))})});if(rn(e$4)){let o=await Promise.all(e$4.map(l=>n(l)));return e$4.length>1?o:o[0]}else{let{map:o,displacementMap:l,normalMap:s,roughnessMap:a$1,metalnessMap:c$3,aoMap:i,alphaMap:f$2,matcap:v}=e$4;return{map:o?await n(o):null,displacementMap:l?await n(l):null,normalMap:s?await n(s):null,roughnessMap:a$1?await n(a$1):null,metalnessMap:c$3?await n(c$3):null,aoMap:i?await n(i):null,alphaMap:f$2?await n(f$2):null,matcap:v?await n(v):null}}}const to=defineComponent({__name:`component`,props:{map:{},displacementMap:{},normalMap:{},roughnessMap:{},metalnessMap:{},aoMap:{},alphaMap:{},matcap:{}},async setup(e$4){let t$1,r$1,n=e$4,o=([t$1,r$1]=withAsyncContext(()=>reactive(dn(n))),t$1=await t$1,r$1(),t$1);return(l,s)=>renderSlot(l.$slots,`default`,{textures:unref(o)})}}),mn=({sizes:e$4})=>{let t$1=ref([]),r$1=computed(()=>t$1.value[0]),n=s=>{let a$1=s instanceof Camera?s:t$1.value.find(i=>i.uuid===s);if(!a$1)return;let c$3=t$1.value.filter(({uuid:i})=>i!==a$1.uuid);t$1.value=[a$1,...c$3]},o=(s,a$1=!1)=>{if(Ve(s)){let c$3=s;if(t$1.value.some(({uuid:i})=>i===c$3.uuid))return;a$1?n(c$3):t$1.value.push(c$3)}},l=s=>{if(Ve(s)){let a$1=s;t$1.value=t$1.value.filter(({uuid:c$3})=>c$3!==a$1.uuid)}};return watchEffect(()=>{e$4.aspectRatio.value&&t$1.value.forEach(s=>{!s.manual&&(s instanceof PerspectiveCamera||gn(s))&&(s instanceof PerspectiveCamera?s.aspect=e$4.aspectRatio.value:(s.left=e$4.width.value*-.5,s.right=e$4.width.value*.5,s.top=e$4.height.value*.5,s.bottom=e$4.height.value*-.5),s.updateProjectionMatrix())})}),onUnmounted(()=>{t$1.value=[]}),{camera:r$1,cameras:t$1,registerCamera:o,deregisterCamera:l,setCameraActive:n}};function gn(e$4){return e$4.hasOwnProperty(`isOrthographicCamera`)&&e$4.isOrthographicCamera}const ro=!0,fe=`[TresJS ▲ ■ ●] `;function hn(...e$4){typeof e$4[0]==`string`?e$4[0]=fe+e$4[0]:e$4.unshift(fe),console.error(...e$4)}function vn$2(...e$4){typeof e$4[0]==`string`?e$4[0]=fe+e$4[0]:e$4.unshift(fe),console.warn(...e$4)}function yn(e$4,t$1){}function Q$1(){return{logError:hn,logWarning:vn$2,logMessage:yn}}const Ce$1=ref({}),Ee$1=e$4=>Object.assign(Ce$1.value,e$4);function ve(){let e$4=new Map,t$1=new Set,r$1=0,n=!1,o=()=>{let i=Array.from(e$4.entries()).sort((f$2,v)=>{let u=f$2[1].priority-v[1].priority;return u===0?f$2[1].addI-v[1].addI:u});t$1.clear(),i.forEach(f$2=>t$1.add(f$2[0]))},l=i=>{e$4.delete(i),t$1.delete(i)};return{on:(i,f$2=0)=>{e$4.set(i,{priority:f$2,addI:r$1++});let v=()=>l(i);return tryOnScopeDispose$1(v),n=!0,{off:v}},off:l,trigger:(...i)=>{n&&(o(),n=!1),t$1.forEach(f$2=>f$2(...i))},dispose:()=>{e$4.clear(),t$1.clear()},get count(){return e$4.size}}}function _n(){let e$4=!0,t$1=!0,r$1=!1,n=new Clock$1(!1),o=ref(n.running),l=ref(!1),s,a$1=MathUtils.generateUUID(),c$3=null,i=ve(),f$2=ve(),v=ve();S();let u={};function _$1(M$1){u=M$1}function d(M$1,x$1,m=0){switch(x$1){case`before`:return i.on(M$1,m);case`render`:return c$3||=M$1,f$2.dispose(),f$2.on(M$1);case`after`:return v.on(M$1,m)}}function y(){t$1&&(t$1=!1,S(),E())}function p$4(){t$1=!0,S(),cancelAnimationFrame(s)}function h$1(){r$1=!1,S()}function P(){r$1=!0,S()}function C$1(){l.value=!0}function b$1(){l.value=!1}function E(){if(!e$4){s=requestAnimationFrame(E);return}let M$1=n.getDelta(),x$1=n.getElapsedTime(),m={camera:unref(u.camera),scene:unref(u.scene),renderer:unref(u.renderer),raycaster:unref(u.raycaster),controls:unref(u.controls),invalidate:u.invalidate,advance:u.advance},w={delta:M$1,elapsed:x$1,clock:n,...m};o.value&&i.trigger(w),l.value||(f$2.count?f$2.trigger(w):c$3&&c$3(w)),o.value&&v.trigger(w),s=requestAnimationFrame(E)}function S(){let M$1=!t$1&&!r$1;n.running!==M$1&&(n.running?n.stop():n.start()),o.value=n.running}return{loopId:a$1,register:(M$1,x$1,m)=>d(M$1,x$1,m),start:y,stop:p$4,pause:P,resume:h$1,pauseRender:C$1,resumeRender:b$1,isRenderPaused:l,isActive:o,setContext:_$1,setReady:M$1=>e$4=M$1}}function Le(e$4){let t$1=0;return e$4.traverse(r$1=>{if(r$1.isMesh&&r$1.geometry&&r$1.type!==`HightlightMesh`){let n=r$1.geometry,o=n.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,l=n.index?n.index.count*Uint32Array.BYTES_PER_ELEMENT:0,s=n.attributes.normal?n.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,a$1=n.attributes.uv?n.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,c$3=o+l+s+a$1;t$1+=c$3}}),t$1}function wn(e$4){return(e$4/1024).toFixed(2)}const bn=Number.parseInt(REVISION.replace(`dev`,``));function Mn(e$4){return e$4 instanceof Color?e$4:Array.isArray(e$4)?new Color(...e$4):new Color(e$4)}const oe={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:SRGBColorSpace,toneMapping:ACESFilmicToneMapping,toneMappingExposure:3,shadowMap:{enabled:!0,type:PCFSoftShadowMap}},flat:{toneMapping:NoToneMapping,toneMappingExposure:1}};function Pn({canvas:e$4,options:t$1,contextParts:{sizes:r$1,render:n,invalidate:o,advance:l}}){let s=computed(()=>({alpha:toValue$2(t$1.alpha)??!0,depth:toValue$2(t$1.depth),canvas:unrefElement$1(e$4),context:toValue$2(t$1.context),stencil:toValue$2(t$1.stencil),antialias:toValue$2(t$1.antialias)??!0,precision:toValue$2(t$1.precision),powerPreference:toValue$2(t$1.powerPreference),premultipliedAlpha:toValue$2(t$1.premultipliedAlpha),preserveDrawingBuffer:toValue$2(t$1.preserveDrawingBuffer),logarithmicDepthBuffer:toValue$2(t$1.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:toValue$2(t$1.failIfMajorPerformanceCaveat)})),a$1=shallowRef(new WebGLRenderer(s.value));function c$3(){t$1.renderMode===`on-demand`&&o()}watch(s,()=>{a$1.value.dispose(),a$1.value=new WebGLRenderer(s.value),c$3()}),watch([r$1.width,r$1.height],()=>{a$1.value.setSize(r$1.width.value,r$1.height.value),c$3()},{immediate:!0}),watch(()=>t$1.clearColor,c$3);let{pixelRatio:i}=useDevicePixelRatio(),{logError:f$2}=Q$1(),u=(()=>{let d=new WebGLRenderer,y={shadowMap:{enabled:d.shadowMap.enabled,type:d.shadowMap.type},toneMapping:d.toneMapping,toneMappingExposure:d.toneMappingExposure,outputColorSpace:d.outputColorSpace};return d.dispose(),y})(),_$1=toValue$2(t$1.renderMode);return _$1===`on-demand`&&o(),_$1===`manual`&&setTimeout(()=>{l()},100),watchEffect(()=>{let d=toValue$2(t$1.preset);d&&(d in oe||f$2(`Renderer Preset must be one of these: ${Object.keys(oe).join(`, `)}`),gt$1(a$1.value,oe[d])),fn$4(a$1.value,i.value,toValue$2(t$1.dpr)),_$1===`always`&&(n.frames.value=Math.max(1,n.frames.value));let y=(P,C$1)=>{let b$1=toValue$2(P),E=()=>{if(d)return qe(oe[d],C$1)};if(b$1!==void 0)return b$1;let S=E();return S===void 0?qe(u,C$1):S},p$4=(P,C$1)=>en(a$1.value,C$1,y(P,C$1));p$4(t$1.shadows,`shadowMap.enabled`),p$4(t$1.toneMapping??ACESFilmicToneMapping,`toneMapping`),p$4(t$1.shadowMapType,`shadowMap.type`),bn<150&&p$4(!t$1.useLegacyLights,`physicallyCorrectLights`),p$4(t$1.outputColorSpace,`outputColorSpace`),p$4(t$1.toneMappingExposure,`toneMappingExposure`);let h$1=y(t$1.clearColor,`clearColor`);h$1&&a$1.value.setClearColor(h$1?Mn(h$1):new Color(0))}),onUnmounted(()=>{a$1.value.dispose(),a$1.value.forceContextLoss()}),{renderer:a$1}}function Cn(e$4,t$1,r$1=10){let n=toValue$2(e$4)?useWindowSize$1():useElementSize(computed(()=>toValue$2(t$1).parentElement)),o=readonly$1(refDebounced$1(n.width,r$1)),l=readonly$1(refDebounced$1(n.height,r$1)),s=computed(()=>o.value/l.value);return{height:l,width:o,aspectRatio:s}}const En=(e$4,t$1)=>{let r$1=computed(()=>t$1.renderer.value.domElement),n=shallowRef([]),{x:o,y:l}=usePointer$1({target:r$1}),s=0,{width:a$1,height:c$3,top:i,left:f$2}=useElementBounding$1(r$1),v=({x:g,y:T})=>{if(r$1.value)return{x:(g-f$2.value)/a$1.value*2-1,y:-((T-i.value)/c$3.value)*2+1}},u=({x:g,y:T})=>{if(t$1.camera.value)return t$1.raycaster.value.setFromCamera(new Vector2(g,T),t$1.camera.value),n.value=t$1.raycaster.value.intersectObjects(e$4.value,!0),n.value},_$1=g=>{let T=v({x:g?.clientX??o.value,y:g?.clientY??l.value});return T&&u(T)||[]},d=createEventHook(),y=createEventHook(),p$4=createEventHook(),h$1=createEventHook(),P=createEventHook(),C$1=createEventHook(),b$1=createEventHook(),E=createEventHook();function S(g){let T={};for(let U in g)typeof U!=`function`&&(T[U]=g[U]);return T}let M$1=(g,T)=>{var Ie,$e$1,He;let U=S(T),re$2=new Vector3(T?.clientX,T?.clientY,0).unproject((Ie=t$1.camera)?.value);g.trigger({...U,intersections:n.value,unprojectedPoint:re$2,ray:($e$1=t$1.raycaster)?.value.ray,camera:(He=t$1.camera)?.value,sourceEvent:T,delta:s,stopPropagating:!1})},x$1,m=g=>{_$1(g),M$1(p$4,g),x$1=g},w=()=>{x$1&&m(x$1)},k$3,L,R,B=g=>{var T;k$3=(T=n.value[0])?.object,s=0,L=new Vector2(g?.clientX??o.value,g?.clientY??l.value),M$1(P,g)},O$1,G=!1,Oe$1=g=>{var T,U,re$2;g instanceof PointerEvent&&(n.value.length===0&&M$1(C$1,g),k$3===(T=n.value[0])?.object&&(R=new Vector2(g?.clientX??o.value,g?.clientY??l.value),s=L?.distanceTo(R),g.button===0?(M$1(d,g),O$1===(U=n.value[0])?.object?G=!0:(O$1=(re$2=n.value[0])?.object,G=!1)):g.button===2&&M$1(b$1,g)),M$1(h$1,g))},De=g=>{G&&(M$1(y,g),O$1=void 0,G=!1)},je=g=>M$1(p$4,g),Be$1=g=>M$1(E,g);return r$1.value.addEventListener(`pointerup`,Oe$1),r$1.value.addEventListener(`pointerdown`,B),r$1.value.addEventListener(`pointermove`,m),r$1.value.addEventListener(`pointerleave`,je),r$1.value.addEventListener(`dblclick`,De),r$1.value.addEventListener(`wheel`,Be$1),onUnmounted(()=>{r$1!=null&&r$1.value&&(r$1.value.removeEventListener(`pointerup`,Oe$1),r$1.value.removeEventListener(`pointerdown`,B),r$1.value.removeEventListener(`pointermove`,m),r$1.value.removeEventListener(`pointerleave`,je),r$1.value.removeEventListener(`dblclick`,De),r$1.value.removeEventListener(`wheel`,Be$1))}),{intersects:n,onClick:g=>d.on(g).off,onDblClick:g=>y.on(g).off,onContextMenu:g=>b$1.on(g).off,onPointerMove:g=>p$4.on(g).off,onPointerUp:g=>h$1.on(g).off,onPointerDown:g=>P.on(g).off,onPointerMissed:g=>C$1.on(g).off,onWheel:g=>E.on(g).off,forceUpdate:w}};function ye(e$4,t$1){if(Array.isArray(e$4))for(let r$1 of e$4)r$1(t$1);typeof e$4==`function`&&e$4(t$1)}function Tn(e$4,t$1,r$1){var x$1;let n=shallowRef(),o=shallowRef();e$4&&(n.value=e$4),t$1&&(o.value=t$1);let l=m=>{var w;return(w=m.__tres)?.eventCount>0},s=m=>{var w;return(w=m.children)?.some(k$3=>s(k$3))||l(m)},a$1=shallowRef(((x$1=n.value)?.children).filter(s)||[]);function c$3(m,w){let k$3=[],L=()=>w.stopPropagating=!0;w.stopPropagation=L;for(let R of w?.intersections){if(w.stopPropagating)return;w={...w,...R};let{object:B}=R;w.eventObject=B,ye(B[m],w),k$3.push(B);let O$1=B.parent;for(;O$1!==null&&!w.stopPropagating&&!k$3.includes(O$1);)w.eventObject=O$1,ye(O$1[m],w),k$3.push(O$1),O$1=O$1.parent;let G=Xr(m.slice(2));r$1(G,{intersection:R,event:w})}}let{onClick:i,onDblClick:f$2,onContextMenu:v,onPointerMove:u,onPointerDown:_$1,onPointerUp:d,onPointerMissed:y,onWheel:p$4,forceUpdate:h$1}=En(a$1,t$1);d(m=>c$3(`onPointerUp`,m)),_$1(m=>c$3(`onPointerDown`,m)),i(m=>c$3(`onClick`,m)),f$2(m=>c$3(`onDoubleClick`,m)),v(m=>c$3(`onContextMenu`,m)),p$4(m=>c$3(`onWheel`,m));let P=[];u(m=>{let w=m.intersections.map(({object:L})=>L),k$3=m.intersections;P.forEach(({object:L})=>{w.includes(L)||(m.intersections=P,c$3(`onPointerLeave`,m),c$3(`onPointerOut`,m))}),m.intersections=k$3,m.intersections.forEach(({object:L})=>{P.includes(L)||(c$3(`onPointerEnter`,m),c$3(`onPointerOver`,m))}),c$3(`onPointerMove`,m),P=m.intersections});let C$1=[];y(m=>{let w=()=>m.stopPropagating=!0;m.stopPropagation=w,C$1.forEach(k$3=>{m.stopPropagating||(m.eventObject=k$3,ye(k$3.onPointerMissed,m))}),r$1(`pointer-missed`,{event:m})});function b$1(m){ne(m)&&N(m)&&a$1.value.push(m)}function E(m){if(ne(m)&&N(m)){let w=a$1.value.indexOf(m);w>-1&&a$1.value.splice(w,1)}}function S(m){ne(m)&&N(m)&&m.onPointerMissed&&C$1.push(m)}function M$1(m){if(ne(m)&&N(m)){let w=C$1.indexOf(m);w>-1&&C$1.splice(w,1)}}return t$1.eventManager={forceUpdate:h$1,registerObject:b$1,deregisterObject:E,registerPointerMissedObject:S,deregisterPointerMissedObject:M$1},{forceUpdate:h$1,registerObject:b$1,deregisterObject:E,registerPointerMissedObject:S,deregisterPointerMissedObject:M$1}}function Sn(e$4,t$1,r$1=100){r$1=r$1<=0?100:r$1;let n=createEventHook(),o=new Set,l=!1,s=!1,a$1=null;function c$3(){a$1&&clearTimeout(a$1),!s&&!l&&e$4()?(n.trigger(t$1),o.forEach(u=>u()),o.clear(),l=!0):!s&&!l&&(a$1=setTimeout(c$3,r$1))}function i(){s=!0,a$1&&clearTimeout(a$1)}c$3();let f$2=(u,..._$1)=>{u(..._$1)};return{on:u=>{if(l)return f$2(u,t$1),{off:()=>{}};{let _$1=n.on(u);return o.add(_$1.off),n.on(u)}},off:n.off,trigger:n.trigger,clear:n.clear,cancel:i}}const ee$1=new WeakMap;function bt$1(e$4){if(e$4||=pe(),ee$1.has(e$4))return ee$1.get(e$4);let t$1=100,r$1=Date.now(),l=Sn(()=>{if(Date.now()-r$1>=t$1)return!0;{let s=e$4.renderer.value,a$1=s?.domElement||{width:0,height:0};return!!(s&&a$1.width>0&&a$1.height>0)}},e$4);return ee$1.set(e$4,l),l}function An({scene:e$4,canvas:t$1,windowSize:r$1,rendererOptions:n,emit:o}){let l=shallowRef(e$4),s=Cn(r$1,t$1),{camera:a$1,cameras:c$3,registerCamera:i,deregisterCamera:f$2,setCameraActive:v}=mn({sizes:s}),u={mode:ref(n.renderMode||`always`),priority:ref(0),frames:ref(0),maxFrames:60,canBeInvalidated:computed(()=>u.mode.value===`on-demand`&&u.frames.value===0)};function _$1(R=1){n.renderMode===`on-demand`&&(u.frames.value=Math.min(u.maxFrames,u.frames.value+R))}function d(){n.renderMode===`manual`&&(u.frames.value=1)}let{renderer:y}=Pn({canvas:t$1,options:n,contextParts:{sizes:s,render:u,invalidate:_$1,advance:d}}),p$4={sizes:s,scene:l,camera:a$1,cameras:readonly$1(c$3),renderer:y,raycaster:shallowRef(new Raycaster),controls:ref(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:u,advance:d,extend:Ee$1,invalidate:_$1,registerCamera:i,setCameraActive:v,deregisterCamera:f$2,loop:_n()};provide(`useTres`,p$4),p$4.scene.value.__tres={root:p$4},p$4.loop.register(()=>{a$1.value&&u.frames.value>0&&(y.value.render(e$4,a$1.value),o(`render`,p$4.renderer.value)),u.priority.value=0,u.mode.value===`always`?u.frames.value=1:u.frames.value=Math.max(0,u.frames.value-1)},`render`);let{on:h$1,cancel:P}=bt$1(p$4);p$4.loop.setReady(!1),p$4.loop.start(),h$1(()=>{o(`ready`,p$4),p$4.loop.setReady(!0),Tn(e$4,p$4,o)}),onUnmounted(()=>{P(),p$4.loop.stop()});let C$1=100,b$1=useFps({every:C$1}),{isSupported:E,memory:S}=useMemory({interval:C$1}),M$1=160,x$1=performance.now(),m=({timestamp:R})=>{p$4.scene.value&&(p$4.perf.memory.allocatedMem=Le(p$4.scene.value)),R-x$1>=C$1&&(x$1=R,p$4.perf.fps.accumulator.push(b$1.value),p$4.perf.fps.accumulator.length>M$1&&p$4.perf.fps.accumulator.shift(),p$4.perf.fps.value=b$1.value,E.value&&S.value&&(p$4.perf.memory.accumulator.push(S.value.usedJSHeapSize/1024/1024),p$4.perf.memory.accumulator.length>M$1&&p$4.perf.memory.accumulator.shift(),p$4.perf.memory.currentMem=p$4.perf.memory.accumulator.reduce((B,O$1)=>B+O$1,0)/p$4.perf.memory.accumulator.length))},w=0,k$3=1,{pause:L}=useRafFn(({delta:R})=>{window.__TRES__DEVTOOLS__&&(m({timestamp:performance.now()}),w+=R,w>=k$3&&(window.__TRES__DEVTOOLS__.cb(p$4),w=0))},{immediate:!0});return onUnmounted(()=>{L()}),p$4}function pe(){let e$4=inject(`useTres`);if(!e$4)throw Error(`useTresContext must be used together with useTresContextProvider`);return e$4}function io(){let{camera:e$4,scene:t$1,renderer:r$1,loop:n,raycaster:o,controls:l,invalidate:s,advance:a$1}=pe();n.setContext({camera:e$4,scene:t$1,renderer:r$1,raycaster:o,controls:l,invalidate:s,advance:a$1});function c$3(v,u=0){return n.register(v,`before`,u)}function i(v){return n.register(v,`render`)}function f$2(v,u=0){return n.register(v,`after`,u)}return{pause:n.pause,resume:n.resume,pauseRender:n.pauseRender,resumeRender:n.resumeRender,isActive:n.isActive,onBeforeRender:c$3,render:i,onAfterRender:f$2}}const Mt=createEventHook(),Pt$1=createEventHook(),Re=createEventHook(),te=new Clock$1;let le=0,ce=0;const{pause:xn,resume:Xe,isActive:kn}=useRafFn(()=>{Mt.trigger({delta:le,elapsed:ce,clock:te}),Pt$1.trigger({delta:le,elapsed:ce,clock:te}),Re.trigger({delta:le,elapsed:ce,clock:te})},{immediate:!1});Re.on(()=>{le=te.getDelta(),ce=te.getElapsedTime()});function Ln(e$4,t$1={},r$1={}){let n=e$4,o=a$1=>{n=a$1},l=new Proxy({},{}),s={has(a$1,c$3){return c$3 in t$1||c$3 in n},get(a$1,c$3,i){return c$3 in t$1?t$1[c$3](n):n[c$3]},set(a$1,c$3,i){return r$1[c$3]?r$1[c$3](i,n,l,o):n[c$3]=i,!0}};return l=new Proxy({},s),l}const{logError:et}=Q$1(),tt=[`onClick`,`onContextMenu`,`onPointerMove`,`onPointerEnter`,`onPointerLeave`,`onPointerOver`,`onPointerOut`,`onDoubleClick`,`onPointerDown`,`onPointerUp`,`onPointerCancel`,`onPointerMissed`,`onLostPointerCapture`,`onWheel`],Rn=e$4=>{let t$1=e$4.scene.value;function r$1(i,f$2,v,u){if(u||={},u.args||=[],i===`template`||Jr(i))return null;let _$1=i.replace(`Tres`,``),d;if(i===`primitive`){(!j(u.object)||isRef(u.object))&&et(`Tres primitives need an 'object' prop, whose value is an object or shallowRef`),_$1=u.object.type;let y={};d=Ln(u.object,{object:h$1=>h$1,isPrimitive:()=>!0,__tres:()=>y},{object:(h$1,P,C$1,b$1)=>{pn(h$1,C$1,b$1,{patchProp:l,remove:o,insert:n},e$4)},__tres:h$1=>{Object.assign(y,h$1)}})}else{let y=Ce$1.value[_$1];y||et(`${_$1} is not defined on the THREE namespace. Use extend to add it to the catalog.`),d=new y(...u.args)}return d?(d.isCamera&&(u!=null&&u.position||d.position.set(3,3,3),u!=null&&u.lookAt||d.lookAt(0,0,0)),d=z(d,{...d.__tres,type:_$1,memoizedProps:u,eventCount:0,primitive:i===`primitive`,attach:u.attach},e$4),d):null}function n(i,f$2){var _$1,d,y;if(!i)return;f$2||=t$1;let v=i.__tres?i:z(i,{},e$4),u=f$2.__tres?f$2:z(f$2,{},e$4);i=J(v),f$2=J(u),i.__tres&&(_$1=i.__tres)?.eventCount>0&&((d=e$4.eventManager)==null||d.registerObject(i)),e$4.registerCamera(i),(y=e$4.eventManager)==null||y.registerPointerMissedObject(i),v.__tres.attach?cn$1(u,v,v.__tres.attach):N(i)&&N(u)&&(u.add(i),i.dispatchEvent({type:`added`})),v.__tres.parent=u,u.__tres.objects&&!u.__tres.objects.includes(v)&&u.__tres.objects.push(v)}function o(i,f$2){var d,y,p$4,h$1;if(!i)return;i!=null&&i.__tres&&(d=i.__tres)?.eventCount>0&&((y=e$4.eventManager)==null||y.deregisterObject(i)),f$2=be(f$2)?`default`:f$2;let v=(p$4=i.__tres)?.dispose;be(v)||(f$2=v===null?!1:v);let u=(h$1=i.__tres)?.primitive,_$1=f$2===`default`?!u:!!f$2;if(i.__tres&&`objects`in i.__tres&&[...i.__tres.objects].forEach(P=>o(P,f$2)),_$1&&i.children&&[...i.children].forEach(P=>o(P,f$2)),_t$1(i,e$4),wt$1(i,e$4),_$1&&!Yr(i)){if(Y(f$2))f$2(i);else if(Y(i.dispose))try{i.dispose()}catch{}}`__tres`in i&&delete i.__tres}function l(i,f$2,v,u){var P,C$1;if(!i)return;let _$1=i,d=f$2;if(i.__tres&&(i.__tres.memoizedProps[f$2]=u),f$2===`attach`){let b$1=(P=i.__tres)?.parent||i.parent;o(i),z(i,{attach:u},e$4),b$1&&n(i,b$1);return}if(f$2===`dispose`){i.__tres||(i=z(i,{},e$4)),i.__tres.dispose=u;return}if(N(i)&&d===`blocks-pointer-events`){u||u===``?i[d]=u:delete i[d];return}tt.includes(f$2)&&i.__tres&&(i.__tres.eventCount+=1);let y=he(d),p$4=_$1?.[y];if(d===`args`){let b$1=i,E=v??[],S=u??[],M$1=(C$1=i.__tres)?.type||i.type;M$1&&E.length&&!tn(E,S)&&(_$1=Object.assign(b$1,new Ce$1.value[M$1](...u)));return}if(_$1.type===`BufferGeometry`){if(d===`args`)return;_$1.setAttribute(he(d),new BufferAttribute(...u));return}if(d.includes(`-`)&&p$4===void 0){p$4=_$1;for(let b$1 of d.split(`-`))y=d=he(b$1),_$1=p$4,p$4=p$4?.[d]}let h$1=u;if(h$1===``&&(h$1=!0),Y(p$4)){tt.includes(f$2)||(ke(h$1)?i[y](...h$1):i[y](h$1)),y.startsWith(`on`)&&Y(h$1)&&(_$1[y]=h$1);return}Ge(p$4)&&Ge(h$1)?p$4.mask=h$1.mask:mt$1(p$4)&&Ur(h$1)?p$4.set(h$1):Fr(p$4)&&Wr(h$1)&&p$4.constructor===h$1.constructor?p$4.copy(h$1):Me(p$4)&&Array.isArray(h$1)?`fromArray`in p$4&&typeof p$4.fromArray==`function`?p$4.fromArray(h$1):p$4.set(...h$1):Me(p$4)&&typeof h$1==`number`?`setScalar`in p$4&&typeof p$4.setScalar==`function`?p$4.setScalar(h$1):p$4.set(h$1):_$1[y]=h$1,yt$1(i)}function s(i){var f$2;return(f$2=i?.__tres)?.parent||null}function a$1(i){let f$2=z(new Object3D,{type:`Comment`},e$4);return f$2.name=i,f$2}function c$3(i){var _$1;let f$2=s(i),v=(_$1=f$2?.__tres)?.objects||[],u=v.indexOf(i);return u<0||u>=v.length-1?null:v[u+1]}return{insert:n,remove:o,createElement:r$1,patchProp:l,parentNode:s,createText:()=>void 0,createComment:a$1,setText:()=>void 0,setElementText:()=>void 0,nextSibling:c$3,querySelector:()=>void 0,setScopeId:()=>void 0,cloneNode:()=>void 0,insertStaticContent:()=>void 0}};function On(){return Ct$1().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ct$1(){return typeof navigator<`u`&&typeof window<`u`?window:typeof globalThis<`u`?globalThis:{}}const Dn=typeof Proxy==`function`,jn=`devtools-plugin:setup`,Bn=`plugin:settings:set`;let V,Te$1;function In(){var e$4;return V!==void 0||(typeof window<`u`&&window.performance?(V=!0,Te$1=window.performance):typeof globalThis<`u`&&(e$4=globalThis.perf_hooks)!=null&&e$4.performance?(V=!0,Te$1=globalThis.perf_hooks.performance):V=!1),V}function $n(){return In()?Te$1.now():Date.now()}var Hn=class{constructor(t$1,r$1){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t$1,this.hook=r$1;let n={};if(t$1.settings)for(let s in t$1.settings){let a$1=t$1.settings[s];n[s]=a$1.defaultValue}let o=`__vue-devtools-plugin-settings__${t$1.id}`,l=Object.assign({},n);try{let s=localStorage.getItem(o),a$1=JSON.parse(s);Object.assign(l,a$1)}catch{}this.fallbacks={getSettings(){return l},setSettings(s){try{localStorage.setItem(o,JSON.stringify(s))}catch{}l=s},now(){return $n()}},r$1&&r$1.on(Bn,(s,a$1)=>{s===this.plugin.id&&this.fallbacks.setSettings(a$1)}),this.proxiedOn=new Proxy({},{get:(s,a$1)=>this.target?this.target.on[a$1]:(...c$3)=>{this.onQueue.push({method:a$1,args:c$3})}}),this.proxiedTarget=new Proxy({},{get:(s,a$1)=>this.target?this.target[a$1]:a$1===`on`?this.proxiedOn:Object.keys(this.fallbacks).includes(a$1)?(...c$3)=>(this.targetQueue.push({method:a$1,args:c$3,resolve:()=>{}}),this.fallbacks[a$1](...c$3)):(...c$3)=>new Promise(i=>{this.targetQueue.push({method:a$1,args:c$3,resolve:i})})})}async setRealTarget(t$1){this.target=t$1;for(let r$1 of this.onQueue)this.target.on[r$1.method](...r$1.args);for(let r$1 of this.targetQueue)r$1.resolve(await this.target[r$1.method](...r$1.args))}};function Un(e$4,t$1){let r$1=e$4,n=Ct$1(),o=On(),l=Dn&&r$1.enableEarlyProxy;if(o&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!l))o.emit(jn,e$4,t$1);else{let s=l?new Hn(r$1,o):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:r$1,setupFn:t$1,proxy:s}),s&&t$1(s.proxiedTarget)}}function Fn(e$4,t$1){let r$1=`▲ ■ ●${e$4}`;typeof rt$1==`function`?rt$1(r$1,t$1):console.log(r$1)}function rt$1(e$4,t$1){throw Error(e$4+t$1)}const Et=e$4=>{let t$1={id:e$4.uuid,label:e$4.type,children:[],tags:[]};e$4.name!==``&&t$1.tags.push({label:e$4.name,textColor:5750629,backgroundColor:15793395});let r$1=Le(e$4);return r$1>0&&t$1.tags.push({label:`${wn(r$1)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:`Memory usage`}),e$4.type.includes(`Light`)&&(Gr(e$4)&&t$1.tags.push({label:`${e$4.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:`Intensity`}),t$1.tags.push({label:`#${new Color(e$4.color).getHexString()}`,textColor:9738662,backgroundColor:16316922,tooltip:`Color`})),e$4.type.includes(`Camera`)&&(t$1.tags.push({label:`${e$4.fov}°`,textColor:9738662,backgroundColor:16316922,tooltip:`Field of view`}),t$1.tags.push({label:`x: ${Math.round(e$4.position.x)} y: ${Math.round(e$4.position.y)} z: ${Math.round(e$4.position.z)}`,textColor:9738662,backgroundColor:16316922,tooltip:`Position`})),t$1};function Tt$1(e$4,t$1,r$1=``){e$4.children.forEach(n=>{if(n.type===`HightlightMesh`||r$1&&!n.type.includes(r$1)&&!n.name.includes(r$1))return;let o=Et(n);t$1.children.push(o),Tt$1(n,o,r$1)})}const Wn=[],X=`tres:inspector`,Nn=reactive({sceneGraph:null});function zn(e$4,t$1){Un({id:`dev.esm.tres`,label:`TresJS 🪐`,logo:`https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg`,packageName:`tresjs`,homepage:`https://tresjs.org`,componentStateTypes:Wn,app:e$4},r$1=>{typeof r$1.now!=`function`&&Fn(`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.`),r$1.addInspector({id:X,label:`TresJS 🪐`,icon:`account_tree`,treeFilterPlaceholder:`Search instances`}),setInterval(()=>{r$1.sendInspectorTree(X)},1e3),setInterval(()=>{r$1.notifyComponentUpdate()},5e3),r$1.on.getInspectorTree(l=>{if(l.inspectorId===X){let s=Et(t$1.scene.value);Tt$1(t$1.scene.value,s,l.filter),Nn.sceneGraph=s,l.rootNodes=[s]}});let n=null,o=null;r$1.on.getInspectorState(l=>{var s;if(l.inspectorId===X){let[a$1]=t$1.scene.value.getObjectsByProperty(`uuid`,l.nodeId);if(!a$1)return;if(o&&n&&n.parent&&o.remove(n),a$1.isMesh){let c$3=on(a$1);a$1.add(c$3),n=c$3,o=a$1}l.state={object:Object.entries(a$1).map(([c$3,i])=>c$3===`children`?{key:c$3,value:i.filter(f$2=>f$2.type!==`HightlightMesh`)}:{key:c$3,value:i,editable:!0}).filter(({key:c$3})=>c$3!==`parent`)},a$1.isScene&&(l.state={...l.state,state:[{key:`Scene Info`,value:{objects:a$1.children.length,memory:Le(a$1),calls:t$1.renderer.value.info.render.calls,triangles:t$1.renderer.value.info.render.triangles,points:t$1.renderer.value.info.render.points,lines:t$1.renderer.value.info.render.lines}},{key:`Programs`,value:(s=t$1.renderer.value.info.programs)?.map(c$3=>({...c$3,programName:c$3.name}))||[]}]})}}),r$1.on.editInspectorState(l=>{l.inspectorId===X&&nn(t$1.scene.value,l.nodeId,l.path,l.state.value)})})}const Gn=[`data-scene`,`data-tres`],Vn=defineComponent({__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$4,{expose:t$1,emit:r$1}){let n=e$4,o=r$1,l=useSlots(),s=ref(),a$1=shallowRef(new Scene),c$3=getCurrentInstance();Ee$1(three_module_exports);let i=(d,y=!1)=>defineComponent({setup(){var C$1;let p$4=(C$1=getCurrentInstance())?.appContext;p$4&&(p$4.app=c$3?.appContext.app);let h$1={};function P(b$1){b$1&&(b$1.parent&&P(b$1.parent),b$1.provides&&Object.assign(h$1,b$1.provides))}return c$3!=null&&c$3.parent&&n.enableProvideBridge&&(P(c$3.parent),Reflect.ownKeys(h$1).forEach(b$1=>{provide(b$1,h$1[b$1])})),provide(`useTres`,d),provide(`extend`,Ee$1),typeof window<`u`&&zn(p$4?.app,d),()=>h(Fragment,null,y?[]:l.default())}}),f$2=(d,y=!1)=>{let p$4=i(d,y),{render:h$1}=createRenderer(Rn(d));h$1(h(p$4),a$1.value)},v=(d,y=!1)=>{vt$1(d.scene.value),y&&(d.renderer.value.dispose(),d.renderer.value.renderLists.dispose(),d.renderer.value.forceContextLoss()),a$1.value.__tres={root:d}},u=shallowRef(null);t$1({context:u,dispose:()=>v(u.value,!0)});let _$1=()=>{v(u.value),f$2(u.value,!0)};return onMounted(()=>{let d=s;u.value=An({scene:a$1.value,canvas:d,windowSize:n.windowSize??!1,rendererOptions:n,emit:o});let{registerCamera:y,camera:p$4,cameras:h$1,deregisterCamera:P}=u.value;f$2(u.value);let C$1=()=>{let b$1=new PerspectiveCamera(45,window.innerWidth/window.innerHeight,.1,1e3);b$1.position.set(3,3,3),b$1.lookAt(0,0,0),y(b$1);let E=watchEffect(()=>{h$1.value.length>=2&&(b$1.removeFromParent(),P(b$1),E?.())})};watch(()=>n.camera,(b$1,E)=>{b$1&&y(b$1),E&&(E.removeFromParent(),P(E))},{immediate:!0}),p$4.value||C$1()}),onUnmounted(_$1),(d,y)=>(openBlock(),createElementBlock(`canvas`,{ref_key:`canvas`,ref:s,"data-scene":a$1.value.uuid,class:normalizeClass(d.$attrs.class),"data-tres":`tresjs ${unref(jr).version}`,style:normalizeStyle({display:`block`,width:`100%`,height:`100%`,position:d.windowSize?`fixed`:`relative`,top:0,left:0,pointerEvents:`auto`,touchAction:`none`,...d.$attrs.style})},null,14,Gn))}}),Yn=[`TresCanvas`,`TresLeches`,`TresScene`],co={template:{compilerOptions:{isCustomElement:e$4=>e$4.startsWith(`Tres`)&&!Yn.includes(e$4)||e$4===`primitive`}}},{logWarning:qn}=Q$1();var St$1=class extends Line{constructor(t$1,r$1){let n=[1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],o=new BufferGeometry;o.setAttribute(`position`,new Float32BufferAttribute(n,3)),o.computeBoundingSphere();let l=new LineBasicMaterial({fog:!1});super(o,l),this.light=t$1,this.color=r$1,this.type=`RectAreaLightHelper`;let s=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],a$1=new BufferGeometry;a$1.setAttribute(`position`,new Float32BufferAttribute(s,3)),a$1.computeBoundingSphere(),this.add(new Mesh(a$1,new MeshBasicMaterial({side:BackSide,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 t$1=this.material.color,r$1=Math.max(t$1.r,t$1.g,t$1.b);r$1>1&&t$1.multiplyScalar(1/r$1),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:nt}=Q$1();let se,F;const Kn={DirectionalLight:DirectionalLightHelper,PointLight:PointLightHelper,SpotLight:SpotLightHelper,HemisphereLight:HemisphereLightHelper,RectAreaLight:St$1},fo={mounted:e$4=>{if(!e$4.isLight){nt(`${e$4.type} is not a light`);return}se=Kn[e$4.type],e$4.parent.add(new se(e$4,1,e$4.color.getHex()))},updated:e$4=>{F=e$4.parent.children.find(t$1=>t$1 instanceof se),!(F instanceof St$1)&&F.update()},unmounted:e$4=>{if(!e$4.isLight){nt(`${e$4.type} is not a light`);return}F=e$4.parent.children.find(t$1=>t$1 instanceof se),F&&F.dispose&&F.dispose(),e$4.parent&&e$4.parent.remove(F)}},po={mounted:(e$4,t$1)=>{if(t$1.arg){console.log(`v-log:${t$1.arg}`,e$4[t$1.arg]);return}console.log(`v-log`,e$4)}},mo={install(e$4){e$4.component(`TresCanvas`,Vn)}};var require_nprogress=__commonJSMin(((exports,module)=>{(function(root$3,factory){typeof define==`function`&&define.amd?define(factory):typeof exports==`object`?module.exports=factory():root$3.NProgress=factory()})(exports,function(){var NProgress$1={};NProgress$1.version=`0.2.0`;var Settings=NProgress$1.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:`
`};NProgress$1.configure=function(options$1){var key$2,value$1;for(key$2 in options$1)value$1=options$1[key$2],value$1!==void 0&&options$1.hasOwnProperty(key$2)&&(Settings[key$2]=value$1);return this},NProgress$1.status=null,NProgress$1.set=function(n){var started=NProgress$1.isStarted();n=clamp$8(n,Settings.minimum,1),NProgress$1.status=n===1?null:n;var progress$1=NProgress$1.render(!started),bar=progress$1.querySelector(Settings.barSelector),speed=Settings.speed,ease=Settings.easing;return progress$1.offsetWidth,queue$1(function(next){Settings.positionUsing===``&&(Settings.positionUsing=NProgress$1.getPositioningCSS()),css(bar,barPositionCSS(n,speed,ease)),n===1?(css(progress$1,{transition:`none`,opacity:1}),progress$1.offsetWidth,setTimeout(function(){css(progress$1,{transition:`all `+speed+`ms linear`,opacity:0}),setTimeout(function(){NProgress$1.remove(),next()},speed)},speed)):setTimeout(next,speed)}),this},NProgress$1.isStarted=function(){return typeof NProgress$1.status==`number`},NProgress$1.start=function(){NProgress$1.status||NProgress$1.set(0);var work=function(){setTimeout(function(){NProgress$1.status&&(NProgress$1.trickle(),work())},Settings.trickleSpeed)};return Settings.trickle&&work(),this},NProgress$1.done=function(force){return!force&&!NProgress$1.status?this:NProgress$1.inc(.3+.5*Math.random()).set(1)},NProgress$1.inc=function(amount){var n=NProgress$1.status;return n?(typeof amount!=`number`&&(amount=(1-n)*clamp$8(Math.random()*n,.1,.95)),n=clamp$8(n+amount,0,.994),NProgress$1.set(n)):NProgress$1.start()},NProgress$1.trickle=function(){return NProgress$1.inc(Math.random()*Settings.trickleRate)},(function(){var initial=0,current=0;NProgress$1.promise=function($promise){return!$promise||$promise.state()===`resolved`?this:(current===0&&NProgress$1.start(),initial++,current++,$promise.always(function(){current--,current===0?(initial=0,NProgress$1.done()):NProgress$1.set((initial-current)/initial)}),this)}})(),NProgress$1.render=function(fromStart){if(NProgress$1.isRendered())return document.getElementById(`nprogress`);addClass(document.documentElement,`nprogress-busy`);var progress$1=document.createElement(`div`);progress$1.id=`nprogress`,progress$1.innerHTML=Settings.template;var bar=progress$1.querySelector(Settings.barSelector),perc=fromStart?`-100`:toBarPerc(NProgress$1.status||0),parent=document.querySelector(Settings.parent),spinner;return css(bar,{transition:`all 0 linear`,transform:`translate3d(`+perc+`%,0,0)`}),Settings.showSpinner||(spinner=progress$1.querySelector(Settings.spinnerSelector),spinner&&removeElement(spinner)),parent!=document.body&&addClass(parent,`nprogress-custom-parent`),parent.appendChild(progress$1),progress$1},NProgress$1.remove=function(){removeClass(document.documentElement,`nprogress-busy`),removeClass(document.querySelector(Settings.parent),`nprogress-custom-parent`);var progress$1=document.getElementById(`nprogress`);progress$1&&removeElement(progress$1)},NProgress$1.isRendered=function(){return!!document.getElementById(`nprogress`)},NProgress$1.getPositioningCSS=function(){var bodyStyle=document.body.style,vendorPrefix=`WebkitTransform`in bodyStyle?`Webkit`:`MozTransform`in bodyStyle?`Moz`:`msTransform`in bodyStyle?`ms`:`OTransform`in bodyStyle?`O`:``;return vendorPrefix+`Perspective`in bodyStyle?`translate3d`:vendorPrefix+`Transform`in bodyStyle?`translate`:`margin`};function clamp$8(n,min$1,max$1){return nmax$1?max$1:n}function toBarPerc(n){return(-1+n)*100}function barPositionCSS(n,speed,ease){var barCSS;return barCSS=Settings.positionUsing===`translate3d`?{transform:`translate3d(`+toBarPerc(n)+`%,0,0)`}:Settings.positionUsing===`translate`?{transform:`translate(`+toBarPerc(n)+`%,0)`}:{"margin-left":toBarPerc(n)+`%`},barCSS.transition=`all `+speed+`ms `+ease,barCSS}var queue$1=(function(){var pending=[];function next(){var fn$5=pending.shift();fn$5&&fn$5(next)}return function(fn$5){pending.push(fn$5),pending.length==1&&next()}})(),css=(function(){var cssPrefixes=[`Webkit`,`O`,`Moz`,`ms`],cssProps={};function camelCase(string$4){return string$4.replace(/^-ms-/,`ms-`).replace(/-([\da-z])/gi,function(match,letter){return letter.toUpperCase()})}function getVendorProp(name$2){var style=document.body.style;if(name$2 in style)return name$2;for(var i=cssPrefixes.length,capName=name$2.charAt(0).toUpperCase()+name$2.slice(1),vendorName;i--;)if(vendorName=cssPrefixes[i]+capName,vendorName in style)return vendorName;return name$2}function getStyleProp(name$2){return name$2=camelCase(name$2),cssProps[name$2]||(cssProps[name$2]=getVendorProp(name$2))}function applyCss(element$3,prop,value$1){prop=getStyleProp(prop),element$3.style[prop]=value$1}return function(element$3,properties){var args=arguments,prop,value$1;if(args.length==2)for(prop in properties)value$1=properties[prop],value$1!==void 0&&properties.hasOwnProperty(prop)&&applyCss(element$3,prop,value$1);else applyCss(element$3,args[1],args[2])}})();function hasClass(element$3,name$2){var list$2=typeof element$3==`string`?element$3:classList(element$3);return list$2.indexOf(` `+name$2+` `)>=0}function addClass(element$3,name$2){var oldList=classList(element$3),newList=oldList+name$2;hasClass(oldList,name$2)||(element$3.className=newList.substring(1))}function removeClass(element$3,name$2){var oldList=classList(element$3),newList;hasClass(element$3,name$2)&&(newList=oldList.replace(` `+name$2+` `,` `),element$3.className=newList.substring(1,newList.length-1))}function classList(element$3){return(` `+(element$3.className||``)+` `).replace(/\s+/gi,` `)}function removeElement(element$3){element$3&&element$3.parentNode&&element$3.parentNode.removeChild(element$3)}return NProgress$1})}));const parents=new Set,coords=new WeakMap,siblings$1=new WeakMap,animations=new WeakMap,intersections=new WeakMap,intervals=new WeakMap,options=new WeakMap,debounces=new WeakMap,enabled=new WeakSet;let root$2,scrollX=0,scrollY=0;const TGT=`__aa_tgt`,DEL=`__aa_del`,NEW=`__aa_new`,handleMutations=mutations$1=>{let elements=getElements(mutations$1);elements&&elements.forEach(el=>animate$2(el))},handleResizes=entries=>{entries.forEach(entry=>{entry.target===root$2&&updateAllPos(),coords.has(entry.target)&&updatePos(entry.target)})};function observePosition(el){let oldObserver=intersections.get(el);oldObserver?.disconnect();let rect=coords.get(el),invocations=0,buffer$1=5;rect||(rect=getCoords(el),coords.set(el,rect));let{offsetWidth,offsetHeight}=root$2,rootMargins=[rect.top-buffer$1,offsetWidth-(rect.left+buffer$1+rect.width),offsetHeight-(rect.top+buffer$1+rect.height),rect.left-buffer$1],rootMargin=rootMargins.map(px$2=>`${-1*Math.floor(px$2)}px`).join(` `),observer=new IntersectionObserver(()=>{++invocations>1&&updatePos(el)},{root:root$2,threshold:1,rootMargin});observer.observe(el),intersections.set(el,observer)}function updatePos(el){clearTimeout(debounces.get(el));let optionsOrPlugin=getOptions(el),delay=isPlugin(optionsOrPlugin)?500:optionsOrPlugin.duration;debounces.set(el,setTimeout(async()=>{let currentAnimation=animations.get(el);try{await currentAnimation?.finished,coords.set(el,getCoords(el)),observePosition(el)}catch{}},delay))}function updateAllPos(){clearTimeout(debounces.get(root$2)),debounces.set(root$2,setTimeout(()=>{parents.forEach(parent=>forEach(parent,el=>lowPriority(()=>updatePos(el))))},100))}function poll(el){setTimeout(()=>{intervals.set(el,setInterval(()=>lowPriority(updatePos.bind(null,el)),2e3))},Math.round(2e3*Math.random()))}function lowPriority(callback){typeof requestIdleCallback==`function`?requestIdleCallback(()=>callback()):requestAnimationFrame(()=>callback())}let mutations,resize;const supportedBrowser=typeof window<`u`&&`ResizeObserver`in window;supportedBrowser&&(root$2=document.documentElement,mutations=new MutationObserver(handleMutations),resize=new ResizeObserver(handleResizes),window.addEventListener(`scroll`,()=>{scrollY=window.scrollY,scrollX=window.scrollX}),resize.observe(root$2));function getElements(mutations$1){let observedNodes=mutations$1.reduce((nodes,mutation)=>[...nodes,...Array.from(mutation.addedNodes),...Array.from(mutation.removedNodes)],[]),onlyCommentNodesObserved=observedNodes.every(node$1=>node$1.nodeName===`#comment`);return onlyCommentNodesObserved?!1:mutations$1.reduce((elements,mutation)=>{if(elements===!1)return!1;if(mutation.target instanceof Element){if(target(mutation.target),!elements.has(mutation.target)){elements.add(mutation.target);for(let i=0;icallback(parent,options.has(parent)));for(let i=0;icallback(child,options.has(child)))}}function getPluginTuple(pluginReturn){return Array.isArray(pluginReturn)?pluginReturn:[pluginReturn]}function isPlugin(config$1){return typeof config$1==`function`}function remain(el){let oldCoords=coords.get(el),newCoords=getCoords(el);if(!isEnabled(el))return coords.set(el,newCoords);let animation;if(!oldCoords)return;let pluginOrOptions=getOptions(el);if(typeof pluginOrOptions!=`function`){let deltaX=oldCoords.left-newCoords.left,deltaY=oldCoords.top-newCoords.top,[widthFrom,widthTo,heightFrom,heightTo]=getTransitionSizes(el,oldCoords,newCoords),start={transform:`translate(${deltaX}px, ${deltaY}px)`},end={transform:`translate(0, 0)`};widthFrom!==widthTo&&(start.width=`${widthFrom}px`,end.width=`${widthTo}px`),heightFrom!==heightTo&&(start.height=`${heightFrom}px`,end.height=`${heightTo}px`),animation=el.animate([start,end],{duration:pluginOrOptions.duration,easing:pluginOrOptions.easing})}else{let[keyframes$4]=getPluginTuple(pluginOrOptions(el,`remain`,oldCoords,newCoords));animation=new Animation(keyframes$4),animation.play()}animations.set(el,animation),coords.set(el,newCoords),animation.addEventListener(`finish`,updatePos.bind(null,el))}function add(el){NEW in el&&delete el[NEW];let newCoords=getCoords(el);coords.set(el,newCoords);let pluginOrOptions=getOptions(el);if(!isEnabled(el))return;let animation;if(typeof pluginOrOptions!=`function`)animation=el.animate([{transform:`scale(.98)`,opacity:0},{transform:`scale(0.98)`,opacity:0,offset:.5},{transform:`scale(1)`,opacity:1}],{duration:pluginOrOptions.duration*1.5,easing:`ease-in`});else{let[keyframes$4]=getPluginTuple(pluginOrOptions(el,`add`,newCoords));animation=new Animation(keyframes$4),animation.play()}animations.set(el,animation),animation.addEventListener(`finish`,updatePos.bind(null,el))}function cleanUp(el,styles){var _a$2;el.remove(),coords.delete(el),siblings$1.delete(el),animations.delete(el),(_a$2=intersections.get(el))==null||_a$2.disconnect(),setTimeout(()=>{if(DEL in el&&delete el[DEL],Object.defineProperty(el,NEW,{value:!0,configurable:!0}),styles&&el instanceof HTMLElement)for(let style in styles)el.style[style]=``},0)}function remove$1(el){var _a$2;if(!siblings$1.has(el)||!coords.has(el))return;let[prev,next]=siblings$1.get(el);Object.defineProperty(el,DEL,{value:!0,configurable:!0});let finalX=window.scrollX,finalY=window.scrollY;if(next&&next.parentNode&&next.parentNode instanceof Element?next.parentNode.insertBefore(el,next):prev&&prev.parentNode?prev.parentNode.appendChild(el):(_a$2=getTarget(el))==null||_a$2.appendChild(el),!isEnabled(el))return cleanUp(el);let[top,left,width,height]=deletePosition(el),optionsOrPlugin=getOptions(el),oldCoords=coords.get(el);(finalX!==scrollX||finalY!==scrollY)&&adjustScroll(el,finalX,finalY,optionsOrPlugin);let animation,styleReset={position:`absolute`,top:`${top}px`,left:`${left}px`,width:`${width}px`,height:`${height}px`,margin:`0`,pointerEvents:`none`,transformOrigin:`center`,zIndex:`100`};if(!isPlugin(optionsOrPlugin))Object.assign(el.style,styleReset),animation=el.animate([{transform:`scale(1)`,opacity:1},{transform:`scale(.98)`,opacity:0}],{duration:optionsOrPlugin.duration,easing:`ease-out`});else{let[keyframes$4,options$1]=getPluginTuple(optionsOrPlugin(el,`remove`,oldCoords));options$1?.styleReset!==!1&&(styleReset=options$1?.styleReset||styleReset,Object.assign(el.style,styleReset)),animation=new Animation(keyframes$4),animation.play()}animations.set(el,animation),animation.addEventListener(`finish`,cleanUp.bind(null,el,styleReset))}function adjustScroll(el,finalX,finalY,optionsOrPlugin){let scrollDeltaX=scrollX-finalX,scrollDeltaY=scrollY-finalY,scrollBefore=document.documentElement.style.scrollBehavior,scrollBehavior=getComputedStyle(root$2).scrollBehavior;if(scrollBehavior===`smooth`&&(document.documentElement.style.scrollBehavior=`auto`),window.scrollTo(window.scrollX+scrollDeltaX,window.scrollY+scrollDeltaY),!el.parentElement)return;let parent=el.parentElement,lastHeight=parent.clientHeight,lastWidth=parent.clientWidth,startScroll=performance.now();function smoothScroll(){requestAnimationFrame(()=>{if(!isPlugin(optionsOrPlugin)){let deltaY=lastHeight-parent.clientHeight,deltaX=lastWidth-parent.clientWidth;startScroll+optionsOrPlugin.duration>performance.now()?(window.scrollTo({left:window.scrollX-deltaX,top:window.scrollY-deltaY}),lastHeight=parent.clientHeight,lastWidth=parent.clientWidth,smoothScroll()):document.documentElement.style.scrollBehavior=scrollBefore}})}smoothScroll()}function deletePosition(el){let oldCoords=coords.get(el),[width,,height]=getTransitionSizes(el,oldCoords,getCoords(el)),offsetParent=el.parentElement;for(;offsetParent&&(getComputedStyle(offsetParent).position===`static`||offsetParent instanceof HTMLBodyElement);)offsetParent=offsetParent.parentElement;offsetParent||=document.body;let parentStyles=getComputedStyle(offsetParent),parentCoords=coords.get(offsetParent)||getCoords(offsetParent),top=Math.round(oldCoords.top-parentCoords.top)-raw$2(parentStyles.borderTopWidth),left=Math.round(oldCoords.left-parentCoords.left)-raw$2(parentStyles.borderLeftWidth);return[top,left,width,height]}function autoAnimate(el,config$1={}){if(mutations&&resize){let mediaQuery=window.matchMedia(`(prefers-reduced-motion: reduce)`),isDisabledDueToReduceMotion=mediaQuery.matches&&!isPlugin(config$1)&&!config$1.disrespectUserMotionPreference;isDisabledDueToReduceMotion||(enabled.add(el),getComputedStyle(el).position===`static`&&Object.assign(el.style,{position:`relative`}),forEach(el,updatePos,poll,element$3=>resize?.observe(element$3)),isPlugin(config$1)?options.set(el,config$1):options.set(el,{duration:250,easing:`ease-in-out`,...config$1}),mutations.observe(el,{childList:!0}),parents.add(el))}return Object.freeze({parent:el,enable:()=>{enabled.add(el)},disable:()=>{enabled.delete(el)},isEnabled:()=>enabled.has(el)})}const vAutoAnimate={mounted:(el,binding)=>{autoAnimate(el,binding.value||{})},getSSRProps:()=>({})},vAutoAnimate$1=vAutoAnimate,autoAnimatePlugin={install(app){app.directive(`auto-animate`,vAutoAnimate$1)}};function isPlainObject$6(value$1){if(typeof value$1!=`object`||!value$1)return!1;let prototype=Object.getPrototypeOf(value$1);return prototype!==null&&prototype!==Object.prototype&&Object.getPrototypeOf(prototype)!==null||Symbol.iterator in value$1?!1:Symbol.toStringTag in value$1?Object.prototype.toString.call(value$1)===`[object Module]`:!0}function _defu(baseObject,defaults$1,namespace=`.`,merger){if(!isPlainObject$6(defaults$1))return _defu(baseObject,{},namespace,merger);let object$1=Object.assign({},defaults$1);for(let key$2 in baseObject){if(key$2===`__proto__`||key$2===`constructor`)continue;let value$1=baseObject[key$2];if(value$1==null||merger&&merger(object$1,key$2,value$1,namespace))continue;Array.isArray(value$1)&&Array.isArray(object$1[key$2])?object$1[key$2]=[...value$1,...object$1[key$2]]:isPlainObject$6(value$1)&&isPlainObject$6(object$1[key$2])?object$1[key$2]=_defu(value$1,object$1[key$2],(namespace?`${namespace}.`:``)+key$2.toString(),merger):object$1[key$2]=value$1}return object$1}function createDefu(merger){return(...arguments_)=>arguments_.reduce((p$4,c$3)=>_defu(p$4,c$3,``,merger),{})}const defu=createDefu(),defuFn=createDefu((object$1,key$2,currentValue)=>{if(object$1[key$2]!==void 0&&typeof currentValue==`function`)return object$1[key$2]=currentValue(object$1[key$2]),!0}),defuArrayFn=createDefu((object$1,key$2,currentValue)=>{if(Array.isArray(object$1[key$2])&&typeof currentValue==`function`)return object$1[key$2]=currentValue(object$1[key$2]),!0});function tryOnScopeDispose(fn$5){return getCurrentScope()?(onScopeDispose(fn$5),!0):!1}function createEventHook$1(){let fns=new Set,off=fn$5=>{fns.delete(fn$5)},clear=()=>{fns.clear()},on$1=fn$5=>{fns.add(fn$5);let offFn=()=>off(fn$5);return tryOnScopeDispose(offFn),{off:offFn}},trigger$1=(...args)=>Promise.all(Array.from(fns).map(fn$5=>fn$5(...args)));return{on:on$1,off,trigger:trigger$1,clear}}const localProvidedStateMap=new WeakMap,injectLocal=(...args)=>{var _a$2;let key$2=args[0],instance=(_a$2=getCurrentInstance())?.proxy;if(instance==null&&!hasInjectionContext())throw Error(`injectLocal must be called in setup`);return instance&&localProvidedStateMap.has(instance)&&key$2 in localProvidedStateMap.get(instance)?localProvidedStateMap.get(instance)[key$2]:inject(...args)},isClient$2=typeof window<`u`&&typeof document<`u`,isWorker=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,notNullish=val=>val!=null,toString$2=Object.prototype.toString,isObject$2=val=>toString$2.call(val)===`[object Object]`,noop$3=()=>{},hasOwn$2=(val,key$2)=>Object.prototype.hasOwnProperty.call(val,key$2);function toRef$1(...args){if(args.length!==1)return toRef(...args);let r$1=args[0];return typeof r$1==`function`?readonly$1(customRef(()=>({get:r$1,set:noop$3}))):ref(r$1)}function createFilterWrapper(filter$1,fn$5){function wrapper(...args){return new Promise((resolve$1,reject)=>{Promise.resolve(filter$1(()=>fn$5.apply(this,args),{fn:fn$5,thisArg:this,args})).then(resolve$1).catch(reject)})}return wrapper}const bypassFilter=invoke$1=>invoke$1();function debounceFilter(ms,options$1={}){let timer,maxTimer,lastRejector=noop$3,_clearTimeout=timer2=>{clearTimeout(timer2),lastRejector(),lastRejector=noop$3},lastInvoker,filter$1=invoke$1=>{let duration$2=toValue$1(ms),maxDuration$1=toValue$1(options$1.maxWait);return timer&&_clearTimeout(timer),duration$2<=0||maxDuration$1!==void 0&&maxDuration$1<=0?(maxTimer&&(_clearTimeout(maxTimer),maxTimer=void 0),Promise.resolve(invoke$1())):new Promise((resolve$1,reject)=>{lastRejector=options$1.rejectOnCancel?reject:resolve$1,lastInvoker=invoke$1,maxDuration$1&&!maxTimer&&(maxTimer=setTimeout(()=>{timer&&_clearTimeout(timer),maxTimer=void 0,resolve$1(lastInvoker())},maxDuration$1)),timer=setTimeout(()=>{maxTimer&&_clearTimeout(maxTimer),maxTimer=void 0,resolve$1(invoke$1())},duration$2)})};return filter$1}function throttleFilter(...args){let lastExec=0,timer,isLeading=!0,lastRejector=noop$3,lastValue,ms,trailing,leading,rejectOnCancel;!isRef(args[0])&&typeof args[0]==`object`?{delay:ms,trailing=!0,leading=!0,rejectOnCancel=!1}=args[0]:[ms,trailing=!0,leading=!0,rejectOnCancel=!1]=args;let clear=()=>{timer&&(clearTimeout(timer),timer=void 0,lastRejector(),lastRejector=noop$3)},filter$1=_invoke=>{let duration$2=toValue$1(ms),elapsed=Date.now()-lastExec,invoke$1=()=>lastValue=_invoke();return clear(),duration$2<=0?(lastExec=Date.now(),invoke$1()):(elapsed>duration$2&&(leading||!isLeading)?(lastExec=Date.now(),invoke$1()):trailing&&(lastValue=new Promise((resolve$1,reject)=>{lastRejector=rejectOnCancel?reject:resolve$1,timer=setTimeout(()=>{lastExec=Date.now(),isLeading=!0,resolve$1(invoke$1()),clear()},Math.max(0,duration$2-elapsed))})),!leading&&!timer&&(timer=setTimeout(()=>isLeading=!0,duration$2)),isLeading=!1,lastValue)};return filter$1}function pausableFilter(extendFilter=bypassFilter,options$1={}){let{initialState=`active`}=options$1,isActive=toRef$1(initialState===`active`);function pause(){isActive.value=!1}function resume(){isActive.value=!0}let eventFilter=(...args)=>{isActive.value&&extendFilter(...args)};return{isActive:readonly$1(isActive),pause,resume,eventFilter}}function promiseTimeout(ms,throwOnTimeout=!1,reason=`Timeout`){return new Promise((resolve$1,reject)=>{throwOnTimeout?setTimeout(()=>reject(reason),ms):setTimeout(resolve$1,ms)})}function createSingletonPromise(fn$5){let _promise;function wrapper(){return _promise||=fn$5(),_promise}return wrapper.reset=async()=>{let _prev=_promise;_promise=void 0,_prev&&await _prev},wrapper}function increaseWithUnit(target$1,delta){var _a$2;if(typeof target$1==`number`)return target$1+delta;let value$1=(_a$2=target$1.match(/^-?\d+\.?\d*/))?.[0]||``,unit=target$1.slice(value$1.length),result=Number.parseFloat(value$1)+delta;return Number.isNaN(result)?target$1:result+unit}function pxValue(px$2){return px$2.endsWith(`rem`)?Number.parseFloat(px$2)*16:Number.parseFloat(px$2)}function objectPick(obj,keys$3,omitUndefined=!1){return keys$3.reduce((n,k$3)=>(k$3 in obj&&(!omitUndefined||obj[k$3]!==void 0)&&(n[k$3]=obj[k$3]),n),{})}function toArray(value$1){return Array.isArray(value$1)?value$1:[value$1]}function cacheStringFunction(fn$5){let cache$1=Object.create(null);return str=>{let hit=cache$1[str];return hit||(cache$1[str]=fn$5(str))}}const hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(str=>str.replace(hyphenateRE,`-$1`).toLowerCase()),camelizeRE=/-(\w)/g,camelize$1=cacheStringFunction(str=>str.replace(camelizeRE,(_$1,c$3)=>c$3?c$3.toUpperCase():``));function getLifeCycleTarget(target$1){return target$1||getCurrentInstance()}function useDebounceFn(fn$5,ms=200,options$1={}){return createFilterWrapper(debounceFilter(ms,options$1),fn$5)}function refDebounced(value$1,ms=200,options$1={}){let debounced=ref(toValue$1(value$1)),updater=useDebounceFn(()=>{debounced.value=value$1.value},ms,options$1);return watch(value$1,()=>updater()),shallowReadonly(debounced)}function useThrottleFn(fn$5,ms=200,trailing=!1,leading=!0,rejectOnCancel=!1){return createFilterWrapper(throttleFilter(ms,trailing,leading,rejectOnCancel),fn$5)}function refThrottled(value$1,delay=200,trailing=!0,leading=!0){if(delay<=0)return value$1;let throttled=ref(toValue$1(value$1)),updater=useThrottleFn(()=>{throttled.value=value$1.value},delay,trailing,leading);return watch(value$1,()=>updater()),throttled}function watchWithFilter(source,cb$1,options$1={}){let{eventFilter=bypassFilter,...watchOptions}=options$1;return watch(source,createFilterWrapper(eventFilter,cb$1),watchOptions)}function watchPausable(source,cb$1,options$1={}){let{eventFilter:filter$1,initialState=`active`,...watchOptions}=options$1,{eventFilter,pause,resume,isActive}=pausableFilter(filter$1,{initialState}),stop$1=watchWithFilter(source,cb$1,{...watchOptions,eventFilter});return{stop:stop$1,pause,resume,isActive}}function toRefs$1(objectRef,options$1={}){if(!isRef(objectRef))return toRefs(objectRef);let result=Array.isArray(objectRef.value)?Array.from({length:objectRef.value.length}):{};for(let key$2 in objectRef.value)result[key$2]=customRef(()=>({get(){return objectRef.value[key$2]},set(v){var _a$2;let replaceRef=(_a$2=toValue$1(options$1.replaceRef))??!0;if(replaceRef)if(Array.isArray(objectRef.value)){let copy=[...objectRef.value];copy[key$2]=v,objectRef.value=copy}else{let newObject={...objectRef.value,[key$2]:v};Object.setPrototypeOf(newObject,Object.getPrototypeOf(objectRef.value)),objectRef.value=newObject}else objectRef.value[key$2]=v}}));return result}function tryOnMounted(fn$5,sync$2=!0,target$1){let instance=getLifeCycleTarget(target$1);instance?onMounted(fn$5,target$1):sync$2?fn$5():nextTick(fn$5)}function tryOnUnmounted(fn$5,target$1){let instance=getLifeCycleTarget(target$1);instance&&onUnmounted(fn$5,target$1)}function createUntil(r$1,isNot=!1){function toMatch(condition,{flush=`sync`,deep=!1,timeout,throwOnTimeout}={}){let stop$1=null,watcher=new Promise(resolve$1=>{stop$1=watch(r$1,v=>{condition(v)!==isNot&&(stop$1?stop$1():nextTick(()=>stop$1?.()),resolve$1(v))},{flush,deep,immediate:!0})}),promises=[watcher];return timeout!=null&&promises.push(promiseTimeout(timeout,throwOnTimeout).then(()=>toValue$1(r$1)).finally(()=>stop$1?.())),Promise.race(promises)}function toBe(value$1,options$1){if(!isRef(value$1))return toMatch(v=>v===value$1,options$1);let{flush=`sync`,deep=!1,timeout,throwOnTimeout}=options$1??{},stop$1=null,watcher=new Promise(resolve$1=>{stop$1=watch([r$1,value$1],([v1,v2])=>{isNot!==(v1===v2)&&(stop$1?stop$1():nextTick(()=>stop$1?.()),resolve$1(v1))},{flush,deep,immediate:!0})}),promises=[watcher];return timeout!=null&&promises.push(promiseTimeout(timeout,throwOnTimeout).then(()=>toValue$1(r$1)).finally(()=>(stop$1?.(),toValue$1(r$1)))),Promise.race(promises)}function toBeTruthy(options$1){return toMatch(v=>!!v,options$1)}function toBeNull(options$1){return toBe(null,options$1)}function toBeUndefined(options$1){return toBe(void 0,options$1)}function toBeNaN(options$1){return toMatch(Number.isNaN,options$1)}function toContains(value$1,options$1){return toMatch(v=>{let array$1=Array.from(v);return array$1.includes(value$1)||array$1.includes(toValue$1(value$1))},options$1)}function changed(options$1){return changedTimes(1,options$1)}function changedTimes(n=1,options$1){let count$1=-1;return toMatch(()=>(count$1+=1,count$1>=n),options$1)}if(Array.isArray(toValue$1(r$1))){let instance={toMatch,toContains,changed,changedTimes,get not(){return createUntil(r$1,!isNot)}};return instance}else{let instance={toMatch,toBe,toBeTruthy,toBeNull,toBeNaN,toBeUndefined,changed,changedTimes,get not(){return createUntil(r$1,!isNot)}};return instance}}function until(r$1){return createUntil(r$1)}function useTimeoutFn$1(cb$1,interval,options$1={}){let{immediate=!0,immediateCallback=!1}=options$1,isPending=shallowRef(!1),timer;function clear(){timer&&(clearTimeout(timer),timer=void 0)}function stop$1(){isPending.value=!1,clear()}function start(...args){immediateCallback&&cb$1(),clear(),isPending.value=!0,timer=setTimeout(()=>{isPending.value=!1,timer=void 0,cb$1(...args)},toValue$1(interval))}return immediate&&(isPending.value=!0,isClient$2&&start()),tryOnScopeDispose(stop$1),{isPending:shallowReadonly(isPending),start,stop:stop$1}}function watchDebounced(source,cb$1,options$1={}){let{debounce=0,maxWait=void 0,...watchOptions}=options$1;return watchWithFilter(source,cb$1,{...watchOptions,eventFilter:debounceFilter(debounce,{maxWait})})}function watchImmediate(source,cb$1,options$1){return watch(source,cb$1,{...options$1,immediate:!0})}function computedAsync(evaluationCallback,initialState,optionsOrRef){let options$1;options$1=isRef(optionsOrRef)?{evaluating:optionsOrRef}:optionsOrRef||{};let{lazy=!1,flush=`pre`,evaluating=void 0,shallow=!0,onError=noop$3}=options$1,started=shallowRef(!lazy),current=shallow?shallowRef(initialState):ref(initialState),counter=0;return watchEffect(async onInvalidate=>{if(!started.value)return;counter++;let counterAtBeginning=counter,hasFinished=!1;evaluating&&Promise.resolve().then(()=>{evaluating.value=!0});try{let result=await evaluationCallback(cancelCallback=>{onInvalidate(()=>{evaluating&&(evaluating.value=!1),hasFinished||cancelCallback()})});counterAtBeginning===counter&&(current.value=result)}catch(e$4){onError(e$4)}finally{evaluating&&counterAtBeginning===counter&&(evaluating.value=!1),hasFinished=!0}},{flush}),lazy?computed(()=>(started.value=!0,current.value)):current}const defaultWindow$1=isClient$2?window:void 0,defaultDocument=isClient$2?window.document:void 0,defaultNavigator=isClient$2?window.navigator:void 0,defaultLocation=isClient$2?window.location:void 0;function unrefElement(elRef){var _a$2;let plain=toValue$1(elRef);return(_a$2=plain?.$el)??plain}function useEventListener(...args){let cleanups=[],cleanup=()=>{cleanups.forEach(fn$5=>fn$5()),cleanups.length=0},register=(el,event,listener,options$1)=>(el.addEventListener(event,listener,options$1),()=>el.removeEventListener(event,listener,options$1)),firstParamTargets=computed(()=>{let test$1=toArray(toValue$1(args[0])).filter(e$4=>e$4!=null);return test$1.every(e$4=>typeof e$4!=`string`)?test$1:void 0}),stopWatch=watchImmediate(()=>{var _a$2,_b;return[(_b=(_a$2=firstParamTargets.value)?.map(e$4=>unrefElement(e$4)))??[defaultWindow$1].filter(e$4=>e$4!=null),toArray(toValue$1(firstParamTargets.value?args[1]:args[0])),toArray(unref(firstParamTargets.value?args[2]:args[1])),toValue$1(firstParamTargets.value?args[3]:args[2])]},([raw_targets,raw_events,raw_listeners,raw_options])=>{if(cleanup(),!raw_targets?.length||!raw_events?.length||!raw_listeners?.length)return;let optionsClone=isObject$2(raw_options)?{...raw_options}:raw_options;cleanups.push(...raw_targets.flatMap(el=>raw_events.flatMap(event=>raw_listeners.map(listener=>register(el,event,listener,optionsClone)))))},{flush:`post`}),stop$1=()=>{stopWatch(),cleanup()};return tryOnScopeDispose(cleanup),stop$1}function useMounted$1(){let isMounted=shallowRef(!1),instance=getCurrentInstance();return instance&&onMounted(()=>{isMounted.value=!0},instance),isMounted}function useSupported(callback){let isMounted=useMounted$1();return computed(()=>(isMounted.value,!!callback()))}function useMutationObserver(target$1,callback,options$1={}){let{window:window$1=defaultWindow$1,...mutationOptions}=options$1,observer,isSupported=useSupported(()=>window$1&&`MutationObserver`in window$1),cleanup=()=>{observer&&(observer.disconnect(),observer=void 0)},targets=computed(()=>{let value$1=toValue$1(target$1),items=toArray(value$1).map(unrefElement).filter(notNullish);return new Set(items)}),stopWatch=watch(()=>targets.value,targets2=>{cleanup(),isSupported.value&&targets2.size&&(observer=new MutationObserver(callback),targets2.forEach(el=>observer.observe(el,mutationOptions)))},{immediate:!0,flush:`post`}),takeRecords=()=>observer?.takeRecords(),stop$1=()=>{stopWatch(),cleanup()};return tryOnScopeDispose(stop$1),{isSupported,stop:stop$1,takeRecords}}const ssrWidthSymbol=Symbol(`vueuse-ssr-width`);function useSSRWidth(){let ssrWidth=hasInjectionContext()?injectLocal(ssrWidthSymbol,null):null;return typeof ssrWidth==`number`?ssrWidth:void 0}function useMediaQuery(query,options$1={}){let{window:window$1=defaultWindow$1,ssrWidth=useSSRWidth()}=options$1,isSupported=useSupported(()=>window$1&&`matchMedia`in window$1&&typeof window$1.matchMedia==`function`),ssrSupport=shallowRef(typeof ssrWidth==`number`),mediaQuery=shallowRef(),matches$1=shallowRef(!1),handler=event=>{matches$1.value=event.matches};return watchEffect(()=>{if(ssrSupport.value){ssrSupport.value=!isSupported.value;let queryStrings=toValue$1(query).split(`,`);matches$1.value=queryStrings.some(queryString=>{let not=queryString.includes(`not all`),minWidth=queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),maxWidth=queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),res=!!(minWidth||maxWidth);return minWidth&&res&&(res=ssrWidth>=pxValue(minWidth[1])),maxWidth&&res&&(res=ssrWidth<=pxValue(maxWidth[1])),not?!res:res});return}isSupported.value&&(mediaQuery.value=window$1.matchMedia(toValue$1(query)),matches$1.value=mediaQuery.value.matches)}),useEventListener(mediaQuery,`change`,handler,{passive:!0}),computed(()=>matches$1.value)}const breakpointsTailwind={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},breakpointsBootstrapV5={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},breakpointsVuetifyV2={xs:0,sm:600,md:960,lg:1264,xl:1904},breakpointsVuetifyV3={xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560},breakpointsVuetify=breakpointsVuetifyV2,breakpointsAntDesign={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600},breakpointsQuasar={xs:0,sm:600,md:1024,lg:1440,xl:1920},breakpointsSematic={mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560},breakpointsMasterCss={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},breakpointsPrimeFlex={sm:576,md:768,lg:992,xl:1200},breakpointsElement={xs:0,sm:768,md:992,lg:1200,xl:1920};function useBreakpoints(breakpoints,options$1={}){function getValue$2(k$3,delta){let v=toValue$1(breakpoints[toValue$1(k$3)]);return delta!=null&&(v=increaseWithUnit(v,delta)),typeof v==`number`&&(v=`${v}px`),v}let{window:window$1=defaultWindow$1,strategy=`min-width`,ssrWidth=useSSRWidth()}=options$1,ssrSupport=typeof ssrWidth==`number`,mounted=ssrSupport?shallowRef(!1):{value:!0};ssrSupport&&tryOnMounted(()=>mounted.value=!!window$1);function match(query,size$2){return!mounted.value&&ssrSupport?query===`min`?ssrWidth>=pxValue(size$2):ssrWidth<=pxValue(size$2):window$1?window$1.matchMedia(`(${query}-width: ${size$2})`).matches:!1}let greaterOrEqual=k$3=>useMediaQuery(()=>`(min-width: ${getValue$2(k$3)})`,options$1),smallerOrEqual=k$3=>useMediaQuery(()=>`(max-width: ${getValue$2(k$3)})`,options$1),shortcutMethods=Object.keys(breakpoints).reduce((shortcuts,k$3)=>(Object.defineProperty(shortcuts,k$3,{get:()=>strategy===`min-width`?greaterOrEqual(k$3):smallerOrEqual(k$3),enumerable:!0,configurable:!0}),shortcuts),{});function current(){let points=Object.keys(breakpoints).map(k$3=>[k$3,shortcutMethods[k$3],pxValue(getValue$2(k$3))]).sort((a$1,b$1)=>a$1[2]-b$1[2]);return computed(()=>points.filter(([,v])=>v.value).map(([k$3])=>k$3))}return Object.assign(shortcutMethods,{greaterOrEqual,smallerOrEqual,greater(k$3){return useMediaQuery(()=>`(min-width: ${getValue$2(k$3,.1)})`,options$1)},smaller(k$3){return useMediaQuery(()=>`(max-width: ${getValue$2(k$3,-.1)})`,options$1)},between(a$1,b$1){return useMediaQuery(()=>`(min-width: ${getValue$2(a$1)}) and (max-width: ${getValue$2(b$1,-.1)})`,options$1)},isGreater(k$3){return match(`min`,getValue$2(k$3,.1))},isGreaterOrEqual(k$3){return match(`min`,getValue$2(k$3))},isSmaller(k$3){return match(`max`,getValue$2(k$3,-.1))},isSmallerOrEqual(k$3){return match(`max`,getValue$2(k$3))},isInBetween(a$1,b$1){return match(`min`,getValue$2(a$1))&&match(`max`,getValue$2(b$1,-.1))},current,active(){let bps=current();return computed(()=>bps.value.length===0?``:bps.value.at(strategy===`min-width`?-1:0))}})}function usePermission(permissionDesc,options$1={}){let{controls=!1,navigator:navigator$1=defaultNavigator}=options$1,isSupported=useSupported(()=>navigator$1&&`permissions`in navigator$1),permissionStatus=shallowRef(),desc=typeof permissionDesc==`string`?{name:permissionDesc}:permissionDesc,state=shallowRef(),update=()=>{var _a$2,_b;state.value=(_b=(_a$2=permissionStatus.value)?.state)??`prompt`};useEventListener(permissionStatus,`change`,update,{passive:!0});let query=createSingletonPromise(async()=>{if(isSupported.value){if(!permissionStatus.value)try{permissionStatus.value=await navigator$1.permissions.query(desc)}catch{permissionStatus.value=void 0}finally{update()}if(controls)return toRaw(permissionStatus.value)}});return query(),controls?{state,isSupported,query}:state}function useClipboard(options$1={}){let{navigator:navigator$1=defaultNavigator,read=!1,source,copiedDuring=1500,legacy=!1}=options$1,isClipboardApiSupported=useSupported(()=>navigator$1&&`clipboard`in navigator$1),permissionRead=usePermission(`clipboard-read`),permissionWrite=usePermission(`clipboard-write`),isSupported=computed(()=>isClipboardApiSupported.value||legacy),text$5=shallowRef(``),copied=shallowRef(!1),timeout=useTimeoutFn$1(()=>copied.value=!1,copiedDuring,{immediate:!1});async function updateText(){let useLegacy=!(isClipboardApiSupported.value&&isAllowed(permissionRead.value));if(!useLegacy)try{text$5.value=await navigator$1.clipboard.readText()}catch{useLegacy=!0}useLegacy&&(text$5.value=legacyRead())}isSupported.value&&read&&useEventListener([`copy`,`cut`],updateText,{passive:!0});async function copy(value$1=toValue$1(source)){if(isSupported.value&&value$1!=null){let useLegacy=!(isClipboardApiSupported.value&&isAllowed(permissionWrite.value));if(!useLegacy)try{await navigator$1.clipboard.writeText(value$1)}catch{useLegacy=!0}useLegacy&&legacyCopy(value$1),text$5.value=value$1,copied.value=!0,timeout.start()}}function legacyCopy(value$1){let ta=document.createElement(`textarea`);ta.value=value$1??``,ta.style.position=`absolute`,ta.style.opacity=`0`,document.body.appendChild(ta),ta.select(),document.execCommand(`copy`),ta.remove()}function legacyRead(){var _a$2,_b,_c;return(_c=(_b=(_a$2=document==null?void 0:document.getSelection)?.call(document))?.toString())??``}function isAllowed(status){return status===`granted`||status===`prompt`}return{isSupported,text:text$5,copied,copy}}const _global$1=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},globalKey=`__vueuse_ssr_handlers__`,handlers$2=getHandlers();function getHandlers(){return globalKey in _global$1||(_global$1[globalKey]=_global$1[globalKey]||{}),_global$1[globalKey]}function getSSRHandler(key$2,fallback){return handlers$2[key$2]||fallback}function usePreferredDark(options$1){return useMediaQuery(`(prefers-color-scheme: dark)`,options$1)}function guessSerializerType(rawInit){return rawInit==null?`any`:rawInit instanceof Set?`set`:rawInit instanceof Map?`map`:rawInit instanceof Date?`date`:typeof rawInit==`boolean`?`boolean`:typeof rawInit==`string`?`string`:typeof rawInit==`object`?`object`:Number.isNaN(rawInit)?`any`:`number`}const StorageSerializers={boolean:{read:v=>v===`true`,write:v=>String(v)},object:{read:v=>JSON.parse(v),write:v=>JSON.stringify(v)},number:{read:v=>Number.parseFloat(v),write:v=>String(v)},any:{read:v=>v,write:v=>String(v)},string:{read:v=>v,write:v=>String(v)},map:{read:v=>new Map(JSON.parse(v)),write:v=>JSON.stringify(Array.from(v.entries()))},set:{read:v=>new Set(JSON.parse(v)),write:v=>JSON.stringify(Array.from(v))},date:{read:v=>new Date(v),write:v=>v.toISOString()}},customStorageEventName=`vueuse-storage`;function useStorage(key$2,defaults$1,storage,options$1={}){var _a$2;let{flush=`pre`,deep=!0,listenToStorageChanges=!0,writeDefaults=!0,mergeDefaults:mergeDefaults$1=!1,shallow,window:window$1=defaultWindow$1,eventFilter,onError=e$4=>{console.error(e$4)},initOnMounted}=options$1,data$12=(shallow?shallowRef:ref)(typeof defaults$1==`function`?defaults$1():defaults$1),keyComputed=computed(()=>toValue$1(key$2));if(!storage)try{storage=getSSRHandler(`getDefaultStorage`,()=>{var _a2;return(_a2=defaultWindow$1)?.localStorage})()}catch(e$4){onError(e$4)}if(!storage)return data$12;let rawInit=toValue$1(defaults$1),type=guessSerializerType(rawInit),serializer$1=(_a$2=options$1.serializer)??StorageSerializers[type],{pause:pauseWatch,resume:resumeWatch}=watchPausable(data$12,()=>write(data$12.value),{flush,deep,eventFilter});watch(keyComputed,()=>update(),{flush});let firstMounted=!1,onStorageEvent=ev=>{initOnMounted&&!firstMounted||update(ev)},onStorageCustomEvent=ev=>{initOnMounted&&!firstMounted||updateFromCustomEvent(ev)};window$1&&listenToStorageChanges&&(storage instanceof Storage?useEventListener(window$1,`storage`,onStorageEvent,{passive:!0}):useEventListener(window$1,customStorageEventName,onStorageCustomEvent)),initOnMounted?tryOnMounted(()=>{firstMounted=!0,update()}):update();function dispatchWriteEvent(oldValue,newValue){if(window$1){let payload={key:keyComputed.value,oldValue,newValue,storageArea:storage};window$1.dispatchEvent(storage instanceof Storage?new StorageEvent(`storage`,payload):new CustomEvent(customStorageEventName,{detail:payload}))}}function write(v){try{let oldValue=storage.getItem(keyComputed.value);if(v==null)dispatchWriteEvent(oldValue,null),storage.removeItem(keyComputed.value);else{let serialized=serializer$1.write(v);oldValue!==serialized&&(storage.setItem(keyComputed.value,serialized),dispatchWriteEvent(oldValue,serialized))}}catch(e$4){onError(e$4)}}function read(event){let rawValue=event?event.newValue:storage.getItem(keyComputed.value);if(rawValue==null)return writeDefaults&&rawInit!=null&&storage.setItem(keyComputed.value,serializer$1.write(rawInit)),rawInit;if(!event&&mergeDefaults$1){let value$1=serializer$1.read(rawValue);return typeof mergeDefaults$1==`function`?mergeDefaults$1(value$1,rawInit):type===`object`&&!Array.isArray(value$1)?{...rawInit,...value$1}:value$1}else if(typeof rawValue!=`string`)return rawValue;else return serializer$1.read(rawValue)}function update(event){if(!(event&&event.storageArea!==storage)){if(event&&event.key==null){data$12.value=rawInit;return}if(!(event&&event.key!==keyComputed.value)){pauseWatch();try{event?.newValue!==serializer$1.write(data$12.value)&&(data$12.value=read(event))}catch(e$4){onError(e$4)}finally{event?nextTick(resumeWatch):resumeWatch()}}}}function updateFromCustomEvent(event){update(event.detail)}return data$12}const CSS_DISABLE_TRANS=`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function useColorMode(options$1={}){let{selector=`html`,attribute=`class`,initialValue=`auto`,window:window$1=defaultWindow$1,storage,storageKey=`vueuse-color-scheme`,listenToStorageChanges=!0,storageRef,emitAuto,disableTransition=!0}=options$1,modes$1={auto:``,light:`light`,dark:`dark`,...options$1.modes||{}},preferredDark=usePreferredDark({window:window$1}),system=computed(()=>preferredDark.value?`dark`:`light`),store=storageRef||(storageKey==null?toRef$1(initialValue):useStorage(storageKey,initialValue,storage,{window:window$1,listenToStorageChanges})),state=computed(()=>store.value===`auto`?system.value:store.value),updateHTMLAttrs=getSSRHandler(`updateHTMLAttrs`,(selector2,attribute2,value$1)=>{let el=typeof selector2==`string`?window$1?.document.querySelector(selector2):unrefElement(selector2);if(!el)return;let classesToAdd=new Set,classesToRemove=new Set,attributeToChange=null;if(attribute2===`class`){let current=value$1.split(/\s/g);Object.values(modes$1).flatMap(i=>(i||``).split(/\s/g)).filter(Boolean).forEach(v=>{current.includes(v)?classesToAdd.add(v):classesToRemove.add(v)})}else attributeToChange={key:attribute2,value:value$1};if(classesToAdd.size===0&&classesToRemove.size===0&&attributeToChange===null)return;let style;disableTransition&&(style=window$1.document.createElement(`style`),style.appendChild(document.createTextNode(CSS_DISABLE_TRANS)),window$1.document.head.appendChild(style));for(let c$3 of classesToAdd)el.classList.add(c$3);for(let c$3 of classesToRemove)el.classList.remove(c$3);attributeToChange&&el.setAttribute(attributeToChange.key,attributeToChange.value),disableTransition&&(window$1.getComputedStyle(style).opacity,document.head.removeChild(style))});function defaultOnChanged(mode){var _a$2;updateHTMLAttrs(selector,attribute,(_a$2=modes$1[mode])??mode)}function onChanged(mode){options$1.onChanged?options$1.onChanged(mode,defaultOnChanged):defaultOnChanged(mode)}watch(state,onChanged,{flush:`post`,immediate:!0}),tryOnMounted(()=>onChanged(state.value));let auto=computed({get(){return emitAuto?store.value:state.value},set(v){store.value=v}});return Object.assign(auto,{store,system,state})}function useCssVar(prop,target$1,options$1={}){let{window:window$1=defaultWindow$1,initialValue,observe=!1}=options$1,variable=shallowRef(initialValue),elRef=computed(()=>{var _a$2;return unrefElement(target$1)||(_a$2=window$1?.document)?.documentElement});function updateCssVar(){var _a$2;let key$2=toValue$1(prop),el=toValue$1(elRef);if(el&&window$1&&key$2){let value$1=(_a$2=window$1.getComputedStyle(el).getPropertyValue(key$2))?.trim();variable.value=value$1||variable.value||initialValue}}return observe&&useMutationObserver(elRef,updateCssVar,{attributeFilter:[`style`,`class`],window:window$1}),watch([elRef,()=>toValue$1(prop)],(_$1,old)=>{old[0]&&old[1]&&old[0].style.removeProperty(old[1]),updateCssVar()},{immediate:!0}),watch([variable,elRef],([val,el])=>{let raw_prop=toValue$1(prop);el?.style&&raw_prop&&(val==null?el.style.removeProperty(raw_prop):el.style.setProperty(raw_prop,val))},{immediate:!0}),variable}function useDark(options$1={}){let{valueDark=`dark`,valueLight=``}=options$1,mode=useColorMode({...options$1,onChanged:(mode2,defaultHandler)=>{var _a$2;options$1.onChanged?(_a$2=options$1.onChanged)==null||_a$2.call(options$1,mode2===`dark`,defaultHandler,mode2):defaultHandler(mode2)},modes:{dark:valueDark,light:valueLight}}),system=computed(()=>mode.system.value),isDark=computed({get(){return mode.value===`dark`},set(v){let modeVal=v?`dark`:`light`;system.value===modeVal?mode.value=`auto`:mode.value=modeVal}});return isDark}function useDevicesList(options$1={}){let{navigator:navigator$1=defaultNavigator,requestPermissions=!1,constraints={audio:!0,video:!0},onUpdated:onUpdated$1}=options$1,devices=ref([]),videoInputs=computed(()=>devices.value.filter(i=>i.kind===`videoinput`)),audioInputs=computed(()=>devices.value.filter(i=>i.kind===`audioinput`)),audioOutputs=computed(()=>devices.value.filter(i=>i.kind===`audiooutput`)),isSupported=useSupported(()=>navigator$1&&navigator$1.mediaDevices&&navigator$1.mediaDevices.enumerateDevices),permissionGranted=shallowRef(!1),stream;async function update(){isSupported.value&&(devices.value=await navigator$1.mediaDevices.enumerateDevices(),onUpdated$1?.(devices.value),stream)&&(stream.getTracks().forEach(t$1=>t$1.stop()),stream=null)}async function ensurePermissions(){let deviceName=constraints.video?`camera`:`microphone`;if(!isSupported.value)return!1;if(permissionGranted.value)return!0;let{state,query}=usePermission(deviceName,{controls:!0});if(await query(),state.value!==`granted`){let granted=!0;try{let allDevices=await navigator$1.mediaDevices.enumerateDevices(),hasCamera=allDevices.some(device=>device.kind===`videoinput`),hasMicrophone=allDevices.some(device=>device.kind===`audioinput`||device.kind===`audiooutput`);constraints.video=hasCamera?constraints.video:!1,constraints.audio=hasMicrophone?constraints.audio:!1,stream=await navigator$1.mediaDevices.getUserMedia(constraints)}catch{stream=null,granted=!1}update(),permissionGranted.value=granted}else permissionGranted.value=!0;return permissionGranted.value}return isSupported.value&&(requestPermissions&&ensurePermissions(),useEventListener(navigator$1.mediaDevices,`devicechange`,update,{passive:!0}),update()),{devices,ensurePermissions,permissionGranted,videoInputs,audioInputs,audioOutputs,isSupported}}function useResizeObserver(target$1,callback,options$1={}){let{window:window$1=defaultWindow$1,...observerOptions}=options$1,observer,isSupported=useSupported(()=>window$1&&`ResizeObserver`in window$1),cleanup=()=>{observer&&(observer.disconnect(),observer=void 0)},targets=computed(()=>{let _targets=toValue$1(target$1);return Array.isArray(_targets)?_targets.map(el=>unrefElement(el)):[unrefElement(_targets)]}),stopWatch=watch(targets,els=>{if(cleanup(),isSupported.value&&window$1){observer=new ResizeObserver(callback);for(let _el of els)_el&&observer.observe(_el,observerOptions)}},{immediate:!0,flush:`post`}),stop$1=()=>{cleanup(),stopWatch()};return tryOnScopeDispose(stop$1),{isSupported,stop:stop$1}}function useElementBounding(target$1,options$1={}){let{reset=!0,windowResize=!0,windowScroll=!0,immediate=!0,updateTiming=`sync`}=options$1,height=shallowRef(0),bottom=shallowRef(0),left=shallowRef(0),right=shallowRef(0),top=shallowRef(0),width=shallowRef(0),x$1=shallowRef(0),y=shallowRef(0);function recalculate(){let el=unrefElement(target$1);if(!el){reset&&(height.value=0,bottom.value=0,left.value=0,right.value=0,top.value=0,width.value=0,x$1.value=0,y.value=0);return}let rect=el.getBoundingClientRect();height.value=rect.height,bottom.value=rect.bottom,left.value=rect.left,right.value=rect.right,top.value=rect.top,width.value=rect.width,x$1.value=rect.x,y.value=rect.y}function update(){updateTiming===`sync`?recalculate():updateTiming===`next-frame`&&requestAnimationFrame(()=>recalculate())}return useResizeObserver(target$1,update),watch(()=>unrefElement(target$1),ele=>!ele&&update()),useMutationObserver(target$1,update,{attributeFilter:[`style`,`class`]}),windowScroll&&useEventListener(`scroll`,update,{capture:!0,passive:!0}),windowResize&&useEventListener(`resize`,update,{passive:!0}),tryOnMounted(()=>{immediate&&update()}),{height,bottom,left,right,top,width,x:x$1,y,update}}function useIntersectionObserver(target$1,callback,options$1={}){let{root:root$3,rootMargin=`0px`,threshold=0,window:window$1=defaultWindow$1,immediate=!0}=options$1,isSupported=useSupported(()=>window$1&&`IntersectionObserver`in window$1),targets=computed(()=>{let _target$1=toValue$1(target$1);return toArray(_target$1).map(unrefElement).filter(notNullish)}),cleanup=noop$3,isActive=shallowRef(immediate),stopWatch=isSupported.value?watch(()=>[targets.value,unrefElement(root$3),isActive.value],([targets2,root2])=>{if(cleanup(),!isActive.value||!targets2.length)return;let observer=new IntersectionObserver(callback,{root:unrefElement(root2),rootMargin,threshold});targets2.forEach(el=>el&&observer.observe(el)),cleanup=()=>{observer.disconnect(),cleanup=noop$3}},{immediate,flush:`post`}):noop$3,stop$1=()=>{cleanup(),stopWatch(),isActive.value=!1};return tryOnScopeDispose(stop$1),{isSupported,isActive,pause(){cleanup(),isActive.value=!1},resume(){isActive.value=!0},stop:stop$1}}const DEFAULT_OPTIONS={multiple:!0,accept:`*`,reset:!1,directory:!1};function prepareInitialFiles(files){if(!files)return null;if(files instanceof FileList)return files;let dt$3=new DataTransfer;for(let file of files)dt$3.items.add(file);return dt$3.files}function useFileDialog(options$1={}){let{document:document$3=defaultDocument}=options$1,files=ref(prepareInitialFiles(options$1.initialFiles)),{on:onChange,trigger:changeTrigger}=createEventHook$1(),{on:onCancel,trigger:cancelTrigger}=createEventHook$1(),inputRef=computed(()=>{var _a$2;let input=(_a$2=unrefElement(options$1.input))??(document$3?document$3.createElement(`input`):void 0);return input&&(input.type=`file`,input.onchange=event=>{let result=event.target;files.value=result.files,changeTrigger(files.value)},input.oncancel=()=>{cancelTrigger()}),input}),reset=()=>{files.value=null,inputRef.value&&inputRef.value.value&&(inputRef.value.value=``,changeTrigger(null))},applyOptions$1=options2=>{let el=inputRef.value;el&&(el.multiple=toValue$1(options2.multiple),el.accept=toValue$1(options2.accept),el.webkitdirectory=toValue$1(options2.directory),hasOwn$2(options2,`capture`))&&(el.capture=toValue$1(options2.capture))},open$1=localOptions=>{let el=inputRef.value;if(!el)return;let mergedOptions={...DEFAULT_OPTIONS,...options$1,...localOptions};applyOptions$1(mergedOptions),toValue$1(mergedOptions.reset)&&reset(),el.click()};return watchEffect(()=>{applyOptions$1(options$1)}),{files:readonly$1(files),open:open$1,reset,onCancel,onChange}}function useLocalStorage(key$2,initialValue,options$1={}){let{window:window$1=defaultWindow$1}=options$1;return useStorage(key$2,initialValue,window$1?.localStorage,options$1)}const UseMouseBuiltinExtractors={page:event=>[event.pageX,event.pageY],client:event=>[event.clientX,event.clientY],screen:event=>[event.screenX,event.screenY],movement:event=>event instanceof MouseEvent?[event.movementX,event.movementY]:null};function useMouse(options$1={}){let{type=`page`,touch=!0,resetOnTouchEnds=!1,initialValue={x:0,y:0},window:window$1=defaultWindow$1,target:target$1=window$1,scroll=!0,eventFilter}=options$1,_prevMouseEvent=null,_prevScrollX=0,_prevScrollY=0,x$1=shallowRef(initialValue.x),y=shallowRef(initialValue.y),sourceType=shallowRef(null),extractor=typeof type==`function`?type:UseMouseBuiltinExtractors[type],mouseHandler=event=>{let result=extractor(event);_prevMouseEvent=event,result&&([x$1.value,y.value]=result,sourceType.value=`mouse`),window$1&&(_prevScrollX=window$1.scrollX,_prevScrollY=window$1.scrollY)},touchHandler=event=>{if(event.touches.length>0){let result=extractor(event.touches[0]);result&&([x$1.value,y.value]=result,sourceType.value=`touch`)}},scrollHandler=()=>{if(!_prevMouseEvent||!window$1)return;let pos=extractor(_prevMouseEvent);_prevMouseEvent instanceof MouseEvent&&pos&&(x$1.value=pos[0]+window$1.scrollX-_prevScrollX,y.value=pos[1]+window$1.scrollY-_prevScrollY)},reset=()=>{x$1.value=initialValue.x,y.value=initialValue.y},mouseHandlerWrapper=eventFilter?event=>eventFilter(()=>mouseHandler(event),{}):event=>mouseHandler(event),touchHandlerWrapper=eventFilter?event=>eventFilter(()=>touchHandler(event),{}):event=>touchHandler(event),scrollHandlerWrapper=eventFilter?()=>eventFilter(()=>scrollHandler(),{}):()=>scrollHandler();if(target$1){let listenerOptions={passive:!0};useEventListener(target$1,[`mousemove`,`dragover`],mouseHandlerWrapper,listenerOptions),touch&&type!==`movement`&&(useEventListener(target$1,[`touchstart`,`touchmove`],touchHandlerWrapper,listenerOptions),resetOnTouchEnds&&useEventListener(target$1,`touchend`,reset,listenerOptions)),scroll&&type===`page`&&useEventListener(window$1,`scroll`,scrollHandlerWrapper,listenerOptions)}return{x:x$1,y,sourceType}}function useObjectUrl(object$1){let url=shallowRef(),release=()=>{url.value&&URL.revokeObjectURL(url.value),url.value=void 0};return watch(()=>toValue$1(object$1),newObject=>{release(),newObject&&(url.value=URL.createObjectURL(newObject))},{immediate:!0}),tryOnScopeDispose(release),readonly$1(url)}const defaultState={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},keys$1=Object.keys(defaultState);function usePointer(options$1={}){let{target:target$1=defaultWindow$1}=options$1,isInside=shallowRef(!1),state=ref(options$1.initialValue||{});Object.assign(state.value,defaultState,state.value);let handler=event=>{isInside.value=!0,!(options$1.pointerTypes&&!options$1.pointerTypes.includes(event.pointerType))&&(state.value=objectPick(event,keys$1,!1))};if(target$1){let listenerOptions={passive:!0};useEventListener(target$1,[`pointerdown`,`pointermove`,`pointerup`],handler,listenerOptions),useEventListener(target$1,`pointerleave`,()=>isInside.value=!1,listenerOptions)}return{...toRefs$1(state),isInside}}const topVarName=`--vueuse-safe-area-top`,rightVarName=`--vueuse-safe-area-right`,bottomVarName=`--vueuse-safe-area-bottom`,leftVarName=`--vueuse-safe-area-left`;function useScreenSafeArea(){let top=shallowRef(``),right=shallowRef(``),bottom=shallowRef(``),left=shallowRef(``);if(isClient$2){let topCssVar=useCssVar(topVarName),rightCssVar=useCssVar(rightVarName),bottomCssVar=useCssVar(bottomVarName),leftCssVar=useCssVar(leftVarName);topCssVar.value=`env(safe-area-inset-top, 0px)`,rightCssVar.value=`env(safe-area-inset-right, 0px)`,bottomCssVar.value=`env(safe-area-inset-bottom, 0px)`,leftCssVar.value=`env(safe-area-inset-left, 0px)`,tryOnMounted(update),useEventListener(`resize`,useDebounceFn(update),{passive:!0})}function update(){top.value=getValue(topVarName),right.value=getValue(rightVarName),bottom.value=getValue(bottomVarName),left.value=getValue(leftVarName)}return{top,right,bottom,left,update}}function getValue(position$2){return getComputedStyle(document.documentElement).getPropertyValue(position$2)}const DEFAULT_UNITS=[{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`}],DEFAULT_MESSAGES={justNow:`just now`,past:n=>n.match(/\d/)?`${n} ago`:n,future:n=>n.match(/\d/)?`in ${n}`:n,month:(n,past)=>n===1?past?`last month`:`next month`:`${n} month${n>1?`s`:``}`,year:(n,past)=>n===1?past?`last year`:`next year`:`${n} year${n>1?`s`:``}`,day:(n,past)=>n===1?past?`yesterday`:`tomorrow`:`${n} day${n>1?`s`:``}`,week:(n,past)=>n===1?past?`last week`:`next week`:`${n} week${n>1?`s`:``}`,hour:n=>`${n} hour${n>1?`s`:``}`,minute:n=>`${n} minute${n>1?`s`:``}`,second:n=>`${n} second${n>1?`s`:``}`,invalid:``};function useUserMedia(options$1={}){var _a$2,_b;let enabled$1=shallowRef((_a$2=options$1.enabled)??!1),autoSwitch=shallowRef((_b=options$1.autoSwitch)??!0),constraints=ref(options$1.constraints),{navigator:navigator$1=defaultNavigator}=options$1,isSupported=useSupported(()=>{var _a2;return(_a2=navigator$1?.mediaDevices)?.getUserMedia}),stream=shallowRef();function getDeviceOptions(type){switch(type){case`video`:if(constraints.value)return constraints.value.video||!1;break;case`audio`:if(constraints.value)return constraints.value.audio||!1;break}}async function _start$1(){if(!(!isSupported.value||stream.value))return stream.value=await navigator$1.mediaDevices.getUserMedia({video:getDeviceOptions(`video`),audio:getDeviceOptions(`audio`)}),stream.value}function _stop(){var _a2;(_a2=stream.value)==null||_a2.getTracks().forEach(t$1=>t$1.stop()),stream.value=void 0}function stop$1(){_stop(),enabled$1.value=!1}async function start(){return await _start$1(),stream.value&&(enabled$1.value=!0),stream.value}async function restart(){return _stop(),await start()}return watch(enabled$1,v=>{v?_start$1():_stop()},{immediate:!0}),watch(constraints,()=>{autoSwitch.value&&stream.value&&restart()},{immediate:!0}),tryOnScopeDispose(()=>{stop$1()}),{isSupported,stream,start,stop:stop$1,restart,constraints,enabled:enabled$1,autoSwitch}}function useWebWorker(arg0,workerOptions,options$1){let{window:window$1=defaultWindow$1}=options$1??{},data$12=ref(null),worker=shallowRef(),post=(...args)=>{worker.value&&worker.value.postMessage(...args)},terminate=function(){worker.value&&worker.value.terminate()};return window$1&&(typeof arg0==`string`?worker.value=new Worker(arg0,workerOptions):typeof arg0==`function`?worker.value=arg0():worker.value=arg0,worker.value.onmessage=e$4=>{data$12.value=e$4.data},tryOnScopeDispose(()=>{worker.value&&worker.value.terminate()})),{data:data$12,post,terminate,worker}}function useWindowSize(options$1={}){let{window:window$1=defaultWindow$1,initialWidth=1/0,initialHeight=1/0,listenOrientation=!0,includeScrollbar=!0,type=`inner`}=options$1,width=shallowRef(initialWidth),height=shallowRef(initialHeight),update=()=>{if(window$1)if(type===`outer`)width.value=window$1.outerWidth,height.value=window$1.outerHeight;else if(type===`visual`&&window$1.visualViewport){let{width:visualViewportWidth,height:visualViewportHeight,scale:scale$1}=window$1.visualViewport;width.value=Math.round(visualViewportWidth*scale$1),height.value=Math.round(visualViewportHeight*scale$1)}else includeScrollbar?(width.value=window$1.innerWidth,height.value=window$1.innerHeight):(width.value=window$1.document.documentElement.clientWidth,height.value=window$1.document.documentElement.clientHeight)};update(),tryOnMounted(update);let listenerOptions={passive:!0};if(useEventListener(`resize`,update,listenerOptions),window$1&&type===`visual`&&window$1.visualViewport&&useEventListener(window$1.visualViewport,`resize`,update,listenerOptions),listenOrientation){let matches$1=useMediaQuery(`(orientation: portrait)`);watch(matches$1,()=>update())}return{width,height}}const defaultTimestep=1/60*1e3,getCurrentTime=typeof performance<`u`?()=>performance.now():()=>Date.now(),onNextFrame=typeof window<`u`?callback=>window.requestAnimationFrame(callback):callback=>setTimeout(()=>callback(getCurrentTime()),defaultTimestep);function createRenderStep(runNextFrame$1){let toRun=[],toRunNextFrame=[],numToRun=0,isProcessing$1=!1,flushNextFrame=!1,toKeepAlive=new WeakSet,step={schedule:(callback,keepAlive=!1,immediate=!1)=>{let addToCurrentFrame=immediate&&isProcessing$1,buffer$1=addToCurrentFrame?toRun:toRunNextFrame;return keepAlive&&toKeepAlive.add(callback),buffer$1.indexOf(callback)===-1&&(buffer$1.push(callback),addToCurrentFrame&&isProcessing$1&&(numToRun=toRun.length)),callback},cancel:callback=>{let index$1=toRunNextFrame.indexOf(callback);index$1!==-1&&toRunNextFrame.splice(index$1,1),toKeepAlive.delete(callback)},process:frameData=>{if(isProcessing$1){flushNextFrame=!0;return}if(isProcessing$1=!0,[toRun,toRunNextFrame]=[toRunNextFrame,toRun],toRunNextFrame.length=0,numToRun=toRun.length,numToRun)for(let i=0;i(acc[key$2]=createRenderStep(()=>runNextFrame=!0),acc),{}),sync$1=stepsOrder.reduce((acc,key$2)=>{let step=steps$1[key$2];return acc[key$2]=(process$1,keepAlive=!1,immediate=!1)=>(runNextFrame||startLoop(),step.schedule(process$1,keepAlive,immediate)),acc},{}),cancelSync=stepsOrder.reduce((acc,key$2)=>(acc[key$2]=steps$1[key$2].cancel,acc),{}),flushSync=stepsOrder.reduce((acc,key$2)=>(acc[key$2]=()=>steps$1[key$2].process(frame),acc),{}),processStep=stepId=>steps$1[stepId].process(frame),processFrame=timestamp$2=>{runNextFrame=!1,frame.delta=useDefaultElapsed?defaultTimestep:Math.max(Math.min(timestamp$2-frame.timestamp,maxElapsed),1),frame.timestamp=timestamp$2,isProcessing=!0,stepsOrder.forEach(processStep),isProcessing=!1,runNextFrame&&(useDefaultElapsed=!1,onNextFrame(processFrame))},startLoop=()=>{runNextFrame=!0,useDefaultElapsed=!0,isProcessing||onNextFrame(processFrame)},getFrameData=()=>frame;var es_default=sync$1;function __rest(s,e$4){var t$1={};for(var p$4 in s)Object.prototype.hasOwnProperty.call(s,p$4)&&e$4.indexOf(p$4)<0&&(t$1[p$4]=s[p$4]);if(s!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,p$4=Object.getOwnPropertySymbols(s);iMath.min(Math.max(v,min$1),max$1),safeMin=.001,minDuration=.01,maxDuration=10,minDamping=.05,maxDamping=1;function findSpring({duration:duration$2=800,bounce=.25,velocity=0,mass=1}){let envelope,derivative;warning(duration$2<=maxDuration*1e3,`Spring duration must be 10 seconds or less`);let dampingRatio=1-bounce;dampingRatio=clamp$3(minDamping,maxDamping,dampingRatio),duration$2=clamp$3(minDuration,maxDuration,duration$2/1e3),dampingRatio<1?(envelope=undampedFreq$1=>{let exponentialDecay=undampedFreq$1*dampingRatio,delta=exponentialDecay*duration$2,a$1=exponentialDecay-velocity,b$1=calcAngularFreq(undampedFreq$1,dampingRatio),c$3=Math.exp(-delta);return safeMin-a$1/b$1*c$3},derivative=undampedFreq$1=>{let exponentialDecay=undampedFreq$1*dampingRatio,delta=exponentialDecay*duration$2,d=delta*velocity+velocity,e$4=dampingRatio**2*undampedFreq$1**2*duration$2,f$2=Math.exp(-delta),g=calcAngularFreq(undampedFreq$1**2,dampingRatio),factor$1=-envelope(undampedFreq$1)+safeMin>0?-1:1;return factor$1*((d-e$4)*f$2)/g}):(envelope=undampedFreq$1=>{let a$1=Math.exp(-undampedFreq$1*duration$2),b$1=(undampedFreq$1-velocity)*duration$2+1;return-safeMin+a$1*b$1},derivative=undampedFreq$1=>{let a$1=Math.exp(-undampedFreq$1*duration$2),b$1=(velocity-undampedFreq$1)*(duration$2*duration$2);return a$1*b$1});let initialGuess=5/duration$2,undampedFreq=approximateRoot(envelope,derivative,initialGuess);if(duration$2*=1e3,isNaN(undampedFreq))return{stiffness:100,damping:10,duration:duration$2};{let stiffness=undampedFreq**2*mass;return{stiffness,damping:dampingRatio*2*Math.sqrt(mass*stiffness),duration:duration$2}}}const rootIterations=12;function approximateRoot(envelope,derivative,initialGuess){let result=initialGuess;for(let i=1;ioptions$1[key$2]!==void 0)}function getSpringOptions(options$1){let springOptions=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},options$1);if(!isSpringType(options$1,physicsKeys)&&isSpringType(options$1,durationKeys)){let derived=findSpring(options$1);springOptions=Object.assign(Object.assign(Object.assign({},springOptions),derived),{velocity:0,mass:1}),springOptions.isResolvedFromDuration=!0}return springOptions}function spring(_a$2){var{from=0,to:to$1=1,restSpeed=2,restDelta}=_a$2,options$1=__rest(_a$2,[`from`,`to`,`restSpeed`,`restDelta`]);let state={done:!1,value:from},{stiffness,damping,mass,velocity,duration:duration$2,isResolvedFromDuration}=getSpringOptions(options$1),resolveSpring=zero,resolveVelocity=zero;function createSpring(){let initialVelocity=velocity?-(velocity/1e3):0,initialDelta=to$1-from,dampingRatio=damping/(2*Math.sqrt(stiffness*mass)),undampedAngularFreq=Math.sqrt(stiffness/mass)/1e3;if(restDelta===void 0&&(restDelta=Math.min(Math.abs(to$1-from)/100,.4)),dampingRatio<1){let angularFreq=calcAngularFreq(undampedAngularFreq,dampingRatio);resolveSpring=t$1=>{let envelope=Math.exp(-dampingRatio*undampedAngularFreq*t$1);return to$1-envelope*((initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)/angularFreq*Math.sin(angularFreq*t$1)+initialDelta*Math.cos(angularFreq*t$1))},resolveVelocity=t$1=>{let envelope=Math.exp(-dampingRatio*undampedAngularFreq*t$1);return dampingRatio*undampedAngularFreq*envelope*(Math.sin(angularFreq*t$1)*(initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)/angularFreq+initialDelta*Math.cos(angularFreq*t$1))-envelope*(Math.cos(angularFreq*t$1)*(initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)-angularFreq*initialDelta*Math.sin(angularFreq*t$1))}}else if(dampingRatio===1)resolveSpring=t$1=>to$1-Math.exp(-undampedAngularFreq*t$1)*(initialDelta+(initialVelocity+undampedAngularFreq*initialDelta)*t$1);else{let dampedAngularFreq=undampedAngularFreq*Math.sqrt(dampingRatio*dampingRatio-1);resolveSpring=t$1=>{let envelope=Math.exp(-dampingRatio*undampedAngularFreq*t$1),freqForT=Math.min(dampedAngularFreq*t$1,300);return to$1-envelope*((initialVelocity+dampingRatio*undampedAngularFreq*initialDelta)*Math.sinh(freqForT)+dampedAngularFreq*initialDelta*Math.cosh(freqForT))/dampedAngularFreq}}}return createSpring(),{next:t$1=>{let current=resolveSpring(t$1);if(isResolvedFromDuration)state.done=t$1>=duration$2;else{let currentVelocity=resolveVelocity(t$1)*1e3,isBelowVelocityThreshold=Math.abs(currentVelocity)<=restSpeed,isBelowDisplacementThreshold=Math.abs(to$1-current)<=restDelta;state.done=isBelowVelocityThreshold&&isBelowDisplacementThreshold}return state.value=state.done?to$1:current,state},flipTarget:()=>{velocity=-velocity,[from,to$1]=[to$1,from],createSpring()}}}spring.needsInterpolation=(a$1,b$1)=>typeof a$1==`string`||typeof b$1==`string`;const zero=_t$2=>0,progress=(from,to$1,value$1)=>{let toFromDifference=to$1-from;return toFromDifference===0?1:(value$1-from)/toFromDifference},mix=(from,to$1,progress$1)=>-progress$1*from+progress$1*to$1+from,clamp$4=(min$1,max$1)=>v=>Math.max(Math.min(v,max$1),min$1),sanitize=v=>v%1?Number(v.toFixed(5)):v,floatRegex=/(-)?([\d]*\.?[\d])+/g,colorRegex=/(#[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,singleColorRegex=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function isString$1(v){return typeof v==`string`}const number$4={test:v=>typeof v==`number`,parse:parseFloat,transform:v=>v},alpha=Object.assign(Object.assign({},number$4),{transform:clamp$4(0,1)}),scale=Object.assign(Object.assign({},number$4),{default:1}),createUnitType=unit=>({test:v=>isString$1(v)&&v.endsWith(unit)&&v.split(` `).length===1,parse:parseFloat,transform:v=>`${v}${unit}`}),degrees=createUnitType(`deg`),percent=createUnitType(`%`),px=createUnitType(`px`),vh=createUnitType(`vh`),vw=createUnitType(`vw`),progressPercentage=Object.assign(Object.assign({},percent),{parse:v=>percent.parse(v)/100,transform:v=>percent.transform(v*100)}),isColorString=(type,testProp)=>v=>!!(isString$1(v)&&singleColorRegex.test(v)&&v.startsWith(type)||testProp&&Object.prototype.hasOwnProperty.call(v,testProp)),splitColor=(aName,bName,cName)=>v=>{if(!isString$1(v))return v;let[a$1,b$1,c$3,alpha$1]=v.match(floatRegex);return{[aName]:parseFloat(a$1),[bName]:parseFloat(b$1),[cName]:parseFloat(c$3),alpha:alpha$1===void 0?1:parseFloat(alpha$1)}},hsla={test:isColorString(`hsl`,`hue`),parse:splitColor(`hue`,`saturation`,`lightness`),transform:({hue:hue$2,saturation,lightness,alpha:alpha$1=1})=>`hsla(`+Math.round(hue$2)+`, `+percent.transform(sanitize(saturation))+`, `+percent.transform(sanitize(lightness))+`, `+sanitize(alpha.transform(alpha$1))+`)`},clampRgbUnit=clamp$4(0,255),rgbUnit=Object.assign(Object.assign({},number$4),{transform:v=>Math.round(clampRgbUnit(v))}),rgba={test:isColorString(`rgb`,`red`),parse:splitColor(`red`,`green`,`blue`),transform:({red,green,blue,alpha:alpha$1=1})=>`rgba(`+rgbUnit.transform(red)+`, `+rgbUnit.transform(green)+`, `+rgbUnit.transform(blue)+`, `+sanitize(alpha.transform(alpha$1))+`)`};function parseHex$1(v){let r$1=``,g=``,b$1=``,a$1=``;return v.length>5?(r$1=v.substr(1,2),g=v.substr(3,2),b$1=v.substr(5,2),a$1=v.substr(7,2)):(r$1=v.substr(1,1),g=v.substr(2,1),b$1=v.substr(3,1),a$1=v.substr(4,1),r$1+=r$1,g+=g,b$1+=b$1,a$1+=a$1),{red:parseInt(r$1,16),green:parseInt(g,16),blue:parseInt(b$1,16),alpha:a$1?parseInt(a$1,16)/255:1}}const hex$1={test:isColorString(`#`),parse:parseHex$1,transform:rgba.transform},color$1={test:v=>rgba.test(v)||hex$1.test(v)||hsla.test(v),parse:v=>rgba.test(v)?rgba.parse(v):hsla.test(v)?hsla.parse(v):hex$1.parse(v),transform:v=>isString$1(v)?v:v.hasOwnProperty(`red`)?rgba.transform(v):hsla.transform(v)},colorToken="${c}",numberToken="${n}";function test(v){var _a$2,_b,_c,_d;return isNaN(v)&&isString$1(v)&&((_b=(_a$2=v.match(floatRegex))?.length)??0)+((_d=(_c=v.match(colorRegex))?.length)??0)>0}function analyse$1(v){typeof v==`number`&&(v=`${v}`);let values=[],numColors=0,colors=v.match(colorRegex);colors&&(numColors=colors.length,v=v.replace(colorRegex,colorToken),values.push(...colors.map(color$1.parse)));let numbers=v.match(floatRegex);return numbers&&(v=v.replace(floatRegex,numberToken),values.push(...numbers.map(number$4.parse))),{values,numColors,tokenised:v}}function parse$5(v){return analyse$1(v).values}function createTransformer$1(v){let{values,numColors,tokenised}=analyse$1(v),numValues=values.length;return v$1=>{let output=tokenised;for(let i=0;itypeof v==`number`?0:v;function getAnimatableNone$2(v){let parsed=parse$5(v),transformer=createTransformer$1(v);return transformer(parsed.map(convertNumbersToZero))}const complex={test,parse:parse$5,createTransformer:createTransformer$1,getAnimatableNone:getAnimatableNone$2},maxDefaults=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function applyDefaultFilter(v){let[name$2,value$1]=v.slice(0,-1).split(`(`);if(name$2===`drop-shadow`)return v;let[number$5]=value$1.match(floatRegex)||[];if(!number$5)return v;let unit=value$1.replace(number$5,``),defaultValue=maxDefaults.has(name$2)?1:0;return number$5!==value$1&&(defaultValue*=100),name$2+`(`+defaultValue+unit+`)`}const functionRegex=/([a-z-]*)\(.*?\)/g,filter=Object.assign(Object.assign({},complex),{getAnimatableNone:v=>{let functions=v.match(functionRegex);return functions?functions.map(applyDefaultFilter).join(` `):v}});function hueToRgb(p$4,q,t$1){return t$1<0&&(t$1+=1),t$1>1&&--t$1,t$1<1/6?p$4+(q-p$4)*6*t$1:t$1<1/2?q:t$1<2/3?p$4+(q-p$4)*(2/3-t$1)*6:p$4}function hslaToRgba({hue:hue$2,saturation,lightness,alpha:alpha$1}){hue$2/=360,saturation/=100,lightness/=100;let red=0,green=0,blue=0;if(!saturation)red=green=blue=lightness;else{let q=lightness<.5?lightness*(1+saturation):lightness+saturation-lightness*saturation,p$4=2*lightness-q;red=hueToRgb(p$4,q,hue$2+1/3),green=hueToRgb(p$4,q,hue$2),blue=hueToRgb(p$4,q,hue$2-1/3)}return{red:Math.round(red*255),green:Math.round(green*255),blue:Math.round(blue*255),alpha:alpha$1}}const mixLinearColor=(from,to$1,v)=>{let fromExpo=from*from,toExpo=to$1*to$1;return Math.sqrt(Math.max(0,v*(toExpo-fromExpo)+fromExpo))},colorTypes=[hex$1,rgba,hsla],getColorType=v=>colorTypes.find(type=>type.test(v)),notAnimatable=color$2=>`'${color$2}' is not an animatable color. Use the equivalent color code instead.`,mixColor=(from,to$1)=>{let fromColorType=getColorType(from),toColorType=getColorType(to$1);invariant(!!fromColorType,notAnimatable(from)),invariant(!!toColorType,notAnimatable(to$1));let fromColor=fromColorType.parse(from),toColor=toColorType.parse(to$1);fromColorType===hsla&&(fromColor=hslaToRgba(fromColor),fromColorType=rgba),toColorType===hsla&&(toColor=hslaToRgba(toColor),toColorType=rgba);let blended=Object.assign({},fromColor);return v=>{for(let key$2 in blended)key$2!==`alpha`&&(blended[key$2]=mixLinearColor(fromColor[key$2],toColor[key$2],v));return blended.alpha=mix(fromColor.alpha,toColor.alpha,v),fromColorType.transform(blended)}},isNum$1=v=>typeof v==`number`,combineFunctions=(a$1,b$1)=>v=>b$1(a$1(v)),pipe$1=(...transformers)=>transformers.reduce(combineFunctions);function getMixer(origin,target$1){return isNum$1(origin)?v=>mix(origin,target$1,v):color$1.test(origin)?mixColor(origin,target$1):mixComplex(origin,target$1)}const mixArray=(from,to$1)=>{let output=[...from],numValues=output.length,blendValue=from.map((fromThis,i)=>getMixer(fromThis,to$1[i]));return v=>{for(let i=0;i{let output=Object.assign(Object.assign({},origin),target$1),blendValue={};for(let key$2 in output)origin[key$2]!==void 0&&target$1[key$2]!==void 0&&(blendValue[key$2]=getMixer(origin[key$2],target$1[key$2]));return v=>{for(let key$2 in blendValue)output[key$2]=blendValue[key$2](v);return output}};function analyse(value$1){let parsed=complex.parse(value$1),numValues=parsed.length,numNumbers=0,numRGB=0,numHSL=0;for(let i=0;i{let template=complex.createTransformer(target$1),originStats=analyse(origin),targetStats=analyse(target$1),canInterpolate=originStats.numHSL===targetStats.numHSL&&originStats.numRGB===targetStats.numRGB&&originStats.numNumbers>=targetStats.numNumbers;return canInterpolate?pipe$1(mixArray(originStats.parsed,targetStats.parsed),template):(warning(!0,`Complex values '${origin}' and '${target$1}' 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.`),p$4=>`${p$4>0?target$1:origin}`)},mixNumber=(from,to$1)=>p$4=>mix(from,to$1,p$4);function detectMixerFactory(v){if(typeof v==`number`)return mixNumber;if(typeof v==`string`)return color$1.test(v)?mixColor:mixComplex;if(Array.isArray(v))return mixArray;if(typeof v==`object`)return mixObject}function createMixers(output,ease,customMixer){let mixers=[],mixerFactory=customMixer||detectMixerFactory(output[0]),numMixers=output.length-1;for(let i=0;imixer(progress(from,to$1,v))}function slowInterpolate(input,mixers){let inputLength=input.length,lastInputIndex=inputLength-1;return v=>{let mixerIndex=0,foundMixerIndex=!1;if(v<=input[0]?foundMixerIndex=!0:v>=input[lastInputIndex]&&(mixerIndex=lastInputIndex-1,foundMixerIndex=!0),!foundMixerIndex){let i=1;for(;iv||i===lastInputIndex);i++);mixerIndex=i-1}let progressInRange=progress(input[mixerIndex],input[mixerIndex+1],v);return mixers[mixerIndex](progressInRange)}}function interpolate$1(input,output,{clamp:isClamp=!0,ease,mixer}={}){let inputLength=input.length;invariant(inputLength===output.length,`Both input and output ranges must be the same length`),invariant(!ease||!Array.isArray(ease)||ease.length===inputLength-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),input[0]>input[inputLength-1]&&(input=[].concat(input),output=[].concat(output),input.reverse(),output.reverse());let mixers=createMixers(output,ease,mixer),interpolator=inputLength===2?fastInterpolate(input,mixers):slowInterpolate(input,mixers);return isClamp?v=>interpolator(clamp$3(input[0],input[inputLength-1],v)):interpolator}const reverseEasing=easing=>p$4=>1-easing(1-p$4),mirrorEasing=easing=>p$4=>p$4<=.5?easing(2*p$4)/2:(2-easing(2*(1-p$4)))/2,createExpoIn=power=>p$4=>p$4**+power,createBackIn=power=>p$4=>p$4*p$4*((power+1)*p$4-power),createAnticipate=power=>{let backEasing=createBackIn(power);return p$4=>(p$4*=2)<1?.5*backEasing(p$4):.5*(2-2**(-10*(p$4-1)))},DEFAULT_OVERSHOOT_STRENGTH=1.525,BOUNCE_FIRST_THRESHOLD=4/11,BOUNCE_SECOND_THRESHOLD=8/11,BOUNCE_THIRD_THRESHOLD=9/10,linear$1=p$4=>p$4,easeIn=createExpoIn(2),easeOut=reverseEasing(easeIn),easeInOut=mirrorEasing(easeIn),circIn=p$4=>1-Math.sin(Math.acos(p$4)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circOut),backIn=createBackIn(DEFAULT_OVERSHOOT_STRENGTH),backOut=reverseEasing(backIn),backInOut=mirrorEasing(backIn),anticipate=createAnticipate(DEFAULT_OVERSHOOT_STRENGTH),ca=4356/361,cb=35442/1805,cc=16061/1805,bounceOut=p$4=>{if(p$4===1||p$4===0)return p$4;let p2=p$4*p$4;return p$4p$4<.5?.5*(1-bounceOut(1-p$4*2)):.5*bounceOut(p$4*2-1)+.5;function defaultEasing(values,easing){return values.map(()=>easing||easeInOut).splice(0,values.length-1)}function defaultOffset(values){let numValues=values.length;return values.map((_value,i)=>i===0?0:i/(numValues-1))}function convertOffsetToTimes(offset$2,duration$2){return offset$2.map(o=>o*duration$2)}function keyframes$3({from=0,to:to$1=1,ease,offset:offset$2,duration:duration$2=300}){let state={done:!1,value:from},values=Array.isArray(to$1)?to$1:[from,to$1],times=convertOffsetToTimes(offset$2&&offset$2.length===values.length?offset$2:defaultOffset(values),duration$2);function createInterpolator(){return interpolate$1(times,values,{ease:Array.isArray(ease)?ease:defaultEasing(values,ease)})}let interpolator=createInterpolator();return{next:t$1=>(state.value=interpolator(t$1),state.done=t$1>=duration$2,state),flipTarget:()=>{values.reverse(),interpolator=createInterpolator()}}}function decay({velocity=0,from=0,power=.8,timeConstant=350,restDelta=.5,modifyTarget}){let state={done:!1,value:from},amplitude=power*velocity,ideal=from+amplitude,target$1=modifyTarget===void 0?ideal:modifyTarget(ideal);return target$1!==ideal&&(amplitude=target$1-from),{next:t$1=>{let delta=-amplitude*Math.exp(-t$1/timeConstant);return state.done=!(delta>restDelta||delta<-restDelta),state.value=state.done?target$1:target$1+delta,state},flipTarget:()=>{}}}const types={keyframes:keyframes$3,spring,decay};function detectAnimationFromOptions(config$1){if(Array.isArray(config$1.to))return keyframes$3;if(types[config$1.type])return types[config$1.type];let keys$3=new Set(Object.keys(config$1));return keys$3.has(`ease`)||keys$3.has(`duration`)&&!keys$3.has(`dampingRatio`)?keyframes$3:keys$3.has(`dampingRatio`)||keys$3.has(`stiffness`)||keys$3.has(`mass`)||keys$3.has(`damping`)||keys$3.has(`restSpeed`)||keys$3.has(`restDelta`)?spring:keyframes$3}function loopElapsed(elapsed,duration$2,delay=0){return elapsed-duration$2-delay}function reverseElapsed(elapsed,duration$2,delay=0,isForwardPlayback=!0){return isForwardPlayback?loopElapsed(duration$2+-elapsed,duration$2,delay):duration$2-(elapsed-duration$2)+delay}function hasRepeatDelayElapsed(elapsed,duration$2,delay,isForwardPlayback){return isForwardPlayback?elapsed>=duration$2+delay:elapsed<=-delay}const framesync=update=>{let passTimestamp=({delta})=>update(delta);return{start:()=>es_default.update(passTimestamp,!0),stop:()=>cancelSync.update(passTimestamp)}};function animate$1(_a$2){var _b,_c,{from,autoplay=!0,driver=framesync,elapsed=0,repeat:repeatMax=0,repeatType=`loop`,repeatDelay=0,onPlay,onStop,onComplete,onRepeat,onUpdate}=_a$2,options$1=__rest(_a$2,[`from`,`autoplay`,`driver`,`elapsed`,`repeat`,`repeatType`,`repeatDelay`,`onPlay`,`onStop`,`onComplete`,`onRepeat`,`onUpdate`]);let{to:to$1}=options$1,driverControls,repeatCount=0,computedDuration=options$1.duration,latest,isComplete=!1,isForwardPlayback=!0,interpolateFromNumber,animator=detectAnimationFromOptions(options$1);(_c=(_b=animator).needsInterpolation)?.call(_b,from,to$1)&&(interpolateFromNumber=interpolate$1([0,100],[from,to$1],{clamp:!1}),from=0,to$1=100);let animation=animator(Object.assign(Object.assign({},options$1),{from,to:to$1}));function repeat(){repeatCount++,repeatType===`reverse`?(isForwardPlayback=repeatCount%2==0,elapsed=reverseElapsed(elapsed,computedDuration,repeatDelay,isForwardPlayback)):(elapsed=loopElapsed(elapsed,computedDuration,repeatDelay),repeatType===`mirror`&&animation.flipTarget()),isComplete=!1,onRepeat&&onRepeat()}function complete(){driverControls.stop(),onComplete&&onComplete()}function update(delta){if(isForwardPlayback||(delta=-delta),elapsed+=delta,!isComplete){let state=animation.next(Math.max(0,elapsed));latest=state.value,interpolateFromNumber&&(latest=interpolateFromNumber(latest)),isComplete=isForwardPlayback?state.done:elapsed<=0}onUpdate?.(latest),isComplete&&(repeatCount===0&&(computedDuration??=elapsed),repeatCount{onStop?.(),driverControls.stop()}}}function velocityPerSecond(velocity,frameDuration){return frameDuration?velocity*(1e3/frameDuration):0}function inertia({from=0,velocity=0,min:min$1,max:max$1,power=.8,timeConstant=750,bounceStiffness=500,bounceDamping=10,restDelta=1,modifyTarget,driver,onUpdate,onComplete,onStop}){let currentAnimation;function isOutOfBounds(v){return min$1!==void 0&&vmax$1}function boundaryNearest(v){return min$1===void 0?max$1:max$1===void 0||Math.abs(min$1-v){var _a$2;onUpdate?.(v),(_a$2=options$1.onUpdate)==null||_a$2.call(options$1,v)},onComplete,onStop}))}function startSpring(options$1){startAnimation(Object.assign({type:`spring`,stiffness:bounceStiffness,damping:bounceDamping,restDelta},options$1))}if(isOutOfBounds(from))startSpring({from,velocity,to:boundaryNearest(from)});else{let target$1=power*velocity+from;modifyTarget!==void 0&&(target$1=modifyTarget(target$1));let boundary=boundaryNearest(target$1),heading$1=boundary===min$1?-1:1,prev,current,checkBoundary=v=>{prev=current,current=v,velocity=velocityPerSecond(v-prev,getFrameData().delta),(heading$1===1&&v>boundary||heading$1===-1&&vcurrentAnimation?.stop()}}const a=(a1,a2)=>1-3*a2+3*a1,b=(a1,a2)=>3*a2-6*a1,c$2=a1=>3*a1,calcBezier$1=(t$1,a1,a2)=>((a(a1,a2)*t$1+b(a1,a2))*t$1+c$2(a1))*t$1,getSlope=(t$1,a1,a2)=>3*a(a1,a2)*t$1*t$1+2*b(a1,a2)*t$1+c$2(a1),subdivisionPrecision=1e-7,subdivisionMaxIterations=10;function binarySubdivide$1(aX,aA,aB,mX1,mX2){let currentX,currentT,i=0;do currentT=aA+(aB-aA)/2,currentX=calcBezier$1(currentT,mX1,mX2)-aX,currentX>0?aB=currentT:aA=currentT;while(Math.abs(currentX)>subdivisionPrecision&&++i=newtonMinSlope?newtonRaphsonIterate(aX,guessForT,mX1,mX2):initialSlope===0?guessForT:binarySubdivide$1(aX,intervalStart,intervalStart+kSampleStepSize,mX1,mX2)}return t$1=>t$1===0||t$1===1?t$1:calcBezier$1(getTForX(t$1),mY1,mY2)}const __vite_import_meta_env__$1={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`},motionState$1={};var SubscriptionManager$1=class{subscriptions=new Set;add(handler){return this.subscriptions.add(handler),()=>this.subscriptions.delete(handler)}notify(a$1,b$1,c$3){if(this.subscriptions.size)for(let handler of this.subscriptions)handler(a$1,b$1,c$3)}clear(){this.subscriptions.clear()}};function isFloat$1(value$1){return!Number.isNaN(Number.parseFloat(value$1))}var MotionValue$1=class{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new SubscriptionManager$1;stopAnimation;canTrackVelocity=!1;constructor(init){this.prev=this.current=init,this.canTrackVelocity=isFloat$1(this.current)}onChange(subscription){return this.updateSubscribers.add(subscription)}clearListeners(){this.updateSubscribers.clear()}set(v){this.updateAndNotify(v)}updateAndNotify=v=>{this.prev=this.current,this.current=v;let{delta,timestamp:timestamp$2}=getFrameData();this.lastUpdated!==timestamp$2&&(this.timeDelta=delta,this.lastUpdated=timestamp$2),es_default.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)};get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?velocityPerSecond(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}scheduleVelocityCheck=()=>es_default.postRender(this.velocityCheck);velocityCheck=({timestamp:timestamp$2})=>{this.canTrackVelocity||=isFloat$1(this.current),timestamp$2!==this.lastUpdated&&(this.prev=this.current)};start(animation){return this.stop(),new Promise(resolve$1=>{let{stop:stop$1}=animation(resolve$1);this.stopAnimation=stop$1}).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 getMotionValue$1(init){return new MotionValue$1(init)}const{isArray:isArray$4}=Array;function useMotionValues$1(){let motionValues=ref({}),stop$1=keys$3=>{let destroyKey=key$2=>{motionValues.value[key$2]&&(motionValues.value[key$2].stop(),motionValues.value[key$2].destroy(),delete motionValues.value[key$2])};keys$3?isArray$4(keys$3)?keys$3.forEach(destroyKey):destroyKey(keys$3):Object.keys(motionValues.value).forEach(destroyKey)},get=(key$2,from,target$1)=>{if(motionValues.value[key$2])return motionValues.value[key$2];let motionValue=getMotionValue$1(from);return motionValue.onChange(v=>target$1[key$2]=v),motionValues.value[key$2]=motionValue,motionValue};return tryOnUnmounted(stop$1),{motionValues,get,stop:stop$1}}function isKeyframesTarget$1(v){return Array.isArray(v)}function underDampedSpring$1(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function criticallyDampedSpring$1(to$1){return{type:`spring`,stiffness:550,damping:to$1===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function overDampedSpring$1(to$1){return{type:`spring`,stiffness:550,damping:to$1===0?100:30,restDelta:.01,restSpeed:10}}function linearTween$1(){return{type:`keyframes`,ease:`linear`,duration:300}}function keyframes$2(values){return{type:`keyframes`,duration:800,values}}const defaultTransitions$1={default:overDampedSpring$1,x:underDampedSpring$1,y:underDampedSpring$1,z:underDampedSpring$1,rotate:underDampedSpring$1,rotateX:underDampedSpring$1,rotateY:underDampedSpring$1,rotateZ:underDampedSpring$1,scaleX:criticallyDampedSpring$1,scaleY:criticallyDampedSpring$1,scale:criticallyDampedSpring$1,backgroundColor:linearTween$1,color:linearTween$1,opacity:linearTween$1};function getDefaultTransition$1(valueKey,to$1){let transitionFactory;return transitionFactory=isKeyframesTarget$1(to$1)?keyframes$2:defaultTransitions$1[valueKey]||defaultTransitions$1.default,{to:to$1,...transitionFactory(to$1)}}const int$2={...number$4,transform:Math.round},valueTypes$2={color:color$1,backgroundColor:color$1,outlineColor:color$1,fill:color$1,stroke:color$1,borderColor:color$1,borderTopColor:color$1,borderRightColor:color$1,borderBottomColor:color$1,borderLeftColor:color$1,borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int$2,filter,WebkitFilter:filter,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int$2},getValueType$1=key$2=>valueTypes$2[key$2];function getValueAsType$1(value$1,type){return type&&typeof value$1==`number`&&type.transform?type.transform(value$1):value$1}function getAnimatableNone$1(key$2,value$1){let defaultValueType=getValueType$1(key$2);return defaultValueType!==filter&&(defaultValueType=complex),defaultValueType.getAnimatableNone?defaultValueType.getAnimatableNone(value$1):void 0}const easingLookup$1={linear:linear$1,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate,bounceIn,bounceInOut,bounceOut};function easingDefinitionToFunction$1(definition$29){if(Array.isArray(definition$29)){let[x1,y1,x2,y2]=definition$29;return cubicBezier$1(x1,y1,x2,y2)}else if(typeof definition$29==`string`)return easingLookup$1[definition$29];return definition$29}function isEasingArray$1(ease){return Array.isArray(ease)&&typeof ease[0]!=`number`}function isAnimatable$1(key$2,value$1){return key$2===`zIndex`?!1:!!(typeof value$1==`number`||Array.isArray(value$1)||typeof value$1==`string`&&complex.test(value$1)&&!value$1.startsWith(`url(`))}function hydrateKeyframes$1(options$1){return Array.isArray(options$1.to)&&options$1.to[0]===null&&(options$1.to=[...options$1.to],options$1.to[0]=options$1.from),options$1}function convertTransitionToAnimationOptions$1({ease,times,delay,...transition}){let options$1={...transition};return times&&(options$1.offset=times),ease&&(options$1.ease=isEasingArray$1(ease)?ease.map(easingDefinitionToFunction$1):easingDefinitionToFunction$1(ease)),delay&&(options$1.elapsed=-delay),options$1}function getPopmotionAnimationOptions$1(transition,options$1,key$2){return Array.isArray(options$1.to)&&(transition.duration||=800),hydrateKeyframes$1(options$1),!isTransitionDefined$1(transition)&&(transition={...transition,...getDefaultTransition$1(key$2,options$1.to)}),{...options$1,...convertTransitionToAnimationOptions$1(transition)}}function isTransitionDefined$1({delay,repeat,repeatType,repeatDelay,from,...transition}){return!!Object.keys(transition).length}function getValueTransition$1(transition,key$2){return transition[key$2]||transition.default||transition}function getAnimation$1(key$2,value$1,target$1,transition,onComplete){let valueTransition=getValueTransition$1(transition,key$2),origin=valueTransition.from===null||valueTransition.from===void 0?value$1.get():valueTransition.from,isTargetAnimatable=isAnimatable$1(key$2,target$1);origin===`none`&&isTargetAnimatable&&typeof target$1==`string`&&(origin=getAnimatableNone$1(key$2,target$1));let isOriginAnimatable=isAnimatable$1(key$2,origin);function start(complete){let options$1={from:origin,to:target$1,velocity:transition.velocity?transition.velocity:value$1.getVelocity(),onUpdate:v=>value$1.set(v)};return valueTransition.type===`inertia`||valueTransition.type===`decay`?inertia({...options$1,...valueTransition}):animate$1({...getPopmotionAnimationOptions$1(valueTransition,options$1,key$2),onUpdate:v=>{options$1.onUpdate(v),valueTransition.onUpdate&&valueTransition.onUpdate(v)},onComplete:()=>{onComplete&&onComplete(),complete&&complete()}})}function set(complete){return value$1.set(target$1),onComplete&&onComplete(),complete&&complete(),{stop:()=>{}}}return!isOriginAnimatable||!isTargetAnimatable||valueTransition.type===!1?set:start}function useMotionTransitions$1(){let{motionValues,stop:stop$1,get}=useMotionValues$1(),push$1=(key$2,value$1,target$1,transition={},onComplete)=>{let from=target$1[key$2],motionValue=get(key$2,from,target$1);if(transition&&transition.immediate){motionValue.set(value$1);return}let animation=getAnimation$1(key$2,motionValue,value$1,transition,onComplete);motionValue.start(animation)};return{motionValues,stop:stop$1,push:push$1}}function useMotionControls$1(motionProperties,variants={},{motionValues,push:push$1,stop:stop$1}=useMotionTransitions$1()){let _variants=unref(variants),isAnimating=ref(!1);watch(motionValues,newVal=>{isAnimating.value=Object.values(newVal).filter(value$1=>value$1.isAnimating()).length>0},{immediate:!0,deep:!0});let getVariantFromKey=variant=>{if(!_variants||!_variants[variant])throw Error(`The variant ${variant} does not exist.`);return _variants[variant]},apply$2=variant=>{typeof variant==`string`&&(variant=getVariantFromKey(variant));let animations$1=Object.entries(variant).map(([key$2,value$1])=>key$2===`transition`?void 0:new Promise(resolve$1=>push$1(key$2,value$1,motionProperties,variant.transition||getDefaultTransition$1(key$2,variant[key$2]),resolve$1))).filter(Boolean);async function waitForComplete(){await Promise.all(animations$1),variant.transition?.onComplete?.()}return Promise.all([waitForComplete()])},set=variant=>{let variantData=isObject$2(variant)?variant:getVariantFromKey(variant);Object.entries(variantData).forEach(([key$2,value$1])=>{key$2!==`transition`&&push$1(key$2,value$1,motionProperties,{immediate:!0})})},leave=async done=>{let leaveVariant;if(_variants&&(_variants.leave&&(leaveVariant=_variants.leave),!_variants.leave&&_variants.initial&&(leaveVariant=_variants.initial)),!leaveVariant){done();return}await apply$2(leaveVariant),done()};return{isAnimating,apply:apply$2,set,leave,stop:stop$1}}const isBrowser$3=typeof window<`u`,supportsPointerEvents$1=()=>isBrowser$3&&(window.onpointerdown===null||__vite_import_meta_env__$1?.TEST),supportsTouchEvents$1=()=>isBrowser$3&&(window.ontouchstart===null||__vite_import_meta_env__$1?.TEST),supportsMouseEvents$1=()=>isBrowser$3&&(window.onmousedown===null||__vite_import_meta_env__$1?.TEST);function registerEventListeners$1({target:target$1,state,variants,apply:apply$2}){let _variants=unref(variants),hovered=ref(!1),tapped=ref(!1),focused=ref(!1),mutableKeys=computed(()=>{let result=[...Object.keys(state.value||{})];return _variants?(_variants.hovered&&(result=[...result,...Object.keys(_variants.hovered)]),_variants.tapped&&(result=[...result,...Object.keys(_variants.tapped)]),_variants.focused&&(result=[...result,...Object.keys(_variants.focused)]),result):result}),computedProperties=computed(()=>{let result={};for(let key$2 in Object.assign(result,state.value),hovered.value&&_variants.hovered&&Object.assign(result,_variants.hovered),tapped.value&&_variants.tapped&&Object.assign(result,_variants.tapped),focused.value&&_variants.focused&&Object.assign(result,_variants.focused),result)mutableKeys.value.includes(key$2)||delete result[key$2];return result});_variants.hovered&&(useEventListener(target$1,`mouseenter`,()=>hovered.value=!0),useEventListener(target$1,`mouseleave`,()=>{hovered.value=!1,tapped.value=!1})),_variants.tapped&&(supportsMouseEvents$1()&&(useEventListener(target$1,`mousedown`,()=>tapped.value=!0),useEventListener(target$1,`mouseup`,()=>tapped.value=!1)),supportsPointerEvents$1()&&(useEventListener(target$1,`pointerdown`,()=>tapped.value=!0),useEventListener(target$1,`pointerup`,()=>tapped.value=!1)),supportsTouchEvents$1()&&(useEventListener(target$1,`touchstart`,()=>tapped.value=!0),useEventListener(target$1,`touchend`,()=>tapped.value=!1))),_variants.focused&&(useEventListener(target$1,`focus`,()=>focused.value=!0),useEventListener(target$1,`blur`,()=>focused.value=!1)),watch([hovered,tapped,focused],()=>{apply$2(computedProperties.value)})}function registerLifeCycleHooks$1({set,target:target$1,variants,variant}){let _variants=unref(variants);watch(()=>target$1,()=>{_variants&&(_variants.initial&&(set(`initial`),variant.value=`initial`),_variants.enter&&(variant.value=`enter`))},{immediate:!0,flush:`pre`})}function registerVariantsSync$1({state,apply:apply$2}){watch(state,newVal=>{newVal&&apply$2(newVal)},{immediate:!0})}function registerVisibilityHooks$1({target:target$1,variants,variant}){let _variants=unref(variants);_variants&&(_variants.visible||_variants.visibleOnce)&&useIntersectionObserver(target$1,([{isIntersecting}])=>{_variants.visible?isIntersecting?variant.value=`visible`:variant.value=`initial`:_variants.visibleOnce&&(isIntersecting&&variant.value!==`visibleOnce`?variant.value=`visibleOnce`:variant.value||=`initial`)})}function useMotionFeatures$1(instance,options$1={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){options$1.lifeCycleHooks&®isterLifeCycleHooks$1(instance),options$1.syncVariants&®isterVariantsSync$1(instance),options$1.visibilityHooks&®isterVisibilityHooks$1(instance),options$1.eventListeners&®isterEventListeners$1(instance)}function reactiveStyle$1(props={}){let state=reactive({...props}),style=ref({});return watch(state,()=>{let result={};for(let[key$2,value$1]of Object.entries(state)){let valueType=getValueType$1(key$2),valueAsType=getValueAsType$1(value$1,valueType);result[key$2]=valueAsType}style.value=result},{immediate:!0,deep:!0}),{state,style}}function usePermissiveTarget$1(target$1,onTarget){watch(()=>unrefElement(target$1),el=>{el&&onTarget(el)},{immediate:!0})}const translateAlias$1={x:`translateX`,y:`translateY`,z:`translateZ`};function reactiveTransform$1(props={},enableHardwareAcceleration=!0){let state=reactive({...props}),transform$2=ref(``);return watch(state,newVal=>{let result=``,hasHardwareAcceleration=!1;if(enableHardwareAcceleration&&(newVal.x||newVal.y||newVal.z)){let str=[newVal.x||0,newVal.y||0,newVal.z||0].map(val=>getValueAsType$1(val,px)).join(`,`);result+=`translate3d(${str}) `,hasHardwareAcceleration=!0}for(let[key$2,value$1]of Object.entries(newVal)){if(enableHardwareAcceleration&&(key$2===`x`||key$2===`y`||key$2===`z`))continue;let valueType=getValueType$1(key$2),valueAsType=getValueAsType$1(value$1,valueType);result+=`${translateAlias$1[key$2]||key$2}(${valueAsType}) `}enableHardwareAcceleration&&!hasHardwareAcceleration&&(result+=`translateZ(0px) `),transform$2.value=result.trim()},{immediate:!0,deep:!0}),{state,transform:transform$2}}const transformAxes$1=[``,`X`,`Y`,`Z`],order$2=[`perspective`,`translate`,`scale`,`rotate`,`skew`],transformProps$1=[`transformPerspective`,`x`,`y`,`z`];order$2.forEach(operationKey=>{transformAxes$1.forEach(axesKey=>{let key$2=operationKey+axesKey;transformProps$1.push(key$2)})});const transformPropSet$1=new Set(transformProps$1);function isTransformProp$1(key$2){return transformPropSet$1.has(key$2)}const transformOriginProps$1=new Set([`originX`,`originY`,`originZ`]);function isTransformOriginProp$1(key$2){return transformOriginProps$1.has(key$2)}function splitValues$1(variant){let transform$2={},style={};return Object.entries(variant).forEach(([key$2,value$1])=>{isTransformProp$1(key$2)||isTransformOriginProp$1(key$2)?transform$2[key$2]=value$1:style[key$2]=value$1}),{transform:transform$2,style}}function variantToStyle$1(variant){let{transform:_transform,style:_style}=splitValues$1(variant),{transform:transform$2}=reactiveTransform$1(_transform),{style}=reactiveStyle$1(_style);return transform$2.value&&(style.value.transform=transform$2.value),style.value}function useElementStyle$1(target$1,onInit){let _cache$1,_target$1,{state,style}=reactiveStyle$1();return usePermissiveTarget$1(target$1,el=>{_target$1=el;for(let key$2 of Object.keys(valueTypes$2)){if(el.style[key$2]===null||el.style[key$2]===``||isTransformProp$1(key$2)||isTransformOriginProp$1(key$2))continue;state[key$2]=el.style[key$2]}_cache$1&&Object.entries(_cache$1).forEach(([key$2,value$1])=>el.style[key$2]=value$1),onInit&&onInit(state)}),watch(style,newVal=>{if(!_target$1){_cache$1=newVal;return}for(let key$2 in newVal)_target$1.style[key$2]=newVal[key$2]},{immediate:!0}),{style:state}}function parseTransform$1(transform$2){let transforms=transform$2.trim().split(/\) |\)/);if(transforms.length===1)return{};let parseValues=value$1=>value$1.endsWith(`px`)||value$1.endsWith(`deg`)?Number.parseFloat(value$1):Number.isNaN(Number(value$1))?Number(value$1):value$1;return transforms.reduce((acc,transform2)=>{if(!transform2)return acc;let[name$2,transformValue]=transform2.split(`(`),valueArray=transformValue.split(`,`),values=valueArray.map(val=>parseValues(val.endsWith(`)`)?val.replace(`)`,``):val.trim())),value$1=values.length===1?values[0]:values;return{...acc,[name$2]:value$1}},{})}function stateFromTransform$1(state,transform$2){Object.entries(parseTransform$1(transform$2)).forEach(([key$2,value$1])=>{let axes=[`x`,`y`,`z`];if(key$2===`translate3d`){if(value$1===0){axes.forEach(axis=>state[axis]=0);return}value$1.forEach((axisValue,index$1)=>state[axes[index$1]]=axisValue);return}if(value$1=Number.parseFloat(`${value$1}`),key$2===`translateX`){state.x=value$1;return}if(key$2===`translateY`){state.y=value$1;return}if(key$2===`translateZ`){state.z=value$1;return}state[key$2]=value$1})}function useElementTransform$1(target$1,onInit){let _cache$1,_target$1,{state,transform:transform$2}=reactiveTransform$1();return usePermissiveTarget$1(target$1,el=>{_target$1=el,el.style.transform&&stateFromTransform$1(state,el.style.transform),_cache$1&&(el.style.transform=_cache$1),onInit&&onInit(state)}),watch(transform$2,newValue=>{if(!_target$1){_cache$1=newValue;return}_target$1.style.transform=newValue},{immediate:!0}),{transform:state}}function objectEntries$1(obj){return Object.entries(obj)}function useMotionProperties$1(target$1,defaultValues){let motionProperties=reactive({}),apply$2=values=>Object.entries(values).forEach(([key$2,value$1])=>motionProperties[key$2]=value$1),{style}=useElementStyle$1(target$1,apply$2),{transform:transform$2}=useElementTransform$1(target$1,apply$2);return watch(motionProperties,newVal=>{objectEntries$1(newVal).forEach(([key$2,value$1])=>{let target2=isTransformProp$1(key$2)?transform$2:style;target2[key$2]&&target2[key$2]===value$1||(target2[key$2]=value$1)})},{immediate:!0,deep:!0}),usePermissiveTarget$1(target$1,()=>defaultValues&&apply$2(defaultValues)),{motionProperties,style,transform:transform$2}}function useMotionVariants$1(variants={}){let _variants=unref(variants),variant=ref(),state=computed(()=>{if(variant.value)return _variants[variant.value]});return{state,variant}}function useMotion$1(target$1,variants={},options$1){let{motionProperties}=useMotionProperties$1(target$1),{variant,state}=useMotionVariants$1(variants),controls=useMotionControls$1(motionProperties,variants),instance={target:target$1,variant,variants,state,motionProperties,...controls};return useMotionFeatures$1(instance,options$1),instance}const transitionKeys$1=[`delay`,`duration`],directivePropsKeys$1=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...transitionKeys$1];function isTransitionKey$1(val){return transitionKeys$1.includes(val)}function resolveVariants$1(node$1,variantsRef){let target$1=node$1.props?node$1.props:node$1.data&&node$1.data.attrs?node$1.data.attrs:{};if(target$1){target$1.variants&&isObject$2(target$1.variants)&&(variantsRef.value={...variantsRef.value,...target$1.variants});for(let key$2 of directivePropsKeys$1){if(!target$1||!target$1[key$2])continue;if(isTransitionKey$1(key$2)&&typeof target$1[key$2]==`number`){for(let variantKey of[`enter`,`visible`,`visibleOnce`]){let variantConfig=variantsRef.value[variantKey];if(variantConfig==null)continue;variantConfig.transition??={},variantConfig.transition[key$2]=target$1[key$2]}continue}if(isObject$2(target$1[key$2])){let prop=target$1[key$2];key$2===`visible-once`&&(key$2=`visibleOnce`),variantsRef.value[key$2]=prop}}}}function directive$1(variants,isPreset=!1){let register=(el,binding,node$1)=>{let key$2=binding.value&&typeof binding.value==`string`?binding.value:node$1.key;key$2&&motionState$1[key$2]&&motionState$1[key$2].stop();let variantsObject=isPreset?structuredClone(toRaw(variants)||{}):variants||{},variantsRef=ref(variantsObject);typeof binding.value==`object`&&(variantsRef.value=binding.value),resolveVariants$1(node$1,variantsRef);let motionOptions={eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1},motionInstance=useMotion$1(el,variantsRef,motionOptions);el.motionInstance=motionInstance,key$2&&(motionState$1[key$2]=motionInstance)},mounted=(el,_binding,_node)=>{el.motionInstance&®isterVisibilityHooks$1(el.motionInstance)};return{created:register,mounted,getSSRProps(binding,node$1){let{initial:bindingInitial}=binding.value||node$1&&node$1?.props||{};bindingInitial=unref(bindingInitial);let initial=defu({},variants?.initial||{},bindingInitial||{});if(!initial||Object.keys(initial).length===0)return;let style=variantToStyle$1(initial);return{style}}}}const fade$1={initial:{opacity:0},enter:{opacity:1}},fadeVisible$1={initial:{opacity:0},visible:{opacity:1}},fadeVisibleOnce$1={initial:{opacity:0},visibleOnce:{opacity:1}},pop$1={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},popVisible$1={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},popVisibleOnce$1={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},rollLeft$1={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleLeft$1={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceLeft$1={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollRight$1={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleRight$1={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceRight$1={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollTop$1={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleTop$1={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceTop$1={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollBottom$1={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleBottom$1={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceBottom$1={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},slideLeft$1={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},slideVisibleLeft$1={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceLeft$1={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},slideRight$1={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},slideVisibleRight$1={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceRight$1={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},slideTop$1={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},slideVisibleTop$1={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceTop$1={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},slideBottom$1={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},slideVisibleBottom$1={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceBottom$1={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},presets$1={__proto__:null,fade:fade$1,fadeVisible:fadeVisible$1,fadeVisibleOnce:fadeVisibleOnce$1,pop:pop$1,popVisible:popVisible$1,popVisibleOnce:popVisibleOnce$1,rollBottom:rollBottom$1,rollLeft:rollLeft$1,rollRight:rollRight$1,rollTop:rollTop$1,rollVisibleBottom:rollVisibleBottom$1,rollVisibleLeft:rollVisibleLeft$1,rollVisibleOnceBottom:rollVisibleOnceBottom$1,rollVisibleOnceLeft:rollVisibleOnceLeft$1,rollVisibleOnceRight:rollVisibleOnceRight$1,rollVisibleOnceTop:rollVisibleOnceTop$1,rollVisibleRight:rollVisibleRight$1,rollVisibleTop:rollVisibleTop$1,slideBottom:slideBottom$1,slideLeft:slideLeft$1,slideRight:slideRight$1,slideTop:slideTop$1,slideVisibleBottom:slideVisibleBottom$1,slideVisibleLeft:slideVisibleLeft$1,slideVisibleOnceBottom:slideVisibleOnceBottom$1,slideVisibleOnceLeft:slideVisibleOnceLeft$1,slideVisibleOnceRight:slideVisibleOnceRight$1,slideVisibleOnceTop:slideVisibleOnceTop$1,slideVisibleRight:slideVisibleRight$1,slideVisibleTop:slideVisibleTop$1};function slugify$1(str){let a$1=`àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;`,b$1=`aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------`,p$4=new RegExp(a$1.split(``).join(`|`),`g`);return str.toString().replace(/[A-Z]/g,s=>`-${s}`).toLowerCase().replace(/\s+/g,`-`).replace(p$4,c$3=>b$1.charAt(a$1.indexOf(c$3))).replace(/&/g,`-and-`).replace(/[^\w\-]+/g,``).replace(/-{2,}/g,`-`).replace(/^-+/,``).replace(/-+$/,``)}const CUSTOM_PRESETS$1=Symbol(``),MotionComponentProps$1={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 isObject$4(val){return Object.prototype.toString.call(val)===`[object Object]`}function clone$2(v){if(Array.isArray(v))return v.map(clone$2);if(isObject$4(v)){let res={};for(let key$2 in v)res[key$2]=clone$2(v[key$2]);return res}return v}function setupMotionComponent$1(props){let instances=reactive({}),customPresets=inject(CUSTOM_PRESETS$1,{}),preset=computed(()=>props.preset==null?{}:customPresets!=null&&props.preset in customPresets?structuredClone(toRaw(customPresets)[props.preset]):props.preset in presets$1?structuredClone(presets$1[props.preset]):{}),propsConfig=computed(()=>({initial:props.initial,enter:props.enter,leave:props.leave,visible:props.visible,visibleOnce:props.visibleOnce,hovered:props.hovered,tapped:props.tapped,focused:props.focused}));function applyTransitionHelpers(config$1,values){for(let transitionKey of[`delay`,`duration`]){if(values[transitionKey]==null)continue;let transitionValueParsed=Number.parseInt(values[transitionKey]);for(let variantKey of[`enter`,`visible`,`visibleOnce`]){let variantConfig=config$1[variantKey];if(variantConfig==null)continue;variantConfig.transition??={},variantConfig.transition[transitionKey]=transitionValueParsed}}return config$1}let motionConfig=computed(()=>{let config$1=defu({},propsConfig.value,preset.value,props.variants||{});return applyTransitionHelpers({...config$1},props)});function setNodeInstance(node$1,index$1,style){node$1.props??={},node$1.props.style??={},node$1.props.style={...node$1.props.style,...style};let elementMotionConfig=applyTransitionHelpers(clone$2(motionConfig.value),node$1.props);return node$1.props.onVnodeMounted=({el})=>{instances[index$1]=useMotion$1(el,elementMotionConfig)},node$1.props.onVnodeUpdated=({el})=>{let styles=variantToStyle$1(instances[index$1].state);for(let[key$2,val]of Object.entries(styles))el.style[key$2]=val},node$1}return{motionConfig,setNodeInstance}}const MotionComponent$1=defineComponent({name:`Motion`,props:{...MotionComponentProps$1,is:{type:[String,Object],default:`div`}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent$1(props);return()=>{let style=variantToStyle$1(motionConfig.value.initial||{}),node$1=h(props.is,void 0,slots);return setNodeInstance(node$1,0,style),node$1}}}),MotionGroupComponent$1=defineComponent({name:`MotionGroup`,props:{...MotionComponentProps$1,is:{type:[String,Object],required:!1}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent$1(props);return()=>{let style=variantToStyle$1(motionConfig.value.initial||{}),nodes=slots.default?.()||[];for(let i=0;iactivePinia=pinia$1,getActivePinia=()=>hasInjectionContext()&&inject(piniaSymbol)||activePinia,piniaSymbol=Symbol();function isPlainObject$5(o){return o&&typeof o==`object`&&Object.prototype.toString.call(o)===`[object Object]`&&typeof o.toJSON!=`function`}var MutationType;(function(MutationType$1){MutationType$1.direct=`direct`,MutationType$1.patchObject=`patch object`,MutationType$1.patchFunction=`patch function`})(MutationType||={});const IS_CLIENT=typeof window<`u`,_global=(()=>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 bom(blob,{autoBom=!1}={}){return autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)?new Blob([``,blob],{type:blob.type}):blob}function download(url,name$2,opts){let xhr=new XMLHttpRequest;xhr.open(`GET`,url),xhr.responseType=`blob`,xhr.onload=function(){saveAs(xhr.response,name$2,opts)},xhr.onerror=function(){console.error(`could not download file`)},xhr.send()}function corsEnabled(url){let xhr=new XMLHttpRequest;xhr.open(`HEAD`,url,!1);try{xhr.send()}catch{}return xhr.status>=200&&xhr.status<=299}function click(node$1){try{node$1.dispatchEvent(new MouseEvent(`click`))}catch{let evt=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});node$1.dispatchEvent(evt)}}const _navigator=typeof navigator==`object`?navigator:{userAgent:``},isMacOSWebView=(()=>/Macintosh/.test(_navigator.userAgent)&&/AppleWebKit/.test(_navigator.userAgent)&&!/Safari/.test(_navigator.userAgent))(),saveAs=IS_CLIENT?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!isMacOSWebView?downloadSaveAs:`msSaveOrOpenBlob`in _navigator?msSaveAs:fileSaverSaveAs:()=>{};function downloadSaveAs(blob,name$2=`download`,opts){let a$1=document.createElement(`a`);a$1.download=name$2,a$1.rel=`noopener`,typeof blob==`string`?(a$1.href=blob,a$1.origin===location.origin?click(a$1):corsEnabled(a$1.href)?download(blob,name$2,opts):(a$1.target=`_blank`,click(a$1))):(a$1.href=URL.createObjectURL(blob),setTimeout(function(){URL.revokeObjectURL(a$1.href)},4e4),setTimeout(function(){click(a$1)},0))}function msSaveAs(blob,name$2=`download`,opts){if(typeof blob==`string`)if(corsEnabled(blob))download(blob,name$2,opts);else{let a$1=document.createElement(`a`);a$1.href=blob,a$1.target=`_blank`,setTimeout(function(){click(a$1)})}else navigator.msSaveOrOpenBlob(bom(blob,opts),name$2)}function fileSaverSaveAs(blob,name$2,opts,popup){if(popup||=open(``,`_blank`),popup&&(popup.document.title=popup.document.body.innerText=`downloading...`),typeof blob==`string`)return download(blob,name$2,opts);let force=blob.type===`application/octet-stream`,isSafari=/constructor/i.test(String(_global.HTMLElement))||`safari`in _global,isChromeIOS=/CriOS\/[\d]+/.test(navigator.userAgent);if((isChromeIOS||force&&isSafari||isMacOSWebView)&&typeof FileReader<`u`){let reader=new FileReader;reader.onloadend=function(){let url=reader.result;if(typeof url!=`string`)throw popup=null,Error(`Wrong reader.result type`);url=isChromeIOS?url:url.replace(/^data:[^;]*;/,`data:attachment/file;`),popup?popup.location.href=url:location.assign(url),popup=null},reader.readAsDataURL(blob)}else{let url=URL.createObjectURL(blob);popup?popup.location.assign(url):location.href=url,popup=null,setTimeout(function(){URL.revokeObjectURL(url)},4e4)}}const componentStateTypes=[],MUTATIONS_LAYER_ID=`pinia:mutations`,INSPECTOR_ID=`pinia`,{assign:assign$1$1}=Object,getStoreType=id=>`🍍 `+id;function createPinia(){let scope$1=effectScope(!0),state=scope$1.run(()=>ref({})),_p=[],toBeInstalled=[],pinia$1=markRaw({install(app){setActivePinia(pinia$1),pinia$1._a=app,app.provide(piniaSymbol,pinia$1),app.config.globalProperties.$pinia=pinia$1,toBeInstalled.forEach(plugin=>_p.push(plugin)),toBeInstalled=[]},use(plugin){return this._a?_p.push(plugin):toBeInstalled.push(plugin),this},_p,_a:null,_e:scope$1,_s:new Map,state});return pinia$1}const noop$2=()=>{};function addSubscription(subscriptions,callback,detached,onCleanup=noop$2){subscriptions.push(callback);let removeSubscription=()=>{let idx=subscriptions.indexOf(callback);idx>-1&&(subscriptions.splice(idx,1),onCleanup())};return!detached&&getCurrentScope()&&onScopeDispose(removeSubscription),removeSubscription}function triggerSubscriptions(subscriptions,...args){subscriptions.slice().forEach(callback=>{callback(...args)})}const fallbackRunWithContext=fn$5=>fn$5(),ACTION_MARKER=Symbol(),ACTION_NAME=Symbol();function mergeReactiveObjects(target$1,patchToApply){for(let key$2 in target$1 instanceof Map&&patchToApply instanceof Map?patchToApply.forEach((value$1,key$2)=>target$1.set(key$2,value$1)):target$1 instanceof Set&&patchToApply instanceof Set&&patchToApply.forEach(target$1.add,target$1),patchToApply){if(!patchToApply.hasOwnProperty(key$2))continue;let subPatch=patchToApply[key$2],targetValue=target$1[key$2];isPlainObject$5(targetValue)&&isPlainObject$5(subPatch)&&target$1.hasOwnProperty(key$2)&&!isRef(subPatch)&&!isReactive(subPatch)?target$1[key$2]=mergeReactiveObjects(targetValue,subPatch):target$1[key$2]=subPatch}return target$1}const skipHydrateSymbol=Symbol();function shouldHydrate(obj){return!isPlainObject$5(obj)||!Object.prototype.hasOwnProperty.call(obj,skipHydrateSymbol)}const{assign:assign$2}=Object;function isComputed(o){return!!(isRef(o)&&o.effect)}function createOptionsStore(id,options$1,pinia$1,hot){let{state,actions,getters}=options$1,initialState=pinia$1.state.value[id],store;function setup(){initialState||(pinia$1.state.value[id]=state?state():{});let localState=toRefs(pinia$1.state.value[id]);return assign$2(localState,actions,Object.keys(getters||{}).reduce((computedGetters,name$2)=>(computedGetters[name$2]=markRaw(computed(()=>{setActivePinia(pinia$1);let store$1=pinia$1._s.get(id);return getters[name$2].call(store$1,store$1)})),computedGetters),{}))}return store=createSetupStore(id,setup,options$1,pinia$1,hot,!0),store}function createSetupStore($id,setup,options$1={},pinia$1,hot,isOptionsStore){let scope$1,optionsForPlugin=assign$2({actions:{}},options$1),$subscribeOptions={deep:!0},isListening,isSyncListening,subscriptions=[],actionSubscriptions=[],debuggerEvents,initialState=pinia$1.state.value[$id];!isOptionsStore&&!initialState&&(pinia$1.state.value[$id]={});let hotState=ref({}),activeListener;function $patch(partialStateOrMutator){let subscriptionMutation;isListening=isSyncListening=!1,typeof partialStateOrMutator==`function`?(partialStateOrMutator(pinia$1.state.value[$id]),subscriptionMutation={type:MutationType.patchFunction,storeId:$id,events:debuggerEvents}):(mergeReactiveObjects(pinia$1.state.value[$id],partialStateOrMutator),subscriptionMutation={type:MutationType.patchObject,payload:partialStateOrMutator,storeId:$id,events:debuggerEvents});let myListenerId=activeListener=Symbol();nextTick().then(()=>{activeListener===myListenerId&&(isListening=!0)}),isSyncListening=!0,triggerSubscriptions(subscriptions,subscriptionMutation,pinia$1.state.value[$id])}let $reset=isOptionsStore?function(){let{state}=options$1,newState=state?state():{};this.$patch($state=>{assign$2($state,newState)})}:noop$2;function $dispose(){scope$1.stop(),subscriptions=[],actionSubscriptions=[],pinia$1._s.delete($id)}let action=(fn$5,name$2=``)=>{if(ACTION_MARKER in fn$5)return fn$5[ACTION_NAME]=name$2,fn$5;let wrappedAction=function(){setActivePinia(pinia$1);let args=Array.from(arguments),afterCallbackList=[],onErrorCallbackList=[];function after(callback){afterCallbackList.push(callback)}function onError(callback){onErrorCallbackList.push(callback)}triggerSubscriptions(actionSubscriptions,{args,name:wrappedAction[ACTION_NAME],store,after,onError});let ret;try{ret=fn$5.apply(this&&this.$id===$id?this:store,args)}catch(error){throw triggerSubscriptions(onErrorCallbackList,error),error}return ret instanceof Promise?ret.then(value$1=>(triggerSubscriptions(afterCallbackList,value$1),value$1)).catch(error=>(triggerSubscriptions(onErrorCallbackList,error),Promise.reject(error))):(triggerSubscriptions(afterCallbackList,ret),ret)};return wrappedAction[ACTION_MARKER]=!0,wrappedAction[ACTION_NAME]=name$2,wrappedAction},partialStore={_p:pinia$1,$id,$onAction:addSubscription.bind(null,actionSubscriptions),$patch,$reset,$subscribe(callback,options$2={}){let removeSubscription=addSubscription(subscriptions,callback,options$2.detached,()=>stopWatcher()),stopWatcher=scope$1.run(()=>watch(()=>pinia$1.state.value[$id],state=>{(options$2.flush===`sync`?isSyncListening:isListening)&&callback({storeId:$id,type:MutationType.direct,events:debuggerEvents},state)},assign$2({},$subscribeOptions,options$2)));return removeSubscription},$dispose},store=reactive(partialStore);pinia$1._s.set($id,store);let runWithContext=pinia$1._a&&pinia$1._a.runWithContext||fallbackRunWithContext,setupStore=runWithContext(()=>pinia$1._e.run(()=>(scope$1=effectScope()).run(()=>setup({action}))));for(let key$2 in setupStore){let prop=setupStore[key$2];if(isRef(prop)&&!isComputed(prop)||isReactive(prop))isOptionsStore||(initialState&&shouldHydrate(prop)&&(isRef(prop)?prop.value=initialState[key$2]:mergeReactiveObjects(prop,initialState[key$2])),pinia$1.state.value[$id][key$2]=prop);else if(typeof prop==`function`){let actionValue=action(prop,key$2);setupStore[key$2]=actionValue,optionsForPlugin.actions[key$2]=prop}}return assign$2(store,setupStore),assign$2(toRaw(store),setupStore),Object.defineProperty(store,`$state`,{get:()=>pinia$1.state.value[$id],set:state=>{$patch($state=>{assign$2($state,state)})}}),pinia$1._p.forEach(extender=>{assign$2(store,scope$1.run(()=>extender({store,app:pinia$1._a,pinia:pinia$1,options:optionsForPlugin})))}),initialState&&isOptionsStore&&options$1.hydrate&&options$1.hydrate(store.$state,initialState),isListening=!0,isSyncListening=!0,store} /*! #__NO_SIDE_EFFECTS__ */ -function defineStore(id,setup,setupOptions){let options$1,isSetupStore=typeof setup==`function`;options$1=isSetupStore?setupOptions:setup;function useStore(pinia$1,hot){let hasContext=hasInjectionContext();pinia$1||=hasContext?inject(piniaSymbol,null):null,pinia$1&&setActivePinia(pinia$1),pinia$1=activePinia,!pinia$1._s.has(id)&&(isSetupStore?createSetupStore(id,setup,options$1,pinia$1):createOptionsStore(id,options$1,pinia$1));let store=pinia$1._s.get(id);return store}return useStore.$id=id,useStore}function storeToRefs(store){let rawStore=toRaw(store),refs={};for(let key$2 in rawStore){let value$1=rawStore[key$2];value$1.effect?refs[key$2]=computed({get:()=>store[key$2],set(value$2){store[key$2]=value$2}}):(isRef(value$1)||isReactive(value$1))&&(refs[key$2]=toRef(store,key$2))}return refs}const scriptRel=`modulepreload`,assetsURL=function(dep){return`/`+dep},seen={},__vitePreload=function(baseModule,deps,importerUrl){let promise=Promise.resolve();if(deps&&deps.length>0){let links=document.getElementsByTagName(`link`),cspNonceMeta=document.querySelector(`meta[property=csp-nonce]`),cspNonce=cspNonceMeta?.nonce||cspNonceMeta?.getAttribute(`nonce`);function allSettled(promises$2){return Promise.all(promises$2.map(p$1$1=>Promise.resolve(p$1$1).then(value$1=>({status:`fulfilled`,value:value$1}),reason=>({status:`rejected`,reason}))))}promise=allSettled(deps.map(dep=>{if(dep=assetsURL(dep,importerUrl),dep in seen)return;seen[dep]=!0;let isCss=dep.endsWith(`.css`),cssSelector=isCss?`[rel="stylesheet"]`:``,isBaseRelative=!!importerUrl;if(isBaseRelative)for(let i$1=links.length-1;i$1>=0;i$1--){let link$1$1=links[i$1];if(link$1$1.href===dep&&(!isCss||link$1$1.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${dep}"]${cssSelector}`))return;let link$1=document.createElement(`link`);if(link$1.rel=isCss?`stylesheet`:scriptRel,isCss||(link$1.as=`script`),link$1.crossOrigin=``,link$1.href=dep,cspNonce&&link$1.setAttribute(`nonce`,cspNonce),document.head.appendChild(link$1),isCss)return new Promise((res,rej)=>{link$1.addEventListener(`load`,res),link$1.addEventListener(`error`,()=>rej(Error(`Unable to preload CSS for ${dep}`)))})}))}function handlePreloadError(err$2){let e$1$1=new Event(`vite:preloadError`,{cancelable:!0});if(e$1$1.payload=err$2,window.dispatchEvent(e$1$1),!e$1$1.defaultPrevented)throw err$2}return promise.then(res=>{for(let item of res||[]){if(item.status!==`rejected`)continue;handlePreloadError(item.reason)}return baseModule().catch(handlePreloadError)})},setupLayouts=routes$1=>{let layouts={},modules=Object.assign({"/src/layouts/default.vue":()=>__vitePreload(()=>import(`./default-CZpOWzAg.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>__vitePreload(()=>import(`./home-yZcli0R-.js`),[]),"/src/layouts/plain.vue":()=>__vitePreload(()=>import(`./plain-cTemKD3O.js`),[]),"/src/layouts/settings.vue":()=>__vitePreload(()=>import(`./settings-DWeVUT02.js`),__vite__mapDeps([3,1,2,4])),"/src/layouts/stage.vue":()=>__vitePreload(()=>import(`./stage-BC0FtFQ5.js`),[])});Object.entries(modules).forEach(([name$2,module$1])=>{let key$2=name$2.replace(`/src/layouts/`,``).replace(`.vue`,``);layouts[key$2]=module$1});function deepSetupLayout(routes$2,top=!0){return routes$2.map(route=>{if(route.children?.length>0&&(route.children=deepSetupLayout(route.children,!1)),top){let skipLayout=!route.component&&route.children?.find(r$1=>(r$1.path===``||r$1.path===`/`)&&r$1.meta?.isLayout);if(skipLayout)return route;if(route.meta?.layout!==!1)return{path:route.path,component:layouts[route.meta?.layout||`default`],children:route.path===`/`?[route]:[{...route,path:``}],meta:{isLayout:!0}}}return route.meta?.layout?{path:route.path,component:layouts[route.meta?.layout],children:[{...route,path:``}],meta:{isLayout:!0}}:route})}return deepSetupLayout(routes$1)},isBrowser$2=typeof document<`u`;function isRouteComponent(component){return typeof component==`object`||`displayName`in component||`props`in component||`__vccOpts`in component}function isESModule(obj){return obj.__esModule||obj[Symbol.toStringTag]===`Module`||obj.default&&isRouteComponent(obj.default)}const assign$1=Object.assign;function applyToParams(fn$5,params){let newParams={};for(let key$2 in params){let value$1=params[key$2];newParams[key$2]=isArray$3(value$1)?value$1.map(fn$5):fn$5(value$1)}return newParams}const noop$1=()=>{},isArray$3=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(text$5){return encodeURI(``+text$5).replace(ENC_PIPE_RE,`|`).replace(ENC_BRACKET_OPEN_RE,`[`).replace(ENC_BRACKET_CLOSE_RE,`]`)}function encodeHash(text$5){return commonEncode(text$5).replace(ENC_CURLY_OPEN_RE,`{`).replace(ENC_CURLY_CLOSE_RE,`}`).replace(ENC_CARET_RE,`^`)}function encodeQueryValue(text$5){return commonEncode(text$5).replace(PLUS_RE,`%2B`).replace(ENC_SPACE_RE,`+`).replace(HASH_RE,`%23`).replace(AMPERSAND_RE,`%26`).replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,`{`).replace(ENC_CURLY_CLOSE_RE,`}`).replace(ENC_CARET_RE,`^`)}function encodeQueryKey(text$5){return encodeQueryValue(text$5).replace(EQUAL_RE,`%3D`)}function encodePath(text$5){return commonEncode(text$5).replace(HASH_RE,`%23`).replace(IM_RE,`%3F`)}function encodeParam(text$5){return text$5==null?``:encodePath(text$5).replace(SLASH_RE,`%2F`)}function decode$1(text$5){try{return decodeURIComponent(``+text$5)}catch{}return``+text$5}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=path=>path.replace(TRAILING_SLASH_RE,``);function parseURL(parseQuery$1,location$1,currentLocation=`/`){let path,query={},searchString=``,hash=``,hashPos=location$1.indexOf(`#`),searchPos=location$1.indexOf(`?`);return hashPos=0&&(searchPos=-1),searchPos>-1&&(path=location$1.slice(0,searchPos),searchString=location$1.slice(searchPos+1,hashPos>-1?hashPos:location$1.length),query=parseQuery$1(searchString)),hashPos>-1&&(path||=location$1.slice(0,hashPos),hash=location$1.slice(hashPos,location$1.length)),path=resolveRelativePath(path??location$1,currentLocation),{fullPath:path+(searchString&&`?`)+searchString+hash,path,query,hash:decode$1(hash)}}function stringifyURL(stringifyQuery$1,location$1){let query=location$1.query?stringifyQuery$1(location$1.query):``;return location$1.path+(query&&`?`)+query+(location$1.hash||``)}function stripBase(pathname,base){return!base||!pathname.toLowerCase().startsWith(base.toLowerCase())?pathname:pathname.slice(base.length)||`/`}function isSameRouteLocation(stringifyQuery$1,a$1,b$1){let aLastIndex=a$1.matched.length-1,bLastIndex=b$1.matched.length-1;return aLastIndex>-1&&aLastIndex===bLastIndex&&isSameRouteRecord(a$1.matched[aLastIndex],b$1.matched[bLastIndex])&&isSameRouteLocationParams(a$1.params,b$1.params)&&stringifyQuery$1(a$1.query)===stringifyQuery$1(b$1.query)&&a$1.hash===b$1.hash}function isSameRouteRecord(a$1,b$1){return(a$1.aliasOf||a$1)===(b$1.aliasOf||b$1)}function isSameRouteLocationParams(a$1,b$1){if(Object.keys(a$1).length!==Object.keys(b$1).length)return!1;for(let key$2 in a$1)if(!isSameRouteLocationParamsValue(a$1[key$2],b$1[key$2]))return!1;return!0}function isSameRouteLocationParamsValue(a$1,b$1){return isArray$3(a$1)?isEquivalentArray(a$1,b$1):isArray$3(b$1)?isEquivalentArray(b$1,a$1):a$1===b$1}function isEquivalentArray(a$1,b$1){return isArray$3(b$1)?a$1.length===b$1.length&&a$1.every((value$1,i)=>value$1===b$1[i]):a$1.length===1&&a$1[0]===b$1}function resolveRelativePath(to$1,from){if(to$1.startsWith(`/`))return to$1;if(!to$1)return from;let fromSegments=from.split(`/`),toSegments=to$1.split(`/`),lastToSegment=toSegments[toSegments.length-1];(lastToSegment===`..`||lastToSegment===`.`)&&toSegments.push(``);let position$2=fromSegments.length-1,toPosition,segment;for(toPosition=0;toPosition1&&position$2--;else break;return fromSegments.slice(0,position$2).join(`/`)+`/`+toSegments.slice(toPosition).join(`/`)}const START_LOCATION_NORMALIZED={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};var NavigationType;(function(NavigationType$1){NavigationType$1.pop=`pop`,NavigationType$1.push=`push`})(NavigationType||={});var NavigationDirection;(function(NavigationDirection$1){NavigationDirection$1.back=`back`,NavigationDirection$1.forward=`forward`,NavigationDirection$1.unknown=``})(NavigationDirection||={});function normalizeBase(base){if(!base)if(isBrowser$2){let baseEl=document.querySelector(`base`);base=baseEl&&baseEl.getAttribute(`href`)||`/`,base=base.replace(/^\w+:\/\/[^\/]+/,``)}else base=`/`;return base[0]!==`/`&&base[0]!==`#`&&(base=`/`+base),removeTrailingSlash(base)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(base,location$1){return base.replace(BEFORE_HASH_RE,`#`)+location$1}function getElementPosition(el,offset$2){let docRect=document.documentElement.getBoundingClientRect(),elRect=el.getBoundingClientRect();return{behavior:offset$2.behavior,left:elRect.left-docRect.left-(offset$2.left||0),top:elRect.top-docRect.top-(offset$2.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(position$2){let scrollToOptions;if(`el`in position$2){let positionEl=position$2.el,isIdSelector=typeof positionEl==`string`&&positionEl.startsWith(`#`),el=typeof positionEl==`string`?isIdSelector?document.getElementById(positionEl.slice(1)):document.querySelector(positionEl):positionEl;if(!el)return;scrollToOptions=getElementPosition(el,position$2)}else scrollToOptions=position$2;`scrollBehavior`in document.documentElement.style?window.scrollTo(scrollToOptions):window.scrollTo(scrollToOptions.left==null?window.scrollX:scrollToOptions.left,scrollToOptions.top==null?window.scrollY:scrollToOptions.top)}function getScrollKey(path,delta){let position$2=history.state?history.state.position-delta:-1;return position$2+path}const scrollPositions=new Map;function saveScrollPosition(key$2,scrollPosition){scrollPositions.set(key$2,scrollPosition)}function getSavedScrollPosition(key$2){let scroll=scrollPositions.get(key$2);return scrollPositions.delete(key$2),scroll}let createBaseLocation=()=>location.protocol+`//`+location.host;function createCurrentLocation(base,location$1){let{pathname,search:search$1,hash}=location$1,hashPos=base.indexOf(`#`);if(hashPos>-1){let slicePos=hash.includes(base.slice(hashPos))?base.slice(hashPos).length:1,pathFromHash=hash.slice(slicePos);return pathFromHash[0]!==`/`&&(pathFromHash=`/`+pathFromHash),stripBase(pathFromHash,``)}let path=stripBase(pathname,base);return path+search$1+hash}function useHistoryListeners(base,historyState,currentLocation,replace){let listeners=[],teardowns=[],pauseState=null,popStateHandler=({state})=>{let to$1=createCurrentLocation(base,location),from=currentLocation.value,fromState=historyState.value,delta=0;if(state){if(currentLocation.value=to$1,historyState.value=state,pauseState&&pauseState===from){pauseState=null;return}delta=fromState?state.position-fromState.position:0}else replace(to$1);listeners.forEach(listener=>{listener(currentLocation.value,from,{delta,type:NavigationType.pop,direction:delta?delta>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function pauseListeners(){pauseState=currentLocation.value}function listen(callback){listeners.push(callback);let teardown=()=>{let index$1=listeners.indexOf(callback);index$1>-1&&listeners.splice(index$1,1)};return teardowns.push(teardown),teardown}function beforeUnloadListener(){let{history:history$1}=window;history$1.state&&history$1.replaceState(assign$1({},history$1.state,{scroll:computeScrollPosition()}),``)}function destroy(){for(let teardown of teardowns)teardown();teardowns=[],window.removeEventListener(`popstate`,popStateHandler),window.removeEventListener(`beforeunload`,beforeUnloadListener)}return window.addEventListener(`popstate`,popStateHandler),window.addEventListener(`beforeunload`,beforeUnloadListener,{passive:!0}),{pauseListeners,listen,destroy}}function buildState(back,current,forward,replaced=!1,computeScroll=!1){return{back,current,forward,replaced,position:window.history.length,scroll:computeScroll?computeScrollPosition():null}}function useHistoryStateNavigation(base){let{history:history$1,location:location$1}=window,currentLocation={value:createCurrentLocation(base,location$1)},historyState={value:history$1.state};historyState.value||changeLocation(currentLocation.value,{back:null,current:currentLocation.value,forward:null,position:history$1.length-1,replaced:!0,scroll:null},!0);function changeLocation(to$1,state,replace$1){let hashIndex=base.indexOf(`#`),url=hashIndex>-1?(location$1.host&&document.querySelector(`base`)?base:base.slice(hashIndex))+to$1:createBaseLocation()+base+to$1;try{history$1[replace$1?`replaceState`:`pushState`](state,``,url),historyState.value=state}catch(err){console.error(err),location$1[replace$1?`replace`:`assign`](url)}}function replace(to$1,data$12){let state=assign$1({},history$1.state,buildState(historyState.value.back,to$1,historyState.value.forward,!0),data$12,{position:historyState.value.position});changeLocation(to$1,state,!0),currentLocation.value=to$1}function push$1(to$1,data$12){let currentState=assign$1({},historyState.value,history$1.state,{forward:to$1,scroll:computeScrollPosition()});changeLocation(currentState.current,currentState,!0);let state=assign$1({},buildState(currentLocation.value,to$1,null),{position:currentState.position+1},data$12);changeLocation(to$1,state,!1),currentLocation.value=to$1}return{location:currentLocation,state:historyState,push:push$1,replace}}function createWebHistory(base){base=normalizeBase(base);let historyNavigation=useHistoryStateNavigation(base),historyListeners=useHistoryListeners(base,historyNavigation.state,historyNavigation.location,historyNavigation.replace);function go(delta,triggerListeners=!0){triggerListeners||historyListeners.pauseListeners(),history.go(delta)}let routerHistory=assign$1({location:``,base,go,createHref:createHref.bind(null,base)},historyNavigation,historyListeners);return Object.defineProperty(routerHistory,`location`,{enumerable:!0,get:()=>historyNavigation.location.value}),Object.defineProperty(routerHistory,`state`,{enumerable:!0,get:()=>historyNavigation.state.value}),routerHistory}function createWebHashHistory(base){return base=location.host?base||location.pathname+location.search:``,!base.includes(`#`)&&(base+=`#`),createWebHistory(base)}function isRouteLocation(route){return typeof route==`string`||route&&typeof route==`object`}function isRouteName(name$2){return typeof name$2==`string`||typeof name$2==`symbol`}const NavigationFailureSymbol=Symbol(``);var NavigationFailureType;(function(NavigationFailureType$1){NavigationFailureType$1[NavigationFailureType$1.aborted=4]=`aborted`,NavigationFailureType$1[NavigationFailureType$1.cancelled=8]=`cancelled`,NavigationFailureType$1[NavigationFailureType$1.duplicated=16]=`duplicated`})(NavigationFailureType||={});function createRouterError(type,params){return assign$1(Error(),{type,[NavigationFailureSymbol]:!0},params)}function isNavigationFailure(error,type){return error instanceof Error&&NavigationFailureSymbol in error&&(type==null||!!(error.type&type))}const BASE_PARAM_PATTERN=`[^/]+?`,BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(segments,extraOptions){let options$1=assign$1({},BASE_PATH_PARSER_OPTIONS,extraOptions),score=[],pattern=options$1.start?`^`:``,keys$3=[];for(let segment of segments){let segmentScores=segment.length?[]:[90];options$1.strict&&!segment.length&&(pattern+=`/`);for(let tokenIndex=0;tokenIndexb$1.length?b$1.length===1&&b$1[0]===80?1:-1:0}function comparePathParserScore(a$1,b$1){let i=0,aScore=a$1.score,bScore=b$1.score;for(;i0&&last[last.length-1]<0}const ROOT_TOKEN={type:0,value:``},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(path){if(!path)return[[]];if(path===`/`)return[[ROOT_TOKEN]];if(!path.startsWith(`/`))throw Error(`Invalid path "${path}"`);function crash(message$1){throw Error(`ERR (${state})/"${buffer$1}": ${message$1}`)}let state=0,previousState=state,tokens=[],segment;function finalizeSegment(){segment&&tokens.push(segment),segment=[]}let i=0,char,buffer$1=``,customRe=``;function consumeBuffer(){buffer$1&&(state===0?segment.push({type:0,value:buffer$1}):state===1||state===2||state===3?(segment.length>1&&(char===`*`||char===`+`)&&crash(`A repeatable param (${buffer$1}) must be alone in its segment. eg: '/:ids+.`),segment.push({type:1,value:buffer$1,regexp:customRe,repeatable:char===`*`||char===`+`,optional:char===`*`||char===`?`})):crash(`Invalid state to consume buffer`),buffer$1=``)}function addCharToBuffer(){buffer$1+=char}for(;i{removeRoute(originalMatcher)}:noop$1}function removeRoute(matcherRef){if(isRouteName(matcherRef)){let matcher=matcherMap.get(matcherRef);matcher&&(matcherMap.delete(matcherRef),matchers.splice(matchers.indexOf(matcher),1),matcher.children.forEach(removeRoute),matcher.alias.forEach(removeRoute))}else{let index$1=matchers.indexOf(matcherRef);index$1>-1&&(matchers.splice(index$1,1),matcherRef.record.name&&matcherMap.delete(matcherRef.record.name),matcherRef.children.forEach(removeRoute),matcherRef.alias.forEach(removeRoute))}}function getRoutes(){return matchers}function insertMatcher(matcher){let index$1=findInsertionIndex(matcher,matchers);matchers.splice(index$1,0,matcher),matcher.record.name&&!isAliasRecord(matcher)&&matcherMap.set(matcher.record.name,matcher)}function resolve$1(location$1,currentLocation){let matcher,params={},path,name$2;if(`name`in location$1&&location$1.name){if(matcher=matcherMap.get(location$1.name),!matcher)throw createRouterError(1,{location:location$1});name$2=matcher.record.name,params=assign$1(paramsFromLocation(currentLocation.params,matcher.keys.filter(k$3=>!k$3.optional).concat(matcher.parent?matcher.parent.keys.filter(k$3=>k$3.optional):[]).map(k$3=>k$3.name)),location$1.params&¶msFromLocation(location$1.params,matcher.keys.map(k$3=>k$3.name))),path=matcher.stringify(params)}else if(location$1.path!=null)path=location$1.path,matcher=matchers.find(m=>m.re.test(path)),matcher&&(params=matcher.parse(path),name$2=matcher.record.name);else{if(matcher=currentLocation.name?matcherMap.get(currentLocation.name):matchers.find(m=>m.re.test(currentLocation.path)),!matcher)throw createRouterError(1,{location:location$1,currentLocation});name$2=matcher.record.name,params=assign$1({},currentLocation.params,location$1.params),path=matcher.stringify(params)}let matched=[],parentMatcher=matcher;for(;parentMatcher;)matched.unshift(parentMatcher.record),parentMatcher=parentMatcher.parent;return{name:name$2,path,params,matched,meta:mergeMetaFields(matched)}}routes$1.forEach(route=>addRoute(route));function clearRoutes(){matchers.length=0,matcherMap.clear()}return{addRoute,resolve:resolve$1,removeRoute,clearRoutes,getRoutes,getRecordMatcher}}function paramsFromLocation(params,keys$3){let newParams={};for(let key$2 of keys$3)key$2 in params&&(newParams[key$2]=params[key$2]);return newParams}function normalizeRouteRecord(record){let normalized={path:record.path,redirect:record.redirect,name:record.name,meta:record.meta||{},aliasOf:record.aliasOf,beforeEnter:record.beforeEnter,props:normalizeRecordProps(record),children:record.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in record?record.components||null:record.component&&{default:record.component}};return Object.defineProperty(normalized,`mods`,{value:{}}),normalized}function normalizeRecordProps(record){let propsObject={},props=record.props||!1;if(`component`in record)propsObject.default=props;else for(let name$2 in record.components)propsObject[name$2]=typeof props==`object`?props[name$2]:props;return propsObject}function isAliasRecord(record){for(;record;){if(record.record.aliasOf)return!0;record=record.parent}return!1}function mergeMetaFields(matched){return matched.reduce((meta,record)=>assign$1(meta,record.meta),{})}function mergeOptions(defaults$1,partialOptions){let options$1={};for(let key$2 in defaults$1)options$1[key$2]=key$2 in partialOptions?partialOptions[key$2]:defaults$1[key$2];return options$1}function findInsertionIndex(matcher,matchers){let lower=0,upper=matchers.length;for(;lower!==upper;){let mid=lower+upper>>1,sortOrder=comparePathParserScore(matcher,matchers[mid]);sortOrder<0?upper=mid:lower=mid+1}let insertionAncestor=getInsertionAncestor(matcher);return insertionAncestor&&(upper=matchers.lastIndexOf(insertionAncestor,upper-1)),upper}function getInsertionAncestor(matcher){let ancestor=matcher;for(;ancestor=ancestor.parent;)if(isMatchable(ancestor)&&comparePathParserScore(matcher,ancestor)===0)return ancestor}function isMatchable({record}){return!!(record.name||record.components&&Object.keys(record.components).length||record.redirect)}function parseQuery(search$1){let query={};if(search$1===``||search$1===`?`)return query;let hasLeadingIM=search$1[0]===`?`,searchParams=(hasLeadingIM?search$1.slice(1):search$1).split(`&`);for(let i=0;iv&&encodeQueryValue(v)):[value$1&&encodeQueryValue(value$1)];values.forEach(value$2=>{value$2!==void 0&&(search$1+=(search$1.length?`&`:``)+key$2,value$2!=null&&(search$1+=`=`+value$2))})}return search$1}function normalizeQuery(query){let normalizedQuery={};for(let key$2 in query){let value$1=query[key$2];value$1!==void 0&&(normalizedQuery[key$2]=isArray$3(value$1)?value$1.map(v=>v==null?null:``+v):value$1==null?value$1:``+value$1)}return normalizedQuery}const matchedRouteKey=Symbol(``),viewDepthKey=Symbol(``),routerKey=Symbol(``),routeLocationKey=Symbol(``),routerViewLocationKey=Symbol(``);function useCallbacks(){let handlers$3=[];function add$1(handler){return handlers$3.push(handler),()=>{let i=handlers$3.indexOf(handler);i>-1&&handlers$3.splice(i,1)}}function reset(){handlers$3=[]}return{add:add$1,list:()=>handlers$3.slice(),reset}}function guardToPromiseFn(guard,to$1,from,record,name$2,runWithContext=fn$5=>fn$5()){let enterCallbackArray=record&&(record.enterCallbacks[name$2]=record.enterCallbacks[name$2]||[]);return()=>new Promise((resolve$1,reject)=>{let next=valid$1=>{valid$1===!1?reject(createRouterError(4,{from,to:to$1})):valid$1 instanceof Error?reject(valid$1):isRouteLocation(valid$1)?reject(createRouterError(2,{from:to$1,to:valid$1})):(enterCallbackArray&&record.enterCallbacks[name$2]===enterCallbackArray&&typeof valid$1==`function`&&enterCallbackArray.push(valid$1),resolve$1())},guardReturn=runWithContext(()=>guard.call(record&&record.instances[name$2],to$1,from,next)),guardCall=Promise.resolve(guardReturn);guard.length<3&&(guardCall=guardCall.then(next)),guardCall.catch(err=>reject(err))})}function extractComponentsGuards(matched,guardType,to$1,from,runWithContext=fn$5=>fn$5()){let guards=[];for(let record of matched)for(let name$2 in record.components){let rawComponent=record.components[name$2];if(guardType!==`beforeRouteEnter`&&!record.instances[name$2])continue;if(isRouteComponent(rawComponent)){let options$1=rawComponent.__vccOpts||rawComponent,guard=options$1[guardType];guard&&guards.push(guardToPromiseFn(guard,to$1,from,record,name$2,runWithContext))}else{let componentPromise=rawComponent();guards.push(()=>componentPromise.then(resolved=>{if(!resolved)throw Error(`Couldn't resolve component "${name$2}" at "${record.path}"`);let resolvedComponent=isESModule(resolved)?resolved.default:resolved;record.mods[name$2]=resolved,record.components[name$2]=resolvedComponent;let options$1=resolvedComponent.__vccOpts||resolvedComponent,guard=options$1[guardType];return guard&&guardToPromiseFn(guard,to$1,from,record,name$2,runWithContext)()}))}}return guards}function useLink(props){let router$1=inject(routerKey),currentRoute=inject(routeLocationKey),route=computed(()=>{let to$1=unref(props.to);return router$1.resolve(to$1)}),activeRecordIndex=computed(()=>{let{matched}=route.value,{length}=matched,routeMatched=matched[length-1],currentMatched=currentRoute.matched;if(!routeMatched||!currentMatched.length)return-1;let index$1=currentMatched.findIndex(isSameRouteRecord.bind(null,routeMatched));if(index$1>-1)return index$1;let parentRecordPath=getOriginalPath(matched[length-2]);return length>1&&getOriginalPath(routeMatched)===parentRecordPath&¤tMatched[currentMatched.length-1].path!==parentRecordPath?currentMatched.findIndex(isSameRouteRecord.bind(null,matched[length-2])):index$1}),isActive=computed(()=>activeRecordIndex.value>-1&&includesParams(currentRoute.params,route.value.params)),isExactActive=computed(()=>activeRecordIndex.value>-1&&activeRecordIndex.value===currentRoute.matched.length-1&&isSameRouteLocationParams(currentRoute.params,route.value.params));function navigate(e$4={}){if(guardEvent(e$4)){let p$4=router$1[unref(props.replace)?`replace`:`push`](unref(props.to)).catch(noop$1);return props.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>p$4),p$4}return Promise.resolve()}return{route,href:computed(()=>route.value.href),isActive,isExactActive,navigate}}function preferSingleVNode(vnodes){return vnodes.length===1?vnodes[0]:vnodes}const RouterLinkImpl=defineComponent({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,setup(props,{slots}){let link$1=reactive(useLink(props)),{options:options$1}=inject(routerKey),elClass=computed(()=>({[getLinkClass(props.activeClass,options$1.linkActiveClass,`router-link-active`)]:link$1.isActive,[getLinkClass(props.exactActiveClass,options$1.linkExactActiveClass,`router-link-exact-active`)]:link$1.isExactActive}));return()=>{let children=slots.default&&preferSingleVNode(slots.default(link$1));return props.custom?children:h(`a`,{"aria-current":link$1.isExactActive?props.ariaCurrentValue:null,href:link$1.href,onClick:link$1.navigate,class:elClass.value},children)}}}),RouterLink=RouterLinkImpl;function guardEvent(e$4){if(!(e$4.metaKey||e$4.altKey||e$4.ctrlKey||e$4.shiftKey)&&!e$4.defaultPrevented&&!(e$4.button!==void 0&&e$4.button!==0)){if(e$4.currentTarget&&e$4.currentTarget.getAttribute){let target$1=e$4.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(target$1))return}return e$4.preventDefault&&e$4.preventDefault(),!0}}function includesParams(outer,inner){for(let key$2 in inner){let innerValue=inner[key$2],outerValue=outer[key$2];if(typeof innerValue==`string`){if(innerValue!==outerValue)return!1}else if(!isArray$3(outerValue)||outerValue.length!==innerValue.length||innerValue.some((value$1,i)=>value$1!==outerValue[i]))return!1}return!0}function getOriginalPath(record){return record?record.aliasOf?record.aliasOf.path:record.path:``}const getLinkClass=(propClass,globalClass,defaultClass)=>propClass??globalClass??defaultClass,RouterViewImpl=defineComponent({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(props,{attrs,slots}){let injectedRoute=inject(routerViewLocationKey),routeToDisplay=computed(()=>props.route||injectedRoute.value),injectedDepth=inject(viewDepthKey,0),depth=computed(()=>{let initialDepth=unref(injectedDepth),{matched}=routeToDisplay.value,matchedRoute;for(;(matchedRoute=matched[initialDepth])&&!matchedRoute.components;)initialDepth++;return initialDepth}),matchedRouteRef=computed(()=>routeToDisplay.value.matched[depth.value]);provide(viewDepthKey,computed(()=>depth.value+1)),provide(matchedRouteKey,matchedRouteRef),provide(routerViewLocationKey,routeToDisplay);let viewRef=ref();return watch(()=>[viewRef.value,matchedRouteRef.value,props.name],([instance,to$1,name$2],[oldInstance,from,oldName])=>{to$1&&(to$1.instances[name$2]=instance,from&&from!==to$1&&instance&&instance===oldInstance&&(to$1.leaveGuards.size||(to$1.leaveGuards=from.leaveGuards),to$1.updateGuards.size||(to$1.updateGuards=from.updateGuards))),instance&&to$1&&(!from||!isSameRouteRecord(to$1,from)||!oldInstance)&&(to$1.enterCallbacks[name$2]||[]).forEach(callback=>callback(instance))},{flush:`post`}),()=>{let route=routeToDisplay.value,currentName=props.name,matchedRoute=matchedRouteRef.value,ViewComponent=matchedRoute&&matchedRoute.components[currentName];if(!ViewComponent)return normalizeSlot(slots.default,{Component:ViewComponent,route});let routePropsOption=matchedRoute.props[currentName],routeProps=routePropsOption?routePropsOption===!0?route.params:typeof routePropsOption==`function`?routePropsOption(route):routePropsOption:null,onVnodeUnmounted=vnode=>{vnode.component.isUnmounted&&(matchedRoute.instances[currentName]=null)},component=h(ViewComponent,assign$1({},routeProps,attrs,{onVnodeUnmounted,ref:viewRef}));return normalizeSlot(slots.default,{Component:component,route})||component}}});function normalizeSlot(slot,data$12){if(!slot)return null;let slotContent=slot(data$12);return slotContent.length===1?slotContent[0]:slotContent}const RouterView=RouterViewImpl;function createRouter(options$1){let matcher=createRouterMatcher(options$1.routes,options$1),parseQuery$1=options$1.parseQuery||parseQuery,stringifyQuery$1=options$1.stringifyQuery||stringifyQuery,routerHistory=options$1.history,beforeGuards=useCallbacks(),beforeResolveGuards=useCallbacks(),afterGuards=useCallbacks(),currentRoute=shallowRef(START_LOCATION_NORMALIZED),pendingLocation=START_LOCATION_NORMALIZED;isBrowser$2&&options$1.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let normalizeParams$1=applyToParams.bind(null,paramValue=>``+paramValue),encodeParams=applyToParams.bind(null,encodeParam),decodeParams=applyToParams.bind(null,decode$1);function addRoute(parentOrRoute,route){let parent,record;return isRouteName(parentOrRoute)?(parent=matcher.getRecordMatcher(parentOrRoute),record=route):record=parentOrRoute,matcher.addRoute(record,parent)}function removeRoute(name$2){let recordMatcher=matcher.getRecordMatcher(name$2);recordMatcher&&matcher.removeRoute(recordMatcher)}function getRoutes(){return matcher.getRoutes().map(routeMatcher=>routeMatcher.record)}function hasRoute(name$2){return!!matcher.getRecordMatcher(name$2)}function resolve$1(rawLocation,currentLocation){if(currentLocation=assign$1({},currentLocation||currentRoute.value),typeof rawLocation==`string`){let locationNormalized=parseURL(parseQuery$1,rawLocation,currentLocation.path),matchedRoute$1=matcher.resolve({path:locationNormalized.path},currentLocation),href$1=routerHistory.createHref(locationNormalized.fullPath);return assign$1(locationNormalized,matchedRoute$1,{params:decodeParams(matchedRoute$1.params),hash:decode$1(locationNormalized.hash),redirectedFrom:void 0,href:href$1})}let matcherLocation;if(rawLocation.path!=null)matcherLocation=assign$1({},rawLocation,{path:parseURL(parseQuery$1,rawLocation.path,currentLocation.path).path});else{let targetParams=assign$1({},rawLocation.params);for(let key$2 in targetParams)targetParams[key$2]??delete targetParams[key$2];matcherLocation=assign$1({},rawLocation,{params:encodeParams(targetParams)}),currentLocation.params=encodeParams(currentLocation.params)}let matchedRoute=matcher.resolve(matcherLocation,currentLocation),hash=rawLocation.hash||``;matchedRoute.params=normalizeParams$1(decodeParams(matchedRoute.params));let fullPath=stringifyURL(stringifyQuery$1,assign$1({},rawLocation,{hash:encodeHash(hash),path:matchedRoute.path})),href=routerHistory.createHref(fullPath);return assign$1({fullPath,hash,query:stringifyQuery$1===stringifyQuery?normalizeQuery(rawLocation.query):rawLocation.query||{}},matchedRoute,{redirectedFrom:void 0,href})}function locationAsObject(to$1){return typeof to$1==`string`?parseURL(parseQuery$1,to$1,currentRoute.value.path):assign$1({},to$1)}function checkCanceledNavigation(to$1,from){if(pendingLocation!==to$1)return createRouterError(8,{from,to:to$1})}function push$1(to$1){return pushWithRedirect(to$1)}function replace(to$1){return push$1(assign$1(locationAsObject(to$1),{replace:!0}))}function handleRedirectRecord(to$1){let lastMatched=to$1.matched[to$1.matched.length-1];if(lastMatched&&lastMatched.redirect){let{redirect}=lastMatched,newTargetLocation=typeof redirect==`function`?redirect(to$1):redirect;return typeof newTargetLocation==`string`&&(newTargetLocation=newTargetLocation.includes(`?`)||newTargetLocation.includes(`#`)?newTargetLocation=locationAsObject(newTargetLocation):{path:newTargetLocation},newTargetLocation.params={}),assign$1({query:to$1.query,hash:to$1.hash,params:newTargetLocation.path==null?to$1.params:{}},newTargetLocation)}}function pushWithRedirect(to$1,redirectedFrom){let targetLocation=pendingLocation=resolve$1(to$1),from=currentRoute.value,data$12=to$1.state,force=to$1.force,replace$1=to$1.replace===!0,shouldRedirect=handleRedirectRecord(targetLocation);if(shouldRedirect)return pushWithRedirect(assign$1(locationAsObject(shouldRedirect),{state:typeof shouldRedirect==`object`?assign$1({},data$12,shouldRedirect.state):data$12,force,replace:replace$1}),redirectedFrom||targetLocation);let toLocation=targetLocation;toLocation.redirectedFrom=redirectedFrom;let failure;return!force&&isSameRouteLocation(stringifyQuery$1,from,targetLocation)&&(failure=createRouterError(16,{to:toLocation,from}),handleScroll(from,from,!0,!1)),(failure?Promise.resolve(failure):navigate(toLocation,from)).catch(error=>isNavigationFailure(error)?isNavigationFailure(error,2)?error:markAsReady(error):triggerError(error,toLocation,from)).then(failure$1=>{if(failure$1){if(isNavigationFailure(failure$1,2))return pushWithRedirect(assign$1({replace:replace$1},locationAsObject(failure$1.to),{state:typeof failure$1.to==`object`?assign$1({},data$12,failure$1.to.state):data$12,force}),redirectedFrom||toLocation)}else failure$1=finalizeNavigation(toLocation,from,!0,replace$1,data$12);return triggerAfterEach(toLocation,from,failure$1),failure$1})}function checkCanceledNavigationAndReject(to$1,from){let error=checkCanceledNavigation(to$1,from);return error?Promise.reject(error):Promise.resolve()}function runWithContext(fn$5){let app=installedApps.values().next().value;return app&&typeof app.runWithContext==`function`?app.runWithContext(fn$5):fn$5()}function navigate(to$1,from){let guards,[leavingRecords,updatingRecords,enteringRecords]=extractChangingRecords(to$1,from);guards=extractComponentsGuards(leavingRecords.reverse(),`beforeRouteLeave`,to$1,from);for(let record of leavingRecords)record.leaveGuards.forEach(guard=>{guards.push(guardToPromiseFn(guard,to$1,from))});let canceledNavigationCheck=checkCanceledNavigationAndReject.bind(null,to$1,from);return guards.push(canceledNavigationCheck),runGuardQueue(guards).then(()=>{guards=[];for(let guard of beforeGuards.list())guards.push(guardToPromiseFn(guard,to$1,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>{guards=extractComponentsGuards(updatingRecords,`beforeRouteUpdate`,to$1,from);for(let record of updatingRecords)record.updateGuards.forEach(guard=>{guards.push(guardToPromiseFn(guard,to$1,from))});return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>{guards=[];for(let record of enteringRecords)if(record.beforeEnter)if(isArray$3(record.beforeEnter))for(let beforeEnter of record.beforeEnter)guards.push(guardToPromiseFn(beforeEnter,to$1,from));else guards.push(guardToPromiseFn(record.beforeEnter,to$1,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>(to$1.matched.forEach(record=>record.enterCallbacks={}),guards=extractComponentsGuards(enteringRecords,`beforeRouteEnter`,to$1,from,runWithContext),guards.push(canceledNavigationCheck),runGuardQueue(guards))).then(()=>{guards=[];for(let guard of beforeResolveGuards.list())guards.push(guardToPromiseFn(guard,to$1,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).catch(err=>isNavigationFailure(err,8)?err:Promise.reject(err))}function triggerAfterEach(to$1,from,failure){afterGuards.list().forEach(guard=>runWithContext(()=>guard(to$1,from,failure)))}function finalizeNavigation(toLocation,from,isPush,replace$1,data$12){let error=checkCanceledNavigation(toLocation,from);if(error)return error;let isFirstNavigation=from===START_LOCATION_NORMALIZED,state=isBrowser$2?history.state:{};isPush&&(replace$1||isFirstNavigation?routerHistory.replace(toLocation.fullPath,assign$1({scroll:isFirstNavigation&&state&&state.scroll},data$12)):routerHistory.push(toLocation.fullPath,data$12)),currentRoute.value=toLocation,handleScroll(toLocation,from,isPush,isFirstNavigation),markAsReady()}let removeHistoryListener;function setupListeners(){removeHistoryListener||=routerHistory.listen((to$1,_from,info)=>{if(!router$1.listening)return;let toLocation=resolve$1(to$1),shouldRedirect=handleRedirectRecord(toLocation);if(shouldRedirect){pushWithRedirect(assign$1(shouldRedirect,{replace:!0,force:!0}),toLocation).catch(noop$1);return}pendingLocation=toLocation;let from=currentRoute.value;isBrowser$2&&saveScrollPosition(getScrollKey(from.fullPath,info.delta),computeScrollPosition()),navigate(toLocation,from).catch(error=>isNavigationFailure(error,12)?error:isNavigationFailure(error,2)?(pushWithRedirect(assign$1(locationAsObject(error.to),{force:!0}),toLocation).then(failure=>{isNavigationFailure(failure,20)&&!info.delta&&info.type===NavigationType.pop&&routerHistory.go(-1,!1)}).catch(noop$1),Promise.reject()):(info.delta&&routerHistory.go(-info.delta,!1),triggerError(error,toLocation,from))).then(failure=>{failure||=finalizeNavigation(toLocation,from,!1),failure&&(info.delta&&!isNavigationFailure(failure,8)?routerHistory.go(-info.delta,!1):info.type===NavigationType.pop&&isNavigationFailure(failure,20)&&routerHistory.go(-1,!1)),triggerAfterEach(toLocation,from,failure)}).catch(noop$1)})}let readyHandlers=useCallbacks(),errorListeners=useCallbacks(),ready;function triggerError(error,to$1,from){markAsReady(error);let list$2=errorListeners.list();return list$2.length?list$2.forEach(handler=>handler(error,to$1,from)):console.error(error),Promise.reject(error)}function isReady(){return ready&¤tRoute.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((resolve$2,reject)=>{readyHandlers.add([resolve$2,reject])})}function markAsReady(err){return ready||(ready=!err,setupListeners(),readyHandlers.list().forEach(([resolve$2,reject])=>err?reject(err):resolve$2()),readyHandlers.reset()),err}function handleScroll(to$1,from,isPush,isFirstNavigation){let{scrollBehavior}=options$1;if(!isBrowser$2||!scrollBehavior)return Promise.resolve();let scrollPosition=!isPush&&getSavedScrollPosition(getScrollKey(to$1.fullPath,0))||(isFirstNavigation||!isPush)&&history.state&&history.state.scroll||null;return nextTick().then(()=>scrollBehavior(to$1,from,scrollPosition)).then(position$2=>position$2&&scrollToPosition(position$2)).catch(err=>triggerError(err,to$1,from))}let go=delta=>routerHistory.go(delta),started,installedApps=new Set,router$1={currentRoute,listening:!0,addRoute,removeRoute,clearRoutes:matcher.clearRoutes,hasRoute,getRoutes,resolve:resolve$1,options:options$1,push:push$1,replace,go,back:()=>go(-1),forward:()=>go(1),beforeEach:beforeGuards.add,beforeResolve:beforeResolveGuards.add,afterEach:afterGuards.add,onError:errorListeners.add,isReady,install(app){let router$2=this;app.component(`RouterLink`,RouterLink),app.component(`RouterView`,RouterView),app.config.globalProperties.$router=router$2,Object.defineProperty(app.config.globalProperties,`$route`,{enumerable:!0,get:()=>unref(currentRoute)}),isBrowser$2&&!started&¤tRoute.value===START_LOCATION_NORMALIZED&&(started=!0,push$1(routerHistory.location).catch(err=>{}));let reactiveRoute={};for(let key$2 in START_LOCATION_NORMALIZED)Object.defineProperty(reactiveRoute,key$2,{get:()=>currentRoute.value[key$2],enumerable:!0});app.provide(routerKey,router$2),app.provide(routeLocationKey,shallowReactive(reactiveRoute)),app.provide(routerViewLocationKey,currentRoute);let unmountApp=app.unmount;installedApps.add(app),app.unmount=function(){installedApps.delete(app),installedApps.size<1&&(pendingLocation=START_LOCATION_NORMALIZED,removeHistoryListener&&removeHistoryListener(),removeHistoryListener=null,currentRoute.value=START_LOCATION_NORMALIZED,started=!1,ready=!1),unmountApp()}}};function runGuardQueue(guards){return guards.reduce((promise,guard)=>promise.then(()=>runWithContext(guard)),Promise.resolve())}return router$1}function extractChangingRecords(to$1,from){let leavingRecords=[],updatingRecords=[],enteringRecords=[],len=Math.max(from.matched.length,to$1.matched.length);for(let i=0;iisSameRouteRecord(record,recordFrom))?updatingRecords.push(recordFrom):leavingRecords.push(recordFrom));let recordTo=to$1.matched[i];recordTo&&(from.matched.find(record=>isSameRouteRecord(record,recordTo))||enteringRecords.push(recordTo))}return[leavingRecords,updatingRecords,enteringRecords]}function useRouter(){return inject(routerKey)}function useRoute(_name){return inject(routeLocationKey)}const routes=[{path:`/`,name:`IndexScenePage`,component:()=>__vitePreload(()=>import(`./pages-CD0qLry_.js`),__vite__mapDeps([5,6,1,2,7,8,9,10,11,12,4])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}},{path:`/:all(.*)`,name:`/[...all]`,component:()=>__vitePreload(()=>import(`./_...all_-cevFm6qe.js`),[])},{path:`/audio`,name:`/audio`,component:()=>__vitePreload(()=>import(`./audio-DMDuWRzR.js`),[])},{path:`/devtools`,children:[{path:`audio-record`,name:`/devtools/audio-record`,component:()=>__vitePreload(()=>import(`./audio-record-Cosszn5h.js`),[])},{path:`background-gradient-blending`,name:`/devtools/background-gradient-blending`,component:()=>__vitePreload(()=>import(`./background-gradient-blending-Dc6neL0J.js`),__vite__mapDeps([13,4,14,15]))},{path:`background-remove`,name:`/devtools/background-remove`,component:()=>__vitePreload(()=>import(`./background-remove-CfzWeaPN.js`),__vite__mapDeps([16,17,18]))},{path:`chat`,name:`/devtools/chat`,component:()=>__vitePreload(()=>import(`./chat-BNaBa8nr.js`),[])},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>__vitePreload(()=>import(`./gesture-circle-CtlpzRIp.js`),__vite__mapDeps([19,12])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>__vitePreload(()=>import(`./image-y7UfzUtG.js`),__vite__mapDeps([20,21]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>__vitePreload(()=>import(`./polaroid-gAmjoIyd.js`),__vite__mapDeps([22,7,8,9]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>__vitePreload(()=>import(`./vibrant-Byz235YP.js`),__vite__mapDeps([23,14,18]))}]},{path:`/queue`,name:`/queue`,component:()=>__vitePreload(()=>import(`./queue-BhpwXiAb.js`),[])},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>__vitePreload(()=>import(`./settings-DM_cxWPe.js`),__vite__mapDeps([24,12,25])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`airi-card`,children:[{path:``,name:`/settings/airi-card/`,component:()=>__vitePreload(()=>import(`./airi-card-CFHe9iJm.js`),__vite__mapDeps([26,12,27,28,29,30,31,32,33,18])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`components`,children:[{path:`CardCreate`,name:`/settings/airi-card/components/CardCreate`,component:()=>__vitePreload(()=>import(`./CardCreate-BgwAv5Kv.js`),__vite__mapDeps([34,27]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>__vitePreload(()=>import(`./CardCreationDialog-mu1VLVYi.js`),__vite__mapDeps([35,28,29,30]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>__vitePreload(()=>import(`./CardDetailDialog-C-yU3tpO.js`),__vite__mapDeps([36,31,32,29]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>__vitePreload(()=>import(`./CardListItem-CckqVk0d.js`),__vite__mapDeps([37,33]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>__vitePreload(()=>import(`./DeleteCardDialog-BGVlI37-.js`),__vite__mapDeps([38,32,29]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>__vitePreload(()=>import(`./appearance-BIDEdXyM.js`),__vite__mapDeps([39,12])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`color-scheme`,name:`/settings/appearance/color-scheme`,component:()=>__vitePreload(()=>import(`./color-scheme-B0eJBuo7.js`),__vite__mapDeps([40,12,41])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>__vitePreload(()=>import(`./developer-Bwq9EOSe.js`),__vite__mapDeps([42,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>__vitePreload(()=>import(`./general-DSsVebJ9.js`),__vite__mapDeps([43,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>__vitePreload(()=>import(`./memory-Bo9CmtPV.js`),__vite__mapDeps([44,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>__vitePreload(()=>import(`./models-BlSfecLY.js`),__vite__mapDeps([45,12,25,46,7,8,9,14])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]},{path:`modules`,children:[{path:``,name:`/settings/modules/`,component:()=>__vitePreload(()=>import(`./modules-DvaXnAgf.js`),__vite__mapDeps([47,12,25,46])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`consciousness`,name:`/settings/modules/consciousness`,component:()=>__vitePreload(()=>import(`./consciousness-CCWI3pUe.js`),__vite__mapDeps([48,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`hearing`,name:`/settings/modules/hearing`,component:()=>__vitePreload(()=>import(`./hearing-CP0gq0in.js`),__vite__mapDeps([49,12,17])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-long-term`,name:`/settings/modules/memory-long-term`,component:()=>__vitePreload(()=>import(`./memory-long-term-BXPjIM3D.js`),__vite__mapDeps([50,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-short-term`,name:`/settings/modules/memory-short-term`,component:()=>__vitePreload(()=>import(`./memory-short-term-D8vgusDg.js`),__vite__mapDeps([51,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>__vitePreload(()=>import(`./speech-DJZRaUxH.js`),__vite__mapDeps([52,12,10,53])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>__vitePreload(()=>import(`./providers-CNT7nN_l.js`),__vite__mapDeps([54,12,25,46])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`alibaba-cloud-model-studio`,name:`/settings/providers/alibaba-cloud-model-studio`,component:()=>__vitePreload(()=>import(`./alibaba-cloud-model-studio-COHJiWXk.js`),__vite__mapDeps([55,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>__vitePreload(()=>import(`./anthropic-CUlO-W3r.js`),__vite__mapDeps([56,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`azure-ai-foundry`,name:`/settings/providers/azure-ai-foundry`,component:()=>__vitePreload(()=>import(`./azure-ai-foundry-ByIXKIr5.js`),__vite__mapDeps([57,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`cloudflare-workers-ai`,name:`/settings/providers/cloudflare-workers-ai`,component:()=>__vitePreload(()=>import(`./cloudflare-workers-ai-BipstjwR.js`),__vite__mapDeps([58,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>__vitePreload(()=>import(`./deepseek-cNrwxt-l.js`),__vite__mapDeps([59,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>__vitePreload(()=>import(`./elevenlabs-9MwHykd2.js`),__vite__mapDeps([60,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>__vitePreload(()=>import(`./featherless-ai-B299Ssok.js`),__vite__mapDeps([61,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>__vitePreload(()=>import(`./fireworks-ai-Ld2MWu8B.js`),__vite__mapDeps([62,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`google-generative-ai`,name:`/settings/providers/google-generative-ai`,component:()=>__vitePreload(()=>import(`./google-generative-ai-DZieEaGY.js`),__vite__mapDeps([63,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>__vitePreload(()=>import(`./microsoft-speech-Di7D-Awi.js`),__vite__mapDeps([64,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>__vitePreload(()=>import(`./mistral-ai-DaM_lNzJ.js`),__vite__mapDeps([65,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>__vitePreload(()=>import(`./moonshot-ai-CzeRIZgw.js`),__vite__mapDeps([66,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>__vitePreload(()=>import(`./novita-ai-B5_QZuND.js`),__vite__mapDeps([67,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>__vitePreload(()=>import(`./ollama-CIvy2V5T.js`),__vite__mapDeps([68,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>__vitePreload(()=>import(`./openai-CcptUYcJ.js`),__vite__mapDeps([69,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>__vitePreload(()=>import(`./openai-audio-speech-1dVJvi78.js`),__vite__mapDeps([70,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>__vitePreload(()=>import(`./openai-audio-transcription-BB_pETq3.js`),__vite__mapDeps([71,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>__vitePreload(()=>import(`./openrouter-ai-Cy1v1-nn.js`),__vite__mapDeps([72,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2`,name:`/settings/providers/player2`,component:()=>__vitePreload(()=>import(`./player2-Xoxrm0dX.js`),__vite__mapDeps([73,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-speech`,name:`/settings/providers/player2-speech`,component:()=>__vitePreload(()=>import(`./player2-speech-C91OFlCt.js`),__vite__mapDeps([74,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>__vitePreload(()=>import(`./together-ai-EVG40fRk.js`),__vite__mapDeps([75,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>__vitePreload(()=>import(`./volcengine-B8eQhXRx.js`),__vite__mapDeps([76,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>__vitePreload(()=>import(`./xai-CVd0KgMK.js`),__vite__mapDeps([77,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>__vitePreload(()=>import(`./scene-TS-s_kmR.js`),__vite__mapDeps([78,12,25,46])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`StageScenePage`,component:()=>__vitePreload(()=>import(`./stage-CaqiKODx.js`),__vite__mapDeps([79,6,1,2,7,8,9,10,11,12,4])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}}]},{path:`/test`,children:[{path:`filter-message`,name:`/test/filter-message`,component:()=>__vitePreload(()=>import(`./filter-message-CSSXhkMx.js`),__vite__mapDeps([80,10,53]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>__vitePreload(()=>import(`./delays-_8LoyGoG.js`),__vite__mapDeps([81,10,53]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>__vitePreload(()=>import(`./emotions-DH9tsdiE.js`),__vite__mapDeps([82,10,53]))},{path:`messages`,name:`/test/queues/messages`,component:()=>__vitePreload(()=>import(`./messages-CgceS_ap.js`),__vite__mapDeps([83,10,53]))}]}]}],closed=`0px`;var TransitionVertical_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TransitionVertical`,props:{duration:{default:250},easingEnter:{default:`ease-in-out`},easingLeave:{default:`ease-in-out`},opacityClosed:{default:0},opacityOpened:{default:1}},setup(__props){let props=__props;function getElementStyle(element$3){return{height:element$3.style.height,width:element$3.style.width,position:element$3.style.position,visibility:element$3.style.visibility,overflow:element$3.style.overflow,paddingTop:element$3.style.paddingTop,paddingBottom:element$3.style.paddingBottom,borderTopWidth:element$3.style.borderTopWidth,borderBottomWidth:element$3.style.borderBottomWidth,marginTop:element$3.style.marginTop,marginBottom:element$3.style.marginBottom}}function prepareElement(element$3,initialStyle){let{width}=getComputedStyle(element$3);element$3.style.width=width,element$3.style.position=`absolute`,element$3.style.visibility=`hidden`,element$3.style.height=``;let{height}=getComputedStyle(element$3);return element$3.style.width=initialStyle.width,element$3.style.position=initialStyle.position,element$3.style.visibility=initialStyle.visibility,element$3.style.height=closed,element$3.style.overflow=`hidden`,initialStyle.height&&initialStyle.height!==closed?initialStyle.height:height}function animateTransition(element$3,initialStyle,done,keyframes$4,options$1){let animation=element$3.animate(keyframes$4,options$1);element$3.style.height=initialStyle.height,animation.onfinish=()=>{element$3.style.overflow=initialStyle.overflow,done()}}function getEnterKeyframes(height,initialStyle){return[{height:closed,opacity:props.opacityClosed,paddingTop:closed,paddingBottom:closed,borderTopWidth:closed,borderBottomWidth:closed,marginTop:closed,marginBottom:closed},{height,opacity:props.opacityOpened,paddingTop:initialStyle.paddingTop,paddingBottom:initialStyle.paddingBottom,borderTopWidth:initialStyle.borderTopWidth,borderBottomWidth:initialStyle.borderBottomWidth,marginTop:initialStyle.marginTop,marginBottom:initialStyle.marginBottom}]}function enterTransition(element$3,done){let HTMLElement$1=element$3,initialStyle=getElementStyle(HTMLElement$1),height=prepareElement(HTMLElement$1,initialStyle),keyframes$4=getEnterKeyframes(height,initialStyle),options$1={duration:props.duration,easing:props.easingEnter};animateTransition(HTMLElement$1,initialStyle,done,keyframes$4,options$1)}function leaveTransition(element$3,done){let HTMLElement$1=element$3,initialStyle=getElementStyle(HTMLElement$1),{height}=getComputedStyle(HTMLElement$1);HTMLElement$1.style.height=height,HTMLElement$1.style.overflow=`hidden`;let keyframes$4=getEnterKeyframes(height,initialStyle).reverse(),options$1={duration:props.duration,easing:props.easingLeave};animateTransition(HTMLElement$1,initialStyle,done,keyframes$4,options$1)}return(_ctx,_cache$1)=>(openBlock(),createBlock(Transition,{css:!1,onEnter:enterTransition,onLeave:leaveTransition},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3}))}}),TransitionVertical_default=TransitionVertical_vue_vue_type_script_setup_true_lang_default;function serialize$1(o){return typeof o==`string`?`'${o}'`:new c$1().serialize(o)}const c$1=function(){class o{#t=new Map;compare(t$1,r$1){let e$4=typeof t$1,n=typeof r$1;return e$4===`string`&&n===`string`?t$1.localeCompare(r$1):e$4===`number`&&n===`number`?t$1-r$1:String.prototype.localeCompare.call(this.serialize(t$1,!0),this.serialize(r$1,!0))}serialize(t$1,r$1){if(t$1===null)return`null`;switch(typeof t$1){case`string`:return r$1?t$1:`'${t$1}'`;case`bigint`:return`${t$1}n`;case`object`:return this.$object(t$1);case`function`:return this.$function(t$1)}return String(t$1)}serializeObject(t$1){let r$1=Object.prototype.toString.call(t$1);if(r$1!==`[object Object]`)return this.serializeBuiltInType(r$1.length<10?`unknown:${r$1}`:r$1.slice(8,-1),t$1);let e$4=t$1.constructor,n=e$4===Object||e$4===void 0?``:e$4.name;if(n!==``&&globalThis[n]===e$4)return this.serializeBuiltInType(n,t$1);if(typeof t$1.toJSON==`function`){let i=t$1.toJSON();return n+(typeof i==`object`&&i?this.$object(i):`(${this.serialize(i)})`)}return this.serializeObjectEntries(n,Object.entries(t$1))}serializeBuiltInType(t$1,r$1){let e$4=this[`$`+t$1];if(e$4)return e$4.call(this,r$1);if(typeof r$1?.entries==`function`)return this.serializeObjectEntries(t$1,r$1.entries());throw Error(`Cannot serialize ${t$1}`)}serializeObjectEntries(t$1,r$1){let e$4=Array.from(r$1).sort((i,a$1)=>this.compare(i[0],a$1[0])),n=`${t$1}{`;for(let i=0;ithis.compare(r$1,e$4)))}`}$Map(t$1){return this.serializeObjectEntries(`Map`,t$1.entries())}}for(let s of[`Error`,`RegExp`,`URL`])o.prototype[`$`+s]=function(t$1){return`${s}(${t$1})`};for(let s of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])o.prototype[`$`+s]=function(t$1){return`${s}[${t$1.join(`,`)}]`};for(let s of[`BigInt64Array`,`BigUint64Array`])o.prototype[`$`+s]=function(t$1){return`${s}[${t$1.join(`n,`)}${t$1.length>0?`n`:``}]`};return o}();function isEqual(object1,object2){return object1===object2||serialize$1(object1)===serialize$1(object2)}function findValuesBetween(array$1,start,end){let startIndex=array$1.findIndex(i=>isEqual(i,start)),endIndex=array$1.findIndex(i=>isEqual(i,end));if(startIndex===-1||endIndex===-1)return[];let[minIndex,maxIndex]=[startIndex,endIndex].sort((a$1,b$1)=>a$1-b$1);return array$1.slice(minIndex,maxIndex+1)}function createContext(providerComponentName,contextName){let symbolDescription=typeof providerComponentName==`string`&&!contextName?`${providerComponentName}Context`:contextName,injectionKey=Symbol(symbolDescription),injectContext=fallback=>{let context$1=inject(injectionKey,fallback);if(context$1||context$1===null)return context$1;throw Error(`Injection \`${injectionKey.toString()}\` not found. Component must be used within ${Array.isArray(providerComponentName)?`one of the following components: ${providerComponentName.join(`, `)}`:`\`${providerComponentName}\``}`)},provideContext=contextValue=>(provide(injectionKey,contextValue),contextValue);return[injectContext,provideContext]}function getActiveElement(){let activeElement=document.activeElement;if(activeElement==null)return null;for(;activeElement!=null&&activeElement.shadowRoot!=null&&activeElement.shadowRoot.activeElement!=null;)activeElement=activeElement.shadowRoot.activeElement;return activeElement}function handleAndDispatchCustomEvent(name$2,handler,detail){let target$1=detail.originalEvent.target,event=new CustomEvent(name$2,{bubbles:!1,cancelable:!0,detail});handler&&target$1.addEventListener(name$2,handler,{once:!0}),target$1.dispatchEvent(event)}function renderSlotFragments(children){return children?children.flatMap(child=>child.type===Fragment?renderSlotFragments(child.children):[child]):[]}const[injectConfigProviderContext,provideConfigProviderContext]=createContext(`ConfigProvider`),useBodyLockStackCount=createSharedComposable(()=>{let map=ref(new Map),initialOverflow=ref(),locked=computed(()=>{for(let value$1 of map.value.values())if(value$1)return!0;return!1}),context$1=injectConfigProviderContext({scrollBody:ref(!0)}),stopTouchMoveListener=null,resetBodyStyle=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=initialOverflow.value??``,isIOS&&stopTouchMoveListener?.(),initialOverflow.value=void 0};return watch(locked,(val,oldVal)=>{if(!isClient$1)return;if(!val){oldVal&&resetBodyStyle();return}initialOverflow.value===void 0&&(initialOverflow.value=document.body.style.overflow);let verticalScrollbarWidth=window.innerWidth-document.documentElement.clientWidth,defaultConfig={padding:verticalScrollbarWidth,margin:0},config$1=context$1.scrollBody?.value?typeof context$1.scrollBody.value==`object`?defu({padding:context$1.scrollBody.value.padding===!0?verticalScrollbarWidth:context$1.scrollBody.value.padding,margin:context$1.scrollBody.value.margin===!0?verticalScrollbarWidth:context$1.scrollBody.value.margin},defaultConfig):defaultConfig:{padding:0,margin:0};verticalScrollbarWidth>0&&(document.body.style.paddingRight=typeof config$1.padding==`number`?`${config$1.padding}px`:String(config$1.padding),document.body.style.marginRight=typeof config$1.margin==`number`?`${config$1.margin}px`:String(config$1.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${verticalScrollbarWidth}px`),document.body.style.overflow=`hidden`),isIOS&&(stopTouchMoveListener=useEventListener$1(document,`touchmove`,e$4=>preventDefault(e$4),{passive:!1})),nextTick(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),map});function useBodyScrollLock(initialState){let id=Math.random().toString(36).substring(2,7),map=useBodyLockStackCount();map.value.set(id,initialState??!1);let locked=computed({get:()=>map.value.get(id)??!1,set:value$1=>map.value.set(id,value$1)});return tryOnBeforeUnmount(()=>{map.value.delete(id)}),locked}function checkOverflowScroll(ele){let style=window.getComputedStyle(ele);if(style.overflowX===`scroll`||style.overflowY===`scroll`||style.overflowX===`auto`&&ele.clientWidth1?!0:(e$4.preventDefault&&e$4.cancelable&&e$4.preventDefault(),!1)}function useDirection(dir){let context$1=injectConfigProviderContext({dir:ref(`ltr`)});return computed(()=>dir?.value||context$1.dir?.value||`ltr`)}function useEmitAsProps(emit$1){let vm=getCurrentInstance(),events=vm?.type.emits,result={};return events?.length||console.warn(`No emitted event found. Please check component: ${vm?.type.__name}`),events?.forEach(ev=>{result[toHandlerKey(camelize(ev))]=(...arg)=>emit$1(ev,...arg)}),result}function useFilter(options$1){let computedOptions=computed(()=>unref(options$1)),collator=computed(()=>new Intl.Collator(`en`,{usage:`search`,...computedOptions.value})),startsWith=(string$4,substring)=>substring.length===0?!0:(string$4=string$4.normalize(`NFC`),substring=substring.normalize(`NFC`),collator.value.compare(string$4.slice(0,substring.length),substring)===0),endsWith=(string$4,substring)=>substring.length===0?!0:(string$4=string$4.normalize(`NFC`),substring=substring.normalize(`NFC`),collator.value.compare(string$4.slice(-substring.length),substring)===0),contains=(string$4,substring)=>{if(substring.length===0)return!0;string$4=string$4.normalize(`NFC`),substring=substring.normalize(`NFC`);let scan=0,sliceLen=substring.length;for(;scan+sliceLen<=string$4.length;scan++){let slice=string$4.slice(scan,scan+sliceLen);if(collator.value.compare(substring,slice)===0)return!0}return!1};return{startsWith,endsWith,contains}}function useFormControl(el){return computed(()=>toValue$2(el)?!!unrefElement$1(el)?.closest(`form`):!0)}function useForwardExpose(){let instance=getCurrentInstance(),currentRef=ref(),currentElement=computed(()=>[`#text`,`#comment`].includes(currentRef.value?.$el.nodeName)?currentRef.value?.$el.nextElementSibling:unrefElement$1(currentRef)),localExpose=Object.assign({},instance.exposed),ret={};for(let key$2 in instance.props)Object.defineProperty(ret,key$2,{enumerable:!0,configurable:!0,get:()=>instance.props[key$2]});if(Object.keys(localExpose).length>0)for(let key$2 in localExpose)Object.defineProperty(ret,key$2,{enumerable:!0,configurable:!0,get:()=>localExpose[key$2]});Object.defineProperty(ret,`$el`,{enumerable:!0,configurable:!0,get:()=>instance.vnode.el}),instance.exposed=ret;function forwardRef(ref$1){currentRef.value=ref$1,ref$1&&(Object.defineProperty(ret,`$el`,{enumerable:!0,configurable:!0,get:()=>ref$1 instanceof Element?ref$1:ref$1.$el}),instance.exposed=ret)}return{forwardRef,currentRef,currentElement}}function useForwardProps(props){let vm=getCurrentInstance(),defaultProps=Object.keys(vm?.type.props??{}).reduce((prev,curr)=>{let defaultValue=(vm?.type.props[curr]).default;return defaultValue!==void 0&&(prev[curr]=defaultValue),prev},{}),refProps=toRef(props);return computed(()=>{let preservedProps={},assignedProps=vm?.vnode.props??{};return Object.keys(assignedProps).forEach(key$2=>{preservedProps[camelize(key$2)]=assignedProps[key$2]}),Object.keys({...defaultProps,...preservedProps}).reduce((prev,curr)=>(refProps.value[curr]!==void 0&&(prev[curr]=refProps.value[curr]),prev),{})})}function useForwardPropsEmits(props,emit$1){let parsedProps=useForwardProps(props),emitsAsProps=emit$1?useEmitAsProps(emit$1):{};return computed(()=>({...parsedProps.value,...emitsAsProps}))}function useGraceArea(triggerElement,containerElement){let isPointerInTransit=refAutoReset(!1,300),pointerGraceArea=ref(null),pointerExit=createEventHook();function handleRemoveGraceArea(){pointerGraceArea.value=null,isPointerInTransit.value=!1}function handleCreateGraceArea(event,hoverTarget){let currentTarget=event.currentTarget,exitPoint={x:event.clientX,y:event.clientY},exitSide=getExitSideFromRect(exitPoint,currentTarget.getBoundingClientRect()),paddedExitPoints=getPaddedExitPoints(exitPoint,exitSide),hoverTargetPoints=getPointsFromRect(hoverTarget.getBoundingClientRect()),graceArea=getHull([...paddedExitPoints,...hoverTargetPoints]);pointerGraceArea.value=graceArea,isPointerInTransit.value=!0}return watchEffect(cleanupFn=>{if(triggerElement.value&&containerElement.value){let handleTriggerLeave=event=>handleCreateGraceArea(event,containerElement.value),handleContentLeave=event=>handleCreateGraceArea(event,triggerElement.value);triggerElement.value.addEventListener(`pointerleave`,handleTriggerLeave),containerElement.value.addEventListener(`pointerleave`,handleContentLeave),cleanupFn(()=>{triggerElement.value?.removeEventListener(`pointerleave`,handleTriggerLeave),containerElement.value?.removeEventListener(`pointerleave`,handleContentLeave)})}}),watchEffect(cleanupFn=>{if(pointerGraceArea.value){let handleTrackPointerGrace=event=>{if(!pointerGraceArea.value||!(event.target instanceof HTMLElement))return;let target$1=event.target,pointerPosition={x:event.clientX,y:event.clientY},hasEnteredTarget=triggerElement.value?.contains(target$1)||containerElement.value?.contains(target$1),isPointerOutsideGraceArea=!isPointInPolygon(pointerPosition,pointerGraceArea.value),isAnotherGraceAreaTrigger=!!target$1.closest(`[data-grace-area-trigger]`);hasEnteredTarget?handleRemoveGraceArea():(isPointerOutsideGraceArea||isAnotherGraceAreaTrigger)&&(handleRemoveGraceArea(),pointerExit.trigger())};triggerElement.value?.ownerDocument.addEventListener(`pointermove`,handleTrackPointerGrace),cleanupFn(()=>triggerElement.value?.ownerDocument.removeEventListener(`pointermove`,handleTrackPointerGrace))}}),{isPointerInTransit,onPointerExit:pointerExit.on}}function getExitSideFromRect(point$3,rect){let top=Math.abs(rect.top-point$3.y),bottom=Math.abs(rect.bottom-point$3.y),right=Math.abs(rect.right-point$3.x),left=Math.abs(rect.left-point$3.x);switch(Math.min(top,bottom,right,left)){case left:return`left`;case right:return`right`;case top:return`top`;case bottom:return`bottom`;default:throw Error(`unreachable`)}}function getPaddedExitPoints(exitPoint,exitSide,padding=5){let paddedExitPoints=[];switch(exitSide){case`top`:paddedExitPoints.push({x:exitPoint.x-padding,y:exitPoint.y+padding},{x:exitPoint.x+padding,y:exitPoint.y+padding});break;case`bottom`:paddedExitPoints.push({x:exitPoint.x-padding,y:exitPoint.y-padding},{x:exitPoint.x+padding,y:exitPoint.y-padding});break;case`left`:paddedExitPoints.push({x:exitPoint.x+padding,y:exitPoint.y-padding},{x:exitPoint.x+padding,y:exitPoint.y+padding});break;case`right`:paddedExitPoints.push({x:exitPoint.x-padding,y:exitPoint.y-padding},{x:exitPoint.x-padding,y:exitPoint.y+padding});break}return paddedExitPoints}function getPointsFromRect(rect){let{top,right,bottom,left}=rect;return[{x:left,y:top},{x:right,y:top},{x:right,y:bottom},{x:left,y:bottom}]}function isPointInPolygon(point$3,polygon){let{x:x$1,y}=point$3,inside=!1;for(let i=0,j$1=polygon.length-1;iy!=yj>y&&x$1<(xj-xi)*(y-yi)/(yj-yi)+xi;intersect$1&&(inside=!inside)}return inside}function getHull(points){let newPoints=points.slice();return newPoints.sort((a$1,b$1)=>a$1.xb$1.x?1:a$1.yb$1.y?1:0),getHullPresorted(newPoints)}function getHullPresorted(points){if(points.length<=1)return points.slice();let upperHull=[];for(let i=0;i=2;){let q=upperHull[upperHull.length-1],r$1=upperHull[upperHull.length-2];if((q.x-r$1.x)*(p$4.y-r$1.y)>=(q.y-r$1.y)*(p$4.x-r$1.x))upperHull.pop();else break}upperHull.push(p$4)}upperHull.pop();let lowerHull=[];for(let i=points.length-1;i>=0;i--){let p$4=points[i];for(;lowerHull.length>=2;){let q=lowerHull[lowerHull.length-1],r$1=lowerHull[lowerHull.length-2];if((q.x-r$1.x)*(p$4.y-r$1.y)>=(q.y-r$1.y)*(p$4.x-r$1.x))lowerHull.pop();else break}lowerHull.push(p$4)}return lowerHull.pop(),upperHull.length===1&&lowerHull.length===1&&upperHull[0].x===lowerHull[0].x&&upperHull[0].y===lowerHull[0].y?upperHull:upperHull.concat(lowerHull)}var getDefaultParent=function(originalTarget){if(typeof document>`u`)return null;var sampleTarget=Array.isArray(originalTarget)?originalTarget[0]:originalTarget;return sampleTarget.ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function(node$1){return node$1&&(node$1.host||unwrapHost(node$1.parentNode))},correctTargets=function(parent,targets){return targets.map(function(target$1){if(parent.contains(target$1))return target$1;var correctedTarget=unwrapHost(target$1);return correctedTarget&&parent.contains(correctedTarget)?correctedTarget:(console.error(`aria-hidden`,target$1,`in not contained inside`,parent,`. Doing nothing`),null)}).filter(function(x$1){return!!x$1})},applyAttributeToOthers=function(originalTarget,parentNode,markerName,controlAttribute){var targets=correctTargets(parentNode,Array.isArray(originalTarget)?originalTarget:[originalTarget]);markerMap[markerName]||(markerMap[markerName]=new WeakMap);var markerCounter=markerMap[markerName],hiddenNodes=[],elementsToKeep=new Set,elementsToStop=new Set(targets),keep=function(el){!el||elementsToKeep.has(el)||(elementsToKeep.add(el),keep(el.parentNode))};targets.forEach(keep);var deep=function(parent){!parent||elementsToStop.has(parent)||Array.prototype.forEach.call(parent.children,function(node$1){if(elementsToKeep.has(node$1))deep(node$1);else try{var attr=node$1.getAttribute(controlAttribute),alreadyHidden=attr!==null&&attr!==`false`,counterValue=(counterMap.get(node$1)||0)+1,markerValue=(markerCounter.get(node$1)||0)+1;counterMap.set(node$1,counterValue),markerCounter.set(node$1,markerValue),hiddenNodes.push(node$1),counterValue===1&&alreadyHidden&&uncontrolledNodes.set(node$1,!0),markerValue===1&&node$1.setAttribute(markerName,`true`),alreadyHidden||node$1.setAttribute(controlAttribute,`true`)}catch(e$4){console.error(`aria-hidden: cannot operate on `,node$1,e$4)}})};return deep(parentNode),elementsToKeep.clear(),lockCount++,function(){hiddenNodes.forEach(function(node$1){var counterValue=counterMap.get(node$1)-1,markerValue=markerCounter.get(node$1)-1;counterMap.set(node$1,counterValue),markerCounter.set(node$1,markerValue),counterValue||(uncontrolledNodes.has(node$1)||node$1.removeAttribute(controlAttribute),uncontrolledNodes.delete(node$1)),markerValue||node$1.removeAttribute(markerName)}),lockCount--,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function(originalTarget,parentNode,markerName){markerName===void 0&&(markerName=`data-aria-hidden`);var targets=Array.from(Array.isArray(originalTarget)?originalTarget:[originalTarget]),activeParentNode=parentNode||getDefaultParent(originalTarget);return activeParentNode?(targets.push.apply(targets,Array.from(activeParentNode.querySelectorAll(`[aria-live]`))),applyAttributeToOthers(targets,activeParentNode,markerName,`aria-hidden`)):function(){return null}};function useHideOthers(target$1){let undo;watch(()=>unrefElement$1(target$1),el=>{el?undo=hideOthers(el):undo&&undo()}),onUnmounted(()=>{undo&&undo()})}let count=0;function useId(deterministicId,prefix=`reka`){if(deterministicId)return deterministicId;if(`useId`in vue_runtime_esm_bundler_exports)return`${prefix}-${useId$1?.()}`;let configProviderContext=injectConfigProviderContext({useId:void 0});return configProviderContext.useId?`${prefix}-${configProviderContext.useId()}`:`${prefix}-${++count}`}function useKbd(){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`}}function useSize(element$3){let size$2=ref(),width=computed(()=>size$2.value?.width??0),height=computed(()=>size$2.value?.height??0);return onMounted(()=>{let el=unrefElement$1(element$3);if(el){size$2.value={width:el.offsetWidth,height:el.offsetHeight};let resizeObserver=new ResizeObserver(entries=>{if(!Array.isArray(entries)||!entries.length)return;let entry=entries[0],width$1,height$1;if(`borderBoxSize`in entry){let borderSizeEntry=entry.borderBoxSize,borderSize=Array.isArray(borderSizeEntry)?borderSizeEntry[0]:borderSizeEntry;width$1=borderSize.inlineSize,height$1=borderSize.blockSize}else width$1=el.offsetWidth,height$1=el.offsetHeight;size$2.value={width:width$1,height:height$1}});return resizeObserver.observe(el,{box:`border-box`}),()=>resizeObserver.unobserve(el)}else size$2.value=void 0}),{width,height}}function useStateMachine(initialState,machine){let state=ref(initialState);function reducer(event){let nextState=machine[state.value][event];return nextState??state.value}let dispatch=event=>{state.value=reducer(event)};return{state,dispatch}}function useTypeahead(callback){let search$1=refAutoReset(``,1e3),handleTypeaheadSearch=(key$2,items)=>{if(search$1.value+=key$2,callback)callback(key$2);else{let currentItem=getActiveElement(),itemsWithTextValue=items.map(item=>({...item,textValue:item.value?.textValue??item.ref.textContent?.trim()??``})),currentMatch=itemsWithTextValue.find(item=>item.ref===currentItem),values=itemsWithTextValue.map(item=>item.textValue),nextMatch=getNextMatch(values,search$1.value,currentMatch?.textValue),newItem=itemsWithTextValue.find(item=>item.textValue===nextMatch);return newItem&&newItem.ref.focus(),newItem?.ref}},resetTypeahead=()=>{search$1.value=``};return{search:search$1,handleTypeaheadSearch,resetTypeahead}}function wrapArray(array$1,startIndex){return array$1.map((_$1,index$1)=>array$1[(startIndex+index$1)%array$1.length])}function getNextMatch(values,search$1,currentMatch){let isRepeated=search$1.length>1&&Array.from(search$1).every(char=>char===search$1[0]),normalizedSearch=isRepeated?search$1[0]:search$1,currentMatchIndex=currentMatch?values.indexOf(currentMatch):-1,wrappedValues=wrapArray(values,Math.max(currentMatchIndex,0)),excludeCurrentMatch=normalizedSearch.length===1;excludeCurrentMatch&&(wrappedValues=wrappedValues.filter(v=>v!==currentMatch));let nextMatch=wrappedValues.find(value$1=>value$1.toLowerCase().startsWith(normalizedSearch.toLowerCase()));return nextMatch===currentMatch?void 0:nextMatch}function usePresence(present,node$1){let stylesRef=ref({}),prevAnimationNameRef=ref(`none`),prevPresentRef=ref(present),initialState=present.value?`mounted`:`unmounted`,timeoutId,ownerWindow=node$1.value?.ownerDocument.defaultView??defaultWindow,{state,dispatch}=useStateMachine(initialState,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),dispatchCustomEvent=name$2=>{if(isClient$1){let customEvent=new CustomEvent(name$2,{bubbles:!1,cancelable:!1});node$1.value?.dispatchEvent(customEvent)}};watch(present,async(currentPresent,prevPresent)=>{let hasPresentChanged=prevPresent!==currentPresent;if(await nextTick(),hasPresentChanged){let prevAnimationName=prevAnimationNameRef.value,currentAnimationName=getAnimationName(node$1.value);if(currentPresent)dispatch(`MOUNT`),dispatchCustomEvent(`enter`),currentAnimationName===`none`&&dispatchCustomEvent(`after-enter`);else if(currentAnimationName===`none`||currentAnimationName===`undefined`||stylesRef.value?.display===`none`)dispatch(`UNMOUNT`),dispatchCustomEvent(`leave`),dispatchCustomEvent(`after-leave`);else{let isAnimating=prevAnimationName!==currentAnimationName;prevPresent&&isAnimating?(dispatch(`ANIMATION_OUT`),dispatchCustomEvent(`leave`)):(dispatch(`UNMOUNT`),dispatchCustomEvent(`after-leave`))}}},{immediate:!0});let handleAnimationEnd=event=>{let currentAnimationName=getAnimationName(node$1.value),isCurrentAnimation=currentAnimationName.includes(event.animationName),directionName=state.value===`mounted`?`enter`:`leave`;if(event.target===node$1.value&&isCurrentAnimation&&(dispatchCustomEvent(`after-${directionName}`),dispatch(`ANIMATION_END`),!prevPresentRef.value)){let currentFillMode=node$1.value.style.animationFillMode;node$1.value.style.animationFillMode=`forwards`,timeoutId=ownerWindow?.setTimeout(()=>{node$1.value?.style.animationFillMode===`forwards`&&(node$1.value.style.animationFillMode=currentFillMode)})}event.target===node$1.value&¤tAnimationName===`none`&&dispatch(`ANIMATION_END`)},handleAnimationStart=event=>{event.target===node$1.value&&(prevAnimationNameRef.value=getAnimationName(node$1.value))},watcher=watch(node$1,(newNode,oldNode)=>{newNode?(stylesRef.value=getComputedStyle(newNode),newNode.addEventListener(`animationstart`,handleAnimationStart),newNode.addEventListener(`animationcancel`,handleAnimationEnd),newNode.addEventListener(`animationend`,handleAnimationEnd)):(dispatch(`ANIMATION_END`),timeoutId!==void 0&&ownerWindow?.clearTimeout(timeoutId),oldNode?.removeEventListener(`animationstart`,handleAnimationStart),oldNode?.removeEventListener(`animationcancel`,handleAnimationEnd),oldNode?.removeEventListener(`animationend`,handleAnimationEnd))},{immediate:!0}),stateWatcher=watch(state,()=>{let currentAnimationName=getAnimationName(node$1.value);prevAnimationNameRef.value=state.value===`mounted`?currentAnimationName:`none`});onUnmounted(()=>{watcher(),stateWatcher()});let isPresent=computed(()=>[`mounted`,`unmountSuspended`].includes(state.value));return{isPresent}}function getAnimationName(node$1){return node$1&&getComputedStyle(node$1).animationName||`none`}var Presence_default=defineComponent({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(props,{slots,expose}){let{present,forceMount}=toRefs(props),node$1=ref(),{isPresent}=usePresence(present,node$1);expose({present:isPresent});let children=slots.default({present:isPresent.value});children=renderSlotFragments(children||[]);let instance=getCurrentInstance();if(children&&children?.length>1){let componentName=instance?.parent?.type.name?`<${instance.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${componentName}\` 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(line=>` - ${line}`).join(` +function defineStore(id,setup,setupOptions){let options$1,isSetupStore=typeof setup==`function`;options$1=isSetupStore?setupOptions:setup;function useStore(pinia$1,hot){let hasContext=hasInjectionContext();pinia$1||=hasContext?inject(piniaSymbol,null):null,pinia$1&&setActivePinia(pinia$1),pinia$1=activePinia,!pinia$1._s.has(id)&&(isSetupStore?createSetupStore(id,setup,options$1,pinia$1):createOptionsStore(id,options$1,pinia$1));let store=pinia$1._s.get(id);return store}return useStore.$id=id,useStore}function storeToRefs(store){let rawStore=toRaw(store),refs={};for(let key$2 in rawStore){let value$1=rawStore[key$2];value$1.effect?refs[key$2]=computed({get:()=>store[key$2],set(value$2){store[key$2]=value$2}}):(isRef(value$1)||isReactive(value$1))&&(refs[key$2]=toRef(store,key$2))}return refs}const scriptRel=`modulepreload`,assetsURL=function(dep){return`/`+dep},seen={},__vitePreload=function(baseModule,deps,importerUrl){let promise=Promise.resolve();if(deps&&deps.length>0){let links=document.getElementsByTagName(`link`),cspNonceMeta=document.querySelector(`meta[property=csp-nonce]`),cspNonce=cspNonceMeta?.nonce||cspNonceMeta?.getAttribute(`nonce`);function allSettled(promises$2){return Promise.all(promises$2.map(p$1$1=>Promise.resolve(p$1$1).then(value$1=>({status:`fulfilled`,value:value$1}),reason=>({status:`rejected`,reason}))))}promise=allSettled(deps.map(dep=>{if(dep=assetsURL(dep,importerUrl),dep in seen)return;seen[dep]=!0;let isCss=dep.endsWith(`.css`),cssSelector=isCss?`[rel="stylesheet"]`:``,isBaseRelative=!!importerUrl;if(isBaseRelative)for(let i$1=links.length-1;i$1>=0;i$1--){let link$1$1=links[i$1];if(link$1$1.href===dep&&(!isCss||link$1$1.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${dep}"]${cssSelector}`))return;let link$1=document.createElement(`link`);if(link$1.rel=isCss?`stylesheet`:scriptRel,isCss||(link$1.as=`script`),link$1.crossOrigin=``,link$1.href=dep,cspNonce&&link$1.setAttribute(`nonce`,cspNonce),document.head.appendChild(link$1),isCss)return new Promise((res,rej)=>{link$1.addEventListener(`load`,res),link$1.addEventListener(`error`,()=>rej(Error(`Unable to preload CSS for ${dep}`)))})}))}function handlePreloadError(err$2){let e$1$1=new Event(`vite:preloadError`,{cancelable:!0});if(e$1$1.payload=err$2,window.dispatchEvent(e$1$1),!e$1$1.defaultPrevented)throw err$2}return promise.then(res=>{for(let item of res||[]){if(item.status!==`rejected`)continue;handlePreloadError(item.reason)}return baseModule().catch(handlePreloadError)})},setupLayouts=routes$1=>{let layouts={},modules=Object.assign({"/src/layouts/default.vue":()=>__vitePreload(()=>import(`./default-BxAUVEXe.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>__vitePreload(()=>import(`./home-VSi7cQy-.js`),[]),"/src/layouts/plain.vue":()=>__vitePreload(()=>import(`./plain-DnlN44SY.js`),[]),"/src/layouts/settings.vue":()=>__vitePreload(()=>import(`./settings-BlRMq2Zz.js`),__vite__mapDeps([3,1,2,4])),"/src/layouts/stage.vue":()=>__vitePreload(()=>import(`./stage-FQGYvFsu.js`),[])});Object.entries(modules).forEach(([name$2,module$1])=>{let key$2=name$2.replace(`/src/layouts/`,``).replace(`.vue`,``);layouts[key$2]=module$1});function deepSetupLayout(routes$2,top=!0){return routes$2.map(route=>{if(route.children?.length>0&&(route.children=deepSetupLayout(route.children,!1)),top){let skipLayout=!route.component&&route.children?.find(r$1=>(r$1.path===``||r$1.path===`/`)&&r$1.meta?.isLayout);if(skipLayout)return route;if(route.meta?.layout!==!1)return{path:route.path,component:layouts[route.meta?.layout||`default`],children:route.path===`/`?[route]:[{...route,path:``}],meta:{isLayout:!0}}}return route.meta?.layout?{path:route.path,component:layouts[route.meta?.layout],children:[{...route,path:``}],meta:{isLayout:!0}}:route})}return deepSetupLayout(routes$1)},isBrowser$2=typeof document<`u`;function isRouteComponent(component){return typeof component==`object`||`displayName`in component||`props`in component||`__vccOpts`in component}function isESModule(obj){return obj.__esModule||obj[Symbol.toStringTag]===`Module`||obj.default&&isRouteComponent(obj.default)}const assign$1=Object.assign;function applyToParams(fn$5,params){let newParams={};for(let key$2 in params){let value$1=params[key$2];newParams[key$2]=isArray$3(value$1)?value$1.map(fn$5):fn$5(value$1)}return newParams}const noop$1=()=>{},isArray$3=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(text$5){return encodeURI(``+text$5).replace(ENC_PIPE_RE,`|`).replace(ENC_BRACKET_OPEN_RE,`[`).replace(ENC_BRACKET_CLOSE_RE,`]`)}function encodeHash(text$5){return commonEncode(text$5).replace(ENC_CURLY_OPEN_RE,`{`).replace(ENC_CURLY_CLOSE_RE,`}`).replace(ENC_CARET_RE,`^`)}function encodeQueryValue(text$5){return commonEncode(text$5).replace(PLUS_RE,`%2B`).replace(ENC_SPACE_RE,`+`).replace(HASH_RE,`%23`).replace(AMPERSAND_RE,`%26`).replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,`{`).replace(ENC_CURLY_CLOSE_RE,`}`).replace(ENC_CARET_RE,`^`)}function encodeQueryKey(text$5){return encodeQueryValue(text$5).replace(EQUAL_RE,`%3D`)}function encodePath(text$5){return commonEncode(text$5).replace(HASH_RE,`%23`).replace(IM_RE,`%3F`)}function encodeParam(text$5){return text$5==null?``:encodePath(text$5).replace(SLASH_RE,`%2F`)}function decode$1(text$5){try{return decodeURIComponent(``+text$5)}catch{}return``+text$5}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=path=>path.replace(TRAILING_SLASH_RE,``);function parseURL(parseQuery$1,location$1,currentLocation=`/`){let path,query={},searchString=``,hash=``,hashPos=location$1.indexOf(`#`),searchPos=location$1.indexOf(`?`);return hashPos=0&&(searchPos=-1),searchPos>-1&&(path=location$1.slice(0,searchPos),searchString=location$1.slice(searchPos+1,hashPos>-1?hashPos:location$1.length),query=parseQuery$1(searchString)),hashPos>-1&&(path||=location$1.slice(0,hashPos),hash=location$1.slice(hashPos,location$1.length)),path=resolveRelativePath(path??location$1,currentLocation),{fullPath:path+(searchString&&`?`)+searchString+hash,path,query,hash:decode$1(hash)}}function stringifyURL(stringifyQuery$1,location$1){let query=location$1.query?stringifyQuery$1(location$1.query):``;return location$1.path+(query&&`?`)+query+(location$1.hash||``)}function stripBase(pathname,base){return!base||!pathname.toLowerCase().startsWith(base.toLowerCase())?pathname:pathname.slice(base.length)||`/`}function isSameRouteLocation(stringifyQuery$1,a$1,b$1){let aLastIndex=a$1.matched.length-1,bLastIndex=b$1.matched.length-1;return aLastIndex>-1&&aLastIndex===bLastIndex&&isSameRouteRecord(a$1.matched[aLastIndex],b$1.matched[bLastIndex])&&isSameRouteLocationParams(a$1.params,b$1.params)&&stringifyQuery$1(a$1.query)===stringifyQuery$1(b$1.query)&&a$1.hash===b$1.hash}function isSameRouteRecord(a$1,b$1){return(a$1.aliasOf||a$1)===(b$1.aliasOf||b$1)}function isSameRouteLocationParams(a$1,b$1){if(Object.keys(a$1).length!==Object.keys(b$1).length)return!1;for(let key$2 in a$1)if(!isSameRouteLocationParamsValue(a$1[key$2],b$1[key$2]))return!1;return!0}function isSameRouteLocationParamsValue(a$1,b$1){return isArray$3(a$1)?isEquivalentArray(a$1,b$1):isArray$3(b$1)?isEquivalentArray(b$1,a$1):a$1===b$1}function isEquivalentArray(a$1,b$1){return isArray$3(b$1)?a$1.length===b$1.length&&a$1.every((value$1,i)=>value$1===b$1[i]):a$1.length===1&&a$1[0]===b$1}function resolveRelativePath(to$1,from){if(to$1.startsWith(`/`))return to$1;if(!to$1)return from;let fromSegments=from.split(`/`),toSegments=to$1.split(`/`),lastToSegment=toSegments[toSegments.length-1];(lastToSegment===`..`||lastToSegment===`.`)&&toSegments.push(``);let position$2=fromSegments.length-1,toPosition,segment;for(toPosition=0;toPosition1&&position$2--;else break;return fromSegments.slice(0,position$2).join(`/`)+`/`+toSegments.slice(toPosition).join(`/`)}const START_LOCATION_NORMALIZED={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};var NavigationType;(function(NavigationType$1){NavigationType$1.pop=`pop`,NavigationType$1.push=`push`})(NavigationType||={});var NavigationDirection;(function(NavigationDirection$1){NavigationDirection$1.back=`back`,NavigationDirection$1.forward=`forward`,NavigationDirection$1.unknown=``})(NavigationDirection||={});function normalizeBase(base){if(!base)if(isBrowser$2){let baseEl=document.querySelector(`base`);base=baseEl&&baseEl.getAttribute(`href`)||`/`,base=base.replace(/^\w+:\/\/[^\/]+/,``)}else base=`/`;return base[0]!==`/`&&base[0]!==`#`&&(base=`/`+base),removeTrailingSlash(base)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(base,location$1){return base.replace(BEFORE_HASH_RE,`#`)+location$1}function getElementPosition(el,offset$2){let docRect=document.documentElement.getBoundingClientRect(),elRect=el.getBoundingClientRect();return{behavior:offset$2.behavior,left:elRect.left-docRect.left-(offset$2.left||0),top:elRect.top-docRect.top-(offset$2.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(position$2){let scrollToOptions;if(`el`in position$2){let positionEl=position$2.el,isIdSelector=typeof positionEl==`string`&&positionEl.startsWith(`#`),el=typeof positionEl==`string`?isIdSelector?document.getElementById(positionEl.slice(1)):document.querySelector(positionEl):positionEl;if(!el)return;scrollToOptions=getElementPosition(el,position$2)}else scrollToOptions=position$2;`scrollBehavior`in document.documentElement.style?window.scrollTo(scrollToOptions):window.scrollTo(scrollToOptions.left==null?window.scrollX:scrollToOptions.left,scrollToOptions.top==null?window.scrollY:scrollToOptions.top)}function getScrollKey(path,delta){let position$2=history.state?history.state.position-delta:-1;return position$2+path}const scrollPositions=new Map;function saveScrollPosition(key$2,scrollPosition){scrollPositions.set(key$2,scrollPosition)}function getSavedScrollPosition(key$2){let scroll=scrollPositions.get(key$2);return scrollPositions.delete(key$2),scroll}let createBaseLocation=()=>location.protocol+`//`+location.host;function createCurrentLocation(base,location$1){let{pathname,search:search$1,hash}=location$1,hashPos=base.indexOf(`#`);if(hashPos>-1){let slicePos=hash.includes(base.slice(hashPos))?base.slice(hashPos).length:1,pathFromHash=hash.slice(slicePos);return pathFromHash[0]!==`/`&&(pathFromHash=`/`+pathFromHash),stripBase(pathFromHash,``)}let path=stripBase(pathname,base);return path+search$1+hash}function useHistoryListeners(base,historyState,currentLocation,replace){let listeners=[],teardowns=[],pauseState=null,popStateHandler=({state})=>{let to$1=createCurrentLocation(base,location),from=currentLocation.value,fromState=historyState.value,delta=0;if(state){if(currentLocation.value=to$1,historyState.value=state,pauseState&&pauseState===from){pauseState=null;return}delta=fromState?state.position-fromState.position:0}else replace(to$1);listeners.forEach(listener=>{listener(currentLocation.value,from,{delta,type:NavigationType.pop,direction:delta?delta>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function pauseListeners(){pauseState=currentLocation.value}function listen(callback){listeners.push(callback);let teardown=()=>{let index$1=listeners.indexOf(callback);index$1>-1&&listeners.splice(index$1,1)};return teardowns.push(teardown),teardown}function beforeUnloadListener(){let{history:history$1}=window;history$1.state&&history$1.replaceState(assign$1({},history$1.state,{scroll:computeScrollPosition()}),``)}function destroy(){for(let teardown of teardowns)teardown();teardowns=[],window.removeEventListener(`popstate`,popStateHandler),window.removeEventListener(`beforeunload`,beforeUnloadListener)}return window.addEventListener(`popstate`,popStateHandler),window.addEventListener(`beforeunload`,beforeUnloadListener,{passive:!0}),{pauseListeners,listen,destroy}}function buildState(back,current,forward,replaced=!1,computeScroll=!1){return{back,current,forward,replaced,position:window.history.length,scroll:computeScroll?computeScrollPosition():null}}function useHistoryStateNavigation(base){let{history:history$1,location:location$1}=window,currentLocation={value:createCurrentLocation(base,location$1)},historyState={value:history$1.state};historyState.value||changeLocation(currentLocation.value,{back:null,current:currentLocation.value,forward:null,position:history$1.length-1,replaced:!0,scroll:null},!0);function changeLocation(to$1,state,replace$1){let hashIndex=base.indexOf(`#`),url=hashIndex>-1?(location$1.host&&document.querySelector(`base`)?base:base.slice(hashIndex))+to$1:createBaseLocation()+base+to$1;try{history$1[replace$1?`replaceState`:`pushState`](state,``,url),historyState.value=state}catch(err){console.error(err),location$1[replace$1?`replace`:`assign`](url)}}function replace(to$1,data$12){let state=assign$1({},history$1.state,buildState(historyState.value.back,to$1,historyState.value.forward,!0),data$12,{position:historyState.value.position});changeLocation(to$1,state,!0),currentLocation.value=to$1}function push$1(to$1,data$12){let currentState=assign$1({},historyState.value,history$1.state,{forward:to$1,scroll:computeScrollPosition()});changeLocation(currentState.current,currentState,!0);let state=assign$1({},buildState(currentLocation.value,to$1,null),{position:currentState.position+1},data$12);changeLocation(to$1,state,!1),currentLocation.value=to$1}return{location:currentLocation,state:historyState,push:push$1,replace}}function createWebHistory(base){base=normalizeBase(base);let historyNavigation=useHistoryStateNavigation(base),historyListeners=useHistoryListeners(base,historyNavigation.state,historyNavigation.location,historyNavigation.replace);function go(delta,triggerListeners=!0){triggerListeners||historyListeners.pauseListeners(),history.go(delta)}let routerHistory=assign$1({location:``,base,go,createHref:createHref.bind(null,base)},historyNavigation,historyListeners);return Object.defineProperty(routerHistory,`location`,{enumerable:!0,get:()=>historyNavigation.location.value}),Object.defineProperty(routerHistory,`state`,{enumerable:!0,get:()=>historyNavigation.state.value}),routerHistory}function createWebHashHistory(base){return base=location.host?base||location.pathname+location.search:``,!base.includes(`#`)&&(base+=`#`),createWebHistory(base)}function isRouteLocation(route){return typeof route==`string`||route&&typeof route==`object`}function isRouteName(name$2){return typeof name$2==`string`||typeof name$2==`symbol`}const NavigationFailureSymbol=Symbol(``);var NavigationFailureType;(function(NavigationFailureType$1){NavigationFailureType$1[NavigationFailureType$1.aborted=4]=`aborted`,NavigationFailureType$1[NavigationFailureType$1.cancelled=8]=`cancelled`,NavigationFailureType$1[NavigationFailureType$1.duplicated=16]=`duplicated`})(NavigationFailureType||={});function createRouterError(type,params){return assign$1(Error(),{type,[NavigationFailureSymbol]:!0},params)}function isNavigationFailure(error,type){return error instanceof Error&&NavigationFailureSymbol in error&&(type==null||!!(error.type&type))}const BASE_PARAM_PATTERN=`[^/]+?`,BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(segments,extraOptions){let options$1=assign$1({},BASE_PATH_PARSER_OPTIONS,extraOptions),score=[],pattern=options$1.start?`^`:``,keys$3=[];for(let segment of segments){let segmentScores=segment.length?[]:[90];options$1.strict&&!segment.length&&(pattern+=`/`);for(let tokenIndex=0;tokenIndexb$1.length?b$1.length===1&&b$1[0]===80?1:-1:0}function comparePathParserScore(a$1,b$1){let i=0,aScore=a$1.score,bScore=b$1.score;for(;i0&&last[last.length-1]<0}const ROOT_TOKEN={type:0,value:``},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(path){if(!path)return[[]];if(path===`/`)return[[ROOT_TOKEN]];if(!path.startsWith(`/`))throw Error(`Invalid path "${path}"`);function crash(message$1){throw Error(`ERR (${state})/"${buffer$1}": ${message$1}`)}let state=0,previousState=state,tokens=[],segment;function finalizeSegment(){segment&&tokens.push(segment),segment=[]}let i=0,char,buffer$1=``,customRe=``;function consumeBuffer(){buffer$1&&(state===0?segment.push({type:0,value:buffer$1}):state===1||state===2||state===3?(segment.length>1&&(char===`*`||char===`+`)&&crash(`A repeatable param (${buffer$1}) must be alone in its segment. eg: '/:ids+.`),segment.push({type:1,value:buffer$1,regexp:customRe,repeatable:char===`*`||char===`+`,optional:char===`*`||char===`?`})):crash(`Invalid state to consume buffer`),buffer$1=``)}function addCharToBuffer(){buffer$1+=char}for(;i{removeRoute(originalMatcher)}:noop$1}function removeRoute(matcherRef){if(isRouteName(matcherRef)){let matcher=matcherMap.get(matcherRef);matcher&&(matcherMap.delete(matcherRef),matchers.splice(matchers.indexOf(matcher),1),matcher.children.forEach(removeRoute),matcher.alias.forEach(removeRoute))}else{let index$1=matchers.indexOf(matcherRef);index$1>-1&&(matchers.splice(index$1,1),matcherRef.record.name&&matcherMap.delete(matcherRef.record.name),matcherRef.children.forEach(removeRoute),matcherRef.alias.forEach(removeRoute))}}function getRoutes(){return matchers}function insertMatcher(matcher){let index$1=findInsertionIndex(matcher,matchers);matchers.splice(index$1,0,matcher),matcher.record.name&&!isAliasRecord(matcher)&&matcherMap.set(matcher.record.name,matcher)}function resolve$1(location$1,currentLocation){let matcher,params={},path,name$2;if(`name`in location$1&&location$1.name){if(matcher=matcherMap.get(location$1.name),!matcher)throw createRouterError(1,{location:location$1});name$2=matcher.record.name,params=assign$1(paramsFromLocation(currentLocation.params,matcher.keys.filter(k$3=>!k$3.optional).concat(matcher.parent?matcher.parent.keys.filter(k$3=>k$3.optional):[]).map(k$3=>k$3.name)),location$1.params&¶msFromLocation(location$1.params,matcher.keys.map(k$3=>k$3.name))),path=matcher.stringify(params)}else if(location$1.path!=null)path=location$1.path,matcher=matchers.find(m=>m.re.test(path)),matcher&&(params=matcher.parse(path),name$2=matcher.record.name);else{if(matcher=currentLocation.name?matcherMap.get(currentLocation.name):matchers.find(m=>m.re.test(currentLocation.path)),!matcher)throw createRouterError(1,{location:location$1,currentLocation});name$2=matcher.record.name,params=assign$1({},currentLocation.params,location$1.params),path=matcher.stringify(params)}let matched=[],parentMatcher=matcher;for(;parentMatcher;)matched.unshift(parentMatcher.record),parentMatcher=parentMatcher.parent;return{name:name$2,path,params,matched,meta:mergeMetaFields(matched)}}routes$1.forEach(route=>addRoute(route));function clearRoutes(){matchers.length=0,matcherMap.clear()}return{addRoute,resolve:resolve$1,removeRoute,clearRoutes,getRoutes,getRecordMatcher}}function paramsFromLocation(params,keys$3){let newParams={};for(let key$2 of keys$3)key$2 in params&&(newParams[key$2]=params[key$2]);return newParams}function normalizeRouteRecord(record){let normalized={path:record.path,redirect:record.redirect,name:record.name,meta:record.meta||{},aliasOf:record.aliasOf,beforeEnter:record.beforeEnter,props:normalizeRecordProps(record),children:record.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in record?record.components||null:record.component&&{default:record.component}};return Object.defineProperty(normalized,`mods`,{value:{}}),normalized}function normalizeRecordProps(record){let propsObject={},props=record.props||!1;if(`component`in record)propsObject.default=props;else for(let name$2 in record.components)propsObject[name$2]=typeof props==`object`?props[name$2]:props;return propsObject}function isAliasRecord(record){for(;record;){if(record.record.aliasOf)return!0;record=record.parent}return!1}function mergeMetaFields(matched){return matched.reduce((meta,record)=>assign$1(meta,record.meta),{})}function mergeOptions(defaults$1,partialOptions){let options$1={};for(let key$2 in defaults$1)options$1[key$2]=key$2 in partialOptions?partialOptions[key$2]:defaults$1[key$2];return options$1}function findInsertionIndex(matcher,matchers){let lower=0,upper=matchers.length;for(;lower!==upper;){let mid=lower+upper>>1,sortOrder=comparePathParserScore(matcher,matchers[mid]);sortOrder<0?upper=mid:lower=mid+1}let insertionAncestor=getInsertionAncestor(matcher);return insertionAncestor&&(upper=matchers.lastIndexOf(insertionAncestor,upper-1)),upper}function getInsertionAncestor(matcher){let ancestor=matcher;for(;ancestor=ancestor.parent;)if(isMatchable(ancestor)&&comparePathParserScore(matcher,ancestor)===0)return ancestor}function isMatchable({record}){return!!(record.name||record.components&&Object.keys(record.components).length||record.redirect)}function parseQuery(search$1){let query={};if(search$1===``||search$1===`?`)return query;let hasLeadingIM=search$1[0]===`?`,searchParams=(hasLeadingIM?search$1.slice(1):search$1).split(`&`);for(let i=0;iv&&encodeQueryValue(v)):[value$1&&encodeQueryValue(value$1)];values.forEach(value$2=>{value$2!==void 0&&(search$1+=(search$1.length?`&`:``)+key$2,value$2!=null&&(search$1+=`=`+value$2))})}return search$1}function normalizeQuery(query){let normalizedQuery={};for(let key$2 in query){let value$1=query[key$2];value$1!==void 0&&(normalizedQuery[key$2]=isArray$3(value$1)?value$1.map(v=>v==null?null:``+v):value$1==null?value$1:``+value$1)}return normalizedQuery}const matchedRouteKey=Symbol(``),viewDepthKey=Symbol(``),routerKey=Symbol(``),routeLocationKey=Symbol(``),routerViewLocationKey=Symbol(``);function useCallbacks(){let handlers$3=[];function add$1(handler){return handlers$3.push(handler),()=>{let i=handlers$3.indexOf(handler);i>-1&&handlers$3.splice(i,1)}}function reset(){handlers$3=[]}return{add:add$1,list:()=>handlers$3.slice(),reset}}function guardToPromiseFn(guard,to$1,from,record,name$2,runWithContext=fn$5=>fn$5()){let enterCallbackArray=record&&(record.enterCallbacks[name$2]=record.enterCallbacks[name$2]||[]);return()=>new Promise((resolve$1,reject)=>{let next=valid$1=>{valid$1===!1?reject(createRouterError(4,{from,to:to$1})):valid$1 instanceof Error?reject(valid$1):isRouteLocation(valid$1)?reject(createRouterError(2,{from:to$1,to:valid$1})):(enterCallbackArray&&record.enterCallbacks[name$2]===enterCallbackArray&&typeof valid$1==`function`&&enterCallbackArray.push(valid$1),resolve$1())},guardReturn=runWithContext(()=>guard.call(record&&record.instances[name$2],to$1,from,next)),guardCall=Promise.resolve(guardReturn);guard.length<3&&(guardCall=guardCall.then(next)),guardCall.catch(err=>reject(err))})}function extractComponentsGuards(matched,guardType,to$1,from,runWithContext=fn$5=>fn$5()){let guards=[];for(let record of matched)for(let name$2 in record.components){let rawComponent=record.components[name$2];if(guardType!==`beforeRouteEnter`&&!record.instances[name$2])continue;if(isRouteComponent(rawComponent)){let options$1=rawComponent.__vccOpts||rawComponent,guard=options$1[guardType];guard&&guards.push(guardToPromiseFn(guard,to$1,from,record,name$2,runWithContext))}else{let componentPromise=rawComponent();guards.push(()=>componentPromise.then(resolved=>{if(!resolved)throw Error(`Couldn't resolve component "${name$2}" at "${record.path}"`);let resolvedComponent=isESModule(resolved)?resolved.default:resolved;record.mods[name$2]=resolved,record.components[name$2]=resolvedComponent;let options$1=resolvedComponent.__vccOpts||resolvedComponent,guard=options$1[guardType];return guard&&guardToPromiseFn(guard,to$1,from,record,name$2,runWithContext)()}))}}return guards}function useLink(props){let router$1=inject(routerKey),currentRoute=inject(routeLocationKey),route=computed(()=>{let to$1=unref(props.to);return router$1.resolve(to$1)}),activeRecordIndex=computed(()=>{let{matched}=route.value,{length}=matched,routeMatched=matched[length-1],currentMatched=currentRoute.matched;if(!routeMatched||!currentMatched.length)return-1;let index$1=currentMatched.findIndex(isSameRouteRecord.bind(null,routeMatched));if(index$1>-1)return index$1;let parentRecordPath=getOriginalPath(matched[length-2]);return length>1&&getOriginalPath(routeMatched)===parentRecordPath&¤tMatched[currentMatched.length-1].path!==parentRecordPath?currentMatched.findIndex(isSameRouteRecord.bind(null,matched[length-2])):index$1}),isActive=computed(()=>activeRecordIndex.value>-1&&includesParams(currentRoute.params,route.value.params)),isExactActive=computed(()=>activeRecordIndex.value>-1&&activeRecordIndex.value===currentRoute.matched.length-1&&isSameRouteLocationParams(currentRoute.params,route.value.params));function navigate(e$4={}){if(guardEvent(e$4)){let p$4=router$1[unref(props.replace)?`replace`:`push`](unref(props.to)).catch(noop$1);return props.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>p$4),p$4}return Promise.resolve()}return{route,href:computed(()=>route.value.href),isActive,isExactActive,navigate}}function preferSingleVNode(vnodes){return vnodes.length===1?vnodes[0]:vnodes}const RouterLinkImpl=defineComponent({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,setup(props,{slots}){let link$1=reactive(useLink(props)),{options:options$1}=inject(routerKey),elClass=computed(()=>({[getLinkClass(props.activeClass,options$1.linkActiveClass,`router-link-active`)]:link$1.isActive,[getLinkClass(props.exactActiveClass,options$1.linkExactActiveClass,`router-link-exact-active`)]:link$1.isExactActive}));return()=>{let children=slots.default&&preferSingleVNode(slots.default(link$1));return props.custom?children:h(`a`,{"aria-current":link$1.isExactActive?props.ariaCurrentValue:null,href:link$1.href,onClick:link$1.navigate,class:elClass.value},children)}}}),RouterLink=RouterLinkImpl;function guardEvent(e$4){if(!(e$4.metaKey||e$4.altKey||e$4.ctrlKey||e$4.shiftKey)&&!e$4.defaultPrevented&&!(e$4.button!==void 0&&e$4.button!==0)){if(e$4.currentTarget&&e$4.currentTarget.getAttribute){let target$1=e$4.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(target$1))return}return e$4.preventDefault&&e$4.preventDefault(),!0}}function includesParams(outer,inner){for(let key$2 in inner){let innerValue=inner[key$2],outerValue=outer[key$2];if(typeof innerValue==`string`){if(innerValue!==outerValue)return!1}else if(!isArray$3(outerValue)||outerValue.length!==innerValue.length||innerValue.some((value$1,i)=>value$1!==outerValue[i]))return!1}return!0}function getOriginalPath(record){return record?record.aliasOf?record.aliasOf.path:record.path:``}const getLinkClass=(propClass,globalClass,defaultClass)=>propClass??globalClass??defaultClass,RouterViewImpl=defineComponent({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(props,{attrs,slots}){let injectedRoute=inject(routerViewLocationKey),routeToDisplay=computed(()=>props.route||injectedRoute.value),injectedDepth=inject(viewDepthKey,0),depth=computed(()=>{let initialDepth=unref(injectedDepth),{matched}=routeToDisplay.value,matchedRoute;for(;(matchedRoute=matched[initialDepth])&&!matchedRoute.components;)initialDepth++;return initialDepth}),matchedRouteRef=computed(()=>routeToDisplay.value.matched[depth.value]);provide(viewDepthKey,computed(()=>depth.value+1)),provide(matchedRouteKey,matchedRouteRef),provide(routerViewLocationKey,routeToDisplay);let viewRef=ref();return watch(()=>[viewRef.value,matchedRouteRef.value,props.name],([instance,to$1,name$2],[oldInstance,from,oldName])=>{to$1&&(to$1.instances[name$2]=instance,from&&from!==to$1&&instance&&instance===oldInstance&&(to$1.leaveGuards.size||(to$1.leaveGuards=from.leaveGuards),to$1.updateGuards.size||(to$1.updateGuards=from.updateGuards))),instance&&to$1&&(!from||!isSameRouteRecord(to$1,from)||!oldInstance)&&(to$1.enterCallbacks[name$2]||[]).forEach(callback=>callback(instance))},{flush:`post`}),()=>{let route=routeToDisplay.value,currentName=props.name,matchedRoute=matchedRouteRef.value,ViewComponent=matchedRoute&&matchedRoute.components[currentName];if(!ViewComponent)return normalizeSlot(slots.default,{Component:ViewComponent,route});let routePropsOption=matchedRoute.props[currentName],routeProps=routePropsOption?routePropsOption===!0?route.params:typeof routePropsOption==`function`?routePropsOption(route):routePropsOption:null,onVnodeUnmounted=vnode=>{vnode.component.isUnmounted&&(matchedRoute.instances[currentName]=null)},component=h(ViewComponent,assign$1({},routeProps,attrs,{onVnodeUnmounted,ref:viewRef}));return normalizeSlot(slots.default,{Component:component,route})||component}}});function normalizeSlot(slot,data$12){if(!slot)return null;let slotContent=slot(data$12);return slotContent.length===1?slotContent[0]:slotContent}const RouterView=RouterViewImpl;function createRouter(options$1){let matcher=createRouterMatcher(options$1.routes,options$1),parseQuery$1=options$1.parseQuery||parseQuery,stringifyQuery$1=options$1.stringifyQuery||stringifyQuery,routerHistory=options$1.history,beforeGuards=useCallbacks(),beforeResolveGuards=useCallbacks(),afterGuards=useCallbacks(),currentRoute=shallowRef(START_LOCATION_NORMALIZED),pendingLocation=START_LOCATION_NORMALIZED;isBrowser$2&&options$1.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let normalizeParams$1=applyToParams.bind(null,paramValue=>``+paramValue),encodeParams=applyToParams.bind(null,encodeParam),decodeParams=applyToParams.bind(null,decode$1);function addRoute(parentOrRoute,route){let parent,record;return isRouteName(parentOrRoute)?(parent=matcher.getRecordMatcher(parentOrRoute),record=route):record=parentOrRoute,matcher.addRoute(record,parent)}function removeRoute(name$2){let recordMatcher=matcher.getRecordMatcher(name$2);recordMatcher&&matcher.removeRoute(recordMatcher)}function getRoutes(){return matcher.getRoutes().map(routeMatcher=>routeMatcher.record)}function hasRoute(name$2){return!!matcher.getRecordMatcher(name$2)}function resolve$1(rawLocation,currentLocation){if(currentLocation=assign$1({},currentLocation||currentRoute.value),typeof rawLocation==`string`){let locationNormalized=parseURL(parseQuery$1,rawLocation,currentLocation.path),matchedRoute$1=matcher.resolve({path:locationNormalized.path},currentLocation),href$1=routerHistory.createHref(locationNormalized.fullPath);return assign$1(locationNormalized,matchedRoute$1,{params:decodeParams(matchedRoute$1.params),hash:decode$1(locationNormalized.hash),redirectedFrom:void 0,href:href$1})}let matcherLocation;if(rawLocation.path!=null)matcherLocation=assign$1({},rawLocation,{path:parseURL(parseQuery$1,rawLocation.path,currentLocation.path).path});else{let targetParams=assign$1({},rawLocation.params);for(let key$2 in targetParams)targetParams[key$2]??delete targetParams[key$2];matcherLocation=assign$1({},rawLocation,{params:encodeParams(targetParams)}),currentLocation.params=encodeParams(currentLocation.params)}let matchedRoute=matcher.resolve(matcherLocation,currentLocation),hash=rawLocation.hash||``;matchedRoute.params=normalizeParams$1(decodeParams(matchedRoute.params));let fullPath=stringifyURL(stringifyQuery$1,assign$1({},rawLocation,{hash:encodeHash(hash),path:matchedRoute.path})),href=routerHistory.createHref(fullPath);return assign$1({fullPath,hash,query:stringifyQuery$1===stringifyQuery?normalizeQuery(rawLocation.query):rawLocation.query||{}},matchedRoute,{redirectedFrom:void 0,href})}function locationAsObject(to$1){return typeof to$1==`string`?parseURL(parseQuery$1,to$1,currentRoute.value.path):assign$1({},to$1)}function checkCanceledNavigation(to$1,from){if(pendingLocation!==to$1)return createRouterError(8,{from,to:to$1})}function push$1(to$1){return pushWithRedirect(to$1)}function replace(to$1){return push$1(assign$1(locationAsObject(to$1),{replace:!0}))}function handleRedirectRecord(to$1){let lastMatched=to$1.matched[to$1.matched.length-1];if(lastMatched&&lastMatched.redirect){let{redirect}=lastMatched,newTargetLocation=typeof redirect==`function`?redirect(to$1):redirect;return typeof newTargetLocation==`string`&&(newTargetLocation=newTargetLocation.includes(`?`)||newTargetLocation.includes(`#`)?newTargetLocation=locationAsObject(newTargetLocation):{path:newTargetLocation},newTargetLocation.params={}),assign$1({query:to$1.query,hash:to$1.hash,params:newTargetLocation.path==null?to$1.params:{}},newTargetLocation)}}function pushWithRedirect(to$1,redirectedFrom){let targetLocation=pendingLocation=resolve$1(to$1),from=currentRoute.value,data$12=to$1.state,force=to$1.force,replace$1=to$1.replace===!0,shouldRedirect=handleRedirectRecord(targetLocation);if(shouldRedirect)return pushWithRedirect(assign$1(locationAsObject(shouldRedirect),{state:typeof shouldRedirect==`object`?assign$1({},data$12,shouldRedirect.state):data$12,force,replace:replace$1}),redirectedFrom||targetLocation);let toLocation=targetLocation;toLocation.redirectedFrom=redirectedFrom;let failure;return!force&&isSameRouteLocation(stringifyQuery$1,from,targetLocation)&&(failure=createRouterError(16,{to:toLocation,from}),handleScroll(from,from,!0,!1)),(failure?Promise.resolve(failure):navigate(toLocation,from)).catch(error=>isNavigationFailure(error)?isNavigationFailure(error,2)?error:markAsReady(error):triggerError(error,toLocation,from)).then(failure$1=>{if(failure$1){if(isNavigationFailure(failure$1,2))return pushWithRedirect(assign$1({replace:replace$1},locationAsObject(failure$1.to),{state:typeof failure$1.to==`object`?assign$1({},data$12,failure$1.to.state):data$12,force}),redirectedFrom||toLocation)}else failure$1=finalizeNavigation(toLocation,from,!0,replace$1,data$12);return triggerAfterEach(toLocation,from,failure$1),failure$1})}function checkCanceledNavigationAndReject(to$1,from){let error=checkCanceledNavigation(to$1,from);return error?Promise.reject(error):Promise.resolve()}function runWithContext(fn$5){let app=installedApps.values().next().value;return app&&typeof app.runWithContext==`function`?app.runWithContext(fn$5):fn$5()}function navigate(to$1,from){let guards,[leavingRecords,updatingRecords,enteringRecords]=extractChangingRecords(to$1,from);guards=extractComponentsGuards(leavingRecords.reverse(),`beforeRouteLeave`,to$1,from);for(let record of leavingRecords)record.leaveGuards.forEach(guard=>{guards.push(guardToPromiseFn(guard,to$1,from))});let canceledNavigationCheck=checkCanceledNavigationAndReject.bind(null,to$1,from);return guards.push(canceledNavigationCheck),runGuardQueue(guards).then(()=>{guards=[];for(let guard of beforeGuards.list())guards.push(guardToPromiseFn(guard,to$1,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>{guards=extractComponentsGuards(updatingRecords,`beforeRouteUpdate`,to$1,from);for(let record of updatingRecords)record.updateGuards.forEach(guard=>{guards.push(guardToPromiseFn(guard,to$1,from))});return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>{guards=[];for(let record of enteringRecords)if(record.beforeEnter)if(isArray$3(record.beforeEnter))for(let beforeEnter of record.beforeEnter)guards.push(guardToPromiseFn(beforeEnter,to$1,from));else guards.push(guardToPromiseFn(record.beforeEnter,to$1,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).then(()=>(to$1.matched.forEach(record=>record.enterCallbacks={}),guards=extractComponentsGuards(enteringRecords,`beforeRouteEnter`,to$1,from,runWithContext),guards.push(canceledNavigationCheck),runGuardQueue(guards))).then(()=>{guards=[];for(let guard of beforeResolveGuards.list())guards.push(guardToPromiseFn(guard,to$1,from));return guards.push(canceledNavigationCheck),runGuardQueue(guards)}).catch(err=>isNavigationFailure(err,8)?err:Promise.reject(err))}function triggerAfterEach(to$1,from,failure){afterGuards.list().forEach(guard=>runWithContext(()=>guard(to$1,from,failure)))}function finalizeNavigation(toLocation,from,isPush,replace$1,data$12){let error=checkCanceledNavigation(toLocation,from);if(error)return error;let isFirstNavigation=from===START_LOCATION_NORMALIZED,state=isBrowser$2?history.state:{};isPush&&(replace$1||isFirstNavigation?routerHistory.replace(toLocation.fullPath,assign$1({scroll:isFirstNavigation&&state&&state.scroll},data$12)):routerHistory.push(toLocation.fullPath,data$12)),currentRoute.value=toLocation,handleScroll(toLocation,from,isPush,isFirstNavigation),markAsReady()}let removeHistoryListener;function setupListeners(){removeHistoryListener||=routerHistory.listen((to$1,_from,info)=>{if(!router$1.listening)return;let toLocation=resolve$1(to$1),shouldRedirect=handleRedirectRecord(toLocation);if(shouldRedirect){pushWithRedirect(assign$1(shouldRedirect,{replace:!0,force:!0}),toLocation).catch(noop$1);return}pendingLocation=toLocation;let from=currentRoute.value;isBrowser$2&&saveScrollPosition(getScrollKey(from.fullPath,info.delta),computeScrollPosition()),navigate(toLocation,from).catch(error=>isNavigationFailure(error,12)?error:isNavigationFailure(error,2)?(pushWithRedirect(assign$1(locationAsObject(error.to),{force:!0}),toLocation).then(failure=>{isNavigationFailure(failure,20)&&!info.delta&&info.type===NavigationType.pop&&routerHistory.go(-1,!1)}).catch(noop$1),Promise.reject()):(info.delta&&routerHistory.go(-info.delta,!1),triggerError(error,toLocation,from))).then(failure=>{failure||=finalizeNavigation(toLocation,from,!1),failure&&(info.delta&&!isNavigationFailure(failure,8)?routerHistory.go(-info.delta,!1):info.type===NavigationType.pop&&isNavigationFailure(failure,20)&&routerHistory.go(-1,!1)),triggerAfterEach(toLocation,from,failure)}).catch(noop$1)})}let readyHandlers=useCallbacks(),errorListeners=useCallbacks(),ready;function triggerError(error,to$1,from){markAsReady(error);let list$2=errorListeners.list();return list$2.length?list$2.forEach(handler=>handler(error,to$1,from)):console.error(error),Promise.reject(error)}function isReady(){return ready&¤tRoute.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((resolve$2,reject)=>{readyHandlers.add([resolve$2,reject])})}function markAsReady(err){return ready||(ready=!err,setupListeners(),readyHandlers.list().forEach(([resolve$2,reject])=>err?reject(err):resolve$2()),readyHandlers.reset()),err}function handleScroll(to$1,from,isPush,isFirstNavigation){let{scrollBehavior}=options$1;if(!isBrowser$2||!scrollBehavior)return Promise.resolve();let scrollPosition=!isPush&&getSavedScrollPosition(getScrollKey(to$1.fullPath,0))||(isFirstNavigation||!isPush)&&history.state&&history.state.scroll||null;return nextTick().then(()=>scrollBehavior(to$1,from,scrollPosition)).then(position$2=>position$2&&scrollToPosition(position$2)).catch(err=>triggerError(err,to$1,from))}let go=delta=>routerHistory.go(delta),started,installedApps=new Set,router$1={currentRoute,listening:!0,addRoute,removeRoute,clearRoutes:matcher.clearRoutes,hasRoute,getRoutes,resolve:resolve$1,options:options$1,push:push$1,replace,go,back:()=>go(-1),forward:()=>go(1),beforeEach:beforeGuards.add,beforeResolve:beforeResolveGuards.add,afterEach:afterGuards.add,onError:errorListeners.add,isReady,install(app){let router$2=this;app.component(`RouterLink`,RouterLink),app.component(`RouterView`,RouterView),app.config.globalProperties.$router=router$2,Object.defineProperty(app.config.globalProperties,`$route`,{enumerable:!0,get:()=>unref(currentRoute)}),isBrowser$2&&!started&¤tRoute.value===START_LOCATION_NORMALIZED&&(started=!0,push$1(routerHistory.location).catch(err=>{}));let reactiveRoute={};for(let key$2 in START_LOCATION_NORMALIZED)Object.defineProperty(reactiveRoute,key$2,{get:()=>currentRoute.value[key$2],enumerable:!0});app.provide(routerKey,router$2),app.provide(routeLocationKey,shallowReactive(reactiveRoute)),app.provide(routerViewLocationKey,currentRoute);let unmountApp=app.unmount;installedApps.add(app),app.unmount=function(){installedApps.delete(app),installedApps.size<1&&(pendingLocation=START_LOCATION_NORMALIZED,removeHistoryListener&&removeHistoryListener(),removeHistoryListener=null,currentRoute.value=START_LOCATION_NORMALIZED,started=!1,ready=!1),unmountApp()}}};function runGuardQueue(guards){return guards.reduce((promise,guard)=>promise.then(()=>runWithContext(guard)),Promise.resolve())}return router$1}function extractChangingRecords(to$1,from){let leavingRecords=[],updatingRecords=[],enteringRecords=[],len=Math.max(from.matched.length,to$1.matched.length);for(let i=0;iisSameRouteRecord(record,recordFrom))?updatingRecords.push(recordFrom):leavingRecords.push(recordFrom));let recordTo=to$1.matched[i];recordTo&&(from.matched.find(record=>isSameRouteRecord(record,recordTo))||enteringRecords.push(recordTo))}return[leavingRecords,updatingRecords,enteringRecords]}function useRouter(){return inject(routerKey)}function useRoute(_name){return inject(routeLocationKey)}const routes=[{path:`/`,name:`IndexScenePage`,component:()=>__vitePreload(()=>import(`./pages-CsEDt6j8.js`),__vite__mapDeps([5,6,1,2,7,8,9,10,11,12,4])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}},{path:`/:all(.*)`,name:`/[...all]`,component:()=>__vitePreload(()=>import(`./_...all_-Cod6qNfE.js`),[])},{path:`/audio`,name:`/audio`,component:()=>__vitePreload(()=>import(`./audio-C8SmZBs_.js`),[])},{path:`/devtools`,children:[{path:`audio-record`,name:`/devtools/audio-record`,component:()=>__vitePreload(()=>import(`./audio-record-Dm-nsCuP.js`),[])},{path:`background-gradient-blending`,name:`/devtools/background-gradient-blending`,component:()=>__vitePreload(()=>import(`./background-gradient-blending-BFp2Vmjq.js`),__vite__mapDeps([13,4,14,15]))},{path:`background-remove`,name:`/devtools/background-remove`,component:()=>__vitePreload(()=>import(`./background-remove-D40tSYmj.js`),__vite__mapDeps([16,17,18]))},{path:`chat`,name:`/devtools/chat`,component:()=>__vitePreload(()=>import(`./chat-BpPMC4QJ.js`),[])},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>__vitePreload(()=>import(`./gesture-circle-DTzEVNvY.js`),__vite__mapDeps([19,12])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>__vitePreload(()=>import(`./image-D_-1HjPP.js`),__vite__mapDeps([20,21]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>__vitePreload(()=>import(`./polaroid-D5obYKPu.js`),__vite__mapDeps([22,7,8,9]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>__vitePreload(()=>import(`./vibrant-BT2fm70_.js`),__vite__mapDeps([23,14,18]))}]},{path:`/queue`,name:`/queue`,component:()=>__vitePreload(()=>import(`./queue-CVzHeHkm.js`),[])},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>__vitePreload(()=>import(`./settings-QwpRJEhc.js`),__vite__mapDeps([24,12,25])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`airi-card`,children:[{path:``,name:`/settings/airi-card/`,component:()=>__vitePreload(()=>import(`./airi-card-Q3k0tIwN.js`),__vite__mapDeps([26,12,27,28,29,30,31,32,33,18])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`components`,children:[{path:`CardCreate`,name:`/settings/airi-card/components/CardCreate`,component:()=>__vitePreload(()=>import(`./CardCreate-mWaFTW4v.js`),__vite__mapDeps([34,27]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>__vitePreload(()=>import(`./CardCreationDialog-qGwMbPGi.js`),__vite__mapDeps([35,28,29,30]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>__vitePreload(()=>import(`./CardDetailDialog-B-AcpLM4.js`),__vite__mapDeps([36,31,32,29]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>__vitePreload(()=>import(`./CardListItem-DDliOhdn.js`),__vite__mapDeps([37,33]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>__vitePreload(()=>import(`./DeleteCardDialog-BdkMZt0z.js`),__vite__mapDeps([38,32,29]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>__vitePreload(()=>import(`./appearance-Be6MT6gl.js`),__vite__mapDeps([39,12])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`color-scheme`,name:`/settings/appearance/color-scheme`,component:()=>__vitePreload(()=>import(`./color-scheme-CvisfZEM.js`),__vite__mapDeps([40,12,41])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>__vitePreload(()=>import(`./developer-50jFEq_D.js`),__vite__mapDeps([42,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>__vitePreload(()=>import(`./general-yjkLwtKb.js`),__vite__mapDeps([43,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>__vitePreload(()=>import(`./memory-ChG-vOFt.js`),__vite__mapDeps([44,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>__vitePreload(()=>import(`./models-Cr3L9UFF.js`),__vite__mapDeps([45,12,25,46,7,8,9,14])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]},{path:`modules`,children:[{path:``,name:`/settings/modules/`,component:()=>__vitePreload(()=>import(`./modules-BEoGi95f.js`),__vite__mapDeps([47,12,25,46])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`consciousness`,name:`/settings/modules/consciousness`,component:()=>__vitePreload(()=>import(`./consciousness-D-yG2Hnx.js`),__vite__mapDeps([48,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`hearing`,name:`/settings/modules/hearing`,component:()=>__vitePreload(()=>import(`./hearing-HxzT9Wif.js`),__vite__mapDeps([49,12,17])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-long-term`,name:`/settings/modules/memory-long-term`,component:()=>__vitePreload(()=>import(`./memory-long-term-Cd4DfbOC.js`),__vite__mapDeps([50,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-short-term`,name:`/settings/modules/memory-short-term`,component:()=>__vitePreload(()=>import(`./memory-short-term-By6tGgIb.js`),__vite__mapDeps([51,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>__vitePreload(()=>import(`./speech-BkDk1gxm.js`),__vite__mapDeps([52,12,10,53])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>__vitePreload(()=>import(`./providers-BPXI6kVS.js`),__vite__mapDeps([54,12,25,46])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`alibaba-cloud-model-studio`,name:`/settings/providers/alibaba-cloud-model-studio`,component:()=>__vitePreload(()=>import(`./alibaba-cloud-model-studio-3eKy2f7l.js`),__vite__mapDeps([55,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>__vitePreload(()=>import(`./anthropic-BFqros6g.js`),__vite__mapDeps([56,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`azure-ai-foundry`,name:`/settings/providers/azure-ai-foundry`,component:()=>__vitePreload(()=>import(`./azure-ai-foundry-BUoQbmRd.js`),__vite__mapDeps([57,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`cloudflare-workers-ai`,name:`/settings/providers/cloudflare-workers-ai`,component:()=>__vitePreload(()=>import(`./cloudflare-workers-ai-ZTPk31zu.js`),__vite__mapDeps([58,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>__vitePreload(()=>import(`./deepseek-Cqa3r5er.js`),__vite__mapDeps([59,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>__vitePreload(()=>import(`./elevenlabs-qXHu46wy.js`),__vite__mapDeps([60,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>__vitePreload(()=>import(`./featherless-ai-MWKHOxPl.js`),__vite__mapDeps([61,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>__vitePreload(()=>import(`./fireworks-ai-Ba-jqHwG.js`),__vite__mapDeps([62,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`google-generative-ai`,name:`/settings/providers/google-generative-ai`,component:()=>__vitePreload(()=>import(`./google-generative-ai-B99V0T18.js`),__vite__mapDeps([63,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>__vitePreload(()=>import(`./microsoft-speech-CGGcxjek.js`),__vite__mapDeps([64,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>__vitePreload(()=>import(`./mistral-ai-DvCen1CG.js`),__vite__mapDeps([65,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>__vitePreload(()=>import(`./moonshot-ai-CHsJXWmE.js`),__vite__mapDeps([66,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>__vitePreload(()=>import(`./novita-ai-DnXfEx2N.js`),__vite__mapDeps([67,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>__vitePreload(()=>import(`./ollama-BVrnvhnT.js`),__vite__mapDeps([68,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>__vitePreload(()=>import(`./openai-CQDdOtKc.js`),__vite__mapDeps([69,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>__vitePreload(()=>import(`./openai-audio-speech-yymAjo1X.js`),__vite__mapDeps([70,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>__vitePreload(()=>import(`./openai-audio-transcription-irFP0VIY.js`),__vite__mapDeps([71,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>__vitePreload(()=>import(`./openrouter-ai--dshV5bL.js`),__vite__mapDeps([72,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2`,name:`/settings/providers/player2`,component:()=>__vitePreload(()=>import(`./player2-D8_1xZL8.js`),__vite__mapDeps([73,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-speech`,name:`/settings/providers/player2-speech`,component:()=>__vitePreload(()=>import(`./player2-speech-3AR5_77E.js`),__vite__mapDeps([74,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>__vitePreload(()=>import(`./together-ai-CQqUN16J.js`),__vite__mapDeps([75,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>__vitePreload(()=>import(`./volcengine-Br1b00Sw.js`),__vite__mapDeps([76,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>__vitePreload(()=>import(`./xai-a3vK2rb5.js`),__vite__mapDeps([77,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>__vitePreload(()=>import(`./scene-B0dmKhyc.js`),__vite__mapDeps([78,12,25,46])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`StageScenePage`,component:()=>__vitePreload(()=>import(`./stage-D8eUtIds.js`),__vite__mapDeps([79,6,1,2,7,8,9,10,11,12,4])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}}]},{path:`/test`,children:[{path:`filter-message`,name:`/test/filter-message`,component:()=>__vitePreload(()=>import(`./filter-message-C0Hk6aB0.js`),__vite__mapDeps([80,10,53]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>__vitePreload(()=>import(`./delays-DIhxEe_R.js`),__vite__mapDeps([81,10,53]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>__vitePreload(()=>import(`./emotions-De0hw4UU.js`),__vite__mapDeps([82,10,53]))},{path:`messages`,name:`/test/queues/messages`,component:()=>__vitePreload(()=>import(`./messages-D_H5Gb5B.js`),__vite__mapDeps([83,10,53]))}]}]}],closed=`0px`;var TransitionVertical_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TransitionVertical`,props:{duration:{default:250},easingEnter:{default:`ease-in-out`},easingLeave:{default:`ease-in-out`},opacityClosed:{default:0},opacityOpened:{default:1}},setup(__props){let props=__props;function getElementStyle(element$3){return{height:element$3.style.height,width:element$3.style.width,position:element$3.style.position,visibility:element$3.style.visibility,overflow:element$3.style.overflow,paddingTop:element$3.style.paddingTop,paddingBottom:element$3.style.paddingBottom,borderTopWidth:element$3.style.borderTopWidth,borderBottomWidth:element$3.style.borderBottomWidth,marginTop:element$3.style.marginTop,marginBottom:element$3.style.marginBottom}}function prepareElement(element$3,initialStyle){let{width}=getComputedStyle(element$3);element$3.style.width=width,element$3.style.position=`absolute`,element$3.style.visibility=`hidden`,element$3.style.height=``;let{height}=getComputedStyle(element$3);return element$3.style.width=initialStyle.width,element$3.style.position=initialStyle.position,element$3.style.visibility=initialStyle.visibility,element$3.style.height=closed,element$3.style.overflow=`hidden`,initialStyle.height&&initialStyle.height!==closed?initialStyle.height:height}function animateTransition(element$3,initialStyle,done,keyframes$4,options$1){let animation=element$3.animate(keyframes$4,options$1);element$3.style.height=initialStyle.height,animation.onfinish=()=>{element$3.style.overflow=initialStyle.overflow,done()}}function getEnterKeyframes(height,initialStyle){return[{height:closed,opacity:props.opacityClosed,paddingTop:closed,paddingBottom:closed,borderTopWidth:closed,borderBottomWidth:closed,marginTop:closed,marginBottom:closed},{height,opacity:props.opacityOpened,paddingTop:initialStyle.paddingTop,paddingBottom:initialStyle.paddingBottom,borderTopWidth:initialStyle.borderTopWidth,borderBottomWidth:initialStyle.borderBottomWidth,marginTop:initialStyle.marginTop,marginBottom:initialStyle.marginBottom}]}function enterTransition(element$3,done){let HTMLElement$1=element$3,initialStyle=getElementStyle(HTMLElement$1),height=prepareElement(HTMLElement$1,initialStyle),keyframes$4=getEnterKeyframes(height,initialStyle),options$1={duration:props.duration,easing:props.easingEnter};animateTransition(HTMLElement$1,initialStyle,done,keyframes$4,options$1)}function leaveTransition(element$3,done){let HTMLElement$1=element$3,initialStyle=getElementStyle(HTMLElement$1),{height}=getComputedStyle(HTMLElement$1);HTMLElement$1.style.height=height,HTMLElement$1.style.overflow=`hidden`;let keyframes$4=getEnterKeyframes(height,initialStyle).reverse(),options$1={duration:props.duration,easing:props.easingLeave};animateTransition(HTMLElement$1,initialStyle,done,keyframes$4,options$1)}return(_ctx,_cache$1)=>(openBlock(),createBlock(Transition,{css:!1,onEnter:enterTransition,onLeave:leaveTransition},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3}))}}),TransitionVertical_default=TransitionVertical_vue_vue_type_script_setup_true_lang_default;function serialize$1(o){return typeof o==`string`?`'${o}'`:new c$1().serialize(o)}const c$1=function(){class o{#t=new Map;compare(t$1,r$1){let e$4=typeof t$1,n=typeof r$1;return e$4===`string`&&n===`string`?t$1.localeCompare(r$1):e$4===`number`&&n===`number`?t$1-r$1:String.prototype.localeCompare.call(this.serialize(t$1,!0),this.serialize(r$1,!0))}serialize(t$1,r$1){if(t$1===null)return`null`;switch(typeof t$1){case`string`:return r$1?t$1:`'${t$1}'`;case`bigint`:return`${t$1}n`;case`object`:return this.$object(t$1);case`function`:return this.$function(t$1)}return String(t$1)}serializeObject(t$1){let r$1=Object.prototype.toString.call(t$1);if(r$1!==`[object Object]`)return this.serializeBuiltInType(r$1.length<10?`unknown:${r$1}`:r$1.slice(8,-1),t$1);let e$4=t$1.constructor,n=e$4===Object||e$4===void 0?``:e$4.name;if(n!==``&&globalThis[n]===e$4)return this.serializeBuiltInType(n,t$1);if(typeof t$1.toJSON==`function`){let i=t$1.toJSON();return n+(typeof i==`object`&&i?this.$object(i):`(${this.serialize(i)})`)}return this.serializeObjectEntries(n,Object.entries(t$1))}serializeBuiltInType(t$1,r$1){let e$4=this[`$`+t$1];if(e$4)return e$4.call(this,r$1);if(typeof r$1?.entries==`function`)return this.serializeObjectEntries(t$1,r$1.entries());throw Error(`Cannot serialize ${t$1}`)}serializeObjectEntries(t$1,r$1){let e$4=Array.from(r$1).sort((i,a$1)=>this.compare(i[0],a$1[0])),n=`${t$1}{`;for(let i=0;ithis.compare(r$1,e$4)))}`}$Map(t$1){return this.serializeObjectEntries(`Map`,t$1.entries())}}for(let s of[`Error`,`RegExp`,`URL`])o.prototype[`$`+s]=function(t$1){return`${s}(${t$1})`};for(let s of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])o.prototype[`$`+s]=function(t$1){return`${s}[${t$1.join(`,`)}]`};for(let s of[`BigInt64Array`,`BigUint64Array`])o.prototype[`$`+s]=function(t$1){return`${s}[${t$1.join(`n,`)}${t$1.length>0?`n`:``}]`};return o}();function isEqual(object1,object2){return object1===object2||serialize$1(object1)===serialize$1(object2)}function findValuesBetween(array$1,start,end){let startIndex=array$1.findIndex(i=>isEqual(i,start)),endIndex=array$1.findIndex(i=>isEqual(i,end));if(startIndex===-1||endIndex===-1)return[];let[minIndex,maxIndex]=[startIndex,endIndex].sort((a$1,b$1)=>a$1-b$1);return array$1.slice(minIndex,maxIndex+1)}function createContext(providerComponentName,contextName){let symbolDescription=typeof providerComponentName==`string`&&!contextName?`${providerComponentName}Context`:contextName,injectionKey=Symbol(symbolDescription),injectContext=fallback=>{let context$1=inject(injectionKey,fallback);if(context$1||context$1===null)return context$1;throw Error(`Injection \`${injectionKey.toString()}\` not found. Component must be used within ${Array.isArray(providerComponentName)?`one of the following components: ${providerComponentName.join(`, `)}`:`\`${providerComponentName}\``}`)},provideContext=contextValue=>(provide(injectionKey,contextValue),contextValue);return[injectContext,provideContext]}function getActiveElement(){let activeElement=document.activeElement;if(activeElement==null)return null;for(;activeElement!=null&&activeElement.shadowRoot!=null&&activeElement.shadowRoot.activeElement!=null;)activeElement=activeElement.shadowRoot.activeElement;return activeElement}function handleAndDispatchCustomEvent(name$2,handler,detail){let target$1=detail.originalEvent.target,event=new CustomEvent(name$2,{bubbles:!1,cancelable:!0,detail});handler&&target$1.addEventListener(name$2,handler,{once:!0}),target$1.dispatchEvent(event)}function renderSlotFragments(children){return children?children.flatMap(child=>child.type===Fragment?renderSlotFragments(child.children):[child]):[]}const[injectConfigProviderContext,provideConfigProviderContext]=createContext(`ConfigProvider`),useBodyLockStackCount=createSharedComposable(()=>{let map=ref(new Map),initialOverflow=ref(),locked=computed(()=>{for(let value$1 of map.value.values())if(value$1)return!0;return!1}),context$1=injectConfigProviderContext({scrollBody:ref(!0)}),stopTouchMoveListener=null,resetBodyStyle=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=initialOverflow.value??``,isIOS&&stopTouchMoveListener?.(),initialOverflow.value=void 0};return watch(locked,(val,oldVal)=>{if(!isClient$1)return;if(!val){oldVal&&resetBodyStyle();return}initialOverflow.value===void 0&&(initialOverflow.value=document.body.style.overflow);let verticalScrollbarWidth=window.innerWidth-document.documentElement.clientWidth,defaultConfig={padding:verticalScrollbarWidth,margin:0},config$1=context$1.scrollBody?.value?typeof context$1.scrollBody.value==`object`?defu({padding:context$1.scrollBody.value.padding===!0?verticalScrollbarWidth:context$1.scrollBody.value.padding,margin:context$1.scrollBody.value.margin===!0?verticalScrollbarWidth:context$1.scrollBody.value.margin},defaultConfig):defaultConfig:{padding:0,margin:0};verticalScrollbarWidth>0&&(document.body.style.paddingRight=typeof config$1.padding==`number`?`${config$1.padding}px`:String(config$1.padding),document.body.style.marginRight=typeof config$1.margin==`number`?`${config$1.margin}px`:String(config$1.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${verticalScrollbarWidth}px`),document.body.style.overflow=`hidden`),isIOS&&(stopTouchMoveListener=useEventListener$1(document,`touchmove`,e$4=>preventDefault(e$4),{passive:!1})),nextTick(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),map});function useBodyScrollLock(initialState){let id=Math.random().toString(36).substring(2,7),map=useBodyLockStackCount();map.value.set(id,initialState??!1);let locked=computed({get:()=>map.value.get(id)??!1,set:value$1=>map.value.set(id,value$1)});return tryOnBeforeUnmount(()=>{map.value.delete(id)}),locked}function checkOverflowScroll(ele){let style=window.getComputedStyle(ele);if(style.overflowX===`scroll`||style.overflowY===`scroll`||style.overflowX===`auto`&&ele.clientWidth1?!0:(e$4.preventDefault&&e$4.cancelable&&e$4.preventDefault(),!1)}function useDirection(dir){let context$1=injectConfigProviderContext({dir:ref(`ltr`)});return computed(()=>dir?.value||context$1.dir?.value||`ltr`)}function useEmitAsProps(emit$1){let vm=getCurrentInstance(),events=vm?.type.emits,result={};return events?.length||console.warn(`No emitted event found. Please check component: ${vm?.type.__name}`),events?.forEach(ev=>{result[toHandlerKey(camelize(ev))]=(...arg)=>emit$1(ev,...arg)}),result}function useFilter(options$1){let computedOptions=computed(()=>unref(options$1)),collator=computed(()=>new Intl.Collator(`en`,{usage:`search`,...computedOptions.value})),startsWith=(string$4,substring)=>substring.length===0?!0:(string$4=string$4.normalize(`NFC`),substring=substring.normalize(`NFC`),collator.value.compare(string$4.slice(0,substring.length),substring)===0),endsWith=(string$4,substring)=>substring.length===0?!0:(string$4=string$4.normalize(`NFC`),substring=substring.normalize(`NFC`),collator.value.compare(string$4.slice(-substring.length),substring)===0),contains=(string$4,substring)=>{if(substring.length===0)return!0;string$4=string$4.normalize(`NFC`),substring=substring.normalize(`NFC`);let scan=0,sliceLen=substring.length;for(;scan+sliceLen<=string$4.length;scan++){let slice=string$4.slice(scan,scan+sliceLen);if(collator.value.compare(substring,slice)===0)return!0}return!1};return{startsWith,endsWith,contains}}function useFormControl(el){return computed(()=>toValue$2(el)?!!unrefElement$1(el)?.closest(`form`):!0)}function useForwardExpose(){let instance=getCurrentInstance(),currentRef=ref(),currentElement=computed(()=>[`#text`,`#comment`].includes(currentRef.value?.$el.nodeName)?currentRef.value?.$el.nextElementSibling:unrefElement$1(currentRef)),localExpose=Object.assign({},instance.exposed),ret={};for(let key$2 in instance.props)Object.defineProperty(ret,key$2,{enumerable:!0,configurable:!0,get:()=>instance.props[key$2]});if(Object.keys(localExpose).length>0)for(let key$2 in localExpose)Object.defineProperty(ret,key$2,{enumerable:!0,configurable:!0,get:()=>localExpose[key$2]});Object.defineProperty(ret,`$el`,{enumerable:!0,configurable:!0,get:()=>instance.vnode.el}),instance.exposed=ret;function forwardRef(ref$1){currentRef.value=ref$1,ref$1&&(Object.defineProperty(ret,`$el`,{enumerable:!0,configurable:!0,get:()=>ref$1 instanceof Element?ref$1:ref$1.$el}),instance.exposed=ret)}return{forwardRef,currentRef,currentElement}}function useForwardProps(props){let vm=getCurrentInstance(),defaultProps=Object.keys(vm?.type.props??{}).reduce((prev,curr)=>{let defaultValue=(vm?.type.props[curr]).default;return defaultValue!==void 0&&(prev[curr]=defaultValue),prev},{}),refProps=toRef(props);return computed(()=>{let preservedProps={},assignedProps=vm?.vnode.props??{};return Object.keys(assignedProps).forEach(key$2=>{preservedProps[camelize(key$2)]=assignedProps[key$2]}),Object.keys({...defaultProps,...preservedProps}).reduce((prev,curr)=>(refProps.value[curr]!==void 0&&(prev[curr]=refProps.value[curr]),prev),{})})}function useForwardPropsEmits(props,emit$1){let parsedProps=useForwardProps(props),emitsAsProps=emit$1?useEmitAsProps(emit$1):{};return computed(()=>({...parsedProps.value,...emitsAsProps}))}function useGraceArea(triggerElement,containerElement){let isPointerInTransit=refAutoReset(!1,300),pointerGraceArea=ref(null),pointerExit=createEventHook();function handleRemoveGraceArea(){pointerGraceArea.value=null,isPointerInTransit.value=!1}function handleCreateGraceArea(event,hoverTarget){let currentTarget=event.currentTarget,exitPoint={x:event.clientX,y:event.clientY},exitSide=getExitSideFromRect(exitPoint,currentTarget.getBoundingClientRect()),paddedExitPoints=getPaddedExitPoints(exitPoint,exitSide),hoverTargetPoints=getPointsFromRect(hoverTarget.getBoundingClientRect()),graceArea=getHull([...paddedExitPoints,...hoverTargetPoints]);pointerGraceArea.value=graceArea,isPointerInTransit.value=!0}return watchEffect(cleanupFn=>{if(triggerElement.value&&containerElement.value){let handleTriggerLeave=event=>handleCreateGraceArea(event,containerElement.value),handleContentLeave=event=>handleCreateGraceArea(event,triggerElement.value);triggerElement.value.addEventListener(`pointerleave`,handleTriggerLeave),containerElement.value.addEventListener(`pointerleave`,handleContentLeave),cleanupFn(()=>{triggerElement.value?.removeEventListener(`pointerleave`,handleTriggerLeave),containerElement.value?.removeEventListener(`pointerleave`,handleContentLeave)})}}),watchEffect(cleanupFn=>{if(pointerGraceArea.value){let handleTrackPointerGrace=event=>{if(!pointerGraceArea.value||!(event.target instanceof HTMLElement))return;let target$1=event.target,pointerPosition={x:event.clientX,y:event.clientY},hasEnteredTarget=triggerElement.value?.contains(target$1)||containerElement.value?.contains(target$1),isPointerOutsideGraceArea=!isPointInPolygon(pointerPosition,pointerGraceArea.value),isAnotherGraceAreaTrigger=!!target$1.closest(`[data-grace-area-trigger]`);hasEnteredTarget?handleRemoveGraceArea():(isPointerOutsideGraceArea||isAnotherGraceAreaTrigger)&&(handleRemoveGraceArea(),pointerExit.trigger())};triggerElement.value?.ownerDocument.addEventListener(`pointermove`,handleTrackPointerGrace),cleanupFn(()=>triggerElement.value?.ownerDocument.removeEventListener(`pointermove`,handleTrackPointerGrace))}}),{isPointerInTransit,onPointerExit:pointerExit.on}}function getExitSideFromRect(point$3,rect){let top=Math.abs(rect.top-point$3.y),bottom=Math.abs(rect.bottom-point$3.y),right=Math.abs(rect.right-point$3.x),left=Math.abs(rect.left-point$3.x);switch(Math.min(top,bottom,right,left)){case left:return`left`;case right:return`right`;case top:return`top`;case bottom:return`bottom`;default:throw Error(`unreachable`)}}function getPaddedExitPoints(exitPoint,exitSide,padding=5){let paddedExitPoints=[];switch(exitSide){case`top`:paddedExitPoints.push({x:exitPoint.x-padding,y:exitPoint.y+padding},{x:exitPoint.x+padding,y:exitPoint.y+padding});break;case`bottom`:paddedExitPoints.push({x:exitPoint.x-padding,y:exitPoint.y-padding},{x:exitPoint.x+padding,y:exitPoint.y-padding});break;case`left`:paddedExitPoints.push({x:exitPoint.x+padding,y:exitPoint.y-padding},{x:exitPoint.x+padding,y:exitPoint.y+padding});break;case`right`:paddedExitPoints.push({x:exitPoint.x-padding,y:exitPoint.y-padding},{x:exitPoint.x-padding,y:exitPoint.y+padding});break}return paddedExitPoints}function getPointsFromRect(rect){let{top,right,bottom,left}=rect;return[{x:left,y:top},{x:right,y:top},{x:right,y:bottom},{x:left,y:bottom}]}function isPointInPolygon(point$3,polygon){let{x:x$1,y}=point$3,inside=!1;for(let i=0,j$1=polygon.length-1;iy!=yj>y&&x$1<(xj-xi)*(y-yi)/(yj-yi)+xi;intersect$1&&(inside=!inside)}return inside}function getHull(points){let newPoints=points.slice();return newPoints.sort((a$1,b$1)=>a$1.xb$1.x?1:a$1.yb$1.y?1:0),getHullPresorted(newPoints)}function getHullPresorted(points){if(points.length<=1)return points.slice();let upperHull=[];for(let i=0;i=2;){let q=upperHull[upperHull.length-1],r$1=upperHull[upperHull.length-2];if((q.x-r$1.x)*(p$4.y-r$1.y)>=(q.y-r$1.y)*(p$4.x-r$1.x))upperHull.pop();else break}upperHull.push(p$4)}upperHull.pop();let lowerHull=[];for(let i=points.length-1;i>=0;i--){let p$4=points[i];for(;lowerHull.length>=2;){let q=lowerHull[lowerHull.length-1],r$1=lowerHull[lowerHull.length-2];if((q.x-r$1.x)*(p$4.y-r$1.y)>=(q.y-r$1.y)*(p$4.x-r$1.x))lowerHull.pop();else break}lowerHull.push(p$4)}return lowerHull.pop(),upperHull.length===1&&lowerHull.length===1&&upperHull[0].x===lowerHull[0].x&&upperHull[0].y===lowerHull[0].y?upperHull:upperHull.concat(lowerHull)}var getDefaultParent=function(originalTarget){if(typeof document>`u`)return null;var sampleTarget=Array.isArray(originalTarget)?originalTarget[0]:originalTarget;return sampleTarget.ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function(node$1){return node$1&&(node$1.host||unwrapHost(node$1.parentNode))},correctTargets=function(parent,targets){return targets.map(function(target$1){if(parent.contains(target$1))return target$1;var correctedTarget=unwrapHost(target$1);return correctedTarget&&parent.contains(correctedTarget)?correctedTarget:(console.error(`aria-hidden`,target$1,`in not contained inside`,parent,`. Doing nothing`),null)}).filter(function(x$1){return!!x$1})},applyAttributeToOthers=function(originalTarget,parentNode,markerName,controlAttribute){var targets=correctTargets(parentNode,Array.isArray(originalTarget)?originalTarget:[originalTarget]);markerMap[markerName]||(markerMap[markerName]=new WeakMap);var markerCounter=markerMap[markerName],hiddenNodes=[],elementsToKeep=new Set,elementsToStop=new Set(targets),keep=function(el){!el||elementsToKeep.has(el)||(elementsToKeep.add(el),keep(el.parentNode))};targets.forEach(keep);var deep=function(parent){!parent||elementsToStop.has(parent)||Array.prototype.forEach.call(parent.children,function(node$1){if(elementsToKeep.has(node$1))deep(node$1);else try{var attr=node$1.getAttribute(controlAttribute),alreadyHidden=attr!==null&&attr!==`false`,counterValue=(counterMap.get(node$1)||0)+1,markerValue=(markerCounter.get(node$1)||0)+1;counterMap.set(node$1,counterValue),markerCounter.set(node$1,markerValue),hiddenNodes.push(node$1),counterValue===1&&alreadyHidden&&uncontrolledNodes.set(node$1,!0),markerValue===1&&node$1.setAttribute(markerName,`true`),alreadyHidden||node$1.setAttribute(controlAttribute,`true`)}catch(e$4){console.error(`aria-hidden: cannot operate on `,node$1,e$4)}})};return deep(parentNode),elementsToKeep.clear(),lockCount++,function(){hiddenNodes.forEach(function(node$1){var counterValue=counterMap.get(node$1)-1,markerValue=markerCounter.get(node$1)-1;counterMap.set(node$1,counterValue),markerCounter.set(node$1,markerValue),counterValue||(uncontrolledNodes.has(node$1)||node$1.removeAttribute(controlAttribute),uncontrolledNodes.delete(node$1)),markerValue||node$1.removeAttribute(markerName)}),lockCount--,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function(originalTarget,parentNode,markerName){markerName===void 0&&(markerName=`data-aria-hidden`);var targets=Array.from(Array.isArray(originalTarget)?originalTarget:[originalTarget]),activeParentNode=parentNode||getDefaultParent(originalTarget);return activeParentNode?(targets.push.apply(targets,Array.from(activeParentNode.querySelectorAll(`[aria-live]`))),applyAttributeToOthers(targets,activeParentNode,markerName,`aria-hidden`)):function(){return null}};function useHideOthers(target$1){let undo;watch(()=>unrefElement$1(target$1),el=>{el?undo=hideOthers(el):undo&&undo()}),onUnmounted(()=>{undo&&undo()})}let count=0;function useId(deterministicId,prefix=`reka`){if(deterministicId)return deterministicId;if(`useId`in vue_runtime_esm_bundler_exports)return`${prefix}-${useId$1?.()}`;let configProviderContext=injectConfigProviderContext({useId:void 0});return configProviderContext.useId?`${prefix}-${configProviderContext.useId()}`:`${prefix}-${++count}`}function useKbd(){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`}}function useSize(element$3){let size$2=ref(),width=computed(()=>size$2.value?.width??0),height=computed(()=>size$2.value?.height??0);return onMounted(()=>{let el=unrefElement$1(element$3);if(el){size$2.value={width:el.offsetWidth,height:el.offsetHeight};let resizeObserver=new ResizeObserver(entries=>{if(!Array.isArray(entries)||!entries.length)return;let entry=entries[0],width$1,height$1;if(`borderBoxSize`in entry){let borderSizeEntry=entry.borderBoxSize,borderSize=Array.isArray(borderSizeEntry)?borderSizeEntry[0]:borderSizeEntry;width$1=borderSize.inlineSize,height$1=borderSize.blockSize}else width$1=el.offsetWidth,height$1=el.offsetHeight;size$2.value={width:width$1,height:height$1}});return resizeObserver.observe(el,{box:`border-box`}),()=>resizeObserver.unobserve(el)}else size$2.value=void 0}),{width,height}}function useStateMachine(initialState,machine){let state=ref(initialState);function reducer(event){let nextState=machine[state.value][event];return nextState??state.value}let dispatch=event=>{state.value=reducer(event)};return{state,dispatch}}function useTypeahead(callback){let search$1=refAutoReset(``,1e3),handleTypeaheadSearch=(key$2,items)=>{if(search$1.value+=key$2,callback)callback(key$2);else{let currentItem=getActiveElement(),itemsWithTextValue=items.map(item=>({...item,textValue:item.value?.textValue??item.ref.textContent?.trim()??``})),currentMatch=itemsWithTextValue.find(item=>item.ref===currentItem),values=itemsWithTextValue.map(item=>item.textValue),nextMatch=getNextMatch(values,search$1.value,currentMatch?.textValue),newItem=itemsWithTextValue.find(item=>item.textValue===nextMatch);return newItem&&newItem.ref.focus(),newItem?.ref}},resetTypeahead=()=>{search$1.value=``};return{search:search$1,handleTypeaheadSearch,resetTypeahead}}function wrapArray(array$1,startIndex){return array$1.map((_$1,index$1)=>array$1[(startIndex+index$1)%array$1.length])}function getNextMatch(values,search$1,currentMatch){let isRepeated=search$1.length>1&&Array.from(search$1).every(char=>char===search$1[0]),normalizedSearch=isRepeated?search$1[0]:search$1,currentMatchIndex=currentMatch?values.indexOf(currentMatch):-1,wrappedValues=wrapArray(values,Math.max(currentMatchIndex,0)),excludeCurrentMatch=normalizedSearch.length===1;excludeCurrentMatch&&(wrappedValues=wrappedValues.filter(v=>v!==currentMatch));let nextMatch=wrappedValues.find(value$1=>value$1.toLowerCase().startsWith(normalizedSearch.toLowerCase()));return nextMatch===currentMatch?void 0:nextMatch}function usePresence(present,node$1){let stylesRef=ref({}),prevAnimationNameRef=ref(`none`),prevPresentRef=ref(present),initialState=present.value?`mounted`:`unmounted`,timeoutId,ownerWindow=node$1.value?.ownerDocument.defaultView??defaultWindow,{state,dispatch}=useStateMachine(initialState,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),dispatchCustomEvent=name$2=>{if(isClient$1){let customEvent=new CustomEvent(name$2,{bubbles:!1,cancelable:!1});node$1.value?.dispatchEvent(customEvent)}};watch(present,async(currentPresent,prevPresent)=>{let hasPresentChanged=prevPresent!==currentPresent;if(await nextTick(),hasPresentChanged){let prevAnimationName=prevAnimationNameRef.value,currentAnimationName=getAnimationName(node$1.value);if(currentPresent)dispatch(`MOUNT`),dispatchCustomEvent(`enter`),currentAnimationName===`none`&&dispatchCustomEvent(`after-enter`);else if(currentAnimationName===`none`||currentAnimationName===`undefined`||stylesRef.value?.display===`none`)dispatch(`UNMOUNT`),dispatchCustomEvent(`leave`),dispatchCustomEvent(`after-leave`);else{let isAnimating=prevAnimationName!==currentAnimationName;prevPresent&&isAnimating?(dispatch(`ANIMATION_OUT`),dispatchCustomEvent(`leave`)):(dispatch(`UNMOUNT`),dispatchCustomEvent(`after-leave`))}}},{immediate:!0});let handleAnimationEnd=event=>{let currentAnimationName=getAnimationName(node$1.value),isCurrentAnimation=currentAnimationName.includes(event.animationName),directionName=state.value===`mounted`?`enter`:`leave`;if(event.target===node$1.value&&isCurrentAnimation&&(dispatchCustomEvent(`after-${directionName}`),dispatch(`ANIMATION_END`),!prevPresentRef.value)){let currentFillMode=node$1.value.style.animationFillMode;node$1.value.style.animationFillMode=`forwards`,timeoutId=ownerWindow?.setTimeout(()=>{node$1.value?.style.animationFillMode===`forwards`&&(node$1.value.style.animationFillMode=currentFillMode)})}event.target===node$1.value&¤tAnimationName===`none`&&dispatch(`ANIMATION_END`)},handleAnimationStart=event=>{event.target===node$1.value&&(prevAnimationNameRef.value=getAnimationName(node$1.value))},watcher=watch(node$1,(newNode,oldNode)=>{newNode?(stylesRef.value=getComputedStyle(newNode),newNode.addEventListener(`animationstart`,handleAnimationStart),newNode.addEventListener(`animationcancel`,handleAnimationEnd),newNode.addEventListener(`animationend`,handleAnimationEnd)):(dispatch(`ANIMATION_END`),timeoutId!==void 0&&ownerWindow?.clearTimeout(timeoutId),oldNode?.removeEventListener(`animationstart`,handleAnimationStart),oldNode?.removeEventListener(`animationcancel`,handleAnimationEnd),oldNode?.removeEventListener(`animationend`,handleAnimationEnd))},{immediate:!0}),stateWatcher=watch(state,()=>{let currentAnimationName=getAnimationName(node$1.value);prevAnimationNameRef.value=state.value===`mounted`?currentAnimationName:`none`});onUnmounted(()=>{watcher(),stateWatcher()});let isPresent=computed(()=>[`mounted`,`unmountSuspended`].includes(state.value));return{isPresent}}function getAnimationName(node$1){return node$1&&getComputedStyle(node$1).animationName||`none`}var Presence_default=defineComponent({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(props,{slots,expose}){let{present,forceMount}=toRefs(props),node$1=ref(),{isPresent}=usePresence(present,node$1);expose({present:isPresent});let children=slots.default({present:isPresent.value});children=renderSlotFragments(children||[]);let instance=getCurrentInstance();if(children&&children?.length>1){let componentName=instance?.parent?.type.name?`<${instance.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${componentName}\` 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(line=>` - ${line}`).join(` `)].join(` `))}return()=>forceMount.value||present.value||isPresent.value?h(slots.default({present:isPresent.value})[0],{ref:v=>{let el=unrefElement$1(v);return el?.hasAttribute===void 0||(el?.hasAttribute(`data-reka-popper-content-wrapper`)?node$1.value=el.firstElementChild:node$1.value=el),el}}):null}});const Slot=defineComponent({name:`PrimitiveSlot`,inheritAttrs:!1,setup(_$1,{attrs,slots}){return()=>{if(!slots.default)return null;let children=renderSlotFragments(slots.default()),firstNonCommentChildrenIndex=children.findIndex(child=>child.type!==Comment);if(firstNonCommentChildrenIndex===-1)return children;let firstNonCommentChildren=children[firstNonCommentChildrenIndex];delete firstNonCommentChildren.props?.ref;let mergedProps=firstNonCommentChildren.props?mergeProps(attrs,firstNonCommentChildren.props):attrs,cloned=cloneVNode({...firstNonCommentChildren,props:{}},mergedProps);return children.length===1?cloned:(children[firstNonCommentChildrenIndex]=cloned,children)}}}),SELF_CLOSING_TAGS=[`area`,`img`,`input`],Primitive=defineComponent({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(props,{attrs,slots}){let asTag=props.asChild?`template`:props.as;return typeof asTag==`string`&&SELF_CLOSING_TAGS.includes(asTag)?()=>h(asTag,attrs):asTag===`template`?()=>h(Slot,attrs,{default:slots.default}):()=>h(props.as,attrs,{default:slots.default})}});function usePrimitiveElement(){let primitiveElement=ref(),currentElement=computed(()=>[`#text`,`#comment`].includes(primitiveElement.value?.$el.nodeName)?primitiveElement.value?.$el.nextElementSibling:unrefElement$1(primitiveElement));return{primitiveElement,currentElement}}const[injectDialogRootContext,provideDialogRootContext]=createContext(`DialogRoot`);var DialogRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,open$1=useVModel(props,`open`,emit$1,{defaultValue:props.defaultOpen,passive:props.open===void 0}),triggerElement=ref(),contentElement=ref(),{modal}=toRefs(props);return provideDialogRootContext({open:open$1,modal,openModal:()=>{open$1.value=!0},onOpenChange:value$1=>{open$1.value=value$1},onOpenToggle:()=>{open$1.value=!open$1.value},contentId:``,titleId:``,descriptionId:``,triggerElement,contentElement}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`,{open:unref(open$1),close:()=>open$1.value=!1})}}),DialogRoot_default=DialogRoot_vue_vue_type_script_setup_true_lang_default;const POINTER_DOWN_OUTSIDE=`dismissableLayer.pointerDownOutside`,FOCUS_OUTSIDE=`dismissableLayer.focusOutside`;function isLayerExist(layerElement,targetElement){let targetLayer=targetElement.closest(`[data-dismissable-layer]`),mainLayer=layerElement.dataset.dismissableLayer===``?layerElement:layerElement.querySelector(`[data-dismissable-layer]`),nodeList=Array.from(layerElement.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(targetLayer&&(mainLayer===targetLayer||nodeList.indexOf(mainLayer){});return watchEffect(cleanupFn=>{if(!isClient$1||!toValue$1(enabled$1))return;let handlePointerDown=async event=>{let target$1=event.target;if(!(!element$3?.value||!target$1)){if(isLayerExist(element$3.value,target$1)){isPointerInsideDOMTree.value=!1;return}if(event.target&&!isPointerInsideDOMTree.value){let eventDetail={originalEvent:event};function handleAndDispatchPointerDownOutsideEvent(){handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE,onPointerDownOutside,eventDetail)}event.pointerType===`touch`?(ownerDocument.removeEventListener(`click`,handleClickRef.value),handleClickRef.value=handleAndDispatchPointerDownOutsideEvent,ownerDocument.addEventListener(`click`,handleClickRef.value,{once:!0})):handleAndDispatchPointerDownOutsideEvent()}else ownerDocument.removeEventListener(`click`,handleClickRef.value);isPointerInsideDOMTree.value=!1}},timerId$1=window.setTimeout(()=>{ownerDocument.addEventListener(`pointerdown`,handlePointerDown)},0);cleanupFn(()=>{window.clearTimeout(timerId$1),ownerDocument.removeEventListener(`pointerdown`,handlePointerDown),ownerDocument.removeEventListener(`click`,handleClickRef.value)})}),{onPointerDownCapture:()=>{toValue$1(enabled$1)&&(isPointerInsideDOMTree.value=!0)}}}function useFocusOutside(onFocusOutside,element$3,enabled$1=!0){let ownerDocument=element$3?.value?.ownerDocument??globalThis?.document,isFocusInsideDOMTree=ref(!1);return watchEffect(cleanupFn=>{if(!isClient$1||!toValue$1(enabled$1))return;let handleFocus=async event=>{if(!element$3?.value)return;await nextTick(),await nextTick();let target$1=event.target;if(!(!element$3.value||!target$1||isLayerExist(element$3.value,target$1))&&event.target&&!isFocusInsideDOMTree.value){let eventDetail={originalEvent:event};handleAndDispatchCustomEvent(FOCUS_OUTSIDE,onFocusOutside,eventDetail)}};ownerDocument.addEventListener(`focusin`,handleFocus),cleanupFn(()=>ownerDocument.removeEventListener(`focusin`,handleFocus))}),{onFocusCapture:()=>{toValue$1(enabled$1)&&(isFocusInsideDOMTree.value=!0)},onBlurCapture:()=>{toValue$1(enabled$1)&&(isFocusInsideDOMTree.value=!1)}}}const context=reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set});var DismissableLayer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,{forwardRef,currentElement:layerElement}=useForwardExpose(),ownerDocument=computed(()=>layerElement.value?.ownerDocument??globalThis.document),layers=computed(()=>context.layersRoot),index$1=computed(()=>layerElement.value?Array.from(layers.value).indexOf(layerElement.value):-1),isBodyPointerEventsDisabled=computed(()=>context.layersWithOutsidePointerEventsDisabled.size>0),isPointerEventsEnabled=computed(()=>{let localLayers=Array.from(layers.value),[highestLayerWithOutsidePointerEventsDisabled]=[...context.layersWithOutsidePointerEventsDisabled].slice(-1),highestLayerWithOutsidePointerEventsDisabledIndex=localLayers.indexOf(highestLayerWithOutsidePointerEventsDisabled);return index$1.value>=highestLayerWithOutsidePointerEventsDisabledIndex}),pointerDownOutside=usePointerDownOutside(async event=>{let isPointerDownOnBranch=[...context.branches].some(branch=>branch?.contains(event.target));!isPointerEventsEnabled.value||isPointerDownOnBranch||(emits(`pointerDownOutside`,event),emits(`interactOutside`,event),await nextTick(),event.defaultPrevented||emits(`dismiss`))},layerElement),focusOutside=useFocusOutside(event=>{let isFocusInBranch=[...context.branches].some(branch=>branch?.contains(event.target));isFocusInBranch||(emits(`focusOutside`,event),emits(`interactOutside`,event),event.defaultPrevented||emits(`dismiss`))},layerElement);onKeyStroke(`Escape`,event=>{let isHighestLayer=index$1.value===layers.value.size-1;isHighestLayer&&(emits(`escapeKeyDown`,event),event.defaultPrevented||emits(`dismiss`))});let originalBodyPointerEvents;return watchEffect(cleanupFn=>{layerElement.value&&(props.disableOutsidePointerEvents&&(context.layersWithOutsidePointerEventsDisabled.size===0&&(originalBodyPointerEvents=ownerDocument.value.body.style.pointerEvents,ownerDocument.value.body.style.pointerEvents=`none`),context.layersWithOutsidePointerEventsDisabled.add(layerElement.value)),layers.value.add(layerElement.value),cleanupFn(()=>{props.disableOutsidePointerEvents&&context.layersWithOutsidePointerEventsDisabled.size===1&&(ownerDocument.value.body.style.pointerEvents=originalBodyPointerEvents)}))}),watchEffect(cleanupFn=>{cleanupFn(()=>{layerElement.value&&(layers.value.delete(layerElement.value),context.layersWithOutsidePointerEventsDisabled.delete(layerElement.value))})}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{ref:unref(forwardRef),"as-child":_ctx.asChild,as:_ctx.as,"data-dismissable-layer":``,style:normalizeStyle({pointerEvents:isBodyPointerEventsDisabled.value?isPointerEventsEnabled.value?`auto`:`none`:void 0}),onFocusCapture:unref(focusOutside).onFocusCapture,onBlurCapture:unref(focusOutside).onBlurCapture,onPointerdownCapture:unref(pointerDownOutside).onPointerDownCapture},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),DismissableLayer_default=DismissableLayer_vue_vue_type_script_setup_true_lang_default;const useFocusStackState=createGlobalState(()=>{let stack$1=ref([]);return stack$1});function createFocusScopesStack(){let stack$1=useFocusStackState();return{add(focusScope){let activeFocusScope=stack$1.value[0];focusScope!==activeFocusScope&&activeFocusScope?.pause(),stack$1.value=arrayRemove(stack$1.value,focusScope),stack$1.value.unshift(focusScope)},remove(focusScope){stack$1.value=arrayRemove(stack$1.value,focusScope),stack$1.value[0]?.resume()}}}function arrayRemove(array$1,item){let updatedArray=[...array$1],index$1=updatedArray.indexOf(item);return index$1!==-1&&updatedArray.splice(index$1,1),updatedArray}function removeLinks(items){return items.filter(item=>item.tagName!==`A`)}const AUTOFOCUS_ON_MOUNT=`focusScope.autoFocusOnMount`,AUTOFOCUS_ON_UNMOUNT=`focusScope.autoFocusOnUnmount`,EVENT_OPTIONS={bubbles:!1,cancelable:!0};function focusFirst(candidates,{select=!1}={}){let previouslyFocusedElement=getActiveElement();for(let candidate of candidates)if(focus(candidate,{select}),getActiveElement()!==previouslyFocusedElement)return!0}function getTabbableEdges(container){let candidates=getTabbableCandidates(container),first=findVisible(candidates,container),last=findVisible(candidates.reverse(),container);return[first,last]}function getTabbableCandidates(container){let nodes=[],walker=document.createTreeWalker(container,NodeFilter.SHOW_ELEMENT,{acceptNode:node$1=>{let isHiddenInput=node$1.tagName===`INPUT`&&node$1.type===`hidden`;return node$1.disabled||node$1.hidden||isHiddenInput?NodeFilter.FILTER_SKIP:node$1.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;walker.nextNode();)nodes.push(walker.currentNode);return nodes}function findVisible(elements,container){for(let element$3 of elements)if(!isHidden(element$3,{upTo:container}))return element$3}function isHidden(node$1,{upTo}){if(getComputedStyle(node$1).visibility===`hidden`)return!0;for(;node$1;){if(upTo!==void 0&&node$1===upTo)return!1;if(getComputedStyle(node$1).display===`none`)return!0;node$1=node$1.parentElement}return!1}function isSelectableInput(element$3){return element$3 instanceof HTMLInputElement&&`select`in element$3}function focus(element$3,{select=!1}={}){if(element$3&&element$3.focus){let previouslyFocusedElement=getActiveElement();element$3.focus({preventScroll:!0}),element$3!==previouslyFocusedElement&&isSelectableInput(element$3)&&select&&element$3.select()}}var FocusScope_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FocusScope`,props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`mountAutoFocus`,`unmountAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,{currentRef,currentElement}=useForwardExpose(),lastFocusedElementRef=ref(null),focusScopesStack=createFocusScopesStack(),focusScope=reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});watchEffect(cleanupFn=>{if(!isClient$1)return;let container=currentElement.value;if(!props.trapped)return;function handleFocusIn(event){if(focusScope.paused||!container)return;let target$1=event.target;container.contains(target$1)?lastFocusedElementRef.value=target$1:focus(lastFocusedElementRef.value,{select:!0})}function handleFocusOut(event){if(focusScope.paused||!container)return;let relatedTarget=event.relatedTarget;relatedTarget!==null&&(container.contains(relatedTarget)||focus(lastFocusedElementRef.value,{select:!0}))}function handleMutations$1(mutations$1){let isLastFocusedElementExist=container.contains(lastFocusedElementRef.value);isLastFocusedElementExist||focus(container)}document.addEventListener(`focusin`,handleFocusIn),document.addEventListener(`focusout`,handleFocusOut);let mutationObserver=new MutationObserver(handleMutations$1);container&&mutationObserver.observe(container,{childList:!0,subtree:!0}),cleanupFn(()=>{document.removeEventListener(`focusin`,handleFocusIn),document.removeEventListener(`focusout`,handleFocusOut),mutationObserver.disconnect()})}),watchEffect(async cleanupFn=>{let container=currentElement.value;if(await nextTick(),!container)return;focusScopesStack.add(focusScope);let previouslyFocusedElement=getActiveElement(),hasFocusedCandidate=container.contains(previouslyFocusedElement);if(!hasFocusedCandidate){let mountEvent=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS);container.addEventListener(AUTOFOCUS_ON_MOUNT,ev=>emits(`mountAutoFocus`,ev)),container.dispatchEvent(mountEvent),mountEvent.defaultPrevented||(focusFirst(removeLinks(getTabbableCandidates(container)),{select:!0}),getActiveElement()===previouslyFocusedElement&&focus(container))}cleanupFn(()=>{container.removeEventListener(AUTOFOCUS_ON_MOUNT,ev=>emits(`mountAutoFocus`,ev));let unmountEvent=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS),unmountEventHandler=ev=>{emits(`unmountAutoFocus`,ev)};container.addEventListener(AUTOFOCUS_ON_UNMOUNT,unmountEventHandler),container.dispatchEvent(unmountEvent),setTimeout(()=>{unmountEvent.defaultPrevented||focus(previouslyFocusedElement??document.body,{select:!0}),container.removeEventListener(AUTOFOCUS_ON_UNMOUNT,unmountEventHandler),focusScopesStack.remove(focusScope)},0)})});function handleKeyDown(event){if(!props.loop&&!props.trapped||focusScope.paused)return;let isTabKey=event.key===`Tab`&&!event.altKey&&!event.ctrlKey&&!event.metaKey,focusedElement=getActiveElement();if(isTabKey&&focusedElement){let container=event.currentTarget,[first,last]=getTabbableEdges(container),hasTabbableElementsInside=first&&last;hasTabbableElementsInside?!event.shiftKey&&focusedElement===last?(event.preventDefault(),props.loop&&focus(first,{select:!0})):event.shiftKey&&focusedElement===first&&(event.preventDefault(),props.loop&&focus(last,{select:!0})):focusedElement===container&&event.preventDefault()}}return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{ref_key:`currentRef`,ref:currentRef,tabindex:`-1`,"as-child":_ctx.asChild,as:_ctx.as,onKeydown:handleKeyDown},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as-child`,`as`]))}}),FocusScope_default=FocusScope_vue_vue_type_script_setup_true_lang_default;const SELECTION_KEYS=[`Enter`,` `],FIRST_KEYS=[`ArrowDown`,`PageUp`,`Home`],LAST_KEYS=[`ArrowUp`,`PageDown`,`End`],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,`ArrowRight`],rtl:[...SELECTION_KEYS,`ArrowLeft`]};function getOpenState(open$1){return open$1?`open`:`closed`}var DialogContentImpl_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectDialogRootContext(),{forwardRef,currentElement:contentElement}=useForwardExpose();return rootContext.titleId||=useId(void 0,`reka-dialog-title`),rootContext.descriptionId||=useId(void 0,`reka-dialog-description`),onMounted(()=>{rootContext.contentElement=contentElement,getActiveElement()!==document.body&&(rootContext.triggerElement.value=getActiveElement())}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FocusScope_default),{"as-child":``,loop:``,trapped:props.trapFocus,onMountAutoFocus:_cache$1[5]||=$event=>emits(`openAutoFocus`,$event),onUnmountAutoFocus:_cache$1[6]||=$event=>emits(`closeAutoFocus`,$event)},{default:withCtx(()=>[createVNode(unref(DismissableLayer_default),mergeProps({id:unref(rootContext).contentId,ref:unref(forwardRef),as:_ctx.as,"as-child":_ctx.asChild,"disable-outside-pointer-events":_ctx.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":unref(rootContext).descriptionId,"aria-labelledby":unref(rootContext).titleId,"data-state":unref(getOpenState)(unref(rootContext).open.value)},_ctx.$attrs,{onDismiss:_cache$1[0]||=$event=>unref(rootContext).onOpenChange(!1),onEscapeKeyDown:_cache$1[1]||=$event=>emits(`escapeKeyDown`,$event),onFocusOutside:_cache$1[2]||=$event=>emits(`focusOutside`,$event),onInteractOutside:_cache$1[3]||=$event=>emits(`interactOutside`,$event),onPointerDownOutside:_cache$1[4]||=$event=>emits(`pointerDownOutside`,$event)}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`]))}}),DialogContentImpl_default=DialogContentImpl_vue_vue_type_script_setup_true_lang_default,DialogContentModal_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`DialogContentModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectDialogRootContext(),emitsAsProps=useEmitAsProps(emits),{forwardRef,currentElement}=useForwardExpose();return useHideOthers(currentElement),(_ctx,_cache$1)=>(openBlock(),createBlock(DialogContentImpl_default,mergeProps({...props,...unref(emitsAsProps)},{ref:unref(forwardRef),"trap-focus":unref(rootContext).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:_cache$1[0]||=event=>{event.defaultPrevented||(event.preventDefault(),unref(rootContext).triggerElement.value?.focus())},onPointerDownOutside:_cache$1[1]||=event=>{let originalEvent=event.detail.originalEvent,ctrlLeftClick=originalEvent.button===0&&originalEvent.ctrlKey===!0,isRightClick=originalEvent.button===2||ctrlLeftClick;isRightClick&&event.preventDefault()},onFocusOutside:_cache$1[2]||=event=>{event.preventDefault()}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`trap-focus`]))}}),DialogContentModal_default=DialogContentModal_vue_vue_type_script_setup_true_lang_default,DialogContentNonModal_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,emitsAsProps=useEmitAsProps(emits);useForwardExpose();let rootContext=injectDialogRootContext(),hasInteractedOutsideRef=ref(!1),hasPointerDownOutsideRef=ref(!1);return(_ctx,_cache$1)=>(openBlock(),createBlock(DialogContentImpl_default,mergeProps({...props,...unref(emitsAsProps)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:_cache$1[0]||=event=>{event.defaultPrevented||(hasInteractedOutsideRef.value||unref(rootContext).triggerElement.value?.focus(),event.preventDefault()),hasInteractedOutsideRef.value=!1,hasPointerDownOutsideRef.value=!1},onInteractOutside:_cache$1[1]||=event=>{event.defaultPrevented||(hasInteractedOutsideRef.value=!0,event.detail.originalEvent.type===`pointerdown`&&(hasPointerDownOutsideRef.value=!0));let target$1=event.target,targetIsTrigger=unref(rootContext).triggerElement.value?.contains(target$1);targetIsTrigger&&event.preventDefault(),event.detail.originalEvent.type===`focusin`&&hasPointerDownOutsideRef.value&&event.preventDefault()}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}}),DialogContentNonModal_default=DialogContentNonModal_vue_vue_type_script_setup_true_lang_default,DialogContent_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`DialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectDialogRootContext(),emitsAsProps=useEmitAsProps(emits),{forwardRef}=useForwardExpose();return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Presence_default),{present:_ctx.forceMount||unref(rootContext).open.value},{default:withCtx(()=>[unref(rootContext).modal.value?(openBlock(),createBlock(DialogContentModal_default,mergeProps({key:0,ref:unref(forwardRef)},{...props,...unref(emitsAsProps),..._ctx.$attrs}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16)):(openBlock(),createBlock(DialogContentNonModal_default,mergeProps({key:1,ref:unref(forwardRef)},{...props,...unref(emitsAsProps),..._ctx.$attrs}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),DialogContent_default=DialogContent_vue_vue_type_script_setup_true_lang_default,DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let rootContext=injectDialogRootContext();return useBodyScrollLock(!0),useForwardExpose(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{as:_ctx.as,"as-child":_ctx.asChild,"data-state":unref(rootContext).open.value?`open`:`closed`,style:{"pointer-events":`auto`}},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),DialogOverlayImpl_default=DialogOverlayImpl_vue_vue_type_script_setup_true_lang_default,DialogOverlay_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let rootContext=injectDialogRootContext(),{forwardRef}=useForwardExpose();return(_ctx,_cache$1)=>unref(rootContext)?.modal.value?(openBlock(),createBlock(unref(Presence_default),{key:0,present:_ctx.forceMount||unref(rootContext).open.value},{default:withCtx(()=>[createVNode(DialogOverlayImpl_default,mergeProps(_ctx.$attrs,{ref:unref(forwardRef),as:_ctx.as,"as-child":_ctx.asChild}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`as`,`as-child`])]),_:3},8,[`present`])):createCommentVNode(`v-if`,!0)}}),DialogOverlay_default=DialogOverlay_vue_vue_type_script_setup_true_lang_default,Teleport_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Teleport`,props:{to:{type:null,required:!1,default:`body`},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(__props){let isMounted=useMounted();return(_ctx,_cache$1)=>unref(isMounted)||_ctx.forceMount?(openBlock(),createBlock(Teleport,{key:0,to:_ctx.to,disabled:_ctx.disabled,defer:_ctx.defer},[renderSlot(_ctx.$slots,`default`)],8,[`to`,`disabled`,`defer`])):createCommentVNode(`v-if`,!0)}}),Teleport_default=Teleport_vue_vue_type_script_setup_true_lang_default,DialogPortal_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`DialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(__props){let props=__props;return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Teleport_default),normalizeProps(guardReactiveProps(props)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}}),DialogPortal_default=DialogPortal_vue_vue_type_script_setup_true_lang_default;const ITEM_DATA_ATTR=`data-reka-collection-item`;function useCollection(options$1={}){let{key:key$2=``,isProvider=!1}=options$1,injectionKey=`${key$2}CollectionProvider`,context$1;if(isProvider){let itemMap=ref(new Map),collectionRef=ref();context$1={collectionRef,itemMap},provide(injectionKey,context$1)}else context$1=inject(injectionKey);let getItems=(includeDisabledItem=!1)=>{let collectionNode=context$1.collectionRef.value;if(!collectionNode)return[];let orderedNodes=Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)),items=Array.from(context$1.itemMap.value.values()),orderedItems=items.sort((a$1,b$1)=>orderedNodes.indexOf(a$1.ref)-orderedNodes.indexOf(b$1.ref));return includeDisabledItem?orderedItems:orderedItems.filter(i=>i.ref.dataset.disabled!==``)},CollectionSlot=defineComponent({name:`CollectionSlot`,setup(_$1,{slots}){let{primitiveElement,currentElement}=usePrimitiveElement();return watch(currentElement,()=>{context$1.collectionRef.value=currentElement.value}),()=>h(Slot,{ref:primitiveElement},slots)}}),CollectionItem=defineComponent({name:`CollectionItem`,inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(props,{slots,attrs}){let{primitiveElement,currentElement}=usePrimitiveElement();return watchEffect(cleanupFn=>{if(currentElement.value){let key$1$1=markRaw(currentElement.value);context$1.itemMap.value.set(key$1$1,{ref:currentElement.value,value:props.value}),cleanupFn(()=>context$1.itemMap.value.delete(key$1$1))}}),()=>h(Slot,{...attrs,[ITEM_DATA_ATTR]:``,ref:primitiveElement},slots)}}),reactiveItems=computed(()=>Array.from(context$1.itemMap.value.values())),itemMapSize=computed(()=>context$1.itemMap.value.size);return{getItems,reactiveItems,itemMapSize,CollectionSlot,CollectionItem}}const MAP_KEY_TO_FOCUS_INTENT={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function getDirectionAwareKey(key$2,dir){return dir===`rtl`?key$2===`ArrowLeft`?`ArrowRight`:key$2===`ArrowRight`?`ArrowLeft`:key$2:key$2}function getFocusIntent(event,orientation,dir){let key$2=getDirectionAwareKey(event.key,dir);if(!(orientation===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(key$2))&&!(orientation===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(key$2)))return MAP_KEY_TO_FOCUS_INTENT[key$2]}var VisuallyHidden_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`VisuallyHidden`,props:{feature:{type:String,required:!1,default:`focusable`},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{as:_ctx.as,"as-child":_ctx.asChild,"aria-hidden":_ctx.feature===`focusable`?`true`:void 0,"data-hidden":_ctx.feature===`fully-hidden`?``:void 0,tabindex:_ctx.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:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}}),VisuallyHidden_default=VisuallyHidden_vue_vue_type_script_setup_true_lang_default,VisuallyHiddenInputBubble_vue_vue_type_script_setup_true_lang_default=defineComponent({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(__props){let props=__props,{primitiveElement,currentElement}=usePrimitiveElement(),valueState=computed(()=>props.checked??props.value);return watch(valueState,(cur,prev)=>{if(!currentElement.value)return;let input=currentElement.value,inputProto=window.HTMLInputElement.prototype,descriptor=Object.getOwnPropertyDescriptor(inputProto,`value`),setValue$1=descriptor.set;if(setValue$1&&cur!==prev){let inputEvent=new Event(`input`,{bubbles:!0}),changeEvent=new Event(`change`,{bubbles:!0});setValue$1.call(input,cur),input.dispatchEvent(inputEvent),input.dispatchEvent(changeEvent)}}),(_ctx,_cache$1)=>(openBlock(),createBlock(VisuallyHidden_default,mergeProps({ref_key:`primitiveElement`,ref:primitiveElement},{...props,..._ctx.$attrs},{as:`input`}),null,16))}}),VisuallyHiddenInputBubble_default=VisuallyHiddenInputBubble_vue_vue_type_script_setup_true_lang_default,VisuallyHiddenInput_vue_vue_type_script_setup_true_lang_default=defineComponent({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(__props){let props=__props,isFormArrayEmptyAndRequired=computed(()=>typeof props.value==`object`&&Array.isArray(props.value)&&props.value.length===0&&props.required),parsedValue=computed(()=>typeof props.value==`string`||typeof props.value==`number`||typeof props.value==`boolean`||props.value===null||props.value===void 0?[{name:props.name,value:props.value}]:typeof props.value==`object`&&Array.isArray(props.value)?props.value.flatMap((obj,index$1)=>typeof obj==`object`?Object.entries(obj).map(([key$2,value$1])=>({name:`${props.name}[${index$1}][${key$2}]`,value:value$1})):{name:`${props.name}[${index$1}]`,value:obj}):props.value!==null&&typeof props.value==`object`&&!Array.isArray(props.value)?Object.entries(props.value).map(([key$2,value$1])=>({name:`${props.name}[${key$2}]`,value:value$1})):[]);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createCommentVNode(` We render single input if it's required `),isFormArrayEmptyAndRequired.value?(openBlock(),createBlock(VisuallyHiddenInputBubble_default,mergeProps({key:_ctx.name},{...props,..._ctx.$attrs},{name:_ctx.name,value:_ctx.value}),null,16,[`name`,`value`])):(openBlock(!0),createElementBlock(Fragment,{key:1},renderList(parsedValue.value,parsed=>(openBlock(),createBlock(VisuallyHiddenInputBubble_default,mergeProps({key:parsed.name},{ref_for:!0},{...props,..._ctx.$attrs},{name:parsed.name,value:parsed.value}),null,16,[`name`,`value`]))),128))],2112))}}),VisuallyHiddenInput_default=VisuallyHiddenInput_vue_vue_type_script_setup_true_lang_default;const[injectPopperRootContext,providePopperRootContext]=createContext(`PopperRoot`);var PopperRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({inheritAttrs:!1,__name:`PopperRoot`,setup(__props){let anchor=ref();return providePopperRootContext({anchor,onAnchorChange:element$3=>anchor.value=element$3}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`)}}),PopperRoot_default=PopperRoot_vue_vue_type_script_setup_true_lang_default,PopperAnchor_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PopperAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let props=__props,{forwardRef,currentElement}=useForwardExpose(),rootContext=injectPopperRootContext();return watchPostEffect(()=>{rootContext.onAnchorChange(props.reference??currentElement.value)}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{ref:unref(forwardRef),as:_ctx.as,"as-child":_ctx.asChild},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as`,`as-child`]))}}),PopperAnchor_default=PopperAnchor_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$52={key:0,d:`M0 0L6 6L12 0`},_hoisted_2$34={key:1,d:`M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0`};var Arrow_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Arrow`,props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(__props){let props=__props;return useForwardExpose(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),mergeProps(props,{width:_ctx.width,height:_ctx.height,viewBox:_ctx.asChild?void 0:`0 0 12 6`,preserveAspectRatio:_ctx.asChild?void 0:`none`}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{},()=>[_ctx.rounded?(openBlock(),createElementBlock(`path`,_hoisted_2$34)):(openBlock(),createElementBlock(`path`,_hoisted_1$52))])]),_:3},16,[`width`,`height`,`viewBox`,`preserveAspectRatio`]))}}),Arrow_default=Arrow_vue_vue_type_script_setup_true_lang_default;function isNotNull(value$1){return value$1!==null}function transformOrigin(options$1){return{name:`transformOrigin`,options:options$1,fn(data$12){let{placement,rects,middlewareData}=data$12,cannotCenterArrow=middlewareData.arrow?.centerOffset!==0,isArrowHidden=cannotCenterArrow,arrowWidth=isArrowHidden?0:options$1.arrowWidth,arrowHeight=isArrowHidden?0:options$1.arrowHeight,[placedSide,placedAlign]=getSideAndAlignFromPlacement(placement),noArrowAlign={start:`0%`,center:`50%`,end:`100%`}[placedAlign],arrowXCenter=(middlewareData.arrow?.x??0)+arrowWidth/2,arrowYCenter=(middlewareData.arrow?.y??0)+arrowHeight/2,x$1=``,y=``;return placedSide===`bottom`?(x$1=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${-arrowHeight}px`):placedSide===`top`?(x$1=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${rects.floating.height+arrowHeight}px`):placedSide===`right`?(x$1=`${-arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`):placedSide===`left`&&(x$1=`${rects.floating.width+arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`),{data:{x:x$1,y}}}}}function getSideAndAlignFromPlacement(placement){let[side,align=`center`]=placement.split(`-`);return[side,align]}const sides=[`top`,`right`,`bottom`,`left`],min=Math.min,max=Math.max,round$2=Math.round,floor$1=Math.floor,createCoords=v=>({x:v,y:v}),oppositeSideMap={left:`right`,right:`left`,bottom:`top`,top:`bottom`},oppositeAlignmentMap={start:`end`,end:`start`};function clamp$2(start,value$1,end){return max(start,min(value$1,end))}function evaluate(value$1,param){return typeof value$1==`function`?value$1(param):value$1}function getSide(placement){return placement.split(`-`)[0]}function getAlignment(placement){return placement.split(`-`)[1]}function getOppositeAxis(axis){return axis===`x`?`y`:`x`}function getAxisLength(axis){return axis===`y`?`height`:`width`}function getSideAxis(placement){return[`top`,`bottom`].includes(getSide(placement))?`y`:`x`}function getAlignmentAxis(placement){return getOppositeAxis(getSideAxis(placement))}function getAlignmentSides(placement,rects,rtl){rtl===void 0&&(rtl=!1);let alignment=getAlignment(placement),alignmentAxis=getAlignmentAxis(placement),length=getAxisLength(alignmentAxis),mainAlignmentSide=alignmentAxis===`x`?alignment===(rtl?`end`:`start`)?`right`:`left`:alignment===`start`?`bottom`:`top`;return rects.reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}function getExpandedPlacements(placement){let oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){return placement.replace(/start|end/g,alignment=>oppositeAlignmentMap[alignment])}function getSideList(side,isStart,rtl){let lr=[`left`,`right`],rl=[`right`,`left`],tb=[`top`,`bottom`],bt$2=[`bottom`,`top`];switch(side){case`top`:case`bottom`:return rtl?isStart?rl:lr:isStart?lr:rl;case`left`:case`right`:return isStart?tb:bt$2;default:return[]}}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){let alignment=getAlignment(placement),list$2=getSideList(getSide(placement),direction===`start`,rtl);return alignment&&(list$2=list$2.map(side=>side+`-`+alignment),flipAlignment&&(list$2=list$2.concat(list$2.map(getOppositeAlignmentPlacement)))),list$2}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,side=>oppositeSideMap[side])}function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}function getPaddingObject(padding){return typeof padding==`number`?{top:padding,right:padding,bottom:padding,left:padding}:expandPaddingObject(padding)}function rectToClientRect(rect){let{x:x$1,y,width,height}=rect;return{width,height,top:y,left:x$1,right:x$1+width,bottom:y+height,x:x$1,y}}function computeCoordsFromPlacement(_ref,placement,rtl){let{reference,floating}=_ref,sideAxis=getSideAxis(placement),alignmentAxis=getAlignmentAxis(placement),alignLength=getAxisLength(alignmentAxis),side=getSide(placement),isVertical=sideAxis===`y`,commonX=reference.x+reference.width/2-floating.width/2,commonY=reference.y+reference.height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2,coords$1;switch(side){case`top`:coords$1={x:commonX,y:reference.y-floating.height};break;case`bottom`:coords$1={x:commonX,y:reference.y+reference.height};break;case`right`:coords$1={x:reference.x+reference.width,y:commonY};break;case`left`:coords$1={x:reference.x-floating.width,y:commonY};break;default:coords$1={x:reference.x,y:reference.y}}switch(getAlignment(placement)){case`start`:coords$1[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case`end`:coords$1[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1);break}return coords$1}const computePosition$1=async(reference,floating,config$1)=>{let{placement=`bottom`,strategy=`absolute`,middleware=[],platform:platform$1}=config$1,validMiddleware=middleware.filter(Boolean),rtl=await(platform$1.isRTL==null?void 0:platform$1.isRTL(floating)),rects=await platform$1.getElementRects({reference,floating,strategy}),{x:x$1,y}=computeCoordsFromPlacement(rects,placement,rtl),statefulPlacement=placement,middlewareData={},resetCount=0;for(let i=0;i({name:`arrow`,options:options$1,async fn(state){let{x:x$1,y,placement,rects,platform:platform$1,elements,middlewareData}=state,{element:element$3,padding=0}=evaluate(options$1,state)||{};if(element$3==null)return{};let paddingObject=getPaddingObject(padding),coords$1={x:x$1,y},axis=getAlignmentAxis(placement),length=getAxisLength(axis),arrowDimensions=await platform$1.getDimensions(element$3),isYAxis=axis===`y`,minProp=isYAxis?`top`:`left`,maxProp=isYAxis?`bottom`:`right`,clientProp=isYAxis?`clientHeight`:`clientWidth`,endDiff=rects.reference[length]+rects.reference[axis]-coords$1[axis]-rects.floating[length],startDiff=coords$1[axis]-rects.reference[axis],arrowOffsetParent=await(platform$1.getOffsetParent==null?void 0:platform$1.getOffsetParent(element$3)),clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;(!clientSize||!await(platform$1.isElement==null?void 0:platform$1.isElement(arrowOffsetParent)))&&(clientSize=elements.floating[clientProp]||rects.floating[length]);let centerToReference=endDiff/2-startDiff/2,largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=min(paddingObject[minProp],largestPossiblePadding),maxPadding=min(paddingObject[maxProp],largestPossiblePadding),min$1=minPadding,max$1=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+centerToReference,offset$2=clamp$2(min$1,center,max$1),shouldAddOffset=!middlewareData.arrow&&getAlignment(placement)!=null&¢er!==offset$2&&rects.reference[length]/2-(centerside$1<=0)){var _middlewareData$flip2,_overflowsData$filter;let nextIndex=((_middlewareData$flip2=middlewareData.flip)?.index||0)+1,nextPlacement=placements$1[nextIndex];if(nextPlacement)return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}};let resetPlacement=(_overflowsData$filter=overflowsData.filter(d=>d.overflows[0]<=0).sort((a$1,b$1)=>a$1.overflows[1]-b$1.overflows[1])[0])?.placement;if(!resetPlacement)switch(fallbackStrategy){case`bestFit`:{var _overflowsData$filter2;let placement$1=(_overflowsData$filter2=overflowsData.filter(d=>{if(hasFallbackAxisSideDirection){let currentSideAxis=getSideAxis(d.placement);return currentSideAxis===initialSideAxis||currentSideAxis===`y`}return!0}).map(d=>[d.placement,d.overflows.filter(overflow$1=>overflow$1>0).reduce((acc,overflow$1)=>acc+overflow$1,0)]).sort((a$1,b$1)=>a$1[1]-b$1[1])[0])?.[0];placement$1&&(resetPlacement=placement$1);break}case`initialPlacement`:resetPlacement=initialPlacement;break}if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}};function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow.left-rect.width}}function isAnySideFullyClipped(overflow){return sides.some(side=>overflow[side]>=0)}const hide$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`hide`,options:options$1,async fn(state){let{rects}=state,{strategy=`referenceHidden`,...detectOverflowOptions}=evaluate(options$1,state);switch(strategy){case`referenceHidden`:{let overflow=await detectOverflow$1(state,{...detectOverflowOptions,elementContext:`reference`}),offsets=getSideOffsets(overflow,rects.reference);return{data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped(offsets)}}}case`escaped`:{let overflow=await detectOverflow$1(state,{...detectOverflowOptions,altBoundary:!0}),offsets=getSideOffsets(overflow,rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped(offsets)}}}default:return{}}}}};async function convertValueToCoords(state,options$1){let{placement,platform:platform$1,elements}=state,rtl=await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating)),side=getSide(placement),alignment=getAlignment(placement),isVertical=getSideAxis(placement)===`y`,mainAxisMulti=[`left`,`top`].includes(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=evaluate(options$1,state),{mainAxis,crossAxis,alignmentAxis}=typeof rawValue==`number`?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};return alignment&&typeof alignmentAxis==`number`&&(crossAxis=alignment===`end`?alignmentAxis*-1:alignmentAxis),isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}const offset$1=function(options$1){return options$1===void 0&&(options$1=0),{name:`offset`,options:options$1,async fn(state){var _middlewareData$offse,_middlewareData$arrow;let{x:x$1,y,placement,middlewareData}=state,diffCoords=await convertValueToCoords(state,options$1);return placement===(_middlewareData$offse=middlewareData.offset)?.placement&&(_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset?{}:{x:x$1+diffCoords.x,y:y+diffCoords.y,data:{...diffCoords,placement}}}}},shift$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`shift`,options:options$1,async fn(state){let{x:x$1,y,placement}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x:x$2,y:y$1}=_ref;return{x:x$2,y:y$1}}},...detectOverflowOptions}=evaluate(options$1,state),coords$1={x:x$1,y},overflow=await detectOverflow$1(state,detectOverflowOptions),crossAxis=getSideAxis(getSide(placement)),mainAxis=getOppositeAxis(crossAxis),mainAxisCoord=coords$1[mainAxis],crossAxisCoord=coords$1[crossAxis];if(checkMainAxis){let minSide=mainAxis===`y`?`top`:`left`,maxSide=mainAxis===`y`?`bottom`:`right`,min$1=mainAxisCoord+overflow[minSide],max$1=mainAxisCoord-overflow[maxSide];mainAxisCoord=clamp$2(min$1,mainAxisCoord,max$1)}if(checkCrossAxis){let minSide=crossAxis===`y`?`top`:`left`,maxSide=crossAxis===`y`?`bottom`:`right`,min$1=crossAxisCoord+overflow[minSide],max$1=crossAxisCoord-overflow[maxSide];crossAxisCoord=clamp$2(min$1,crossAxisCoord,max$1)}let limitedCoords=limiter.fn({...state,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x$1,y:limitedCoords.y-y,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}},limitShift$1=function(options$1){return options$1===void 0&&(options$1={}),{options:options$1,fn(state){let{x:x$1,y,placement,rects,middlewareData}=state,{offset:offset$2=0,mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0}=evaluate(options$1,state),coords$1={x:x$1,y},crossAxis=getSideAxis(placement),mainAxis=getOppositeAxis(crossAxis),mainAxisCoord=coords$1[mainAxis],crossAxisCoord=coords$1[crossAxis],rawOffset=evaluate(offset$2,state),computedOffset=typeof rawOffset==`number`?{mainAxis:rawOffset,crossAxis:0}:{mainAxis:0,crossAxis:0,...rawOffset};if(checkMainAxis){let len=mainAxis===`y`?`height`:`width`,limitMin=rects.reference[mainAxis]-rects.floating[len]+computedOffset.mainAxis,limitMax=rects.reference[mainAxis]+rects.reference[len]-computedOffset.mainAxis;mainAxisCoordlimitMax&&(mainAxisCoord=limitMax)}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2;let len=mainAxis===`y`?`width`:`height`,isOriginSide=[`top`,`left`].includes(getSide(placement)),limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide&&(_middlewareData$offse=middlewareData.offset)?.[crossAxis]||0)+(isOriginSide?0:computedOffset.crossAxis),limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:(_middlewareData$offse2=middlewareData.offset)?.[crossAxis]||0)-(isOriginSide?computedOffset.crossAxis:0);crossAxisCoordlimitMax&&(crossAxisCoord=limitMax)}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}},size$1=function(options$1){return options$1===void 0&&(options$1={}),{name:`size`,options:options$1,async fn(state){var _state$middlewareData,_state$middlewareData2;let{placement,rects,platform:platform$1,elements}=state,{apply:apply$2=()=>{},...detectOverflowOptions}=evaluate(options$1,state),overflow=await detectOverflow$1(state,detectOverflowOptions),side=getSide(placement),alignment=getAlignment(placement),isYAxis=getSideAxis(placement)===`y`,{width,height}=rects.floating,heightSide,widthSide;side===`top`||side===`bottom`?(heightSide=side,widthSide=alignment===(await(platform$1.isRTL==null?void 0:platform$1.isRTL(elements.floating))?`start`:`end`)?`left`:`right`):(widthSide=side,heightSide=alignment===`end`?`top`:`bottom`);let maximumClippingHeight=height-overflow.top-overflow.bottom,maximumClippingWidth=width-overflow.left-overflow.right,overflowAvailableHeight=min(height-overflow[heightSide],maximumClippingHeight),overflowAvailableWidth=min(width-overflow[widthSide],maximumClippingWidth),noShift=!state.middlewareData.shift,availableHeight=overflowAvailableHeight,availableWidth=overflowAvailableWidth;if((_state$middlewareData=state.middlewareData.shift)!=null&&_state$middlewareData.enabled.x&&(availableWidth=maximumClippingWidth),(_state$middlewareData2=state.middlewareData.shift)!=null&&_state$middlewareData2.enabled.y&&(availableHeight=maximumClippingHeight),noShift&&!alignment){let xMin=max(overflow.left,0),xMax=max(overflow.right,0),yMin=max(overflow.top,0),yMax=max(overflow.bottom,0);isYAxis?availableWidth=width-2*(xMin!==0||xMax!==0?xMin+xMax:max(overflow.left,overflow.right)):availableHeight=height-2*(yMin!==0||yMax!==0?yMin+yMax:max(overflow.top,overflow.bottom))}await apply$2({...state,availableWidth,availableHeight});let nextDimensions=await platform$1.getDimensions(elements.floating);return width!==nextDimensions.width||height!==nextDimensions.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<`u`}function getNodeName(node$1){return isNode(node$1)?(node$1.nodeName||``).toLowerCase():`#document`}function getWindow(node$1){var _node$ownerDocument;return(node$1==null||(_node$ownerDocument=node$1.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node$1){var _ref;return(_ref=(isNode(node$1)?node$1.ownerDocument:node$1.document)||window.document)?.documentElement}function isNode(value$1){return hasWindow()?value$1 instanceof Node||value$1 instanceof getWindow(value$1).Node:!1}function isElement(value$1){return hasWindow()?value$1 instanceof Element||value$1 instanceof getWindow(value$1).Element:!1}function isHTMLElement(value$1){return hasWindow()?value$1 instanceof HTMLElement||value$1 instanceof getWindow(value$1).HTMLElement:!1}function isShadowRoot(value$1){return!hasWindow()||typeof ShadowRoot>`u`?!1:value$1 instanceof ShadowRoot||value$1 instanceof getWindow(value$1).ShadowRoot}function isOverflowElement(element$3){let{overflow,overflowX,overflowY,display}=getComputedStyle$1(element$3);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&![`inline`,`contents`].includes(display)}function isTableElement(element$3){return[`table`,`td`,`th`].includes(getNodeName(element$3))}function isTopLayer(element$3){return[`:popover-open`,`:modal`].some(selector=>{try{return element$3.matches(selector)}catch{return!1}})}function isContainingBlock(elementOrCss){let webkit=isWebKit(),css=isElement(elementOrCss)?getComputedStyle$1(elementOrCss):elementOrCss;return[`transform`,`translate`,`scale`,`rotate`,`perspective`].some(value$1=>css[value$1]?css[value$1]!==`none`:!1)||(css.containerType?css.containerType!==`normal`:!1)||!webkit&&(css.backdropFilter?css.backdropFilter!==`none`:!1)||!webkit&&(css.filter?css.filter!==`none`:!1)||[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`].some(value$1=>(css.willChange||``).includes(value$1))||[`paint`,`layout`,`strict`,`content`].some(value$1=>(css.contain||``).includes(value$1))}function getContainingBlock(element$3){let currentNode=getParentNode(element$3);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock(currentNode))return currentNode;if(isTopLayer(currentNode))return null;currentNode=getParentNode(currentNode)}return null}function isWebKit(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function isLastTraversableNode(node$1){return[`html`,`body`,`#document`].includes(getNodeName(node$1))}function getComputedStyle$1(element$3){return getWindow(element$3).getComputedStyle(element$3)}function getNodeScroll(element$3){return isElement(element$3)?{scrollLeft:element$3.scrollLeft,scrollTop:element$3.scrollTop}:{scrollLeft:element$3.scrollX,scrollTop:element$3.scrollY}}function getParentNode(node$1){if(getNodeName(node$1)===`html`)return node$1;let result=node$1.assignedSlot||node$1.parentNode||isShadowRoot(node$1)&&node$1.host||getDocumentElement(node$1);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node$1){let parentNode=getParentNode(node$1);return isLastTraversableNode(parentNode)?node$1.ownerDocument?node$1.ownerDocument.body:node$1.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node$1,list$2,traverseIframes){var _node$ownerDocument2;list$2===void 0&&(list$2=[]),traverseIframes===void 0&&(traverseIframes=!0);let scrollableAncestor=getNearestOverflowAncestor(node$1),isBody=scrollableAncestor===(_node$ownerDocument2=node$1.ownerDocument)?.body,win$1=getWindow(scrollableAncestor);if(isBody){let frameElement=getFrameElement(win$1);return list$2.concat(win$1,win$1.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?getOverflowAncestors(frameElement):[])}return list$2.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getFrameElement(win$1){return win$1.parent&&Object.getPrototypeOf(win$1.parent)?win$1.frameElement:null}function getCssDimensions(element$3){let css=getComputedStyle$1(element$3),width=parseFloat(css.width)||0,height=parseFloat(css.height)||0,hasOffset=isHTMLElement(element$3),offsetWidth=hasOffset?element$3.offsetWidth:width,offsetHeight=hasOffset?element$3.offsetHeight:height,shouldFallback=round$2(width)!==offsetWidth||round$2(height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement$1(element$3){return isElement(element$3)?element$3:element$3.contextElement}function getScale(element$3){let domElement=unwrapElement$1(element$3);if(!isHTMLElement(domElement))return createCoords(1);let rect=domElement.getBoundingClientRect(),{width,height,$}=getCssDimensions(domElement),x$1=($?round$2(rect.width):rect.width)/width,y=($?round$2(rect.height):rect.height)/height;return(!x$1||!Number.isFinite(x$1))&&(x$1=1),(!y||!Number.isFinite(y))&&(y=1),{x:x$1,y}}const noOffsets=createCoords(0);function getVisualOffsets(element$3){let win$1=getWindow(element$3);return!isWebKit()||!win$1.visualViewport?noOffsets:{x:win$1.visualViewport.offsetLeft,y:win$1.visualViewport.offsetTop}}function shouldAddVisualOffsets(element$3,isFixed,floatingOffsetParent){return isFixed===void 0&&(isFixed=!1),!floatingOffsetParent||isFixed&&floatingOffsetParent!==getWindow(element$3)?!1:isFixed}function getBoundingClientRect(element$3,includeScale,isFixedStrategy,offsetParent){includeScale===void 0&&(includeScale=!1),isFixedStrategy===void 0&&(isFixedStrategy=!1);let clientRect=element$3.getBoundingClientRect(),domElement=unwrapElement$1(element$3),scale$1=createCoords(1);includeScale&&(offsetParent?isElement(offsetParent)&&(scale$1=getScale(offsetParent)):scale$1=getScale(element$3));let visualOffsets=shouldAddVisualOffsets(domElement,isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0),x$1=(clientRect.left+visualOffsets.x)/scale$1.x,y=(clientRect.top+visualOffsets.y)/scale$1.y,width=clientRect.width/scale$1.x,height=clientRect.height/scale$1.y;if(domElement){let win$1=getWindow(domElement),offsetWin=offsetParent&&isElement(offsetParent)?getWindow(offsetParent):offsetParent,currentWin=win$1,currentIFrame=getFrameElement(currentWin);for(;currentIFrame&&offsetParent&&offsetWin!==currentWin;){let iframeScale=getScale(currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css=getComputedStyle$1(currentIFrame),left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css.paddingTop))*iframeScale.y;x$1*=iframeScale.x,y*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x$1+=left,y+=top,currentWin=getWindow(currentIFrame),currentIFrame=getFrameElement(currentWin)}}return rectToClientRect({width,height,x:x$1,y})}function getWindowScrollBarX(element$3,rect){let leftScroll=getNodeScroll(element$3).scrollLeft;return rect?rect.left+leftScroll:getBoundingClientRect(getDocumentElement(element$3)).left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){ignoreScrollbarX===void 0&&(ignoreScrollbarX=!1);let htmlRect=documentElement.getBoundingClientRect(),x$1=htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect)),y=htmlRect.top+scroll.scrollTop;return{x:x$1,y}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){let{elements,rect,offsetParent,strategy}=_ref,isFixed=strategy===`fixed`,documentElement=getDocumentElement(offsetParent),topLayer=elements?isTopLayer(elements.floating):!1;if(offsetParent===documentElement||topLayer&&isFixed)return rect;let scroll={scrollLeft:0,scrollTop:0},scale$1=createCoords(1),offsets=createCoords(0),isOffsetParentAnElement=isHTMLElement(offsetParent);if((isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&((getNodeName(offsetParent)!==`body`||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isHTMLElement(offsetParent))){let offsetRect=getBoundingClientRect(offsetParent);scale$1=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}let htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll,!0):createCoords(0);return{width:rect.width*scale$1.x,height:rect.height*scale$1.y,x:rect.x*scale$1.x-scroll.scrollLeft*scale$1.x+offsets.x+htmlOffset.x,y:rect.y*scale$1.y-scroll.scrollTop*scale$1.y+offsets.y+htmlOffset.y}}function getClientRects(element$3){return Array.from(element$3.getClientRects())}function getDocumentRect(element$3){let html$5=getDocumentElement(element$3),scroll=getNodeScroll(element$3),body$2=element$3.ownerDocument.body,width=max(html$5.scrollWidth,html$5.clientWidth,body$2.scrollWidth,body$2.clientWidth),height=max(html$5.scrollHeight,html$5.clientHeight,body$2.scrollHeight,body$2.clientHeight),x$1=-scroll.scrollLeft+getWindowScrollBarX(element$3),y=-scroll.scrollTop;return getComputedStyle$1(body$2).direction===`rtl`&&(x$1+=max(html$5.clientWidth,body$2.clientWidth)-width),{width,height,x:x$1,y}}function getViewportRect(element$3,strategy){let win$1=getWindow(element$3),html$5=getDocumentElement(element$3),visualViewport=win$1.visualViewport,width=html$5.clientWidth,height=html$5.clientHeight,x$1=0,y=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;let visualViewportBased=isWebKit();(!visualViewportBased||visualViewportBased&&strategy===`fixed`)&&(x$1=visualViewport.offsetLeft,y=visualViewport.offsetTop)}return{width,height,x:x$1,y}}function getInnerBoundingClientRect(element$3,strategy){let clientRect=getBoundingClientRect(element$3,!0,strategy===`fixed`),top=clientRect.top+element$3.clientTop,left=clientRect.left+element$3.clientLeft,scale$1=isHTMLElement(element$3)?getScale(element$3):createCoords(1),width=element$3.clientWidth*scale$1.x,height=element$3.clientHeight*scale$1.y,x$1=left*scale$1.x,y=top*scale$1.y;return{width,height,x:x$1,y}}function getClientRectFromClippingAncestor(element$3,clippingAncestor,strategy){let rect;if(clippingAncestor===`viewport`)rect=getViewportRect(element$3,strategy);else if(clippingAncestor===`document`)rect=getDocumentRect(getDocumentElement(element$3));else if(isElement(clippingAncestor))rect=getInnerBoundingClientRect(clippingAncestor,strategy);else{let visualOffsets=getVisualOffsets(element$3);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return rectToClientRect(rect)}function hasFixedPositionAncestor(element$3,stopNode){let parentNode=getParentNode(element$3);return parentNode===stopNode||!isElement(parentNode)||isLastTraversableNode(parentNode)?!1:getComputedStyle$1(parentNode).position===`fixed`||hasFixedPositionAncestor(parentNode,stopNode)}function getClippingElementAncestors(element$3,cache$1){let cachedResult=cache$1.get(element$3);if(cachedResult)return cachedResult;let result=getOverflowAncestors(element$3,[],!1).filter(el=>isElement(el)&&getNodeName(el)!==`body`),currentContainingBlockComputedStyle=null,elementIsFixed=getComputedStyle$1(element$3).position===`fixed`,currentNode=elementIsFixed?getParentNode(element$3):element$3;for(;isElement(currentNode)&&!isLastTraversableNode(currentNode);){let computedStyle=getComputedStyle$1(currentNode),currentNodeIsContaining=isContainingBlock(currentNode);!currentNodeIsContaining&&computedStyle.position===`fixed`&&(currentContainingBlockComputedStyle=null);let shouldDropCurrentNode=elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&computedStyle.position===`static`&&!!currentContainingBlockComputedStyle&&[`absolute`,`fixed`].includes(currentContainingBlockComputedStyle.position)||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element$3,currentNode);shouldDropCurrentNode?result=result.filter(ancestor=>ancestor!==currentNode):currentContainingBlockComputedStyle=computedStyle,currentNode=getParentNode(currentNode)}return cache$1.set(element$3,result),result}function getClippingRect(_ref){let{element:element$3,boundary,rootBoundary,strategy}=_ref,elementClippingAncestors=boundary===`clippingAncestors`?isTopLayer(element$3)?[]:getClippingElementAncestors(element$3,this._c):[].concat(boundary),clippingAncestors=[...elementClippingAncestors,rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce((accRect,clippingAncestor)=>{let rect=getClientRectFromClippingAncestor(element$3,clippingAncestor,strategy);return accRect.top=max(rect.top,accRect.top),accRect.right=min(rect.right,accRect.right),accRect.bottom=min(rect.bottom,accRect.bottom),accRect.left=max(rect.left,accRect.left),accRect},getClientRectFromClippingAncestor(element$3,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}}function getDimensions(element$3){let{width,height}=getCssDimensions(element$3);return{width,height}}function getRectRelativeToOffsetParent(element$3,offsetParent,strategy){let isOffsetParentAnElement=isHTMLElement(offsetParent),documentElement=getDocumentElement(offsetParent),isFixed=strategy===`fixed`,rect=getBoundingClientRect(element$3,!0,isFixed,offsetParent),scroll={scrollLeft:0,scrollTop:0},offsets=createCoords(0);if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)if((getNodeName(offsetParent)!==`body`||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isOffsetParentAnElement){let offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&(offsets.x=getWindowScrollBarX(documentElement));let htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll):createCoords(0),x$1=rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x,y=rect.top+scroll.scrollTop-offsets.y-htmlOffset.y;return{x:x$1,y,width:rect.width,height:rect.height}}function isStaticPositioned(element$3){return getComputedStyle$1(element$3).position===`static`}function getTrueOffsetParent(element$3,polyfill){if(!isHTMLElement(element$3)||getComputedStyle$1(element$3).position===`fixed`)return null;if(polyfill)return polyfill(element$3);let rawOffsetParent=element$3.offsetParent;return getDocumentElement(element$3)===rawOffsetParent&&(rawOffsetParent=rawOffsetParent.ownerDocument.body),rawOffsetParent}function getOffsetParent(element$3,polyfill){let win$1=getWindow(element$3);if(isTopLayer(element$3))return win$1;if(!isHTMLElement(element$3)){let svgOffsetParent=getParentNode(element$3);for(;svgOffsetParent&&!isLastTraversableNode(svgOffsetParent);){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent))return svgOffsetParent;svgOffsetParent=getParentNode(svgOffsetParent)}return win$1}let offsetParent=getTrueOffsetParent(element$3,polyfill);for(;offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent);)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&&isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)?win$1:offsetParent||getContainingBlock(element$3)||win$1}const getElementRects=async function(data$12){let getOffsetParentFn=this.getOffsetParent||getOffsetParent,getDimensionsFn=this.getDimensions,floatingDimensions=await getDimensionsFn(data$12.floating);return{reference:getRectRelativeToOffsetParent(data$12.reference,await getOffsetParentFn(data$12.floating),data$12.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}};function isRTL(element$3){return getComputedStyle$1(element$3).direction===`rtl`}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(a$1,b$1){return a$1.x===b$1.x&&a$1.y===b$1.y&&a$1.width===b$1.width&&a$1.height===b$1.height}function observeMove(element$3,onMove){let io$1=null,timeoutId,root$3=getDocumentElement(element$3);function cleanup(){var _io;clearTimeout(timeoutId),(_io=io$1)==null||_io.disconnect(),io$1=null}function refresh(skip,threshold){skip===void 0&&(skip=!1),threshold===void 0&&(threshold=1),cleanup();let elementRectForRootMargin=element$3.getBoundingClientRect(),{left,top,width,height}=elementRectForRootMargin;if(skip||onMove(),!width||!height)return;let insetTop=floor$1(top),insetRight=floor$1(root$3.clientWidth-(left+width)),insetBottom=floor$1(root$3.clientHeight-(top+height)),insetLeft=floor$1(left),rootMargin=-insetTop+`px `+-insetRight+`px `+-insetBottom+`px `+-insetLeft+`px`,options$1={rootMargin,threshold:max(0,min(1,threshold))||1},isFirstUpdate=!0;function handleObserve(entries){let ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate)return refresh();ratio?refresh(!1,ratio):timeoutId=setTimeout(()=>{refresh(!1,1e-7)},1e3)}ratio===1&&!rectsAreEqual(elementRectForRootMargin,element$3.getBoundingClientRect())&&refresh(),isFirstUpdate=!1}try{io$1=new IntersectionObserver(handleObserve,{...options$1,root:root$3.ownerDocument})}catch{io$1=new IntersectionObserver(handleObserve,options$1)}io$1.observe(element$3)}return refresh(!0),cleanup}function autoUpdate(reference,floating,update,options$1){options$1===void 0&&(options$1={});let{ancestorScroll=!0,ancestorResize=!0,elementResize=typeof ResizeObserver==`function`,layoutShift=typeof IntersectionObserver==`function`,animationFrame=!1}=options$1,referenceEl=unwrapElement$1(reference),ancestors=ancestorScroll||ancestorResize?[...referenceEl?getOverflowAncestors(referenceEl):[],...getOverflowAncestors(floating)]:[];ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.addEventListener(`scroll`,update,{passive:!0}),ancestorResize&&ancestor.addEventListener(`resize`,update)});let cleanupIo=referenceEl&&layoutShift?observeMove(referenceEl,update):null,reobserveFrame=-1,resizeObserver=null;elementResize&&(resizeObserver=new ResizeObserver(_ref=>{let[firstEntry]=_ref;firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&(resizeObserver.unobserve(floating),cancelAnimationFrame(reobserveFrame),reobserveFrame=requestAnimationFrame(()=>{var _resizeObserver;(_resizeObserver=resizeObserver)==null||_resizeObserver.observe(floating)})),update()}),referenceEl&&!animationFrame&&resizeObserver.observe(referenceEl),resizeObserver.observe(floating));let frameId,prevRefRect=animationFrame?getBoundingClientRect(reference):null;animationFrame&&frameLoop();function frameLoop(){let nextRefRect=getBoundingClientRect(reference);prevRefRect&&!rectsAreEqual(prevRefRect,nextRefRect)&&update(),prevRefRect=nextRefRect,frameId=requestAnimationFrame(frameLoop)}return update(),()=>{var _resizeObserver2;ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.removeEventListener(`scroll`,update),ancestorResize&&ancestor.removeEventListener(`resize`,update)}),cleanupIo?.(),(_resizeObserver2=resizeObserver)==null||_resizeObserver2.disconnect(),resizeObserver=null,animationFrame&&cancelAnimationFrame(frameId)}}const offset=offset$1,shift=shift$1,flip=flip$1,size=size$1,hide=hide$1,arrow$1=arrow$2,limitShift=limitShift$1,computePosition=(reference,floating,options$1)=>{let cache$1=new Map,mergedOptions={platform,...options$1},platformWithCache={...mergedOptions.platform,_c:cache$1};return computePosition$1(reference,floating,{...mergedOptions,platform:platformWithCache})};function isComponentPublicInstance(target$1){return typeof target$1==`object`&&!!target$1&&`$el`in target$1}function unwrapElement(target$1){if(isComponentPublicInstance(target$1)){let element$3=target$1.$el;return isNode(element$3)&&getNodeName(element$3)===`#comment`?null:element$3}return target$1}function toValue(source){return typeof source==`function`?source():unref(source)}function arrow(options$1){return{name:`arrow`,options:options$1,fn(args){let element$3=unwrapElement(toValue(options$1.element));return element$3==null?{}:arrow$1({element:element$3,padding:options$1.padding}).fn(args)}}}function getDPR(element$3){if(typeof window>`u`)return 1;let win$1=element$3.ownerDocument.defaultView||window;return win$1.devicePixelRatio||1}function roundByDPR(element$3,value$1){let dpr=getDPR(element$3);return Math.round(value$1*dpr)/dpr}function useFloating(reference,floating,options$1){options$1===void 0&&(options$1={});let whileElementsMountedOption=options$1.whileElementsMounted,openOption=computed(()=>{var _toValue;return(_toValue=toValue(options$1.open))??!0}),middlewareOption=computed(()=>toValue(options$1.middleware)),placementOption=computed(()=>{var _toValue2;return(_toValue2=toValue(options$1.placement))??`bottom`}),strategyOption=computed(()=>{var _toValue3;return(_toValue3=toValue(options$1.strategy))??`absolute`}),transformOption=computed(()=>{var _toValue4;return(_toValue4=toValue(options$1.transform))??!0}),referenceElement=computed(()=>unwrapElement(reference.value)),floatingElement=computed(()=>unwrapElement(floating.value)),x$1=ref(0),y=ref(0),strategy=ref(strategyOption.value),placement=ref(placementOption.value),middlewareData=shallowRef({}),isPositioned=ref(!1),floatingStyles=computed(()=>{let initialStyles={position:strategy.value,left:`0`,top:`0`};if(!floatingElement.value)return initialStyles;let xVal=roundByDPR(floatingElement.value,x$1.value),yVal=roundByDPR(floatingElement.value,y.value);return transformOption.value?{...initialStyles,transform:`translate(`+xVal+`px, `+yVal+`px)`,...getDPR(floatingElement.value)>=1.5&&{willChange:`transform`}}:{position:strategy.value,left:xVal+`px`,top:yVal+`px`}}),whileElementsMountedCleanup;function update(){if(referenceElement.value==null||floatingElement.value==null)return;let open$1=openOption.value;computePosition(referenceElement.value,floatingElement.value,{middleware:middlewareOption.value,placement:placementOption.value,strategy:strategyOption.value}).then(position$2=>{x$1.value=position$2.x,y.value=position$2.y,strategy.value=position$2.strategy,placement.value=position$2.placement,middlewareData.value=position$2.middlewareData,isPositioned.value=open$1!==!1})}function cleanup(){typeof whileElementsMountedCleanup==`function`&&(whileElementsMountedCleanup(),whileElementsMountedCleanup=void 0)}function attach(){if(cleanup(),whileElementsMountedOption===void 0){update();return}if(referenceElement.value!=null&&floatingElement.value!=null){whileElementsMountedCleanup=whileElementsMountedOption(referenceElement.value,floatingElement.value,update);return}}function reset(){openOption.value||(isPositioned.value=!1)}return watch([middlewareOption,placementOption,strategyOption,openOption],update,{flush:`sync`}),watch([referenceElement,floatingElement],attach,{flush:`sync`}),watch(openOption,reset,{flush:`sync`}),getCurrentScope()&&onScopeDispose(cleanup),{x:shallowReadonly(x$1),y:shallowReadonly(y),strategy:shallowReadonly(strategy),placement:shallowReadonly(placement),middlewareData:shallowReadonly(middlewareData),isPositioned:shallowReadonly(isPositioned),floatingStyles,update}}const PopperContentPropsDefaultValue={side:`bottom`,sideOffset:0,sideFlip:!0,align:`center`,alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:`partial`,hideWhenDetached:!1,positionStrategy:`fixed`,updatePositionStrategy:`optimized`,prioritizePosition:!1},[injectPopperContentContext,providePopperContentContext]=createContext(`PopperContent`);var PopperContent_vue_vue_type_script_setup_true_lang_default=defineComponent({inheritAttrs:!1,__name:`PopperContent`,props:mergeDefaults({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...PopperContentPropsDefaultValue}),emits:[`placed`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectPopperRootContext(),{forwardRef,currentElement:contentElement}=useForwardExpose(),floatingRef=ref(),arrow$1$1=ref(),{width:arrowWidth,height:arrowHeight}=useSize(arrow$1$1),desiredPlacement=computed(()=>props.side+(props.align===`center`?``:`-${props.align}`)),collisionPadding=computed(()=>typeof props.collisionPadding==`number`?props.collisionPadding:{top:0,right:0,bottom:0,left:0,...props.collisionPadding}),boundary=computed(()=>Array.isArray(props.collisionBoundary)?props.collisionBoundary:[props.collisionBoundary]),detectOverflowOptions=computed(()=>({padding:collisionPadding.value,boundary:boundary.value.filter(isNotNull),altBoundary:boundary.value.length>0})),flipOptions=computed(()=>({mainAxis:props.sideFlip,crossAxis:props.alignFlip})),computedMiddleware=computedEager(()=>[offset({mainAxis:props.sideOffset+arrowHeight.value,alignmentAxis:props.alignOffset}),props.prioritizePosition&&props.avoidCollisions&&flip({...detectOverflowOptions.value,...flipOptions.value}),props.avoidCollisions&&shift({mainAxis:!0,crossAxis:!!props.prioritizePosition,limiter:props.sticky===`partial`?limitShift():void 0,...detectOverflowOptions.value}),!props.prioritizePosition&&props.avoidCollisions&&flip({...detectOverflowOptions.value,...flipOptions.value}),size({...detectOverflowOptions.value,apply:({elements,rects,availableWidth,availableHeight})=>{let{width:anchorWidth,height:anchorHeight}=rects.reference,contentStyle=elements.floating.style;contentStyle.setProperty(`--reka-popper-available-width`,`${availableWidth}px`),contentStyle.setProperty(`--reka-popper-available-height`,`${availableHeight}px`),contentStyle.setProperty(`--reka-popper-anchor-width`,`${anchorWidth}px`),contentStyle.setProperty(`--reka-popper-anchor-height`,`${anchorHeight}px`)}}),arrow$1$1.value&&arrow({element:arrow$1$1.value,padding:props.arrowPadding}),transformOrigin({arrowWidth:arrowWidth.value,arrowHeight:arrowHeight.value}),props.hideWhenDetached&&hide({strategy:`referenceHidden`,...detectOverflowOptions.value})]),reference=computed(()=>props.reference??rootContext.anchor.value),{floatingStyles,placement,isPositioned,middlewareData,update}=useFloating(reference,floatingRef,{strategy:props.positionStrategy,placement:desiredPlacement,whileElementsMounted:(...args)=>{let cleanup=autoUpdate(...args,{layoutShift:!props.disableUpdateOnLayoutShift,animationFrame:props.updatePositionStrategy===`always`});return cleanup},middleware:computedMiddleware}),placedSide=computed(()=>getSideAndAlignFromPlacement(placement.value)[0]),placedAlign=computed(()=>getSideAndAlignFromPlacement(placement.value)[1]);watchPostEffect(()=>{isPositioned.value&&emits(`placed`)});let cannotCenterArrow=computed(()=>middlewareData.value.arrow?.centerOffset!==0),contentZIndex=ref(``);watchEffect(()=>{contentElement.value&&(contentZIndex.value=window.getComputedStyle(contentElement.value).zIndex)});let arrowX=computed(()=>middlewareData.value.arrow?.x??0),arrowY=computed(()=>middlewareData.value.arrow?.y??0);return providePopperContentContext({placedSide,onArrowChange:element$3=>arrow$1$1.value=element$3,arrowX,arrowY,shouldHideArrow:cannotCenterArrow}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`floatingRef`,ref:floatingRef,"data-reka-popper-content-wrapper":``,style:normalizeStyle({...unref(floatingStyles),transform:unref(isPositioned)?unref(floatingStyles).transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:contentZIndex.value,"--reka-popper-transform-origin":[unref(middlewareData).transformOrigin?.x,unref(middlewareData).transformOrigin?.y].join(` `),...unref(middlewareData).hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}})},[createVNode(unref(Primitive),mergeProps({ref:unref(forwardRef)},_ctx.$attrs,{"as-child":props.asChild,as:_ctx.as,"data-side":placedSide.value,"data-align":placedAlign.value,style:{animation:unref(isPositioned)?void 0:`none`}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`as-child`,`as`,`data-side`,`data-align`,`style`])],4))}}),PopperContent_default=PopperContent_vue_vue_type_script_setup_true_lang_default;const OPPOSITE_SIDE={top:`bottom`,right:`left`,bottom:`top`,left:`right`};var PopperArrow_vue_vue_type_script_setup_true_lang_default=defineComponent({inheritAttrs:!1,__name:`PopperArrow`,props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(__props){let{forwardRef}=useForwardExpose(),contentContext=injectPopperContentContext(),baseSide=computed(()=>OPPOSITE_SIDE[contentContext.placedSide.value]);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`span`,{ref:el=>{unref(contentContext).onArrowChange(el)},style:normalizeStyle({position:`absolute`,left:unref(contentContext).arrowX?.value?`${unref(contentContext).arrowX?.value}px`:void 0,top:unref(contentContext).arrowY?.value?`${unref(contentContext).arrowY?.value}px`:void 0,[baseSide.value]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[unref(contentContext).placedSide.value],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[unref(contentContext).placedSide.value],visibility:unref(contentContext).shouldHideArrow.value?`hidden`:void 0})},[createVNode(Arrow_default,mergeProps(_ctx.$attrs,{ref:unref(forwardRef),style:{display:`block`},as:_ctx.as,"as-child":_ctx.asChild,rounded:_ctx.rounded,width:_ctx.width,height:_ctx.height}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`as`,`as-child`,`rounded`,`width`,`height`])],4))}}),PopperArrow_default=PopperArrow_vue_vue_type_script_setup_true_lang_default,ComboboxAnchor_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let{forwardRef}=useForwardExpose();return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(PopperAnchor_default),{"as-child":``,reference:_ctx.reference},{default:withCtx(()=>[createVNode(unref(Primitive),mergeProps({ref:unref(forwardRef),"as-child":_ctx.asChild,as:_ctx.as},_ctx.$attrs),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`as-child`,`as`])]),_:3},8,[`reference`]))}}),ComboboxAnchor_default=ComboboxAnchor_vue_vue_type_script_setup_true_lang_default;function valueComparator(value$1,currentValue,comparator){return value$1===void 0?!1:Array.isArray(value$1)?value$1.some(val=>compare(val,currentValue,comparator)):compare(value$1,currentValue,comparator)}function compare(value$1,currentValue,comparator){return value$1===void 0||currentValue===void 0?!1:typeof value$1==`string`?value$1===currentValue:typeof comparator==`function`?comparator(value$1,currentValue):typeof comparator==`string`?value$1?.[comparator]===currentValue?.[comparator]:isEqual(value$1,currentValue)}const[injectListboxRootContext,provideListboxRootContext]=createContext(`ListboxRoot`);var ListboxRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ListboxRoot`,props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:`vertical`},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:`toggle`},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`entryFocus`,`leave`],setup(__props,{expose:__expose,emit:__emit}){let props=__props,emits=__emit,{multiple,highlightOnHover,orientation,disabled,selectionBehavior,dir:propDir}=toRefs(props),{getItems}=useCollection({isProvider:!0}),{handleTypeaheadSearch}=useTypeahead(),{primitiveElement,currentElement}=usePrimitiveElement(),kbd=useKbd(),dir=useDirection(propDir),isFormControl=useFormControl(currentElement),firstValue=ref(),isUserAction=ref(!1),focusable=ref(!0),modelValue=useVModel(props,`modelValue`,emits,{defaultValue:props.defaultValue??(multiple.value?[]:void 0),passive:props.modelValue===void 0,deep:!0});function onValueChange(val){if(isUserAction.value=!0,props.multiple){let modelArray=Array.isArray(modelValue.value)?[...modelValue.value]:[],index$1=modelArray.findIndex(i=>compare(i,val,props.by));props.selectionBehavior===`toggle`?(index$1===-1?modelArray.push(val):modelArray.splice(index$1,1),modelValue.value=modelArray):(modelValue.value=[val],firstValue.value=val)}else props.selectionBehavior===`toggle`&&compare(modelValue.value,val,props.by)?modelValue.value=void 0:modelValue.value=val;setTimeout(()=>{isUserAction.value=!1},1)}let highlightedElement=ref(null),previousElement=ref(null),isVirtual=ref(!1),isComposing=ref(!1),virtualFocusHook=createEventHook(),virtualKeydownHook=createEventHook(),virtualHighlightHook=createEventHook();function getCollectionItem(){return getItems().map(i=>i.ref).filter(i=>i.dataset.disabled!==``)}function changeHighlight(el,scrollIntoView=!0){if(!el)return;highlightedElement.value=el,focusable.value&&highlightedElement.value.focus(),scrollIntoView&&highlightedElement.value.scrollIntoView({block:`nearest`});let highlightedItem=getItems().find(i=>i.ref===el);emits(`highlight`,highlightedItem)}function highlightItem(value$1){if(isVirtual.value)virtualHighlightHook.trigger(value$1);else{let item=getItems().find(i=>compare(i.value,value$1,props.by));item&&(highlightedElement.value=item.ref,changeHighlight(item.ref))}}function onKeydownEnter(event){highlightedElement.value&&highlightedElement.value.isConnected&&(event.preventDefault(),event.stopPropagation(),isComposing.value||highlightedElement.value.click())}function onKeydownTypeAhead(event){if(focusable.value){if(isUserAction.value=!0,isVirtual.value)virtualKeydownHook.trigger(event);else{let isMetaKey=event.altKey||event.ctrlKey||event.metaKey;if(isMetaKey&&event.key===`a`&&multiple.value){let collection=getItems(),values=collection.map(i=>i.value);modelValue.value=[...values],event.preventDefault(),changeHighlight(collection[collection.length-1].ref)}else if(!isMetaKey){let el=handleTypeaheadSearch(event.key,getItems());el&&changeHighlight(el)}}setTimeout(()=>{isUserAction.value=!1},1)}}function onCompositionStart$1(){isComposing.value=!0}function onCompositionEnd$1(){nextTick(()=>{isComposing.value=!1})}function highlightFirstItem(){nextTick(()=>{let event=new KeyboardEvent(`keydown`,{key:`PageUp`});onKeydownNavigation(event)})}function onLeave(event){let el=highlightedElement.value;el?.isConnected&&(previousElement.value=el),highlightedElement.value=null,emits(`leave`,event)}function onEnter(event){let entryFocusEvent=new CustomEvent(`listbox.entryFocus`,{bubbles:!1,cancelable:!0});if(event.currentTarget?.dispatchEvent(entryFocusEvent),emits(`entryFocus`,entryFocusEvent),!entryFocusEvent.defaultPrevented)if(previousElement.value)changeHighlight(previousElement.value);else{let el=getCollectionItem()?.[0];changeHighlight(el)}}function onKeydownNavigation(event){let intent=getFocusIntent(event,orientation.value,dir.value);if(!intent)return;let collection=getCollectionItem();if(highlightedElement.value){if(intent===`last`)collection.reverse();else if(intent===`prev`||intent===`next`){intent===`prev`&&collection.reverse();let currentIndex=collection.indexOf(highlightedElement.value);collection=collection.slice(currentIndex+1)}handleMultipleReplace(event,collection[0])}if(collection.length){let index$1=!highlightedElement.value&&intent===`prev`?collection.length-1:0;changeHighlight(collection[index$1])}if(isVirtual.value)return virtualKeydownHook.trigger(event)}function handleMultipleReplace(event,targetEl){if(isVirtual.value||props.selectionBehavior!==`replace`||!multiple.value||!Array.isArray(modelValue.value))return;let isMetaKey=event.altKey||event.ctrlKey||event.metaKey;if(!(isMetaKey&&!event.shiftKey)&&event.shiftKey){let collection=getItems().filter(i=>i.ref.dataset.disabled!==``),lastValue=collection.find(i=>i.ref===targetEl)?.value;if(event.key===kbd.END?lastValue=collection[collection.length-1].value:event.key===kbd.HOME&&(lastValue=collection[0].value),!lastValue||!firstValue.value)return;let values=findValuesBetween(collection.map(i=>i.value),firstValue.value,lastValue);modelValue.value=values}}async function highlightSelected(event){if(await nextTick(),isVirtual.value)virtualFocusHook.trigger(event);else{let collection=getCollectionItem(),item=collection.find(i=>i.dataset.state===`checked`);item?changeHighlight(item):collection.length&&changeHighlight(collection[0])}}return watch(modelValue,()=>{isUserAction.value||nextTick(()=>{highlightSelected()})},{immediate:!0,deep:!0}),__expose({highlightedElement,highlightItem,highlightFirstItem,highlightSelected,getItems}),provideListboxRootContext({modelValue,onValueChange,multiple,orientation,dir,disabled,highlightOnHover,highlightedElement,isVirtual,virtualFocusHook,virtualKeydownHook,virtualHighlightHook,by:props.by,firstValue,selectionBehavior,focusable,onLeave,onEnter,changeHighlight,onKeydownEnter,onKeydownNavigation,onKeydownTypeAhead,onCompositionStart:onCompositionStart$1,onCompositionEnd:onCompositionEnd$1,highlightFirstItem}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{ref_key:`primitiveElement`,ref:primitiveElement,as:_ctx.as,"as-child":_ctx.asChild,dir:unref(dir),"data-disabled":unref(disabled)?``:void 0,onPointerleave:onLeave,onFocusout:_cache$1[0]||=async event=>{let target$1=event.relatedTarget||event.target;await nextTick(),highlightedElement.value&&unref(currentElement)&&!unref(currentElement).contains(target$1)&&onLeave(event)}},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{modelValue:unref(modelValue)}),unref(isFormControl)&&_ctx.name?(openBlock(),createBlock(unref(VisuallyHiddenInput_default),{key:0,name:_ctx.name,value:unref(modelValue),disabled:unref(disabled),required:_ctx.required},null,8,[`name`,`value`,`disabled`,`required`])):createCommentVNode(`v-if`,!0)]),_:3},8,[`as`,`as-child`,`dir`,`data-disabled`]))}}),ListboxRoot_default=ListboxRoot_vue_vue_type_script_setup_true_lang_default,ListboxContent_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ListboxContent`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let{CollectionSlot}=useCollection(),rootContext=injectListboxRootContext(),isClickFocus=refAutoReset(!1,10);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(CollectionSlot),null,{default:withCtx(()=>[createVNode(unref(Primitive),{role:`listbox`,as:_ctx.as,"as-child":_ctx.asChild,tabindex:unref(rootContext).focusable.value?unref(rootContext).highlightedElement.value?`-1`:`0`:void 0,"aria-orientation":unref(rootContext).orientation.value,"aria-multiselectable":!!unref(rootContext).multiple.value,"data-orientation":unref(rootContext).orientation.value,onMousedown:_cache$1[0]||=withModifiers($event=>isClickFocus.value=!0,[`left`]),onFocus:_cache$1[1]||=ev=>{unref(isClickFocus)||unref(rootContext).onEnter(ev)},onKeydown:[_cache$1[2]||=withKeys(withModifiers(event=>{unref(rootContext).focusable.value&&unref(rootContext).onKeydownNavigation(event)},[`prevent`]),[`down`,`up`,`left`,`right`,`home`,`end`]),withKeys(unref(rootContext).onKeydownEnter,[`enter`]),unref(rootContext).onKeydownTypeAhead]},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`as`,`as-child`,`tabindex`,`aria-orientation`,`aria-multiselectable`,`data-orientation`,`onKeydown`])]),_:3}))}}),ListboxContent_default=ListboxContent_vue_vue_type_script_setup_true_lang_default,ListboxFilter_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ListboxFilter`,props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,modelValue=useVModel(props,`modelValue`,emits,{defaultValue:``,passive:props.modelValue===void 0}),rootContext=injectListboxRootContext(),{primitiveElement,currentElement}=usePrimitiveElement(),disabled=computed(()=>props.disabled||rootContext.disabled.value||!1),activedescendant=ref();return watchSyncEffect(()=>activedescendant.value=rootContext.highlightedElement.value?.id),onMounted(()=>{rootContext.focusable.value=!1,setTimeout(()=>{props.autoFocus&¤tElement.value?.focus()},1)}),onUnmounted(()=>{rootContext.focusable.value=!0}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{ref_key:`primitiveElement`,ref:primitiveElement,as:_ctx.as,"as-child":_ctx.asChild,value:unref(modelValue),disabled:disabled.value?``:void 0,"data-disabled":disabled.value?``:void 0,"aria-disabled":disabled.value??void 0,"aria-activedescendant":activedescendant.value,type:`text`,onKeydown:[withKeys(withModifiers(unref(rootContext).onKeydownNavigation,[`prevent`]),[`down`,`up`,`home`,`end`]),withKeys(unref(rootContext).onKeydownEnter,[`enter`])],onInput:_cache$1[0]||=event=>{modelValue.value=event.target.value,unref(rootContext).highlightFirstItem()},onCompositionstart:unref(rootContext).onCompositionStart,onCompositionend:unref(rootContext).onCompositionEnd},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{modelValue:unref(modelValue)})]),_:3},8,[`as`,`as-child`,`value`,`disabled`,`data-disabled`,`aria-disabled`,`aria-activedescendant`,`onKeydown`,`onCompositionstart`,`onCompositionend`]))}}),ListboxFilter_default=ListboxFilter_vue_vue_type_script_setup_true_lang_default;const[injectListboxGroupContext,provideListboxGroupContext]=createContext(`ListboxGroup`);var ListboxGroup_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ListboxGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let props=__props,id=useId(void 0,`reka-listbox-group`);return provideListboxGroupContext({id}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),mergeProps({role:`group`},props,{"aria-labelledby":unref(id)}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`aria-labelledby`]))}}),ListboxGroup_default=ListboxGroup_vue_vue_type_script_setup_true_lang_default;const LISTBOX_SELECT=`listbox.select`,[injectListboxItemContext,provideListboxItemContext]=createContext(`ListboxItem`);var ListboxItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ListboxItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},emits:[`select`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,id=useId(void 0,`reka-listbox-item`),{CollectionItem}=useCollection(),{forwardRef,currentElement}=useForwardExpose(),rootContext=injectListboxRootContext(),isHighlighted=computed(()=>currentElement.value===rootContext.highlightedElement.value),isSelected=computed(()=>valueComparator(rootContext.modelValue.value,props.value,rootContext.by)),disabled=computed(()=>rootContext.disabled.value||props.disabled);async function handleSelect(ev){emits(`select`,ev),!ev?.defaultPrevented&&!disabled.value&&ev&&(rootContext.onValueChange(props.value),rootContext.changeHighlight(currentElement.value))}function handleSelectCustomEvent(ev){let eventDetail={originalEvent:ev,value:props.value};handleAndDispatchCustomEvent(LISTBOX_SELECT,handleSelect,eventDetail)}return provideListboxItemContext({isSelected}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(CollectionItem),{value:_ctx.value},{default:withCtx(()=>[withMemo([isHighlighted.value,isSelected.value],()=>createVNode(unref(Primitive),mergeProps({id:unref(id)},_ctx.$attrs,{ref:unref(forwardRef),role:`option`,tabindex:unref(rootContext).focusable.value?isHighlighted.value?`0`:`-1`:-1,"aria-selected":isSelected.value,as:_ctx.as,"as-child":_ctx.asChild,disabled:disabled.value?``:void 0,"data-disabled":disabled.value?``:void 0,"data-highlighted":isHighlighted.value?``:void 0,"data-state":isSelected.value?`checked`:`unchecked`,onClick:handleSelectCustomEvent,onKeydown:withKeys(withModifiers(handleSelectCustomEvent,[`prevent`]),[`space`]),onPointermove:_cache$1[0]||=event=>{unref(rootContext).highlightedElement.value!==unref(currentElement)&&(unref(rootContext).highlightOnHover.value?unref(rootContext).changeHighlight(unref(currentElement),!1):unref(rootContext).focusable.value||unref(rootContext).changeHighlight(unref(currentElement),!1))}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`id`,`tabindex`,`aria-selected`,`as`,`as-child`,`disabled`,`data-disabled`,`data-highlighted`,`data-state`,`onKeydown`]),_cache$1,1)]),_:3},8,[`value`]))}}),ListboxItem_default=ListboxItem_vue_vue_type_script_setup_true_lang_default,ListboxItemIndicator_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ListboxItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(__props){let props=__props;useForwardExpose();let itemContext=injectListboxItemContext();return(_ctx,_cache$1)=>unref(itemContext).isSelected.value?(openBlock(),createBlock(unref(Primitive),mergeProps({key:0,"aria-hidden":`true`},props),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16)):createCommentVNode(`v-if`,!0)}}),ListboxItemIndicator_default=ListboxItemIndicator_vue_vue_type_script_setup_true_lang_default;const[injectComboboxRootContext,provideComboboxRootContext]=createContext(`ComboboxRoot`);var ComboboxRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`update:open`],setup(__props,{expose:__expose,emit:__emit}){let props=__props,emits=__emit,{primitiveElement,currentElement:parentElement}=usePrimitiveElement(),{multiple,disabled,ignoreFilter,resetSearchTermOnSelect,openOnFocus,openOnClick,dir:propDir}=toRefs(props),dir=useDirection(propDir),modelValue=useVModel(props,`modelValue`,emits,{defaultValue:props.defaultValue??(multiple.value?[]:void 0),passive:props.modelValue===void 0,deep:!0}),open$1=useVModel(props,`open`,emits,{defaultValue:props.defaultOpen,passive:props.open===void 0});async function onOpenChange(val){open$1.value=val,filterSearch.value=``,val?(await nextTick(),primitiveElement.value?.highlightSelected(),isUserInputted.value=!0):isUserInputted.value=!1,inputElement.value?.focus(),setTimeout(()=>{!val&&props.resetSearchTermOnBlur&&resetSearchTerm.trigger()},1)}let resetSearchTerm=createEventHook(),isUserInputted=ref(!1),isVirtual=ref(!1),inputElement=ref(),triggerElement=ref(),highlightedElement=computed(()=>primitiveElement.value?.highlightedElement??void 0),allItems=ref(new Map),allGroups=ref(new Map),{contains}=useFilter({sensitivity:`base`}),filterSearch=ref(``),filterState=computed(oldValue=>{if(!filterSearch.value||props.ignoreFilter||isVirtual.value)return{count:allItems.value.size,items:oldValue?.items??new Map,groups:oldValue?.groups??new Set(allGroups.value.keys())};let itemCount=0,filteredItems=new Map,filteredGroups=new Set;for(let[id,value$1]of allItems.value){let score=contains(value$1,filterSearch.value);filteredItems.set(id,score?1:0),score&&itemCount++}for(let[groupId,group]of allGroups.value)for(let itemId of group)if(filteredItems.get(itemId)>0){filteredGroups.add(groupId);break}return{count:itemCount,items:filteredItems,groups:filteredGroups}}),inst=getCurrentInstance();return onMounted(()=>{inst?.exposed&&(inst.exposed.highlightItem=primitiveElement.value?.highlightItem,inst.exposed.highlightFirstItem=primitiveElement.value?.highlightFirstItem,inst.exposed.highlightSelected=primitiveElement.value?.highlightSelected)}),__expose({filtered:filterState,highlightedElement,highlightItem:primitiveElement.value?.highlightItem,highlightFirstItem:primitiveElement.value?.highlightFirstItem,highlightSelected:primitiveElement.value?.highlightSelected}),provideComboboxRootContext({modelValue,multiple,disabled,open:open$1,onOpenChange,contentId:``,isUserInputted,isVirtual,inputElement,highlightedElement,onInputElementChange:val=>inputElement.value=val,triggerElement,onTriggerElementChange:val=>triggerElement.value=val,parentElement,resetSearchTermOnSelect,onResetSearchTerm:resetSearchTerm.on,allItems,allGroups,filterSearch,filterState,ignoreFilter,openOnFocus,openOnClick}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(PopperRoot_default),null,{default:withCtx(()=>[createVNode(unref(ListboxRoot_default),mergeProps({ref_key:`primitiveElement`,ref:primitiveElement},_ctx.$attrs,{modelValue:unref(modelValue),"onUpdate:modelValue":_cache$1[0]||=$event=>isRef(modelValue)?modelValue.value=$event:null,style:{pointerEvents:unref(open$1)?`auto`:void 0},as:_ctx.as,"as-child":_ctx.asChild,dir:unref(dir),multiple:unref(multiple),name:_ctx.name,required:_ctx.required,disabled:unref(disabled),"highlight-on-hover":!0,by:props.by,onHighlight:_cache$1[1]||=$event=>emits(`highlight`,$event)}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{open:unref(open$1),modelValue:unref(modelValue)})]),_:3},16,[`modelValue`,`style`,`as`,`as-child`,`dir`,`multiple`,`name`,`required`,`disabled`,`by`])]),_:3}))}}),ComboboxRoot_default=ComboboxRoot_vue_vue_type_script_setup_true_lang_default;const[injectComboboxContentContext,provideComboboxContentContext]=createContext(`ComboboxContent`);var ComboboxContentImpl_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxContentImpl`,props:{position:{type:String,required:!1,default:`inline`},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,{position:position$2}=toRefs(props),rootContext=injectComboboxRootContext(),{forwardRef,currentElement}=useForwardExpose();useBodyScrollLock(props.bodyLock),useHideOthers(rootContext.parentElement);let pickedProps=computed(()=>props.position===`popper`?props:{}),forwardedProps=useForwardProps(pickedProps.value),popperStyle={boxSizing:`border-box`,"--reka-combobox-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-combobox-content-available-width":`var(--reka-popper-available-width)`,"--reka-combobox-content-available-height":`var(--reka-popper-available-height)`,"--reka-combobox-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-combobox-trigger-height":`var(--reka-popper-anchor-height)`};provideComboboxContentContext({position:position$2});let isInputWithinContent=ref(!1);return onMounted(()=>{rootContext.inputElement.value&&(isInputWithinContent.value=currentElement.value.contains(rootContext.inputElement.value),isInputWithinContent.value&&rootContext.inputElement.value.focus())}),onUnmounted(()=>{isInputWithinContent.value&&rootContext.triggerElement.value?.focus()}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(ListboxContent_default),{"as-child":``},{default:withCtx(()=>[createVNode(unref(DismissableLayer_default),{"as-child":``,"disable-outside-pointer-events":_ctx.disableOutsidePointerEvents,onDismiss:_cache$1[0]||=$event=>unref(rootContext).onOpenChange(!1),onFocusOutside:_cache$1[1]||=ev=>{unref(rootContext).parentElement.value?.contains(ev.target)&&ev.preventDefault(),emits(`focusOutside`,ev)},onInteractOutside:_cache$1[2]||=$event=>emits(`interactOutside`,$event),onEscapeKeyDown:_cache$1[3]||=$event=>emits(`escapeKeyDown`,$event),onPointerDownOutside:_cache$1[4]||=ev=>{unref(rootContext).parentElement.value?.contains(ev.target)&&ev.preventDefault(),emits(`pointerDownOutside`,ev)}},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(position$2)===`popper`?unref(PopperContent_default):unref(Primitive)),mergeProps({..._ctx.$attrs,...unref(forwardedProps)},{id:unref(rootContext).contentId,ref:unref(forwardRef),"data-state":unref(rootContext).open.value?`open`:`closed`,style:{display:`flex`,flexDirection:`column`,outline:`none`,...unref(position$2)===`popper`?popperStyle:{}}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`id`,`data-state`,`style`]))]),_:3},8,[`disable-outside-pointer-events`])]),_:3}))}}),ComboboxContentImpl_default=ComboboxContentImpl_vue_vue_type_script_setup_true_lang_default,ComboboxContent_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxContent`,props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,forwarded=useForwardPropsEmits(props,emits),{forwardRef}=useForwardExpose(),rootContext=injectComboboxRootContext();return rootContext.contentId||=useId(void 0,`reka-combobox-content`),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Presence_default),{present:_ctx.forceMount||unref(rootContext).open.value},{default:withCtx(()=>[createVNode(ComboboxContentImpl_default,mergeProps({...unref(forwarded),..._ctx.$attrs},{ref:unref(forwardRef)}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16)]),_:3},8,[`present`]))}}),ComboboxContent_default=ComboboxContent_vue_vue_type_script_setup_true_lang_default,ComboboxEmpty_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxEmpty`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let props=__props,rootContext=injectComboboxRootContext(),isRender=computed(()=>rootContext.ignoreFilter.value?rootContext.allItems.value.size===0:rootContext.filterState.value.count===0);return(_ctx,_cache$1)=>isRender.value?(openBlock(),createBlock(unref(Primitive),normalizeProps(mergeProps({key:0},props)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{},()=>[_cache$1[0]||=createTextVNode(`No options`)])]),_:3},16)):createCommentVNode(`v-if`,!0)}}),ComboboxEmpty_default=ComboboxEmpty_vue_vue_type_script_setup_true_lang_default;const[injectComboboxGroupContext,provideComboboxGroupContext]=createContext(`ComboboxGroup`);var ComboboxGroup_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxGroup`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let props=__props,id=useId(void 0,`reka-combobox-group`),rootContext=injectComboboxRootContext(),isRender=computed(()=>rootContext.ignoreFilter.value?!0:rootContext.filterSearch.value?rootContext.filterState.value.groups.has(id):!0),context$1=provideComboboxGroupContext({id,labelId:``});return onMounted(()=>{rootContext.allGroups.value.has(id)||rootContext.allGroups.value.set(id,new Set)}),onUnmounted(()=>{rootContext.allGroups.value.delete(id)}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(ListboxGroup_default),mergeProps({id:unref(id),"aria-labelledby":unref(context$1).labelId},props,{hidden:isRender.value?void 0:!0}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`,`hidden`]))}}),ComboboxGroup_default=ComboboxGroup_vue_vue_type_script_setup_true_lang_default,ComboboxInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxInput`,props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectComboboxRootContext(),listboxContext=injectListboxRootContext(),{primitiveElement,currentElement}=usePrimitiveElement(),modelValue=useVModel(props,`modelValue`,emits,{passive:props.modelValue===void 0});onMounted(()=>{currentElement.value&&rootContext.onInputElementChange(currentElement.value)});function handleKeyDown(ev){rootContext.open.value||rootContext.onOpenChange(!0)}function handleInput(event){let target$1=event.target;rootContext.open.value?rootContext.filterSearch.value=target$1.value:(rootContext.onOpenChange(!0),nextTick(()=>{target$1.value&&(rootContext.filterSearch.value=target$1.value,listboxContext.highlightFirstItem())}))}function handleFocus(){rootContext.openOnFocus.value&&!rootContext.open.value&&rootContext.onOpenChange(!0)}function handleClick(){rootContext.openOnClick.value&&!rootContext.open.value&&rootContext.onOpenChange(!0)}function resetSearchTerm(){let rootModelValue=rootContext.modelValue.value;props.displayValue?modelValue.value=props.displayValue(rootModelValue):!rootContext.multiple.value&&rootModelValue&&!Array.isArray(rootModelValue)?typeof rootModelValue==`object`?modelValue.value=``:modelValue.value=rootModelValue.toString():modelValue.value=``,nextTick(()=>{modelValue.value=modelValue.value})}return rootContext.onResetSearchTerm(()=>{resetSearchTerm()}),watch(rootContext.modelValue,async()=>{!rootContext.isUserInputted.value&&rootContext.resetSearchTermOnSelect.value&&resetSearchTerm()},{immediate:!0,deep:!0}),watch(rootContext.filterState,()=>{rootContext.isVirtual.value||listboxContext.highlightFirstItem()}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(ListboxFilter_default),{ref_key:`primitiveElement`,ref:primitiveElement,modelValue:unref(modelValue),"onUpdate:modelValue":_cache$1[0]||=$event=>isRef(modelValue)?modelValue.value=$event:null,as:_ctx.as,"as-child":_ctx.asChild,"auto-focus":_ctx.autoFocus,disabled:_ctx.disabled,"aria-expanded":unref(rootContext).open.value,"aria-controls":unref(rootContext).contentId,"aria-autocomplete":`list`,role:`combobox`,autocomplete:`off`,onClick:handleClick,onInput:handleInput,onKeydown:withKeys(withModifiers(handleKeyDown,[`prevent`]),[`down`,`up`]),onFocus:handleFocus},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`modelValue`,`as`,`as-child`,`auto-focus`,`disabled`,`aria-expanded`,`aria-controls`,`onKeydown`]))}}),ComboboxInput_default=ComboboxInput_vue_vue_type_script_setup_true_lang_default,ComboboxItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxItem`,props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,id=useId(void 0,`reka-combobox-item`),rootContext=injectComboboxRootContext(),groupContext=injectComboboxGroupContext(null),{primitiveElement,currentElement}=usePrimitiveElement();if(props.value===``)throw Error(`A must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.`);let isRender=computed(()=>{if(rootContext.isVirtual.value||rootContext.ignoreFilter.value||!rootContext.filterSearch.value)return!0;{let filteredCurrentItem=rootContext.filterState.value.items.get(id);return filteredCurrentItem===void 0?!0:filteredCurrentItem>0}});return onMounted(()=>{rootContext.allItems.value.set(id,props.textValue||currentElement.value.textContent||currentElement.value.innerText);let groupId=groupContext?.id;groupId&&(rootContext.allGroups.value.has(groupId)?rootContext.allGroups.value.get(groupId)?.add(id):rootContext.allGroups.value.set(groupId,new Set([id])))}),onUnmounted(()=>{rootContext.allItems.value.delete(id)}),(_ctx,_cache$1)=>isRender.value?(openBlock(),createBlock(unref(ListboxItem_default),mergeProps({key:0},props,{id:unref(id),ref_key:`primitiveElement`,ref:primitiveElement,disabled:unref(rootContext).disabled.value||_ctx.disabled,onSelect:_cache$1[0]||=event=>{emits(`select`,event),!event.defaultPrevented&&!unref(rootContext).multiple.value&&!_ctx.disabled&&!unref(rootContext).disabled.value&&(event.preventDefault(),unref(rootContext).onOpenChange(!1),unref(rootContext).modelValue.value=props.value)}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{},()=>[createTextVNode(toDisplayString(_ctx.value),1)])]),_:3},16,[`id`,`disabled`])):createCommentVNode(`v-if`,!0)}}),ComboboxItem_default=ComboboxItem_vue_vue_type_script_setup_true_lang_default,ComboboxItemIndicator_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(__props){let props=__props;return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(ListboxItemIndicator_default),normalizeProps(guardReactiveProps(props)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}}),ComboboxItemIndicator_default=ComboboxItemIndicator_vue_vue_type_script_setup_true_lang_default,ComboboxLabel_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxLabel`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(__props){let props=__props;useForwardExpose();let groupContext=injectComboboxGroupContext({id:``,labelId:``});return groupContext.labelId||=useId(void 0,`reka-combobox-group-label`),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),mergeProps(props,{id:unref(groupContext).labelId}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`id`]))}}),ComboboxLabel_default=ComboboxLabel_vue_vue_type_script_setup_true_lang_default,ComboboxSeparator_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let props=__props;return useForwardExpose(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),mergeProps(props,{"aria-hidden":`true`}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}}),ComboboxSeparator_default=ComboboxSeparator_vue_vue_type_script_setup_true_lang_default,ComboboxTrigger_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(__props){let props=__props,{forwardRef,currentElement}=useForwardExpose(),rootContext=injectComboboxRootContext(),disabled=computed(()=>props.disabled||rootContext.disabled.value||!1);return onMounted(()=>{currentElement.value&&rootContext.onTriggerElementChange(currentElement.value)}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),mergeProps(props,{ref:unref(forwardRef),type:_ctx.as===`button`?`button`:void 0,tabindex:`-1`,"aria-label":`Show popup`,"aria-haspopup":`listbox`,"aria-expanded":unref(rootContext).open.value,"aria-controls":unref(rootContext).contentId,"data-state":unref(rootContext).open.value?`open`:`closed`,disabled:disabled.value,"data-disabled":disabled.value?``:void 0,"aria-disabled":disabled.value??void 0,onClick:_cache$1[0]||=$event=>unref(rootContext).onOpenChange(!unref(rootContext).open.value)}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`aria-disabled`]))}}),ComboboxTrigger_default=ComboboxTrigger_vue_vue_type_script_setup_true_lang_default;function useNonce(nonce){let context$1=injectConfigProviderContext({nonce:ref()});return computed(()=>nonce?.value||context$1.nonce?.value)}var ComboboxViewport_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ComboboxViewport`,props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(__props){let props=__props,{forwardRef}=useForwardExpose(),{nonce:propNonce}=toRefs(props),nonce=useNonce(propNonce),rootContext=injectComboboxRootContext();return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(Primitive),mergeProps({..._ctx.$attrs,...props},{ref:unref(forwardRef),"data-reka-combobox-viewport":``,role:`presentation`,style:{position:`relative`,flex:unref(rootContext).isVirtual.value?void 0:1,overflow:`auto`}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`style`]),createVNode(unref(Primitive),{as:`style`,nonce:unref(nonce)},{default:withCtx(()=>_cache$1[0]||=[createTextVNode(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-combobox-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-combobox-viewport]::-webkit-scrollbar { display: none; } `)]),_:1,__:[0]},8,[`nonce`])],64))}}),ComboboxViewport_default=ComboboxViewport_vue_vue_type_script_setup_true_lang_default;const[injectSwitchRootContext,provideSwitchRootContext]=createContext(`SwitchRoot`);var SwitchRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SwitchRoot`,props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:`on`},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,{disabled}=toRefs(props),modelValue=useVModel(props,`modelValue`,emit$1,{defaultValue:props.defaultValue,passive:props.modelValue===void 0});function toggleCheck(){disabled.value||(modelValue.value=!modelValue.value)}let{forwardRef,currentElement}=useForwardExpose(),isFormControl=useFormControl(currentElement),ariaLabel=computed(()=>props.id&¤tElement.value?document.querySelector(`[for="${props.id}"]`)?.innerText:void 0);return provideSwitchRootContext({modelValue,toggleCheck,disabled}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),mergeProps(_ctx.$attrs,{id:_ctx.id,ref:unref(forwardRef),role:`switch`,type:_ctx.as===`button`?`button`:void 0,value:_ctx.value,"aria-label":_ctx.$attrs[`aria-label`]||ariaLabel.value,"aria-checked":unref(modelValue),"aria-required":_ctx.required,"data-state":unref(modelValue)?`checked`:`unchecked`,"data-disabled":unref(disabled)?``:void 0,"as-child":_ctx.asChild,as:_ctx.as,disabled:unref(disabled),onClick:toggleCheck,onKeydown:withKeys(withModifiers(toggleCheck,[`prevent`]),[`enter`])}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{modelValue:unref(modelValue)}),unref(isFormControl)&&_ctx.name?(openBlock(),createBlock(unref(VisuallyHiddenInput_default),{key:0,type:`checkbox`,name:_ctx.name,disabled:unref(disabled),required:_ctx.required,value:_ctx.value,checked:!!unref(modelValue)},null,8,[`name`,`disabled`,`required`,`value`,`checked`])):createCommentVNode(`v-if`,!0)]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]))}}),SwitchRoot_default=SwitchRoot_vue_vue_type_script_setup_true_lang_default,SwitchThumb_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SwitchThumb`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(__props){let rootContext=injectSwitchRootContext();return useForwardExpose(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Primitive),{"data-state":unref(rootContext).modelValue?.value?`checked`:`unchecked`,"data-disabled":unref(rootContext).disabled.value?``:void 0,"as-child":_ctx.asChild,as:_ctx.as},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`]))}}),SwitchThumb_default=SwitchThumb_vue_vue_type_script_setup_true_lang_default,TooltipArrow_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TooltipArrow`,props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`svg`}},setup(__props){let props=__props;return useForwardExpose(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(PopperArrow_default),normalizeProps(guardReactiveProps(props)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}}),TooltipArrow_default=TooltipArrow_vue_vue_type_script_setup_true_lang_default;const[injectTooltipProviderContext,provideTooltipProviderContext]=createContext(`TooltipProvider`);var TooltipProvider_vue_vue_type_script_setup_true_lang_default=defineComponent({inheritAttrs:!1,__name:`TooltipProvider`,props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1}},setup(__props){let props=__props,{delayDuration,skipDelayDuration,disableHoverableContent,disableClosingTrigger,ignoreNonKeyboardFocus,disabled}=toRefs(props);useForwardExpose();let isOpenDelayed=ref(!0),isPointerInTransitRef=ref(!1),{start:startTimer,stop:clearTimer}=useTimeoutFn(()=>{isOpenDelayed.value=!0},skipDelayDuration,{immediate:!1});return provideTooltipProviderContext({isOpenDelayed,delayDuration,onOpen(){clearTimer(),isOpenDelayed.value=!1},onClose(){startTimer()},isPointerInTransitRef,disableHoverableContent,disableClosingTrigger,disabled,ignoreNonKeyboardFocus}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`)}}),TooltipProvider_default=TooltipProvider_vue_vue_type_script_setup_true_lang_default;const TOOLTIP_OPEN=`tooltip.open`,[injectTooltipRootContext,provideTooltipRootContext]=createContext(`TooltipRoot`);var TooltipRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TooltipRoot`,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:[`update:open`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit;useForwardExpose();let providerContext=injectTooltipProviderContext(),disableHoverableContent=computed(()=>props.disableHoverableContent??providerContext.disableHoverableContent.value),disableClosingTrigger=computed(()=>props.disableClosingTrigger??providerContext.disableClosingTrigger.value),disableTooltip=computed(()=>props.disabled??providerContext.disabled.value),delayDuration=computed(()=>props.delayDuration??providerContext.delayDuration.value),ignoreNonKeyboardFocus=computed(()=>props.ignoreNonKeyboardFocus??providerContext.ignoreNonKeyboardFocus.value),open$1=useVModel(props,`open`,emit$1,{defaultValue:props.defaultOpen,passive:props.open===void 0});watch(open$1,isOpen=>{providerContext.onClose&&(isOpen?(providerContext.onOpen(),document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))):providerContext.onClose())});let wasOpenDelayedRef=ref(!1),trigger$1=ref(),stateAttribute=computed(()=>open$1.value?wasOpenDelayedRef.value?`delayed-open`:`instant-open`:`closed`),{start:startTimer,stop:clearTimer}=useTimeoutFn(()=>{wasOpenDelayedRef.value=!0,open$1.value=!0},delayDuration,{immediate:!1});function handleOpen(){clearTimer(),wasOpenDelayedRef.value=!1,open$1.value=!0}function handleClose(){clearTimer(),open$1.value=!1}function handleDelayedOpen(){startTimer()}return provideTooltipRootContext({contentId:``,open:open$1,stateAttribute,trigger:trigger$1,onTriggerChange(el){trigger$1.value=el},onTriggerEnter(){providerContext.isOpenDelayed.value?handleDelayedOpen():handleOpen()},onTriggerLeave(){disableHoverableContent.value?handleClose():clearTimer()},onOpen:handleOpen,onClose:handleClose,disableHoverableContent,disableClosingTrigger,disabled:disableTooltip,ignoreNonKeyboardFocus}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(PopperRoot_default),null,{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{open:unref(open$1)})]),_:3}))}}),TooltipRoot_default=TooltipRoot_vue_vue_type_script_setup_true_lang_default,TooltipContentImpl_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TooltipContentImpl`,props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1,default:`top`},sideOffset:{type:Number,required:!1,default:0},align:{type:null,required:!1,default:`center`},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:!0},collisionBoundary:{type:null,required:!1,default:()=>[]},collisionPadding:{type:[Number,Object],required:!1,default:0},arrowPadding:{type:Number,required:!1,default:0},sticky:{type:String,required:!1,default:`partial`},hideWhenDetached:{type:Boolean,required:!1,default:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectTooltipRootContext(),{forwardRef}=useForwardExpose(),slot=useSlots(),defaultSlot=computed(()=>slot.default?.({})),ariaLabel=computed(()=>{if(props.ariaLabel)return props.ariaLabel;let content$2=``;function recursiveTextSearch(node$1){typeof node$1.children==`string`&&node$1.type!==Comment?content$2+=node$1.children:Array.isArray(node$1.children)&&node$1.children.forEach(child=>recursiveTextSearch(child))}return defaultSlot.value?.forEach(node$1=>recursiveTextSearch(node$1)),content$2}),popperContentProps=computed(()=>{let{ariaLabel:_$1,...restProps}=props;return restProps});return onMounted(()=>{useEventListener$1(window,`scroll`,event=>{let target$1=event.target;target$1?.contains(rootContext.trigger.value)&&rootContext.onClose()}),useEventListener$1(window,TOOLTIP_OPEN,rootContext.onClose)}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(DismissableLayer_default),{"as-child":``,"disable-outside-pointer-events":!1,onEscapeKeyDown:_cache$1[0]||=$event=>emits(`escapeKeyDown`,$event),onPointerDownOutside:_cache$1[1]||=event=>{unref(rootContext).disableClosingTrigger.value&&unref(rootContext).trigger.value?.contains(event.target)&&event.preventDefault(),emits(`pointerDownOutside`,event)},onFocusOutside:_cache$1[2]||=withModifiers(()=>{},[`prevent`]),onDismiss:_cache$1[3]||=$event=>unref(rootContext).onClose()},{default:withCtx(()=>[createVNode(unref(PopperContent_default),mergeProps({ref:unref(forwardRef),"data-state":unref(rootContext).stateAttribute.value},{..._ctx.$attrs,...popperContentProps.value},{style:{"--reka-tooltip-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-tooltip-content-available-width":`var(--reka-popper-available-width)`,"--reka-tooltip-content-available-height":`var(--reka-popper-available-height)`,"--reka-tooltip-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-tooltip-trigger-height":`var(--reka-popper-anchor-height)`}}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`),createVNode(unref(VisuallyHidden_default),{id:unref(rootContext).contentId,role:`tooltip`},{default:withCtx(()=>[createTextVNode(toDisplayString(ariaLabel.value),1)]),_:1},8,[`id`])]),_:3},16,[`data-state`])]),_:3}))}}),TooltipContentImpl_default=TooltipContentImpl_vue_vue_type_script_setup_true_lang_default,TooltipContentHoverable_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TooltipContentHoverable`,props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(__props){let props=__props,forwardedProps=useForwardProps(props),{forwardRef,currentElement}=useForwardExpose(),{trigger:trigger$1,onClose}=injectTooltipRootContext(),providerContext=injectTooltipProviderContext(),{isPointerInTransit,onPointerExit}=useGraceArea(trigger$1,currentElement);return providerContext.isPointerInTransitRef=isPointerInTransit,onPointerExit(()=>{onClose()}),(_ctx,_cache$1)=>(openBlock(),createBlock(TooltipContentImpl_default,mergeProps({ref:unref(forwardRef)},unref(forwardedProps)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}}),TooltipContentHoverable_default=TooltipContentHoverable_vue_vue_type_script_setup_true_lang_default,TooltipContent_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TooltipContent`,props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1,default:`top`},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectTooltipRootContext(),forwarded=useForwardPropsEmits(props,emits),{forwardRef}=useForwardExpose();return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Presence_default),{present:_ctx.forceMount||unref(rootContext).open.value},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(rootContext).disableHoverableContent.value?TooltipContentImpl_default:TooltipContentHoverable_default),mergeProps({ref:unref(forwardRef)},unref(forwarded)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),TooltipContent_default=TooltipContent_vue_vue_type_script_setup_true_lang_default,TooltipPortal_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TooltipPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(__props){let props=__props;return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Teleport_default),normalizeProps(guardReactiveProps(props)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))}}),TooltipPortal_default=TooltipPortal_vue_vue_type_script_setup_true_lang_default,TooltipTrigger_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TooltipTrigger`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(__props){let props=__props,rootContext=injectTooltipRootContext(),providerContext=injectTooltipProviderContext();rootContext.contentId||=useId(void 0,`reka-tooltip-content`);let{forwardRef,currentElement:triggerElement}=useForwardExpose(),isPointerDown=ref(!1),hasPointerMoveOpened=ref(!1),tooltipListeners=computed(()=>rootContext.disabled.value?{}:{click:handleClick,focus:handleFocus,pointermove:handlePointerMove,pointerleave:handlePointerLeave,pointerdown:handlePointerDown,blur:handleBlur});onMounted(()=>{rootContext.onTriggerChange(triggerElement.value)});function handlePointerUp(){setTimeout(()=>{isPointerDown.value=!1},1)}function handlePointerDown(){rootContext.open&&!rootContext.disableClosingTrigger.value&&rootContext.onClose(),isPointerDown.value=!0,document.addEventListener(`pointerup`,handlePointerUp,{once:!0})}function handlePointerMove(event){event.pointerType!==`touch`&&!hasPointerMoveOpened.value&&!providerContext.isPointerInTransitRef.value&&(rootContext.onTriggerEnter(),hasPointerMoveOpened.value=!0)}function handlePointerLeave(){rootContext.onTriggerLeave(),hasPointerMoveOpened.value=!1}function handleFocus(event){isPointerDown.value||rootContext.ignoreNonKeyboardFocus.value&&!event.target.matches?.(`:focus-visible`)||rootContext.onOpen()}function handleBlur(){rootContext.onClose()}function handleClick(){rootContext.disableClosingTrigger.value||rootContext.onClose()}return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(PopperAnchor_default),{"as-child":``,reference:_ctx.reference},{default:withCtx(()=>[createVNode(unref(Primitive),mergeProps({ref:unref(forwardRef),"aria-describedby":unref(rootContext).open.value?unref(rootContext).contentId:void 0,"data-state":unref(rootContext).stateAttribute.value,as:_ctx.as,"as-child":props.asChild,"data-grace-area-trigger":``},toHandlers(tooltipListeners.value)),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`aria-describedby`,`data-state`,`as`,`as-child`])]),_:3},8,[`reference`]))}}),TooltipTrigger_default=TooltipTrigger_vue_vue_type_script_setup_true_lang_default,Checkbox_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Checkbox`,props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(SwitchRoot_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,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:withCtx(()=>[createVNode(unref(SwitchThumb_default),{"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`]))}}),Checkbox_default=Checkbox_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$51={class:`line-clamp-1 overflow-hidden text-ellipsis whitespace-nowrap`};var Combobox_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Combobox`,props:mergeModels({options:{},placeholder:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);function toDisplayValue(value$1){let option$1=props.options.flatMap(group=>group.children).find(option$2=>option$2?.value===value$1);return option$1?option$1.label:props.placeholder||``}return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(ComboboxRoot_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,class:`relative w-full`},{default:withCtx(()=>[createVNode(unref(ComboboxAnchor_default),{class:normalizeClass([`w-full inline-flex items-center justify-between rounded-xl border px-3 leading-none h-10 gap-[5px] outline-none`,`text-sm text-neutral-700 dark:text-neutral-200 data-[placeholder]:text-neutral-200`,`bg-white dark:bg-neutral-900 disabled:bg-neutral-100 hover:bg-neutral-50 dark:disabled:bg-neutral-900 dark:hover:bg-neutral-700`,`border-neutral-200 dark:border-neutral-800 border-solid border-2 focus:border-primary-300 dark:focus:border-primary-400/50`,`shadow-sm focus:shadow-[0_0_0_2px] focus:shadow-black`,`transition-colors duration-200 ease-in-out`])},{default:withCtx(()=>[createVNode(unref(ComboboxInput_default),{class:normalizeClass([`!bg-transparent outline-none h-full selection:bg-grass5 placeholder-stone-400 w-full`,`text-neutral-700 dark:text-neutral-200`,`transition-colors duration-200 ease-in-out`]),placeholder:props.placeholder,"display-value":val=>toDisplayValue(val)},null,8,[`placeholder`,`display-value`]),createVNode(unref(ComboboxTrigger_default),null,{default:withCtx(()=>_cache$1[1]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``,class:normalizeClass([`h-4 w-4`,`text-neutral-700 dark:text-neutral-200`,`transition-colors duration-200 ease-in-out`])},null,-1)]),_:1,__:[1]})]),_:1}),createVNode(unref(ComboboxContent_default),{"avoid-collisions":!0,class:normalizeClass([`absolute z-10 w-full mt-1 min-w-[160px] overflow-hidden rounded-xl shadow-sm border will-change-[opacity,transform] max-h-50dvh`,`data-[side=top]:animate-slideDownAndFade data-[side=right]:animate-slideLeftAndFade data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade`,`bg-white dark:bg-neutral-900`,`border-neutral-200 dark:border-neutral-800 border-solid border-2 focus:border-neutral-300 dark:focus:border-neutral-600`])},{default:withCtx(()=>[createVNode(unref(ComboboxViewport_default),{class:`p-[2px]`},{default:withCtx(()=>[createVNode(unref(ComboboxEmpty_default),{class:normalizeClass([`font-medium py-2 px-2`,`text-xs text-neutral-700 dark:text-neutral-200`,`transition-colors duration-200 ease-in-out`])}),(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.options,(group,index$1)=>(openBlock(),createBlock(unref(ComboboxGroup_default),{key:group.name,class:`overflow-x-hidden`},{default:withCtx(()=>[index$1===0?createCommentVNode(``,!0):(openBlock(),createBlock(unref(ComboboxSeparator_default),{key:0,class:`m-[5px] h-[1px] bg-neutral-400`})),createVNode(unref(ComboboxLabel_default),{class:normalizeClass([`px-[25px] text-xs leading-[25px]`,`text-neutral-500 dark:text-neutral-400`,`transition-colors duration-200 ease-in-out`])},{default:withCtx(()=>[createTextVNode(toDisplayString(group.groupLabel),1)]),_:2},1024),(openBlock(!0),createElementBlock(Fragment,null,renderList(group.children,option$1=>(openBlock(),createBlock(unref(ComboboxItem_default),{key:option$1.label,"text-value":option$1.label,value:option$1.value,class:normalizeClass([`leading-none rounded-lg flex items-center h-8 pr-[0.5rem] pl-[1.5rem] relative select-none data-[disabled]:pointer-events-none data-[highlighted]:outline-none`,`data-[highlighted]:bg-neutral-100 dark:data-[highlighted]:bg-neutral-800`,`text-sm text-neutral-700 dark:text-neutral-200 data-[disabled]:text-neutral-400 dark:data-[disabled]:text-neutral-600 data-[highlighted]:text-grass1`,`transition-colors duration-200 ease-in-out`,`cursor-pointer`])},{default:withCtx(()=>[createVNode(unref(ComboboxItemIndicator_default),{class:`absolute left-0 w-[25px] inline-flex items-center justify-center opacity-30`},{default:withCtx(()=>_cache$1[2]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-right-outline":``},null,-1)]),_:1,__:[2]}),createBaseVNode(`span`,_hoisted_1$51,toDisplayString(option$1.label),1)]),_:2},1032,[`text-value`,`value`]))),128))]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,[`modelValue`]))}}),Combobox_default=Combobox_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$50={flex:`~ col gap-4`},_hoisted_2$33={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_3$26={flex:`1`},_hoisted_4$21={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_5$18={class:`text-xs text-neutral-500 dark:text-neutral-400`};var FieldCheckbox_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldCheckbox`,props:mergeModels({label:{},description:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,_hoisted_1$50,[createBaseVNode(`div`,_hoisted_2$33,[createBaseVNode(`div`,_hoisted_3$26,[createBaseVNode(`div`,_hoisted_4$21,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)])]),createBaseVNode(`div`,_hoisted_5$18,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),createVNode(Checkbox_default,{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event},null,8,[`modelValue`])])]))}}),FieldCheckbox_default=FieldCheckbox_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$49=[`type`];var Input_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Input`,props:mergeModels({type:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,type:props.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,_hoisted_1$49)),[[vModelDynamic,modelValue.value]])}}),Input_default=Input_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$48={"max-w-full":``},_hoisted_2$32={flex:`~ col gap-4`},_hoisted_3$25={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$20={key:0,class:`text-red-500`},_hoisted_5$17={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},_hoisted_6$16=[`type`,`placeholder`];var FieldInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldInput`,props:mergeModels({label:{},description:{},placeholder:{},required:{type:Boolean},type:{},inputClass:{},singleLine:{type:Boolean,default:!0}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$48,[createBaseVNode(`label`,_hoisted_2$32,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$25,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$20,`*`))]),createBaseVNode(`div`,_hoisted_5$17,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),_ctx.singleLine?(openBlock(),createBlock(Input_default,{key:0,modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,type:props.type,placeholder:props.placeholder,class:normalizeClass(props.inputClass)},null,8,[`modelValue`,`type`,`placeholder`,`class`])):withDirectives((openBlock(),createElementBlock(`textarea`,{key:1,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,type:props.type,placeholder:props.placeholder,class:normalizeClass(props.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,_hoisted_6$16)),[[vModelText,modelValue.value]])])]))}}),FieldInput_default=FieldInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$47={flex:`~ gap-2`};var InputKeyValue_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`InputKeyValue`,props:mergeModels({name:{},keyPlaceholder:{},valuePlaceholder:{}},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:[`update:propertyKey`,`update:propertyValue`],setup(__props){let props=__props,key$2=useModel(__props,`propertyKey`),value$1=useModel(__props,`propertyValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$47,[createVNode(Input_default,{modelValue:key$2.value,"onUpdate:modelValue":_cache$1[0]||=$event=>key$2.value=$event,placeholder:props.keyPlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`]),createVNode(Input_default,{modelValue:value$1.value,"onUpdate:modelValue":_cache$1[1]||=$event=>value$1.value=$event,placeholder:props.valuePlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`])]))}}),InputKeyValue_default=InputKeyValue_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$46={"max-w-full":``},_hoisted_2$31={flex:`~ col gap-2`},_hoisted_3$24={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$19={key:0,class:`text-red-500`},_hoisted_5$16={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},_hoisted_6$15={flex:`~ col gap-2`},_hoisted_7$10=[`onClick`];var FieldKeyValues_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldKeyValues`,props:mergeModels({label:{},description:{},name:{},keyPlaceholder:{},valuePlaceholder:{},required:{type:Boolean},inputClass:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`remove`,`add`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,keyValues=useModel(__props,`modelValue`),inputKey=ref(``),inputValue=ref(``);return watch([inputKey,inputValue],()=>{emit$1(`add`,inputKey.value,inputValue.value)}),(_ctx,_cache$1)=>{let _directive_auto_animate=resolveDirective(`auto-animate`);return openBlock(),createElementBlock(`div`,_hoisted_1$46,[createBaseVNode(`label`,_hoisted_2$31,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$24,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$19,`*`))]),createBaseVNode(`div`,_hoisted_5$16,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_6$15,[(openBlock(!0),createElementBlock(Fragment,null,renderList(keyValues.value,(keyValue,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,"w-full":``,flex:``,"items-center":``,"gap-2":``},[createVNode(InputKeyValue_default,{"property-key":keyValue.key,"onUpdate:propertyKey":$event=>keyValue.key=$event,"property-value":keyValue.value,"onUpdate:propertyValue":$event=>keyValue.value=$event,"key-placeholder":props.keyPlaceholder,"value-placeholder":props.valuePlaceholder,"w-full":``},null,8,[`property-key`,`onUpdate:propertyKey`,`property-value`,`onUpdate:propertyValue`,`key-placeholder`,`value-placeholder`]),createBaseVNode(`button`,{onClick:$event=>emit$1(`remove`,index$1)},_cache$1[0]||=[createBaseVNode(`div`,{"i-solar:minus-circle-line-duotone":``,size:`6`},null,-1)],8,_hoisted_7$10)]))),128))])),[[_directive_auto_animate]])])])}}}),FieldKeyValues_default=FieldKeyValues_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$45=[`min`,`max`,`step`];var Range_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Range`,props:mergeModels({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(__props){let props=__props,modelValue=useModel(__props,`modelValue`),scaledMin=computed(()=>props.min*1e4),scaledMax=computed(()=>props.max*1e4),scaledStep=computed(()=>props.step*1e4),sliderRef=ref(),sliderValue=computed({get:()=>modelValue.value*1e4,set:value$1=>{modelValue.value=value$1/1e4,updateTrackColor()}});onMounted(()=>updateTrackColor()),watch(sliderValue,()=>updateTrackColor(),{immediate:!0}),watch([scaledMin,scaledMax,scaledStep],()=>updateTrackColor(),{immediate:!0});function updateTrackColor(){sliderRef.value&&(sliderRef.value.style.setProperty(`--value`,sliderValue.value.toString()),sliderRef.value.style.setProperty(`--min`,sliderRef.value.min?sliderRef.value.min:props.min.toString()),sliderRef.value.style.setProperty(`--max`,sliderRef.value.max?sliderRef.value.max:props.max.toString()))}function handleInput(e$4){let target$1=e$4.target;target$1.style.setProperty(`--value`,target$1.value)}return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{ref_key:`sliderRef`,ref:sliderRef,"onUpdate:modelValue":_cache$1[0]||=$event=>sliderValue.value=$event,type:`range`,min:scaledMin.value,max:scaledMax.value,step:scaledStep.value,class:`slider-progress form_input-range`,onInput:handleInput},null,40,_hoisted_1$45)),[[vModelText,sliderValue.value,void 0,{number:!0}]])}}),__plugin_vue_export_helper_default=(sfc,props)=>{let target$1=sfc.__vccOpts||sfc;for(let[key$2,val]of props)target$1[key$2]=val;return target$1},Range_default=__plugin_vue_export_helper_default(Range_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-3a236ac7`]]);const _hoisted_1$44={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_2$30={flex:`1`},_hoisted_3$23={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$18={class:`text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_5$15={"font-mono":``},_hoisted_6$14={flex:`~ row`,"items-center":``,"gap-2":``};var FieldRange_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldRange`,props:mergeModels({min:{},max:{},step:{},label:{},description:{},formatValue:{},as:{default:`label`}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(props.as,{flex:`~ col gap-4`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$44,[createBaseVNode(`div`,_hoisted_2$30,[createBaseVNode(`div`,_hoisted_3$23,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(_ctx.label),1)])]),createBaseVNode(`div`,_hoisted_4$18,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(_ctx.description),1)])])]),createBaseVNode(`span`,_hoisted_5$15,toDisplayString(props.formatValue?.(modelValue.value)||modelValue.value),1)]),createBaseVNode(`div`,_hoisted_6$14,[createVNode(Range_default,{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,min:_ctx.min||0,max:_ctx.max||1,step:_ctx.step||.01,"w-full":``},null,8,[`modelValue`,`min`,`max`,`step`])])]),_:3}))}}),FieldRange_default=FieldRange_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$43={flex:`~ col gap-4`},_hoisted_2$29={class:`flex items-center gap-1 break-words text-sm font-medium`},_hoisted_3$22={class:`break-words text-xs text-neutral-500 dark:text-neutral-400`};var FieldSelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldSelect`,props:mergeModels({label:{},description:{},options:{},placeholder:{},disabled:{type:Boolean},layout:{default:`horizontal`},selectClass:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,_hoisted_1$43,[createBaseVNode(`div`,{class:normalizeClass([`items-center justify-center`,[props.layout===`horizontal`?`grid grid-cols-3 gap-2`:`grid grid-cols-2 gap-2`]])},[createBaseVNode(`div`,{class:normalizeClass([`w-full`,[props.layout===`horizontal`?`col-span-2`:`row-span-1`]])},[createBaseVNode(`div`,_hoisted_2$29,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)])]),createBaseVNode(`div`,_hoisted_3$22,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])],2),renderSlot(_ctx.$slots,`default`,{},()=>[createVNode(unref(Select_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,options:props.options?.filter(option$1=>option$1.label&&option$1.value)||[],placeholder:props.placeholder,disabled:props.disabled,title:_ctx.label,class:normalizeClass([...props.selectClass?typeof props.selectClass==`string`?[props.selectClass]:props.selectClass:[],props.layout===`horizontal`?`col-span-1`:`row-span-2`])},{default:withCtx(({value:value$1})=>[createTextVNode(toDisplayString(props.options?.find(option$1=>option$1.value===value$1)?.label||props.placeholder),1)]),_:1},8,[`modelValue`,`options`,`placeholder`,`disabled`,`title`,`class`])])],2)]))}}),FieldSelect_default=FieldSelect_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$42={class:`max-w-full`},_hoisted_2$28={class:`flex flex-col gap-2`},_hoisted_3$21={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$17={key:0,class:`text-red-500`},_hoisted_5$14={class:`text-nowrap text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_6$13={class:`~ col gap-2`},_hoisted_7$9=[`onClick`];var FieldValues_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FieldValues`,props:mergeModels({label:{},description:{},name:{},valuePlaceholder:{},required:{type:Boolean},inputClass:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`remove`,`add`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,items=useModel(__props,`modelValue`);function addItem(){items.value.push(``),emit$1(`add`)}function removeItem(index$1){items.value.splice(index$1,1),emit$1(`remove`,index$1)}return(_ctx,_cache$1)=>{let _directive_auto_animate=resolveDirective(`auto-animate`);return openBlock(),createElementBlock(`div`,_hoisted_1$42,[createBaseVNode(`label`,_hoisted_2$28,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$21,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$17,`*`))]),createBaseVNode(`div`,_hoisted_5$14,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_6$13,[(openBlock(!0),createElementBlock(Fragment,null,renderList(items.value,(_$1,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,class:`w-full flex items-center gap-2`},[createVNode(Input_default,{modelValue:items.value[index$1],"onUpdate:modelValue":$event=>items.value[index$1]=$event,placeholder:props.valuePlaceholder,class:`w-90%`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`]),createBaseVNode(`button`,{"i-solar:minus-circle-line-duotone":``,size:`6`,class:`min-w-20px w-10% flex text-red-500`,onClick:$event=>removeItem(index$1)},null,8,_hoisted_7$9)]))),128)),createBaseVNode(`div`,{"i-solar:add-circle-line-duotone":``,size:`6`,class:`mt-2 w-4/5 text-blue-500`,onClick:addItem})])),[[_directive_auto_animate]])])])}}}),FieldValues_default=FieldValues_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$41=[`disabled`];var ColorHueRange_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ColorHueRange`,props:mergeModels({disabled:{type:Boolean},class:{}},{colorValue:{type:String,default:``},colorValueModifiers:{}}),emits:[`update:colorValue`],setup(__props){let props=__props,colorValue=useModel(__props,`colorValue`);return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>colorValue.value=$event,type:`range`,min:`0`,max:`360`,step:`0.01`,class:normalizeClass([`color-hue-range`,[props.disabled?`opacity-25 cursor-not-allowed`:`cursor-pointer`,props.class||``]]),transition:`all ease-in-out duration-250`,disabled:props.disabled},null,10,_hoisted_1$41)),[[vModelText,colorValue.value]])}}),ColorHueRange_default=__plugin_vue_export_helper_default(ColorHueRange_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-3d01d2fa`]]);const _hoisted_1$40=[`min`,`max`,`step`];var RoundRange_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RoundRange`,props:mergeModels({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`),scaledMin=computed(()=>props.min*1e4),scaledMax=computed(()=>props.max*1e4),scaledStep=computed(()=>props.step*1e4),sliderRef=ref(),sliderValue=computed({get:()=>modelValue.value*1e4,set:value$1=>{modelValue.value=value$1/1e4,updateTrackColor()}});onMounted(()=>updateTrackColor()),watch(sliderValue,()=>updateTrackColor(),{immediate:!0}),watch([scaledMin,scaledMax,scaledStep],()=>updateTrackColor(),{immediate:!0});function updateTrackColor(){sliderRef.value&&(sliderRef.value.style.setProperty(`--value`,sliderValue.value.toString()),sliderRef.value.style.setProperty(`--min`,sliderRef.value.min?sliderRef.value.min:props.min.toString()),sliderRef.value.style.setProperty(`--max`,sliderRef.value.max?sliderRef.value.max:props.max.toString()))}function handleInput(e$4){let target$1=e$4.target;target$1.style.setProperty(`--value`,target$1.value)}return(_ctx,_cache$1)=>withDirectives((openBlock(),createElementBlock(`input`,{ref_key:`sliderRef`,ref:sliderRef,"onUpdate:modelValue":_cache$1[0]||=$event=>sliderValue.value=$event,type:`range`,min:scaledMin.value,max:scaledMax.value,step:scaledStep.value,class:`slider-progress form_input-round-range`,onInput:handleInput},null,40,_hoisted_1$40)),[[vModelText,sliderValue.value,void 0,{number:!0}]])}}),RoundRange_default=__plugin_vue_export_helper_default(RoundRange_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-ac8cc218`]]),Select_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Select`,props:mergeModels({options:{},placeholder:{},disabled:{type:Boolean},title:{},layout:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,show=ref(!1),modelValue=useModel(__props,`modelValue`);function selectOption(value$1){modelValue.value=value$1}function handleHide(){show.value=!1}return provide(`selectOption`,selectOption),provide(`hide`,handleHide),(_ctx,_cache$1)=>(openBlock(),createBlock(Combobox_default,{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,"default-value":modelValue.value,options:[{groupLabel:``,children:props.options}]},null,8,[`modelValue`,`default-value`,`options`]))}}),Select_default=Select_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$39={op50:``};var Collapsable_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Collapsable`,props:mergeModels({default:{type:Boolean},label:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,visible=useModel(__props,`modelValue`);watchEffect(()=>{props.default!=null&&(visible.value=!!props.default)});function setVisible(value$1){return visible.value=value$1,value$1}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,null,[renderSlot(_ctx.$slots,`trigger`,normalizeProps(guardReactiveProps({visible:visible.value,setVisible})),()=>[createBaseVNode(`button`,{sticky:``,"top-0":``,"z-10":``,flex:``,"items-center":``,"justify-between":``,px2:``,py1:``,"text-sm":``,"backdrop-blur-xl":``,onClick:_cache$1[0]||=$event=>visible.value=!visible.value},[createBaseVNode(`span`,null,toDisplayString(props.label??`Collapsable`),1),_cache$1[1]||=createTextVNode(),createBaseVNode(`span`,_hoisted_1$39,toDisplayString(visible.value?`▲`:`▼`),1)])]),createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[visible.value?renderSlot(_ctx.$slots,`default`,normalizeProps(mergeProps({key:0},{visible:visible.value,setVisible}))):createCommentVNode(``,!0)]),_:3})]))}}),Collapsable_default=Collapsable_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$38=[`onClick`],_hoisted_2$27={flex:``,"items-center":``,"gap-1.5":``,text:`xs 2xl:sm`};var Container_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Container`,props:{title:{},icon:{},innerClass:{},expand:{type:Boolean,default:!0}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(Collapsable_default,{default:_ctx.expand},{trigger:withCtx(slotProps=>[createBaseVNode(`button`,{class:`w-full flex items-center justify-between rounded-lg px-2 py-1 outline-none transition-all duration-250 ease-in-out`,text:`neutral-600 dark:neutral-400 sm sm:base`,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,onClick:$event=>slotProps.setVisible(!slotProps.visible)},[renderSlot(_ctx.$slots,`title`,{},()=>[createBaseVNode(`div`,_hoisted_2$27,[_ctx.icon?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass(_ctx.icon),"size-4":``},null,2)):createCommentVNode(``,!0),createTextVNode(` `+toDisplayString(_ctx.title),1)])]),createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``,transition:`transform duration-250`,class:normalizeClass({"rotate-180":slotProps.visible})},null,2)],8,_hoisted_1$38)]),default:withCtx(()=>[createBaseVNode(`div`,{grid:``,"gap-2":``,"p-1":``,class:normalizeClass(_ctx.innerClass)},[renderSlot(_ctx.$slots,`default`)],2)]),_:3},8,[`default`]))}}),Container_default=Container_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$37={"text-nowrap":``,"text-xs":``},_hoisted_2$26={h:`6.25`,"grid-col-span-2":``,"w-full":``},_hoisted_3$20=[`value`,`min`,`max`,`step`,`disabled`],_hoisted_4$16={bg:`neutral-100 dark:neutral-900`,border:`~ 1 solid neutral-200 dark:neutral-800`,"h-fit":``,"min-w-16":``,"inline-flex":``,"items-center":``,"rounded-md":``,"px-2":``,"py-1":``},_hoisted_5$13={"h-fit":``,"w-full":``,"inline-flex":``,"items-center":``,"gap-2":``,"text-xs":``},_hoisted_6$12=[`value`,`min`,`max`,`step`,`disabled`];var PropertyNumber_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PropertyNumber`,props:mergeModels({label:{default:`Range`},config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`),isDragging=ref(!1),dragStartX=ref(0),dragStartValue=ref(0),sliderRef=ref();function postProcessValue(val,config$1){return config$1?.formatValue?config$1.formatValue(val):config$1?.precision===void 0?val.toString():val.toFixed(config$1.precision)}let normalizedValue=ref(postProcessValue(modelValue.value,props.config));watch(modelValue,()=>{normalizedValue.value=postProcessValue(modelValue.value,props.config),updateSliderProgress()},{immediate:!0});function updateSliderProgress(){if(!sliderRef.value)return;let min$1=props.config?.min??0,max$1=props.config?.max??100,value$1=modelValue.value;sliderRef.value.style.setProperty(`--value`,value$1.toString()),sliderRef.value.style.setProperty(`--min`,min$1.toString()),sliderRef.value.style.setProperty(`--max`,max$1.toString())}onMounted(()=>{updateSliderProgress()});function handleSliderChange(event){let input=event.target,value$1=Number.parseFloat(input.value);Number.isNaN(value$1)||updateValue(value$1)}function handleInputChange(event){let input=event.target,value$1=Number.parseFloat(input.value);Number.isNaN(value$1)||updateValue(value$1)}function updateValue(value$1){let config$1=props.config,min$1=config$1?.min??0,max$1=config$1?.max??100;value$1=Math.max(min$1,Math.min(max$1,value$1)),modelValue.value=value$1,normalizedValue.value=postProcessValue(value$1,config$1)}function startDrag(event){props.config?.disabled||(event.preventDefault(),isDragging.value=!0,dragStartX.value=event.clientX,dragStartValue.value=modelValue.value,document.addEventListener(`mousemove`,onDrag),document.addEventListener(`mouseup`,stopDrag),document.body.style.cursor=`ew-resize`)}function onDrag(event){if(!isDragging.value)return;let deltaX=event.clientX-dragStartX.value,config$1=props.config,sensitivity=config$1?.step||.01,newValue=dragStartValue.value+deltaX*sensitivity;updateValue(newValue)}function stopDrag(){isDragging.value=!1,document.removeEventListener(`mousemove`,onDrag),document.removeEventListener(`mouseup`,stopDrag),document.body.style.cursor=``}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode(`div`,null,[renderSlot(_ctx.$slots,`label`,{},()=>[createBaseVNode(`span`,_hoisted_1$37,toDisplayString(props.label),1)],!0)]),_cache$1[0]||=createBaseVNode(`div`,null,null,-1),createBaseVNode(`div`,_hoisted_2$26,[createBaseVNode(`input`,{ref_key:`sliderRef`,ref:sliderRef,value:modelValue.value,type:`range`,min:props.config?.min??0,max:props.config?.max??100,step:props.config?.step??1,disabled:props.config?.disabled,class:`range-slider`,"h-full":``,"w-full":``,"appearance-none":``,"bg-transparent":``,"outline-none":``,onInput:handleSliderChange},null,40,_hoisted_3$20)]),createBaseVNode(`label`,_hoisted_4$16,[createBaseVNode(`span`,_hoisted_5$13,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,class:normalizeClass({"text-blue-500":isDragging.value}),onMousedown:startDrag},`|`,34),createBaseVNode(`input`,{value:normalizedValue.value,type:`number`,min:props.config?.min,max:props.config?.max,step:props.config?.step||1e-4,disabled:props.config?.disabled,"max-w-4lh":``,"w-full":``,"flex-1":``,"appearance-none":``,"bg-transparent":``,"text-right":``,"text-xs":``,"font-mono":``,"outline-none":``,class:`[&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none`,onChange:handleInputChange},null,40,_hoisted_6$12)])])],64))}}),PropertyNumber_default=__plugin_vue_export_helper_default(PropertyNumber_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-51d388af`]]);const _hoisted_1$36={"text-nowrap":``,"text-xs":``},_hoisted_2$25={bg:`neutral-100 dark:neutral-900`,"h-fit":``,"inline-flex":``,"items-center":``,"rounded-md":``,"px-2":``,"py-1":``,border:`~ 1 solid neutral-200 dark:neutral-800`},_hoisted_3$19={"h-fit":``,"inline-flex":``,"items-center":``,"text-xs":``},_hoisted_4$15=[`value`,`min`,`max`],_hoisted_5$12={bg:`neutral-100 dark:neutral-900`,"h-fit":``,"inline-flex":``,"items-center":``,"rounded-md":``,"px-2":``,"py-1":``,border:`~ 1 solid neutral-200 dark:neutral-800`},_hoisted_6$11={"h-fit":``,"inline-flex":``,"items-center":``,"text-xs":``},_hoisted_7$8=[`value`,`min`,`max`],_hoisted_8$6={bg:`neutral-100 dark:neutral-900`,"h-fit":``,"inline-flex":``,"items-center":``,"rounded-md":``,"px-2":``,"py-1":``,border:`~ 1 solid neutral-200 dark:neutral-800`},_hoisted_9$5={"h-fit":``,"inline-flex":``,"items-center":``,"text-xs":``},_hoisted_10$5=[`value`,`min`,`max`];var PropertyPoint_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PropertyPoint`,props:mergeModels({label:{},xConfig:{},yConfig:{},zConfig:{}},{x:{required:!1,default:0},xModifiers:{},y:{required:!1,default:0},yModifiers:{},z:{required:!1,default:0},zModifiers:{}}),emits:[`update:x`,`update:y`,`update:z`],setup(__props){let props=__props,x$1=useModel(__props,`x`),y=useModel(__props,`y`),z$1=useModel(__props,`z`),isDragging=ref(),dragStartX=ref(0),dragStartValue=ref(0);function postProcessValue(val,config$1){return config$1?.formatValue?config$1.formatValue(val):config$1?.precision?val.toFixed(config$1.precision):val.toString()}let xNormalized=ref(postProcessValue(x$1.value,props.xConfig)),yNormalized=ref(postProcessValue(y.value,props.yConfig)),zNormalized=ref(postProcessValue(z$1.value,props.zConfig));watch(x$1,()=>xNormalized.value=postProcessValue(x$1.value,props.xConfig)),watch(y,()=>yNormalized.value=postProcessValue(y.value,props.yConfig)),watch(z$1,()=>zNormalized.value=postProcessValue(z$1.value,props.zConfig));function handleChange(axis,event){let input=event.target,value$1=Number.parseFloat(input.value);Number.isNaN(value$1)||updateValue(axis,value$1)}function updateValue(axis,value$1){let config$1=axis===`x`?props.xConfig:axis===`y`?props.yConfig:props.zConfig;switch(config$1?.min!==void 0&&(value$1=Math.max(config$1.min,value$1)),config$1?.max!==void 0&&(value$1=Math.min(config$1.max,value$1)),axis){case`x`:x$1.value=value$1,xNormalized.value=postProcessValue(value$1,props.xConfig)||String(value$1);break;case`y`:y.value=value$1,yNormalized.value=postProcessValue(value$1,props.yConfig)||String(value$1);break;case`z`:z$1.value=value$1,zNormalized.value=postProcessValue(value$1,props.zConfig)||String(value$1);break}}function startDrag(axis,event){event.preventDefault(),isDragging.value=axis,dragStartX.value=event.clientX;let currentValue=axis===`x`?x$1.value:axis===`y`?y.value:z$1.value;dragStartValue.value=currentValue,document.addEventListener(`mousemove`,onDrag),document.addEventListener(`mouseup`,stopDrag)}function onDrag(event){if(!isDragging.value)return;let deltaX=event.clientX-dragStartX.value,config$1=isDragging.value===`x`?props.xConfig:isDragging.value===`y`?props.yConfig:props.zConfig,sensitivity=config$1?.step||.01,newValue=dragStartValue.value+deltaX*sensitivity;updateValue(isDragging.value,newValue)}function stopDrag(){isDragging.value=void 0,document.removeEventListener(`mousemove`,onDrag),document.removeEventListener(`mouseup`,stopDrag)}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode(`div`,null,[renderSlot(_ctx.$slots,`label`,{},()=>[createBaseVNode(`span`,_hoisted_1$36,toDisplayString(props.label||`Point`),1)])]),_cache$1[6]||=createBaseVNode(`div`,null,null,-1),createBaseVNode(`label`,_hoisted_2$25,[createBaseVNode(`span`,_hoisted_3$19,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,class:normalizeClass({"text-blue-500":isDragging.value===`x`}),onMousedown:_cache$1[0]||=e$4=>startDrag(`x`,e$4)},`|`,34),createBaseVNode(`input`,{value:xNormalized.value,type:`number`,min:props.xConfig?.min,max:props.xConfig?.max,step:1e-4,"max-w-4lh":``,"w-full":``,"appearance-none":``,"bg-transparent":``,"text-right":``,"font-mono":``,"outline-none":``,class:`[&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none`,onChange:_cache$1[1]||=e$4=>handleChange(`x`,e$4)},null,40,_hoisted_4$15)])]),createBaseVNode(`label`,_hoisted_5$12,[createBaseVNode(`span`,_hoisted_6$11,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,class:normalizeClass({"text-blue-500":isDragging.value===`y`}),onMousedown:_cache$1[2]||=e$4=>startDrag(`y`,e$4)},`|`,34),createBaseVNode(`input`,{value:yNormalized.value,type:`number`,min:props.yConfig?.min,max:props.yConfig?.max,step:1e-4,"max-w-4lh":``,"w-full":``,"appearance-none":``,"bg-transparent":``,"text-right":``,"font-mono":``,"outline-none":``,class:`[&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none`,onChange:_cache$1[3]||=e$4=>handleChange(`y`,e$4)},null,40,_hoisted_7$8)])]),createBaseVNode(`label`,_hoisted_8$6,[createBaseVNode(`span`,_hoisted_9$5,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,class:normalizeClass({"text-blue-500":isDragging.value===`z`}),onMousedown:_cache$1[4]||=e$4=>startDrag(`z`,e$4)},`|`,34),createBaseVNode(`input`,{value:zNormalized.value,type:`number`,min:props.zConfig?.min,max:props.zConfig?.max,step:1e-4,"max-w-4lh":``,"w-full":``,"appearance-none":``,"bg-transparent":``,"text-right":``,"font-mono":``,"outline-none":``,class:`[&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none`,onChange:_cache$1[5]||=e$4=>handleChange(`z`,e$4)},null,40,_hoisted_10$5)])])],64))}}),PropertyPoint_default=PropertyPoint_vue_vue_type_script_setup_true_lang_default,AudioSpectrum_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`AudioSpectrum`,props:{stream:{},bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(__props){let props=__props,frequencies=ref(Array.from({length:props.bars}).fill(0));onMounted(()=>{handleAnalyze()}),watch(()=>props.stream,()=>{handleAnalyze()});function handleAnalyze(){if(!props.stream)return;let audioContext=new(window.AudioContext||window.webkitAudioContext),source=audioContext.createMediaStreamSource(props.stream),analyser=audioContext.createAnalyser();analyser.fftSize=2048,source.connect(analyser);let bufferLength=analyser.frequencyBinCount,dataArray=new Uint8Array(bufferLength),sampleRate=audioContext.sampleRate,frequencyResolution=sampleRate/analyser.fftSize,minBin=Math.floor(props.minFreq/frequencyResolution),maxBin=Math.floor(props.maxFreq/frequencyResolution),usableBins=maxBin-minBin,binsPerBar=Math.floor(usableBins/props.bars),analyze=()=>{try{requestAnimationFrame(analyze),analyser.getByteFrequencyData(dataArray);let bars=Array.from({length:props.bars}).fill(0);for(let i=0;irenderSlot(_ctx.$slots,`default`,{frequencies:frequencies.value})}}),AudioSpectrum_default=AudioSpectrum_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$35={"h-full":``,flex:``,"items-center":``,"gap-1":``},AMPLIFICATION=5;var AudioSpectrumVisualizer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`AudioSpectrumVisualizer`,props:{frequencies:{},barsClass:{}},setup(__props){let props=__props;function getReductionFactor(index$1,totalBars){let minFactor=.1,maxFactor=1;return minFactor+(maxFactor-minFactor)*(index$1/totalBars)}function getBarHeight(frequency,index$1){let reductionFactor=getReductionFactor(index$1,props.frequencies.length);return Math.min(100,Math.max(10,frequency*100*AMPLIFICATION*reductionFactor))}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$35,[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.frequencies,(frequency,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,"h-full":``,flex:``,"flex-1":``,"items-end":``},[createBaseVNode(`div`,{transition:`all 100 ease-in-out`,"mx-auto":``,"my-0":``,"w-full":``,"rounded-full":``,class:normalizeClass(_ctx.barsClass),style:normalizeStyle({height:`${getBarHeight(frequency,index$1)}%`})},null,6)]))),128))]))}}),AudioSpectrumVisualizer_default=AudioSpectrumVisualizer_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$34={key:0,class:`mb-2 flex items-center justify-between`},_hoisted_2$24={class:`text-sm font-medium`},_hoisted_3$18={class:`text-sm text-neutral-500`};var LevelMeter_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`LevelMeter`,props:{level:{},min:{default:0},max:{default:100},numBars:{default:20},label:{default:`Level`},unit:{default:`%`},height:{default:24},showHeader:{type:Boolean,default:!0},animationSpeed:{default:75},colorThresholds:{default:()=>[{value:60,color:`bg-green-500`},{value:80,color:`bg-yellow-500`},{value:100,color:`bg-red-500`}]},formatValue:{}},setup(__props){let props=__props,levelBars=computed(()=>{let normalizedLevel=Math.max(0,Math.min(100,(props.level-props.min)/(props.max-props.min)*100)),activeBars=Math.floor(normalizedLevel/100*props.numBars);return Array.from({length:props.numBars},(_$1,i)=>({active:ia$1.value-b$1.value);for(let threshold of thresholds)if(barLevel<=threshold.value)return threshold.color;return thresholds[thresholds.length-1]?.color||`bg-green-500`}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,null,[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$34,[createBaseVNode(`span`,_hoisted_2$24,toDisplayString(_ctx.label),1),createBaseVNode(`span`,_hoisted_3$18,toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.level):`${Math.round(_ctx.level)}${_ctx.unit}`),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 dark:bg-neutral-700`,style:normalizeStyle({height:`${_ctx.height}px`})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(levelBars.value,(bar,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,class:normalizeClass([`flex-1 rounded-sm transition-all`,[bar.active?getBarColor(index$1,bar.level):`bg-neutral-200 dark:bg-neutral-600`,`duration-${_ctx.animationSpeed}`]]),style:normalizeStyle({height:bar.active?`100%`:`20%`})},null,6))),128))],4)]))}}),LevelMeter_default=LevelMeter_vue_vue_type_script_setup_true_lang_default,Volumed_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Volumed`,props:{perspective:{},transform:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`volumed`,style:normalizeStyle({perspective:`${_ctx.perspective}px`,transform:_ctx.transform})},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],4))}}),Volumed_default=__plugin_vue_export_helper_default(Volumed_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-d8ce56aa`]]),CursorMomentum_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`CursorMomentum`,props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(__props,{expose:__expose}){let props=__props,momentum=ref(1),currentValue=ref(0),lastTimestamp=0,FRICTION=toRef(()=>props.friction),BASE_SPEED=toRef(()=>props.baseSpeed),MOMENTUM_FACTOR=toRef(()=>props.momentumFactor);function updateMomentum(timestamp$2){lastTimestamp||=timestamp$2;let deltaTime=timestamp$2-lastTimestamp;lastTimestamp=timestamp$2,momentum.value=BASE_SPEED.value+(momentum.value-BASE_SPEED.value)*FRICTION.value,currentValue.value+=momentum.value*deltaTime,requestAnimationFrame(updateMomentum)}function handleMouseMove(event){let speed=Math.sqrt(event.movementX**2+event.movementY**2);momentum.value+=speed*MOMENTUM_FACTOR.value}return onMounted(()=>{window.addEventListener(`mousemove`,handleMouseMove),requestAnimationFrame(updateMomentum)}),onUnmounted(()=>{window.removeEventListener(`mousemove`,handleMouseMove)}),__expose({momentum,currentValue}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`,{momentum:momentum.value,currentValue:currentValue.value})}}),CursorMomentum_default=CursorMomentum_vue_vue_type_script_setup_true_lang_default,TestDummyMarkerFlat_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TestDummyMarkerFlat`,props:{size:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`test-dummy-flat`,style:normalizeStyle({width:`${_ctx.size}px`,height:`${_ctx.size}px`})},_cache$1[0]||=[createBaseVNode(`div`,{class:`marker`},null,-1)],4))}}),TestDummyMarkerFlat_default=__plugin_vue_export_helper_default(TestDummyMarkerFlat_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-28f8c660`]]),TestDummyMarker_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TestDummyMarker`,setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(CursorMomentum_default,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:withCtx(({currentValue})=>[createVNode(Volumed_default,{perspective:800,transform:`rotateX(45deg) translateY(3px)`},{default:withCtx(()=>[createVNode(TestDummyMarkerFlat_default,{size:24,style:normalizeStyle({transform:`rotate(${currentValue}deg)`})},null,8,[`style`])]),_:2},1024)]),_:1}))}}),TestDummyMarker_default=TestDummyMarker_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$33={key:0,class:`mb-2 flex items-center justify-between`},_hoisted_2$23={class:`text-sm font-medium`},_hoisted_3$17={class:`text-sm text-neutral-500`},_hoisted_4$14={key:1,class:`mt-1 flex gap-3 text-xs text-neutral-500`},_hoisted_5$11={class:`flex items-center gap-1`},_hoisted_6$10={class:`flex items-center gap-1`},_hoisted_7$7={class:`flex items-center gap-1`};var ThresholdMeter_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ThresholdMeter`,props:{value:{},threshold:{},min:{default:0},max:{default:1},numBars:{default:20},label:{default:`Value`},unit:{default:`%`},precision:{default:1},height:{default:24},showHeader:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},animationSpeed:{default:100},belowThresholdClass:{default:`bg-primary-300 dark:bg-primary-600`},aboveThresholdClass:{default:`bg-green-500`},thresholdBarClass:{default:`bg-white dark:bg-neutral-800`},inactiveBarClass:{default:`bg-neutral-300 dark:bg-neutral-600`},belowLabel:{default:`Below`},aboveLabel:{default:`Above`},thresholdLabel:{default:`Threshold`},formatValue:{}},setup(__props){let props=__props,thresholdBars=computed(()=>{let normalizedValue=Math.max(0,Math.min(1,(props.value-props.min)/(props.max-props.min))),normalizedThreshold=Math.max(0,Math.min(1,(props.threshold-props.min)/(props.max-props.min))),activeBars=Math.floor(normalizedValue*props.numBars),thresholdBar=Math.floor(normalizedThreshold*props.numBars);return Array.from({length:props.numBars},(_$1,i)=>({active:i=thresholdBar,isBelowThreshold:i(openBlock(),createElementBlock(`div`,null,[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$33,[createBaseVNode(`span`,_hoisted_2$23,toDisplayString(_ctx.label),1),createBaseVNode(`span`,_hoisted_3$17,toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.value):`${(_ctx.value*100).toFixed(_ctx.precision)}${_ctx.unit}`),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`flex items-end gap-1 rounded bg-neutral-200/45 p-1 p-1 dark:bg-neutral-700`,style:normalizeStyle({height:`${_ctx.height}px`})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(thresholdBars.value,(bar,index$1)=>(openBlock(),createElementBlock(`div`,{key:`threshold-${index$1}`,class:normalizeClass([`flex-1 rounded-sm transition-all`,[bar.isThreshold?_ctx.thresholdBarClass:bar.isAboveThreshold?_ctx.aboveThresholdClass:bar.isBelowThreshold?_ctx.belowThresholdClass:_ctx.inactiveBarClass,`duration-${_ctx.animationSpeed}`]]),style:normalizeStyle({height:bar.active||bar.isThreshold?`100%`:`20%`})},null,6))),128))],4),_ctx.showLegend?(openBlock(),createElementBlock(`div`,_hoisted_4$14,[createBaseVNode(`span`,_hoisted_5$11,[createBaseVNode(`div`,{class:normalizeClass(`inline-block h-0.5lh w-1lh rounded-full ${_ctx.belowThresholdClass}`)},null,2),createTextVNode(` `+toDisplayString(_ctx.belowLabel),1)]),createBaseVNode(`span`,_hoisted_6$10,[createBaseVNode(`div`,{class:normalizeClass(`inline-block h-0.5lh w-1lh rounded-full border border-neutral-400 ${_ctx.thresholdBarClass}`)},null,2),createTextVNode(` `+toDisplayString(_ctx.thresholdLabel),1)]),createBaseVNode(`span`,_hoisted_7$7,[createBaseVNode(`div`,{class:normalizeClass(`inline-block h-0.5lh w-1lh rounded-full ${_ctx.aboveThresholdClass}`)},null,2),createTextVNode(` `+toDisplayString(_ctx.aboveLabel),1)])])):createCommentVNode(``,!0)]))}}),ThresholdMeter_default=ThresholdMeter_vue_vue_type_script_setup_true_lang_default;const parseNumber$1=(color$2,len)=>{if(typeof color$2==`number`){if(len===3)return{mode:`rgb`,r:(color$2>>8&15|color$2>>4&240)/255,g:(color$2>>4&15|color$2&240)/255,b:(color$2&15|color$2<<4&240)/255};if(len===4)return{mode:`rgb`,r:(color$2>>12&15|color$2>>8&240)/255,g:(color$2>>8&15|color$2>>4&240)/255,b:(color$2>>4&15|color$2&240)/255,alpha:(color$2&15|color$2<<4&240)/255};if(len===6)return{mode:`rgb`,r:(color$2>>16&255)/255,g:(color$2>>8&255)/255,b:(color$2&255)/255};if(len===8)return{mode:`rgb`,r:(color$2>>24&255)/255,g:(color$2>>16&255)/255,b:(color$2>>8&255)/255,alpha:(color$2&255)/255}}};var parseNumber_default=parseNumber$1;const named={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 named_default=named;const parseNamed=color$2=>parseNumber_default(named_default[color$2.toLowerCase()],6);var parseNamed_default=parseNamed;const hex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,parseHex=color$2=>{let match;return(match=color$2.match(hex))?parseNumber_default(parseInt(match[1],16),match[1].length):void 0};var parseHex_default=parseHex;const num$1=`([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)`,num_none=`(?:${num$1}|none)`,per=`${num$1}%`,per_none=`(?:${num$1}%|none)`,num_per=`(?:${num$1}%|${num$1})`,num_per_none=`(?:${num$1}%|${num$1}|none)`,hue=`(?:${num$1}(deg|grad|rad|turn)|${num$1})`,hue_none=`(?:${num$1}(deg|grad|rad|turn)|${num$1}|none)`,c=`\\s*,\\s*`,rx_num_per_none=RegExp(`^`+num_per_none+`$`),rgb_num_old=RegExp(`^rgba?\\(\\s*${num$1}${c}${num$1}${c}${num$1}\\s*(?:,\\s*${num_per}\\s*)?\\)$`),rgb_per_old=RegExp(`^rgba?\\(\\s*${per}${c}${per}${c}${per}\\s*(?:,\\s*${num_per}\\s*)?\\)$`),parseRgbLegacy=color$2=>{let res={mode:`rgb`},match;if(match=color$2.match(rgb_num_old))match[1]!==void 0&&(res.r=match[1]/255),match[2]!==void 0&&(res.g=match[2]/255),match[3]!==void 0&&(res.b=match[3]/255);else if(match=color$2.match(rgb_per_old))match[1]!==void 0&&(res.r=match[1]/100),match[2]!==void 0&&(res.g=match[2]/100),match[3]!==void 0&&(res.b=match[3]/100);else return;return match[4]===void 0?match[5]!==void 0&&(res.alpha=Math.max(0,Math.min(1,+match[5]))):res.alpha=Math.max(0,Math.min(1,match[4]/100)),res};var parseRgbLegacy_default=parseRgbLegacy;const prepare=(color$2,mode)=>color$2===void 0?void 0:typeof color$2==`object`?color$2.mode===void 0?mode?{...color$2,mode}:void 0:color$2:parse_default(color$2);var _prepare_default=prepare;const converter=(target_mode=`rgb`)=>color$2=>(color$2=_prepare_default(color$2,target_mode))===void 0?void 0:color$2.mode===target_mode?color$2:converters[color$2.mode][target_mode]?converters[color$2.mode][target_mode](color$2):target_mode===`rgb`?converters[color$2.mode].rgb(color$2):converters.rgb[target_mode](converters[color$2.mode].rgb(color$2));var converter_default=converter;const converters={},modes={},parsers=[],colorProfiles={},identity=v=>v,useMode=definition$29=>(converters[definition$29.mode]={...converters[definition$29.mode],...definition$29.toMode},Object.keys(definition$29.fromMode||{}).forEach(k$3=>{converters[k$3]||(converters[k$3]={}),converters[k$3][definition$29.mode]=definition$29.fromMode[k$3]}),definition$29.ranges||={},definition$29.difference||={},definition$29.channels.forEach(channel=>{if(definition$29.ranges[channel]===void 0&&(definition$29.ranges[channel]=[0,1]),!definition$29.interpolate[channel])throw Error(`Missing interpolator for: ${channel}`);typeof definition$29.interpolate[channel]==`function`&&(definition$29.interpolate[channel]={use:definition$29.interpolate[channel]}),definition$29.interpolate[channel].fixup||(definition$29.interpolate[channel].fixup=identity)}),modes[definition$29.mode]=definition$29,(definition$29.parse||[]).forEach(parser=>{useParser(parser,definition$29.mode)}),converter_default(definition$29.mode)),getMode=mode=>modes[mode],useParser=(parser,mode)=>{if(typeof parser==`string`){if(!mode)throw Error(`'mode' required when 'parser' is a string`);colorProfiles[parser]=mode}else typeof parser==`function`&&parsers.indexOf(parser)<0&&parsers.push(parser)},IdentStartCodePoint=/[^\x00-\x7F]|[a-zA-Z_]/,IdentCodePoint=/[^\x00-\x7F]|[-\w]/,Tok={Function:`function`,Ident:`ident`,Number:`number`,Percentage:`percentage`,ParenClose:`)`,None:`none`,Hue:`hue`,Alpha:`alpha`};let _i=0;function is_num(chars){let ch=chars[_i],ch1=chars[_i+1];return ch===`-`||ch===`+`?/\d/.test(ch1)||ch1===`.`&&/\d/.test(chars[_i+2]):ch===`.`?/\d/.test(ch1):/\d/.test(ch)}function is_ident(chars){if(_i>=chars.length)return!1;let ch=chars[_i];if(IdentStartCodePoint.test(ch))return!0;if(ch===`-`){if(chars.length-_i<2)return!1;let ch1=chars[_i+1];return!!(ch1===`-`||IdentStartCodePoint.test(ch1))}return!1}const huenits={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function num(chars){let value$1=``;if((chars[_i]===`-`||chars[_i]===`+`)&&(value$1+=chars[_i++]),value$1+=digits(chars),chars[_i]===`.`&&/\d/.test(chars[_i+1])&&(value$1+=chars[_i++]+digits(chars)),(chars[_i]===`e`||chars[_i]===`E`)&&((chars[_i+1]===`-`||chars[_i+1]===`+`)&&/\d/.test(chars[_i+2])?value$1+=chars[_i++]+chars[_i++]+digits(chars):/\d/.test(chars[_i+1])&&(value$1+=chars[_i++]+digits(chars))),is_ident(chars)){let id=ident(chars);return id===`deg`||id===`rad`||id===`turn`||id===`grad`?{type:Tok.Hue,value:value$1*huenits[id]}:void 0}return chars[_i]===`%`?(_i++,{type:Tok.Percentage,value:+value$1}):{type:Tok.Number,value:+value$1}}function digits(chars){let v=``;for(;/\d/.test(chars[_i]);)v+=chars[_i++];return v}function ident(chars){let v=``;for(;_i=2.0 are supported.`));return}let parser=new GLTFParser(json,{path:path||this.resourcePath||``,crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});parser.fileLoader.setRequestHeader(this.requestHeader);for(let i=0;i=0&&plugins[extensionName]===void 0&&console.warn(`THREE.GLTFLoader: Unknown extension "`+extensionName+`".`)}}parser.setExtensions(extensions),parser.setPlugins(plugins),parser.parse(onLoad,onError)}parseAsync(data$12,path){let scope$1=this;return new Promise(function(resolve$1,reject){scope$1.parse(data$12,path,resolve$1,reject)})}};function GLTFRegistry(){let objects={};return{get:function(key$2){return objects[key$2]},add:function(key$2,object$1){objects[key$2]=object$1},remove:function(key$2){delete objects[key$2]},removeAll:function(){objects={}}}}const EXTENSIONS={KHR_BINARY_GLTF:`KHR_binary_glTF`,KHR_DRACO_MESH_COMPRESSION:`KHR_draco_mesh_compression`,KHR_LIGHTS_PUNCTUAL:`KHR_lights_punctual`,KHR_MATERIALS_CLEARCOAT:`KHR_materials_clearcoat`,KHR_MATERIALS_DISPERSION:`KHR_materials_dispersion`,KHR_MATERIALS_IOR:`KHR_materials_ior`,KHR_MATERIALS_SHEEN:`KHR_materials_sheen`,KHR_MATERIALS_SPECULAR:`KHR_materials_specular`,KHR_MATERIALS_TRANSMISSION:`KHR_materials_transmission`,KHR_MATERIALS_IRIDESCENCE:`KHR_materials_iridescence`,KHR_MATERIALS_ANISOTROPY:`KHR_materials_anisotropy`,KHR_MATERIALS_UNLIT:`KHR_materials_unlit`,KHR_MATERIALS_VOLUME:`KHR_materials_volume`,KHR_TEXTURE_BASISU:`KHR_texture_basisu`,KHR_TEXTURE_TRANSFORM:`KHR_texture_transform`,KHR_MESH_QUANTIZATION:`KHR_mesh_quantization`,KHR_MATERIALS_EMISSIVE_STRENGTH:`KHR_materials_emissive_strength`,EXT_MATERIALS_BUMP:`EXT_materials_bump`,EXT_TEXTURE_WEBP:`EXT_texture_webp`,EXT_TEXTURE_AVIF:`EXT_texture_avif`,EXT_MESHOPT_COMPRESSION:`EXT_meshopt_compression`,EXT_MESH_GPU_INSTANCING:`EXT_mesh_gpu_instancing`};var GLTFLightsExtension=class{constructor(parser){this.parser=parser,this.name=EXTENSIONS.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let parser=this.parser,nodeDefs=this.parser.json.nodes||[];for(let nodeIndex=0,nodeLength=nodeDefs.length;nodeIndex=0)throw Error(`THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures`);return null}return parser.loadTextureImage(textureIndex,extension$1.source,loader$1)}},GLTFTextureWebPExtension=class{constructor(parser){this.parser=parser,this.name=EXTENSIONS.EXT_TEXTURE_WEBP}loadTexture(textureIndex){let name$2=this.name,parser=this.parser,json=parser.json,textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[name$2])return null;let extension$1=textureDef.extensions[name$2],source=json.images[extension$1.source],loader$1=parser.textureLoader;if(source.uri){let handler=parser.options.manager.getHandler(source.uri);handler!==null&&(loader$1=handler)}return parser.loadTextureImage(textureIndex,extension$1.source,loader$1)}},GLTFTextureAVIFExtension=class{constructor(parser){this.parser=parser,this.name=EXTENSIONS.EXT_TEXTURE_AVIF}loadTexture(textureIndex){let name$2=this.name,parser=this.parser,json=parser.json,textureDef=json.textures[textureIndex];if(!textureDef.extensions||!textureDef.extensions[name$2])return null;let extension$1=textureDef.extensions[name$2],source=json.images[extension$1.source],loader$1=parser.textureLoader;if(source.uri){let handler=parser.options.manager.getHandler(source.uri);handler!==null&&(loader$1=handler)}return parser.loadTextureImage(textureIndex,extension$1.source,loader$1)}},GLTFMeshoptCompression=class{constructor(parser){this.name=EXTENSIONS.EXT_MESHOPT_COMPRESSION,this.parser=parser}loadBufferView(index$1){let json=this.parser.json,bufferView=json.bufferViews[index$1];if(bufferView.extensions&&bufferView.extensions[this.name]){let extensionDef=bufferView.extensions[this.name],buffer$1=this.parser.getDependency(`buffer`,extensionDef.buffer),decoder=this.parser.options.meshoptDecoder;if(!decoder||!decoder.supported){if(json.extensionsRequired&&json.extensionsRequired.indexOf(this.name)>=0)throw Error(`THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files`);return null}return buffer$1.then(function(res){let byteOffset=extensionDef.byteOffset||0,byteLength=extensionDef.byteLength||0,count$1=extensionDef.count,stride=extensionDef.byteStride,source=new Uint8Array(res,byteOffset,byteLength);return decoder.decodeGltfBufferAsync?decoder.decodeGltfBufferAsync(count$1,stride,source,extensionDef.mode,extensionDef.filter).then(function(res$1){return res$1.buffer}):decoder.ready.then(function(){let result=new ArrayBuffer(count$1*stride);return decoder.decodeGltfBuffer(new Uint8Array(result),count$1,stride,source,extensionDef.mode,extensionDef.filter),result})})}else return null}},GLTFMeshGpuInstancing=class{constructor(parser){this.name=EXTENSIONS.EXT_MESH_GPU_INSTANCING,this.parser=parser}createNodeMesh(nodeIndex){let json=this.parser.json,nodeDef=json.nodes[nodeIndex];if(!nodeDef.extensions||!nodeDef.extensions[this.name]||nodeDef.mesh===void 0)return null;let meshDef=json.meshes[nodeDef.mesh];for(let primitive of meshDef.primitives)if(primitive.mode!==WEBGL_CONSTANTS.TRIANGLES&&primitive.mode!==WEBGL_CONSTANTS.TRIANGLE_STRIP&&primitive.mode!==WEBGL_CONSTANTS.TRIANGLE_FAN&&primitive.mode!==void 0)return null;let extensionDef=nodeDef.extensions[this.name],attributesDef=extensionDef.attributes,pending=[],attributes={};for(let key$2 in attributesDef)pending.push(this.parser.getDependency(`accessor`,attributesDef[key$2]).then(accessor=>(attributes[key$2]=accessor,attributes[key$2])));return pending.length<1?null:(pending.push(this.parser.createNodeMesh(nodeIndex)),Promise.all(pending).then(results=>{let nodeObject=results.pop(),meshes=nodeObject.isGroup?nodeObject.children:[nodeObject],count$1=results[0].count,instancedMeshes=[];for(let mesh of meshes){let m=new Matrix4,p$4=new Vector3,q=new Quaternion,s=new Vector3(1,1,1),instancedMesh=new InstancedMesh(mesh.geometry,mesh.material,count$1);for(let i=0;i0||uri.search(/^data\:image\/jpeg/)===0?`image/jpeg`:uri.search(/\.webp($|\?)/i)>0||uri.search(/^data\:image\/webp/)===0?`image/webp`:uri.search(/\.ktx2($|\?)/i)>0||uri.search(/^data\:image\/ktx2/)===0?`image/ktx2`:`image/png`}const _identityMatrix=new Matrix4;var GLTFParser=class{constructor(json={},options$1={}){this.json=json,this.extensions={},this.plugins={},this.options=options$1,this.cache=new GLTFRegistry,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let isSafari=!1,safariVersion=-1,isFirefox=!1,firefoxVersion=-1;if(typeof navigator<`u`){let userAgent=navigator.userAgent;isSafari=/^((?!chrome|android).)*safari/i.test(userAgent)===!0;let safariMatch=userAgent.match(/Version\/(\d+)/);safariVersion=isSafari&&safariMatch?parseInt(safariMatch[1],10):-1,isFirefox=userAgent.indexOf(`Firefox`)>-1,firefoxVersion=isFirefox?userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>`u`||isSafari&&safariVersion<17||isFirefox&&firefoxVersion<98?this.textureLoader=new TextureLoader(this.options.manager):this.textureLoader=new ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new FileLoader(this.options.manager),this.fileLoader.setResponseType(`arraybuffer`),this.options.crossOrigin===`use-credentials`&&this.fileLoader.setWithCredentials(!0)}setExtensions(extensions){this.extensions=extensions}setPlugins(plugins){this.plugins=plugins}parse(onLoad,onError){let parser=this,json=this.json,extensions=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(ext){return ext._markDefs&&ext._markDefs()}),Promise.all(this._invokeAll(function(ext){return ext.beforeRoot&&ext.beforeRoot()})).then(function(){return Promise.all([parser.getDependencies(`scene`),parser.getDependencies(`animation`),parser.getDependencies(`camera`)])}).then(function(dependencies){let result={scene:dependencies[0][json.scene||0],scenes:dependencies[0],animations:dependencies[1],cameras:dependencies[2],asset:json.asset,parser,userData:{}};return addUnknownExtensionsToUserData(extensions,result,json),assignExtrasToUserData(result,json),Promise.all(parser._invokeAll(function(ext){return ext.afterRoot&&ext.afterRoot(result)})).then(function(){for(let scene of result.scenes)scene.updateMatrixWorld();onLoad(result)})}).catch(onError)}_markDefs(){let nodeDefs=this.json.nodes||[],skinDefs=this.json.skins||[],meshDefs=this.json.meshes||[];for(let skinIndex=0,skinLength=skinDefs.length;skinIndex{let mappings=this.associations.get(original);mappings!=null&&this.associations.set(clone$3,mappings);for(let[i,child]of original.children.entries())updateMappings(child,clone$3.children[i])};return updateMappings(object$1,ref$1),ref$1.name+=`_instance_`+ cache$1.uses[index$1]++,ref$1}_invokeOne(func){let extensions=Object.values(this.plugins);extensions.push(this);for(let i=0;i=2&&bufferAttribute.setY(index$1,sparseValues[i*itemSize+1]),itemSize>=3&&bufferAttribute.setZ(index$1,sparseValues[i*itemSize+2]),itemSize>=4&&bufferAttribute.setW(index$1,sparseValues[i*itemSize+3]),itemSize>=5)throw Error(`THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.`)}bufferAttribute.normalized=normalized}return bufferAttribute})}loadTexture(textureIndex){let json=this.json,options$1=this.options,textureDef=json.textures[textureIndex],sourceIndex=textureDef.source,sourceDef=json.images[sourceIndex],loader$1=this.textureLoader;if(sourceDef.uri){let handler=options$1.manager.getHandler(sourceDef.uri);handler!==null&&(loader$1=handler)}return this.loadTextureImage(textureIndex,sourceIndex,loader$1)}loadTextureImage(textureIndex,sourceIndex,loader$1){let parser=this,json=this.json,textureDef=json.textures[textureIndex],sourceDef=json.images[sourceIndex],cacheKey=(sourceDef.uri||sourceDef.bufferView)+`:`+textureDef.sampler;if(this.textureCache[cacheKey])return this.textureCache[cacheKey];let promise=this.loadImageSource(sourceIndex,loader$1).then(function(texture){texture.flipY=!1,texture.name=textureDef.name||sourceDef.name||``,texture.name===``&&typeof sourceDef.uri==`string`&&sourceDef.uri.startsWith(`data:image/`)===!1&&(texture.name=sourceDef.uri);let samplers=json.samplers||{},sampler=samplers[textureDef.sampler]||{};return texture.magFilter=WEBGL_FILTERS[sampler.magFilter]||LinearFilter,texture.minFilter=WEBGL_FILTERS[sampler.minFilter]||LinearMipmapLinearFilter,texture.wrapS=WEBGL_WRAPPINGS[sampler.wrapS]||RepeatWrapping,texture.wrapT=WEBGL_WRAPPINGS[sampler.wrapT]||RepeatWrapping,texture.generateMipmaps=!texture.isCompressedTexture&&texture.minFilter!==NearestFilter&&texture.minFilter!==LinearFilter,parser.associations.set(texture,{textures:textureIndex}),texture}).catch(function(){return null});return this.textureCache[cacheKey]=promise,promise}loadImageSource(sourceIndex,loader$1){let parser=this,json=this.json,options$1=this.options;if(this.sourceCache[sourceIndex]!==void 0)return this.sourceCache[sourceIndex].then(texture=>texture.clone());let sourceDef=json.images[sourceIndex],URL$1=self.URL||self.webkitURL,sourceURI=sourceDef.uri||``,isObjectURL=!1;if(sourceDef.bufferView!==void 0)sourceURI=parser.getDependency(`bufferView`,sourceDef.bufferView).then(function(bufferView){isObjectURL=!0;let blob=new Blob([bufferView],{type:sourceDef.mimeType});return sourceURI=URL$1.createObjectURL(blob),sourceURI});else if(sourceDef.uri===void 0)throw Error(`THREE.GLTFLoader: Image `+sourceIndex+` is missing URI and bufferView`);let promise=Promise.resolve(sourceURI).then(function(sourceURI$1){return new Promise(function(resolve$1,reject){let onLoad=resolve$1;loader$1.isImageBitmapLoader===!0&&(onLoad=function(imageBitmap){let texture=new Texture(imageBitmap);texture.needsUpdate=!0,resolve$1(texture)}),loader$1.load(LoaderUtils.resolveURL(sourceURI$1,options$1.path),onLoad,void 0,reject)})}).then(function(texture){return isObjectURL===!0&&URL$1.revokeObjectURL(sourceURI),assignExtrasToUserData(texture,sourceDef),texture.userData.mimeType=sourceDef.mimeType||getImageURIMimeType(sourceDef.uri),texture}).catch(function(error){throw console.error(`THREE.GLTFLoader: Couldn't load texture`,sourceURI),error});return this.sourceCache[sourceIndex]=promise,promise}assignTexture(materialParams,mapName,mapDef,colorSpace){let parser=this;return this.getDependency(`texture`,mapDef.index).then(function(texture){if(!texture)return null;if(mapDef.texCoord!==void 0&&mapDef.texCoord>0&&(texture=texture.clone(),texture.channel=mapDef.texCoord),parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM]){let transform$2=mapDef.extensions===void 0?void 0:mapDef.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM];if(transform$2){let gltfReference=parser.associations.get(texture);texture=parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM].extendTexture(texture,transform$2),parser.associations.set(texture,gltfReference)}}return colorSpace!==void 0&&(texture.colorSpace=colorSpace),materialParams[mapName]=texture,texture})}assignFinalMaterial(mesh){let geometry=mesh.geometry,material=mesh.material,useDerivativeTangents=geometry.attributes.tangent===void 0,useVertexColors=geometry.attributes.color!==void 0,useFlatShading=geometry.attributes.normal===void 0;if(mesh.isPoints){let cacheKey=`PointsMaterial:`+material.uuid,pointsMaterial=this.cache.get(cacheKey);pointsMaterial||(pointsMaterial=new PointsMaterial,Material.prototype.copy.call(pointsMaterial,material),pointsMaterial.color.copy(material.color),pointsMaterial.map=material.map,pointsMaterial.sizeAttenuation=!1,this.cache.add(cacheKey,pointsMaterial)),material=pointsMaterial}else if(mesh.isLine){let cacheKey=`LineBasicMaterial:`+material.uuid,lineMaterial=this.cache.get(cacheKey);lineMaterial||(lineMaterial=new LineBasicMaterial,Material.prototype.copy.call(lineMaterial,material),lineMaterial.color.copy(material.color),lineMaterial.map=material.map,this.cache.add(cacheKey,lineMaterial)),material=lineMaterial}if(useDerivativeTangents||useVertexColors||useFlatShading){let cacheKey=`ClonedMaterial:`+material.uuid+`:`;useDerivativeTangents&&(cacheKey+=`derivative-tangents:`),useVertexColors&&(cacheKey+=`vertex-colors:`),useFlatShading&&(cacheKey+=`flat-shading:`);let cachedMaterial=this.cache.get(cacheKey);cachedMaterial||(cachedMaterial=material.clone(),useVertexColors&&(cachedMaterial.vertexColors=!0),useFlatShading&&(cachedMaterial.flatShading=!0),useDerivativeTangents&&(cachedMaterial.normalScale&&(cachedMaterial.normalScale.y*=-1),cachedMaterial.clearcoatNormalScale&&(cachedMaterial.clearcoatNormalScale.y*=-1)),this.cache.add(cacheKey,cachedMaterial),this.associations.set(cachedMaterial,this.associations.get(material))),material=cachedMaterial}mesh.material=material}getMaterialType(){return MeshStandardMaterial}loadMaterial(materialIndex){let parser=this,json=this.json,extensions=this.extensions,materialDef=json.materials[materialIndex],materialType,materialParams={},materialExtensions=materialDef.extensions||{},pending=[];if(materialExtensions[EXTENSIONS.KHR_MATERIALS_UNLIT]){let kmuExtension=extensions[EXTENSIONS.KHR_MATERIALS_UNLIT];materialType=kmuExtension.getMaterialType(),pending.push(kmuExtension.extendParams(materialParams,materialDef,parser))}else{let metallicRoughness=materialDef.pbrMetallicRoughness||{};if(materialParams.color=new Color(1,1,1),materialParams.opacity=1,Array.isArray(metallicRoughness.baseColorFactor)){let array$1=metallicRoughness.baseColorFactor;materialParams.color.setRGB(array$1[0],array$1[1],array$1[2],LinearSRGBColorSpace),materialParams.opacity=array$1[3]}metallicRoughness.baseColorTexture!==void 0&&pending.push(parser.assignTexture(materialParams,`map`,metallicRoughness.baseColorTexture,SRGBColorSpace)),materialParams.metalness=metallicRoughness.metallicFactor===void 0?1:metallicRoughness.metallicFactor,materialParams.roughness=metallicRoughness.roughnessFactor===void 0?1:metallicRoughness.roughnessFactor,metallicRoughness.metallicRoughnessTexture!==void 0&&(pending.push(parser.assignTexture(materialParams,`metalnessMap`,metallicRoughness.metallicRoughnessTexture)),pending.push(parser.assignTexture(materialParams,`roughnessMap`,metallicRoughness.metallicRoughnessTexture))),materialType=this._invokeOne(function(ext){return ext.getMaterialType&&ext.getMaterialType(materialIndex)}),pending.push(Promise.all(this._invokeAll(function(ext){return ext.extendMaterialParams&&ext.extendMaterialParams(materialIndex,materialParams)})))}materialDef.doubleSided===!0&&(materialParams.side=DoubleSide);let alphaMode=materialDef.alphaMode||ALPHA_MODES.OPAQUE;if(alphaMode===ALPHA_MODES.BLEND?(materialParams.transparent=!0,materialParams.depthWrite=!1):(materialParams.transparent=!1,alphaMode===ALPHA_MODES.MASK&&(materialParams.alphaTest=materialDef.alphaCutoff===void 0?.5:materialDef.alphaCutoff)),materialDef.normalTexture!==void 0&&materialType!==MeshBasicMaterial&&(pending.push(parser.assignTexture(materialParams,`normalMap`,materialDef.normalTexture)),materialParams.normalScale=new Vector2(1,1),materialDef.normalTexture.scale!==void 0)){let scale$1=materialDef.normalTexture.scale;materialParams.normalScale.set(scale$1,scale$1)}if(materialDef.occlusionTexture!==void 0&&materialType!==MeshBasicMaterial&&(pending.push(parser.assignTexture(materialParams,`aoMap`,materialDef.occlusionTexture)),materialDef.occlusionTexture.strength!==void 0&&(materialParams.aoMapIntensity=materialDef.occlusionTexture.strength)),materialDef.emissiveFactor!==void 0&&materialType!==MeshBasicMaterial){let emissiveFactor=materialDef.emissiveFactor;materialParams.emissive=new Color().setRGB(emissiveFactor[0],emissiveFactor[1],emissiveFactor[2],LinearSRGBColorSpace)}return materialDef.emissiveTexture!==void 0&&materialType!==MeshBasicMaterial&&pending.push(parser.assignTexture(materialParams,`emissiveMap`,materialDef.emissiveTexture,SRGBColorSpace)),Promise.all(pending).then(function(){let material=new materialType(materialParams);return materialDef.name&&(material.name=materialDef.name),assignExtrasToUserData(material,materialDef),parser.associations.set(material,{materials:materialIndex}),materialDef.extensions&&addUnknownExtensionsToUserData(extensions,material,materialDef),material})}createUniqueName(originalName){let sanitizedName=PropertyBinding.sanitizeNodeName(originalName||``);return sanitizedName in this.nodeNamesUsed?sanitizedName+`_`+ ++this.nodeNamesUsed[sanitizedName]:(this.nodeNamesUsed[sanitizedName]=0,sanitizedName)}loadGeometries(primitives){let parser=this,extensions=this.extensions,cache$1=this.primitiveCache;function createDracoPrimitive(primitive){return extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(primitive,parser).then(function(geometry){return addPrimitiveAttributes(geometry,primitive,parser)})}let pending=[];for(let i=0,il=primitives.length;i0&&updateMorphTargets(mesh,meshDef),mesh.name=parser.createUniqueName(meshDef.name||`mesh_`+meshIndex),assignExtrasToUserData(mesh,meshDef),primitive.extensions&&addUnknownExtensionsToUserData(extensions,mesh,primitive),parser.assignFinalMaterial(mesh),meshes.push(mesh)}for(let i=0,il=meshes.length;i1?new Group:objects.length===1?objects[0]:new Object3D,node$1!==objects[0])for(let i=0,il=objects.length;i1){let mapping=parser.associations.get(node$1);parser.associations.set(node$1,{...mapping})}return parser.associations.get(node$1).nodes=nodeIndex,node$1}),this.nodeCache[nodeIndex]}loadScene(sceneIndex){let extensions=this.extensions,sceneDef=this.json.scenes[sceneIndex],parser=this,scene=new Group;sceneDef.name&&(scene.name=parser.createUniqueName(sceneDef.name)),assignExtrasToUserData(scene,sceneDef),sceneDef.extensions&&addUnknownExtensionsToUserData(extensions,scene,sceneDef);let nodeIds=sceneDef.nodes||[],pending=[];for(let i=0,il=nodeIds.length;i{let reducedAssociations=new Map;for(let[key$2,value$1]of parser.associations)(key$2 instanceof Material||key$2 instanceof Texture)&&reducedAssociations.set(key$2,value$1);return node$1.traverse(node$2=>{let mappings=parser.associations.get(node$2);mappings!=null&&reducedAssociations.set(node$2,mappings)}),reducedAssociations};return parser.associations=reduceAssociations(scene),scene})}_createAnimationTracks(node$1,inputAccessor,outputAccessor,sampler,target$1){let tracks=[],targetName=node$1.name?node$1.name:node$1.uuid,targetNames=[];PATH_PROPERTIES[target$1.path]===PATH_PROPERTIES.weights?node$1.traverse(function(object$1){object$1.morphTargetInfluences&&targetNames.push(object$1.name?object$1.name:object$1.uuid)}):targetNames.push(targetName);let TypedKeyframeTrack;switch(PATH_PROPERTIES[target$1.path]){case PATH_PROPERTIES.weights:TypedKeyframeTrack=NumberKeyframeTrack;break;case PATH_PROPERTIES.rotation:TypedKeyframeTrack=QuaternionKeyframeTrack;break;case PATH_PROPERTIES.translation:case PATH_PROPERTIES.scale:TypedKeyframeTrack=VectorKeyframeTrack;break;default:switch(outputAccessor.itemSize){case 1:TypedKeyframeTrack=NumberKeyframeTrack;break;case 2:case 3:default:TypedKeyframeTrack=VectorKeyframeTrack;break}break}let interpolation=sampler.interpolation===void 0?InterpolateLinear:INTERPOLATION[sampler.interpolation],outputArray=this._getArrayFromAccessor(outputAccessor);for(let j$1=0,jl=targetNames.length;j$1new VRMLoaderPlugin(parser)),loader.register(parser=>new VRMAnimationLoaderPlugin(parser)),loader)}async function loadVRMAnimation(url){let loader$1=useVRMLoader(),gltf=await loader$1.loadAsync(url),userData=gltf.userData;if(!userData.vrmAnimations){console.warn(`No VRM animations found in the .vrma file`);return}if(userData.vrmAnimations.length===0){console.warn(`No VRM animations found in the .vrma file`);return}return userData.vrmAnimations[0]}async function clipFromVRMAnimation(vrm,animation){if(!vrm){console.warn(`No VRM found`);return}if(animation)return createVRMAnimationClip(animation,vrm)}function useBlink(){let isBlinking=ref(!1),blinkProgress=ref(0),timeSinceLastBlink=ref(0),BLINK_DURATION=.2,MIN_BLINK_INTERVAL=1,MAX_BLINK_INTERVAL=6,nextBlinkTime=ref(Math.random()*(MAX_BLINK_INTERVAL-MIN_BLINK_INTERVAL)+MIN_BLINK_INTERVAL);function update(vrm,delta){if(vrm?.expressionManager&&(timeSinceLastBlink.value+=delta,!isBlinking.value&&timeSinceLastBlink.value>=nextBlinkTime.value&&(isBlinking.value=!0,blinkProgress.value=0),isBlinking.value)){blinkProgress.value+=delta/BLINK_DURATION;let blinkValue=Math.sin(Math.PI*blinkProgress.value);vrm.expressionManager.setValue(`blink`,blinkValue),blinkProgress.value>=1&&(isBlinking.value=!1,timeSinceLastBlink.value=0,vrm.expressionManager.setValue(`blink`,0),nextBlinkTime.value=Math.random()*(MAX_BLINK_INTERVAL-MIN_BLINK_INTERVAL)+MIN_BLINK_INTERVAL)}}return{update}}function useIdleEyeSaccades(){let nextSaccadeAfter=-1,fixationTarget=new Vector3,timeSinceLastSaccade=0;function updateFixationTarget(lookAtTarget){fixationTarget.set(lookAtTarget.value.x+randFloat(-.25,.25),lookAtTarget.value.y+randFloat(-.25,.25),lookAtTarget.value.z)}function update(vrm,lookAtTarget,delta){!vrm?.expressionManager||!vrm.lookAt||(timeSinceLastSaccade>=nextSaccadeAfter?(updateFixationTarget(lookAtTarget),timeSinceLastSaccade=0,nextSaccadeAfter=randomSaccadeInterval()/1e3):fixationTarget||updateFixationTarget(lookAtTarget),vrm.lookAt.target||(vrm.lookAt.target=new Object3D),vrm.lookAt.target.position.lerp(fixationTarget,1),vrm.lookAt?.update(delta),timeSinceLastSaccade+=delta)}function instantUpdate(vrm,lookAtTarget){fixationTarget.set(lookAtTarget.x,lookAtTarget.y,lookAtTarget.z),!(!vrm?.expressionManager||!vrm.lookAt)&&(vrm.lookAt.target||(vrm.lookAt.target=new Object3D),vrm.lookAt.target.position.lerp(fixationTarget,1),vrm.lookAt?.update(.016))}return{update,instantUpdate}}async function loadVrm(model,options$1){let loader$1=useVRMLoader(),gltf=await loader$1.loadAsync(model,progress$1=>options$1?.onProgress?.(progress$1)),userData=gltf.userData;if(!userData.vrm)return;let _vrm=userData.vrm;if(VRMUtils.removeUnnecessaryVertices(_vrm.scene),VRMUtils.combineSkeletons(_vrm.scene),_vrm.scene.traverse(object$1=>{object$1.frustumCulled=!1}),options$1?.lookAt&&_vrm.lookAt){let lookAtQuatProxy=new VRMLookAtQuaternionProxy(_vrm.lookAt);lookAtQuatProxy.name=`lookAtQuaternionProxy`,_vrm.scene.add(lookAtQuatProxy)}let _vrmGroup=new Group;_vrmGroup.add(_vrm.scene),options$1?.scene&&options$1.scene.add(_vrmGroup);let box=new Box3().setFromObject(_vrm.scene),modelSize=new Vector3,modelCenter=new Vector3;box.getSize(modelSize),box.getCenter(modelCenter),modelCenter.y+=modelSize.y/5;let fov$1=40,radians=fov$1/2*Math.PI/180,initialCameraOffset=new Vector3(modelSize.x/16,modelSize.y/6,-(modelSize.y/3)/Math.tan(radians));return{_vrm,_vrmGroup,modelCenter,modelSize,initialCameraOffset}}function useVRMEmote(vrm){let currentEmotion=ref(null),isTransitioning=ref(!1),transitionProgress=ref(0),currentExpressionValues=ref(new Map),targetExpressionValues=ref(new Map),resetTimeout=ref(),lerp$4=(start,end,t$1)=>start+(end-start)*t$1,easeInOutCubic=t$1=>t$1<.5?4*t$1*t$1*t$1:1-(-2*t$1+2)**3/2,emotionStates=new Map([[`happy`,{expression:[{name:`happy`,value:1,duration:.3},{name:`aa`,value:.3}],blendDuration:.3}],[`sad`,{expression:[{name:`sad`,value:1},{name:`oh`,value:.2}],blendDuration:.3}],[`angry`,{expression:[{name:`angry`,value:1},{name:`ee`,value:.4}],blendDuration:.2}],[`surprised`,{expression:[{name:`Surprised`,value:1},{name:`oh`,value:.6}],blendDuration:.1}],[`neutral`,{expression:[{name:`neutral`,value:1}],blendDuration:.5}]]),clearResetTimeout=()=>{resetTimeout.value&&(clearTimeout(resetTimeout.value),resetTimeout.value=void 0)},setEmotion=emotionName=>{if(clearResetTimeout(),!emotionStates.has(emotionName)){console.warn(`Emotion ${emotionName} not found`);return}let emotionState=emotionStates.get(emotionName);if(currentEmotion.value=emotionName,isTransitioning.value=!0,transitionProgress.value=0,vrm.expressionManager){let expressionNames=Object.keys(vrm.expressionManager.expressionMap);for(let name$2 of expressionNames)vrm.expressionManager.setValue(name$2,0)}currentExpressionValues.value.clear(),targetExpressionValues.value.clear();for(let expr of emotionState.expression||[]){let currentValue=vrm.expressionManager?.getValue(expr.name)||0;currentExpressionValues.value.set(expr.name,currentValue),targetExpressionValues.value.set(expr.name,expr.value)}},setEmotionWithResetAfter=(emotionName,ms)=>{clearResetTimeout(),setEmotion(emotionName),resetTimeout.value=setTimeout(()=>{setEmotion(`neutral`),resetTimeout.value=void 0},ms)},update=deltaTime=>{if(!isTransitioning.value||!currentEmotion.value)return;let emotionState=emotionStates.get(currentEmotion.value),blendDuration=emotionState.blendDuration||.3;transitionProgress.value+=deltaTime/blendDuration,transitionProgress.value>=1&&(transitionProgress.value=1,isTransitioning.value=!1);for(let[exprName,targetValue]of targetExpressionValues.value){let startValue=currentExpressionValues.value.get(exprName)||0,currentValue=lerp$4(startValue,targetValue,easeInOutCubic(transitionProgress.value));vrm.expressionManager?.setValue(exprName,currentValue)}},addEmotionState=(emotionName,state)=>{emotionStates.set(emotionName,state)},removeEmotionState=emotionName=>{emotionStates.delete(emotionName)},dispose$1=()=>{clearResetTimeout()};return{currentEmotion,isTransitioning,setEmotion,setEmotionWithResetAfter,update,addEmotionState,removeEmotionState,dispose:dispose$1}}function useWhisper(url,options$1){let opts=merge$3({onLoading:()=>{},onInitiate:()=>{},onProgress:()=>{},onDone:()=>{},onReady:()=>{},onStart:()=>{},onUpdate:()=>{},onComplete:()=>{}},options$1),{post:whisperPost,data:whisperData,terminate}=useWebWorker(url,{type:`module`}),status=ref(null),loadingMessage=ref(``),loadingProgress=ref([]),transcribing=ref(!1),tps=ref(0),result=ref(``);return watch(whisperData,e$4=>{switch(e$4.status){case`loading`:status.value=`loading`,loadingMessage.value=e$4.data,opts.onLoading?.(e$4.data);break;case`initiate`:loadingProgress.value.push(e$4),opts.onInitiate?.(e$4);break;case`progress`:loadingProgress.value=loadingProgress.value.map(item=>item.file===e$4.file?{...item,...e$4}:item),opts.onProgress?.(e$4);break;case`done`:loadingProgress.value=loadingProgress.value.filter(item=>item.file!==e$4.file),opts.onDone?.(e$4);break;case`ready`:status.value=`ready`,opts.onReady?.();break;case`start`:transcribing.value=!0,opts.onStart?.();break;case`update`:tps.value=e$4.tps,opts.onUpdate?.(e$4.tps);break;case`complete`:transcribing.value=!1,result.value=e$4.output[0]||``,console.debug(`Whisper result:`,result.value),opts.onComplete?.(e$4.output[0]);break}}),onUnmounted(()=>{terminate()}),{transcribe:message$1=>whisperPost(message$1),status,loadingMessage,loadingProgress,transcribing,tps,result,load:()=>whisperPost({type:`load`}),terminate}}var XSAIError$1=class extends Error{response;constructor(message$1,response){super(message$1),this.name=`XSAIError`,this.response=response}};const strCamelToSnake$2=str=>str.replace(/[A-Z]/g,s=>`_${s.toLowerCase()}`),objCamelToSnake$1=obj=>Object.fromEntries(Object.entries(obj).map(([k$3,v])=>[strCamelToSnake$2(k$3),v])),clean$2=obj=>Object.fromEntries(Object.entries(obj).filter(([,v])=>v!==void 0)),requestBody=body$2=>JSON.stringify(objCamelToSnake$1(clean$2({...body$2,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),requestHeaders=(headers,apiKey)=>clean$2({Authorization:apiKey===void 0?void 0:`Bearer ${apiKey}`,...headers}),requestURL=(path,baseURL)=>{let base=baseURL.toString();return new URL(path,base.endsWith(`/`)?base:`${base}/`)},responseCatch=async res=>{if(!res.ok)throw new XSAIError$1(`Remote sent ${res.status} response: ${await res.text()}`,res);if(!res.body)throw new XSAIError$1(`Response body is empty from remote server`,res);if(!(res.body instanceof ReadableStream))throw new XSAIError$1(`Expected Response body to be a ReadableStream, but got ${String(res.body)}; Content Type is ${res.headers.get(`Content-Type`)}`,res);return res},responseJSON=async res=>responseCatch(res).then(async res2=>{let text$5=await res2.text();try{return JSON.parse(text$5)}catch{throw Error(`Failed to parse response, response body: ${text$5}`)}}),listModels=async options$1=>(options$1.fetch??globalThis.fetch)(requestURL(`models`,options$1.baseURL),{headers:requestHeaders(options$1.headers,options$1.apiKey),signal:options$1.abortSignal}).then(responseJSON).then(({data:data$12})=>data$12),chat=async options$1=>(options$1.fetch??globalThis.fetch)(requestURL(`chat/completions`,options$1.baseURL),{body:requestBody({...options$1,tools:options$1.tools?.map(tool$1=>({function:clean$2({...tool$1.function,returns:void 0}),type:`function`}))}),headers:requestHeaders({"Content-Type":`application/json`,...options$1.headers},options$1.apiKey),method:`POST`,signal:options$1.abortSignal}).then(responseCatch),determineStepType=({finishReason,maxSteps,stepsLength,toolCallsLength})=>{if(stepsLength===0)return`initial`;if(stepsLength0&&finishReason===`tool_calls`)return`tool-result`;if(![`error`,`length`].includes(finishReason))return`continue`}return`done`},wrapToolResult=result=>typeof result==`string`||Array.isArray(result)&&result.every(item=>!!(typeof item==`object`&&`type`in item&&[`audio`,`image`,`text`].includes(item.type)))?result:JSON.stringify(result),executeTool=async({abortSignal,messages,toolCall,tools:tools$2})=>{let tool$1=tools$2?.find(tool2=>tool2.function.name===toolCall.function.name);if(!tool$1){let availableTools=tools$2?.map(tool2=>tool2.function.name),availableToolsErrorMsg=availableTools==null||availableTools.length===0?`No tools are available`:`Available tools: ${availableTools.join(`, `)}`;throw Error(`Model tried to call unavailable tool "${toolCall.function.name}", ${availableToolsErrorMsg}.`)}let toolCallId=toolCall.id,toolName=toolCall.function.name,parsedArgs=JSON.parse(toolCall.function.arguments),result=wrapToolResult(await tool$1.execute(parsedArgs,{abortSignal,messages,toolCallId})),completionToolCall={args:toolCall.function.arguments,toolCallId,toolCallType:toolCall.type,toolName},completionToolResult={args:parsedArgs,result,toolCallId,toolName},message$1={content:result,role:`tool`,tool_call_id:toolCallId};return{completionToolCall,completionToolResult,message:message$1}},strCamelToSnake$1=str=>str.replace(/[A-Z]/g,s=>`_${s.toLowerCase()}`),objCamelToSnake$2=obj=>Object.fromEntries(Object.entries(obj).map(([k$3,v])=>[strCamelToSnake$1(k$3),v])),trampoline=async fn$5=>{let result=await fn$5();for(;result instanceof Function;)result=await result();return result};var DelayedPromise=class{get promise(){return this._promise??=new Promise((resolve$1,reject)=>{this.status.type===`resolved`?resolve$1(this.status.value):this.status.type===`rejected`&&reject(this.status.error),this._resolve=resolve$1,this._reject=reject}),this._promise}_promise;_reject;_resolve;status={type:`pending`};reject(error){this.status={error,type:`rejected`},this._promise&&this._reject?.(error)}resolve(value$1){this.status={type:`resolved`,value:value$1},this._promise&&this._resolve?.(value$1)}};const parseChunk=text$5=>{if(!text$5||!text$5.startsWith(`data:`))return[void 0,!1];let content$2=text$5.slice(5),data$12=content$2.startsWith(` `)?content$2.slice(1):content$2;if(data$12===`[DONE]`)return[void 0,!0];if(data$12.startsWith(`{`)&&data$12.includes(`"error":`))throw Error(`Error from server: ${data$12}`);let chunk=JSON.parse(data$12);return[chunk,!1]},transformChunk=()=>{let decoder=new TextDecoder,buffer$1=``;return new TransformStream({transform:async(chunk,controller)=>{let text$5=decoder.decode(chunk,{stream:!0});buffer$1+=text$5;let lines=buffer$1.split(` -`);buffer$1=lines.pop()??``;for(let line of lines)try{let[chunk2,isEnd]=parseChunk(line);if(isEnd)break;chunk2&&controller.enqueue(chunk2)}catch(error){controller.error(error)}}})},streamText=async options$1=>{let steps$2=[],messages=structuredClone(options$1.messages),maxSteps=options$1.maxSteps??1,usage,resultSteps=new DelayedPromise,resultMessages=new DelayedPromise,resultUsage=new DelayedPromise,eventCtrl,textCtrl,eventStream=new ReadableStream({start:controller=>eventCtrl=controller}),textStream=new ReadableStream({start:controller=>textCtrl=controller}),pushEvent=stepEvent=>{eventCtrl?.enqueue(stepEvent),options$1.onEvent?.(stepEvent)},pushStep=step=>{steps$2.push(step),options$1.onStepFinish?.(step)},startStream=async()=>{let pushUsage=u=>{usage=u},text$5=``,pushText=content$2=>{textCtrl?.enqueue(content$2),text$5+=content$2},tool_calls=[],toolCalls=[],toolResults=[],finishReason=`other`;if(await chat({...options$1,maxSteps:void 0,messages,stream:!0,streamOptions:options$1.streamOptions==null?void 0:objCamelToSnake$2(options$1.streamOptions)}).then(async res=>res.body.pipeThrough(transformChunk()).pipeTo(new WritableStream({abort:reason=>{eventCtrl?.error(reason),textCtrl?.error(reason)},close:()=>{},write:chunk=>{if(chunk.usage&&pushUsage(chunk.usage),chunk.choices==null||chunk.choices.length===0)return;let choice=chunk.choices[0];if(choice.finish_reason!=null&&(finishReason=choice.finish_reason),choice.delta.tool_calls?.length===0||choice.delta.tool_calls==null)choice.delta.content==null?choice.delta.refusal==null?choice.finish_reason!=null&&pushEvent({finishReason:choice.finish_reason,type:`finish`,usage}):pushEvent({error:choice.delta.refusal,type:`error`}):(pushEvent({text:choice.delta.content,type:`text-delta`}),pushText(choice.delta.content));else for(let toolCall of choice.delta.tool_calls){let{index:index$1}=toolCall;tool_calls.at(index$1)?(tool_calls[index$1].function.arguments+=toolCall.function.arguments,pushEvent({argsTextDelta:toolCall.function.arguments,toolCallId:toolCall.id,toolName:toolCall.function.name,type:`tool-call-delta`})):(tool_calls[index$1]=toolCall,pushEvent({toolCallId:toolCall.id,toolName:toolCall.function.name,type:`tool-call-streaming-start`}))}}}))),messages.push({content:text$5,role:`assistant`,tool_calls}),tool_calls.length!==0)for(let toolCall of tool_calls){let{completionToolCall,completionToolResult,message:message$1}=await executeTool({abortSignal:options$1.abortSignal,messages,toolCall,tools:options$1.tools});toolCalls.push(completionToolCall),toolResults.push(completionToolResult),messages.push(message$1),pushEvent({...completionToolCall,type:`tool-call`}),pushEvent({...completionToolResult,type:`tool-result`})}else pushEvent({finishReason,type:`finish`,usage});if(pushStep({finishReason,stepType:determineStepType({finishReason,maxSteps,stepsLength:steps$2.length,toolCallsLength:toolCalls.length}),text:text$5,toolCalls,toolResults,usage}),toolCalls.length!==0&&steps$2.lengthstartStream()};try{await trampoline(async()=>startStream()),eventCtrl?.close(),textCtrl?.close()}catch(err){eventCtrl?.error(err),textCtrl?.error(err),resultSteps.reject(err),resultMessages.reject(err),resultUsage.reject(err)}finally{resultSteps.resolve(steps$2),resultMessages.resolve(messages),resultUsage.resolve(usage),options$1.onFinish?.(steps$2.at(-1))}return{fullStream:eventStream,messages:resultMessages.promise,steps:resultSteps.promise,textStream,usage:resultUsage.promise}},strictJsonSchema=schema=>({...schema,additionalProperties:!1,properties:schema.properties==null?schema.properties:Object.fromEntries(Object.entries(schema.properties).map(([k$3,v])=>[k$3,typeof v==`object`&&v&&`type`in v&&v.type===`object`?strictJsonSchema(v):v]))}),missingDependenciesUrl=`https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies`,tryImport=async(result,name$2)=>{try{return await result}catch{throw Error(`xsschema: Missing dependencies "${name$2}". see ${missingDependenciesUrl}`)}},getToJsonSchemaFn=async vendor=>{switch(vendor){case`arktype`:return __vitePreload(()=>import(`./arktype-C-GObzDh-CYoI0Osm.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`effect`:return __vitePreload(()=>import(`./effect--zg3C1LQ-DHHO_5U1.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`sury`:return __vitePreload(()=>import(`./sury-s6Akl-oc-SKuB4Eh8.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`valibot`:return __vitePreload(()=>import(`./valibot-DBCeetIe-Deu5LT3V.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`zod`:return __vitePreload(()=>import(`./zod-Bw_60DVU-BAdMglWk.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());default:throw Error(`xsschema: Unsupported schema vendor "${vendor}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},toJsonSchema=async schema=>getToJsonSchemaFn(schema[`~standard`].vendor).then(async toJsonSchema2=>toJsonSchema2(schema)),tool=async({description,execute,name:name$2,parameters})=>{let schema=await toJsonSchema(parameters);return{execute,function:{description,name:name$2,parameters:strictJsonSchema(schema),strict:!0},type:`function`}},NEVER=Object.freeze({status:`aborted`});function $constructor(name$2,initializer$2,params){function init(inst,def$1){var _a$2;for(let k$3 in Object.defineProperty(inst,`_zod`,{value:inst._zod??{},enumerable:!1}),(_a$2=inst._zod).traits??(_a$2.traits=new Set),inst._zod.traits.add(name$2),initializer$2(inst,def$1),_$1.prototype)k$3 in inst||Object.defineProperty(inst,k$3,{value:_$1.prototype[k$3].bind(inst)});inst._zod.constr=_$1,inst._zod.def=def$1}let Parent=params?.Parent??Object;class Definition extends Parent{}Object.defineProperty(Definition,`name`,{value:name$2});function _$1(def$1){var _a$2;let inst=params?.Parent?new Definition:this;init(inst,def$1),(_a$2=inst._zod).deferred??(_a$2.deferred=[]);for(let fn$5 of inst._zod.deferred)fn$5();return inst}return Object.defineProperty(_$1,`init`,{value:init}),Object.defineProperty(_$1,Symbol.hasInstance,{value:inst=>params?.Parent&&inst instanceof params.Parent?!0:inst?._zod?.traits?.has(name$2)}),Object.defineProperty(_$1,`name`,{value:name$2}),_$1}const $brand=Symbol(`zod_brand`);var $ZodAsyncError=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};const globalConfig={};function config(newConfig){return newConfig&&Object.assign(globalConfig,newConfig),globalConfig}function getEnumValues(entries){let numericValues=Object.values(entries).filter(v=>typeof v==`number`),values=Object.entries(entries).filter(([k$3,_$1])=>numericValues.indexOf(+k$3)===-1).map(([_$1,v])=>v);return values}function jsonStringifyReplacer(_$1,value$1){return typeof value$1==`bigint`?value$1.toString():value$1}function cached(getter){let set=!1;return{get value(){{let value$1=getter();return Object.defineProperty(this,`value`,{value:value$1}),value$1}throw Error(`cached value already set`)}}}function nullish(input){return input==null}function cleanRegex(source){let start=source.startsWith(`^`)?1:0,end=source.endsWith(`$`)?source.length-1:source.length;return source.slice(start,end)}function floatSafeRemainder(val,step){let valDecCount=(val.toString().split(`.`)[1]||``).length,stepString=step.toString(),stepDecCount=(stepString.split(`.`)[1]||``).length;if(stepDecCount===0&&/\d?e-\d?/.test(stepString)){let match=stepString.match(/\d?e-(\d?)/);match?.[1]&&(stepDecCount=Number.parseInt(match[1]))}let decCount=valDecCount>stepDecCount?valDecCount:stepDecCount,valInt=Number.parseInt(val.toFixed(decCount).replace(`.`,``)),stepInt=Number.parseInt(step.toFixed(decCount).replace(`.`,``));return valInt%stepInt/10**decCount}const EVALUATING=Symbol(`evaluating`);function defineLazy(object$1,key$2,getter){let value$1;Object.defineProperty(object$1,key$2,{get(){if(value$1!==EVALUATING)return value$1===void 0&&(value$1=EVALUATING,value$1=getter()),value$1},set(v){Object.defineProperty(object$1,key$2,{value:v})},configurable:!0})}function assignProp(target$1,prop,value$1){Object.defineProperty(target$1,prop,{value:value$1,writable:!0,enumerable:!0,configurable:!0})}function mergeDefs(...defs){let mergedDescriptors={};for(let def$1 of defs){let descriptors=Object.getOwnPropertyDescriptors(def$1);Object.assign(mergedDescriptors,descriptors)}return Object.defineProperties({},mergedDescriptors)}function esc(str){return JSON.stringify(str)}const captureStackTrace=`captureStackTrace`in Error?Error.captureStackTrace:(..._args)=>{};function isObject$1(data$12){return typeof data$12==`object`&&!!data$12&&!Array.isArray(data$12)}const allowsEval=cached(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{let F$1=Function;return new F$1(``),!0}catch{return!1}});function isPlainObject$1(o){if(isObject$1(o)===!1)return!1;let ctor=o.constructor;if(ctor===void 0)return!0;let prot=ctor.prototype;return!(isObject$1(prot)===!1||Object.prototype.hasOwnProperty.call(prot,`isPrototypeOf`)===!1)}const propertyKeyTypes=new Set([`string`,`number`,`symbol`]);function escapeRegex(str){return str.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function clone(inst,def$1,params){let cl=new inst._zod.constr(def$1??inst._zod.def);return(!def$1||params?.parent)&&(cl._zod.parent=inst),cl}function normalizeParams(_params){let params=_params;if(!params)return{};if(typeof params==`string`)return{error:()=>params};if(params?.message!==void 0){if(params?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");params.error=params.message}return delete params.message,typeof params.error==`string`?{...params,error:()=>params.error}:params}function optionalKeys(shape){return Object.keys(shape).filter(k$3=>shape[k$3]._zod.optin===`optional`&&shape[k$3]._zod.optout===`optional`)}const NUMBER_FORMAT_RANGES={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function pick(schema,mask){let currDef=schema._zod.def,def$1=mergeDefs(schema._zod.def,{get shape(){let newShape={};for(let key$2 in mask){if(!(key$2 in currDef.shape))throw Error(`Unrecognized key: "${key$2}"`);if(!mask[key$2])continue;newShape[key$2]=currDef.shape[key$2]}return assignProp(this,`shape`,newShape),newShape},checks:[]});return clone(schema,def$1)}function omit(schema,mask){let currDef=schema._zod.def,def$1=mergeDefs(schema._zod.def,{get shape(){let newShape={...schema._zod.def.shape};for(let key$2 in mask){if(!(key$2 in currDef.shape))throw Error(`Unrecognized key: "${key$2}"`);if(!mask[key$2])continue;delete newShape[key$2]}return assignProp(this,`shape`,newShape),newShape},checks:[]});return clone(schema,def$1)}function extend(schema,shape){if(!isPlainObject$1(shape))throw Error(`Invalid input to extend: expected a plain object`);let def$1=mergeDefs(schema._zod.def,{get shape(){let _shape={...schema._zod.def.shape,...shape};return assignProp(this,`shape`,_shape),_shape},checks:[]});return clone(schema,def$1)}function merge$2(a$1,b$1){let def$1=mergeDefs(a$1._zod.def,{get shape(){let _shape={...a$1._zod.def.shape,...b$1._zod.def.shape};return assignProp(this,`shape`,_shape),_shape},get catchall(){return b$1._zod.def.catchall},checks:[]});return clone(a$1,def$1)}function partial(Class,schema,mask){let def$1=mergeDefs(schema._zod.def,{get shape(){let oldShape=schema._zod.def.shape,shape={...oldShape};if(mask)for(let key$2 in mask){if(!(key$2 in oldShape))throw Error(`Unrecognized key: "${key$2}"`);if(!mask[key$2])continue;shape[key$2]=Class?new Class({type:`optional`,innerType:oldShape[key$2]}):oldShape[key$2]}else for(let key$2 in oldShape)shape[key$2]=Class?new Class({type:`optional`,innerType:oldShape[key$2]}):oldShape[key$2];return assignProp(this,`shape`,shape),shape},checks:[]});return clone(schema,def$1)}function required(Class,schema,mask){let def$1=mergeDefs(schema._zod.def,{get shape(){let oldShape=schema._zod.def.shape,shape={...oldShape};if(mask)for(let key$2 in mask){if(!(key$2 in shape))throw Error(`Unrecognized key: "${key$2}"`);if(!mask[key$2])continue;shape[key$2]=new Class({type:`nonoptional`,innerType:oldShape[key$2]})}else for(let key$2 in oldShape)shape[key$2]=new Class({type:`nonoptional`,innerType:oldShape[key$2]});return assignProp(this,`shape`,shape),shape},checks:[]});return clone(schema,def$1)}function aborted(x$1,startIndex=0){for(let i=startIndex;i{var _a$2;return(_a$2=iss).path??(_a$2.path=[]),iss.path.unshift(path),iss})}function unwrapMessage(message$1){return typeof message$1==`string`?message$1:message$1?.message}function finalizeIssue(iss,ctx,config$1){let full={...iss,path:iss.path??[]};if(!iss.message){let message$1=unwrapMessage(iss.inst?._zod.def?.error?.(iss))??unwrapMessage(ctx?.error?.(iss))??unwrapMessage(config$1.customError?.(iss))??unwrapMessage(config$1.localeError?.(iss))??`Invalid input`;full.message=message$1}return delete full.inst,delete full.continue,ctx?.reportInput||delete full.input,full}function getLengthableOrigin(input){return Array.isArray(input)?`array`:typeof input==`string`?`string`:`unknown`}function issue(...args){let[iss,input,inst]=args;return typeof iss==`string`?{message:iss,code:`custom`,input,inst}:{...iss}}const initializer$1=(inst,def$1)=>{inst.name=`$ZodError`,Object.defineProperty(inst,`_zod`,{value:inst._zod,enumerable:!1}),Object.defineProperty(inst,`issues`,{value:def$1,enumerable:!1}),inst.message=JSON.stringify(def$1,jsonStringifyReplacer,2),Object.defineProperty(inst,`toString`,{value:()=>inst.message,enumerable:!1})},$ZodError=$constructor(`$ZodError`,initializer$1),$ZodRealError=$constructor(`$ZodError`,initializer$1,{Parent:Error});function flattenError(error,mapper=issue$1=>issue$1.message){let fieldErrors={},formErrors=[];for(let sub of error.issues)sub.path.length>0?(fieldErrors[sub.path[0]]=fieldErrors[sub.path[0]]||[],fieldErrors[sub.path[0]].push(mapper(sub))):formErrors.push(mapper(sub));return{formErrors,fieldErrors}}function formatError(error,_mapper){let mapper=_mapper||function(issue$1){return issue$1.message},fieldErrors={_errors:[]},processError=error$1=>{for(let issue$1 of error$1.issues)if(issue$1.code===`invalid_union`&&issue$1.errors.length)issue$1.errors.map(issues=>processError({issues}));else if(issue$1.code===`invalid_key`)processError({issues:issue$1.issues});else if(issue$1.code===`invalid_element`)processError({issues:issue$1.issues});else if(issue$1.path.length===0)fieldErrors._errors.push(mapper(issue$1));else{let curr=fieldErrors,i=0;for(;i(schema,value$1,_ctx,_params)=>{let ctx=_ctx?Object.assign(_ctx,{async:!1}):{async:!1},result=schema._zod.run({value:value$1,issues:[]},ctx);if(result instanceof Promise)throw new $ZodAsyncError;if(result.issues.length){let e$4=new(_params?.Err??_Err)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())));throw captureStackTrace(e$4,_params?.callee),e$4}return result.value},parse$2=_parse($ZodRealError),_parseAsync=_Err=>async(schema,value$1,_ctx,params)=>{let ctx=_ctx?Object.assign(_ctx,{async:!0}):{async:!0},result=schema._zod.run({value:value$1,issues:[]},ctx);if(result instanceof Promise&&(result=await result),result.issues.length){let e$4=new(params?.Err??_Err)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())));throw captureStackTrace(e$4,params?.callee),e$4}return result.value},parseAsync$1=_parseAsync($ZodRealError),_safeParse=_Err=>(schema,value$1,_ctx)=>{let ctx=_ctx?{..._ctx,async:!1}:{async:!1},result=schema._zod.run({value:value$1,issues:[]},ctx);if(result instanceof Promise)throw new $ZodAsyncError;return result.issues.length?{success:!1,error:new(_Err??$ZodError)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())))}:{success:!0,data:result.value}},safeParse$1=_safeParse($ZodRealError),_safeParseAsync=_Err=>async(schema,value$1,_ctx)=>{let ctx=_ctx?Object.assign(_ctx,{async:!0}):{async:!0},result=schema._zod.run({value:value$1,issues:[]},ctx);return result instanceof Promise&&(result=await result),result.issues.length?{success:!1,error:new _Err(result.issues.map(iss=>finalizeIssue(iss,ctx,config())))}:{success:!0,data:result.value}},safeParseAsync$1=_safeParseAsync($ZodRealError),cuid=/^[cC][^\s-]{8,}$/,cuid2=/^[0-9a-z]+$/,ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xid=/^[0-9a-vA-V]{20}$/,ksuid=/^[A-Za-z0-9]{27}$/,nanoid=/^[a-zA-Z0-9_-]{21}$/,duration$1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,guid=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,uuid=version$2=>version$2?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version$2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,email=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_emoji$1=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function emoji(){return new RegExp(_emoji$1,`u`)}const ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,cidrv4=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cidrv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,base64url=/^[A-Za-z0-9_-]*$/,hostname=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,e164=/^\+(?:[0-9]){6,14}[0-9]$/,dateSource=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,date$1=RegExp(`^${dateSource}$`);function timeSource(args){let hhmm=`(?:[01]\\d|2[0-3]):[0-5]\\d`,regex=typeof args.precision==`number`?args.precision===-1?`${hhmm}`:args.precision===0?`${hhmm}:[0-5]\\d`:`${hhmm}:[0-5]\\d\\.\\d{${args.precision}}`:`${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;return regex}function time$1(args){return RegExp(`^${timeSource(args)}$`)}function datetime$2(args){let time$2=timeSource({precision:args.precision}),opts=[`Z`];args.local&&opts.push(``),args.offset&&opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let timeRegex=`${time$2}(?:${opts.join(`|`)})`;return RegExp(`^${dateSource}T(?:${timeRegex})$`)}const string$1=params=>{let regex=params?`[\\s\\S]{${params?.minimum??0},${params?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${regex}$`)},integer=/^\d+$/,number$2=/^-?\d+(?:\.\d+)?/i,boolean$1=/true|false/i,lowercase=/^[^A-Z]*$/,uppercase=/^[^a-z]*$/,$ZodCheck=$constructor(`$ZodCheck`,(inst,def$1)=>{var _a$2;inst._zod??={},inst._zod.def=def$1,(_a$2=inst._zod).onattach??(_a$2.onattach=[])}),numericOriginMap={number:`number`,bigint:`bigint`,object:`date`},$ZodCheckLessThan=$constructor(`$ZodCheckLessThan`,(inst,def$1)=>{$ZodCheck.init(inst,def$1);let origin=numericOriginMap[typeof def$1.value];inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag,curr=(def$1.inclusive?bag.maximum:bag.exclusiveMaximum)??1/0;def$1.value{(def$1.inclusive?payload.value<=def$1.value:payload.value{$ZodCheck.init(inst,def$1);let origin=numericOriginMap[typeof def$1.value];inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag,curr=(def$1.inclusive?bag.minimum:bag.exclusiveMinimum)??-1/0;def$1.value>curr&&(def$1.inclusive?bag.minimum=def$1.value:bag.exclusiveMinimum=def$1.value)}),inst._zod.check=payload=>{(def$1.inclusive?payload.value>=def$1.value:payload.value>def$1.value)||payload.issues.push({origin,code:`too_small`,minimum:def$1.value,input:payload.value,inclusive:def$1.inclusive,inst,continue:!def$1.abort})}}),$ZodCheckMultipleOf=$constructor(`$ZodCheckMultipleOf`,(inst,def$1)=>{$ZodCheck.init(inst,def$1),inst._zod.onattach.push(inst$1=>{var _a$2;(_a$2=inst$1._zod.bag).multipleOf??(_a$2.multipleOf=def$1.value)}),inst._zod.check=payload=>{if(typeof payload.value!=typeof def$1.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);let isMultiple=typeof payload.value==`bigint`?payload.value%def$1.value===BigInt(0):floatSafeRemainder(payload.value,def$1.value)===0;isMultiple||payload.issues.push({origin:typeof payload.value,code:`not_multiple_of`,divisor:def$1.value,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckNumberFormat=$constructor(`$ZodCheckNumberFormat`,(inst,def$1)=>{$ZodCheck.init(inst,def$1),def$1.format=def$1.format||`float64`;let isInt=def$1.format?.includes(`int`),origin=isInt?`int`:`number`,[minimum,maximum]=NUMBER_FORMAT_RANGES[def$1.format];inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.format=def$1.format,bag.minimum=minimum,bag.maximum=maximum,isInt&&(bag.pattern=integer)}),inst._zod.check=payload=>{let input=payload.value;if(isInt){if(!Number.isInteger(input)){payload.issues.push({expected:origin,format:def$1.format,code:`invalid_type`,continue:!1,input,inst});return}if(!Number.isSafeInteger(input)){input>0?payload.issues.push({input,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst,origin,continue:!def$1.abort}):payload.issues.push({input,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst,origin,continue:!def$1.abort});return}}inputmaximum&&payload.issues.push({origin:`number`,input,code:`too_big`,maximum,inst})}}),$ZodCheckMaxLength=$constructor(`$ZodCheckMaxLength`,(inst,def$1)=>{var _a$2;$ZodCheck.init(inst,def$1),(_a$2=inst._zod.def).when??(_a$2.when=payload=>{let val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst$1=>{let curr=inst$1._zod.bag.maximum??1/0;def$1.maximum{let input=payload.value,length=input.length;if(length<=def$1.maximum)return;let origin=getLengthableOrigin(input);payload.issues.push({origin,code:`too_big`,maximum:def$1.maximum,inclusive:!0,input,inst,continue:!def$1.abort})}}),$ZodCheckMinLength=$constructor(`$ZodCheckMinLength`,(inst,def$1)=>{var _a$2;$ZodCheck.init(inst,def$1),(_a$2=inst._zod.def).when??(_a$2.when=payload=>{let val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst$1=>{let curr=inst$1._zod.bag.minimum??-1/0;def$1.minimum>curr&&(inst$1._zod.bag.minimum=def$1.minimum)}),inst._zod.check=payload=>{let input=payload.value,length=input.length;if(length>=def$1.minimum)return;let origin=getLengthableOrigin(input);payload.issues.push({origin,code:`too_small`,minimum:def$1.minimum,inclusive:!0,input,inst,continue:!def$1.abort})}}),$ZodCheckLengthEquals=$constructor(`$ZodCheckLengthEquals`,(inst,def$1)=>{var _a$2;$ZodCheck.init(inst,def$1),(_a$2=inst._zod.def).when??(_a$2.when=payload=>{let val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.minimum=def$1.length,bag.maximum=def$1.length,bag.length=def$1.length}),inst._zod.check=payload=>{let input=payload.value,length=input.length;if(length===def$1.length)return;let origin=getLengthableOrigin(input),tooBig=length>def$1.length;payload.issues.push({origin,...tooBig?{code:`too_big`,maximum:def$1.length}:{code:`too_small`,minimum:def$1.length},inclusive:!0,exact:!0,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckStringFormat=$constructor(`$ZodCheckStringFormat`,(inst,def$1)=>{var _a$2,_b;$ZodCheck.init(inst,def$1),inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.format=def$1.format,def$1.pattern&&(bag.patterns??=new Set,bag.patterns.add(def$1.pattern))}),def$1.pattern?(_a$2=inst._zod).check??(_a$2.check=payload=>{def$1.pattern.lastIndex=0,!def$1.pattern.test(payload.value)&&payload.issues.push({origin:`string`,code:`invalid_format`,format:def$1.format,input:payload.value,...def$1.pattern?{pattern:def$1.pattern.toString()}:{},inst,continue:!def$1.abort})}):(_b=inst._zod).check??(_b.check=()=>{})}),$ZodCheckRegex=$constructor(`$ZodCheckRegex`,(inst,def$1)=>{$ZodCheckStringFormat.init(inst,def$1),inst._zod.check=payload=>{def$1.pattern.lastIndex=0,!def$1.pattern.test(payload.value)&&payload.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:payload.value,pattern:def$1.pattern.toString(),inst,continue:!def$1.abort})}}),$ZodCheckLowerCase=$constructor(`$ZodCheckLowerCase`,(inst,def$1)=>{def$1.pattern??=lowercase,$ZodCheckStringFormat.init(inst,def$1)}),$ZodCheckUpperCase=$constructor(`$ZodCheckUpperCase`,(inst,def$1)=>{def$1.pattern??=uppercase,$ZodCheckStringFormat.init(inst,def$1)}),$ZodCheckIncludes=$constructor(`$ZodCheckIncludes`,(inst,def$1)=>{$ZodCheck.init(inst,def$1);let escapedRegex=escapeRegex(def$1.includes),pattern=new RegExp(typeof def$1.position==`number`?`^.{${def$1.position}}${escapedRegex}`:escapedRegex);def$1.pattern=pattern,inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.patterns??=new Set,bag.patterns.add(pattern)}),inst._zod.check=payload=>{payload.value.includes(def$1.includes,def$1.position)||payload.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:def$1.includes,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckStartsWith=$constructor(`$ZodCheckStartsWith`,(inst,def$1)=>{$ZodCheck.init(inst,def$1);let pattern=RegExp(`^${escapeRegex(def$1.prefix)}.*`);def$1.pattern??=pattern,inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.patterns??=new Set,bag.patterns.add(pattern)}),inst._zod.check=payload=>{payload.value.startsWith(def$1.prefix)||payload.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:def$1.prefix,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckEndsWith=$constructor(`$ZodCheckEndsWith`,(inst,def$1)=>{$ZodCheck.init(inst,def$1);let pattern=RegExp(`.*${escapeRegex(def$1.suffix)}$`);def$1.pattern??=pattern,inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.patterns??=new Set,bag.patterns.add(pattern)}),inst._zod.check=payload=>{payload.value.endsWith(def$1.suffix)||payload.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:def$1.suffix,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckOverwrite=$constructor(`$ZodCheckOverwrite`,(inst,def$1)=>{$ZodCheck.init(inst,def$1),inst._zod.check=payload=>{payload.value=def$1.tx(payload.value)}});var Doc=class{constructor(args=[]){this.content=[],this.indent=0,this&&(this.args=args)}indented(fn$5){this.indent+=1,fn$5(this),--this.indent}write(arg){if(typeof arg==`function`){arg(this,{execution:`sync`}),arg(this,{execution:`async`});return}let content$2=arg,lines=content$2.split(` +`);buffer$1=lines.pop()??``;for(let line of lines)try{let[chunk2,isEnd]=parseChunk(line);if(isEnd)break;chunk2&&controller.enqueue(chunk2)}catch(error){controller.error(error)}}})},streamText=async options$1=>{let steps$2=[],messages=structuredClone(options$1.messages),maxSteps=options$1.maxSteps??1,usage,resultSteps=new DelayedPromise,resultMessages=new DelayedPromise,resultUsage=new DelayedPromise,eventCtrl,textCtrl,eventStream=new ReadableStream({start:controller=>eventCtrl=controller}),textStream=new ReadableStream({start:controller=>textCtrl=controller}),pushEvent=stepEvent=>{eventCtrl?.enqueue(stepEvent),options$1.onEvent?.(stepEvent)},pushStep=step=>{steps$2.push(step),options$1.onStepFinish?.(step)},startStream=async()=>{let pushUsage=u=>{usage=u},text$5=``,pushText=content$2=>{textCtrl?.enqueue(content$2),text$5+=content$2},tool_calls=[],toolCalls=[],toolResults=[],finishReason=`other`;if(await chat({...options$1,maxSteps:void 0,messages,stream:!0,streamOptions:options$1.streamOptions==null?void 0:objCamelToSnake$2(options$1.streamOptions)}).then(async res=>res.body.pipeThrough(transformChunk()).pipeTo(new WritableStream({abort:reason=>{eventCtrl?.error(reason),textCtrl?.error(reason)},close:()=>{},write:chunk=>{if(chunk.usage&&pushUsage(chunk.usage),chunk.choices==null||chunk.choices.length===0)return;let choice=chunk.choices[0];if(choice.finish_reason!=null&&(finishReason=choice.finish_reason),choice.delta.tool_calls?.length===0||choice.delta.tool_calls==null)choice.delta.content==null?choice.delta.refusal==null?choice.finish_reason!=null&&pushEvent({finishReason:choice.finish_reason,type:`finish`,usage}):pushEvent({error:choice.delta.refusal,type:`error`}):(pushEvent({text:choice.delta.content,type:`text-delta`}),pushText(choice.delta.content));else for(let toolCall of choice.delta.tool_calls){let{index:index$1}=toolCall;tool_calls.at(index$1)?(tool_calls[index$1].function.arguments+=toolCall.function.arguments,pushEvent({argsTextDelta:toolCall.function.arguments,toolCallId:toolCall.id,toolName:toolCall.function.name,type:`tool-call-delta`})):(tool_calls[index$1]=toolCall,pushEvent({toolCallId:toolCall.id,toolName:toolCall.function.name,type:`tool-call-streaming-start`}))}}}))),messages.push({content:text$5,role:`assistant`,tool_calls}),tool_calls.length!==0)for(let toolCall of tool_calls){let{completionToolCall,completionToolResult,message:message$1}=await executeTool({abortSignal:options$1.abortSignal,messages,toolCall,tools:options$1.tools});toolCalls.push(completionToolCall),toolResults.push(completionToolResult),messages.push(message$1),pushEvent({...completionToolCall,type:`tool-call`}),pushEvent({...completionToolResult,type:`tool-result`})}else pushEvent({finishReason,type:`finish`,usage});if(pushStep({finishReason,stepType:determineStepType({finishReason,maxSteps,stepsLength:steps$2.length,toolCallsLength:toolCalls.length}),text:text$5,toolCalls,toolResults,usage}),toolCalls.length!==0&&steps$2.lengthstartStream()};try{await trampoline(async()=>startStream()),eventCtrl?.close(),textCtrl?.close()}catch(err){eventCtrl?.error(err),textCtrl?.error(err),resultSteps.reject(err),resultMessages.reject(err),resultUsage.reject(err)}finally{resultSteps.resolve(steps$2),resultMessages.resolve(messages),resultUsage.resolve(usage),options$1.onFinish?.(steps$2.at(-1))}return{fullStream:eventStream,messages:resultMessages.promise,steps:resultSteps.promise,textStream,usage:resultUsage.promise}},strictJsonSchema=schema=>({...schema,additionalProperties:!1,properties:schema.properties==null?schema.properties:Object.fromEntries(Object.entries(schema.properties).map(([k$3,v])=>[k$3,typeof v==`object`&&v&&`type`in v&&v.type===`object`?strictJsonSchema(v):v]))}),missingDependenciesUrl=`https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies`,tryImport=async(result,name$2)=>{try{return await result}catch{throw Error(`xsschema: Missing dependencies "${name$2}". see ${missingDependenciesUrl}`)}},getToJsonSchemaFn=async vendor=>{switch(vendor){case`arktype`:return __vitePreload(()=>import(`./arktype-C-GObzDh-CYoI0Osm.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`effect`:return __vitePreload(()=>import(`./effect--zg3C1LQ-BJsXVcIa.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`sury`:return __vitePreload(()=>import(`./sury-s6Akl-oc-BocPOnya.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`valibot`:return __vitePreload(()=>import(`./valibot-DBCeetIe-B3VjNc-Q.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`zod`:return __vitePreload(()=>import(`./zod-Bw_60DVU-CpZ2MqKY.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());default:throw Error(`xsschema: Unsupported schema vendor "${vendor}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},toJsonSchema=async schema=>getToJsonSchemaFn(schema[`~standard`].vendor).then(async toJsonSchema2=>toJsonSchema2(schema)),tool=async({description,execute,name:name$2,parameters})=>{let schema=await toJsonSchema(parameters);return{execute,function:{description,name:name$2,parameters:strictJsonSchema(schema),strict:!0},type:`function`}},NEVER=Object.freeze({status:`aborted`});function $constructor(name$2,initializer$2,params){function init(inst,def$1){var _a$2;for(let k$3 in Object.defineProperty(inst,`_zod`,{value:inst._zod??{},enumerable:!1}),(_a$2=inst._zod).traits??(_a$2.traits=new Set),inst._zod.traits.add(name$2),initializer$2(inst,def$1),_$1.prototype)k$3 in inst||Object.defineProperty(inst,k$3,{value:_$1.prototype[k$3].bind(inst)});inst._zod.constr=_$1,inst._zod.def=def$1}let Parent=params?.Parent??Object;class Definition extends Parent{}Object.defineProperty(Definition,`name`,{value:name$2});function _$1(def$1){var _a$2;let inst=params?.Parent?new Definition:this;init(inst,def$1),(_a$2=inst._zod).deferred??(_a$2.deferred=[]);for(let fn$5 of inst._zod.deferred)fn$5();return inst}return Object.defineProperty(_$1,`init`,{value:init}),Object.defineProperty(_$1,Symbol.hasInstance,{value:inst=>params?.Parent&&inst instanceof params.Parent?!0:inst?._zod?.traits?.has(name$2)}),Object.defineProperty(_$1,`name`,{value:name$2}),_$1}const $brand=Symbol(`zod_brand`);var $ZodAsyncError=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};const globalConfig={};function config(newConfig){return newConfig&&Object.assign(globalConfig,newConfig),globalConfig}function getEnumValues(entries){let numericValues=Object.values(entries).filter(v=>typeof v==`number`),values=Object.entries(entries).filter(([k$3,_$1])=>numericValues.indexOf(+k$3)===-1).map(([_$1,v])=>v);return values}function jsonStringifyReplacer(_$1,value$1){return typeof value$1==`bigint`?value$1.toString():value$1}function cached(getter){let set=!1;return{get value(){{let value$1=getter();return Object.defineProperty(this,`value`,{value:value$1}),value$1}throw Error(`cached value already set`)}}}function nullish(input){return input==null}function cleanRegex(source){let start=source.startsWith(`^`)?1:0,end=source.endsWith(`$`)?source.length-1:source.length;return source.slice(start,end)}function floatSafeRemainder(val,step){let valDecCount=(val.toString().split(`.`)[1]||``).length,stepString=step.toString(),stepDecCount=(stepString.split(`.`)[1]||``).length;if(stepDecCount===0&&/\d?e-\d?/.test(stepString)){let match=stepString.match(/\d?e-(\d?)/);match?.[1]&&(stepDecCount=Number.parseInt(match[1]))}let decCount=valDecCount>stepDecCount?valDecCount:stepDecCount,valInt=Number.parseInt(val.toFixed(decCount).replace(`.`,``)),stepInt=Number.parseInt(step.toFixed(decCount).replace(`.`,``));return valInt%stepInt/10**decCount}const EVALUATING=Symbol(`evaluating`);function defineLazy(object$1,key$2,getter){let value$1;Object.defineProperty(object$1,key$2,{get(){if(value$1!==EVALUATING)return value$1===void 0&&(value$1=EVALUATING,value$1=getter()),value$1},set(v){Object.defineProperty(object$1,key$2,{value:v})},configurable:!0})}function assignProp(target$1,prop,value$1){Object.defineProperty(target$1,prop,{value:value$1,writable:!0,enumerable:!0,configurable:!0})}function mergeDefs(...defs){let mergedDescriptors={};for(let def$1 of defs){let descriptors=Object.getOwnPropertyDescriptors(def$1);Object.assign(mergedDescriptors,descriptors)}return Object.defineProperties({},mergedDescriptors)}function esc(str){return JSON.stringify(str)}const captureStackTrace=`captureStackTrace`in Error?Error.captureStackTrace:(..._args)=>{};function isObject$1(data$12){return typeof data$12==`object`&&!!data$12&&!Array.isArray(data$12)}const allowsEval=cached(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{let F$1=Function;return new F$1(``),!0}catch{return!1}});function isPlainObject$1(o){if(isObject$1(o)===!1)return!1;let ctor=o.constructor;if(ctor===void 0)return!0;let prot=ctor.prototype;return!(isObject$1(prot)===!1||Object.prototype.hasOwnProperty.call(prot,`isPrototypeOf`)===!1)}const propertyKeyTypes=new Set([`string`,`number`,`symbol`]);function escapeRegex(str){return str.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function clone(inst,def$1,params){let cl=new inst._zod.constr(def$1??inst._zod.def);return(!def$1||params?.parent)&&(cl._zod.parent=inst),cl}function normalizeParams(_params){let params=_params;if(!params)return{};if(typeof params==`string`)return{error:()=>params};if(params?.message!==void 0){if(params?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");params.error=params.message}return delete params.message,typeof params.error==`string`?{...params,error:()=>params.error}:params}function optionalKeys(shape){return Object.keys(shape).filter(k$3=>shape[k$3]._zod.optin===`optional`&&shape[k$3]._zod.optout===`optional`)}const NUMBER_FORMAT_RANGES={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function pick(schema,mask){let currDef=schema._zod.def,def$1=mergeDefs(schema._zod.def,{get shape(){let newShape={};for(let key$2 in mask){if(!(key$2 in currDef.shape))throw Error(`Unrecognized key: "${key$2}"`);if(!mask[key$2])continue;newShape[key$2]=currDef.shape[key$2]}return assignProp(this,`shape`,newShape),newShape},checks:[]});return clone(schema,def$1)}function omit(schema,mask){let currDef=schema._zod.def,def$1=mergeDefs(schema._zod.def,{get shape(){let newShape={...schema._zod.def.shape};for(let key$2 in mask){if(!(key$2 in currDef.shape))throw Error(`Unrecognized key: "${key$2}"`);if(!mask[key$2])continue;delete newShape[key$2]}return assignProp(this,`shape`,newShape),newShape},checks:[]});return clone(schema,def$1)}function extend(schema,shape){if(!isPlainObject$1(shape))throw Error(`Invalid input to extend: expected a plain object`);let def$1=mergeDefs(schema._zod.def,{get shape(){let _shape={...schema._zod.def.shape,...shape};return assignProp(this,`shape`,_shape),_shape},checks:[]});return clone(schema,def$1)}function merge$2(a$1,b$1){let def$1=mergeDefs(a$1._zod.def,{get shape(){let _shape={...a$1._zod.def.shape,...b$1._zod.def.shape};return assignProp(this,`shape`,_shape),_shape},get catchall(){return b$1._zod.def.catchall},checks:[]});return clone(a$1,def$1)}function partial(Class,schema,mask){let def$1=mergeDefs(schema._zod.def,{get shape(){let oldShape=schema._zod.def.shape,shape={...oldShape};if(mask)for(let key$2 in mask){if(!(key$2 in oldShape))throw Error(`Unrecognized key: "${key$2}"`);if(!mask[key$2])continue;shape[key$2]=Class?new Class({type:`optional`,innerType:oldShape[key$2]}):oldShape[key$2]}else for(let key$2 in oldShape)shape[key$2]=Class?new Class({type:`optional`,innerType:oldShape[key$2]}):oldShape[key$2];return assignProp(this,`shape`,shape),shape},checks:[]});return clone(schema,def$1)}function required(Class,schema,mask){let def$1=mergeDefs(schema._zod.def,{get shape(){let oldShape=schema._zod.def.shape,shape={...oldShape};if(mask)for(let key$2 in mask){if(!(key$2 in shape))throw Error(`Unrecognized key: "${key$2}"`);if(!mask[key$2])continue;shape[key$2]=new Class({type:`nonoptional`,innerType:oldShape[key$2]})}else for(let key$2 in oldShape)shape[key$2]=new Class({type:`nonoptional`,innerType:oldShape[key$2]});return assignProp(this,`shape`,shape),shape},checks:[]});return clone(schema,def$1)}function aborted(x$1,startIndex=0){for(let i=startIndex;i{var _a$2;return(_a$2=iss).path??(_a$2.path=[]),iss.path.unshift(path),iss})}function unwrapMessage(message$1){return typeof message$1==`string`?message$1:message$1?.message}function finalizeIssue(iss,ctx,config$1){let full={...iss,path:iss.path??[]};if(!iss.message){let message$1=unwrapMessage(iss.inst?._zod.def?.error?.(iss))??unwrapMessage(ctx?.error?.(iss))??unwrapMessage(config$1.customError?.(iss))??unwrapMessage(config$1.localeError?.(iss))??`Invalid input`;full.message=message$1}return delete full.inst,delete full.continue,ctx?.reportInput||delete full.input,full}function getLengthableOrigin(input){return Array.isArray(input)?`array`:typeof input==`string`?`string`:`unknown`}function issue(...args){let[iss,input,inst]=args;return typeof iss==`string`?{message:iss,code:`custom`,input,inst}:{...iss}}const initializer$1=(inst,def$1)=>{inst.name=`$ZodError`,Object.defineProperty(inst,`_zod`,{value:inst._zod,enumerable:!1}),Object.defineProperty(inst,`issues`,{value:def$1,enumerable:!1}),inst.message=JSON.stringify(def$1,jsonStringifyReplacer,2),Object.defineProperty(inst,`toString`,{value:()=>inst.message,enumerable:!1})},$ZodError=$constructor(`$ZodError`,initializer$1),$ZodRealError=$constructor(`$ZodError`,initializer$1,{Parent:Error});function flattenError(error,mapper=issue$1=>issue$1.message){let fieldErrors={},formErrors=[];for(let sub of error.issues)sub.path.length>0?(fieldErrors[sub.path[0]]=fieldErrors[sub.path[0]]||[],fieldErrors[sub.path[0]].push(mapper(sub))):formErrors.push(mapper(sub));return{formErrors,fieldErrors}}function formatError(error,_mapper){let mapper=_mapper||function(issue$1){return issue$1.message},fieldErrors={_errors:[]},processError=error$1=>{for(let issue$1 of error$1.issues)if(issue$1.code===`invalid_union`&&issue$1.errors.length)issue$1.errors.map(issues=>processError({issues}));else if(issue$1.code===`invalid_key`)processError({issues:issue$1.issues});else if(issue$1.code===`invalid_element`)processError({issues:issue$1.issues});else if(issue$1.path.length===0)fieldErrors._errors.push(mapper(issue$1));else{let curr=fieldErrors,i=0;for(;i(schema,value$1,_ctx,_params)=>{let ctx=_ctx?Object.assign(_ctx,{async:!1}):{async:!1},result=schema._zod.run({value:value$1,issues:[]},ctx);if(result instanceof Promise)throw new $ZodAsyncError;if(result.issues.length){let e$4=new(_params?.Err??_Err)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())));throw captureStackTrace(e$4,_params?.callee),e$4}return result.value},parse$2=_parse($ZodRealError),_parseAsync=_Err=>async(schema,value$1,_ctx,params)=>{let ctx=_ctx?Object.assign(_ctx,{async:!0}):{async:!0},result=schema._zod.run({value:value$1,issues:[]},ctx);if(result instanceof Promise&&(result=await result),result.issues.length){let e$4=new(params?.Err??_Err)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())));throw captureStackTrace(e$4,params?.callee),e$4}return result.value},parseAsync$1=_parseAsync($ZodRealError),_safeParse=_Err=>(schema,value$1,_ctx)=>{let ctx=_ctx?{..._ctx,async:!1}:{async:!1},result=schema._zod.run({value:value$1,issues:[]},ctx);if(result instanceof Promise)throw new $ZodAsyncError;return result.issues.length?{success:!1,error:new(_Err??$ZodError)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())))}:{success:!0,data:result.value}},safeParse$1=_safeParse($ZodRealError),_safeParseAsync=_Err=>async(schema,value$1,_ctx)=>{let ctx=_ctx?Object.assign(_ctx,{async:!0}):{async:!0},result=schema._zod.run({value:value$1,issues:[]},ctx);return result instanceof Promise&&(result=await result),result.issues.length?{success:!1,error:new _Err(result.issues.map(iss=>finalizeIssue(iss,ctx,config())))}:{success:!0,data:result.value}},safeParseAsync$1=_safeParseAsync($ZodRealError),cuid=/^[cC][^\s-]{8,}$/,cuid2=/^[0-9a-z]+$/,ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xid=/^[0-9a-vA-V]{20}$/,ksuid=/^[A-Za-z0-9]{27}$/,nanoid=/^[a-zA-Z0-9_-]{21}$/,duration$1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,guid=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,uuid=version$2=>version$2?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version$2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,email=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_emoji$1=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function emoji(){return new RegExp(_emoji$1,`u`)}const ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,cidrv4=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cidrv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,base64url=/^[A-Za-z0-9_-]*$/,hostname=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,e164=/^\+(?:[0-9]){6,14}[0-9]$/,dateSource=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,date$1=RegExp(`^${dateSource}$`);function timeSource(args){let hhmm=`(?:[01]\\d|2[0-3]):[0-5]\\d`,regex=typeof args.precision==`number`?args.precision===-1?`${hhmm}`:args.precision===0?`${hhmm}:[0-5]\\d`:`${hhmm}:[0-5]\\d\\.\\d{${args.precision}}`:`${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;return regex}function time$1(args){return RegExp(`^${timeSource(args)}$`)}function datetime$2(args){let time$2=timeSource({precision:args.precision}),opts=[`Z`];args.local&&opts.push(``),args.offset&&opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let timeRegex=`${time$2}(?:${opts.join(`|`)})`;return RegExp(`^${dateSource}T(?:${timeRegex})$`)}const string$1=params=>{let regex=params?`[\\s\\S]{${params?.minimum??0},${params?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${regex}$`)},integer=/^\d+$/,number$2=/^-?\d+(?:\.\d+)?/i,boolean$1=/true|false/i,lowercase=/^[^A-Z]*$/,uppercase=/^[^a-z]*$/,$ZodCheck=$constructor(`$ZodCheck`,(inst,def$1)=>{var _a$2;inst._zod??={},inst._zod.def=def$1,(_a$2=inst._zod).onattach??(_a$2.onattach=[])}),numericOriginMap={number:`number`,bigint:`bigint`,object:`date`},$ZodCheckLessThan=$constructor(`$ZodCheckLessThan`,(inst,def$1)=>{$ZodCheck.init(inst,def$1);let origin=numericOriginMap[typeof def$1.value];inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag,curr=(def$1.inclusive?bag.maximum:bag.exclusiveMaximum)??1/0;def$1.value{(def$1.inclusive?payload.value<=def$1.value:payload.value{$ZodCheck.init(inst,def$1);let origin=numericOriginMap[typeof def$1.value];inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag,curr=(def$1.inclusive?bag.minimum:bag.exclusiveMinimum)??-1/0;def$1.value>curr&&(def$1.inclusive?bag.minimum=def$1.value:bag.exclusiveMinimum=def$1.value)}),inst._zod.check=payload=>{(def$1.inclusive?payload.value>=def$1.value:payload.value>def$1.value)||payload.issues.push({origin,code:`too_small`,minimum:def$1.value,input:payload.value,inclusive:def$1.inclusive,inst,continue:!def$1.abort})}}),$ZodCheckMultipleOf=$constructor(`$ZodCheckMultipleOf`,(inst,def$1)=>{$ZodCheck.init(inst,def$1),inst._zod.onattach.push(inst$1=>{var _a$2;(_a$2=inst$1._zod.bag).multipleOf??(_a$2.multipleOf=def$1.value)}),inst._zod.check=payload=>{if(typeof payload.value!=typeof def$1.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);let isMultiple=typeof payload.value==`bigint`?payload.value%def$1.value===BigInt(0):floatSafeRemainder(payload.value,def$1.value)===0;isMultiple||payload.issues.push({origin:typeof payload.value,code:`not_multiple_of`,divisor:def$1.value,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckNumberFormat=$constructor(`$ZodCheckNumberFormat`,(inst,def$1)=>{$ZodCheck.init(inst,def$1),def$1.format=def$1.format||`float64`;let isInt=def$1.format?.includes(`int`),origin=isInt?`int`:`number`,[minimum,maximum]=NUMBER_FORMAT_RANGES[def$1.format];inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.format=def$1.format,bag.minimum=minimum,bag.maximum=maximum,isInt&&(bag.pattern=integer)}),inst._zod.check=payload=>{let input=payload.value;if(isInt){if(!Number.isInteger(input)){payload.issues.push({expected:origin,format:def$1.format,code:`invalid_type`,continue:!1,input,inst});return}if(!Number.isSafeInteger(input)){input>0?payload.issues.push({input,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst,origin,continue:!def$1.abort}):payload.issues.push({input,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst,origin,continue:!def$1.abort});return}}inputmaximum&&payload.issues.push({origin:`number`,input,code:`too_big`,maximum,inst})}}),$ZodCheckMaxLength=$constructor(`$ZodCheckMaxLength`,(inst,def$1)=>{var _a$2;$ZodCheck.init(inst,def$1),(_a$2=inst._zod.def).when??(_a$2.when=payload=>{let val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst$1=>{let curr=inst$1._zod.bag.maximum??1/0;def$1.maximum{let input=payload.value,length=input.length;if(length<=def$1.maximum)return;let origin=getLengthableOrigin(input);payload.issues.push({origin,code:`too_big`,maximum:def$1.maximum,inclusive:!0,input,inst,continue:!def$1.abort})}}),$ZodCheckMinLength=$constructor(`$ZodCheckMinLength`,(inst,def$1)=>{var _a$2;$ZodCheck.init(inst,def$1),(_a$2=inst._zod.def).when??(_a$2.when=payload=>{let val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst$1=>{let curr=inst$1._zod.bag.minimum??-1/0;def$1.minimum>curr&&(inst$1._zod.bag.minimum=def$1.minimum)}),inst._zod.check=payload=>{let input=payload.value,length=input.length;if(length>=def$1.minimum)return;let origin=getLengthableOrigin(input);payload.issues.push({origin,code:`too_small`,minimum:def$1.minimum,inclusive:!0,input,inst,continue:!def$1.abort})}}),$ZodCheckLengthEquals=$constructor(`$ZodCheckLengthEquals`,(inst,def$1)=>{var _a$2;$ZodCheck.init(inst,def$1),(_a$2=inst._zod.def).when??(_a$2.when=payload=>{let val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.minimum=def$1.length,bag.maximum=def$1.length,bag.length=def$1.length}),inst._zod.check=payload=>{let input=payload.value,length=input.length;if(length===def$1.length)return;let origin=getLengthableOrigin(input),tooBig=length>def$1.length;payload.issues.push({origin,...tooBig?{code:`too_big`,maximum:def$1.length}:{code:`too_small`,minimum:def$1.length},inclusive:!0,exact:!0,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckStringFormat=$constructor(`$ZodCheckStringFormat`,(inst,def$1)=>{var _a$2,_b;$ZodCheck.init(inst,def$1),inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.format=def$1.format,def$1.pattern&&(bag.patterns??=new Set,bag.patterns.add(def$1.pattern))}),def$1.pattern?(_a$2=inst._zod).check??(_a$2.check=payload=>{def$1.pattern.lastIndex=0,!def$1.pattern.test(payload.value)&&payload.issues.push({origin:`string`,code:`invalid_format`,format:def$1.format,input:payload.value,...def$1.pattern?{pattern:def$1.pattern.toString()}:{},inst,continue:!def$1.abort})}):(_b=inst._zod).check??(_b.check=()=>{})}),$ZodCheckRegex=$constructor(`$ZodCheckRegex`,(inst,def$1)=>{$ZodCheckStringFormat.init(inst,def$1),inst._zod.check=payload=>{def$1.pattern.lastIndex=0,!def$1.pattern.test(payload.value)&&payload.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:payload.value,pattern:def$1.pattern.toString(),inst,continue:!def$1.abort})}}),$ZodCheckLowerCase=$constructor(`$ZodCheckLowerCase`,(inst,def$1)=>{def$1.pattern??=lowercase,$ZodCheckStringFormat.init(inst,def$1)}),$ZodCheckUpperCase=$constructor(`$ZodCheckUpperCase`,(inst,def$1)=>{def$1.pattern??=uppercase,$ZodCheckStringFormat.init(inst,def$1)}),$ZodCheckIncludes=$constructor(`$ZodCheckIncludes`,(inst,def$1)=>{$ZodCheck.init(inst,def$1);let escapedRegex=escapeRegex(def$1.includes),pattern=new RegExp(typeof def$1.position==`number`?`^.{${def$1.position}}${escapedRegex}`:escapedRegex);def$1.pattern=pattern,inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.patterns??=new Set,bag.patterns.add(pattern)}),inst._zod.check=payload=>{payload.value.includes(def$1.includes,def$1.position)||payload.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:def$1.includes,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckStartsWith=$constructor(`$ZodCheckStartsWith`,(inst,def$1)=>{$ZodCheck.init(inst,def$1);let pattern=RegExp(`^${escapeRegex(def$1.prefix)}.*`);def$1.pattern??=pattern,inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.patterns??=new Set,bag.patterns.add(pattern)}),inst._zod.check=payload=>{payload.value.startsWith(def$1.prefix)||payload.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:def$1.prefix,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckEndsWith=$constructor(`$ZodCheckEndsWith`,(inst,def$1)=>{$ZodCheck.init(inst,def$1);let pattern=RegExp(`.*${escapeRegex(def$1.suffix)}$`);def$1.pattern??=pattern,inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.patterns??=new Set,bag.patterns.add(pattern)}),inst._zod.check=payload=>{payload.value.endsWith(def$1.suffix)||payload.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:def$1.suffix,input:payload.value,inst,continue:!def$1.abort})}}),$ZodCheckOverwrite=$constructor(`$ZodCheckOverwrite`,(inst,def$1)=>{$ZodCheck.init(inst,def$1),inst._zod.check=payload=>{payload.value=def$1.tx(payload.value)}});var Doc=class{constructor(args=[]){this.content=[],this.indent=0,this&&(this.args=args)}indented(fn$5){this.indent+=1,fn$5(this),--this.indent}write(arg){if(typeof arg==`function`){arg(this,{execution:`sync`}),arg(this,{execution:`async`});return}let content$2=arg,lines=content$2.split(` `).filter(x$1=>x$1),minIndent=Math.min(...lines.map(x$1=>x$1.length-x$1.trimStart().length)),dedented=lines.map(x$1=>x$1.slice(minIndent)).map(x$1=>` `.repeat(this.indent*2)+x$1);for(let line of dedented)this.content.push(line)}compile(){let F$1=Function,args=this?.args,content$2=this?.content??[``],lines=[...content$2.map(x$1=>` ${x$1}`)];return new F$1(...args,lines.join(` `))}};const version={major:4,minor:0,patch:14},$ZodType=$constructor(`$ZodType`,(inst,def$1)=>{var _a$2;inst??={},inst._zod.def=def$1,inst._zod.bag=inst._zod.bag||{},inst._zod.version=version;let checks$1=[...inst._zod.def.checks??[]];inst._zod.traits.has(`$ZodCheck`)&&checks$1.unshift(inst);for(let ch of checks$1)for(let fn$5 of ch._zod.onattach)fn$5(inst);if(checks$1.length===0)(_a$2=inst._zod).deferred??(_a$2.deferred=[]),inst._zod.deferred?.push(()=>{inst._zod.run=inst._zod.parse});else{let runChecks=(payload,checks$2,ctx)=>{let isAborted=aborted(payload),asyncResult;for(let ch of checks$2){if(ch._zod.def.when){let shouldRun=ch._zod.def.when(payload);if(!shouldRun)continue}else if(isAborted)continue;let currLen=payload.issues.length,_$1=ch._zod.check(payload);if(_$1 instanceof Promise&&ctx?.async===!1)throw new $ZodAsyncError;if(asyncResult||_$1 instanceof Promise)asyncResult=(asyncResult??Promise.resolve()).then(async()=>{await _$1;let nextLen=payload.issues.length;nextLen!==currLen&&(isAborted||=aborted(payload,currLen))});else{let nextLen=payload.issues.length;if(nextLen===currLen)continue;isAborted||=aborted(payload,currLen)}}return asyncResult?asyncResult.then(()=>payload):payload};inst._zod.run=(payload,ctx)=>{let result=inst._zod.parse(payload,ctx);if(result instanceof Promise){if(ctx.async===!1)throw new $ZodAsyncError;return result.then(result$1=>runChecks(result$1,checks$1,ctx))}return runChecks(result,checks$1,ctx)}}inst[`~standard`]={validate:value$1=>{try{let r$1=safeParse$1(inst,value$1);return r$1.success?{value:r$1.data}:{issues:r$1.error?.issues}}catch{return safeParseAsync$1(inst,value$1).then(r$1=>r$1.success?{value:r$1.data}:{issues:r$1.error?.issues})}},vendor:`zod`,version:1}}),$ZodString=$constructor(`$ZodString`,(inst,def$1)=>{$ZodType.init(inst,def$1),inst._zod.pattern=[...inst?._zod.bag?.patterns??[]].pop()??string$1(inst._zod.bag),inst._zod.parse=(payload,_$1)=>{if(def$1.coerce)try{payload.value=String(payload.value)}catch{}return typeof payload.value==`string`||payload.issues.push({expected:`string`,code:`invalid_type`,input:payload.value,inst}),payload}}),$ZodStringFormat=$constructor(`$ZodStringFormat`,(inst,def$1)=>{$ZodCheckStringFormat.init(inst,def$1),$ZodString.init(inst,def$1)}),$ZodGUID=$constructor(`$ZodGUID`,(inst,def$1)=>{def$1.pattern??=guid,$ZodStringFormat.init(inst,def$1)}),$ZodUUID=$constructor(`$ZodUUID`,(inst,def$1)=>{if(def$1.version){let versionMap={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8},v=versionMap[def$1.version];if(v===void 0)throw Error(`Invalid UUID version: "${def$1.version}"`);def$1.pattern??=uuid(v)}else def$1.pattern??=uuid();$ZodStringFormat.init(inst,def$1)}),$ZodEmail=$constructor(`$ZodEmail`,(inst,def$1)=>{def$1.pattern??=email,$ZodStringFormat.init(inst,def$1)}),$ZodURL=$constructor(`$ZodURL`,(inst,def$1)=>{$ZodStringFormat.init(inst,def$1),inst._zod.check=payload=>{try{let trimmed=payload.value.trim(),url=new URL(trimmed);def$1.hostname&&(def$1.hostname.lastIndex=0,def$1.hostname.test(url.hostname)||payload.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:hostname.source,input:payload.value,inst,continue:!def$1.abort})),def$1.protocol&&(def$1.protocol.lastIndex=0,def$1.protocol.test(url.protocol.endsWith(`:`)?url.protocol.slice(0,-1):url.protocol)||payload.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:def$1.protocol.source,input:payload.value,inst,continue:!def$1.abort})),def$1.normalize?payload.value=url.href:payload.value=trimmed;return}catch{payload.issues.push({code:`invalid_format`,format:`url`,input:payload.value,inst,continue:!def$1.abort})}}}),$ZodEmoji=$constructor(`$ZodEmoji`,(inst,def$1)=>{def$1.pattern??=emoji(),$ZodStringFormat.init(inst,def$1)}),$ZodNanoID=$constructor(`$ZodNanoID`,(inst,def$1)=>{def$1.pattern??=nanoid,$ZodStringFormat.init(inst,def$1)}),$ZodCUID=$constructor(`$ZodCUID`,(inst,def$1)=>{def$1.pattern??=cuid,$ZodStringFormat.init(inst,def$1)}),$ZodCUID2=$constructor(`$ZodCUID2`,(inst,def$1)=>{def$1.pattern??=cuid2,$ZodStringFormat.init(inst,def$1)}),$ZodULID=$constructor(`$ZodULID`,(inst,def$1)=>{def$1.pattern??=ulid,$ZodStringFormat.init(inst,def$1)}),$ZodXID=$constructor(`$ZodXID`,(inst,def$1)=>{def$1.pattern??=xid,$ZodStringFormat.init(inst,def$1)}),$ZodKSUID=$constructor(`$ZodKSUID`,(inst,def$1)=>{def$1.pattern??=ksuid,$ZodStringFormat.init(inst,def$1)}),$ZodISODateTime=$constructor(`$ZodISODateTime`,(inst,def$1)=>{def$1.pattern??=datetime$2(def$1),$ZodStringFormat.init(inst,def$1)}),$ZodISODate=$constructor(`$ZodISODate`,(inst,def$1)=>{def$1.pattern??=date$1,$ZodStringFormat.init(inst,def$1)}),$ZodISOTime=$constructor(`$ZodISOTime`,(inst,def$1)=>{def$1.pattern??=time$1(def$1),$ZodStringFormat.init(inst,def$1)}),$ZodISODuration=$constructor(`$ZodISODuration`,(inst,def$1)=>{def$1.pattern??=duration$1,$ZodStringFormat.init(inst,def$1)}),$ZodIPv4=$constructor(`$ZodIPv4`,(inst,def$1)=>{def$1.pattern??=ipv4,$ZodStringFormat.init(inst,def$1),inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.format=`ipv4`})}),$ZodIPv6=$constructor(`$ZodIPv6`,(inst,def$1)=>{def$1.pattern??=ipv6,$ZodStringFormat.init(inst,def$1),inst._zod.onattach.push(inst$1=>{let bag=inst$1._zod.bag;bag.format=`ipv6`}),inst._zod.check=payload=>{try{new URL(`http://[${payload.value}]`)}catch{payload.issues.push({code:`invalid_format`,format:`ipv6`,input:payload.value,inst,continue:!def$1.abort})}}}),$ZodCIDRv4=$constructor(`$ZodCIDRv4`,(inst,def$1)=>{def$1.pattern??=cidrv4,$ZodStringFormat.init(inst,def$1)}),$ZodCIDRv6=$constructor(`$ZodCIDRv6`,(inst,def$1)=>{def$1.pattern??=cidrv6,$ZodStringFormat.init(inst,def$1),inst._zod.check=payload=>{let[address,prefix]=payload.value.split(`/`);try{if(!prefix)throw Error();let prefixNum=Number(prefix);if(`${prefixNum}`!==prefix||prefixNum<0||prefixNum>128)throw Error();new URL(`http://[${address}]`)}catch{payload.issues.push({code:`invalid_format`,format:`cidrv6`,input:payload.value,inst,continue:!def$1.abort})}}});function isValidBase64(data$12){if(data$12===``)return!0;if(data$12.length%4!=0)return!1;try{return atob(data$12),!0}catch{return!1}}const $ZodBase64=$constructor(`$ZodBase64`,(inst,def$1)=>{def$1.pattern??=base64,$ZodStringFormat.init(inst,def$1),inst._zod.onattach.push(inst$1=>{inst$1._zod.bag.contentEncoding=`base64`}),inst._zod.check=payload=>{isValidBase64(payload.value)||payload.issues.push({code:`invalid_format`,format:`base64`,input:payload.value,inst,continue:!def$1.abort})}});function isValidBase64URL(data$12){if(!base64url.test(data$12))return!1;let base64$1=data$12.replace(/[-_]/g,c$3=>c$3===`-`?`+`:`/`),padded=base64$1.padEnd(Math.ceil(base64$1.length/4)*4,`=`);return isValidBase64(padded)}const $ZodBase64URL=$constructor(`$ZodBase64URL`,(inst,def$1)=>{def$1.pattern??=base64url,$ZodStringFormat.init(inst,def$1),inst._zod.onattach.push(inst$1=>{inst$1._zod.bag.contentEncoding=`base64url`}),inst._zod.check=payload=>{isValidBase64URL(payload.value)||payload.issues.push({code:`invalid_format`,format:`base64url`,input:payload.value,inst,continue:!def$1.abort})}}),$ZodE164=$constructor(`$ZodE164`,(inst,def$1)=>{def$1.pattern??=e164,$ZodStringFormat.init(inst,def$1)});function isValidJWT(token,algorithm=null){try{let tokensParts=token.split(`.`);if(tokensParts.length!==3)return!1;let[header]=tokensParts;if(!header)return!1;let parsedHeader=JSON.parse(atob(header));return!(`typ`in parsedHeader&&parsedHeader?.typ!==`JWT`||!parsedHeader.alg||algorithm&&(!(`alg`in parsedHeader)||parsedHeader.alg!==algorithm))}catch{return!1}}const $ZodJWT=$constructor(`$ZodJWT`,(inst,def$1)=>{$ZodStringFormat.init(inst,def$1),inst._zod.check=payload=>{isValidJWT(payload.value,def$1.alg)||payload.issues.push({code:`invalid_format`,format:`jwt`,input:payload.value,inst,continue:!def$1.abort})}}),$ZodNumber=$constructor(`$ZodNumber`,(inst,def$1)=>{$ZodType.init(inst,def$1),inst._zod.pattern=inst._zod.bag.pattern??number$2,inst._zod.parse=(payload,_ctx)=>{if(def$1.coerce)try{payload.value=Number(payload.value)}catch{}let input=payload.value;if(typeof input==`number`&&!Number.isNaN(input)&&Number.isFinite(input))return payload;let received=typeof input==`number`?Number.isNaN(input)?`NaN`:Number.isFinite(input)?void 0:`Infinity`:void 0;return payload.issues.push({expected:`number`,code:`invalid_type`,input,inst,...received?{received}:{}}),payload}}),$ZodNumberFormat=$constructor(`$ZodNumber`,(inst,def$1)=>{$ZodCheckNumberFormat.init(inst,def$1),$ZodNumber.init(inst,def$1)}),$ZodBoolean=$constructor(`$ZodBoolean`,(inst,def$1)=>{$ZodType.init(inst,def$1),inst._zod.pattern=boolean$1,inst._zod.parse=(payload,_ctx)=>{if(def$1.coerce)try{payload.value=!!payload.value}catch{}let input=payload.value;return typeof input==`boolean`||payload.issues.push({expected:`boolean`,code:`invalid_type`,input,inst}),payload}}),$ZodUnknown=$constructor(`$ZodUnknown`,(inst,def$1)=>{$ZodType.init(inst,def$1),inst._zod.parse=payload=>payload}),$ZodNever=$constructor(`$ZodNever`,(inst,def$1)=>{$ZodType.init(inst,def$1),inst._zod.parse=(payload,_ctx)=>(payload.issues.push({expected:`never`,code:`invalid_type`,input:payload.value,inst}),payload)});function handleArrayResult(result,final,index$1){result.issues.length&&final.issues.push(...prefixIssues(index$1,result.issues)),final.value[index$1]=result.value}const $ZodArray=$constructor(`$ZodArray`,(inst,def$1)=>{$ZodType.init(inst,def$1),inst._zod.parse=(payload,ctx)=>{let input=payload.value;if(!Array.isArray(input))return payload.issues.push({expected:`array`,code:`invalid_type`,input,inst}),payload;payload.value=Array(input.length);let proms=[];for(let i=0;ihandleArrayResult(result$1,payload,i))):handleArrayResult(result,payload,i)}return proms.length?Promise.all(proms).then(()=>payload):payload}});function handlePropertyResult(result,final,key$2,input){result.issues.length&&final.issues.push(...prefixIssues(key$2,result.issues)),result.value===void 0?key$2 in input&&(final.value[key$2]=void 0):final.value[key$2]=result.value}const $ZodObject=$constructor(`$ZodObject`,(inst,def$1)=>{$ZodType.init(inst,def$1);let _normalized=cached(()=>{let keys$3=Object.keys(def$1.shape);for(let k$3 of keys$3)if(!(def$1.shape[k$3]instanceof $ZodType))throw Error(`Invalid element at key "${k$3}": expected a Zod schema`);let okeys=optionalKeys(def$1.shape);return{shape:def$1.shape,keys:keys$3,keySet:new Set(keys$3),numKeys:keys$3.length,optionalKeys:new Set(okeys)}});defineLazy(inst._zod,`propValues`,()=>{let shape=def$1.shape,propValues={};for(let key$2 in shape){let field=shape[key$2]._zod;if(field.values){propValues[key$2]??(propValues[key$2]=new Set);for(let v of field.values)propValues[key$2].add(v)}}return propValues});let generateFastpass=shape=>{let doc$2=new Doc([`shape`,`payload`,`ctx`]),normalized=_normalized.value,parseStr=key$2=>{let k$3=esc(key$2);return`shape[${k$3}]._zod.run({ value: input[${k$3}], issues: [] }, ctx)`};doc$2.write(`const input = payload.value;`);let ids=Object.create(null),counter=0;for(let key$2 of normalized.keys)ids[key$2]=`key_${counter++}`;doc$2.write(`const newResult = {}`);for(let key$2 of normalized.keys){let id=ids[key$2],k$3=esc(key$2);doc$2.write(`const ${id} = ${parseStr(key$2)};`),doc$2.write(` if (${id}.issues.length) { diff --git a/assets/memory-Bo9CmtPV.js b/assets/memory-ChG-vOFt.js similarity index 95% rename from assets/memory-Bo9CmtPV.js rename to assets/memory-ChG-vOFt.js index 87d8081981764d628bca42d7ac67c12122d2de16..0b84b5160bad494a1b14e5119f87ab75d2812f54 100644 --- a/assets/memory-Bo9CmtPV.js +++ b/assets/memory-ChG-vOFt.js @@ -1 +1 @@ -import{cr as e,dQ as t,dT as n,dW as r,dX as i,dY as a,dZ as o,e5 as s,e9 as c,ed as l,ee as u,ek as d}from"./index-BqrqTEsQ.js";import{b as f}from"./route-block-gWR0cCIm.js";const p={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 m=o({__name:`index`,setup(o){return(o,f)=>{let m=c(`motion`);return s(),r(t,null,[n(`div`,null,[a(d(e),{label:`In development, needs your help!`,theme:`orange`},{default:l(()=>f[0]||=[n(`div`,null,[i(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),n(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),i(`. The source code of this page is located at `),n(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/memory/index.vue`},`here`),i(`. `)],-1)]),_:1,__:[0]})]),u((s(),r(`div`,p,f[1]||=[n(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)])),[[m]])],64)}}});typeof f==`function`&&f(m);var h=m;export{h as default}; \ No newline at end of file +import{cr as e,dQ as t,dT as n,dW as r,dX as i,dY as a,dZ as o,e5 as s,e9 as c,ed as l,ee as u,ek as d}from"./index-D1IGsMK6.js";import{b as f}from"./route-block-gWR0cCIm.js";const p={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 m=o({__name:`index`,setup(o){return(o,f)=>{let m=c(`motion`);return s(),r(t,null,[n(`div`,null,[a(d(e),{label:`In development, needs your help!`,theme:`orange`},{default:l(()=>f[0]||=[n(`div`,null,[i(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),n(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),i(`. The source code of this page is located at `),n(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/memory/index.vue`},`here`),i(`. `)],-1)]),_:1,__:[0]})]),u((s(),r(`div`,p,f[1]||=[n(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)])),[[m]])],64)}}});typeof f==`function`&&f(m);var h=m;export{h as default}; \ No newline at end of file diff --git a/assets/memory-long-term-BXPjIM3D.js b/assets/memory-long-term-Cd4DfbOC.js similarity index 72% rename from assets/memory-long-term-BXPjIM3D.js rename to assets/memory-long-term-Cd4DfbOC.js index 89827f54c01b6e5f182200385f72f38ba8bb29ee..a9835adaed1ebc726e84530d53ff546df7347b77 100644 --- a/assets/memory-long-term-BXPjIM3D.js +++ b/assets/memory-long-term-Cd4DfbOC.js @@ -1 +1 @@ -import{dW as e,dZ as t,e5 as n}from"./index-BqrqTEsQ.js";import{b as r}from"./route-block-gWR0cCIm.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{dW as e,dZ as t,e5 as n}from"./index-D1IGsMK6.js";import{b as r}from"./route-block-gWR0cCIm.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-D8vgusDg.js b/assets/memory-short-term-By6tGgIb.js similarity index 72% rename from assets/memory-short-term-D8vgusDg.js rename to assets/memory-short-term-By6tGgIb.js index c30157e35ebe2a03575a497184dc8d340cfeca1e..05137f08942b302462fc4a3898d295e241917d40 100644 --- a/assets/memory-short-term-D8vgusDg.js +++ b/assets/memory-short-term-By6tGgIb.js @@ -1 +1 @@ -import{dW as e,dZ as t,e5 as n}from"./index-BqrqTEsQ.js";import{b as r}from"./route-block-gWR0cCIm.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{dW as e,dZ as t,e5 as n}from"./index-D1IGsMK6.js";import{b as r}from"./route-block-gWR0cCIm.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-CgceS_ap.js b/assets/messages-D_H5Gb5B.js similarity index 83% rename from assets/messages-CgceS_ap.js rename to assets/messages-D_H5Gb5B.js index 33d06960d2375601ae81742b9ae1dd3706adc244..67f5503161a663337873daf028ff4c50b306e943 100644 --- a/assets/messages-CgceS_ap.js +++ b/assets/messages-D_H5Gb5B.js @@ -1 +1 @@ -import"./Basic-6NscZoIc.js";import{b as e}from"./Textarea-CQXjp80_.js";import{c3 as t,c4 as n,ct as r,dQ as i,dT as a,dW as o,dY as s,dZ as c,e5 as l,e6 as u,eg as d,ek as f,eo as p}from"./index-BqrqTEsQ.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=c({__name:`messages`,setup(c){let y=d(``),b=d([]),x=d(!1),S=n({handlers:[async e=>{b.value.push(e.data)}]}),C=t(S);async function w(){x.value=!0,C.add(y.value),C.add(r),y.value=``,x.value=!1}return(t,n)=>(l(),o(`div`,m,[a(`div`,h,[s(f(e),{modelValue:y.value,"onUpdate:modelValue":n[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`]),a(`button`,g,p(x.value?`Processing...`:`Send`),1)]),a(`div`,_,[a(`div`,v,[n[1]||=a(`h3`,{"font-normal":``},` TTS Message `,-1),(l(!0),o(i,null,u(b.value,e=>(l(),o(`div`,{key:e},[a(`div`,null,p(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file +import"./Basic-JYGX2D37.js";import{b as e}from"./Textarea-D9rLaih7.js";import{c3 as t,c4 as n,ct as r,dQ as i,dT as a,dW as o,dY as s,dZ as c,e5 as l,e6 as u,eg as d,ek as f,eo as p}from"./index-D1IGsMK6.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=c({__name:`messages`,setup(c){let y=d(``),b=d([]),x=d(!1),S=n({handlers:[async e=>{b.value.push(e.data)}]}),C=t(S);async function w(){x.value=!0,C.add(y.value),C.add(r),y.value=``,x.value=!1}return(t,n)=>(l(),o(`div`,m,[a(`div`,h,[s(f(e),{modelValue:y.value,"onUpdate:modelValue":n[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`]),a(`button`,g,p(x.value?`Processing...`:`Send`),1)]),a(`div`,_,[a(`div`,v,[n[1]||=a(`h3`,{"font-normal":``},` TTS Message `,-1),(l(!0),o(i,null,u(b.value,e=>(l(),o(`div`,{key:e},[a(`div`,null,p(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/microsoft-speech-Di7D-Awi.js b/assets/microsoft-speech-CGGcxjek.js similarity index 97% rename from assets/microsoft-speech-Di7D-Awi.js rename to assets/microsoft-speech-CGGcxjek.js index 9d603e5e3401f0baaa677a8d2e8d4d0ba262e234..2a3a781dcb99c6699bbba19fc4b26d27813bec5b 100644 --- a/assets/microsoft-speech-Di7D-Awi.js +++ b/assets/microsoft-speech-CGGcxjek.js @@ -1 +1 @@ -import{cM as e,cP as t,d7 as n,dS as r,dT as i,dU as a,dY as o,dZ as s,e as c,e3 as l,e5 as u,ec as d,ed as f,eg as p,ek as m,f as h,u as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=s({__name:`microsoft-speech`,setup(s){let{t:y}=v(),C={pitch:0,speed:1,volume:0},w=g(),T=_(),{providers:E}=n(T),D=p(0),O=p(1),k=p(0),A=r({get:()=>E.value[x]?.region,set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=r(()=>!!E.value[x]?.apiKey),M=r(()=>w.availableVoices[x]||[]);l(async()=>{A.value||=`eastasia`,E.value[x]?.region||(E.value[x]?E.value[x].region=A.value:E.value[x]={region:A.value}),await w.loadVoicesForProvider(x)}),d([j,A],async()=>{await w.loadVoicesForProvider(x)});async function N(e,t,n){let r=await 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(n,r)=>(u(),a(m(c),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":f(()=>[o(m(t),{modelValue:A.value,"onUpdate:modelValue":r[0]||=e=>A.value=e,label:m(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:m(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":f(()=>[i(`div`,b,[o(m(e),{modelValue:D.value,"onUpdate:modelValue":r[1]||=e=>D.value=e,label:m(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:m(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`]),o(m(e),{modelValue:O.value,"onUpdate:modelValue":r[2]||=e=>O.value=e,label:m(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(e),{modelValue:k.value,"onUpdate:modelValue":r[3]||=e=>k.value=e,label:m(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:m(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(()=>[o(m(h),{"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{cM as e,cP as t,d7 as n,dS as r,dT as i,dU as a,dY as o,dZ as s,e as c,e3 as l,e5 as u,ec as d,ed as f,eg as p,ek as m,f as h,u as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=s({__name:`microsoft-speech`,setup(s){let{t:y}=v(),C={pitch:0,speed:1,volume:0},w=g(),T=_(),{providers:E}=n(T),D=p(0),O=p(1),k=p(0),A=r({get:()=>E.value[x]?.region,set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=r(()=>!!E.value[x]?.apiKey),M=r(()=>w.availableVoices[x]||[]);l(async()=>{A.value||=`eastasia`,E.value[x]?.region||(E.value[x]?E.value[x].region=A.value:E.value[x]={region:A.value}),await w.loadVoicesForProvider(x)}),d([j,A],async()=>{await w.loadVoicesForProvider(x)});async function N(e,t,n){let r=await 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(n,r)=>(u(),a(m(c),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":f(()=>[o(m(t),{modelValue:A.value,"onUpdate:modelValue":r[0]||=e=>A.value=e,label:m(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:m(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":f(()=>[i(`div`,b,[o(m(e),{modelValue:D.value,"onUpdate:modelValue":r[1]||=e=>D.value=e,label:m(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:m(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`]),o(m(e),{modelValue:O.value,"onUpdate:modelValue":r[2]||=e=>O.value=e,label:m(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),o(m(e),{modelValue:k.value,"onUpdate:modelValue":r[3]||=e=>k.value=e,label:m(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:m(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(()=>[o(m(h),{"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-DaM_lNzJ.js b/assets/mistral-ai-DvCen1CG.js similarity index 96% rename from assets/mistral-ai-DaM_lNzJ.js rename to assets/mistral-ai-DvCen1CG.js index 043adfd332bd5441ff1956fdcd2b363743ffb38e..153a52e92173b05947d77890c873b99f31fd58ef 100644 --- a/assets/mistral-ai-DaM_lNzJ.js +++ b/assets/mistral-ai-DvCen1CG.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`mistral-ai`;var x=a({__name:`mistral-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`mis-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`mistral-ai`;var x=a({__name:`mistral-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`mis-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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-BlSfecLY.js b/assets/models-Cr3L9UFF.js similarity index 98% rename from assets/models-BlSfecLY.js rename to assets/models-Cr3L9UFF.js index c6707912d05dbc2ca568fa0793275e170a6e7e84..6c6601978a2b9f869a6ccc88c63b68f0cd8e2be0 100644 --- a/assets/models-BlSfecLY.js +++ b/assets/models-Cr3L9UFF.js @@ -1 +1 @@ -import{b as e,cE as t,cF as n,cG as r,cM as i,cQ as a,cS as o,ci as s,cp as c,cr as l,cw as u,cx as d,d7 as f,dM as p,dQ as m,dS as h,dT as g,dU as _,dV as v,dW as y,dX as b,dY as x,dZ as S,de as C,dh as w,e5 as T,e6 as E,e9 as D,ec as O,ed as k,ee as A,ef as j,eg as M,ek as N,el as P,eo as F,et as I,n as L,o as R,q as z,z as B}from"./index-BqrqTEsQ.js";import{b as V}from"./browser-bFm1l1qg.js";import{b as H}from"./route-block-gWR0cCIm.js";import{c as U,g as W,h as G,j as K}from"./Scenes-2Kp3NQ_V.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";import{b as q}from"./IconAnimation-eACnDPFz.js";import{b as J}from"./icon-animation-PuVIGmi0.js";var ee=I(G()),te=I(K());const ne={flex:``,"items-center":``,"gap-2":``},re={"font-medium":``,"font-mono":``},Y={flex:``,"gap-2":``},ie=[`onUpdate:modelValue`],ae=[`href`,`download`],oe={flex:``,"items-center":``},se={flex:``,"items-center":``},ce={flex:``,"items-center":``};var X=S({__name:`Live2D`,props:{palette:{}},emits:[`extractColorsFromModel`,`switchToVRM`],setup(t){let{t:n}=B(),r=C({accept:`application/zip`}),l=R(),{live2dDisableFocus:h}=f(l),S=z(),{modelFile:D,motionMap:I,loadSource:L,loadingModel:V,availableMotions:H,modelUrl:U,currentMotion:W,scale:G,position:K}=f(S),q=M(U.value);r.onChange(e=>{e&&e.length>0&&(I.value={},D.value=e[0],L.value=`file`,V.value=!0)}),O(V,e=>{e||L.value===`file`&&H.value.forEach(e=>{e.motionName in u?I.value[e.fileName]=e.motionName:I.value[e.fileName]=d})});async function J(e,t){if(!Object.keys(t).length)return e;let n=new ee.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 X(){let e=await te.default.getItem(`live2dModel`);if(!e)return;let t=await J(e,I.value);D.value=t,L.value=`file`,V.value=!0}let Z=w(D);return(t,l)=>(T(),y(m,null,[x(N(c),{title:N(n)(`settings.live2d.switch-to-vrm.title`),icon:`i-solar:magic-stick-3-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(s),{variant:`secondary`,onClick:l[0]||=e=>t.$emit(`switchToVRM`)},{default:k(()=>[b(F(N(n)(`settings.live2d.switch-to-vrm.change-to-vrm`)),1)]),_:1})]),_:1},8,[`title`]),x(N(c),{title:N(n)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(s),{variant:`secondary`,onClick:l[1]||=e=>N(r).open()},{default:k(()=>[b(F(N(n)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),g(`div`,ne,[x(N(a),{modelValue:q.value,"onUpdate:modelValue":l[2]||=e=>q.value=e,disabled:N(V),class:`flex-1`,placeholder:N(n)(`settings.live2d.change-model.from-url-placeholder`)},null,8,[`modelValue`,`disabled`,`placeholder`]),x(N(s),{size:`sm`,variant:`secondary`,onClick:l[3]||=e=>U.value=q.value},{default:k(()=>[b(F(N(n)(`settings.live2d.change-model.from-url`)),1)]),_:1})])]),_:1},8,[`title`]),x(N(c),{title:N(n)(`settings.live2d.theme-color-from-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(e),{class:`mb-4 mt-2`,colors:t.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),x(N(s),{variant:`secondary`,onClick:l[4]||=e=>t.$emit(`extractColorsFromModel`)},{default:k(()=>[b(F(N(n)(`settings.live2d.theme-color-from-model.button-extract.title`)),1)]),_:1})]),_:1},8,[`title`]),N(L)===`file`?(T(),_(N(c),{key:0,title:N(n)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[(T(!0),y(m,null,E(N(H),e=>(T(),y(`div`,{key:e.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[g(`span`,re,F(e.fileName),1),g(`div`,Y,[A(g(`select`,{"onUpdate:modelValue":t=>N(I)[e.fileName]=t},[(T(!0),y(m,null,E(Object.keys(N(u)),e=>(T(),y(`option`,{key:e},F(e),1))),128))],8,ie),[[p,N(I)[e.fileName]]]),x(N(s),{class:`form-control`,onClick:t=>W.value={group:e.motionName,index:e.motionIndex}},{default:k(()=>l[12]||=[b(` Play `,-1)]),_:2,__:[12]},1032,[`onClick`])])]))),128)),x(N(s),{onClick:X},{default:k(()=>l[13]||=[b(` Save and patch `,-1)]),_:1,__:[13]}),g(`a`,{"mt-2":``,block:``,href:N(Z),download:`${N(D)?.name||`live2d`}-motion-edited.zip`},[x(N(s),{"w-full":``},{default:k(()=>l[14]||=[b(`Export`,-1)]),_:1,__:[14]})],8,ae)]),_:1},8,[`title`])):v(``,!0),x(N(c),{title:N(n)(`settings.live2d.scale-and-position.title`),icon:`i-solar:scale-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(i),{modelValue:N(G),"onUpdate:modelValue":l[6]||=e=>j(G)?G.value=e:null,as:`div`,min:.5,max:2,step:.01,label:N(n)(`settings.live2d.scale-and-position.scale`)},{label:k(()=>[g(`div`,oe,[g(`div`,null,F(N(n)(`settings.live2d.scale-and-position.scale`)),1),g(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:l[5]||=()=>G.value=1},l[15]||=[g(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),x(N(i),{modelValue:N(K).x,"onUpdate:modelValue":l[8]||=e=>N(K).x=e,as:`div`,min:-100,max:100,step:1,label:N(n)(`settings.live2d.scale-and-position.x`)},{label:k(()=>[g(`div`,se,[g(`div`,null,F(N(n)(`settings.live2d.scale-and-position.x`)),1),g(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:l[7]||=()=>N(K).x=0},l[16]||=[g(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),x(N(i),{modelValue:N(K).y,"onUpdate:modelValue":l[10]||=e=>N(K).y=e,as:`div`,min:-100,max:100,step:1,label:N(n)(`settings.live2d.scale-and-position.y`)},{label:k(()=>[g(`div`,ce,[g(`div`,null,F(N(n)(`settings.live2d.scale-and-position.y`)),1),g(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:l[9]||=()=>N(K).y=0},l[17]||=[g(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`])]),_:1},8,[`title`]),x(N(c),{title:N(n)(`settings.live2d.focus.title`),icon:`i-solar:eye-scan-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(o),{modelValue:N(h),"onUpdate:modelValue":l[11]||=e=>j(h)?h.value=e:null,label:N(n)(`settings.live2d.focus.button-disable.title`)},null,8,[`modelValue`,`label`])]),_:1},8,[`title`])],64))}}),Z=X;const le={grid:`~ cols-5 gap-1`,"p-2":``},ue={class:`col-span-1 col-start-1 row-start-6 self-center text-xs leading-tight font-mono`},de={flex:``,"items-center":``,"gap-2":``},fe={class:`text-sm text-neutral-600 space-y-1`},pe={class:`flex justify-between`},me={class:`flex justify-between`},he={class:`flex justify-between`},ge={class:`text-sm text-neutral-600 space-y-1`};var Q=S({__name:`VRM`,props:{palette:{}},emits:[`extractColorsFromModel`,`switchToLive2D`],setup(i){let{t:o}=B(),c=C({accept:`.vrm`}),u=L(),{modelFile:d,loadSource:p,loadingModel:v,modelUrl:S,modelSize:w,modelOffset:D,cameraFOV:O,selectedModel:A,modelRotationY:I,cameraDistance:R,trackingMode:z}=f(u),V=M(S.value),H=h(()=>[{value:`camera`,label:o(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.camera`),class:`col-start-3`},{value:`mouse`,label:o(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.mouse`),class:`col-start-4`},{value:`none`,label:o(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.disabled`),class:`col-start-5`}]);c.onChange(e=>{e&&e.length>0&&(d.value=e[0],p.value=`file`,v.value=!0,V.value=``)});function U(){if(S.value=V.value,S.value===A.value){console.warn(`Model URL is the same as the selected model, no need to reload.`);return}if(!S.value&&A.value===u.defaultModelUrl){V.value=u.defaultModelUrl;return}p.value=`url`,v.value=!0,V.value=A.value}return(i,u)=>(T(),y(m,null,[x(N(r),{title:N(o)(`settings.pages.models.sections.section.scene`),icon:`i-solar:people-nearby-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(s),{variant:`secondary`,size:`sm`,onClick:u[0]||=e=>i.$emit(`switchToLive2D`)},{default:k(()=>[b(F(N(o)(`settings.vrm.switch-to-vrm.change-to-vrm`)),1)]),_:1}),x(N(e),{class:`mb-4 mt-2`,colors:i.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),x(N(s),{variant:`secondary`,onClick:u[1]||=e=>i.$emit(`extractColorsFromModel`)},{default:k(()=>[b(F(N(o)(`settings.vrm.theme-color-from-model.button-extract.title`)),1)]),_:1}),g(`div`,le,[x(N(t),{x:N(D).x,"onUpdate:x":u[2]||=e=>N(D).x=e,y:N(D).y,"onUpdate:y":u[3]||=e=>N(D).y=e,z:N(D).z,"onUpdate:z":u[4]||=e=>N(D).z=e,label:`Model Position`,"x-config":{min:-N(w).x*2,max:N(w).x*2,step:N(w).x/100,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{min:-N(w).y*2,max:N(w).y*2,step:N(w).y/100,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{min:-N(w).z*2,max:N(w).z*2,step:N(w).z/100,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),x(N(n),{modelValue:N(O),"onUpdate:modelValue":u[5]||=e=>j(O)?O.value=e:null,config:{min:1,max:180,step:1,label:N(o)(`settings.vrm.scale-and-position.fov`)},label:N(o)(`settings.vrm.scale-and-position.fov`)},null,8,[`modelValue`,`config`,`label`]),x(N(n),{modelValue:N(R),"onUpdate:modelValue":u[6]||=e=>j(R)?R.value=e:null,config:{min:N(w).z,max:N(w).z*20,step:N(w).z/100,label:N(o)(`settings.vrm.scale-and-position.camera-distance`),formatValue:e=>e?.toFixed(4)},label:N(o)(`settings.vrm.scale-and-position.camera-distance`)},null,8,[`modelValue`,`config`,`label`]),x(N(n),{modelValue:N(I),"onUpdate:modelValue":u[7]||=e=>j(I)?I.value=e:null,config:{min:-180,max:180,step:1,label:N(o)(`settings.vrm.scale-and-position.rotation-y`)},label:N(o)(`settings.vrm.scale-and-position.rotation-y`)},null,8,[`modelValue`,`config`,`label`]),g(`span`,ue,F(N(o)(`settings.vrm.scale-and-position.eye-tracking-mode.title`))+`: `,1),(T(!0),y(m,null,E(H.value,e=>(T(),_(N(s),{key:e.value,class:P([e.class,`row-start-6 w-auto`]),size:`sm`,variant:N(z)===e.value?`primary`:`secondary`,label:e.label,onClick:t=>z.value=e.value},null,8,[`class`,`variant`,`label`,`onClick`]))),128))])]),_:1},8,[`title`]),x(N(r),{title:N(o)(`settings.vrm.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(s),{variant:`secondary`,onClick:u[8]||=()=>{N(c).reset(),N(c).open()}},{default:k(()=>[b(F(N(o)(`settings.vrm.change-model.from-file`))+`... `,1)]),_:1}),g(`div`,de,[x(N(a),{modelValue:V.value,"onUpdate:modelValue":u[9]||=e=>V.value=e,disabled:N(v),class:`flex-1`,placeholder:N(o)(`settings.vrm.change-model.from-url-placeholder`)},null,8,[`modelValue`,`disabled`,`placeholder`]),x(N(s),{size:`sm`,variant:`secondary`,onClick:U},{default:k(()=>[b(F(N(o)(`settings.vrm.change-model.from-url`)),1)]),_:1})]),x(N(l),{label:N(o)(`settings.vrm.scale-and-position.model-info-title`)},{default:k(()=>[g(`div`,null,[g(`div`,fe,[g(`div`,pe,[g(`span`,null,F(N(o)(`settings.vrm.scale-and-position.model-info-x`)),1),g(`span`,null,F(N(w).x.toFixed(4)),1)]),g(`div`,me,[g(`span`,null,F(N(o)(`settings.vrm.scale-and-position.model-info-y`)),1),g(`span`,null,F(N(w).y.toFixed(4)),1)]),g(`div`,he,[g(`span`,null,F(N(o)(`settings.vrm.scale-and-position.model-info-z`)),1),g(`span`,null,F(N(w).z.toFixed(4)),1)])])])]),_:1},8,[`label`]),x(N(l),{theme:`lime`,label:`Tips!`},{default:k(()=>[g(`div`,ge,F(N(o)(`settings.vrm.scale-and-position.tips`)),1)]),_:1})]),_:1},8,[`title`])],64))}}),_e=Q;const ve={"h-full":``,"w-full":``,"p-2":``};var ye=S({__name:`index`,props:{palette:{},live2dSceneClass:{},live2dSettingsClass:{},vrmSceneClass:{},vrmSettingsClass:{}},emits:[`extractColorsFromModel`],setup(e){let t=e,{stageView:n}=f(R());return(e,r)=>(T(),y(m,null,[N(n)===`2d`?(T(),y(m,{key:0},[g(`div`,{class:P([...t.live2dSceneClass?typeof t.live2dSceneClass==`string`?[t.live2dSceneClass]:t.live2dSceneClass:[]])},[x(W)],2),g(`div`,{flex:`~ col gap-2`,class:P([...t.live2dSettingsClass?typeof t.live2dSettingsClass==`string`?[t.live2dSettingsClass]:t.live2dSettingsClass:[]])},[x(Z,{palette:e.palette,onExtractColorsFromModel:r[0]||=t=>e.$emit(`extractColorsFromModel`),onSwitchToVRM:r[1]||=e=>n.value=`3d`},null,8,[`palette`])],2)],64)):v(``,!0),N(n)===`3d`?(T(),y(m,{key:1},[g(`div`,{class:P([...t.vrmSceneClass?typeof t.vrmSceneClass==`string`?[t.vrmSceneClass]:t.vrmSceneClass:[]])},[x(U)],2),g(`div`,ve,[g(`div`,{flex:`~ col gap-2`,class:P([...t.vrmSettingsClass?typeof t.vrmSettingsClass==`string`?[t.vrmSettingsClass]:t.vrmSettingsClass:[]])},[x(_e,{palette:e.palette,onExtractColorsFromModel:r[2]||=t=>e.$emit(`extractColorsFromModel`),onSwitchToLive2D:r[3]||=e=>n.value=`2d`},null,8,[`palette`])],2)])],64)):v(``,!0)],64))}}),be=ye;const xe={flex:``,class:`relative h-full flex-col-reverse md:flex-row`},Se={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 $=S({__name:`index`,setup(e){let t=M(),n=M([]);async function r(){if(!t.value)return;let e=await t.value.captureFrame();if(!e){console.error(`No frame captured`);return}let r=URL.createObjectURL(e);try{let e=new V(r),t=await e.getPalette();n.value=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(r)}}let{iconAnimationStarted:i,showIconAnimation:a,animationIcon:o}=J(`i-solar:people-nearby-bold-duotone`);return(e,t)=>{let s=D(`motion`);return T(),y(m,null,[g(`div`,xe,[x(N(be),{"live-2d-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,"live-2d-settings-class":`w-100% md:w-35% lg:w-25% xl:w-25% 2xl:w-30% h-fit sm:max-h-80dvh overflow-y-scroll relative`,"vrm-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,"vrm-settings-class":`w-100% md:w-35% lg:w-25% xl:w-25% 2xl:w-30% h-fit sm:max-h-80dvh overflow-y-scroll relative`,palette:n.value,onExtractColorsFromModel:r},null,8,[`palette`])]),N(a)?(T(),_(q,{key:0,"z-index":-1,icon:N(o),"icon-size":12,duration:1e3,started:N(i),"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`])):A((T(),y(`div`,Se,t[0]||=[g(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[s]])],64)}}});typeof H==`function`&&H($);var Ce=$;export{Ce as default}; \ No newline at end of file +import{b as e,cE as t,cF as n,cG as r,cM as i,cQ as a,cS as o,ci as s,cp as c,cr as l,cw as u,cx as d,d7 as f,dM as p,dQ as m,dS as h,dT as g,dU as _,dV as v,dW as y,dX as b,dY as x,dZ as S,de as C,dh as w,e5 as T,e6 as E,e9 as D,ec as O,ed as k,ee as A,ef as j,eg as M,ek as N,el as P,eo as F,et as I,n as L,o as R,q as z,z as B}from"./index-D1IGsMK6.js";import{b as V}from"./browser-bFm1l1qg.js";import{b as H}from"./route-block-gWR0cCIm.js";import{c as U,g as W,h as G,j as K}from"./Scenes-ZY5GY3Yk.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";import{b as q}from"./IconAnimation-9_sNHXpR.js";import{b as J}from"./icon-animation-DPHfIEG5.js";var ee=I(G()),te=I(K());const ne={flex:``,"items-center":``,"gap-2":``},re={"font-medium":``,"font-mono":``},Y={flex:``,"gap-2":``},ie=[`onUpdate:modelValue`],ae=[`href`,`download`],oe={flex:``,"items-center":``},se={flex:``,"items-center":``},ce={flex:``,"items-center":``};var X=S({__name:`Live2D`,props:{palette:{}},emits:[`extractColorsFromModel`,`switchToVRM`],setup(t){let{t:n}=B(),r=C({accept:`application/zip`}),l=R(),{live2dDisableFocus:h}=f(l),S=z(),{modelFile:D,motionMap:I,loadSource:L,loadingModel:V,availableMotions:H,modelUrl:U,currentMotion:W,scale:G,position:K}=f(S),q=M(U.value);r.onChange(e=>{e&&e.length>0&&(I.value={},D.value=e[0],L.value=`file`,V.value=!0)}),O(V,e=>{e||L.value===`file`&&H.value.forEach(e=>{e.motionName in u?I.value[e.fileName]=e.motionName:I.value[e.fileName]=d})});async function J(e,t){if(!Object.keys(t).length)return e;let n=new ee.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 X(){let e=await te.default.getItem(`live2dModel`);if(!e)return;let t=await J(e,I.value);D.value=t,L.value=`file`,V.value=!0}let Z=w(D);return(t,l)=>(T(),y(m,null,[x(N(c),{title:N(n)(`settings.live2d.switch-to-vrm.title`),icon:`i-solar:magic-stick-3-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(s),{variant:`secondary`,onClick:l[0]||=e=>t.$emit(`switchToVRM`)},{default:k(()=>[b(F(N(n)(`settings.live2d.switch-to-vrm.change-to-vrm`)),1)]),_:1})]),_:1},8,[`title`]),x(N(c),{title:N(n)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(s),{variant:`secondary`,onClick:l[1]||=e=>N(r).open()},{default:k(()=>[b(F(N(n)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),g(`div`,ne,[x(N(a),{modelValue:q.value,"onUpdate:modelValue":l[2]||=e=>q.value=e,disabled:N(V),class:`flex-1`,placeholder:N(n)(`settings.live2d.change-model.from-url-placeholder`)},null,8,[`modelValue`,`disabled`,`placeholder`]),x(N(s),{size:`sm`,variant:`secondary`,onClick:l[3]||=e=>U.value=q.value},{default:k(()=>[b(F(N(n)(`settings.live2d.change-model.from-url`)),1)]),_:1})])]),_:1},8,[`title`]),x(N(c),{title:N(n)(`settings.live2d.theme-color-from-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(e),{class:`mb-4 mt-2`,colors:t.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),x(N(s),{variant:`secondary`,onClick:l[4]||=e=>t.$emit(`extractColorsFromModel`)},{default:k(()=>[b(F(N(n)(`settings.live2d.theme-color-from-model.button-extract.title`)),1)]),_:1})]),_:1},8,[`title`]),N(L)===`file`?(T(),_(N(c),{key:0,title:N(n)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[(T(!0),y(m,null,E(N(H),e=>(T(),y(`div`,{key:e.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[g(`span`,re,F(e.fileName),1),g(`div`,Y,[A(g(`select`,{"onUpdate:modelValue":t=>N(I)[e.fileName]=t},[(T(!0),y(m,null,E(Object.keys(N(u)),e=>(T(),y(`option`,{key:e},F(e),1))),128))],8,ie),[[p,N(I)[e.fileName]]]),x(N(s),{class:`form-control`,onClick:t=>W.value={group:e.motionName,index:e.motionIndex}},{default:k(()=>l[12]||=[b(` Play `,-1)]),_:2,__:[12]},1032,[`onClick`])])]))),128)),x(N(s),{onClick:X},{default:k(()=>l[13]||=[b(` Save and patch `,-1)]),_:1,__:[13]}),g(`a`,{"mt-2":``,block:``,href:N(Z),download:`${N(D)?.name||`live2d`}-motion-edited.zip`},[x(N(s),{"w-full":``},{default:k(()=>l[14]||=[b(`Export`,-1)]),_:1,__:[14]})],8,ae)]),_:1},8,[`title`])):v(``,!0),x(N(c),{title:N(n)(`settings.live2d.scale-and-position.title`),icon:`i-solar:scale-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(i),{modelValue:N(G),"onUpdate:modelValue":l[6]||=e=>j(G)?G.value=e:null,as:`div`,min:.5,max:2,step:.01,label:N(n)(`settings.live2d.scale-and-position.scale`)},{label:k(()=>[g(`div`,oe,[g(`div`,null,F(N(n)(`settings.live2d.scale-and-position.scale`)),1),g(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:l[5]||=()=>G.value=1},l[15]||=[g(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),x(N(i),{modelValue:N(K).x,"onUpdate:modelValue":l[8]||=e=>N(K).x=e,as:`div`,min:-100,max:100,step:1,label:N(n)(`settings.live2d.scale-and-position.x`)},{label:k(()=>[g(`div`,se,[g(`div`,null,F(N(n)(`settings.live2d.scale-and-position.x`)),1),g(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:l[7]||=()=>N(K).x=0},l[16]||=[g(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),x(N(i),{modelValue:N(K).y,"onUpdate:modelValue":l[10]||=e=>N(K).y=e,as:`div`,min:-100,max:100,step:1,label:N(n)(`settings.live2d.scale-and-position.y`)},{label:k(()=>[g(`div`,ce,[g(`div`,null,F(N(n)(`settings.live2d.scale-and-position.y`)),1),g(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:l[9]||=()=>N(K).y=0},l[17]||=[g(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`])]),_:1},8,[`title`]),x(N(c),{title:N(n)(`settings.live2d.focus.title`),icon:`i-solar:eye-scan-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(o),{modelValue:N(h),"onUpdate:modelValue":l[11]||=e=>j(h)?h.value=e:null,label:N(n)(`settings.live2d.focus.button-disable.title`)},null,8,[`modelValue`,`label`])]),_:1},8,[`title`])],64))}}),Z=X;const le={grid:`~ cols-5 gap-1`,"p-2":``},ue={class:`col-span-1 col-start-1 row-start-6 self-center text-xs leading-tight font-mono`},de={flex:``,"items-center":``,"gap-2":``},fe={class:`text-sm text-neutral-600 space-y-1`},pe={class:`flex justify-between`},me={class:`flex justify-between`},he={class:`flex justify-between`},ge={class:`text-sm text-neutral-600 space-y-1`};var Q=S({__name:`VRM`,props:{palette:{}},emits:[`extractColorsFromModel`,`switchToLive2D`],setup(i){let{t:o}=B(),c=C({accept:`.vrm`}),u=L(),{modelFile:d,loadSource:p,loadingModel:v,modelUrl:S,modelSize:w,modelOffset:D,cameraFOV:O,selectedModel:A,modelRotationY:I,cameraDistance:R,trackingMode:z}=f(u),V=M(S.value),H=h(()=>[{value:`camera`,label:o(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.camera`),class:`col-start-3`},{value:`mouse`,label:o(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.mouse`),class:`col-start-4`},{value:`none`,label:o(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.disabled`),class:`col-start-5`}]);c.onChange(e=>{e&&e.length>0&&(d.value=e[0],p.value=`file`,v.value=!0,V.value=``)});function U(){if(S.value=V.value,S.value===A.value){console.warn(`Model URL is the same as the selected model, no need to reload.`);return}if(!S.value&&A.value===u.defaultModelUrl){V.value=u.defaultModelUrl;return}p.value=`url`,v.value=!0,V.value=A.value}return(i,u)=>(T(),y(m,null,[x(N(r),{title:N(o)(`settings.pages.models.sections.section.scene`),icon:`i-solar:people-nearby-bold-duotone`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(s),{variant:`secondary`,size:`sm`,onClick:u[0]||=e=>i.$emit(`switchToLive2D`)},{default:k(()=>[b(F(N(o)(`settings.vrm.switch-to-vrm.change-to-vrm`)),1)]),_:1}),x(N(e),{class:`mb-4 mt-2`,colors:i.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),x(N(s),{variant:`secondary`,onClick:u[1]||=e=>i.$emit(`extractColorsFromModel`)},{default:k(()=>[b(F(N(o)(`settings.vrm.theme-color-from-model.button-extract.title`)),1)]),_:1}),g(`div`,le,[x(N(t),{x:N(D).x,"onUpdate:x":u[2]||=e=>N(D).x=e,y:N(D).y,"onUpdate:y":u[3]||=e=>N(D).y=e,z:N(D).z,"onUpdate:z":u[4]||=e=>N(D).z=e,label:`Model Position`,"x-config":{min:-N(w).x*2,max:N(w).x*2,step:N(w).x/100,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{min:-N(w).y*2,max:N(w).y*2,step:N(w).y/100,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{min:-N(w).z*2,max:N(w).z*2,step:N(w).z/100,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),x(N(n),{modelValue:N(O),"onUpdate:modelValue":u[5]||=e=>j(O)?O.value=e:null,config:{min:1,max:180,step:1,label:N(o)(`settings.vrm.scale-and-position.fov`)},label:N(o)(`settings.vrm.scale-and-position.fov`)},null,8,[`modelValue`,`config`,`label`]),x(N(n),{modelValue:N(R),"onUpdate:modelValue":u[6]||=e=>j(R)?R.value=e:null,config:{min:N(w).z,max:N(w).z*20,step:N(w).z/100,label:N(o)(`settings.vrm.scale-and-position.camera-distance`),formatValue:e=>e?.toFixed(4)},label:N(o)(`settings.vrm.scale-and-position.camera-distance`)},null,8,[`modelValue`,`config`,`label`]),x(N(n),{modelValue:N(I),"onUpdate:modelValue":u[7]||=e=>j(I)?I.value=e:null,config:{min:-180,max:180,step:1,label:N(o)(`settings.vrm.scale-and-position.rotation-y`)},label:N(o)(`settings.vrm.scale-and-position.rotation-y`)},null,8,[`modelValue`,`config`,`label`]),g(`span`,ue,F(N(o)(`settings.vrm.scale-and-position.eye-tracking-mode.title`))+`: `,1),(T(!0),y(m,null,E(H.value,e=>(T(),_(N(s),{key:e.value,class:P([e.class,`row-start-6 w-auto`]),size:`sm`,variant:N(z)===e.value?`primary`:`secondary`,label:e.label,onClick:t=>z.value=e.value},null,8,[`class`,`variant`,`label`,`onClick`]))),128))])]),_:1},8,[`title`]),x(N(r),{title:N(o)(`settings.vrm.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:P([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:k(()=>[x(N(s),{variant:`secondary`,onClick:u[8]||=()=>{N(c).reset(),N(c).open()}},{default:k(()=>[b(F(N(o)(`settings.vrm.change-model.from-file`))+`... `,1)]),_:1}),g(`div`,de,[x(N(a),{modelValue:V.value,"onUpdate:modelValue":u[9]||=e=>V.value=e,disabled:N(v),class:`flex-1`,placeholder:N(o)(`settings.vrm.change-model.from-url-placeholder`)},null,8,[`modelValue`,`disabled`,`placeholder`]),x(N(s),{size:`sm`,variant:`secondary`,onClick:U},{default:k(()=>[b(F(N(o)(`settings.vrm.change-model.from-url`)),1)]),_:1})]),x(N(l),{label:N(o)(`settings.vrm.scale-and-position.model-info-title`)},{default:k(()=>[g(`div`,null,[g(`div`,fe,[g(`div`,pe,[g(`span`,null,F(N(o)(`settings.vrm.scale-and-position.model-info-x`)),1),g(`span`,null,F(N(w).x.toFixed(4)),1)]),g(`div`,me,[g(`span`,null,F(N(o)(`settings.vrm.scale-and-position.model-info-y`)),1),g(`span`,null,F(N(w).y.toFixed(4)),1)]),g(`div`,he,[g(`span`,null,F(N(o)(`settings.vrm.scale-and-position.model-info-z`)),1),g(`span`,null,F(N(w).z.toFixed(4)),1)])])])]),_:1},8,[`label`]),x(N(l),{theme:`lime`,label:`Tips!`},{default:k(()=>[g(`div`,ge,F(N(o)(`settings.vrm.scale-and-position.tips`)),1)]),_:1})]),_:1},8,[`title`])],64))}}),_e=Q;const ve={"h-full":``,"w-full":``,"p-2":``};var ye=S({__name:`index`,props:{palette:{},live2dSceneClass:{},live2dSettingsClass:{},vrmSceneClass:{},vrmSettingsClass:{}},emits:[`extractColorsFromModel`],setup(e){let t=e,{stageView:n}=f(R());return(e,r)=>(T(),y(m,null,[N(n)===`2d`?(T(),y(m,{key:0},[g(`div`,{class:P([...t.live2dSceneClass?typeof t.live2dSceneClass==`string`?[t.live2dSceneClass]:t.live2dSceneClass:[]])},[x(W)],2),g(`div`,{flex:`~ col gap-2`,class:P([...t.live2dSettingsClass?typeof t.live2dSettingsClass==`string`?[t.live2dSettingsClass]:t.live2dSettingsClass:[]])},[x(Z,{palette:e.palette,onExtractColorsFromModel:r[0]||=t=>e.$emit(`extractColorsFromModel`),onSwitchToVRM:r[1]||=e=>n.value=`3d`},null,8,[`palette`])],2)],64)):v(``,!0),N(n)===`3d`?(T(),y(m,{key:1},[g(`div`,{class:P([...t.vrmSceneClass?typeof t.vrmSceneClass==`string`?[t.vrmSceneClass]:t.vrmSceneClass:[]])},[x(U)],2),g(`div`,ve,[g(`div`,{flex:`~ col gap-2`,class:P([...t.vrmSettingsClass?typeof t.vrmSettingsClass==`string`?[t.vrmSettingsClass]:t.vrmSettingsClass:[]])},[x(_e,{palette:e.palette,onExtractColorsFromModel:r[2]||=t=>e.$emit(`extractColorsFromModel`),onSwitchToLive2D:r[3]||=e=>n.value=`2d`},null,8,[`palette`])],2)])],64)):v(``,!0)],64))}}),be=ye;const xe={flex:``,class:`relative h-full flex-col-reverse md:flex-row`},Se={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 $=S({__name:`index`,setup(e){let t=M(),n=M([]);async function r(){if(!t.value)return;let e=await t.value.captureFrame();if(!e){console.error(`No frame captured`);return}let r=URL.createObjectURL(e);try{let e=new V(r),t=await e.getPalette();n.value=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(r)}}let{iconAnimationStarted:i,showIconAnimation:a,animationIcon:o}=J(`i-solar:people-nearby-bold-duotone`);return(e,t)=>{let s=D(`motion`);return T(),y(m,null,[g(`div`,xe,[x(N(be),{"live-2d-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,"live-2d-settings-class":`w-100% md:w-35% lg:w-25% xl:w-25% 2xl:w-30% h-fit sm:max-h-80dvh overflow-y-scroll relative`,"vrm-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,"vrm-settings-class":`w-100% md:w-35% lg:w-25% xl:w-25% 2xl:w-30% h-fit sm:max-h-80dvh overflow-y-scroll relative`,palette:n.value,onExtractColorsFromModel:r},null,8,[`palette`])]),N(a)?(T(),_(q,{key:0,"z-index":-1,icon:N(o),"icon-size":12,duration:1e3,started:N(i),"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`])):A((T(),y(`div`,Se,t[0]||=[g(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[s]])],64)}}});typeof H==`function`&&H($);var Ce=$;export{Ce as default}; \ No newline at end of file diff --git a/assets/modules-DvaXnAgf.js b/assets/modules-BEoGi95f.js similarity index 94% rename from assets/modules-DvaXnAgf.js rename to assets/modules-BEoGi95f.js index db2b17372f77251c5d1bd2bffeafea9f0d44f877..0591ad3937d4f22446b11459828603fff2b23df8 100644 --- a/assets/modules-DvaXnAgf.js +++ b/assets/modules-BEoGi95f.js @@ -1 +1 @@ -import{cn as e,dQ as t,dS as n,dT as r,dU as i,dW as a,dZ as o,e5 as s,e6 as c,e9 as l,ee as u,ek as d,u as f,w as p,z as m}from"./index-BqrqTEsQ.js";import{b as h}from"./route-block-gWR0cCIm.js";import{b as g}from"./IconAnimation-eACnDPFz.js";import{b as _}from"./icon-animation-PuVIGmi0.js";const v={grid:`~ cols-1 sm:cols-2 gap-4`},y={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 b=o({__name:`index`,setup(o){let{t:h}=m(),b=n(()=>[{id:`consciousness`,name:h(`settings.pages.modules.consciousness.title`),description:h(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:p().configured},{id:`speech`,name:h(`settings.pages.modules.speech.title`),description:h(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:f().configured},{id:`hearing`,name:h(`settings.pages.modules.hearing.title`),description:h(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:`/settings/modules/hearing`,configured:!1},{id:`vision`,name:h(`settings.pages.modules.vision.title`),description:h(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:``,configured:!1},{id:`memory-short-term`,name:h(`settings.pages.modules.memory-short-term.title`),description:h(`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:h(`settings.pages.modules.memory-long-term.title`),description:h(`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:h(`settings.pages.modules.messaging-discord.title`),description:h(`settings.pages.modules.messaging-discord.description`),icon:`i-simple-icons:discord`,to:``,configured:!1},{id:`x`,name:h(`settings.pages.modules.x.title`),description:h(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:``,configured:!1},{id:`game-minecraft`,name:h(`settings.pages.modules.gaming-minecraft.title`),description:h(`settings.pages.modules.gaming-minecraft.description`),iconColor:`i-vscode-icons:file-type-minecraft`,to:``,configured:!1},{id:`game-factorio`,name:h(`settings.pages.modules.gaming-factorio.title`),description:h(`settings.pages.modules.gaming-factorio.description`),iconImage:``,to:``,configured:!1}]),{iconAnimationStarted:x,showIconAnimation:S,animationIcon:C}=_(`i-solar:layers-bold-duotone`);return(n,o)=>{let f=l(`motion`);return s(),a(t,null,[r(`div`,v,[(s(!0),a(t,null,c(b.value,(t,n)=>u((s(),i(d(e),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:t.name,description:t.description,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:t.to,configured:t.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[f]])),128))]),d(S)?(s(),i(g,{key:0,icon:d(C),"icon-size":12,duration:1e3,started:d(x),"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`])):u((s(),a(`div`,y,o[0]||=[r(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof h==`function`&&h(b);var x=b;export{x as default}; \ No newline at end of file +import{cn as e,dQ as t,dS as n,dT as r,dU as i,dW as a,dZ as o,e5 as s,e6 as c,e9 as l,ee as u,ek as d,u as f,w as p,z as m}from"./index-D1IGsMK6.js";import{b as h}from"./route-block-gWR0cCIm.js";import{b as g}from"./IconAnimation-9_sNHXpR.js";import{b as _}from"./icon-animation-DPHfIEG5.js";const v={grid:`~ cols-1 sm:cols-2 gap-4`},y={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 b=o({__name:`index`,setup(o){let{t:h}=m(),b=n(()=>[{id:`consciousness`,name:h(`settings.pages.modules.consciousness.title`),description:h(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:p().configured},{id:`speech`,name:h(`settings.pages.modules.speech.title`),description:h(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:f().configured},{id:`hearing`,name:h(`settings.pages.modules.hearing.title`),description:h(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:`/settings/modules/hearing`,configured:!1},{id:`vision`,name:h(`settings.pages.modules.vision.title`),description:h(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:``,configured:!1},{id:`memory-short-term`,name:h(`settings.pages.modules.memory-short-term.title`),description:h(`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:h(`settings.pages.modules.memory-long-term.title`),description:h(`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:h(`settings.pages.modules.messaging-discord.title`),description:h(`settings.pages.modules.messaging-discord.description`),icon:`i-simple-icons:discord`,to:``,configured:!1},{id:`x`,name:h(`settings.pages.modules.x.title`),description:h(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:``,configured:!1},{id:`game-minecraft`,name:h(`settings.pages.modules.gaming-minecraft.title`),description:h(`settings.pages.modules.gaming-minecraft.description`),iconColor:`i-vscode-icons:file-type-minecraft`,to:``,configured:!1},{id:`game-factorio`,name:h(`settings.pages.modules.gaming-factorio.title`),description:h(`settings.pages.modules.gaming-factorio.description`),iconImage:``,to:``,configured:!1}]),{iconAnimationStarted:x,showIconAnimation:S,animationIcon:C}=_(`i-solar:layers-bold-duotone`);return(n,o)=>{let f=l(`motion`);return s(),a(t,null,[r(`div`,v,[(s(!0),a(t,null,c(b.value,(t,n)=>u((s(),i(d(e),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:t.name,description:t.description,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:t.to,configured:t.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[f]])),128))]),d(S)?(s(),i(g,{key:0,icon:d(C),"icon-size":12,duration:1e3,started:d(x),"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`])):u((s(),a(`div`,y,o[0]||=[r(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof h==`function`&&h(b);var x=b;export{x as default}; \ No newline at end of file diff --git a/assets/moonshot-ai-CzeRIZgw.js b/assets/moonshot-ai-CHsJXWmE.js similarity index 96% rename from assets/moonshot-ai-CzeRIZgw.js rename to assets/moonshot-ai-CHsJXWmE.js index 451a67f4fb6ef39dcb017d943900ea88078f3e68..de7840ddceecd5f660250d6ec1e9965212af489c 100644 --- a/assets/moonshot-ai-CzeRIZgw.js +++ b/assets/moonshot-ai-CHsJXWmE.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`moonshot-ai`;var x=a({__name:`moonshot-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`ms-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`moonshot-ai`;var x=a({__name:`moonshot-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`ms-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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-B5_QZuND.js b/assets/novita-ai-DnXfEx2N.js similarity index 96% rename from assets/novita-ai-B5_QZuND.js rename to assets/novita-ai-DnXfEx2N.js index 744dc5d6a8d70485529fb4c1be5fbbf4524b393f..4d5aa0fda301520fdecc5ceef98f047f11f0b4f1 100644 --- a/assets/novita-ai-B5_QZuND.js +++ b/assets/novita-ai-DnXfEx2N.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`novita-ai`;var x=a({__name:`novita-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`nvt-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`novita-ai`;var x=a({__name:`novita-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`nvt-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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-CIvy2V5T.js b/assets/ollama-BVrnvhnT.js similarity index 97% rename from assets/ollama-CIvy2V5T.js rename to assets/ollama-BVrnvhnT.js index 6a34f0db2006421f68e722ad06e1994e4af4ec1e..763e3977d160ffd55c30a4883b6daf7867a0c274 100644 --- a/assets/ollama-CIvy2V5T.js +++ b/assets/ollama-BVrnvhnT.js @@ -1 +1 @@ -import{cO as e,d5 as t,d7 as n,dS as r,dU as i,dY as a,dZ as o,e3 as s,e5 as c,ec as l,ed as u,eg as d,ek as f,g as p,h as m,i as h,j as g,l as _,x as v,z as y}from"./index-BqrqTEsQ.js";import{b}from"./route-block-gWR0cCIm.js";const x=`ollama`;var S=o({__name:`ollama`,setup(o){let{t:b}=y(),S=t(),C=v(),{providers:w}=n(C),T=r(()=>C.getProviderMetadata(x)),E=r({get:()=>w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});s(()=>{C.initializeProvider(x),E.value=w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,w.value[x]?.headers||(w.value[x].headers={})});function D(){w.value[x]={...T.value?.defaultOptions}}let O=d([{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 l(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(t,n)=>(c(),i(f(p),{"provider-name":T.value?.localizedName,"provider-icon":T.value?.icon,"on-back":()=>f(S).back()},{default:u(()=>[a(f(m),null,{default:u(()=>[a(f(h),{title:f(b)(`settings.pages.providers.common.section.basic.title`),description:f(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[a(f(g),{modelValue:E.value,"onUpdate:modelValue":n[0]||=e=>E.value=e,placeholder:T.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`title`,`description`]),a(f(_),{title:f(b)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[a(f(e),{modelValue:O.value,"onUpdate:modelValue":n[1]||=e=>O.value=e,label:f(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:f(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":f(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":f(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:n[2]||=(e,t)=>k(O.value,e,t),onRemove:n[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{cO as e,d5 as t,d7 as n,dS as r,dU as i,dY as a,dZ as o,e3 as s,e5 as c,ec as l,ed as u,eg as d,ek as f,g as p,h as m,i as h,j as g,l as _,x as v,z as y}from"./index-D1IGsMK6.js";import{b}from"./route-block-gWR0cCIm.js";const x=`ollama`;var S=o({__name:`ollama`,setup(o){let{t:b}=y(),S=t(),C=v(),{providers:w}=n(C),T=r(()=>C.getProviderMetadata(x)),E=r({get:()=>w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});s(()=>{C.initializeProvider(x),E.value=w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,w.value[x]?.headers||(w.value[x].headers={})});function D(){w.value[x]={...T.value?.defaultOptions}}let O=d([{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 l(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(t,n)=>(c(),i(f(p),{"provider-name":T.value?.localizedName,"provider-icon":T.value?.icon,"on-back":()=>f(S).back()},{default:u(()=>[a(f(m),null,{default:u(()=>[a(f(h),{title:f(b)(`settings.pages.providers.common.section.basic.title`),description:f(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[a(f(g),{modelValue:E.value,"onUpdate:modelValue":n[0]||=e=>E.value=e,placeholder:T.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`title`,`description`]),a(f(_),{title:f(b)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[a(f(e),{modelValue:O.value,"onUpdate:modelValue":n[1]||=e=>O.value=e,label:f(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:f(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":f(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":f(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:n[2]||=(e,t)=>k(O.value,e,t),onRemove:n[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-CcptUYcJ.js b/assets/openai-CQDdOtKc.js similarity index 96% rename from assets/openai-CcptUYcJ.js rename to assets/openai-CQDdOtKc.js index 30b40c81b97fc5610473d235a8fdd8afcd4a2a7c..44fef0272962aa4e32cd7923abe60d12e7d0a085 100644 --- a/assets/openai-CcptUYcJ.js +++ b/assets/openai-CQDdOtKc.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`openai`;var x=a({__name:`openai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||`https://api.openai.com/v1/`}),c([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,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`openai`;var x=a({__name:`openai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||`https://api.openai.com/v1/`}),c([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,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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-1dVJvi78.js b/assets/openai-audio-speech-yymAjo1X.js similarity index 95% rename from assets/openai-audio-speech-1dVJvi78.js rename to assets/openai-audio-speech-yymAjo1X.js index c8269be27ed1214e32a72ced291ce3b2e85fc9f4..bdf38e30ba5eda694815edc53318fcdd9bb8b9a5 100644 --- a/assets/openai-audio-speech-1dVJvi78.js +++ b/assets/openai-audio-speech-yymAjo1X.js @@ -1 +1 @@ -import{cM as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e as o,e5 as s,ec as c,ed as l,eg as u,ek as d,f,u as p,x as m,z as h}from"./index-BqrqTEsQ.js";import{b as g}from"./route-block-gWR0cCIm.js";const _=`openai-audio-speech`,v=`gpt-4o-mini-tts`;var y=a({__name:`openai-audio-speech`,setup(a){let g=p(),y=m(),{providers:b}=t(y),{t:x}=h(),S={speed:1},C=u(1),w=n(()=>!!b.value[_]?.apiKey),T=n(()=>g.availableVoices[_]||[]);async function E(e,t,n){let r=await y.getProviderInstance(_);if(!r)throw Error(`Failed to initialize speech provider`);let i=y.getProviderConfig(_),a=i.model||v;return await g.speech(r,a,e,t,{...i,...S})}return c(C,async()=>{let e=y.getProviderConfig(_);e.speed=C.value}),(t,n)=>(s(),r(d(o),{"provider-id":_,"default-model":v,"additional-settings":S},{"voice-settings":l(()=>[i(d(e),{modelValue:C.value,"onUpdate:modelValue":n[0]||=e=>C.value=e,label:d(x)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:d(x)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:l(()=>[i(d(f),{"available-voices":T.value,"generate-speech":E,"api-key-configured":w.value,"default-text":`Hello! This is a test of the OpenAI Speech.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof g==`function`&&g(y);var b=y;export{b as default}; \ No newline at end of file +import{cM as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e as o,e5 as s,ec as c,ed as l,eg as u,ek as d,f,u as p,x as m,z as h}from"./index-D1IGsMK6.js";import{b as g}from"./route-block-gWR0cCIm.js";const _=`openai-audio-speech`,v=`gpt-4o-mini-tts`;var y=a({__name:`openai-audio-speech`,setup(a){let g=p(),y=m(),{providers:b}=t(y),{t:x}=h(),S={speed:1},C=u(1),w=n(()=>!!b.value[_]?.apiKey),T=n(()=>g.availableVoices[_]||[]);async function E(e,t,n){let r=await y.getProviderInstance(_);if(!r)throw Error(`Failed to initialize speech provider`);let i=y.getProviderConfig(_),a=i.model||v;return await g.speech(r,a,e,t,{...i,...S})}return c(C,async()=>{let e=y.getProviderConfig(_);e.speed=C.value}),(t,n)=>(s(),r(d(o),{"provider-id":_,"default-model":v,"additional-settings":S},{"voice-settings":l(()=>[i(d(e),{modelValue:C.value,"onUpdate:modelValue":n[0]||=e=>C.value=e,label:d(x)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:d(x)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:l(()=>[i(d(f),{"available-voices":T.value,"generate-speech":E,"api-key-configured":w.value,"default-text":`Hello! This is a test of the OpenAI Speech.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof g==`function`&&g(y);var b=y;export{b as default}; \ No newline at end of file diff --git a/assets/openai-audio-transcription-BB_pETq3.js b/assets/openai-audio-transcription-irFP0VIY.js similarity index 91% rename from assets/openai-audio-transcription-BB_pETq3.js rename to assets/openai-audio-transcription-irFP0VIY.js index 732ba49232c92f278bbde24b8d5a6d6b5f09086c..691704de2ae533d250110b25322b195b58774687 100644 --- a/assets/openai-audio-transcription-BB_pETq3.js +++ b/assets/openai-audio-transcription-irFP0VIY.js @@ -1 +1 @@ -import{c as e,d as t,d7 as n,dS as r,dU as i,dY as a,dZ as o,e5 as s,ed as c,ek as l,s as u,x as d}from"./index-BqrqTEsQ.js";import{b as f}from"./route-block-gWR0cCIm.js";const p=`openai-audio-transcription`,m=`whisper-1`;var h=o({__name:`openai-audio-transcription`,setup(o){let f=u(),h=d(),{providers:g}=n(h),_=r(()=>!!g.value[p]?.apiKey);async function v(e){let t=await h.getProviderInstance(p);if(!t)throw Error(`Failed to initialize speech provider`);let n=h.getProviderConfig(p),r=n.model||m;return await f.transcription(t,r,e,`json`)}return(n,r)=>(s(),i(l(e),{"provider-id":p,"default-model":m},{playground:c(()=>[a(l(t),{"generate-transcription":v,"api-key-configured":_.value},null,8,[`api-key-configured`])]),_:1}))}});typeof f==`function`&&f(h);var g=h;export{g as default}; \ No newline at end of file +import{c as e,d as t,d7 as n,dS as r,dU as i,dY as a,dZ as o,e5 as s,ed as c,ek as l,s as u,x as d}from"./index-D1IGsMK6.js";import{b as f}from"./route-block-gWR0cCIm.js";const p=`openai-audio-transcription`,m=`whisper-1`;var h=o({__name:`openai-audio-transcription`,setup(o){let f=u(),h=d(),{providers:g}=n(h),_=r(()=>!!g.value[p]?.apiKey);async function v(e){let t=await h.getProviderInstance(p);if(!t)throw Error(`Failed to initialize speech provider`);let n=h.getProviderConfig(p),r=n.model||m;return await f.transcription(t,r,e,`json`)}return(n,r)=>(s(),i(l(e),{"provider-id":p,"default-model":m},{playground:c(()=>[a(l(t),{"generate-transcription":v,"api-key-configured":_.value},null,8,[`api-key-configured`])]),_:1}))}});typeof f==`function`&&f(h);var g=h;export{g as default}; \ No newline at end of file diff --git a/assets/openrouter-ai-Cy1v1-nn.js b/assets/openrouter-ai--dshV5bL.js similarity index 96% rename from assets/openrouter-ai-Cy1v1-nn.js rename to assets/openrouter-ai--dshV5bL.js index 94a2aaaba554f945062e4e815a725931c7d7404c..9abfed9f6cd9bfc91453aa43b8743ad900090b3f 100644 --- a/assets/openrouter-ai-Cy1v1-nn.js +++ b/assets/openrouter-ai--dshV5bL.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`openrouter-ai`;var x=a({__name:`openrouter-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||w.value?.defaultOptions?.().baseUrl||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-or-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[1]||=e=>E.value=e,placeholder:w.value?.defaultOptions?.().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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`openrouter-ai`;var x=a({__name:`openrouter-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||w.value?.defaultOptions?.().baseUrl||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-or-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[1]||=e=>E.value=e,placeholder:w.value?.defaultOptions?.().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-CD0qLry_.js b/assets/pages-CsEDt6j8.js similarity index 79% rename from assets/pages-CD0qLry_.js rename to assets/pages-CsEDt6j8.js index e3fb85b7ba8e80f2e89344285eeac6853d4c4779..7acc75796052e8e27878f1cd9e4f54fc4e2cbee7 100644 --- a/assets/pages-CD0qLry_.js +++ b/assets/pages-CsEDt6j8.js @@ -1 +1 @@ -import"./Basic-6NscZoIc.js";import{b as e,d as t}from"./theme-color-DipcFg9a.js";import{d7 as n,d8 as r,d9 as i,dT as a,dU as o,dV as s,dY as c,dZ as l,db as u,dg as d,e3 as f,e5 as p,ec as m,ed as h,eg as g,ek as _,q as v}from"./index-BqrqTEsQ.js";import"./HeaderLink-D6jJjgut.js";import{b as y}from"./route-block-gWR0cCIm.js";import{b}from"./Scenes-2Kp3NQ_V.js";import{b as x,c as S,d as C,e as w,f as T,g as E}from"./AnimatedWave-CPwzka9L.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";const D={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},O={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``},k={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 R(),{immediate:!0}),f(()=>R()),(e,t)=>(p(),o(E,null,{default:h(()=>[c(x,{class:`widgets top-widgets`,"fill-color":_(y)?`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:h(()=>[a(`div`,D,[a(`div`,O,[c(T,{class:`hidden md:flex`}),c(C,{class:`flex md:hidden`})]),a(`div`,k,[c(_(b),{"flex-1":``,"min-w":`1/2`,paused:A.value,"focus-at":{x:_(M).x.value,y:_(M).y.value},"x-offset":`${_(L)?_(P).x:_(P).x-10}%`,"y-offset":_(F).y,scale:_(N)},null,8,[`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`]),_(L)?s(``,!0):(p(),o(w,{key:0,h:`85dvh`,absolute:``,"right-4":``,flex:``,"flex-1":``,"flex-col":``,"max-w":`500px`,"min-w":`30%`})),_(L)?(p(),o(S,{key:1,onSettingsOpen:j})):s(``,!0)])])]),_:1},8,[`fill-color`])]),_:1}))}});typeof y==`function`&&y(A);var j=A;export{j as default}; \ No newline at end of file +import"./Basic-JYGX2D37.js";import{b as e,d as t}from"./theme-color-mhr1g0fO.js";import{d7 as n,d8 as r,d9 as i,dT as a,dU as o,dV as s,dY as c,dZ as l,db as u,dg as d,e3 as f,e5 as p,ec as m,ed as h,eg as g,ek as _,q as v}from"./index-D1IGsMK6.js";import"./HeaderLink-CSWG6G--.js";import{b as y}from"./route-block-gWR0cCIm.js";import{b}from"./Scenes-ZY5GY3Yk.js";import{b as x,c as S,d as C,e as w,f as T,g as E}from"./AnimatedWave-Ctq8iFvb.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";const D={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},O={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``},k={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 R(),{immediate:!0}),f(()=>R()),(e,t)=>(p(),o(E,null,{default:h(()=>[c(x,{class:`widgets top-widgets`,"fill-color":_(y)?`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:h(()=>[a(`div`,D,[a(`div`,O,[c(T,{class:`hidden md:flex`}),c(C,{class:`flex md:hidden`})]),a(`div`,k,[c(_(b),{"flex-1":``,"min-w":`1/2`,paused:A.value,"focus-at":{x:_(M).x.value,y:_(M).y.value},"x-offset":`${_(L)?_(P).x:_(P).x-10}%`,"y-offset":_(F).y,scale:_(N)},null,8,[`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`]),_(L)?s(``,!0):(p(),o(w,{key:0,h:`85dvh`,absolute:``,"right-4":``,flex:``,"flex-1":``,"flex-col":``,"max-w":`500px`,"min-w":`30%`})),_(L)?(p(),o(S,{key:1,onSettingsOpen:j})):s(``,!0)])])]),_:1},8,[`fill-color`])]),_:1}))}});typeof y==`function`&&y(A);var j=A;export{j as default}; \ No newline at end of file diff --git a/assets/plain-cTemKD3O.js b/assets/plain-DnlN44SY.js similarity index 63% rename from assets/plain-cTemKD3O.js rename to assets/plain-DnlN44SY.js index 9b4429af67ad203d38b7c8a189e3c6291c126589..dad2b2389e6f81321de9564d1c429e72bc141e59 100644 --- a/assets/plain-cTemKD3O.js +++ b/assets/plain-DnlN44SY.js @@ -1 +1 @@ -import{cN as e,dU as t,e5 as n,e8 as r}from"./index-BqrqTEsQ.js";const i={};function a(e,i){let a=r(`RouterView`);return n(),t(a)}var o=e(i,[[`render`,a]]);export{o as default}; \ No newline at end of file +import{cN as e,dU as t,e5 as n,e8 as r}from"./index-D1IGsMK6.js";const i={};function a(e,i){let a=r(`RouterView`);return n(),t(a)}var o=e(i,[[`render`,a]]);export{o as default}; \ No newline at end of file diff --git a/assets/player2-Xoxrm0dX.js b/assets/player2-D8_1xZL8.js similarity index 96% rename from assets/player2-Xoxrm0dX.js rename to assets/player2-D8_1xZL8.js index 6112e03596ec05511dcb79b1bc3b4e805d91dcdd..3b8faddfff29a0bac0cc0427284a84ac0c25a3cd 100644 --- a/assets/player2-Xoxrm0dX.js +++ b/assets/player2-D8_1xZL8.js @@ -1 +1 @@ -import{cr as e,d5 as t,d7 as n,dQ as r,dS as i,dT as a,dV as o,dW as s,dX as c,dY as l,dZ as u,e3 as d,e5 as f,ec as p,ed as m,eg as h,ek as g,g as _,h as v,i as y,j as b,x,z as S}from"./index-BqrqTEsQ.js";import{b as C}from"./route-block-gWR0cCIm.js";const w={key:0,"mb-1":``},T=`player2`;var E=u({__name:`player2`,setup(u){let{t:C}=S(),E=t(),D=x(),{providers:O}=n(D),k=i(()=>D.getProviderMetadata(T)),A=i({get:()=>O.value[T]?.baseUrl||``,set:e=>{O.value[T]||(O.value[T]={}),O.value[T].baseUrl=e}}),j=h(!0);d(async()=>{D.initializeProvider(T),A.value=O.value[T]?.baseUrl||``;try{let e=await fetch(`${A.value}health`,{method:`GET`,headers:{"player2-game-key":`airi`}});j.value=e.status===200}catch(e){console.error(e),j.value=!1}}),p([A],()=>{O.value[T]={...O.value[T],baseUrl:A.value||``}});function M(){O.value[T]={...k.value?.defaultOptions}}return(t,n)=>(f(),s(r,null,[j.value?o(``,!0):(f(),s(`div`,w,[l(g(e),{theme:`orange`},{label:m(()=>n[1]||=[c(` Player 2 is not running `,-1)]),default:m(()=>[n[2]||=a(`div`,null,[c(` Please download and run the Player2 App: `),a(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),a(`div`,null,[c(` After downloading, if you still are having trouble, please reach out to us on Discord: `),a(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),c(`. `)])],-1)]),_:1,__:[2]})])),l(g(_),{"provider-name":k.value?.localizedName,"provider-icon":k.value?.icon,"on-back":()=>g(E).back()},{default:m(()=>[l(g(v),null,{default:m(()=>[l(g(y),{title:g(C)(`settings.pages.providers.common.section.basic.title`),description:g(C)(`settings.pages.providers.common.section.basic.description`),"on-reset":M},{default:m(()=>[l(g(b),{modelValue:A.value,"onUpdate:modelValue":n[0]||=e=>A.value=e,placeholder:`http://localhost:4315/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])],64))}});typeof C==`function`&&C(E);var D=E;export{D as default}; \ No newline at end of file +import{cr as e,d5 as t,d7 as n,dQ as r,dS as i,dT as a,dV as o,dW as s,dX as c,dY as l,dZ as u,e3 as d,e5 as f,ec as p,ed as m,eg as h,ek as g,g as _,h as v,i as y,j as b,x,z as S}from"./index-D1IGsMK6.js";import{b as C}from"./route-block-gWR0cCIm.js";const w={key:0,"mb-1":``},T=`player2`;var E=u({__name:`player2`,setup(u){let{t:C}=S(),E=t(),D=x(),{providers:O}=n(D),k=i(()=>D.getProviderMetadata(T)),A=i({get:()=>O.value[T]?.baseUrl||``,set:e=>{O.value[T]||(O.value[T]={}),O.value[T].baseUrl=e}}),j=h(!0);d(async()=>{D.initializeProvider(T),A.value=O.value[T]?.baseUrl||``;try{let e=await fetch(`${A.value}health`,{method:`GET`,headers:{"player2-game-key":`airi`}});j.value=e.status===200}catch(e){console.error(e),j.value=!1}}),p([A],()=>{O.value[T]={...O.value[T],baseUrl:A.value||``}});function M(){O.value[T]={...k.value?.defaultOptions}}return(t,n)=>(f(),s(r,null,[j.value?o(``,!0):(f(),s(`div`,w,[l(g(e),{theme:`orange`},{label:m(()=>n[1]||=[c(` Player 2 is not running `,-1)]),default:m(()=>[n[2]||=a(`div`,null,[c(` Please download and run the Player2 App: `),a(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),a(`div`,null,[c(` After downloading, if you still are having trouble, please reach out to us on Discord: `),a(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),c(`. `)])],-1)]),_:1,__:[2]})])),l(g(_),{"provider-name":k.value?.localizedName,"provider-icon":k.value?.icon,"on-back":()=>g(E).back()},{default:m(()=>[l(g(v),null,{default:m(()=>[l(g(y),{title:g(C)(`settings.pages.providers.common.section.basic.title`),description:g(C)(`settings.pages.providers.common.section.basic.description`),"on-reset":M},{default:m(()=>[l(g(b),{modelValue:A.value,"onUpdate:modelValue":n[0]||=e=>A.value=e,placeholder:`http://localhost:4315/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])],64))}});typeof C==`function`&&C(E);var D=E;export{D as default}; \ No newline at end of file diff --git a/assets/player2-speech-C91OFlCt.js b/assets/player2-speech-3AR5_77E.js similarity index 97% rename from assets/player2-speech-C91OFlCt.js rename to assets/player2-speech-3AR5_77E.js index 2c9bd0fb3181fdd3d5ee94cd14905816d4aedcfa..5e967df9d2c6def31affbeae46983d4f5615a391 100644 --- a/assets/player2-speech-C91OFlCt.js +++ b/assets/player2-speech-3AR5_77E.js @@ -1 +1 @@ -import{cM as e,cr as t,dQ as n,dS as r,dT as i,dV as a,dW as o,dX as s,dY as c,dZ as l,e as u,e3 as d,e5 as f,ec as p,ed as m,eg as h,ek as g,f as _,u as v,x as y,z as b}from"./index-BqrqTEsQ.js";import{b as x}from"./route-block-gWR0cCIm.js";const S={key:0,style:{color:`red`,"margin-bottom":`1rem`}},C=`player2-speech`,w=`v1`;var T=l({__name:`player2-speech`,setup(l){let x=h(1),T=v(),E=y(),{t:D}=b(),O=r(()=>T.availableVoices[C]||[]);async function k(e,t,n){let r=await E.getProviderInstance(C);if(!r)throw Error(`Failed to initialize speech provider`);let i=E.getProviderConfig(C),a=i.model||w;return await T.speech(r,a,e,t,{...i})}let A=h(!0);return d(async()=>{let e=E.getProviderConfig(C),t=E.getProviderMetadata(C);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(C):console.error(`Failed to validate provider config`,e);try{let t=await fetch(`${e.baseUrl}/v1/health`,{method:`GET`,headers:{"player2-game-key":`airi`}});A.value=t.status===200}catch(e){console.error(e),A.value=!1}}),p(x,async()=>{let e=E.getProviderConfig(C);e.speed=x.value}),(r,l)=>(f(),o(n,null,[A.value?a(``,!0):(f(),o(`div`,S,[c(g(t),{theme:`orange`},{label:m(()=>l[1]||=[s(` Player 2 is not running `,-1)]),default:m(()=>[l[2]||=i(`div`,null,[s(` Please download and run the Player2 App: `),i(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),i(`div`,null,[s(` After downloading, if you still are having trouble, please reach out to us on Discord: `),i(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),s(`. `)])],-1)]),_:1,__:[2]})])),c(g(u),{"provider-id":C,"default-model":w},{"voice-settings":m(()=>[c(g(e),{modelValue:x.value,"onUpdate:modelValue":l[0]||=e=>x.value=e,label:g(D)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:g(D)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:m(()=>[c(g(_),{"available-voices":O.value,"generate-speech":k,"api-key-configured":!0,"default-text":`Hello! This is a test of the Player 2 voice synthesis.`},null,8,[`available-voices`])]),_:1})],64))}});typeof x==`function`&&x(T);var E=T;export{E as default}; \ No newline at end of file +import{cM as e,cr as t,dQ as n,dS as r,dT as i,dV as a,dW as o,dX as s,dY as c,dZ as l,e as u,e3 as d,e5 as f,ec as p,ed as m,eg as h,ek as g,f as _,u as v,x as y,z as b}from"./index-D1IGsMK6.js";import{b as x}from"./route-block-gWR0cCIm.js";const S={key:0,style:{color:`red`,"margin-bottom":`1rem`}},C=`player2-speech`,w=`v1`;var T=l({__name:`player2-speech`,setup(l){let x=h(1),T=v(),E=y(),{t:D}=b(),O=r(()=>T.availableVoices[C]||[]);async function k(e,t,n){let r=await E.getProviderInstance(C);if(!r)throw Error(`Failed to initialize speech provider`);let i=E.getProviderConfig(C),a=i.model||w;return await T.speech(r,a,e,t,{...i})}let A=h(!0);return d(async()=>{let e=E.getProviderConfig(C),t=E.getProviderMetadata(C);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(C):console.error(`Failed to validate provider config`,e);try{let t=await fetch(`${e.baseUrl}/v1/health`,{method:`GET`,headers:{"player2-game-key":`airi`}});A.value=t.status===200}catch(e){console.error(e),A.value=!1}}),p(x,async()=>{let e=E.getProviderConfig(C);e.speed=x.value}),(r,l)=>(f(),o(n,null,[A.value?a(``,!0):(f(),o(`div`,S,[c(g(t),{theme:`orange`},{label:m(()=>l[1]||=[s(` Player 2 is not running `,-1)]),default:m(()=>[l[2]||=i(`div`,null,[s(` Please download and run the Player2 App: `),i(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),i(`div`,null,[s(` After downloading, if you still are having trouble, please reach out to us on Discord: `),i(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),s(`. `)])],-1)]),_:1,__:[2]})])),c(g(u),{"provider-id":C,"default-model":w},{"voice-settings":m(()=>[c(g(e),{modelValue:x.value,"onUpdate:modelValue":l[0]||=e=>x.value=e,label:g(D)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:g(D)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:m(()=>[c(g(_),{"available-voices":O.value,"generate-speech":k,"api-key-configured":!0,"default-text":`Hello! This is a test of the Player 2 voice synthesis.`},null,8,[`available-voices`])]),_:1})],64))}});typeof x==`function`&&x(T);var E=T;export{E as default}; \ No newline at end of file diff --git a/assets/polaroid-gAmjoIyd.js b/assets/polaroid-D5obYKPu.js similarity index 93% rename from assets/polaroid-gAmjoIyd.js rename to assets/polaroid-D5obYKPu.js index 08823358c4f342de3f21c56c9aa26a79e0b4fdf8..ad6f59bc235b8a56ebb5f9e8e8764a79ebed6068 100644 --- a/assets/polaroid-gAmjoIyd.js +++ b/assets/polaroid-D5obYKPu.js @@ -1 +1 @@ -import{cg as e,dM as t,dQ as n,dT as r,dW as i,dY as a,dZ as o,e5 as s,e6 as c,ec as l,ed as u,ee as d,eg as f,ek as p,eo as m}from"./index-BqrqTEsQ.js";import{i as h,k as g}from"./Scenes-2Kp3NQ_V.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";const _={flex:``,"flex-col":``,"items-center":``,"gap-4":``},v={"h-full":``,"w-full":``},y=[`value`];var b=o({__name:`polaroid`,setup(o){let b=f(),x=f(),S=f(`idle`),C=f([]);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){x.value?.setMotion(e)}l(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(o,l)=>(s(),i(`div`,_,[r(`div`,v,[a(p(e),{relative:``,"min-h-70dvh":``},{default:u(({width:e,height:t})=>[a(p(g),{ref_key:`live2dCanvasRef`,ref:b,width:e,height:t,resolution:3,"rounded-full":``},{default:u(({app:n})=>[a(p(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})]),r(`div`,null,[d(r(`select`,{"onUpdate:modelValue":l[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:l[1]||=e=>T(S.value)},[(s(!0),i(n,null,c(C.value,e=>(s(),i(`option`,{key:e.motionIndex,value:e.motionName},m(e.fileName),9,y))),128))],544),[[t,S.value]])]),r(`div`,{border:`2px solid black dark:white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[r(`button`,{class:`h-15 w-15 md:h-18 md:w-18`,bg:`black active:neutral-950 dark:white dark:active:neutral-50`,"rounded-full":``,"outline-none":``,"transition-colors":``,"duration-200":``,"ease-in-out":``,onClick:D})])]))}}),x=b;export{x as default}; \ No newline at end of file +import{cg as e,dM as t,dQ as n,dT as r,dW as i,dY as a,dZ as o,e5 as s,e6 as c,ec as l,ed as u,ee as d,eg as f,ek as p,eo as m}from"./index-D1IGsMK6.js";import{i as h,k as g}from"./Scenes-ZY5GY3Yk.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";const _={flex:``,"flex-col":``,"items-center":``,"gap-4":``},v={"h-full":``,"w-full":``},y=[`value`];var b=o({__name:`polaroid`,setup(o){let b=f(),x=f(),S=f(`idle`),C=f([]);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){x.value?.setMotion(e)}l(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(o,l)=>(s(),i(`div`,_,[r(`div`,v,[a(p(e),{relative:``,"min-h-70dvh":``},{default:u(({width:e,height:t})=>[a(p(g),{ref_key:`live2dCanvasRef`,ref:b,width:e,height:t,resolution:3,"rounded-full":``},{default:u(({app:n})=>[a(p(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})]),r(`div`,null,[d(r(`select`,{"onUpdate:modelValue":l[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:l[1]||=e=>T(S.value)},[(s(!0),i(n,null,c(C.value,e=>(s(),i(`option`,{key:e.motionIndex,value:e.motionName},m(e.fileName),9,y))),128))],544),[[t,S.value]])]),r(`div`,{border:`2px solid black dark:white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[r(`button`,{class:`h-15 w-15 md:h-18 md:w-18`,bg:`black active:neutral-950 dark:white dark:active:neutral-50`,"rounded-full":``,"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-CNT7nN_l.js b/assets/providers-BPXI6kVS.js similarity index 97% rename from assets/providers-CNT7nN_l.js rename to assets/providers-BPXI6kVS.js index b2aef664ae27503442ab1a3bf1582f7a463024f3..90b9cdba1e89515c1800f1f9186f5a2a63fc553e 100644 --- a/assets/providers-CNT7nN_l.js +++ b/assets/providers-BPXI6kVS.js @@ -1 +1 @@ -import{cn as e,d7 as t,dQ as n,dT as r,dU as i,dW as a,dY as o,dZ as s,e5 as c,e6 as l,e8 as u,e9 as d,ed as f,ee as p,ek as m,eo as h,x as g,z as _}from"./index-BqrqTEsQ.js";import{b as v}from"./route-block-gWR0cCIm.js";import{b as y}from"./IconAnimation-eACnDPFz.js";import{b}from"./icon-animation-PuVIGmi0.js";const x={flex:``,"flex-col":``,"gap-5":``,"pb-12":``},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-1 sm:cols-2 xl:cols-3 gap-4`},O={flex:`~ row items-center gap-2`,"my-5":``},k={text:`neutral-300 dark:neutral-500`},A={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},j={flex:`~ row items-center gap-2`,"my-5":``},M={text:`neutral-300 dark:neutral-500`},N={grid:`~ cols-1 sm:cols-2 xl:cols-3 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=s({__name:`index`,setup(s){let{t:v}=_(),F=g(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=t(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(t,s)=>{let g=u(`i18n-t`),_=d(`motion`);return c(),a(n,null,[r(`div`,x,[r(`div`,S,[r(`div`,C,h(t.$t(`settings.pages.providers.helpinfo.title`)),1),r(`div`,w,[o(g,{keypath:`settings.pages.providers.helpinfo.description`},{chat:f(()=>s[0]||=[r(`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`},[r(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),r(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),r(`div`,T,[s[2]||=r(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),r(`div`,null,[r(`div`,null,[r(`span`,E,h(m(v)(`settings.pages.providers.explained.chat`)),1)]),s[1]||=r(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[r(`div`,null,` Chat `)],-1)])]),r(`div`,D,[(c(!0),a(n,null,l(m(I),(t,n)=>p((c(),i(m(e),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:t.localizedName||`Unknown`,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))]),r(`div`,O,[s[4]||=r(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),r(`div`,null,[r(`div`,null,[r(`span`,k,h(m(v)(`settings.pages.providers.explained.Speech`)),1)]),s[3]||=r(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[r(`div`,null,` Speech `)],-1)])]),r(`div`,A,[(c(!0),a(n,null,l(m(L),(t,n)=>p((c(),i(m(e),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(m(I).length+n)*50,title:t.localizedName||`Unknown`,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))]),r(`div`,j,[s[6]||=r(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),r(`div`,null,[r(`div`,null,[r(`span`,M,h(m(v)(`settings.pages.providers.explained.Transcription`)),1)]),s[5]||=r(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[r(`div`,null,` Transcription `)],-1)])]),r(`div`,N,[(c(!0),a(n,null,l(m(R),(t,n)=>p((c(),i(m(e),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(m(I).length+m(L).length+n)*50,title:t.localizedName||`Unknown`,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))])]),m(B)?(c(),i(y,{key:0,"z-index":-1,icon:m(V),"icon-size":12,duration:1e3,started:m(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`])):p((c(),a(`div`,P,s[7]||=[r(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)])),[[_]])],64)}}});typeof v==`function`&&v(F);var I=F;export{I as default}; \ No newline at end of file +import{cn as e,d7 as t,dQ as n,dT as r,dU as i,dW as a,dY as o,dZ as s,e5 as c,e6 as l,e8 as u,e9 as d,ed as f,ee as p,ek as m,eo as h,x as g,z as _}from"./index-D1IGsMK6.js";import{b as v}from"./route-block-gWR0cCIm.js";import{b as y}from"./IconAnimation-9_sNHXpR.js";import{b}from"./icon-animation-DPHfIEG5.js";const x={flex:``,"flex-col":``,"gap-5":``,"pb-12":``},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-1 sm:cols-2 xl:cols-3 gap-4`},O={flex:`~ row items-center gap-2`,"my-5":``},k={text:`neutral-300 dark:neutral-500`},A={grid:`~ cols-1 sm:cols-2 xl:cols-3 gap-4`},j={flex:`~ row items-center gap-2`,"my-5":``},M={text:`neutral-300 dark:neutral-500`},N={grid:`~ cols-1 sm:cols-2 xl:cols-3 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=s({__name:`index`,setup(s){let{t:v}=_(),F=g(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=t(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(t,s)=>{let g=u(`i18n-t`),_=d(`motion`);return c(),a(n,null,[r(`div`,x,[r(`div`,S,[r(`div`,C,h(t.$t(`settings.pages.providers.helpinfo.title`)),1),r(`div`,w,[o(g,{keypath:`settings.pages.providers.helpinfo.description`},{chat:f(()=>s[0]||=[r(`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`},[r(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),r(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),r(`div`,T,[s[2]||=r(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),r(`div`,null,[r(`div`,null,[r(`span`,E,h(m(v)(`settings.pages.providers.explained.chat`)),1)]),s[1]||=r(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[r(`div`,null,` Chat `)],-1)])]),r(`div`,D,[(c(!0),a(n,null,l(m(I),(t,n)=>p((c(),i(m(e),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:t.localizedName||`Unknown`,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))]),r(`div`,O,[s[4]||=r(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),r(`div`,null,[r(`div`,null,[r(`span`,k,h(m(v)(`settings.pages.providers.explained.Speech`)),1)]),s[3]||=r(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[r(`div`,null,` Speech `)],-1)])]),r(`div`,A,[(c(!0),a(n,null,l(m(L),(t,n)=>p((c(),i(m(e),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(m(I).length+n)*50,title:t.localizedName||`Unknown`,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))]),r(`div`,j,[s[6]||=r(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),r(`div`,null,[r(`div`,null,[r(`span`,M,h(m(v)(`settings.pages.providers.explained.Transcription`)),1)]),s[5]||=r(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[r(`div`,null,` Transcription `)],-1)])]),r(`div`,N,[(c(!0),a(n,null,l(m(R),(t,n)=>p((c(),i(m(e),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(m(I).length+m(L).length+n)*50,title:t.localizedName||`Unknown`,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))])]),m(B)?(c(),i(y,{key:0,"z-index":-1,icon:m(V),"icon-size":12,duration:1e3,started:m(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`])):p((c(),a(`div`,P,s[7]||=[r(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)])),[[_]])],64)}}});typeof v==`function`&&v(F);var I=F;export{I as default}; \ No newline at end of file diff --git a/assets/queue-BhpwXiAb.js b/assets/queue-CVzHeHkm.js similarity index 94% rename from assets/queue-BhpwXiAb.js rename to assets/queue-CVzHeHkm.js index cefd3ee4b781fd447df479431a6561f074387bb3..b767cf84ff26f8cd4a9fbe42cce71b6858e80757 100644 --- a/assets/queue-BhpwXiAb.js +++ b/assets/queue-CVzHeHkm.js @@ -1 +1 @@ -import{c4 as e,c9 as t,dT as n,dW as r,dZ as i,e3 as a,e5 as o,eg as s}from"./index-BqrqTEsQ.js";var c=i({__name:`queue`,setup(i){let c=s(``),l=e({handlers:[async e=>{console.log(`ready to play speech audio for`,e)}]}),u=e({handlers:[async e=>{console.log(`ready to stream speech audio for`,e),l.add(e.data)}]}),d=e({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 t(100),d.add(e)}async function m(){p()}return a(()=>{m()}),(e,t)=>(o(),r(`div`,null,t[0]||=[n(`div`,null,null,-1)]))}}),l=c;export{l as default}; \ No newline at end of file +import{c4 as e,c9 as t,dT as n,dW as r,dZ as i,e3 as a,e5 as o,eg as s}from"./index-D1IGsMK6.js";var c=i({__name:`queue`,setup(i){let c=s(``),l=e({handlers:[async e=>{console.log(`ready to play speech audio for`,e)}]}),u=e({handlers:[async e=>{console.log(`ready to stream speech audio for`,e),l.add(e.data)}]}),d=e({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 t(100),d.add(e)}async function m(){p()}return a(()=>{m()}),(e,t)=>(o(),r(`div`,null,t[0]||=[n(`div`,null,null,-1)]))}}),l=c;export{l as default}; \ No newline at end of file diff --git a/assets/scene-TS-s_kmR.js b/assets/scene-B0dmKhyc.js similarity index 85% rename from assets/scene-TS-s_kmR.js rename to assets/scene-B0dmKhyc.js index 2d06330cfc7ac17c25a2b5d6693a5b44acf88222..db7ee41109d7e32c078c789808768e424a9dc829 100644 --- a/assets/scene-TS-s_kmR.js +++ b/assets/scene-B0dmKhyc.js @@ -1 +1 @@ -import{cr as e,dQ as t,dT as n,dU as r,dW as i,dX as a,dY as o,dZ as s,e5 as c,e9 as l,ed as u,ee as d,ek as f}from"./index-BqrqTEsQ.js";import{b as p}from"./route-block-gWR0cCIm.js";import{b as m}from"./IconAnimation-eACnDPFz.js";import{b as h}from"./icon-animation-PuVIGmi0.js";const g={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 _=s({__name:`index`,setup(s){let{iconAnimationStarted:p,showIconAnimation:_,animationIcon:v}=h(`i-solar:armchair-2-bold-duotone`);return(s,h)=>{let y=l(`motion`);return c(),i(t,null,[n(`div`,null,[o(f(e),{label:`In development, needs your help!`,theme:`orange`},{default:u(()=>h[0]||=[n(`div`,null,[a(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),n(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),a(`. The source code of this page is located at `),n(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/scene/index.vue`},`here`),a(`. `)],-1)]),_:1,__:[0]})]),f(_)?(c(),r(m,{key:0,"z-index":-1,icon:f(v),"icon-size":12,duration:1e3,started:f(p),"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`])):d((c(),i(`div`,g,h[1]||=[n(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)])),[[y]])],64)}}});typeof p==`function`&&p(_);var v=_;export{v as default}; \ No newline at end of file +import{cr as e,dQ as t,dT as n,dU as r,dW as i,dX as a,dY as o,dZ as s,e5 as c,e9 as l,ed as u,ee as d,ek as f}from"./index-D1IGsMK6.js";import{b as p}from"./route-block-gWR0cCIm.js";import{b as m}from"./IconAnimation-9_sNHXpR.js";import{b as h}from"./icon-animation-DPHfIEG5.js";const g={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 _=s({__name:`index`,setup(s){let{iconAnimationStarted:p,showIconAnimation:_,animationIcon:v}=h(`i-solar:armchair-2-bold-duotone`);return(s,h)=>{let y=l(`motion`);return c(),i(t,null,[n(`div`,null,[o(f(e),{label:`In development, needs your help!`,theme:`orange`},{default:u(()=>h[0]||=[n(`div`,null,[a(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),n(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),a(`. The source code of this page is located at `),n(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/scene/index.vue`},`here`),a(`. `)],-1)]),_:1,__:[0]})]),f(_)?(c(),r(m,{key:0,"z-index":-1,icon:f(v),"icon-size":12,duration:1e3,started:f(p),"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`])):d((c(),i(`div`,g,h[1]||=[n(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)])),[[y]])],64)}}});typeof p==`function`&&p(_);var v=_;export{v as default}; \ No newline at end of file diff --git a/assets/settings-DWeVUT02.js b/assets/settings-BlRMq2Zz.js similarity index 96% rename from assets/settings-DWeVUT02.js rename to assets/settings-BlRMq2Zz.js index 901a2f9c50a0118915de052348833f429752b915..a4750ea6674539d5f0656f91edb0baf7aaebc6c7 100644 --- a/assets/settings-DWeVUT02.js +++ b/assets/settings-BlRMq2Zz.js @@ -1 +1 @@ -import{c as e,d as t}from"./theme-color-DipcFg9a.js";import{cq as n,d3 as r,d4 as i,d7 as a,dS as o,dT as s,dW as c,dY as l,dZ as u,db as d,e3 as f,e5 as p,ec as m,ek as h,x as g,z as _}from"./index-BqrqTEsQ.js";import{b as v}from"./HeaderLink-D6jJjgut.js";const y={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":``,"w-full":``},b={class:`px-0 py-1 hidden sm:block md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},x={class:`h-[calc(100%-40px)] px-3 py-0 2xl:max-w-[2160px] sm:h-[calc(100%-56px)] md:py-0 xl:px-4`,flex:`~ col`,"mx-auto":``};var S=u({__name:`settings`,setup(u){let S=i(),C=d(),{t:w}=_(),T=g(),{allProvidersMetadata:E}=a(T),D=o(()=>{let e={"/settings/airi-card":{subtitle:w(`settings.title`),title:w(`settings.pages.card.title`)},"/settings/appearance":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.title`)},"/settings/appearance/general":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.general.title`)},"/settings/appearance/color-scheme":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.color-scheme.title`)},"/settings/appearance/developer":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.developer.title`)},"/settings/memory":{subtitle:w(`settings.title`),title:w(`settings.pages.memory.title`)},"/settings/models":{subtitle:w(`settings.title`),title:w(`settings.pages.models.title`)},"/settings/modules":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.title`)},"/settings/modules/consciousness":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.consciousness.title`)},"/settings/modules/speech":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.speech.title`)},"/settings/modules/hearing":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.hearing.title`)},"/settings/modules/memory-short-term":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.memory-short-term.title`)},"/settings/modules/memory-long-term":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.memory-long-term.title`)},"/settings/modules/messaging-discord":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.messaging-discord.title`)},"/settings/modules/x":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.x.title`)},"/settings/modules/gaming-minecraft":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.gaming-minecraft.title`)},"/settings/modules/gaming-factorio":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.gaming-factorio.title`)},"/settings/providers":{subtitle:w(`settings.title`),title:w(`settings.pages.providers.title`)},"/settings/scene":{subtitle:w(`settings.title`),title:w(`settings.pages.scene.title`)},"/settings":{title:w(`settings.title`)}};for(let t of E.value)e[`/settings/providers/${t.id}`]={subtitle:w(`settings.title`),title:w(t.nameKey)};return e}),O=o(()=>D.value[S.path]),{updateThemeColor:k}=t(e({light:`rgb(255 255 255)`,dark:`rgb(18 18 18)`}));return m(C,()=>k(),{immediate:!0}),m(S,()=>k(),{immediate:!0}),f(()=>k()),(e,t)=>(p(),c(`div`,y,[s(`div`,b,[l(v)]),s(`div`,x,[l(h(n),{title:O.value?.title,subtitle:O.value?.subtitle},null,8,[`title`,`subtitle`]),l(h(r))])]))}}),C=S;export{C as default}; \ No newline at end of file +import{c as e,d as t}from"./theme-color-mhr1g0fO.js";import{cq as n,d3 as r,d4 as i,d7 as a,dS as o,dT as s,dW as c,dY as l,dZ as u,db as d,e3 as f,e5 as p,ec as m,ek as h,x as g,z as _}from"./index-D1IGsMK6.js";import{b as v}from"./HeaderLink-CSWG6G--.js";const y={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":``,"w-full":``},b={class:`px-0 py-1 hidden sm:block md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},x={class:`h-[calc(100%-40px)] px-3 py-0 2xl:max-w-[2160px] sm:h-[calc(100%-56px)] md:py-0 xl:px-4`,flex:`~ col`,"mx-auto":``};var S=u({__name:`settings`,setup(u){let S=i(),C=d(),{t:w}=_(),T=g(),{allProvidersMetadata:E}=a(T),D=o(()=>{let e={"/settings/airi-card":{subtitle:w(`settings.title`),title:w(`settings.pages.card.title`)},"/settings/appearance":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.title`)},"/settings/appearance/general":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.general.title`)},"/settings/appearance/color-scheme":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.color-scheme.title`)},"/settings/appearance/developer":{subtitle:w(`settings.title`),title:w(`settings.pages.themes.developer.title`)},"/settings/memory":{subtitle:w(`settings.title`),title:w(`settings.pages.memory.title`)},"/settings/models":{subtitle:w(`settings.title`),title:w(`settings.pages.models.title`)},"/settings/modules":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.title`)},"/settings/modules/consciousness":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.consciousness.title`)},"/settings/modules/speech":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.speech.title`)},"/settings/modules/hearing":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.hearing.title`)},"/settings/modules/memory-short-term":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.memory-short-term.title`)},"/settings/modules/memory-long-term":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.memory-long-term.title`)},"/settings/modules/messaging-discord":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.messaging-discord.title`)},"/settings/modules/x":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.x.title`)},"/settings/modules/gaming-minecraft":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.gaming-minecraft.title`)},"/settings/modules/gaming-factorio":{subtitle:w(`settings.title`),title:w(`settings.pages.modules.gaming-factorio.title`)},"/settings/providers":{subtitle:w(`settings.title`),title:w(`settings.pages.providers.title`)},"/settings/scene":{subtitle:w(`settings.title`),title:w(`settings.pages.scene.title`)},"/settings":{title:w(`settings.title`)}};for(let t of E.value)e[`/settings/providers/${t.id}`]={subtitle:w(`settings.title`),title:w(t.nameKey)};return e}),O=o(()=>D.value[S.path]),{updateThemeColor:k}=t(e({light:`rgb(255 255 255)`,dark:`rgb(18 18 18)`}));return m(C,()=>k(),{immediate:!0}),m(S,()=>k(),{immediate:!0}),f(()=>k()),(e,t)=>(p(),c(`div`,y,[s(`div`,b,[l(v)]),s(`div`,x,[l(h(n),{title:O.value?.title,subtitle:O.value?.subtitle},null,8,[`title`,`subtitle`]),l(h(r))])]))}}),C=S;export{C as default}; \ No newline at end of file diff --git a/assets/settings-DM_cxWPe.js b/assets/settings-QwpRJEhc.js similarity index 95% rename from assets/settings-DM_cxWPe.js rename to assets/settings-QwpRJEhc.js index 6178f535e2f2b145f86118f2839ba420f6d7321b..1fc7317a47fb64a6979c256aa0f344b3faecaeb1 100644 --- a/assets/settings-DM_cxWPe.js +++ b/assets/settings-QwpRJEhc.js @@ -1 +1 @@ -import{co as e,d5 as t,dQ as n,dS as r,dT as i,dU as a,dW as o,dZ as s,e2 as c,e5 as l,e6 as u,e9 as d,ee as f,eg as p,ek as m,en as h,o as g,z as _}from"./index-BqrqTEsQ.js";import{b as v}from"./route-block-gWR0cCIm.js";import{b as y}from"./IconAnimation-eACnDPFz.js";const b={flex:`~ col gap-4`,"font-normal":``},x={flex:`~ col gap-4`,"pb-12":``},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=s({__name:`index`,setup(s){let v=t(),w=p(!1),T=p(),E=p(),{t:D}=_(),O=p(``),k=p(``),A=p(!1),j=g();function M(){E.value?.()}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 c(),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=r(()=>[{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,r)=>{let s=d(`motion`);return l(),o(`div`,b,[r[0]||=i(`div`,null,null,-1),i(`div`,x,[(l(!0),o(n,null,u(F.value,(t,n)=>f((l(),a(m(e),{key:t.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:h({transitionDelay:`${n*50}ms`}),title:t.title,description:t.description,icon:t.icon,to:t.to,onClick:e=>N(e,t)},null,8,[`style`,`title`,`description`,`icon`,`to`,`onClick`])),[[s]])),128))]),A.value&&!m(j).disableTransitions&&m(j).usePageSpecificTransitions?(l(),a(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`])):f((l(),o(`div`,S,[f(i(`div`,C,null,512),[[s]])])),[[s]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file +import{co as e,d5 as t,dQ as n,dS as r,dT as i,dU as a,dW as o,dZ as s,e2 as c,e5 as l,e6 as u,e9 as d,ee as f,eg as p,ek as m,en as h,o as g,z as _}from"./index-D1IGsMK6.js";import{b as v}from"./route-block-gWR0cCIm.js";import{b as y}from"./IconAnimation-9_sNHXpR.js";const b={flex:`~ col gap-4`,"font-normal":``},x={flex:`~ col gap-4`,"pb-12":``},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=s({__name:`index`,setup(s){let v=t(),w=p(!1),T=p(),E=p(),{t:D}=_(),O=p(``),k=p(``),A=p(!1),j=g();function M(){E.value?.()}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 c(),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=r(()=>[{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,r)=>{let s=d(`motion`);return l(),o(`div`,b,[r[0]||=i(`div`,null,null,-1),i(`div`,x,[(l(!0),o(n,null,u(F.value,(t,n)=>f((l(),a(m(e),{key:t.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:h({transitionDelay:`${n*50}ms`}),title:t.title,description:t.description,icon:t.icon,to:t.to,onClick:e=>N(e,t)},null,8,[`style`,`title`,`description`,`icon`,`to`,`onClick`])),[[s]])),128))]),A.value&&!m(j).disableTransitions&&m(j).usePageSpecificTransitions?(l(),a(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`])):f((l(),o(`div`,S,[f(i(`div`,C,null,512),[[s]])])),[[s]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file diff --git a/assets/speech-DJZRaUxH.js b/assets/speech-BkDk1gxm.js similarity index 98% rename from assets/speech-DJZRaUxH.js rename to assets/speech-BkDk1gxm.js index 31ac1d58dc760a35190655cb58ad9400f9898977..b933cf12680c455740d5aa6e1b0076bded3881eb 100644 --- a/assets/speech-DJZRaUxH.js +++ b/assets/speech-BkDk1gxm.js @@ -1 +1 @@ -import"./Basic-6NscZoIc.js";import{b as e}from"./Textarea-CQXjp80_.js";import{cC as t,cM as n,cP as r,cR as i,cf as a,ch as o,cj as ee,ck as te,cl as ne,cm as s,d2 as re,d7 as c,dM as ie,dN as ae,dQ as l,dT as u,dU as d,dV as f,dW as p,dX as m,dY as h,dZ as g,e3 as _,e4 as oe,e5 as v,e6 as se,e9 as ce,ec as le,ed as y,ee as b,ef as x,eg as S,ek as C,el as ue,eo as w,u as de,v as fe,x as pe,z as me}from"./index-BqrqTEsQ.js";import{b as T}from"./route-block-gWR0cCIm.js";const he={flex:`~ col md:row gap-6`},ge={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`h-fit w-full md:w-[40%]`},_e={flex:`~ col gap-4`},ve={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},ye={text:`neutral-400 dark:neutral-500`},be={"max-w-full":``},xe={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},Se={key:1},Ce={key:0},we={flex:`~ col gap-4`},Te={class:`text-lg md:text-2xl`},E={text:`neutral-400 dark:neutral-400`},D={key:0,class:`flex items-center justify-center py-4`},O={key:0},Ee={flex:`~ col gap-4`},De={key:0},Oe={class:`flex flex-col gap-4`},ke={flex:`~ row gap-4`},Ae={key:1,class:`space-y-6`},je={flex:`~ col gap-4`},Me={key:4,class:`mt-2 space-y-6`},Ne={key:0},Pe={flex:`~ col gap-4`},Fe={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Ie={"w-full":``,"rounded-xl":``},Le={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},Re={class:`inline-flex items-center gap-4`},ze={flex:`~ col gap-4`},Be={flex:`~ row`,"gap-4":``},Ve=[`disabled`],He={flex:`~ row`,"items-center":``,"gap-2":``},Ue=[`src`],k={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=g({__name:`speech`,setup(g){let{t:T}=me(),A=pe(),j=de(),{configuredSpeechProvidersMetadata:M}=c(A),{activeSpeechProvider:N,activeSpeechModel:P,activeSpeechVoice:F,activeSpeechVoiceId:I,pitch:L,isLoadingSpeechProviderVoices:We,supportsModelListing:Ge,providerModels:R,isLoadingActiveProviderModels:z,activeProviderModelError:B,modelSearchQuery:V,speechProviderError:H,ssmlEnabled:U,availableVoices:W}=c(j),G=S(``),K=S(!1),q=S(`Hello, my name is AI Assistant`),J=S(``),Y=S(!1),X=S(``),Z=S(null),Q=S(``);_(async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)}),le(N,async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)});async function Ke(){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=await 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.supportsSSML?j.generateSSML(q.value,F.value,{...t,pitch:L.value}):q.value,r=await fe({...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=``)}oe(()=>{X.value&&URL.revokeObjectURL(X.value)});function qe(e){F.value={id:e,name:e,description:e,previewURL:e,languages:[{code:`en`,title:`English`}],provider:N.value,gender:`male`}}function Je(e){P.value=e}return(c,g)=>{let _=ce(`motion`);return v(),p(l,null,[u(`div`,he,[u(`div`,ge,[u(`div`,null,[u(`div`,_e,[u(`div`,null,[u(`h2`,ve,w(C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),u(`div`,ye,[u(`span`,null,w(C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),u(`div`,be,[C(M).length>0?(v(),p(`fieldset`,xe,[(v(!0),p(l,null,se(C(M),e=>(v(),d(C(te),{id:e.id,key:e.id,modelValue:C(N),"onUpdate:modelValue":g[0]||=e=>x(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))])):(v(),p(`div`,Se,[h(C(re),{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:y(()=>g[13]||=[u(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),u(`div`,{class:`flex flex-col`},[u(`span`,{class:`font-medium`},`No Speech Providers Configured`),u(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech providers`)],-1),u(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[13]})]))])]),u(`div`,null,[C(N)&&C(Ge)?(v(),p(`div`,Ce,[u(`div`,we,[u(`div`,null,[u(`h2`,Te,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),u(`div`,E,[u(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),C(z)?(v(),p(`div`,D,[g[14]||=u(`div`,{class:`mr-2 animate-spin`},[u(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),u(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):C(B)?(v(),d(C(o),{key:1,title:C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:C(B)},null,8,[`title`,`error`])):C(R).length===0&&!C(z)?(v(),d(C(s),{key:2,type:`warning`},{title:y(()=>[m(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:y(()=>[m(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):C(R).length>0?(v(),d(C(ne),{key:3,modelValue:C(P),"onUpdate:modelValue":g[1]||=e=>x(P)?P.value=e:null,"search-query":C(V),"onUpdate:searchQuery":g[2]||=e=>x(V)?V.value=e:null,items:C(R),searchable:!0,"search-placeholder":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:C(V)}),"search-results-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":Je},null,8,[`modelValue`,`search-query`,`items`,`search-placeholder`,`search-no-results-title`,`search-no-results-description`,`search-results-text`,`custom-input-placeholder`,`expand-button-text`,`collapse-button-text`])):f(``,!0)])])):f(``,!0)])]),C(N)?(v(),p(`div`,O,[u(`div`,Ee,[g[24]||=u(`div`,null,[u(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),u(`div`,{text:`neutral-400 dark:neutral-500`},[u(`span`,null,`Customize how your AI assistant speaks`)])],-1),C(We)?(v(),p(`div`,De,[u(`div`,Oe,[h(C(a),{class:`w-full rounded-lg p-2.5 text-sm`},{default:y(()=>g[15]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[15]}),u(`div`,ke,[h(C(a),{class:`w-full rounded-lg p-4 text-sm`},{default:y(()=>g[16]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[16]}),h(C(a),{class:`w-full rounded-lg p-4 text-sm`},{default:y(()=>g[17]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),h(C(a),{class:`w-full rounded-lg p-4 text-sm`},{default:y(()=>g[18]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]})]),h(C(a),{class:`w-full rounded-lg p-3 text-sm`},{default:y(()=>g[19]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]})])])):C(W)[C(N)]&&C(W)[C(N)].length>0?(v(),p(`div`,Ae,[h(C(ee),{"search-query":G.value,"onUpdate:searchQuery":g[3]||=e=>G.value=e,"voice-id":C(I),"onUpdate:voiceId":g[4]||=e=>x(I)?I.value=e:null,voices:C(W)[C(N)]?.map(e=>({id:e.id,name:e.name,description:e.description,previewURL:e.previewURL,customizable:!1})),searchable:!0,"search-placeholder":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder`),"search-no-results-title":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices`),"search-no-results-description":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description`),"search-results-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results`,{count:0,total:0}),"custom-input-placeholder":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder`),"expand-button-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_more`),"collapse-button-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_less`),"play-button-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample`),"pause-button-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.pause`),"onUpdate:customValue":qe},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`])])):C(H)?(v(),d(C(o),{key:2,class:`mb-2`,title:`Error loading voices`,error:C(H)},null,8,[`error`])):(v(),d(C(s),{key:3,type:`warning`,icon:`i-solar:info-circle-line-duotone`,class:`mb-2`},{title:y(()=>g[20]||=[m(` No voices available `,-1)]),content:y(()=>g[21]||=[m(` No voices were found for this provider. You can enter a custom voice name below. `,-1)]),_:1})),u(`div`,je,[h(C(n),{modelValue:C(L),"onUpdate:modelValue":g[5]||=e=>x(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`]),h(C(i),{modelValue:C(U),"onUpdate:modelValue":g[6]||=e=>x(U)?U.value=e:null,label:`Enable SSML`,description:`Enable Speech Synthesis Markup Language for more control over speech output`},null,8,[`modelValue`])]),!C(W)[C(N)]||C(W)[C(N)].length===0?(v(),p(`div`,Me,[h(C(r),{modelValue:C(I),"onUpdate:modelValue":g[7]||=e=>x(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`]),C(N)===`elevenlabs`?(v(),p(`div`,Ne,[g[23]||=u(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),b(u(`select`,{"onUpdate:modelValue":g[8]||=e=>x(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`},g[22]||=[u(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),u(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),u(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[ie,C(P)]])])):f(``,!0),u(`div`,Pe,[h(C(n),{modelValue:C(L),"onUpdate:modelValue":g[9]||=e=>x(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`])])])):f(``,!0)])])):f(``,!0)]),u(`div`,Fe,[u(`div`,Ie,[u(`h2`,Le,[u(`div`,Re,[h(C(t)),u(`div`,null,w(C(T)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),u(`div`,ze,[h(C(i),{modelValue:K.value,"onUpdate:modelValue":g[10]||=e=>K.value=e,label:`Use Custom SSML`,description:`Enable to input raw SSML instead of plain text`},null,8,[`modelValue`]),K.value?b((v(),p(`textarea`,{key:1,"onUpdate:modelValue":g[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)),[[ae,J.value]]):(v(),d(C(e),{key:0,modelValue:q.value,"onUpdate:modelValue":g[11]||=e=>q.value=e,"h-24":``,"w-full":``,placeholder:C(T)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`)},null,8,[`modelValue`,`placeholder`])),u(`div`,Be,[u(`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()||!C(F),class:ue({"opacity-50 cursor-not-allowed":Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!C(F)}),bg:`neutral-700 dark:neutral-300`,onClick:Ke},[u(`div`,He,[g[25]||=u(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),u(`span`,null,w(Y.value?C(T)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):C(T)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,Ve),X.value?(v(),p(`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:$},g[26]||=[u(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[u(`div`,{"i-solar:stop-circle-bold-duotone":``}),u(`span`,null,`Stop`)],-1)])):f(``,!0)]),X.value?(v(),p(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,Ue)):f(``,!0)])])])]),b((v(),p(`div`,k,g[27]||=[u(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[_]])],64)}}});typeof T==`function`&&T(A);var j=A;export{j as default}; \ No newline at end of file +import"./Basic-JYGX2D37.js";import{b as e}from"./Textarea-D9rLaih7.js";import{cC as t,cM as n,cP as r,cR as i,cf as a,ch as o,cj as ee,ck as te,cl as ne,cm as s,d2 as re,d7 as c,dM as ie,dN as ae,dQ as l,dT as u,dU as d,dV as f,dW as p,dX as m,dY as h,dZ as g,e3 as _,e4 as oe,e5 as v,e6 as se,e9 as ce,ec as le,ed as y,ee as b,ef as x,eg as S,ek as C,el as ue,eo as w,u as de,v as fe,x as pe,z as me}from"./index-D1IGsMK6.js";import{b as T}from"./route-block-gWR0cCIm.js";const he={flex:`~ col md:row gap-6`},ge={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`h-fit w-full md:w-[40%]`},_e={flex:`~ col gap-4`},ve={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},ye={text:`neutral-400 dark:neutral-500`},be={"max-w-full":``},xe={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},Se={key:1},Ce={key:0},we={flex:`~ col gap-4`},Te={class:`text-lg md:text-2xl`},E={text:`neutral-400 dark:neutral-400`},D={key:0,class:`flex items-center justify-center py-4`},O={key:0},Ee={flex:`~ col gap-4`},De={key:0},Oe={class:`flex flex-col gap-4`},ke={flex:`~ row gap-4`},Ae={key:1,class:`space-y-6`},je={flex:`~ col gap-4`},Me={key:4,class:`mt-2 space-y-6`},Ne={key:0},Pe={flex:`~ col gap-4`},Fe={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Ie={"w-full":``,"rounded-xl":``},Le={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},Re={class:`inline-flex items-center gap-4`},ze={flex:`~ col gap-4`},Be={flex:`~ row`,"gap-4":``},Ve=[`disabled`],He={flex:`~ row`,"items-center":``,"gap-2":``},Ue=[`src`],k={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=g({__name:`speech`,setup(g){let{t:T}=me(),A=pe(),j=de(),{configuredSpeechProvidersMetadata:M}=c(A),{activeSpeechProvider:N,activeSpeechModel:P,activeSpeechVoice:F,activeSpeechVoiceId:I,pitch:L,isLoadingSpeechProviderVoices:We,supportsModelListing:Ge,providerModels:R,isLoadingActiveProviderModels:z,activeProviderModelError:B,modelSearchQuery:V,speechProviderError:H,ssmlEnabled:U,availableVoices:W}=c(j),G=S(``),K=S(!1),q=S(`Hello, my name is AI Assistant`),J=S(``),Y=S(!1),X=S(``),Z=S(null),Q=S(``);_(async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)}),le(N,async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)});async function Ke(){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=await 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.supportsSSML?j.generateSSML(q.value,F.value,{...t,pitch:L.value}):q.value,r=await fe({...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=``)}oe(()=>{X.value&&URL.revokeObjectURL(X.value)});function qe(e){F.value={id:e,name:e,description:e,previewURL:e,languages:[{code:`en`,title:`English`}],provider:N.value,gender:`male`}}function Je(e){P.value=e}return(c,g)=>{let _=ce(`motion`);return v(),p(l,null,[u(`div`,he,[u(`div`,ge,[u(`div`,null,[u(`div`,_e,[u(`div`,null,[u(`h2`,ve,w(C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),u(`div`,ye,[u(`span`,null,w(C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),u(`div`,be,[C(M).length>0?(v(),p(`fieldset`,xe,[(v(!0),p(l,null,se(C(M),e=>(v(),d(C(te),{id:e.id,key:e.id,modelValue:C(N),"onUpdate:modelValue":g[0]||=e=>x(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))])):(v(),p(`div`,Se,[h(C(re),{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:y(()=>g[13]||=[u(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),u(`div`,{class:`flex flex-col`},[u(`span`,{class:`font-medium`},`No Speech Providers Configured`),u(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech providers`)],-1),u(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[13]})]))])]),u(`div`,null,[C(N)&&C(Ge)?(v(),p(`div`,Ce,[u(`div`,we,[u(`div`,null,[u(`h2`,Te,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),u(`div`,E,[u(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),C(z)?(v(),p(`div`,D,[g[14]||=u(`div`,{class:`mr-2 animate-spin`},[u(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),u(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):C(B)?(v(),d(C(o),{key:1,title:C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:C(B)},null,8,[`title`,`error`])):C(R).length===0&&!C(z)?(v(),d(C(s),{key:2,type:`warning`},{title:y(()=>[m(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:y(()=>[m(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):C(R).length>0?(v(),d(C(ne),{key:3,modelValue:C(P),"onUpdate:modelValue":g[1]||=e=>x(P)?P.value=e:null,"search-query":C(V),"onUpdate:searchQuery":g[2]||=e=>x(V)?V.value=e:null,items:C(R),searchable:!0,"search-placeholder":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:C(V)}),"search-results-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":Je},null,8,[`modelValue`,`search-query`,`items`,`search-placeholder`,`search-no-results-title`,`search-no-results-description`,`search-results-text`,`custom-input-placeholder`,`expand-button-text`,`collapse-button-text`])):f(``,!0)])])):f(``,!0)])]),C(N)?(v(),p(`div`,O,[u(`div`,Ee,[g[24]||=u(`div`,null,[u(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),u(`div`,{text:`neutral-400 dark:neutral-500`},[u(`span`,null,`Customize how your AI assistant speaks`)])],-1),C(We)?(v(),p(`div`,De,[u(`div`,Oe,[h(C(a),{class:`w-full rounded-lg p-2.5 text-sm`},{default:y(()=>g[15]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[15]}),u(`div`,ke,[h(C(a),{class:`w-full rounded-lg p-4 text-sm`},{default:y(()=>g[16]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[16]}),h(C(a),{class:`w-full rounded-lg p-4 text-sm`},{default:y(()=>g[17]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),h(C(a),{class:`w-full rounded-lg p-4 text-sm`},{default:y(()=>g[18]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]})]),h(C(a),{class:`w-full rounded-lg p-3 text-sm`},{default:y(()=>g[19]||=[u(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]})])])):C(W)[C(N)]&&C(W)[C(N)].length>0?(v(),p(`div`,Ae,[h(C(ee),{"search-query":G.value,"onUpdate:searchQuery":g[3]||=e=>G.value=e,"voice-id":C(I),"onUpdate:voiceId":g[4]||=e=>x(I)?I.value=e:null,voices:C(W)[C(N)]?.map(e=>({id:e.id,name:e.name,description:e.description,previewURL:e.previewURL,customizable:!1})),searchable:!0,"search-placeholder":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder`),"search-no-results-title":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices`),"search-no-results-description":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description`),"search-results-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results`,{count:0,total:0}),"custom-input-placeholder":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder`),"expand-button-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_more`),"collapse-button-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_less`),"play-button-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample`),"pause-button-text":C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.pause`),"onUpdate:customValue":qe},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`])])):C(H)?(v(),d(C(o),{key:2,class:`mb-2`,title:`Error loading voices`,error:C(H)},null,8,[`error`])):(v(),d(C(s),{key:3,type:`warning`,icon:`i-solar:info-circle-line-duotone`,class:`mb-2`},{title:y(()=>g[20]||=[m(` No voices available `,-1)]),content:y(()=>g[21]||=[m(` No voices were found for this provider. You can enter a custom voice name below. `,-1)]),_:1})),u(`div`,je,[h(C(n),{modelValue:C(L),"onUpdate:modelValue":g[5]||=e=>x(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`]),h(C(i),{modelValue:C(U),"onUpdate:modelValue":g[6]||=e=>x(U)?U.value=e:null,label:`Enable SSML`,description:`Enable Speech Synthesis Markup Language for more control over speech output`},null,8,[`modelValue`])]),!C(W)[C(N)]||C(W)[C(N)].length===0?(v(),p(`div`,Me,[h(C(r),{modelValue:C(I),"onUpdate:modelValue":g[7]||=e=>x(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`]),C(N)===`elevenlabs`?(v(),p(`div`,Ne,[g[23]||=u(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),b(u(`select`,{"onUpdate:modelValue":g[8]||=e=>x(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`},g[22]||=[u(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),u(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),u(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[ie,C(P)]])])):f(``,!0),u(`div`,Pe,[h(C(n),{modelValue:C(L),"onUpdate:modelValue":g[9]||=e=>x(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`])])])):f(``,!0)])])):f(``,!0)]),u(`div`,Fe,[u(`div`,Ie,[u(`h2`,Le,[u(`div`,Re,[h(C(t)),u(`div`,null,w(C(T)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),u(`div`,ze,[h(C(i),{modelValue:K.value,"onUpdate:modelValue":g[10]||=e=>K.value=e,label:`Use Custom SSML`,description:`Enable to input raw SSML instead of plain text`},null,8,[`modelValue`]),K.value?b((v(),p(`textarea`,{key:1,"onUpdate:modelValue":g[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)),[[ae,J.value]]):(v(),d(C(e),{key:0,modelValue:q.value,"onUpdate:modelValue":g[11]||=e=>q.value=e,"h-24":``,"w-full":``,placeholder:C(T)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`)},null,8,[`modelValue`,`placeholder`])),u(`div`,Be,[u(`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()||!C(F),class:ue({"opacity-50 cursor-not-allowed":Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!C(F)}),bg:`neutral-700 dark:neutral-300`,onClick:Ke},[u(`div`,He,[g[25]||=u(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),u(`span`,null,w(Y.value?C(T)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):C(T)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,Ve),X.value?(v(),p(`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:$},g[26]||=[u(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[u(`div`,{"i-solar:stop-circle-bold-duotone":``}),u(`span`,null,`Stop`)],-1)])):f(``,!0)]),X.value?(v(),p(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,Ue)):f(``,!0)])])])]),b((v(),p(`div`,k,g[27]||=[u(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[_]])],64)}}});typeof T==`function`&&T(A);var j=A;export{j as default}; \ No newline at end of file diff --git a/assets/stage-CaqiKODx.js b/assets/stage-D8eUtIds.js similarity index 79% rename from assets/stage-CaqiKODx.js rename to assets/stage-D8eUtIds.js index e3fb85b7ba8e80f2e89344285eeac6853d4c4779..7acc75796052e8e27878f1cd9e4f54fc4e2cbee7 100644 --- a/assets/stage-CaqiKODx.js +++ b/assets/stage-D8eUtIds.js @@ -1 +1 @@ -import"./Basic-6NscZoIc.js";import{b as e,d as t}from"./theme-color-DipcFg9a.js";import{d7 as n,d8 as r,d9 as i,dT as a,dU as o,dV as s,dY as c,dZ as l,db as u,dg as d,e3 as f,e5 as p,ec as m,ed as h,eg as g,ek as _,q as v}from"./index-BqrqTEsQ.js";import"./HeaderLink-D6jJjgut.js";import{b as y}from"./route-block-gWR0cCIm.js";import{b}from"./Scenes-2Kp3NQ_V.js";import{b as x,c as S,d as C,e as w,f as T,g as E}from"./AnimatedWave-CPwzka9L.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";const D={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},O={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``},k={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 R(),{immediate:!0}),f(()=>R()),(e,t)=>(p(),o(E,null,{default:h(()=>[c(x,{class:`widgets top-widgets`,"fill-color":_(y)?`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:h(()=>[a(`div`,D,[a(`div`,O,[c(T,{class:`hidden md:flex`}),c(C,{class:`flex md:hidden`})]),a(`div`,k,[c(_(b),{"flex-1":``,"min-w":`1/2`,paused:A.value,"focus-at":{x:_(M).x.value,y:_(M).y.value},"x-offset":`${_(L)?_(P).x:_(P).x-10}%`,"y-offset":_(F).y,scale:_(N)},null,8,[`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`]),_(L)?s(``,!0):(p(),o(w,{key:0,h:`85dvh`,absolute:``,"right-4":``,flex:``,"flex-1":``,"flex-col":``,"max-w":`500px`,"min-w":`30%`})),_(L)?(p(),o(S,{key:1,onSettingsOpen:j})):s(``,!0)])])]),_:1},8,[`fill-color`])]),_:1}))}});typeof y==`function`&&y(A);var j=A;export{j as default}; \ No newline at end of file +import"./Basic-JYGX2D37.js";import{b as e,d as t}from"./theme-color-mhr1g0fO.js";import{d7 as n,d8 as r,d9 as i,dT as a,dU as o,dV as s,dY as c,dZ as l,db as u,dg as d,e3 as f,e5 as p,ec as m,ed as h,eg as g,ek as _,q as v}from"./index-D1IGsMK6.js";import"./HeaderLink-CSWG6G--.js";import{b as y}from"./route-block-gWR0cCIm.js";import{b}from"./Scenes-ZY5GY3Yk.js";import{b as x,c as S,d as C,e as w,f as T,g as E}from"./AnimatedWave-Ctq8iFvb.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";const D={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},O={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``},k={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 R(),{immediate:!0}),f(()=>R()),(e,t)=>(p(),o(E,null,{default:h(()=>[c(x,{class:`widgets top-widgets`,"fill-color":_(y)?`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:h(()=>[a(`div`,D,[a(`div`,O,[c(T,{class:`hidden md:flex`}),c(C,{class:`flex md:hidden`})]),a(`div`,k,[c(_(b),{"flex-1":``,"min-w":`1/2`,paused:A.value,"focus-at":{x:_(M).x.value,y:_(M).y.value},"x-offset":`${_(L)?_(P).x:_(P).x-10}%`,"y-offset":_(F).y,scale:_(N)},null,8,[`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`]),_(L)?s(``,!0):(p(),o(w,{key:0,h:`85dvh`,absolute:``,"right-4":``,flex:``,"flex-1":``,"flex-col":``,"max-w":`500px`,"min-w":`30%`})),_(L)?(p(),o(S,{key:1,onSettingsOpen:j})):s(``,!0)])])]),_:1},8,[`fill-color`])]),_:1}))}});typeof y==`function`&&y(A);var j=A;export{j as default}; \ No newline at end of file diff --git a/assets/stage-BC0FtFQ5.js b/assets/stage-FQGYvFsu.js similarity index 74% rename from assets/stage-BC0FtFQ5.js rename to assets/stage-FQGYvFsu.js index d922b65886c2e17d7143d6cc7c099091ba39081e..71a7d1260f415a4bfa538585c6035556e4a80e56 100644 --- a/assets/stage-BC0FtFQ5.js +++ b/assets/stage-FQGYvFsu.js @@ -1 +1 @@ -import{d3 as e,dW as t,dY as n,dZ as r,e5 as i,ek as a}from"./index-BqrqTEsQ.js";const o={text:`gray-700 dark:gray-200`,"h-full":``,"font-cute":``};var s=r({__name:`stage`,setup(r){return(r,s)=>(i(),t(`main`,o,[n(a(e))]))}}),c=s;export{c as default}; \ No newline at end of file +import{d3 as e,dW as t,dY as n,dZ as r,e5 as i,ek as a}from"./index-D1IGsMK6.js";const o={text:`gray-700 dark:gray-200`,"h-full":``,"font-cute":``};var s=r({__name:`stage`,setup(r){return(r,s)=>(i(),t(`main`,o,[n(a(e))]))}}),c=s;export{c as default}; \ No newline at end of file diff --git a/assets/sury-s6Akl-oc-SKuB4Eh8.js b/assets/sury-s6Akl-oc-BocPOnya.js similarity index 71% rename from assets/sury-s6Akl-oc-SKuB4Eh8.js rename to assets/sury-s6Akl-oc-BocPOnya.js index 05e8b57385ccaf52b4956d15dae8695e3d685015..76883af1495f1c63be305cd849e5e22df1c59ffe 100644 --- a/assets/sury-s6Akl-oc-SKuB4Eh8.js +++ b/assets/sury-s6Akl-oc-BocPOnya.js @@ -1 +1 @@ -import{bQ as e,d6 as t}from"./index-BqrqTEsQ.js";const n=async()=>{let{toJSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_sury_xsschema-NEutZrhx.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{bQ as e,d6 as t}from"./index-D1IGsMK6.js";const n=async()=>{let{toJSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_sury_xsschema-NEutZrhx.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/theme-color-DipcFg9a.js b/assets/theme-color-mhr1g0fO.js similarity index 99% rename from assets/theme-color-DipcFg9a.js rename to assets/theme-color-mhr1g0fO.js index c497bd71a42fd0084c01796837b2f35a6e119b51..8bb7408e4573190ead253e6d5d2b38b7ea5d7c64 100644 --- a/assets/theme-color-DipcFg9a.js +++ b/assets/theme-color-mhr1g0fO.js @@ -1 +1 @@ -import{c9 as e,ca as t,db as n}from"./index-BqrqTEsQ.js";const r=async e=>{let t=await e();for(;t instanceof Function;)t=await t();return t},i={retry:3,retryCount:0,retryDelay:500},a=(n,o)=>{let{onError:s,retry:c,retryCount:l,retryDelay:u}=t(i,o),d=async(...t)=>{try{return await n(...t)}catch(r){if(s?.(r),la(n,{onError:s,retry:c,retryCount:l+1,retryDelay:u})(...t);throw r}};return async(...e)=>r(async()=>d(...e))};function o(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>{let n=0;if(!Array.isArray(e)){for(let r of t)n+=e*r;return n}for(let r=0;re[0]):a}function s(e){return c(e)===`string`}function c(e){let t=Object.prototype.toString.call(e);return(t.match(/^\[object\s+(.*?)\]$/)[1]||``).toLowerCase()}function l(e,{precision:t,unit:n}){return u(e)?`none`:f(e,t)+(n??``)}function u(e){return Number.isNaN(e)||e instanceof Number&&e?.none}function d(e){return u(e)?0:e}function f(e,t){if(e===0)return 0;let n=~~e,r=0;n&&t&&(r=~~Math.log10(Math.abs(n))+1);let i=10**(t-r);return Math.floor(e*i+.5)/i}const p={deg:1,grad:.9,rad:180/Math.PI,turn:360};function m(e){if(!e)return;e=e.trim();let t=/^([a-z]+)\((.+?)\)$/i,n=/^-?[\d.]+$/,r=/%|deg|g?rad|turn$/,i=/\/?\s*(none|[-\w.]+(?:%|deg|g?rad|turn)?)/g,a=e.match(t);if(a){let e=[];return a[2].replace(i,(t,i)=>{let a=i.match(r),o=i;if(a){let e=a[0],t=o.slice(0,-e.length);e===`%`?(o=new Number(t/100),o.type=``):(o=new Number(t*p[e]),o.type=``,o.unit=e)}else n.test(o)?(o=new Number(o),o.type=``):o===`none`&&(o=new Number(NaN),o.none=!0);t.startsWith(`/`)&&(o=o instanceof Number?o:new Number(o),o.alpha=!0),typeof o==`object`&&o instanceof Number&&(o.raw=i),e.push(o)}),{name:a[1].toLowerCase(),rawName:a[1],rawArgs:a[2],args:e}}}function h(e){return e[e.length-1]}function g(e,t,n){return isNaN(e)?t:isNaN(t)?e:e+(t-e)*n}function _(e,t,n){return(n-e)/(t-e)}function v(e,t,n){return g(t[0],t[1],_(e[0],e[1],n))}function y(e){return e.map(e=>e.split(`|`).map(e=>{e=e.trim();let t=e.match(/^(<[a-z]+>)\[(-?[.\d]+),\s*(-?[.\d]+)\]?$/);if(t){let e=new String(t[1]);return e.range=[+t[2],+t[3]],e}return e}))}function b(e,t,n){return Math.max(Math.min(n,t),e)}function x(e,t){return Math.sign(e)===Math.sign(t)?e:-e}function S(e,t){return x(Math.abs(e)**t,e)}function C(e,t){return t===0?0:e/t}function w(e,t,n=0,r=e.length){for(;n>1;e[i]`,``,``]);function A(e,t,n,r){let i=Object.entries(e.coords).map(([e,i],a)=>{let o=t.coordGrammar[a],s=r[a],c=s?.type,l;if(l=s.none?o.find(e=>ne.has(e)):o.find(e=>e==c),!l){let t=i.name||e;throw TypeError(`${c??s.raw} not allowed for ${t} in ${n}()`)}let u=l.range;c===``&&(u||=[0,1]);let d=i.range||i.refRange;return u&&d&&(r[a]=v(u,d,r[a])),l});return i}function re(e,{meta:t}={}){let n={str:String(e)?.trim()};if(E.run(`parse-start`,n),n.color)return n.color;if(n.parsed=m(n.str),n.parsed){let e=n.parsed.name;if(e===`color`){let e=n.parsed.args.shift(),r=e.startsWith(`--`)?e.substring(2):`--${e}`,i=[e,r],a=n.parsed.rawArgs.indexOf(`/`)>0?n.parsed.args.pop():1;for(let r of M.all){let o=r.getFormat(`color`);if(o&&(i.includes(o.id)||o.ids?.filter(e=>i.includes(e)).length)){let i=Object.keys(r.coords).map((e,t)=>n.parsed.args[t]||0),s;return o.coordGrammar&&(s=A(r,o,`color`,i)),t&&Object.assign(t,{formatId:`color`,types:s}),o.id.startsWith(`--`)&&!e.startsWith(`--`)&&D.warn(`${r.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${o.id}) instead of color(${e}).`),e.startsWith(`--`)&&!o.id.startsWith(`--`)&&D.warn(`${r.name} is a standard space and supported in the CSS spec. Use color(${o.id}) instead of prefixed color(${e}).`),{spaceId:r.id,coords:i,alpha:a}}}let o=``,s=e in M.registry?e:r;if(s in M.registry){let e=M.registry[s].formats?.color?.id;e&&(o=`Did you mean color(${e})?`)}throw TypeError(`Cannot parse color(${e}). `+(o||`Missing a plugin?`))}else for(let r of M.all){let i=r.getFormat(e);if(i&&i.type===`function`){let a=1;(i.lastAlpha||h(n.parsed.args).alpha)&&(a=n.parsed.args.pop());let o=n.parsed.args,s;return i.coordGrammar&&(s=A(r,i,e,o)),t&&Object.assign(t,{formatId:i.name,types:s}),{spaceId:r.id,coords:o,alpha:a}}}}else for(let e of M.all)for(let r in e.formats){let i=e.formats[r];if(i.type!==`custom`||i.test&&!i.test(n.str))continue;let a=i.parse(n.str);if(a)return a.alpha??=1,t&&(t.formatId=r),a}throw TypeError(`Could not parse ${e} as a color. Missing a plugin?`)}function j(e){if(Array.isArray(e))return e.map(j);if(!e)throw TypeError(`Empty color reference`);s(e)&&(e=re(e));let t=e.space||e.spaceId;return t instanceof M||(e.space=M.get(t)),e.alpha===void 0&&(e.alpha=1),e}const ie=75e-6;var M=class e{constructor(t){this.id=t.id,this.name=t.name,this.base=t.base?e.get(t.base):null,this.aliases=t.aliases,this.base&&(this.fromBase=t.fromBase,this.toBase=t.toBase);let n=t.coords??this.base.coords;for(let e in n)`name`in n[e]||(n[e].name=e);this.coords=n;let r=t.white??this.base.white??`D65`;for(let e in this.white=te(r),this.formats=t.formats??{},this.formats){let t=this.formats[e];t.type||=`function`,t.name||=e}this.formats.color?.id||(this.formats.color={...this.formats.color??{},id:t.cssId||this.id}),t.gamutSpace?this.gamutSpace=t.gamutSpace===`self`?this:e.get(t.gamutSpace):this.isPolar?this.gamutSpace=this.base:this.gamutSpace=this,this.gamutSpace.isUnbounded&&(this.inGamut=(e,t)=>!0),this.referred=t.referred,Object.defineProperty(this,`path`,{value:N(this).reverse(),writable:!1,enumerable:!0,configurable:!0}),E.run(`colorspace-init-end`,this)}inGamut(e,{epsilon:t=ie}={}){if(!this.equals(this.gamutSpace))return e=this.to(this.gamutSpace,e),this.gamutSpace.inGamut(e,{epsilon:t});let n=Object.values(this.coords);return e.every((e,r)=>{let i=n[r];if(i.type!==`angle`&&i.range){if(Number.isNaN(e))return!0;let[n,r]=i.range;return(n===void 0||e>=n-t)&&(r===void 0||e<=r+t)}return!0})}get isUnbounded(){return Object.values(this.coords).every(e=>!(`range`in e))}get cssId(){return this.formats?.color?.id||this.id}get isPolar(){for(let e in this.coords)if(this.coords[e].type===`angle`)return!0;return!1}getFormat(e){if(typeof e==`object`)return e=ae(e,this),e;let t;return t=e===`default`?Object.values(this.formats)[0]:this.formats[e],t?(t=ae(t,this),t):null}equals(e){return e?this===e||this.id===e||this.id===e.id:!1}to(t,n){if(arguments.length===1){let e=j(t);[t,n]=[e.space,e.coords]}if(t=e.get(t),this.equals(t))return n;n=n.map(e=>Number.isNaN(e)?0:e);let r=this.path,i=t.path,a,o;for(let e=0;eo;e--)n=r[e].toBase(n);for(let e=o+1;e=0){let e=Object.entries(i.coords)[a];if(e)return{space:i,id:e[0],index:a,...e[1]}}i=e.get(i);let o=a.toLowerCase(),s=0;for(let e in i.coords){let t=i.coords[e];if(e.toLowerCase()===o||t.name?.toLowerCase()===o)return{space:i,id:e,index:s,...t};s++}throw TypeError(`No "${a}" coordinate found in ${i.name}. Its coordinates are: ${Object.keys(i.coords).join(`, `)}`)}static DEFAULT_FORMAT={type:`functions`,name:`color`}};function N(e){let t=[e];for(let n=e;n=n.base;)t.push(n);return t}function ae(e,{coords:t}={}){if(e.coords&&!e.coordGrammar){e.type||=`function`,e.name||=`color`,e.coordGrammar=y(e.coords);let n=Object.entries(t).map(([t,n],r)=>{let i=e.coordGrammar[r][0],a=n.range||n.refRange,o=i.range,s=``;return i==``?(o=[0,100],s=`%`):i==``&&(s=`deg`),{fromRange:a,toRange:o,suffix:s}});e.serializeCoords=(e,t)=>e.map((e,r)=>{let{fromRange:i,toRange:a,suffix:o}=n[r];return i&&a&&(e=v(i,a,e)),e=l(e,{precision:t,unit:o}),e})}return e}var P=new M({id:`xyz-d65`,name:`XYZ D65`,coords:{x:{name:`X`},y:{name:`Y`},z:{name:`Z`}},white:`D65`,formats:{color:{ids:[`xyz-d65`,`xyz`]}},aliases:[`xyz`]}),F=class extends M{constructor(e){e.coords||={r:{range:[0,1],name:`Red`},g:{range:[0,1],name:`Green`},b:{range:[0,1],name:`Blue`}},e.base||=P,e.toXYZ_M&&e.fromXYZ_M&&(e.toBase??=t=>{let n=o(e.toXYZ_M,t);return this.white!==this.base.white&&(n=k(this.white,this.base.white,n)),n},e.fromBase??=t=>(t=k(this.base.white,this.white,t),o(e.fromXYZ_M,t))),e.referred??=`display`,super(e)}};function I(e,t){return e=j(e),!t||e.space.equals(t)?e.coords.slice():(t=M.get(t),t.from(e))}function L(e,t){e=j(e);let{space:n,index:r}=M.resolveCoord(t,e.space),i=I(e,n);return i[r]}function oe(e,t,n){return e=j(e),t=M.get(t),e.coords=t.to(e.space,n),e}oe.returns=`color`;function R(e,t,n){if(e=j(e),arguments.length===2&&c(arguments[1])===`object`){let t=arguments[1];for(let n in t)R(e,n,t[n])}else{typeof n==`function`&&(n=n(L(e,t)));let{space:r,index:i}=M.resolveCoord(t,e.space),a=I(e,r);a[i]=n,oe(e,r,a)}return e}R.returns=`color`;var se=new M({id:`xyz-d50`,name:`XYZ D50`,white:`D50`,base:P,fromBase:e=>k(P.white,`D50`,e),toBase:e=>k(`D50`,P.white,e)});const ce=216/24389,le=24/116,ue=24389/27;let de=O.D50;var z=new M({id:`lab`,name:`Lab`,coords:{l:{refRange:[0,100],name:`Lightness`},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:de,base:se,fromBase(e){let t=e.map((e,t)=>e/de[t]),n=t.map(e=>e>ce?Math.cbrt(e):(ue*e+16)/116);return[116*n[1]-16,500*(n[0]-n[1]),200*(n[1]-n[2])]},toBase(e){let t=[];t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200;let n=[t[0]>le?t[0]**3:(116*t[0]-16)/ue,e[0]>8?((e[0]+16)/116)**3:e[0]/ue,t[2]>le?t[2]**3:(116*t[2]-16)/ue];return n.map((e,t)=>e*de[t])},formats:{lab:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});function B(e){return(e%360+360)%360}function fe(e,t){if(e===`raw`)return t;let[n,r]=t.map(B),i=r-n;return e===`increasing`?i<0&&(r+=360):e===`decreasing`?i>0&&(n+=360):e===`longer`?-1800?n+=360:r+=360):e===`shorter`&&(i>180?n+=360:i<-180&&(r+=360)),[n,r]}var pe=new M({id:`lch`,name:`LCH`,coords:{l:{refRange:[0,100],name:`Lightness`},c:{refRange:[0,150],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:z,fromBase(e){let[t,n,r]=e,i,a=.02;return i=Math.abs(n) | `,` | `,` | `]}}});const me=25**7,he=Math.PI,ge=180/he,V=he/180;function _e(e){let t=e*e,n=t*t*t*e;return n}function ve(e,t,{kL:n=1,kC:r=1,kH:i=1}={}){[e,t]=j([e,t]);let[a,o,s]=z.from(e),c=pe.from(z,[a,o,s])[1],[l,u,d]=z.from(t),f=pe.from(z,[l,u,d])[1];c<0&&(c=0),f<0&&(f=0);let p=(c+f)/2,m=_e(p),h=.5*(1-Math.sqrt(m/(m+me))),g=(1+h)*o,_=(1+h)*u,v=Math.sqrt(g**2+s**2),y=Math.sqrt(_**2+d**2),b=g===0&&s===0?0:Math.atan2(s,g),x=_===0&&d===0?0:Math.atan2(d,_);b<0&&(b+=2*he),x<0&&(x+=2*he),b*=ge,x*=ge;let S=l-a,C=y-v,w=x-b,T=b+x,ee=Math.abs(w),E;v*y===0?E=0:ee<=180?E=w:w>180?E=w-360:w<-180?E=w+360:D.warn(`the unthinkable has happened`);let O=2*Math.sqrt(y*v)*Math.sin(E*V/2),te=(a+l)/2,k=(v+y)/2,ne=_e(k),A;A=v*y===0?T:ee<=180?T/2:T<360?(T+360)/2:(T-360)/2;let re=(te-50)**2,ie=1+.015*re/Math.sqrt(20+re),M=1+.045*k,N=1;N-=.17*Math.cos((A-30)*V),N+=.24*Math.cos(2*A*V),N+=.32*Math.cos((3*A+6)*V),N-=.2*Math.cos((4*A-63)*V);let ae=1+.015*k*N,P=30*Math.exp(-1*((A-275)/25)**2),F=2*Math.sqrt(ne/(ne+me)),I=-1*Math.sin(2*P*V)*F,L=(S/(n*ie))**2;return L+=(C/(r*M))**2,L+=(O/(i*ae))**2,L+=I*(C/(r*M))*(O/(i*ae)),Math.sqrt(L)}const ye=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],be=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],xe=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],Se=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]];var H=new M({id:`oklab`,name:`Oklab`,coords:{l:{refRange:[0,1],name:`Lightness`},a:{refRange:[-.4,.4]},b:{refRange:[-.4,.4]}},white:`D65`,base:P,fromBase(e){let t=o(ye,e),n=t.map(e=>Math.cbrt(e));return o(xe,n)},toBase(e){let t=o(Se,e),n=t.map(e=>e**3);return o(be,n)},formats:{oklab:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});function Ce(e,t){[e,t]=j([e,t]);let[n,r,i]=H.from(e),[a,o,s]=H.from(t),c=n-a,l=r-o,u=i-s;return Math.sqrt(c**2+l**2+u**2)}const we=75e-6;function U(e,t,{epsilon:n=we}={}){e=j(e),!t&&(t=e.space),t=M.get(t);let r=e.coords;return t!==e.space&&(r=t.from(e)),t.inGamut(r,{epsilon:n})}function W(e){return{space:e.space,coords:e.coords.slice(),alpha:e.alpha}}function Te(e,t,n=`lab`){n=M.get(n);let r=n.from(e),i=n.from(t);return Math.sqrt(r.reduce((e,t,n)=>{let r=i[n];return isNaN(t)||isNaN(r)?e:e+(r-t)**2},0))}function Ee(e,t){return Te(e,t,`lab`)}const De=Math.PI,Oe=De/180;function ke(e,t,{l:n=2,c:r=1}={}){[e,t]=j([e,t]);let[i,a,o]=z.from(e),[,s,c]=pe.from(z,[i,a,o]),[l,u,d]=z.from(t),f=pe.from(z,[l,u,d])[1];s<0&&(s=0),f<0&&(f=0);let p=i-l,m=s-f,h=a-u,g=o-d,_=h**2+g**2-m**2,v=.511;i>=16&&(v=.040975*i/(1+.01765*i));let y=.0638*s/(1+.0131*s)+.638,b;Number.isNaN(c)&&(c=0),b=c>=164&&c<=345?.56+Math.abs(.2*Math.cos((c+168)*Oe)):.36+Math.abs(.4*Math.cos((c+35)*Oe));let x=s**4,S=Math.sqrt(x/(x+1900)),C=y*(S*b+1-S),w=(p/(n*v))**2;return w+=(m/(r*y))**2,w+=_/C**2,Math.sqrt(w)}const Ae=203;var je=new M({id:`xyz-abs-d65`,cssId:`--xyz-abs-d65`,name:`Absolute XYZ D65`,coords:{x:{refRange:[0,9504.7],name:`Xa`},y:{refRange:[0,1e4],name:`Ya`},z:{refRange:[0,10888.3],name:`Za`}},base:P,fromBase(e){return e.map(e=>Math.max(e*Ae,0))},toBase(e){return e.map(e=>Math.max(e/Ae,0))}});const Me=1.15,Ne=.66,Pe=2610/2**14,Fe=2**14/2610,Ie=3424/2**12,Le=2413/2**7,Re=2392/2**7,ze=1.7*2523/2**5,Be=2**5/(1.7*2523),Ve=-.56,He=16295499532821565e-27,Ue=[[.41478972,.579999,.014648],[-.20151,1.120649,.0531008],[-.0166008,.2648,.6684799]],We=[[1.9242264357876067,-1.0047923125953657,.037651404030618],[.35031676209499907,.7264811939316552,-.06538442294808501],[-.09098281098284752,-.3127282905230739,1.5227665613052603]],Ge=[[.5,.5,0],[3.524,-4.066708,.542708],[.199076,1.096799,-1.295875]],Ke=[[1,.1386050432715393,.05804731615611886],[.9999999999999999,-.1386050432715393,-.05804731615611886],[.9999999999999998,-.09601924202631895,-.8118918960560388]];var qe=new M({id:`jzazbz`,name:`Jzazbz`,coords:{jz:{refRange:[0,1],name:`Jz`},az:{refRange:[-.5,.5]},bz:{refRange:[-.5,.5]}},base:je,fromBase(e){let[t,n,r]=e,i=Me*t-(Me-1)*r,a=Ne*n-(Ne-1)*t,s=o(Ue,[i,a,r]),c=s.map(function(e){let t=Ie+Le*(e/1e4)**Pe,n=1+Re*(e/1e4)**Pe;return(t/n)**ze}),[l,u,d]=o(Ge,c),f=(1+Ve)*l/(1+Ve*l)-He;return[f,u,d]},toBase(e){let[t,n,r]=e,i=(t+He)/(1+Ve-Ve*(t+He)),a=o(Ke,[i,n,r]),s=a.map(function(e){let t=Ie-e**Be,n=Re*e**Be-Le,r=1e4*(t/n)**Fe;return r}),[c,l,u]=o(We,s),d=(c+(Me-1)*u)/Me,f=(l+(Ne-1)*d)/Ne;return[d,f,u]},formats:{color:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}}),Je=new M({id:`jzczhz`,name:`JzCzHz`,coords:{jz:{refRange:[0,1],name:`Jz`},cz:{refRange:[0,1],name:`Chroma`},hz:{refRange:[0,360],type:`angle`,name:`Hue`}},base:qe,fromBase(e){let[t,n,r]=e,i,a=2e-4;return i=Math.abs(n){let n=S(t*Math.abs(e)*.01,ft);return 400*x(n,e)/(n+27.13)});return n}function St(e,t){let n=100/t*27.13**pt;return e.map(e=>{let t=Math.abs(e);return x(n*S(t/(400-t),pt),e)})}function Ct(e){let t=B(e);t<=G.h[0]&&(t+=360);let n=w(G.h,t)-1,[r,i]=G.h.slice(n,n+2),[a,o]=G.e.slice(n,n+2),s=G.H[n],c=(t-r)/a;return s+100*c/(c+(i-t)/o)}function wt(e){let t=(e%400+400)%400,n=Math.floor(.01*t);t%=100;let[r,i]=G.h.slice(n,n+2),[a,o]=G.e.slice(n,n+2);return B((t*(o*r-a*i)-100*r*o)/(t*(o-a)-100*o))}function Tt(e,t,n,r,i){let a={};a.discounting=i,a.refWhite=e,a.surround=r;let s=e.map(e=>e*100);a.la=t,a.yb=n;let c=s[1],l=o(ht,s);r=vt[a.surround];let u=r[0];a.c=r[1],a.nc=r[2];let d=1/(5*a.la+1),f=d**4;a.fl=f*a.la+.1*(1-f)*(1-f)*Math.cbrt(5*a.la),a.flRoot=a.fl**.25,a.n=a.yb/c,a.z=1.48+Math.sqrt(a.n),a.nbb=.725*a.n**-.2,a.ncb=a.nbb;let p=i?1:Math.max(Math.min(u*(1-1/3.6*Math.exp((-a.la-42)/92)),1),0);a.dRgb=l.map(e=>g(1,c/e,p)),a.dRgbInv=a.dRgb.map(e=>1/e);let m=l.map((e,t)=>e*a.dRgb[t]),h=xt(m,a.fl);return a.aW=a.nbb*(2*h[0]+h[1]+.05*h[2]),a}const Et=Tt(dt,64/Math.PI*.2,20,`average`,!1);function Dt(e,t){if(!(e.J!==void 0^e.Q!==void 0))throw Error(`Conversion requires one and only one: 'J' or 'Q'`);if(!(e.C!==void 0^e.M!==void 0^e.s!==void 0))throw Error(`Conversion requires one and only one: 'C', 'M' or 's'`);if(!(e.h!==void 0^e.H!==void 0))throw Error(`Conversion requires one and only one: 'h' or 'H'`);if(e.J===0||e.Q===0)return[0,0,0];let n=0;n=e.h===void 0?wt(e.H)*bt:B(e.h)*bt;let r=Math.cos(n),i=Math.sin(n),a=0;e.J===void 0?e.Q!==void 0&&(a=.25*t.c*e.Q/((t.aW+4)*t.flRoot)):a=S(e.J,1/2)*.1;let s=0;e.C===void 0?e.M===void 0?e.s!==void 0&&(s=4e-4*e.s**2*(t.aW+4)/t.c):s=e.M/t.flRoot/a:s=e.C/a;let c=S(s*(1.64-.29**t.n)**-.73,10/9),l=.25*(Math.cos(n+2)+3.8),u=t.aW*S(a,2/t.c/t.z),d=5e4/13*t.nc*t.ncb*l,f=u/t.nbb,p=23*(f+.305)*C(c,23*d+c*(11*r+108*i)),m=p*r,h=p*i,g=St(o(_t,[f,m,h]).map(e=>e*1/1403),t.fl);return o(gt,g.map((e,n)=>e*t.dRgbInv[n])).map(e=>e/100)}function Ot(e,t){let n=e.map(e=>e*100),r=xt(o(ht,n).map((e,n)=>e*t.dRgb[n]),t.fl),i=r[0]+(-12*r[1]+r[2])/11,a=(r[0]+r[1]-2*r[2])/9,s=(Math.atan2(a,i)%mt+mt)%mt,c=.25*(Math.cos(s+2)+3.8),l=5e4/13*t.nc*t.ncb*C(c*Math.sqrt(i**2+a**2),r[0]+r[1]+1.05*r[2]+.305),u=S(l,.9)*(1.64-.29**t.n)**.73,d=t.nbb*(2*r[0]+r[1]+.05*r[2]),f=S(d/t.aW,.5*t.c*t.z),p=100*S(f,2),m=4/t.c*f*(t.aW+4)*t.flRoot,h=u*f,g=h*t.flRoot,_=B(s*yt),v=Ct(_),y=50*S(t.c*u/(t.aW+4),1/2);return{J:p,C:h,h:_,s:y,Q:m,M:g,H:v}}var kt=new M({id:`cam16-jmh`,cssId:`--cam16-jmh`,name:`CAM16-JMh`,coords:{j:{refRange:[0,100],name:`J`},m:{refRange:[0,105],name:`Colorfulness`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:P,fromBase(e){let t=Ot(e,Et);return[t.J,t.M,t.h]},toBase(e){return Dt({J:e[0],M:e[1],h:e[2]},Et)}});const At=O.D65,jt=216/24389,Mt=24389/27;function Nt(e){let t=e>jt?Math.cbrt(e):(Mt*e+16)/116;return 116*t-16}function Pt(e){return e>8?((e+16)/116)**3:e/Mt}function Ft(e,t){let[n,r,i]=e,a=[],o=0;if(i===0)return[0,0,0];let s=Pt(i);o=i>0?.00379058511492914*i**2+.608983189401032*i+.9155088574762233:9514440756550361e-21*i**2+.08693057439788597*i-21.928975842194614;let c=2e-12,l=15,u=0,d=1/0;for(;u<=l;){a=Dt({J:o,C:r,h:n},t);let e=Math.abs(a[1]-s);if(e | `,` | `,` | `]}}});const zt=Math.PI/180,Bt=[1,.007,.0228];function Vt(e){e[1]<0&&(e=Rt.fromBase(Rt.toBase(e)));let t=Math.log(Math.max(1+Bt[2]*e[1]*Lt.flRoot,1))/Bt[2],n=e[0]*zt,r=t*Math.cos(n),i=t*Math.sin(n);return[e[2],r,i]}function Ht(e,t){[e,t]=j([e,t]);let[n,r,i]=Vt(Rt.from(e)),[a,o,s]=Vt(Rt.from(t));return Math.sqrt((n-a)**2+(r-o)**2+(i-s)**2)}var K={deltaE76:Ee,deltaECMC:ke,deltaE2000:ve,deltaEJz:Ye,deltaEITP:ut,deltaEOK:Ce,deltaEHCT:Ht};function Ut(e){let t=e?Math.floor(Math.log10(Math.abs(e))):0;return Math.max(parseFloat(`1e${t-2}`),1e-6)}const Wt={hct:{method:`hct.c`,jnd:2,deltaEMethod:`hct`,blackWhiteClamp:{}},"hct-tonal":{method:`hct.c`,jnd:0,deltaEMethod:`hct`,blackWhiteClamp:{channel:`hct.t`,min:0,max:100}}};function q(e,{method:t=D.gamut_mapping,space:n=void 0,deltaEMethod:r=``,jnd:i=2,blackWhiteClamp:a={}}={}){if(e=j(e),s(arguments[1])?n=arguments[1]:n||=e.space,n=M.get(n),U(e,n,{epsilon:0}))return e;let o;if(t===`css`)o=Kt(e,{space:n});else{if(t!==`clip`&&!U(e,n)){Object.prototype.hasOwnProperty.call(Wt,t)&&({method:t,jnd:i,deltaEMethod:r,blackWhiteClamp:a}=Wt[t]);let s=ve;if(r!==``){for(let e in K)if(`deltae`+r.toLowerCase()===e.toLowerCase()){s=K[e];break}}let c=q(J(e,n),{method:`clip`,space:n});if(s(e,c)>i){if(Object.keys(a).length===3){let t=M.resolveCoord(a.channel),n=L(J(e,t.space),t.id);if(u(n)&&(n=0),n>=a.max)return J({space:`xyz-d65`,coords:O.D65},e.space);if(n<=a.min)return J({space:`xyz-d65`,coords:[0,0,0]},e.space)}let r=M.resolveCoord(t),c=r.space,l=r.id,d=J(e,c);d.coords.forEach((e,t)=>{u(e)&&(d.coords[t]=0)});let f=r.range||r.refRange,p=f[0],m=Ut(i),h=p,g=L(d,l);for(;g-h>m;){let e=W(d);e=q(e,{space:n,method:`clip`});let t=s(d,e);t-ie.range||[]);o.coords=o.coords.map((t,n)=>{let[r,i]=e[n];return r!==void 0&&(t=Math.max(r,t)),i!==void 0&&(t=Math.min(t,i)),t})}}return n!==e.space&&(o=J(o,e.space)),e.coords=o.coords,e}q.returns=`color`;const Gt={WHITE:{space:H,coords:[1,0,0]},BLACK:{space:H,coords:[0,0,0]}};function Kt(e,{space:t}={}){let n=.02,r=1e-4;e=j(e),!t&&(t=e.space),t=M.get(t);let i=M.get(`oklch`);if(t.isUnbounded)return J(e,t);let a=J(e,i),o=a.coords[0];if(o>=1){let n=J(Gt.WHITE,t);return n.alpha=e.alpha,J(n,t)}if(o<=0){let n=J(Gt.BLACK,t);return n.alpha=e.alpha,J(n,t)}if(U(a,t,{epsilon:0}))return J(a,t);function s(e){let n=J(e,t),r=Object.values(t.coords);return n.coords=n.coords.map((e,t)=>{if(`range`in r[t]){let[n,i]=r[t].range;return b(n,e,i)}return e}),n}let c=0,l=a.coords[1],u=!0,d=W(a),f=s(d),p=Ce(f,d);if(pr;){let e=(c+l)/2;if(d.coords[1]=e,u&&U(d,t,{epsilon:0}))c=e;else if(f=s(d),p=Ce(f,d),pl(e,{precision:t})));let i=[...s];if(r===`color`){let t=n.id||n.ids?.[0]||e.space.id;i.unshift(t)}let o=e.alpha;t!==null&&(o=l(o,{precision:t}));let c=e.alpha>=1||n.noAlpha?``:`${n.commas?`,`:` /`} ${o}`;a=`${r}(${i.join(n.commas?`, `:` `)}${c})`}return a}const Jt=[[.6369580483012914,.14461690358620832,.1688809751641721],[.2627002120112671,.6779980715188708,.05930171646986196],[0,.028072693049087428,1.060985057710791]],Yt=[[1.716651187971268,-.355670783776392,-.25336628137366],[-.666684351832489,1.616481236634939,.0157685458139111],[.017639857445311,-.042770613257809,.942103121235474]];var Xt=new F({id:`rec2020-linear`,cssId:`--rec2020-linear`,name:`Linear REC.2020`,white:`D65`,toXYZ_M:Jt,fromXYZ_M:Yt});const Zt=1.09929682680944,Qt=.018053968510807;var $t=new F({id:`rec2020`,name:`REC.2020`,base:Xt,toBase(e){return e.map(function(e){return e=Qt?Zt*e**.45-(Zt-1):4.5*e})}});const en=[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]],tn=[[2.493496911941425,-.9313836179191239,-.40271078445071684],[-.8294889695615747,1.7626640603183463,.023624685841943577],[.03584583024378447,-.07617238926804182,.9568845240076872]];var nn=new F({id:`p3-linear`,cssId:`--display-p3-linear`,name:`Linear P3`,white:`D65`,toXYZ_M:en,fromXYZ_M:tn});const rn=[[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Y=[[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]];var an=new F({id:`srgb-linear`,name:`Linear sRGB`,white:`D65`,toXYZ_M:rn,fromXYZ_M:Y}),on={aliceblue:[240/255,248/255,1],antiquewhite:[250/255,235/255,215/255],aqua:[0,1,1],aquamarine:[127/255,1,212/255],azure:[240/255,1,1],beige:[245/255,245/255,220/255],bisque:[1,228/255,196/255],black:[0,0,0],blanchedalmond:[1,235/255,205/255],blue:[0,0,1],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,1,0],chocolate:[210/255,105/255,30/255],coral:[1,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[1,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0,1,1],darkblue:[0,0,139/255],darkcyan:[0,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0,100/255,0],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[1,140/255,0],darkorchid:[153/255,50/255,204/255],darkred:[139/255,0,0],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0,206/255,209/255],darkviolet:[148/255,0,211/255],deeppink:[1,20/255,147/255],deepskyblue:[0,191/255,1],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,1],firebrick:[178/255,34/255,34/255],floralwhite:[1,250/255,240/255],forestgreen:[34/255,139/255,34/255],fuchsia:[1,0,1],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,1],gold:[1,215/255,0],goldenrod:[218/255,165/255,32/255],gray:[128/255,128/255,128/255],green:[0,128/255,0],greenyellow:[173/255,1,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,1,240/255],hotpink:[1,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0,130/255],ivory:[1,1,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[1,240/255,245/255],lawngreen:[124/255,252/255,0],lemonchiffon:[1,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,1,1],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[1,182/255,193/255],lightsalmon:[1,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,153/255],lightslategrey:[119/255,136/255,153/255],lightsteelblue:[176/255,196/255,222/255],lightyellow:[1,1,224/255],lime:[0,1,0],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[1,0,1],maroon:[128/255,0,0],mediumaquamarine:[102/255,205/255,170/255],mediumblue:[0,0,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0,250/255,154/255],mediumturquoise:[72/255,209/255,204/255],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,1,250/255],mistyrose:[1,228/255,225/255],moccasin:[1,228/255,181/255],navajowhite:[1,222/255,173/255],navy:[0,0,128/255],oldlace:[253/255,245/255,230/255],olive:[128/255,128/255,0],olivedrab:[107/255,142/255,35/255],orange:[1,165/255,0],orangered:[1,69/255,0],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[1,239/255,213/255],peachpuff:[1,218/255,185/255],peru:[205/255,133/255,63/255],pink:[1,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],purple:[128/255,0,128/255],rebeccapurple:[102/255,51/255,153/255],red:[1,0,0],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[1,245/255,238/255],sienna:[160/255,82/255,45/255],silver:[192/255,192/255,192/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[1,250/255,250/255],springgreen:[0,1,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],teal:[0,128/255,128/255],thistle:[216/255,191/255,216/255],tomato:[1,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],white:[1,1,1],whitesmoke:[245/255,245/255,245/255],yellow:[1,1,0],yellowgreen:[154/255,205/255,50/255]};let sn=[,,,].fill(` | [0, 255]`),cn=[,,,].fill(`[0, 255]`);var X=new F({id:`srgb`,name:`sRGB`,base:an,fromBase:e=>e.map(e=>{let t=e<0?-1:1,n=e*t;return n>.0031308?t*(1.055*n**(1/2.4)-.055):12.92*e}),toBase:e=>e.map(e=>{let t=e<0?-1:1,n=e*t;return n<=.04045?e/12.92:t*((n+.055)/1.055)**2.4}),formats:{rgb:{coords:sn},rgb_number:{name:`rgb`,commas:!0,coords:cn,noAlpha:!0},color:{},rgba:{coords:sn,commas:!0,lastAlpha:!0},rgba_number:{name:`rgba`,commas:!0,coords:cn},hex:{type:`custom`,toGamut:!0,test:e=>/^#([a-f0-9]{3,4}){1,2}$/i.test(e),parse(e){e.length<=5&&(e=e.replace(/[a-f0-9]/gi,`$&$&`));let t=[];return e.replace(/[a-f0-9]{2}/gi,e=>{t.push(parseInt(e,16)/255)}),{spaceId:`srgb`,coords:t.slice(0,3),alpha:t.slice(3)[0]}},serialize:(e,t,{collapse:n=!0}={})=>{t<1&&e.push(t),e=e.map(e=>Math.round(e*255));let r=n&&e.every(e=>e%17==0),i=e.map(e=>r?(e/17).toString(16):e.toString(16).padStart(2,`0`)).join(``);return`#`+i}},keyword:{type:`custom`,test:e=>/^[a-z]+$/i.test(e),parse(e){e=e.toLowerCase();let t={spaceId:`srgb`,coords:null,alpha:1};if(e===`transparent`?(t.coords=on.black,t.alpha=0):t.coords=on[e],t.coords)return t}}}}),ln=new F({id:`p3`,cssId:`display-p3`,name:`P3`,base:nn,fromBase:X.fromBase,toBase:X.toBase});D.display_space=X;let un;if(typeof CSS<`u`&&CSS.supports)for(let e of[z,$t,ln]){let t=e.getMinCoords(),n={space:e,coords:t,alpha:1},r=qt(n);if(CSS.supports(`color`,r)){D.display_space=e;break}}function dn(e,{space:t=D.display_space,...n}={}){let r=qt(e,n);if(typeof CSS>`u`||CSS.supports(`color`,r)||!D.display_space)r=new String(r),r.color=e;else{let i=e,a=e.coords.some(u)||u(e.alpha);if(a&&!(un??=CSS.supports(`color`,`hsl(none 50% 50%)`))&&(i=W(e),i.coords=i.coords.map(d),i.alpha=d(i.alpha),r=qt(i,n),CSS.supports(`color`,r)))return r=new String(r),r.color=i,r;i=J(i,t),r=new String(qt(i,n)),r.color=i}return r}function fn(e,t){return e=j(e),t=j(t),e.space===t.space&&e.alpha===t.alpha&&e.coords.every((e,n)=>e===t.coords[n])}function Z(e){return L(e,[P,`y`])}function pn(e,t){R(e,[P,`y`],t)}function mn(e){Object.defineProperty(e.prototype,`luminance`,{get(){return Z(this)},set(e){pn(this,e)}})}var hn=Object.freeze({__proto__:null,getLuminance:Z,register:mn,setLuminance:pn});function gn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);return r>n&&([n,r]=[r,n]),(n+.05)/(r+.05)}const _n=.56,vn=.57,yn=.62,bn=.65,xn=.022,Sn=1.414,Cn=.1,wn=5e-4,Tn=1.14,En=.027,Dn=1.14;function On(e){return e>=xn?e:e+(xn-e)**Sn}function kn(e){let t=e<0?-1:1,n=Math.abs(e);return t*n**2.4}function An(e,t){t=j(t),e=j(e);let n,r,i,a,o,s;t=J(t,`srgb`),[a,o,s]=t.coords;let c=kn(a)*.2126729+kn(o)*.7151522+kn(s)*.072175;e=J(e,`srgb`),[a,o,s]=e.coords;let l=kn(a)*.2126729+kn(o)*.7151522+kn(s)*.072175,u=On(c),d=On(l),f=d>u;return Math.abs(d-u)0?r-En:r+En,i*100}function jn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);r>n&&([n,r]=[r,n]);let i=n+r;return i===0?0:(n-r)/i}const Mn=5e4;function Nn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);return r>n&&([n,r]=[r,n]),r===0?Mn:(n-r)/r}function Pn(e,t){e=j(e),t=j(t);let n=L(e,[z,`l`]),r=L(t,[z,`l`]);return Math.abs(n-r)}const Fn=216/24389,In=24/116,Ln=24389/27;let Rn=O.D65;var zn=new M({id:`lab-d65`,name:`Lab D65`,coords:{l:{refRange:[0,100],name:`Lightness`},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:Rn,base:P,fromBase(e){let t=e.map((e,t)=>e/Rn[t]),n=t.map(e=>e>Fn?Math.cbrt(e):(Ln*e+16)/116);return[116*n[1]-16,500*(n[0]-n[1]),200*(n[1]-n[2])]},toBase(e){let t=[];t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200;let n=[t[0]>In?t[0]**3:(116*t[0]-16)/Ln,e[0]>8?((e[0]+16)/116)**3:e[0]/Ln,t[2]>In?t[2]**3:(116*t[2]-16)/Ln];return n.map((e,t)=>e*Rn[t])},formats:{"lab-d65":{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});const Bn=5**.5*.5+.5;function Vn(e,t){e=j(e),t=j(t);let n=L(e,[zn,`l`]),r=L(t,[zn,`l`]),i=Math.abs(n**+Bn-r**+Bn),a=i**(1/Bn)*Math.SQRT2-40;return a<7.5?0:a}var Hn=Object.freeze({__proto__:null,contrastAPCA:An,contrastDeltaPhi:Vn,contrastLstar:Pn,contrastMichelson:jn,contrastWCAG21:gn,contrastWeber:Nn});function Un(e,t,n={}){s(n)&&(n={algorithm:n});let{algorithm:r,...i}=n;if(!r){let e=Object.keys(Hn).map(e=>e.replace(/^contrast/,``)).join(`, `);throw TypeError(`contrast() function needs a contrast algorithm. Please specify one of: ${e}`)}for(let n in e=j(e),t=j(t),Hn)if(`contrast`+r.toLowerCase()===n.toLowerCase())return Hn[n](e,t,i);throw TypeError(`Unknown contrast algorithm: ${r}`)}function Wn(e){let[t,n,r]=I(e,P),i=t+15*n+3*r;return[4*t/i,9*n/i]}function Gn(e){let[t,n,r]=I(e,P),i=t+n+r;return[t/i,n/i]}function Kn(e){Object.defineProperty(e.prototype,`uv`,{get(){return Wn(this)}}),Object.defineProperty(e.prototype,`xy`,{get(){return Gn(this)}})}var qn=Object.freeze({__proto__:null,register:Kn,uv:Wn,xy:Gn});function Jn(e,t,n={}){s(n)&&(n={method:n});let{method:r=D.deltaE,...i}=n;for(let n in K)if(`deltae`+r.toLowerCase()===n.toLowerCase())return K[n](e,t,i);throw TypeError(`Unknown deltaE method: ${r}`)}function Yn(e,t=.25){let n=M.get(`oklch`,`lch`),r=[n,`l`];return R(e,r,e=>e*(1+t))}function Xn(e,t=.25){let n=M.get(`oklch`,`lch`),r=[n,`l`];return R(e,r,e=>e*(1-t))}var Zn=Object.freeze({__proto__:null,darken:Xn,lighten:Yn});function Qn(e,t,n=.5,r={}){[e,t]=[j(e),j(t)],c(n)===`object`&&([n,r]=[.5,n]);let i=er(e,t,r);return i(n)}function $n(e,t,n={}){let r;tr(e)&&([r,n]=[e,t],[e,t]=r.rangeArgs.colors);let{maxDeltaE:i,deltaEMethod:a,steps:o=2,maxSteps:s=1e3,...c}=n;r||([e,t]=[j(e),j(t)],r=er(e,t,c));let l=Jn(e,t),u=i>0?Math.max(o,Math.ceil(l/i)+1):o,d=[];if(s!==void 0&&(u=Math.min(u,s)),u===1)d=[{p:.5,color:r(.5)}];else{let e=1/(u-1);d=Array.from({length:u},(t,n)=>{let i=n*e;return{p:i,color:r(i)}})}if(i>0){let e=d.reduce((e,t,n)=>{if(n===0)return 0;let r=Jn(t.color,d[n-1].color,a);return Math.max(e,r)},0);for(;e>i;){e=0;for(let t=1;te.color),d}function er(e,t,n={}){if(tr(e)){let[n,r]=[e,t];return er(...n.rangeArgs.colors,{...n.rangeArgs.options,...r})}let{space:r,outputSpace:i,progression:a,premultiplied:o}=n;e=j(e),t=j(t),e=W(e),t=W(t);let s={colors:[e,t],options:n};if(r=r?M.get(r):M.registry[D.interpolationSpace]||e.space,i=i?M.get(i):r,e=J(e,r),t=J(t,r),e=q(e),t=q(t),r.coords.h&&r.coords.h.type===`angle`){let i=n.hue=n.hue||`shorter`,a=[r,`h`],[o,s]=[L(e,a),L(t,a)];isNaN(o)&&!isNaN(s)?o=s:isNaN(s)&&!isNaN(o)&&(s=o),[o,s]=fe(i,[o,s]),R(e,a,o),R(t,a,s)}return o&&(e.coords=e.coords.map(t=>t*e.alpha),t.coords=t.coords.map(e=>e*t.alpha)),Object.assign(n=>{n=a?a(n):n;let s=e.coords.map((e,r)=>{let i=t.coords[r];return g(e,i,n)}),c=g(e.alpha,t.alpha,n),l={space:r,coords:s,alpha:c};return o&&(l.coords=l.coords.map(e=>e/c)),i!==r&&(l=J(l,i)),l},{rangeArgs:s})}function tr(e){return c(e)===`function`&&!!e.rangeArgs}D.interpolationSpace=`lab`;function nr(e){e.defineFunction(`mix`,Qn,{returns:`color`}),e.defineFunction(`range`,er,{returns:`function`}),e.defineFunction(`steps`,$n,{returns:`array`})}var rr=Object.freeze({__proto__:null,isRange:tr,mix:Qn,range:er,register:nr,steps:$n}),ir=new M({id:`hsl`,name:`HSL`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:X,fromBase:e=>{let t=Math.max(...e),n=Math.min(...e),[r,i,a]=e,[o,s,c]=[NaN,0,(n+t)/2],l=t-n;if(l!==0){switch(s=c===0||c===1?0:(t-c)/Math.min(c,1-c),t){case r:o=(i-a)/l+(i=360&&(o-=360),[o,s*100,c*100]},toBase:e=>{let[t,n,r]=e;t%=360,t<0&&(t+=360),n/=100,r/=100;function i(e){let i=(e+t/30)%12,a=n*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(i-3,9-i,1))}return[i(0),i(8),i(4)]},formats:{hsl:{coords:[` | `,``,``]},hsla:{coords:[` | `,``,``],commas:!0,lastAlpha:!0}}}),ar=new M({id:`hsv`,name:`HSV`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},v:{range:[0,100],name:`Value`}},base:ir,fromBase(e){let[t,n,r]=e;n/=100,r/=100;let i=r+n*Math.min(r,1-r);return[t,i===0?0:200*(1-r/i),100*i]},toBase(e){let[t,n,r]=e;n/=100,r/=100;let i=r*(1-n/2);return[t,i===0||i===1?0:(r-i)/Math.min(i,1-i)*100,i*100]},formats:{color:{id:`--hsv`,coords:[` | `,` | `,` | `]}}}),or=new M({id:`hwb`,name:`HWB`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},w:{range:[0,100],name:`Whiteness`},b:{range:[0,100],name:`Blackness`}},base:ar,fromBase(e){let[t,n,r]=e;return[t,r*(100-n)/100,100-r]},toBase(e){let[t,n,r]=e;n/=100,r/=100;let i=n+r;if(i>=1){let e=n/i;return[t,0,e*100]}let a=1-r,o=a===0?0:1-n/a;return[t,o*100,a*100]},formats:{hwb:{coords:[` | `,` | `,` | `]}}});const sr=[[.5766690429101305,.1855582379065463,.1882286462349947],[.29734497525053605,.6273635662554661,.07529145849399788],[.02703136138641234,.07068885253582723,.9913375368376388]],cr=[[2.0415879038107465,-.5650069742788596,-.34473135077832956],[-.9692436362808795,1.8759675015077202,.04155505740717557],[.013444280632031142,-.11836239223101838,1.0151749943912054]];var lr=new F({id:`a98rgb-linear`,cssId:`--a98-rgb-linear`,name:`Linear Adobe® 98 RGB compatible`,white:`D65`,toXYZ_M:sr,fromXYZ_M:cr}),ur=new F({id:`a98rgb`,cssId:`a98-rgb`,name:`Adobe® 98 RGB compatible`,base:lr,toBase:e=>e.map(e=>Math.abs(e)**(563/256)*Math.sign(e)),fromBase:e=>e.map(e=>Math.abs(e)**(256/563)*Math.sign(e))});const dr=[[.7977666449006423,.13518129740053308,.0313477341283922],[.2880748288194013,.711835234241873,8993693872564e-17],[0,0,.8251046025104602]],fr=[[1.3457868816471583,-.25557208737979464,-.05110186497554526],[-.5446307051249019,1.5082477428451468,.02052744743642139],[0,0,1.2119675456389452]];var pr=new F({id:`prophoto-linear`,cssId:`--prophoto-rgb-linear`,name:`Linear ProPhoto`,white:`D50`,base:se,toXYZ_M:dr,fromXYZ_M:fr});const mr=1/512,hr=16/512;var gr=new F({id:`prophoto`,cssId:`prophoto-rgb`,name:`ProPhoto`,base:pr,toBase(e){return e.map(e=>ee>=mr?e**(1/1.8):16*e)}}),_r=new M({id:`oklch`,name:`Oklch`,coords:{l:{refRange:[0,1],name:`Lightness`},c:{refRange:[0,.4],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},white:`D65`,base:H,fromBase(e){let[t,n,r]=e,i,a=2e-4;return i=Math.abs(n) | `,` | [0,1]`,` | `]}}});let vr=O.D65;const yr=216/24389,br=24389/27,[xr,Sr]=Wn({space:P,coords:vr});var Cr=new M({id:`luv`,name:`Luv`,coords:{l:{refRange:[0,100],name:`Lightness`},u:{refRange:[-215,215]},v:{refRange:[-215,215]}},white:vr,base:P,fromBase(e){let t=[d(e[0]),d(e[1]),d(e[2])],n=t[1],[r,i]=Wn({space:P,coords:t});if(!Number.isFinite(r)||!Number.isFinite(i))return[0,0,0];let a=n<=yr?br*n:116*Math.cbrt(n)-16;return[a,13*a*(r-xr),13*a*(i-Sr)]},toBase(e){let[t,n,r]=e;if(t===0||u(t))return[0,0,0];n=d(n),r=d(r);let i=n/(13*t)+xr,a=r/(13*t)+Sr,o=t<=8?t/br:((t+16)/116)**3;return[o*(9*i/(4*a)),o,o*((12-3*i-20*a)/(4*a))]},formats:{color:{id:`--luv`,coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}}),wr=new M({id:`lchuv`,name:`LChuv`,coords:{l:{refRange:[0,100],name:`Lightness`},c:{refRange:[0,220],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:Cr,fromBase(e){let[t,n,r]=e,i,a=.02;return i=Math.abs(n) | `,` | `,` | `]}}});const Tr=216/24389,Er=24389/27,Dr=Y[0][0],Or=Y[0][1],kr=Y[0][2],Ar=Y[1][0],jr=Y[1][1],Mr=Y[1][2],Nr=Y[2][0],Pr=Y[2][1],Fr=Y[2][2];function Ir(e,t,n){let r=t/(Math.sin(n)-e*Math.cos(n));return r<0?1/0:r}function Lr(e){let t=(e+16)**3/1560896,n=t>Tr?t:e/Er,r=n*(284517*Dr-94839*kr),i=n*(838422*kr+769860*Or+731718*Dr),a=n*(632260*kr-126452*Or),o=n*(284517*Ar-94839*Mr),s=n*(838422*Mr+769860*jr+731718*Ar),c=n*(632260*Mr-126452*jr),l=n*(284517*Nr-94839*Fr),u=n*(838422*Fr+769860*Pr+731718*Nr),d=n*(632260*Fr-126452*Pr);return{r0s:r/a,r0i:i*e/a,r1s:r/(a+126452),r1i:(i-769860)*e/(a+126452),g0s:o/c,g0i:s*e/c,g1s:o/(c+126452),g1i:(s-769860)*e/(c+126452),b0s:l/d,b0i:u*e/d,b1s:l/(d+126452),b1i:(u-769860)*e/(d+126452)}}function Rr(e,t){let n=t/360*Math.PI*2,r=Ir(e.r0s,e.r0i,n),i=Ir(e.r1s,e.r1i,n),a=Ir(e.g0s,e.g0i,n),o=Ir(e.g1s,e.g1i,n),s=Ir(e.b0s,e.b0i,n),c=Ir(e.b1s,e.b1i,n);return Math.min(r,i,a,o,s,c)}var zr=new M({id:`hsluv`,name:`HSLuv`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:wr,gamutSpace:X,fromBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(t>99.9999999)i=0,t=100;else if(t<1e-8)i=0,t=0;else{let e=Lr(t),a=Rr(e,r);i=n/a*100}return[r,i,t]},toBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(r>99.9999999)r=100,i=0;else if(r<1e-8)r=0,i=0;else{let e=Lr(r),a=Rr(e,t);i=a/100*n}return[r,i,t]},formats:{color:{id:`--hsluv`,coords:[` | `,` | `,` | `]}}});Y[0][0],Y[0][1],Y[0][2],Y[1][0],Y[1][1],Y[1][2],Y[2][0],Y[2][1],Y[2][2];function Q(e,t){return Math.abs(t)/Math.sqrt(e**2+1)}function Br(e){let t=Q(e.r0s,e.r0i),n=Q(e.r1s,e.r1i),r=Q(e.g0s,e.g0i),i=Q(e.g1s,e.g1i),a=Q(e.b0s,e.b0i),o=Q(e.b1s,e.b1i);return Math.min(t,n,r,i,a,o)}var Vr=new M({id:`hpluv`,name:`HPLuv`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:wr,gamutSpace:`self`,fromBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(t>99.9999999)i=0,t=100;else if(t<1e-8)i=0,t=0;else{let e=Lr(t),r=Br(e);i=n/r*100}return[r,i,t]},toBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(r>99.9999999)r=100,i=0;else if(r<1e-8)r=0,i=0;else{let e=Lr(r),t=Br(e);i=t/100*n}return[r,i,t]},formats:{color:{id:`--hpluv`,coords:[` | `,` | `,` | `]}}});const Hr=203,Ur=2610/2**14,Wr=2**14/2610,Gr=2523/2**5,Kr=2**5/2523,qr=3424/2**12,Jr=2413/2**7,Yr=2392/2**7;var Xr=new F({id:`rec2100pq`,cssId:`rec2100-pq`,name:`REC.2100-PQ`,base:Xt,toBase(e){return e.map(function(e){let t=(Math.max(e**Kr-qr,0)/(Jr-Yr*e**Kr))**Wr;return t*1e4/Hr})},fromBase(e){return e.map(function(e){let t=Math.max(e*Hr/1e4,0),n=qr+Jr*t**Ur,r=1+Yr*t**Ur;return(n/r)**Gr})}});const Zr=.17883277,Qr=.28466892,$r=.55991073,ei=3.7743;var ti=new F({id:`rec2100hlg`,cssId:`rec2100-hlg`,name:`REC.2100-HLG`,referred:`scene`,base:Xt,toBase(e){return e.map(function(e){return e<=.5?e**2/3*ei:(Math.exp((e-$r)/Zr)+Qr)/12*ei})},fromBase(e){return e.map(function(e){return e/=ei,e<=1/12?Math.sqrt(3*e):Zr*Math.log(12*e-Qr)+$r})}});const ni={};E.add(`chromatic-adaptation-start`,e=>{e.options.method&&(e.M=ii(e.W1,e.W2,e.options.method))}),E.add(`chromatic-adaptation-end`,e=>{e.M||=ii(e.W1,e.W2,e.options.method)});function ri({id:e,toCone_M:t,fromCone_M:n}){ni[e]=arguments[0]}function ii(e,t,n=`Bradford`){let r=ni[n],[i,a,s]=o(r.toCone_M,e),[c,l,u]=o(r.toCone_M,t),d=[[c/i,0,0],[0,l/a,0],[0,0,u/s]],f=o(d,r.toCone_M),p=o(r.fromCone_M,f);return p}ri({id:`von Kries`,toCone_M:[[.40024,.7076,-.08081],[-.2263,1.16532,.0457],[0,0,.91822]],fromCone_M:[[1.8599363874558397,-1.1293816185800916,.21989740959619328],[.3611914362417676,.6388124632850422,-6370596838649899e-21],[0,0,1.0890636230968613]]}),ri({id:`Bradford`,toCone_M:[[.8951,.2664,-.1614],[-.7502,1.7135,.0367],[.0389,-.0685,1.0296]],fromCone_M:[[.9869929054667121,-.14705425642099013,.15996265166373122],[.4323052697233945,.5183602715367774,.049291228212855594],[-.00852866457517732,.04004282165408486,.96848669578755]]}),ri({id:`CAT02`,toCone_M:[[.7328,.4296,-.1624],[-.7036,1.6975,.0061],[.003,.0136,.9834]],fromCone_M:[[1.0961238208355142,-.27886900021828726,.18274517938277307],[.4543690419753592,.4735331543074117,.07209780371722911],[-.009627608738429355,-.00569803121611342,1.0153256399545427]]}),ri({id:`CAT16`,toCone_M:[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],fromCone_M:[[1.862067855087233,-1.0112546305316845,.14918677544445172],[.3875265432361372,.6214474419314753,-.008973985167612521],[-.01584149884933386,-.03412293802851557,1.0499644368778496]]}),Object.assign(O,{A:[1.0985,1,.35585],C:[.98074,1,1.18232],D55:[.95682,1,.92149],D75:[.94972,1,1.22638],E:[1,1,1],F2:[.99186,1,.67393],F7:[.95041,1,1.08747],F11:[1.00962,1,.6435]}),O.ACES=[.32168/.33767,1,.34065/.33767];const ai=[[.6624541811085053,.13400420645643313,.1561876870049078],[.27222871678091454,.6740817658111484,.05368951740793705],[-.005574649490394108,.004060733528982826,1.0103391003129971]],oi=[[1.6410233796943257,-.32480329418479,-.23642469523761225],[-.6636628587229829,1.6153315916573379,.016756347685530137],[.011721894328375376,-.008284441996237409,.9883948585390215]];var si=new F({id:`acescg`,cssId:`--acescg`,name:`ACEScg`,coords:{r:{range:[0,65504],name:`Red`},g:{range:[0,65504],name:`Green`},b:{range:[0,65504],name:`Blue`}},referred:`scene`,white:O.ACES,toXYZ_M:ai,fromXYZ_M:oi});const ci=2**-16,li=-.35828683,ui=(Math.log2(65504)+9.72)/17.52;var di=new F({id:`acescc`,cssId:`--acescc`,name:`ACEScc`,coords:{r:{range:[li,ui],name:`Red`},g:{range:[li,ui],name:`Green`},b:{range:[li,ui],name:`Blue`}},referred:`scene`,base:si,toBase(e){let t=-5.279999999999999/17.52;return e.map(function(e){return e<=t?(2**(e*17.52-9.72)-ci)*2:e1||i===void 0?1:i<0?0:i;for(let e=0;ethis.get(e),set:t=>this.set(e,t)})}get spaceId(){return this.space.id}clone(){return new e(this.space,this.coords,this.alpha)}toJSON(){return{spaceId:this.spaceId,coords:this.coords,alpha:this.alpha}}display(...t){let n=dn(this,...t);return n.color=new e(n.color),n}static get(t,...n){return t instanceof e?t:new e(t,...n)}static defineFunction(t,n,r=n){let{instance:i=!0,returns:a}=r,o=function(...t){let r=n(...t);if(a===`color`)r=e.get(r);else if(a===`function`){let t=r;r=function(...n){let r=t(...n);return e.get(r)},Object.assign(r,t)}else a===`array`&&(r=r.map(t=>e.get(t)));return r};t in e||(e[t]=o),i&&(e.prototype[t]=function(...e){return o(this,...e)})}static defineFunctions(t){for(let n in t)e.defineFunction(n,t[n],t[n])}static extend(exports){if(exports.register)exports.register(e);else for(let n in exports)e.defineFunction(n,exports[n])}};$.defineFunctions({get:L,getAll:I,set:R,setAll:oe,to:J,equals:fn,inGamut:U,toGamut:q,distance:Te,toString:qt}),Object.assign($,{util:T,hooks:E,WHITES:O,Space:M,spaces:M.registry,parse:re,defaults:D});for(let e of Object.keys(fi))M.register(fi[e]);for(let e in M.registry)pi(e,M.registry[e]);E.add(`colorspace-init-end`,e=>{pi(e.id,e),e.aliases?.forEach(t=>{pi(t,e)})});function pi(e,t){let n=e.replace(/-/g,`_`);Object.defineProperty($.prototype,n,{get(){let n=this.getAll(e);return typeof Proxy>`u`?n:new Proxy(n,{has:(e,n)=>{try{return M.resolveCoord([t,n]),!0}catch{}return Reflect.has(e,n)},get:(e,n,r)=>{if(n&&typeof n!=`symbol`&&!(n in e)){let{index:r}=M.resolveCoord([t,n]);if(r>=0)return e[r]}return Reflect.get(e,n,r)},set:(n,r,i,a)=>{if(r&&typeof r!=`symbol`&&!(r in n)||r>=0){let{index:a}=M.resolveCoord([t,r]);if(a>=0)return n[a]=i,this.setAll(e,n),!0}return Reflect.set(n,r,i,a)}})},set(t){this.setAll(e,t)},configurable:!0,enumerable:!0})}$.extend(K),$.extend({deltaE:Jn}),Object.assign($,{deltaEMethods:K}),$.extend(Zn),$.extend({contrast:Un}),$.extend(qn),$.extend(hn),$.extend(rr),$.extend(Hn);function mi(e,t){return async()=>{let n=a(()=>{let t=document.querySelector(e);if(!t)throw Error(`Widgets element not found`);return t},{retry:10,retryDelay:1e3}),r=await n();return window.getComputedStyle(r).getPropertyValue(t)}}function hi(e){return async()=>{if(typeof e==`string`)return e;{let t=n();return t.value?e.dark:e.light}}}function gi(e){async function t(){`document`in globalThis&&globalThis.document!=null&&`window`in globalThis&&globalThis.window!=null&&document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,new $(await e()).to(`srgb`).toString({format:`hex`}))}return{updateThemeColor:t}}export{mi as b,hi as c,gi as d}; \ No newline at end of file +import{c9 as e,ca as t,db as n}from"./index-D1IGsMK6.js";const r=async e=>{let t=await e();for(;t instanceof Function;)t=await t();return t},i={retry:3,retryCount:0,retryDelay:500},a=(n,o)=>{let{onError:s,retry:c,retryCount:l,retryDelay:u}=t(i,o),d=async(...t)=>{try{return await n(...t)}catch(r){if(s?.(r),la(n,{onError:s,retry:c,retryCount:l+1,retryDelay:u})(...t);throw r}};return async(...e)=>r(async()=>d(...e))};function o(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>{let n=0;if(!Array.isArray(e)){for(let r of t)n+=e*r;return n}for(let r=0;re[0]):a}function s(e){return c(e)===`string`}function c(e){let t=Object.prototype.toString.call(e);return(t.match(/^\[object\s+(.*?)\]$/)[1]||``).toLowerCase()}function l(e,{precision:t,unit:n}){return u(e)?`none`:f(e,t)+(n??``)}function u(e){return Number.isNaN(e)||e instanceof Number&&e?.none}function d(e){return u(e)?0:e}function f(e,t){if(e===0)return 0;let n=~~e,r=0;n&&t&&(r=~~Math.log10(Math.abs(n))+1);let i=10**(t-r);return Math.floor(e*i+.5)/i}const p={deg:1,grad:.9,rad:180/Math.PI,turn:360};function m(e){if(!e)return;e=e.trim();let t=/^([a-z]+)\((.+?)\)$/i,n=/^-?[\d.]+$/,r=/%|deg|g?rad|turn$/,i=/\/?\s*(none|[-\w.]+(?:%|deg|g?rad|turn)?)/g,a=e.match(t);if(a){let e=[];return a[2].replace(i,(t,i)=>{let a=i.match(r),o=i;if(a){let e=a[0],t=o.slice(0,-e.length);e===`%`?(o=new Number(t/100),o.type=``):(o=new Number(t*p[e]),o.type=``,o.unit=e)}else n.test(o)?(o=new Number(o),o.type=``):o===`none`&&(o=new Number(NaN),o.none=!0);t.startsWith(`/`)&&(o=o instanceof Number?o:new Number(o),o.alpha=!0),typeof o==`object`&&o instanceof Number&&(o.raw=i),e.push(o)}),{name:a[1].toLowerCase(),rawName:a[1],rawArgs:a[2],args:e}}}function h(e){return e[e.length-1]}function g(e,t,n){return isNaN(e)?t:isNaN(t)?e:e+(t-e)*n}function _(e,t,n){return(n-e)/(t-e)}function v(e,t,n){return g(t[0],t[1],_(e[0],e[1],n))}function y(e){return e.map(e=>e.split(`|`).map(e=>{e=e.trim();let t=e.match(/^(<[a-z]+>)\[(-?[.\d]+),\s*(-?[.\d]+)\]?$/);if(t){let e=new String(t[1]);return e.range=[+t[2],+t[3]],e}return e}))}function b(e,t,n){return Math.max(Math.min(n,t),e)}function x(e,t){return Math.sign(e)===Math.sign(t)?e:-e}function S(e,t){return x(Math.abs(e)**t,e)}function C(e,t){return t===0?0:e/t}function w(e,t,n=0,r=e.length){for(;n>1;e[i]`,``,``]);function A(e,t,n,r){let i=Object.entries(e.coords).map(([e,i],a)=>{let o=t.coordGrammar[a],s=r[a],c=s?.type,l;if(l=s.none?o.find(e=>ne.has(e)):o.find(e=>e==c),!l){let t=i.name||e;throw TypeError(`${c??s.raw} not allowed for ${t} in ${n}()`)}let u=l.range;c===``&&(u||=[0,1]);let d=i.range||i.refRange;return u&&d&&(r[a]=v(u,d,r[a])),l});return i}function re(e,{meta:t}={}){let n={str:String(e)?.trim()};if(E.run(`parse-start`,n),n.color)return n.color;if(n.parsed=m(n.str),n.parsed){let e=n.parsed.name;if(e===`color`){let e=n.parsed.args.shift(),r=e.startsWith(`--`)?e.substring(2):`--${e}`,i=[e,r],a=n.parsed.rawArgs.indexOf(`/`)>0?n.parsed.args.pop():1;for(let r of M.all){let o=r.getFormat(`color`);if(o&&(i.includes(o.id)||o.ids?.filter(e=>i.includes(e)).length)){let i=Object.keys(r.coords).map((e,t)=>n.parsed.args[t]||0),s;return o.coordGrammar&&(s=A(r,o,`color`,i)),t&&Object.assign(t,{formatId:`color`,types:s}),o.id.startsWith(`--`)&&!e.startsWith(`--`)&&D.warn(`${r.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${o.id}) instead of color(${e}).`),e.startsWith(`--`)&&!o.id.startsWith(`--`)&&D.warn(`${r.name} is a standard space and supported in the CSS spec. Use color(${o.id}) instead of prefixed color(${e}).`),{spaceId:r.id,coords:i,alpha:a}}}let o=``,s=e in M.registry?e:r;if(s in M.registry){let e=M.registry[s].formats?.color?.id;e&&(o=`Did you mean color(${e})?`)}throw TypeError(`Cannot parse color(${e}). `+(o||`Missing a plugin?`))}else for(let r of M.all){let i=r.getFormat(e);if(i&&i.type===`function`){let a=1;(i.lastAlpha||h(n.parsed.args).alpha)&&(a=n.parsed.args.pop());let o=n.parsed.args,s;return i.coordGrammar&&(s=A(r,i,e,o)),t&&Object.assign(t,{formatId:i.name,types:s}),{spaceId:r.id,coords:o,alpha:a}}}}else for(let e of M.all)for(let r in e.formats){let i=e.formats[r];if(i.type!==`custom`||i.test&&!i.test(n.str))continue;let a=i.parse(n.str);if(a)return a.alpha??=1,t&&(t.formatId=r),a}throw TypeError(`Could not parse ${e} as a color. Missing a plugin?`)}function j(e){if(Array.isArray(e))return e.map(j);if(!e)throw TypeError(`Empty color reference`);s(e)&&(e=re(e));let t=e.space||e.spaceId;return t instanceof M||(e.space=M.get(t)),e.alpha===void 0&&(e.alpha=1),e}const ie=75e-6;var M=class e{constructor(t){this.id=t.id,this.name=t.name,this.base=t.base?e.get(t.base):null,this.aliases=t.aliases,this.base&&(this.fromBase=t.fromBase,this.toBase=t.toBase);let n=t.coords??this.base.coords;for(let e in n)`name`in n[e]||(n[e].name=e);this.coords=n;let r=t.white??this.base.white??`D65`;for(let e in this.white=te(r),this.formats=t.formats??{},this.formats){let t=this.formats[e];t.type||=`function`,t.name||=e}this.formats.color?.id||(this.formats.color={...this.formats.color??{},id:t.cssId||this.id}),t.gamutSpace?this.gamutSpace=t.gamutSpace===`self`?this:e.get(t.gamutSpace):this.isPolar?this.gamutSpace=this.base:this.gamutSpace=this,this.gamutSpace.isUnbounded&&(this.inGamut=(e,t)=>!0),this.referred=t.referred,Object.defineProperty(this,`path`,{value:N(this).reverse(),writable:!1,enumerable:!0,configurable:!0}),E.run(`colorspace-init-end`,this)}inGamut(e,{epsilon:t=ie}={}){if(!this.equals(this.gamutSpace))return e=this.to(this.gamutSpace,e),this.gamutSpace.inGamut(e,{epsilon:t});let n=Object.values(this.coords);return e.every((e,r)=>{let i=n[r];if(i.type!==`angle`&&i.range){if(Number.isNaN(e))return!0;let[n,r]=i.range;return(n===void 0||e>=n-t)&&(r===void 0||e<=r+t)}return!0})}get isUnbounded(){return Object.values(this.coords).every(e=>!(`range`in e))}get cssId(){return this.formats?.color?.id||this.id}get isPolar(){for(let e in this.coords)if(this.coords[e].type===`angle`)return!0;return!1}getFormat(e){if(typeof e==`object`)return e=ae(e,this),e;let t;return t=e===`default`?Object.values(this.formats)[0]:this.formats[e],t?(t=ae(t,this),t):null}equals(e){return e?this===e||this.id===e||this.id===e.id:!1}to(t,n){if(arguments.length===1){let e=j(t);[t,n]=[e.space,e.coords]}if(t=e.get(t),this.equals(t))return n;n=n.map(e=>Number.isNaN(e)?0:e);let r=this.path,i=t.path,a,o;for(let e=0;eo;e--)n=r[e].toBase(n);for(let e=o+1;e=0){let e=Object.entries(i.coords)[a];if(e)return{space:i,id:e[0],index:a,...e[1]}}i=e.get(i);let o=a.toLowerCase(),s=0;for(let e in i.coords){let t=i.coords[e];if(e.toLowerCase()===o||t.name?.toLowerCase()===o)return{space:i,id:e,index:s,...t};s++}throw TypeError(`No "${a}" coordinate found in ${i.name}. Its coordinates are: ${Object.keys(i.coords).join(`, `)}`)}static DEFAULT_FORMAT={type:`functions`,name:`color`}};function N(e){let t=[e];for(let n=e;n=n.base;)t.push(n);return t}function ae(e,{coords:t}={}){if(e.coords&&!e.coordGrammar){e.type||=`function`,e.name||=`color`,e.coordGrammar=y(e.coords);let n=Object.entries(t).map(([t,n],r)=>{let i=e.coordGrammar[r][0],a=n.range||n.refRange,o=i.range,s=``;return i==``?(o=[0,100],s=`%`):i==``&&(s=`deg`),{fromRange:a,toRange:o,suffix:s}});e.serializeCoords=(e,t)=>e.map((e,r)=>{let{fromRange:i,toRange:a,suffix:o}=n[r];return i&&a&&(e=v(i,a,e)),e=l(e,{precision:t,unit:o}),e})}return e}var P=new M({id:`xyz-d65`,name:`XYZ D65`,coords:{x:{name:`X`},y:{name:`Y`},z:{name:`Z`}},white:`D65`,formats:{color:{ids:[`xyz-d65`,`xyz`]}},aliases:[`xyz`]}),F=class extends M{constructor(e){e.coords||={r:{range:[0,1],name:`Red`},g:{range:[0,1],name:`Green`},b:{range:[0,1],name:`Blue`}},e.base||=P,e.toXYZ_M&&e.fromXYZ_M&&(e.toBase??=t=>{let n=o(e.toXYZ_M,t);return this.white!==this.base.white&&(n=k(this.white,this.base.white,n)),n},e.fromBase??=t=>(t=k(this.base.white,this.white,t),o(e.fromXYZ_M,t))),e.referred??=`display`,super(e)}};function I(e,t){return e=j(e),!t||e.space.equals(t)?e.coords.slice():(t=M.get(t),t.from(e))}function L(e,t){e=j(e);let{space:n,index:r}=M.resolveCoord(t,e.space),i=I(e,n);return i[r]}function oe(e,t,n){return e=j(e),t=M.get(t),e.coords=t.to(e.space,n),e}oe.returns=`color`;function R(e,t,n){if(e=j(e),arguments.length===2&&c(arguments[1])===`object`){let t=arguments[1];for(let n in t)R(e,n,t[n])}else{typeof n==`function`&&(n=n(L(e,t)));let{space:r,index:i}=M.resolveCoord(t,e.space),a=I(e,r);a[i]=n,oe(e,r,a)}return e}R.returns=`color`;var se=new M({id:`xyz-d50`,name:`XYZ D50`,white:`D50`,base:P,fromBase:e=>k(P.white,`D50`,e),toBase:e=>k(`D50`,P.white,e)});const ce=216/24389,le=24/116,ue=24389/27;let de=O.D50;var z=new M({id:`lab`,name:`Lab`,coords:{l:{refRange:[0,100],name:`Lightness`},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:de,base:se,fromBase(e){let t=e.map((e,t)=>e/de[t]),n=t.map(e=>e>ce?Math.cbrt(e):(ue*e+16)/116);return[116*n[1]-16,500*(n[0]-n[1]),200*(n[1]-n[2])]},toBase(e){let t=[];t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200;let n=[t[0]>le?t[0]**3:(116*t[0]-16)/ue,e[0]>8?((e[0]+16)/116)**3:e[0]/ue,t[2]>le?t[2]**3:(116*t[2]-16)/ue];return n.map((e,t)=>e*de[t])},formats:{lab:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});function B(e){return(e%360+360)%360}function fe(e,t){if(e===`raw`)return t;let[n,r]=t.map(B),i=r-n;return e===`increasing`?i<0&&(r+=360):e===`decreasing`?i>0&&(n+=360):e===`longer`?-1800?n+=360:r+=360):e===`shorter`&&(i>180?n+=360:i<-180&&(r+=360)),[n,r]}var pe=new M({id:`lch`,name:`LCH`,coords:{l:{refRange:[0,100],name:`Lightness`},c:{refRange:[0,150],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:z,fromBase(e){let[t,n,r]=e,i,a=.02;return i=Math.abs(n) | `,` | `,` | `]}}});const me=25**7,he=Math.PI,ge=180/he,V=he/180;function _e(e){let t=e*e,n=t*t*t*e;return n}function ve(e,t,{kL:n=1,kC:r=1,kH:i=1}={}){[e,t]=j([e,t]);let[a,o,s]=z.from(e),c=pe.from(z,[a,o,s])[1],[l,u,d]=z.from(t),f=pe.from(z,[l,u,d])[1];c<0&&(c=0),f<0&&(f=0);let p=(c+f)/2,m=_e(p),h=.5*(1-Math.sqrt(m/(m+me))),g=(1+h)*o,_=(1+h)*u,v=Math.sqrt(g**2+s**2),y=Math.sqrt(_**2+d**2),b=g===0&&s===0?0:Math.atan2(s,g),x=_===0&&d===0?0:Math.atan2(d,_);b<0&&(b+=2*he),x<0&&(x+=2*he),b*=ge,x*=ge;let S=l-a,C=y-v,w=x-b,T=b+x,ee=Math.abs(w),E;v*y===0?E=0:ee<=180?E=w:w>180?E=w-360:w<-180?E=w+360:D.warn(`the unthinkable has happened`);let O=2*Math.sqrt(y*v)*Math.sin(E*V/2),te=(a+l)/2,k=(v+y)/2,ne=_e(k),A;A=v*y===0?T:ee<=180?T/2:T<360?(T+360)/2:(T-360)/2;let re=(te-50)**2,ie=1+.015*re/Math.sqrt(20+re),M=1+.045*k,N=1;N-=.17*Math.cos((A-30)*V),N+=.24*Math.cos(2*A*V),N+=.32*Math.cos((3*A+6)*V),N-=.2*Math.cos((4*A-63)*V);let ae=1+.015*k*N,P=30*Math.exp(-1*((A-275)/25)**2),F=2*Math.sqrt(ne/(ne+me)),I=-1*Math.sin(2*P*V)*F,L=(S/(n*ie))**2;return L+=(C/(r*M))**2,L+=(O/(i*ae))**2,L+=I*(C/(r*M))*(O/(i*ae)),Math.sqrt(L)}const ye=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],be=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],xe=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],Se=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]];var H=new M({id:`oklab`,name:`Oklab`,coords:{l:{refRange:[0,1],name:`Lightness`},a:{refRange:[-.4,.4]},b:{refRange:[-.4,.4]}},white:`D65`,base:P,fromBase(e){let t=o(ye,e),n=t.map(e=>Math.cbrt(e));return o(xe,n)},toBase(e){let t=o(Se,e),n=t.map(e=>e**3);return o(be,n)},formats:{oklab:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});function Ce(e,t){[e,t]=j([e,t]);let[n,r,i]=H.from(e),[a,o,s]=H.from(t),c=n-a,l=r-o,u=i-s;return Math.sqrt(c**2+l**2+u**2)}const we=75e-6;function U(e,t,{epsilon:n=we}={}){e=j(e),!t&&(t=e.space),t=M.get(t);let r=e.coords;return t!==e.space&&(r=t.from(e)),t.inGamut(r,{epsilon:n})}function W(e){return{space:e.space,coords:e.coords.slice(),alpha:e.alpha}}function Te(e,t,n=`lab`){n=M.get(n);let r=n.from(e),i=n.from(t);return Math.sqrt(r.reduce((e,t,n)=>{let r=i[n];return isNaN(t)||isNaN(r)?e:e+(r-t)**2},0))}function Ee(e,t){return Te(e,t,`lab`)}const De=Math.PI,Oe=De/180;function ke(e,t,{l:n=2,c:r=1}={}){[e,t]=j([e,t]);let[i,a,o]=z.from(e),[,s,c]=pe.from(z,[i,a,o]),[l,u,d]=z.from(t),f=pe.from(z,[l,u,d])[1];s<0&&(s=0),f<0&&(f=0);let p=i-l,m=s-f,h=a-u,g=o-d,_=h**2+g**2-m**2,v=.511;i>=16&&(v=.040975*i/(1+.01765*i));let y=.0638*s/(1+.0131*s)+.638,b;Number.isNaN(c)&&(c=0),b=c>=164&&c<=345?.56+Math.abs(.2*Math.cos((c+168)*Oe)):.36+Math.abs(.4*Math.cos((c+35)*Oe));let x=s**4,S=Math.sqrt(x/(x+1900)),C=y*(S*b+1-S),w=(p/(n*v))**2;return w+=(m/(r*y))**2,w+=_/C**2,Math.sqrt(w)}const Ae=203;var je=new M({id:`xyz-abs-d65`,cssId:`--xyz-abs-d65`,name:`Absolute XYZ D65`,coords:{x:{refRange:[0,9504.7],name:`Xa`},y:{refRange:[0,1e4],name:`Ya`},z:{refRange:[0,10888.3],name:`Za`}},base:P,fromBase(e){return e.map(e=>Math.max(e*Ae,0))},toBase(e){return e.map(e=>Math.max(e/Ae,0))}});const Me=1.15,Ne=.66,Pe=2610/2**14,Fe=2**14/2610,Ie=3424/2**12,Le=2413/2**7,Re=2392/2**7,ze=1.7*2523/2**5,Be=2**5/(1.7*2523),Ve=-.56,He=16295499532821565e-27,Ue=[[.41478972,.579999,.014648],[-.20151,1.120649,.0531008],[-.0166008,.2648,.6684799]],We=[[1.9242264357876067,-1.0047923125953657,.037651404030618],[.35031676209499907,.7264811939316552,-.06538442294808501],[-.09098281098284752,-.3127282905230739,1.5227665613052603]],Ge=[[.5,.5,0],[3.524,-4.066708,.542708],[.199076,1.096799,-1.295875]],Ke=[[1,.1386050432715393,.05804731615611886],[.9999999999999999,-.1386050432715393,-.05804731615611886],[.9999999999999998,-.09601924202631895,-.8118918960560388]];var qe=new M({id:`jzazbz`,name:`Jzazbz`,coords:{jz:{refRange:[0,1],name:`Jz`},az:{refRange:[-.5,.5]},bz:{refRange:[-.5,.5]}},base:je,fromBase(e){let[t,n,r]=e,i=Me*t-(Me-1)*r,a=Ne*n-(Ne-1)*t,s=o(Ue,[i,a,r]),c=s.map(function(e){let t=Ie+Le*(e/1e4)**Pe,n=1+Re*(e/1e4)**Pe;return(t/n)**ze}),[l,u,d]=o(Ge,c),f=(1+Ve)*l/(1+Ve*l)-He;return[f,u,d]},toBase(e){let[t,n,r]=e,i=(t+He)/(1+Ve-Ve*(t+He)),a=o(Ke,[i,n,r]),s=a.map(function(e){let t=Ie-e**Be,n=Re*e**Be-Le,r=1e4*(t/n)**Fe;return r}),[c,l,u]=o(We,s),d=(c+(Me-1)*u)/Me,f=(l+(Ne-1)*d)/Ne;return[d,f,u]},formats:{color:{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}}),Je=new M({id:`jzczhz`,name:`JzCzHz`,coords:{jz:{refRange:[0,1],name:`Jz`},cz:{refRange:[0,1],name:`Chroma`},hz:{refRange:[0,360],type:`angle`,name:`Hue`}},base:qe,fromBase(e){let[t,n,r]=e,i,a=2e-4;return i=Math.abs(n){let n=S(t*Math.abs(e)*.01,ft);return 400*x(n,e)/(n+27.13)});return n}function St(e,t){let n=100/t*27.13**pt;return e.map(e=>{let t=Math.abs(e);return x(n*S(t/(400-t),pt),e)})}function Ct(e){let t=B(e);t<=G.h[0]&&(t+=360);let n=w(G.h,t)-1,[r,i]=G.h.slice(n,n+2),[a,o]=G.e.slice(n,n+2),s=G.H[n],c=(t-r)/a;return s+100*c/(c+(i-t)/o)}function wt(e){let t=(e%400+400)%400,n=Math.floor(.01*t);t%=100;let[r,i]=G.h.slice(n,n+2),[a,o]=G.e.slice(n,n+2);return B((t*(o*r-a*i)-100*r*o)/(t*(o-a)-100*o))}function Tt(e,t,n,r,i){let a={};a.discounting=i,a.refWhite=e,a.surround=r;let s=e.map(e=>e*100);a.la=t,a.yb=n;let c=s[1],l=o(ht,s);r=vt[a.surround];let u=r[0];a.c=r[1],a.nc=r[2];let d=1/(5*a.la+1),f=d**4;a.fl=f*a.la+.1*(1-f)*(1-f)*Math.cbrt(5*a.la),a.flRoot=a.fl**.25,a.n=a.yb/c,a.z=1.48+Math.sqrt(a.n),a.nbb=.725*a.n**-.2,a.ncb=a.nbb;let p=i?1:Math.max(Math.min(u*(1-1/3.6*Math.exp((-a.la-42)/92)),1),0);a.dRgb=l.map(e=>g(1,c/e,p)),a.dRgbInv=a.dRgb.map(e=>1/e);let m=l.map((e,t)=>e*a.dRgb[t]),h=xt(m,a.fl);return a.aW=a.nbb*(2*h[0]+h[1]+.05*h[2]),a}const Et=Tt(dt,64/Math.PI*.2,20,`average`,!1);function Dt(e,t){if(!(e.J!==void 0^e.Q!==void 0))throw Error(`Conversion requires one and only one: 'J' or 'Q'`);if(!(e.C!==void 0^e.M!==void 0^e.s!==void 0))throw Error(`Conversion requires one and only one: 'C', 'M' or 's'`);if(!(e.h!==void 0^e.H!==void 0))throw Error(`Conversion requires one and only one: 'h' or 'H'`);if(e.J===0||e.Q===0)return[0,0,0];let n=0;n=e.h===void 0?wt(e.H)*bt:B(e.h)*bt;let r=Math.cos(n),i=Math.sin(n),a=0;e.J===void 0?e.Q!==void 0&&(a=.25*t.c*e.Q/((t.aW+4)*t.flRoot)):a=S(e.J,1/2)*.1;let s=0;e.C===void 0?e.M===void 0?e.s!==void 0&&(s=4e-4*e.s**2*(t.aW+4)/t.c):s=e.M/t.flRoot/a:s=e.C/a;let c=S(s*(1.64-.29**t.n)**-.73,10/9),l=.25*(Math.cos(n+2)+3.8),u=t.aW*S(a,2/t.c/t.z),d=5e4/13*t.nc*t.ncb*l,f=u/t.nbb,p=23*(f+.305)*C(c,23*d+c*(11*r+108*i)),m=p*r,h=p*i,g=St(o(_t,[f,m,h]).map(e=>e*1/1403),t.fl);return o(gt,g.map((e,n)=>e*t.dRgbInv[n])).map(e=>e/100)}function Ot(e,t){let n=e.map(e=>e*100),r=xt(o(ht,n).map((e,n)=>e*t.dRgb[n]),t.fl),i=r[0]+(-12*r[1]+r[2])/11,a=(r[0]+r[1]-2*r[2])/9,s=(Math.atan2(a,i)%mt+mt)%mt,c=.25*(Math.cos(s+2)+3.8),l=5e4/13*t.nc*t.ncb*C(c*Math.sqrt(i**2+a**2),r[0]+r[1]+1.05*r[2]+.305),u=S(l,.9)*(1.64-.29**t.n)**.73,d=t.nbb*(2*r[0]+r[1]+.05*r[2]),f=S(d/t.aW,.5*t.c*t.z),p=100*S(f,2),m=4/t.c*f*(t.aW+4)*t.flRoot,h=u*f,g=h*t.flRoot,_=B(s*yt),v=Ct(_),y=50*S(t.c*u/(t.aW+4),1/2);return{J:p,C:h,h:_,s:y,Q:m,M:g,H:v}}var kt=new M({id:`cam16-jmh`,cssId:`--cam16-jmh`,name:`CAM16-JMh`,coords:{j:{refRange:[0,100],name:`J`},m:{refRange:[0,105],name:`Colorfulness`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:P,fromBase(e){let t=Ot(e,Et);return[t.J,t.M,t.h]},toBase(e){return Dt({J:e[0],M:e[1],h:e[2]},Et)}});const At=O.D65,jt=216/24389,Mt=24389/27;function Nt(e){let t=e>jt?Math.cbrt(e):(Mt*e+16)/116;return 116*t-16}function Pt(e){return e>8?((e+16)/116)**3:e/Mt}function Ft(e,t){let[n,r,i]=e,a=[],o=0;if(i===0)return[0,0,0];let s=Pt(i);o=i>0?.00379058511492914*i**2+.608983189401032*i+.9155088574762233:9514440756550361e-21*i**2+.08693057439788597*i-21.928975842194614;let c=2e-12,l=15,u=0,d=1/0;for(;u<=l;){a=Dt({J:o,C:r,h:n},t);let e=Math.abs(a[1]-s);if(e | `,` | `,` | `]}}});const zt=Math.PI/180,Bt=[1,.007,.0228];function Vt(e){e[1]<0&&(e=Rt.fromBase(Rt.toBase(e)));let t=Math.log(Math.max(1+Bt[2]*e[1]*Lt.flRoot,1))/Bt[2],n=e[0]*zt,r=t*Math.cos(n),i=t*Math.sin(n);return[e[2],r,i]}function Ht(e,t){[e,t]=j([e,t]);let[n,r,i]=Vt(Rt.from(e)),[a,o,s]=Vt(Rt.from(t));return Math.sqrt((n-a)**2+(r-o)**2+(i-s)**2)}var K={deltaE76:Ee,deltaECMC:ke,deltaE2000:ve,deltaEJz:Ye,deltaEITP:ut,deltaEOK:Ce,deltaEHCT:Ht};function Ut(e){let t=e?Math.floor(Math.log10(Math.abs(e))):0;return Math.max(parseFloat(`1e${t-2}`),1e-6)}const Wt={hct:{method:`hct.c`,jnd:2,deltaEMethod:`hct`,blackWhiteClamp:{}},"hct-tonal":{method:`hct.c`,jnd:0,deltaEMethod:`hct`,blackWhiteClamp:{channel:`hct.t`,min:0,max:100}}};function q(e,{method:t=D.gamut_mapping,space:n=void 0,deltaEMethod:r=``,jnd:i=2,blackWhiteClamp:a={}}={}){if(e=j(e),s(arguments[1])?n=arguments[1]:n||=e.space,n=M.get(n),U(e,n,{epsilon:0}))return e;let o;if(t===`css`)o=Kt(e,{space:n});else{if(t!==`clip`&&!U(e,n)){Object.prototype.hasOwnProperty.call(Wt,t)&&({method:t,jnd:i,deltaEMethod:r,blackWhiteClamp:a}=Wt[t]);let s=ve;if(r!==``){for(let e in K)if(`deltae`+r.toLowerCase()===e.toLowerCase()){s=K[e];break}}let c=q(J(e,n),{method:`clip`,space:n});if(s(e,c)>i){if(Object.keys(a).length===3){let t=M.resolveCoord(a.channel),n=L(J(e,t.space),t.id);if(u(n)&&(n=0),n>=a.max)return J({space:`xyz-d65`,coords:O.D65},e.space);if(n<=a.min)return J({space:`xyz-d65`,coords:[0,0,0]},e.space)}let r=M.resolveCoord(t),c=r.space,l=r.id,d=J(e,c);d.coords.forEach((e,t)=>{u(e)&&(d.coords[t]=0)});let f=r.range||r.refRange,p=f[0],m=Ut(i),h=p,g=L(d,l);for(;g-h>m;){let e=W(d);e=q(e,{space:n,method:`clip`});let t=s(d,e);t-ie.range||[]);o.coords=o.coords.map((t,n)=>{let[r,i]=e[n];return r!==void 0&&(t=Math.max(r,t)),i!==void 0&&(t=Math.min(t,i)),t})}}return n!==e.space&&(o=J(o,e.space)),e.coords=o.coords,e}q.returns=`color`;const Gt={WHITE:{space:H,coords:[1,0,0]},BLACK:{space:H,coords:[0,0,0]}};function Kt(e,{space:t}={}){let n=.02,r=1e-4;e=j(e),!t&&(t=e.space),t=M.get(t);let i=M.get(`oklch`);if(t.isUnbounded)return J(e,t);let a=J(e,i),o=a.coords[0];if(o>=1){let n=J(Gt.WHITE,t);return n.alpha=e.alpha,J(n,t)}if(o<=0){let n=J(Gt.BLACK,t);return n.alpha=e.alpha,J(n,t)}if(U(a,t,{epsilon:0}))return J(a,t);function s(e){let n=J(e,t),r=Object.values(t.coords);return n.coords=n.coords.map((e,t)=>{if(`range`in r[t]){let[n,i]=r[t].range;return b(n,e,i)}return e}),n}let c=0,l=a.coords[1],u=!0,d=W(a),f=s(d),p=Ce(f,d);if(pr;){let e=(c+l)/2;if(d.coords[1]=e,u&&U(d,t,{epsilon:0}))c=e;else if(f=s(d),p=Ce(f,d),pl(e,{precision:t})));let i=[...s];if(r===`color`){let t=n.id||n.ids?.[0]||e.space.id;i.unshift(t)}let o=e.alpha;t!==null&&(o=l(o,{precision:t}));let c=e.alpha>=1||n.noAlpha?``:`${n.commas?`,`:` /`} ${o}`;a=`${r}(${i.join(n.commas?`, `:` `)}${c})`}return a}const Jt=[[.6369580483012914,.14461690358620832,.1688809751641721],[.2627002120112671,.6779980715188708,.05930171646986196],[0,.028072693049087428,1.060985057710791]],Yt=[[1.716651187971268,-.355670783776392,-.25336628137366],[-.666684351832489,1.616481236634939,.0157685458139111],[.017639857445311,-.042770613257809,.942103121235474]];var Xt=new F({id:`rec2020-linear`,cssId:`--rec2020-linear`,name:`Linear REC.2020`,white:`D65`,toXYZ_M:Jt,fromXYZ_M:Yt});const Zt=1.09929682680944,Qt=.018053968510807;var $t=new F({id:`rec2020`,name:`REC.2020`,base:Xt,toBase(e){return e.map(function(e){return e=Qt?Zt*e**.45-(Zt-1):4.5*e})}});const en=[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]],tn=[[2.493496911941425,-.9313836179191239,-.40271078445071684],[-.8294889695615747,1.7626640603183463,.023624685841943577],[.03584583024378447,-.07617238926804182,.9568845240076872]];var nn=new F({id:`p3-linear`,cssId:`--display-p3-linear`,name:`Linear P3`,white:`D65`,toXYZ_M:en,fromXYZ_M:tn});const rn=[[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Y=[[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]];var an=new F({id:`srgb-linear`,name:`Linear sRGB`,white:`D65`,toXYZ_M:rn,fromXYZ_M:Y}),on={aliceblue:[240/255,248/255,1],antiquewhite:[250/255,235/255,215/255],aqua:[0,1,1],aquamarine:[127/255,1,212/255],azure:[240/255,1,1],beige:[245/255,245/255,220/255],bisque:[1,228/255,196/255],black:[0,0,0],blanchedalmond:[1,235/255,205/255],blue:[0,0,1],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,1,0],chocolate:[210/255,105/255,30/255],coral:[1,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[1,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0,1,1],darkblue:[0,0,139/255],darkcyan:[0,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0,100/255,0],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[1,140/255,0],darkorchid:[153/255,50/255,204/255],darkred:[139/255,0,0],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0,206/255,209/255],darkviolet:[148/255,0,211/255],deeppink:[1,20/255,147/255],deepskyblue:[0,191/255,1],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,1],firebrick:[178/255,34/255,34/255],floralwhite:[1,250/255,240/255],forestgreen:[34/255,139/255,34/255],fuchsia:[1,0,1],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,1],gold:[1,215/255,0],goldenrod:[218/255,165/255,32/255],gray:[128/255,128/255,128/255],green:[0,128/255,0],greenyellow:[173/255,1,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,1,240/255],hotpink:[1,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0,130/255],ivory:[1,1,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[1,240/255,245/255],lawngreen:[124/255,252/255,0],lemonchiffon:[1,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,1,1],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[1,182/255,193/255],lightsalmon:[1,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,153/255],lightslategrey:[119/255,136/255,153/255],lightsteelblue:[176/255,196/255,222/255],lightyellow:[1,1,224/255],lime:[0,1,0],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[1,0,1],maroon:[128/255,0,0],mediumaquamarine:[102/255,205/255,170/255],mediumblue:[0,0,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0,250/255,154/255],mediumturquoise:[72/255,209/255,204/255],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,1,250/255],mistyrose:[1,228/255,225/255],moccasin:[1,228/255,181/255],navajowhite:[1,222/255,173/255],navy:[0,0,128/255],oldlace:[253/255,245/255,230/255],olive:[128/255,128/255,0],olivedrab:[107/255,142/255,35/255],orange:[1,165/255,0],orangered:[1,69/255,0],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[1,239/255,213/255],peachpuff:[1,218/255,185/255],peru:[205/255,133/255,63/255],pink:[1,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],purple:[128/255,0,128/255],rebeccapurple:[102/255,51/255,153/255],red:[1,0,0],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[1,245/255,238/255],sienna:[160/255,82/255,45/255],silver:[192/255,192/255,192/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[1,250/255,250/255],springgreen:[0,1,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],teal:[0,128/255,128/255],thistle:[216/255,191/255,216/255],tomato:[1,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],white:[1,1,1],whitesmoke:[245/255,245/255,245/255],yellow:[1,1,0],yellowgreen:[154/255,205/255,50/255]};let sn=[,,,].fill(` | [0, 255]`),cn=[,,,].fill(`[0, 255]`);var X=new F({id:`srgb`,name:`sRGB`,base:an,fromBase:e=>e.map(e=>{let t=e<0?-1:1,n=e*t;return n>.0031308?t*(1.055*n**(1/2.4)-.055):12.92*e}),toBase:e=>e.map(e=>{let t=e<0?-1:1,n=e*t;return n<=.04045?e/12.92:t*((n+.055)/1.055)**2.4}),formats:{rgb:{coords:sn},rgb_number:{name:`rgb`,commas:!0,coords:cn,noAlpha:!0},color:{},rgba:{coords:sn,commas:!0,lastAlpha:!0},rgba_number:{name:`rgba`,commas:!0,coords:cn},hex:{type:`custom`,toGamut:!0,test:e=>/^#([a-f0-9]{3,4}){1,2}$/i.test(e),parse(e){e.length<=5&&(e=e.replace(/[a-f0-9]/gi,`$&$&`));let t=[];return e.replace(/[a-f0-9]{2}/gi,e=>{t.push(parseInt(e,16)/255)}),{spaceId:`srgb`,coords:t.slice(0,3),alpha:t.slice(3)[0]}},serialize:(e,t,{collapse:n=!0}={})=>{t<1&&e.push(t),e=e.map(e=>Math.round(e*255));let r=n&&e.every(e=>e%17==0),i=e.map(e=>r?(e/17).toString(16):e.toString(16).padStart(2,`0`)).join(``);return`#`+i}},keyword:{type:`custom`,test:e=>/^[a-z]+$/i.test(e),parse(e){e=e.toLowerCase();let t={spaceId:`srgb`,coords:null,alpha:1};if(e===`transparent`?(t.coords=on.black,t.alpha=0):t.coords=on[e],t.coords)return t}}}}),ln=new F({id:`p3`,cssId:`display-p3`,name:`P3`,base:nn,fromBase:X.fromBase,toBase:X.toBase});D.display_space=X;let un;if(typeof CSS<`u`&&CSS.supports)for(let e of[z,$t,ln]){let t=e.getMinCoords(),n={space:e,coords:t,alpha:1},r=qt(n);if(CSS.supports(`color`,r)){D.display_space=e;break}}function dn(e,{space:t=D.display_space,...n}={}){let r=qt(e,n);if(typeof CSS>`u`||CSS.supports(`color`,r)||!D.display_space)r=new String(r),r.color=e;else{let i=e,a=e.coords.some(u)||u(e.alpha);if(a&&!(un??=CSS.supports(`color`,`hsl(none 50% 50%)`))&&(i=W(e),i.coords=i.coords.map(d),i.alpha=d(i.alpha),r=qt(i,n),CSS.supports(`color`,r)))return r=new String(r),r.color=i,r;i=J(i,t),r=new String(qt(i,n)),r.color=i}return r}function fn(e,t){return e=j(e),t=j(t),e.space===t.space&&e.alpha===t.alpha&&e.coords.every((e,n)=>e===t.coords[n])}function Z(e){return L(e,[P,`y`])}function pn(e,t){R(e,[P,`y`],t)}function mn(e){Object.defineProperty(e.prototype,`luminance`,{get(){return Z(this)},set(e){pn(this,e)}})}var hn=Object.freeze({__proto__:null,getLuminance:Z,register:mn,setLuminance:pn});function gn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);return r>n&&([n,r]=[r,n]),(n+.05)/(r+.05)}const _n=.56,vn=.57,yn=.62,bn=.65,xn=.022,Sn=1.414,Cn=.1,wn=5e-4,Tn=1.14,En=.027,Dn=1.14;function On(e){return e>=xn?e:e+(xn-e)**Sn}function kn(e){let t=e<0?-1:1,n=Math.abs(e);return t*n**2.4}function An(e,t){t=j(t),e=j(e);let n,r,i,a,o,s;t=J(t,`srgb`),[a,o,s]=t.coords;let c=kn(a)*.2126729+kn(o)*.7151522+kn(s)*.072175;e=J(e,`srgb`),[a,o,s]=e.coords;let l=kn(a)*.2126729+kn(o)*.7151522+kn(s)*.072175,u=On(c),d=On(l),f=d>u;return Math.abs(d-u)0?r-En:r+En,i*100}function jn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);r>n&&([n,r]=[r,n]);let i=n+r;return i===0?0:(n-r)/i}const Mn=5e4;function Nn(e,t){e=j(e),t=j(t);let n=Math.max(Z(e),0),r=Math.max(Z(t),0);return r>n&&([n,r]=[r,n]),r===0?Mn:(n-r)/r}function Pn(e,t){e=j(e),t=j(t);let n=L(e,[z,`l`]),r=L(t,[z,`l`]);return Math.abs(n-r)}const Fn=216/24389,In=24/116,Ln=24389/27;let Rn=O.D65;var zn=new M({id:`lab-d65`,name:`Lab D65`,coords:{l:{refRange:[0,100],name:`Lightness`},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:Rn,base:P,fromBase(e){let t=e.map((e,t)=>e/Rn[t]),n=t.map(e=>e>Fn?Math.cbrt(e):(Ln*e+16)/116);return[116*n[1]-16,500*(n[0]-n[1]),200*(n[1]-n[2])]},toBase(e){let t=[];t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200;let n=[t[0]>In?t[0]**3:(116*t[0]-16)/Ln,e[0]>8?((e[0]+16)/116)**3:e[0]/Ln,t[2]>In?t[2]**3:(116*t[2]-16)/Ln];return n.map((e,t)=>e*Rn[t])},formats:{"lab-d65":{coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}});const Bn=5**.5*.5+.5;function Vn(e,t){e=j(e),t=j(t);let n=L(e,[zn,`l`]),r=L(t,[zn,`l`]),i=Math.abs(n**+Bn-r**+Bn),a=i**(1/Bn)*Math.SQRT2-40;return a<7.5?0:a}var Hn=Object.freeze({__proto__:null,contrastAPCA:An,contrastDeltaPhi:Vn,contrastLstar:Pn,contrastMichelson:jn,contrastWCAG21:gn,contrastWeber:Nn});function Un(e,t,n={}){s(n)&&(n={algorithm:n});let{algorithm:r,...i}=n;if(!r){let e=Object.keys(Hn).map(e=>e.replace(/^contrast/,``)).join(`, `);throw TypeError(`contrast() function needs a contrast algorithm. Please specify one of: ${e}`)}for(let n in e=j(e),t=j(t),Hn)if(`contrast`+r.toLowerCase()===n.toLowerCase())return Hn[n](e,t,i);throw TypeError(`Unknown contrast algorithm: ${r}`)}function Wn(e){let[t,n,r]=I(e,P),i=t+15*n+3*r;return[4*t/i,9*n/i]}function Gn(e){let[t,n,r]=I(e,P),i=t+n+r;return[t/i,n/i]}function Kn(e){Object.defineProperty(e.prototype,`uv`,{get(){return Wn(this)}}),Object.defineProperty(e.prototype,`xy`,{get(){return Gn(this)}})}var qn=Object.freeze({__proto__:null,register:Kn,uv:Wn,xy:Gn});function Jn(e,t,n={}){s(n)&&(n={method:n});let{method:r=D.deltaE,...i}=n;for(let n in K)if(`deltae`+r.toLowerCase()===n.toLowerCase())return K[n](e,t,i);throw TypeError(`Unknown deltaE method: ${r}`)}function Yn(e,t=.25){let n=M.get(`oklch`,`lch`),r=[n,`l`];return R(e,r,e=>e*(1+t))}function Xn(e,t=.25){let n=M.get(`oklch`,`lch`),r=[n,`l`];return R(e,r,e=>e*(1-t))}var Zn=Object.freeze({__proto__:null,darken:Xn,lighten:Yn});function Qn(e,t,n=.5,r={}){[e,t]=[j(e),j(t)],c(n)===`object`&&([n,r]=[.5,n]);let i=er(e,t,r);return i(n)}function $n(e,t,n={}){let r;tr(e)&&([r,n]=[e,t],[e,t]=r.rangeArgs.colors);let{maxDeltaE:i,deltaEMethod:a,steps:o=2,maxSteps:s=1e3,...c}=n;r||([e,t]=[j(e),j(t)],r=er(e,t,c));let l=Jn(e,t),u=i>0?Math.max(o,Math.ceil(l/i)+1):o,d=[];if(s!==void 0&&(u=Math.min(u,s)),u===1)d=[{p:.5,color:r(.5)}];else{let e=1/(u-1);d=Array.from({length:u},(t,n)=>{let i=n*e;return{p:i,color:r(i)}})}if(i>0){let e=d.reduce((e,t,n)=>{if(n===0)return 0;let r=Jn(t.color,d[n-1].color,a);return Math.max(e,r)},0);for(;e>i;){e=0;for(let t=1;te.color),d}function er(e,t,n={}){if(tr(e)){let[n,r]=[e,t];return er(...n.rangeArgs.colors,{...n.rangeArgs.options,...r})}let{space:r,outputSpace:i,progression:a,premultiplied:o}=n;e=j(e),t=j(t),e=W(e),t=W(t);let s={colors:[e,t],options:n};if(r=r?M.get(r):M.registry[D.interpolationSpace]||e.space,i=i?M.get(i):r,e=J(e,r),t=J(t,r),e=q(e),t=q(t),r.coords.h&&r.coords.h.type===`angle`){let i=n.hue=n.hue||`shorter`,a=[r,`h`],[o,s]=[L(e,a),L(t,a)];isNaN(o)&&!isNaN(s)?o=s:isNaN(s)&&!isNaN(o)&&(s=o),[o,s]=fe(i,[o,s]),R(e,a,o),R(t,a,s)}return o&&(e.coords=e.coords.map(t=>t*e.alpha),t.coords=t.coords.map(e=>e*t.alpha)),Object.assign(n=>{n=a?a(n):n;let s=e.coords.map((e,r)=>{let i=t.coords[r];return g(e,i,n)}),c=g(e.alpha,t.alpha,n),l={space:r,coords:s,alpha:c};return o&&(l.coords=l.coords.map(e=>e/c)),i!==r&&(l=J(l,i)),l},{rangeArgs:s})}function tr(e){return c(e)===`function`&&!!e.rangeArgs}D.interpolationSpace=`lab`;function nr(e){e.defineFunction(`mix`,Qn,{returns:`color`}),e.defineFunction(`range`,er,{returns:`function`}),e.defineFunction(`steps`,$n,{returns:`array`})}var rr=Object.freeze({__proto__:null,isRange:tr,mix:Qn,range:er,register:nr,steps:$n}),ir=new M({id:`hsl`,name:`HSL`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:X,fromBase:e=>{let t=Math.max(...e),n=Math.min(...e),[r,i,a]=e,[o,s,c]=[NaN,0,(n+t)/2],l=t-n;if(l!==0){switch(s=c===0||c===1?0:(t-c)/Math.min(c,1-c),t){case r:o=(i-a)/l+(i=360&&(o-=360),[o,s*100,c*100]},toBase:e=>{let[t,n,r]=e;t%=360,t<0&&(t+=360),n/=100,r/=100;function i(e){let i=(e+t/30)%12,a=n*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(i-3,9-i,1))}return[i(0),i(8),i(4)]},formats:{hsl:{coords:[` | `,``,``]},hsla:{coords:[` | `,``,``],commas:!0,lastAlpha:!0}}}),ar=new M({id:`hsv`,name:`HSV`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},v:{range:[0,100],name:`Value`}},base:ir,fromBase(e){let[t,n,r]=e;n/=100,r/=100;let i=r+n*Math.min(r,1-r);return[t,i===0?0:200*(1-r/i),100*i]},toBase(e){let[t,n,r]=e;n/=100,r/=100;let i=r*(1-n/2);return[t,i===0||i===1?0:(r-i)/Math.min(i,1-i)*100,i*100]},formats:{color:{id:`--hsv`,coords:[` | `,` | `,` | `]}}}),or=new M({id:`hwb`,name:`HWB`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},w:{range:[0,100],name:`Whiteness`},b:{range:[0,100],name:`Blackness`}},base:ar,fromBase(e){let[t,n,r]=e;return[t,r*(100-n)/100,100-r]},toBase(e){let[t,n,r]=e;n/=100,r/=100;let i=n+r;if(i>=1){let e=n/i;return[t,0,e*100]}let a=1-r,o=a===0?0:1-n/a;return[t,o*100,a*100]},formats:{hwb:{coords:[` | `,` | `,` | `]}}});const sr=[[.5766690429101305,.1855582379065463,.1882286462349947],[.29734497525053605,.6273635662554661,.07529145849399788],[.02703136138641234,.07068885253582723,.9913375368376388]],cr=[[2.0415879038107465,-.5650069742788596,-.34473135077832956],[-.9692436362808795,1.8759675015077202,.04155505740717557],[.013444280632031142,-.11836239223101838,1.0151749943912054]];var lr=new F({id:`a98rgb-linear`,cssId:`--a98-rgb-linear`,name:`Linear Adobe® 98 RGB compatible`,white:`D65`,toXYZ_M:sr,fromXYZ_M:cr}),ur=new F({id:`a98rgb`,cssId:`a98-rgb`,name:`Adobe® 98 RGB compatible`,base:lr,toBase:e=>e.map(e=>Math.abs(e)**(563/256)*Math.sign(e)),fromBase:e=>e.map(e=>Math.abs(e)**(256/563)*Math.sign(e))});const dr=[[.7977666449006423,.13518129740053308,.0313477341283922],[.2880748288194013,.711835234241873,8993693872564e-17],[0,0,.8251046025104602]],fr=[[1.3457868816471583,-.25557208737979464,-.05110186497554526],[-.5446307051249019,1.5082477428451468,.02052744743642139],[0,0,1.2119675456389452]];var pr=new F({id:`prophoto-linear`,cssId:`--prophoto-rgb-linear`,name:`Linear ProPhoto`,white:`D50`,base:se,toXYZ_M:dr,fromXYZ_M:fr});const mr=1/512,hr=16/512;var gr=new F({id:`prophoto`,cssId:`prophoto-rgb`,name:`ProPhoto`,base:pr,toBase(e){return e.map(e=>ee>=mr?e**(1/1.8):16*e)}}),_r=new M({id:`oklch`,name:`Oklch`,coords:{l:{refRange:[0,1],name:`Lightness`},c:{refRange:[0,.4],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},white:`D65`,base:H,fromBase(e){let[t,n,r]=e,i,a=2e-4;return i=Math.abs(n) | `,` | [0,1]`,` | `]}}});let vr=O.D65;const yr=216/24389,br=24389/27,[xr,Sr]=Wn({space:P,coords:vr});var Cr=new M({id:`luv`,name:`Luv`,coords:{l:{refRange:[0,100],name:`Lightness`},u:{refRange:[-215,215]},v:{refRange:[-215,215]}},white:vr,base:P,fromBase(e){let t=[d(e[0]),d(e[1]),d(e[2])],n=t[1],[r,i]=Wn({space:P,coords:t});if(!Number.isFinite(r)||!Number.isFinite(i))return[0,0,0];let a=n<=yr?br*n:116*Math.cbrt(n)-16;return[a,13*a*(r-xr),13*a*(i-Sr)]},toBase(e){let[t,n,r]=e;if(t===0||u(t))return[0,0,0];n=d(n),r=d(r);let i=n/(13*t)+xr,a=r/(13*t)+Sr,o=t<=8?t/br:((t+16)/116)**3;return[o*(9*i/(4*a)),o,o*((12-3*i-20*a)/(4*a))]},formats:{color:{id:`--luv`,coords:[` | `,` | [-1,1]`,` | [-1,1]`]}}}),wr=new M({id:`lchuv`,name:`LChuv`,coords:{l:{refRange:[0,100],name:`Lightness`},c:{refRange:[0,220],name:`Chroma`},h:{refRange:[0,360],type:`angle`,name:`Hue`}},base:Cr,fromBase(e){let[t,n,r]=e,i,a=.02;return i=Math.abs(n) | `,` | `,` | `]}}});const Tr=216/24389,Er=24389/27,Dr=Y[0][0],Or=Y[0][1],kr=Y[0][2],Ar=Y[1][0],jr=Y[1][1],Mr=Y[1][2],Nr=Y[2][0],Pr=Y[2][1],Fr=Y[2][2];function Ir(e,t,n){let r=t/(Math.sin(n)-e*Math.cos(n));return r<0?1/0:r}function Lr(e){let t=(e+16)**3/1560896,n=t>Tr?t:e/Er,r=n*(284517*Dr-94839*kr),i=n*(838422*kr+769860*Or+731718*Dr),a=n*(632260*kr-126452*Or),o=n*(284517*Ar-94839*Mr),s=n*(838422*Mr+769860*jr+731718*Ar),c=n*(632260*Mr-126452*jr),l=n*(284517*Nr-94839*Fr),u=n*(838422*Fr+769860*Pr+731718*Nr),d=n*(632260*Fr-126452*Pr);return{r0s:r/a,r0i:i*e/a,r1s:r/(a+126452),r1i:(i-769860)*e/(a+126452),g0s:o/c,g0i:s*e/c,g1s:o/(c+126452),g1i:(s-769860)*e/(c+126452),b0s:l/d,b0i:u*e/d,b1s:l/(d+126452),b1i:(u-769860)*e/(d+126452)}}function Rr(e,t){let n=t/360*Math.PI*2,r=Ir(e.r0s,e.r0i,n),i=Ir(e.r1s,e.r1i,n),a=Ir(e.g0s,e.g0i,n),o=Ir(e.g1s,e.g1i,n),s=Ir(e.b0s,e.b0i,n),c=Ir(e.b1s,e.b1i,n);return Math.min(r,i,a,o,s,c)}var zr=new M({id:`hsluv`,name:`HSLuv`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:wr,gamutSpace:X,fromBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(t>99.9999999)i=0,t=100;else if(t<1e-8)i=0,t=0;else{let e=Lr(t),a=Rr(e,r);i=n/a*100}return[r,i,t]},toBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(r>99.9999999)r=100,i=0;else if(r<1e-8)r=0,i=0;else{let e=Lr(r),a=Rr(e,t);i=a/100*n}return[r,i,t]},formats:{color:{id:`--hsluv`,coords:[` | `,` | `,` | `]}}});Y[0][0],Y[0][1],Y[0][2],Y[1][0],Y[1][1],Y[1][2],Y[2][0],Y[2][1],Y[2][2];function Q(e,t){return Math.abs(t)/Math.sqrt(e**2+1)}function Br(e){let t=Q(e.r0s,e.r0i),n=Q(e.r1s,e.r1i),r=Q(e.g0s,e.g0i),i=Q(e.g1s,e.g1i),a=Q(e.b0s,e.b0i),o=Q(e.b1s,e.b1i);return Math.min(t,n,r,i,a,o)}var Vr=new M({id:`hpluv`,name:`HPLuv`,coords:{h:{refRange:[0,360],type:`angle`,name:`Hue`},s:{range:[0,100],name:`Saturation`},l:{range:[0,100],name:`Lightness`}},base:wr,gamutSpace:`self`,fromBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(t>99.9999999)i=0,t=100;else if(t<1e-8)i=0,t=0;else{let e=Lr(t),r=Br(e);i=n/r*100}return[r,i,t]},toBase(e){let[t,n,r]=[d(e[0]),d(e[1]),d(e[2])],i;if(r>99.9999999)r=100,i=0;else if(r<1e-8)r=0,i=0;else{let e=Lr(r),t=Br(e);i=t/100*n}return[r,i,t]},formats:{color:{id:`--hpluv`,coords:[` | `,` | `,` | `]}}});const Hr=203,Ur=2610/2**14,Wr=2**14/2610,Gr=2523/2**5,Kr=2**5/2523,qr=3424/2**12,Jr=2413/2**7,Yr=2392/2**7;var Xr=new F({id:`rec2100pq`,cssId:`rec2100-pq`,name:`REC.2100-PQ`,base:Xt,toBase(e){return e.map(function(e){let t=(Math.max(e**Kr-qr,0)/(Jr-Yr*e**Kr))**Wr;return t*1e4/Hr})},fromBase(e){return e.map(function(e){let t=Math.max(e*Hr/1e4,0),n=qr+Jr*t**Ur,r=1+Yr*t**Ur;return(n/r)**Gr})}});const Zr=.17883277,Qr=.28466892,$r=.55991073,ei=3.7743;var ti=new F({id:`rec2100hlg`,cssId:`rec2100-hlg`,name:`REC.2100-HLG`,referred:`scene`,base:Xt,toBase(e){return e.map(function(e){return e<=.5?e**2/3*ei:(Math.exp((e-$r)/Zr)+Qr)/12*ei})},fromBase(e){return e.map(function(e){return e/=ei,e<=1/12?Math.sqrt(3*e):Zr*Math.log(12*e-Qr)+$r})}});const ni={};E.add(`chromatic-adaptation-start`,e=>{e.options.method&&(e.M=ii(e.W1,e.W2,e.options.method))}),E.add(`chromatic-adaptation-end`,e=>{e.M||=ii(e.W1,e.W2,e.options.method)});function ri({id:e,toCone_M:t,fromCone_M:n}){ni[e]=arguments[0]}function ii(e,t,n=`Bradford`){let r=ni[n],[i,a,s]=o(r.toCone_M,e),[c,l,u]=o(r.toCone_M,t),d=[[c/i,0,0],[0,l/a,0],[0,0,u/s]],f=o(d,r.toCone_M),p=o(r.fromCone_M,f);return p}ri({id:`von Kries`,toCone_M:[[.40024,.7076,-.08081],[-.2263,1.16532,.0457],[0,0,.91822]],fromCone_M:[[1.8599363874558397,-1.1293816185800916,.21989740959619328],[.3611914362417676,.6388124632850422,-6370596838649899e-21],[0,0,1.0890636230968613]]}),ri({id:`Bradford`,toCone_M:[[.8951,.2664,-.1614],[-.7502,1.7135,.0367],[.0389,-.0685,1.0296]],fromCone_M:[[.9869929054667121,-.14705425642099013,.15996265166373122],[.4323052697233945,.5183602715367774,.049291228212855594],[-.00852866457517732,.04004282165408486,.96848669578755]]}),ri({id:`CAT02`,toCone_M:[[.7328,.4296,-.1624],[-.7036,1.6975,.0061],[.003,.0136,.9834]],fromCone_M:[[1.0961238208355142,-.27886900021828726,.18274517938277307],[.4543690419753592,.4735331543074117,.07209780371722911],[-.009627608738429355,-.00569803121611342,1.0153256399545427]]}),ri({id:`CAT16`,toCone_M:[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],fromCone_M:[[1.862067855087233,-1.0112546305316845,.14918677544445172],[.3875265432361372,.6214474419314753,-.008973985167612521],[-.01584149884933386,-.03412293802851557,1.0499644368778496]]}),Object.assign(O,{A:[1.0985,1,.35585],C:[.98074,1,1.18232],D55:[.95682,1,.92149],D75:[.94972,1,1.22638],E:[1,1,1],F2:[.99186,1,.67393],F7:[.95041,1,1.08747],F11:[1.00962,1,.6435]}),O.ACES=[.32168/.33767,1,.34065/.33767];const ai=[[.6624541811085053,.13400420645643313,.1561876870049078],[.27222871678091454,.6740817658111484,.05368951740793705],[-.005574649490394108,.004060733528982826,1.0103391003129971]],oi=[[1.6410233796943257,-.32480329418479,-.23642469523761225],[-.6636628587229829,1.6153315916573379,.016756347685530137],[.011721894328375376,-.008284441996237409,.9883948585390215]];var si=new F({id:`acescg`,cssId:`--acescg`,name:`ACEScg`,coords:{r:{range:[0,65504],name:`Red`},g:{range:[0,65504],name:`Green`},b:{range:[0,65504],name:`Blue`}},referred:`scene`,white:O.ACES,toXYZ_M:ai,fromXYZ_M:oi});const ci=2**-16,li=-.35828683,ui=(Math.log2(65504)+9.72)/17.52;var di=new F({id:`acescc`,cssId:`--acescc`,name:`ACEScc`,coords:{r:{range:[li,ui],name:`Red`},g:{range:[li,ui],name:`Green`},b:{range:[li,ui],name:`Blue`}},referred:`scene`,base:si,toBase(e){let t=-5.279999999999999/17.52;return e.map(function(e){return e<=t?(2**(e*17.52-9.72)-ci)*2:e1||i===void 0?1:i<0?0:i;for(let e=0;ethis.get(e),set:t=>this.set(e,t)})}get spaceId(){return this.space.id}clone(){return new e(this.space,this.coords,this.alpha)}toJSON(){return{spaceId:this.spaceId,coords:this.coords,alpha:this.alpha}}display(...t){let n=dn(this,...t);return n.color=new e(n.color),n}static get(t,...n){return t instanceof e?t:new e(t,...n)}static defineFunction(t,n,r=n){let{instance:i=!0,returns:a}=r,o=function(...t){let r=n(...t);if(a===`color`)r=e.get(r);else if(a===`function`){let t=r;r=function(...n){let r=t(...n);return e.get(r)},Object.assign(r,t)}else a===`array`&&(r=r.map(t=>e.get(t)));return r};t in e||(e[t]=o),i&&(e.prototype[t]=function(...e){return o(this,...e)})}static defineFunctions(t){for(let n in t)e.defineFunction(n,t[n],t[n])}static extend(exports){if(exports.register)exports.register(e);else for(let n in exports)e.defineFunction(n,exports[n])}};$.defineFunctions({get:L,getAll:I,set:R,setAll:oe,to:J,equals:fn,inGamut:U,toGamut:q,distance:Te,toString:qt}),Object.assign($,{util:T,hooks:E,WHITES:O,Space:M,spaces:M.registry,parse:re,defaults:D});for(let e of Object.keys(fi))M.register(fi[e]);for(let e in M.registry)pi(e,M.registry[e]);E.add(`colorspace-init-end`,e=>{pi(e.id,e),e.aliases?.forEach(t=>{pi(t,e)})});function pi(e,t){let n=e.replace(/-/g,`_`);Object.defineProperty($.prototype,n,{get(){let n=this.getAll(e);return typeof Proxy>`u`?n:new Proxy(n,{has:(e,n)=>{try{return M.resolveCoord([t,n]),!0}catch{}return Reflect.has(e,n)},get:(e,n,r)=>{if(n&&typeof n!=`symbol`&&!(n in e)){let{index:r}=M.resolveCoord([t,n]);if(r>=0)return e[r]}return Reflect.get(e,n,r)},set:(n,r,i,a)=>{if(r&&typeof r!=`symbol`&&!(r in n)||r>=0){let{index:a}=M.resolveCoord([t,r]);if(a>=0)return n[a]=i,this.setAll(e,n),!0}return Reflect.set(n,r,i,a)}})},set(t){this.setAll(e,t)},configurable:!0,enumerable:!0})}$.extend(K),$.extend({deltaE:Jn}),Object.assign($,{deltaEMethods:K}),$.extend(Zn),$.extend({contrast:Un}),$.extend(qn),$.extend(hn),$.extend(rr),$.extend(Hn);function mi(e,t){return async()=>{let n=a(()=>{let t=document.querySelector(e);if(!t)throw Error(`Widgets element not found`);return t},{retry:10,retryDelay:1e3}),r=await n();return window.getComputedStyle(r).getPropertyValue(t)}}function hi(e){return async()=>{if(typeof e==`string`)return e;{let t=n();return t.value?e.dark:e.light}}}function gi(e){async function t(){`document`in globalThis&&globalThis.document!=null&&`window`in globalThis&&globalThis.window!=null&&document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,new $(await e()).to(`srgb`).toString({format:`hex`}))}return{updateThemeColor:t}}export{mi as b,hi as c,gi as d}; \ No newline at end of file diff --git a/assets/together-ai-EVG40fRk.js b/assets/together-ai-CQqUN16J.js similarity index 96% rename from assets/together-ai-EVG40fRk.js rename to assets/together-ai-CQqUN16J.js index 14abd68f99e498a2537154a549965083398d28ae..045b68bf631ccfda65c09cff817fc4f7fda608a7 100644 --- a/assets/together-ai-EVG40fRk.js +++ b/assets/together-ai-CQqUN16J.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`together-ai`;var x=a({__name:`together-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`togetherapi-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`together-ai`;var x=a({__name:`together-ai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`togetherapi-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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/transformers.web-DwlcaNlo.js b/assets/transformers.web-B7NywNTw.js similarity index 99% rename from assets/transformers.web-DwlcaNlo.js rename to assets/transformers.web-B7NywNTw.js index bdb7a1bc5249739334dc7181c97b1a0a8cfea11d..a8534e3271270a58f5967143d44ff3a835a4dc70 100644 --- a/assets/transformers.web-DwlcaNlo.js +++ b/assets/transformers.web-B7NywNTw.js @@ -1,4 +1,4 @@ -import{eq as e,er as t}from"./index-BqrqTEsQ.js";const n=new Map,r=[],i=(e,t,i)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let a=n.get(e);if(a===void 0)n.set(e,{backend:t,priority:i});else if(a.priority>i)return;else if(a.priority===i&&a.backend!==t)throw Error(`cannot register backend "${e}" using priority ${i}`);if(i>=0){let t=r.indexOf(e);t!==-1&&r.splice(t,1);for(let t=0;t{let t=n.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}}},o=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),i=n.length===0?r:n,o,s=[],c=new Set;for(let e of i){let t=await a(e);typeof t==`string`?s.push({name:e,err:t}):(o||=t,o===t&&c.add(e))}if(!o)throw Error(`no available backend found. ERR: ${s.map(e=>`[${e.name}] ${e.err}`).join(`, `)}`);for(let{name:e,err:t}of s)n.includes(e)&&console.warn(`removing requested execution provider "${e}" from session options because it is not available: ${t}`);let l=t.filter(e=>c.has(typeof e==`string`?e:e.name));return[o,new Proxy(e,{get:(e,t)=>t===`executionProviders`?l:Reflect.get(e,t)})]},s=`1.22.0`;let c=`warning`;const l={wasm:{},webgl:{},webgpu:{},versions:{common:s},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}`);c=e}},get logLevel(){return c}};Object.defineProperty(l,`logLevel`,{enumerable:!0});const u=l,d=(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,p(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(p(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return p(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},h=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t,o=[1,r,n,4];return new T({location:`texture`,type:`float32`,texture:e,dims:o,download:i,dispose:a})},g=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new T({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},_=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new T({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},v=(e,t,n)=>new T({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),y=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),b=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);let x=!1;const S=()=>{if(!x){x=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(y.set(`int64`,BigInt64Array),b.set(BigInt64Array,`int64`)),t&&(y.set(`uint64`,BigUint64Array),b.set(BigUint64Array,`uint64`)),r?(y.set(`float16`,n),b.set(n,`float16`)):y.set(`float16`,Uint16Array)}},C=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new T(e.type,e.data,t);case`cpu-pinned`:return new T({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new T({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new T({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new T({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var T=class{constructor(e,t,n){S();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=y.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=y.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=b.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=C(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 m(e,t)}static fromTexture(e,t){return h(e,t)}static fromGpuBuffer(e,t){return g(e,t)}static fromMLTensor(e,t){return _(e,t)}static fromPinnedBuffer(e,t,n){return v(e,t,n)}toDataURL(e){return d(this,e)}toImageData(e){return f(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 w(this,e)}};const E=T,D=(e,t)=>{(l.trace===void 0?!l.wasm.trace:!l.trace)||console.timeStamp(`${e}::ORT::${t}`)},O=(e,t)=>{let n=Error().stack?.split(/\r\n|\r|\n/g)||[],r=!1;for(let i=0;i{(l.trace===void 0?!l.wasm.trace:!l.trace)||O(`BEGIN`,e)},A=e=>{(l.trace===void 0?!l.wasm.trace:!l.trace)||O(`END`,e)};var ee=class e{constructor(e){this.handler=e}async run(e,t,n){k();let r={},i={};if(typeof e!=`object`||!e||e instanceof E||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 E)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 E)&&(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 E?s[e]=t:s[e]=new E(t.type,t.data,t.dims)}return A(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){k();let a,s={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)s=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)s=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,o=0,c=t.byteLength;if(typeof n==`object`&&n)s=n;else if(typeof n==`number`){if(o=n,!Number.isSafeInteger(o))throw RangeError(`'byteOffset' must be an integer.`);if(o<0||o>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-o,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||o+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-o}].`);if(typeof i==`object`&&i)s=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,o,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[c,l]=await o(s),u=await c.createInferenceSessionHandler(a,l);return A(),new e(u)}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 te=ee;var ne={};e(ne,{InferenceSession:()=>te,TRACE:()=>D,TRACE_FUNC_BEGIN:()=>k,TRACE_FUNC_END:()=>A,Tensor:()=>E,env:()=>u,registerBackend:()=>i});var re={};e(re,{InferenceSession:()=>Ge,TRACE:()=>B,TRACE_FUNC_BEGIN:()=>Ve,TRACE_FUNC_END:()=>V,Tensor:()=>Re,default:()=>rf,env:()=>L,registerBackend:()=>pe}); +import{eq as e,er as t}from"./index-D1IGsMK6.js";const n=new Map,r=[],i=(e,t,i)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let a=n.get(e);if(a===void 0)n.set(e,{backend:t,priority:i});else if(a.priority>i)return;else if(a.priority===i&&a.backend!==t)throw Error(`cannot register backend "${e}" using priority ${i}`);if(i>=0){let t=r.indexOf(e);t!==-1&&r.splice(t,1);for(let t=0;t{let t=n.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}}},o=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),i=n.length===0?r:n,o,s=[],c=new Set;for(let e of i){let t=await a(e);typeof t==`string`?s.push({name:e,err:t}):(o||=t,o===t&&c.add(e))}if(!o)throw Error(`no available backend found. ERR: ${s.map(e=>`[${e.name}] ${e.err}`).join(`, `)}`);for(let{name:e,err:t}of s)n.includes(e)&&console.warn(`removing requested execution provider "${e}" from session options because it is not available: ${t}`);let l=t.filter(e=>c.has(typeof e==`string`?e:e.name));return[o,new Proxy(e,{get:(e,t)=>t===`executionProviders`?l:Reflect.get(e,t)})]},s=`1.22.0`;let c=`warning`;const l={wasm:{},webgl:{},webgpu:{},versions:{common:s},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}`);c=e}},get logLevel(){return c}};Object.defineProperty(l,`logLevel`,{enumerable:!0});const u=l,d=(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,p(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(p(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return p(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},h=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t,o=[1,r,n,4];return new T({location:`texture`,type:`float32`,texture:e,dims:o,download:i,dispose:a})},g=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new T({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},_=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new T({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},v=(e,t,n)=>new T({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),y=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),b=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);let x=!1;const S=()=>{if(!x){x=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(y.set(`int64`,BigInt64Array),b.set(BigInt64Array,`int64`)),t&&(y.set(`uint64`,BigUint64Array),b.set(BigUint64Array,`uint64`)),r?(y.set(`float16`,n),b.set(n,`float16`)):y.set(`float16`,Uint16Array)}},C=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new T(e.type,e.data,t);case`cpu-pinned`:return new T({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new T({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new T({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new T({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var T=class{constructor(e,t,n){S();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=y.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=y.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=b.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=C(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 m(e,t)}static fromTexture(e,t){return h(e,t)}static fromGpuBuffer(e,t){return g(e,t)}static fromMLTensor(e,t){return _(e,t)}static fromPinnedBuffer(e,t,n){return v(e,t,n)}toDataURL(e){return d(this,e)}toImageData(e){return f(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 w(this,e)}};const E=T,D=(e,t)=>{(l.trace===void 0?!l.wasm.trace:!l.trace)||console.timeStamp(`${e}::ORT::${t}`)},O=(e,t)=>{let n=Error().stack?.split(/\r\n|\r|\n/g)||[],r=!1;for(let i=0;i{(l.trace===void 0?!l.wasm.trace:!l.trace)||O(`BEGIN`,e)},A=e=>{(l.trace===void 0?!l.wasm.trace:!l.trace)||O(`END`,e)};var ee=class e{constructor(e){this.handler=e}async run(e,t,n){k();let r={},i={};if(typeof e!=`object`||!e||e instanceof E||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 E)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 E)&&(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 E?s[e]=t:s[e]=new E(t.type,t.data,t.dims)}return A(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){k();let a,s={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)s=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)s=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,o=0,c=t.byteLength;if(typeof n==`object`&&n)s=n;else if(typeof n==`number`){if(o=n,!Number.isSafeInteger(o))throw RangeError(`'byteOffset' must be an integer.`);if(o<0||o>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-o,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||o+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-o}].`);if(typeof i==`object`&&i)s=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,o,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[c,l]=await o(s),u=await c.createInferenceSessionHandler(a,l);return A(),new e(u)}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 te=ee;var ne={};e(ne,{InferenceSession:()=>te,TRACE:()=>D,TRACE_FUNC_BEGIN:()=>k,TRACE_FUNC_END:()=>A,Tensor:()=>E,env:()=>u,registerBackend:()=>i});var re={};e(re,{InferenceSession:()=>Ge,TRACE:()=>B,TRACE_FUNC_BEGIN:()=>Ve,TRACE_FUNC_END:()=>V,Tensor:()=>Re,default:()=>rf,env:()=>L,registerBackend:()=>pe}); /*! * ONNX Runtime Web v1.22.0-dev.20250409-89f8206ba4 * Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/assets/valibot-DBCeetIe-Deu5LT3V.js b/assets/valibot-DBCeetIe-B3VjNc-Q.js similarity index 69% rename from assets/valibot-DBCeetIe-Deu5LT3V.js rename to assets/valibot-DBCeetIe-B3VjNc-Q.js index e2a0d50e6e3aad772b35c7845ed26faead441939..a3ccb5da03f65135a3d034f8454195003b3f2793 100644 --- a/assets/valibot-DBCeetIe-Deu5LT3V.js +++ b/assets/valibot-DBCeetIe-B3VjNc-Q.js @@ -1 +1 @@ -import{bQ as e,d6 as t}from"./index-BqrqTEsQ.js";const n=async()=>{let{toJsonSchema:n}=await e(t(()=>import(`./dist-tewfm9Ec.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{bQ as e,d6 as t}from"./index-D1IGsMK6.js";const n=async()=>{let{toJsonSchema:n}=await e(t(()=>import(`./dist-tewfm9Ec.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/vibrant-Byz235YP.js b/assets/vibrant-BT2fm70_.js similarity index 91% rename from assets/vibrant-Byz235YP.js rename to assets/vibrant-BT2fm70_.js index 0a2ba6aceb97e774bc31fb7259affa3d6c8850f8..fa80a25667fa104193f21f5a179f0a9b8462bee1 100644 --- a/assets/vibrant-Byz235YP.js +++ b/assets/vibrant-BT2fm70_.js @@ -1 +1 @@ -import{b as e}from"./InputFile-ClfQXb90.js";import{dQ as t,dT as n,dV as r,dW as i,dY as a,dZ as o,e5 as s,e6 as c,ec as l,eg as u,ek as d,en as f,eo as p}from"./index-BqrqTEsQ.js";import{b as m}from"./browser-bFm1l1qg.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=o({__name:`vibrant`,setup(o){let x=u([]),S=u(),C=u([]),w=u([]);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 l(x,e=>{T(e[0])},{deep:!0}),(o,l)=>(s(),i(`div`,h,[n(`div`,g,[(s(!0),i(t,null,c(C.value,(e,t)=>(s(),i(`div`,{key:t,style:f({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),n(`div`,_,p(w.value),1),n(`div`,v,[a(d(e),{modelValue:x.value,"onUpdate:modelValue":l[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),n(`div`,y,[S.value?(s(),i(`img`,{key:0,src:S.value.src,"h-full":``,"w-full":``,"object-contain":``},null,8,b)):r(``,!0)])]))}}),S=x;export{S as default}; \ No newline at end of file +import{b as e}from"./InputFile-CrEM0anr.js";import{dQ as t,dT as n,dV as r,dW as i,dY as a,dZ as o,e5 as s,e6 as c,ec as l,eg as u,ek as d,en as f,eo as p}from"./index-D1IGsMK6.js";import{b as m}from"./browser-bFm1l1qg.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=o({__name:`vibrant`,setup(o){let x=u([]),S=u(),C=u([]),w=u([]);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 l(x,e=>{T(e[0])},{deep:!0}),(o,l)=>(s(),i(`div`,h,[n(`div`,g,[(s(!0),i(t,null,c(C.value,(e,t)=>(s(),i(`div`,{key:t,style:f({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),n(`div`,_,p(w.value),1),n(`div`,v,[a(d(e),{modelValue:x.value,"onUpdate:modelValue":l[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),n(`div`,y,[S.value?(s(),i(`img`,{key:0,src:S.value.src,"h-full":``,"w-full":``,"object-contain":``},null,8,b)):r(``,!0)])]))}}),S=x;export{S as default}; \ No newline at end of file diff --git a/assets/volcengine-B8eQhXRx.js b/assets/volcengine-Br1b00Sw.js similarity index 97% rename from assets/volcengine-B8eQhXRx.js rename to assets/volcengine-Br1b00Sw.js index b9d789008b7b2111dbc2e026bcc1592c7c1ef627..ef4c313819d570a241b5774af0c84780ab5f3fc0 100644 --- a/assets/volcengine-B8eQhXRx.js +++ b/assets/volcengine-Br1b00Sw.js @@ -1 +1 @@ -import{cM as e,cP as t,d7 as n,dS as r,dT as i,dU as a,dY as o,dZ as s,e as c,e3 as l,e5 as u,ec as d,ed as f,eg as p,ek as m,f as h,u as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=s({__name:`volcengine`,setup(s){let y=p(1),C=g(),w=_(),{providers:T}=n(w),{t:E}=v(),D=r({get:()=>(T.value[x]?.app)?.appId||``,set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=r(()=>!!T.value[x]?.apiKey),k=r(()=>C.availableVoices[x]||[]);async function A(e,t,n){let r=await 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 l(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}),(n,r)=>(u(),a(m(c),{"provider-id":x,"default-model":S},{"basic-settings":f(()=>[i(`div`,b,[o(m(t),{modelValue:D.value,"onUpdate:modelValue":r[0]||=e=>D.value=e,label:m(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:m(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":f(()=>[o(m(e),{modelValue:y.value,"onUpdate:modelValue":r[1]||=e=>y.value=e,label:m(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:f(()=>[o(m(h),{"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{cM as e,cP as t,d7 as n,dS as r,dT as i,dU as a,dY as o,dZ as s,e as c,e3 as l,e5 as u,ec as d,ed as f,eg as p,ek as m,f as h,u as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=s({__name:`volcengine`,setup(s){let y=p(1),C=g(),w=_(),{providers:T}=n(w),{t:E}=v(),D=r({get:()=>(T.value[x]?.app)?.appId||``,set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=r(()=>!!T.value[x]?.apiKey),k=r(()=>C.availableVoices[x]||[]);async function A(e,t,n){let r=await 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 l(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}),(n,r)=>(u(),a(m(c),{"provider-id":x,"default-model":S},{"basic-settings":f(()=>[i(`div`,b,[o(m(t),{modelValue:D.value,"onUpdate:modelValue":r[0]||=e=>D.value=e,label:m(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:m(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":f(()=>[o(m(e),{modelValue:y.value,"onUpdate:modelValue":r[1]||=e=>y.value=e,label:m(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:f(()=>[o(m(h),{"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-CVd0KgMK.js b/assets/xai-a3vK2rb5.js similarity index 96% rename from assets/xai-CVd0KgMK.js rename to assets/xai-a3vK2rb5.js index b30920dfd23b349c2c975090e1b6896d5e474787..fbcba8b92843e4d73ae94553d1614d36e1a4c3fa 100644 --- a/assets/xai-CVd0KgMK.js +++ b/assets/xai-a3vK2rb5.js @@ -1 +1 @@ -import{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-BqrqTEsQ.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`xai`;var x=a({__name:`xai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`xai-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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{d5 as e,d7 as t,dS as n,dU as r,dY as i,dZ as a,e3 as o,e5 as s,ec as c,ed as l,ek as u,g as d,h as f,i as p,j as m,k as h,l as g,x as _,z as v}from"./index-D1IGsMK6.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`xai`;var x=a({__name:`xai`,setup(a){let{t:y}=v(),x=e(),S=_(),{providers:C}=t(S),w=n(()=>S.getProviderMetadata(b)),T=n({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=n({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});o(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),c([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,t)=>(s(),r(u(d),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>u(x).back()},{default:l(()=>[i(u(f),null,{default:l(()=>[i(u(p),{title:u(y)(`settings.pages.providers.common.section.basic.title`),description:u(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:l(()=>[i(u(h),{modelValue:T.value,"onUpdate:modelValue":t[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`xai-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),i(u(g),{title:u(y)(`settings.pages.providers.common.section.advanced.title`)},{default:l(()=>[i(u(m),{modelValue:E.value,"onUpdate:modelValue":t[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-Bw_60DVU-BAdMglWk.js b/assets/zod-Bw_60DVU-CpZ2MqKY.js similarity index 77% rename from assets/zod-Bw_60DVU-BAdMglWk.js rename to assets/zod-Bw_60DVU-CpZ2MqKY.js index 5def56fdddca5e0103c7a77548ec963dfc6d02dc..ccfc5c17b00fe0055d7ead2533a68013cf12e001 100644 --- a/assets/zod-Bw_60DVU-BAdMglWk.js +++ b/assets/zod-Bw_60DVU-CpZ2MqKY.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/core-BFxHI69x.js","assets/index-BqrqTEsQ.js","assets/index-DStbve3n.css"])))=>i.map(i=>d[i]); -import{bP as e,d6 as t}from"./index-BqrqTEsQ.js";const n=async()=>{let n=t=>{throw Error(`xsschema: Missing zod v4 dependencies "zod". see ${e}`)},r=t=>{throw Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${e}`)};try{let{toJSONSchema:e}=await t(async()=>{let{toJSONSchema:e}=await import(`./core-BFxHI69x.js`);return{toJSONSchema:e}},__vite__mapDeps([0,1,2]));n=e}catch(e){e instanceof Error&&console.error(e.message)}try{let{zodToJsonSchema:e}=await t(async()=>{let{zodToJsonSchema:e}=await import(`./esm-CNGDxrUe.js`);return{zodToJsonSchema:e}},[]);r=e}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 +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/core-BnIgvjB7.js","assets/index-D1IGsMK6.js","assets/index-DStbve3n.css"])))=>i.map(i=>d[i]); +import{bP as e,d6 as t}from"./index-D1IGsMK6.js";const n=async()=>{let n=t=>{throw Error(`xsschema: Missing zod v4 dependencies "zod". see ${e}`)},r=t=>{throw Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${e}`)};try{let{toJSONSchema:e}=await t(async()=>{let{toJSONSchema:e}=await import(`./core-BnIgvjB7.js`);return{toJSONSchema:e}},__vite__mapDeps([0,1,2]));n=e}catch(e){e instanceof Error&&console.error(e.message)}try{let{zodToJsonSchema:e}=await t(async()=>{let{zodToJsonSchema:e}=await import(`./esm-CNGDxrUe.js`);return{zodToJsonSchema:e}},[]);r=e}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 f93827c35801fc571aa893317d701feebc8c2def..9b88e89b934ac9fd77511084b1fb2ad3f8d962e1 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,7 @@ src="/remote-assets/page-external-data/js/script.js" > - + diff --git a/sw.js b/sw.js index 23caa5c0c536e7e55d4da0e652c776ed00512895..435491c05645465783071dd613a3ea86e6428116 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 a=s=>l(s,n),o={module:{uri:n},exports:u,require:a};e[n]=Promise.all(r.map(s=>o[s]||a(s))).then(s=>(i(...s),u))}}define(["./workbox-3aa584b4"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/__vite-browser-external-BFBX2XSs.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-BcDABPW0.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-NEutZrhx.js",revision:null},{url:"assets/_...all_-cevFm6qe.js",revision:null},{url:"assets/airi-card-CFHe9iJm.js",revision:null},{url:"assets/alibaba-cloud-model-studio-COHJiWXk.js",revision:null},{url:"assets/AnimatedWave-CPwzka9L.js",revision:null},{url:"assets/AnimatedWave-CW4ij04Q.css",revision:null},{url:"assets/anthropic-CUlO-W3r.js",revision:null},{url:"assets/appearance-BIDEdXyM.js",revision:null},{url:"assets/arktype-C-GObzDh-CYoI0Osm.js",revision:null},{url:"assets/audio-DMDuWRzR.js",revision:null},{url:"assets/audio-record-Cosszn5h.js",revision:null},{url:"assets/azure-ai-foundry-ByIXKIr5.js",revision:null},{url:"assets/background-gradient-blending-6ss5Fg2-.css",revision:null},{url:"assets/background-gradient-blending-Dc6neL0J.js",revision:null},{url:"assets/background-remove-CfzWeaPN.js",revision:null},{url:"assets/Basic-6NscZoIc.js",revision:null},{url:"assets/browser-bFm1l1qg.js",revision:null},{url:"assets/browser-DPkKpj_5.js",revision:null},{url:"assets/CardCreate-1xbHbXXu.js",revision:null},{url:"assets/CardCreate-BgwAv5Kv.js",revision:null},{url:"assets/CardCreationDialog-gKrswwkx.js",revision:null},{url:"assets/CardCreationDialog-mu1VLVYi.js",revision:null},{url:"assets/CardCreationDialog-UIvAa4Bx.css",revision:null},{url:"assets/CardDetailDialog-C-yU3tpO.js",revision:null},{url:"assets/CardDetailDialog-CFL4TUGk.js",revision:null},{url:"assets/CardListItem-CckqVk0d.js",revision:null},{url:"assets/CardListItem-H_UE8PfW.js",revision:null},{url:"assets/chat-BNaBa8nr.js",revision:null},{url:"assets/cloudflare-workers-ai-BipstjwR.js",revision:null},{url:"assets/color-scheme-B0eJBuo7.js",revision:null},{url:"assets/color-scheme-r2m6hu6X.css",revision:null},{url:"assets/consciousness-CCWI3pUe.js",revision:null},{url:"assets/core-BFxHI69x.js",revision:null},{url:"assets/deepseek-cNrwxt-l.js",revision:null},{url:"assets/default-browser-ZWdN_TIR.js",revision:null},{url:"assets/default-CZpOWzAg.js",revision:null},{url:"assets/default-node-DyYIhEXm.js",revision:null},{url:"assets/delays-_8LoyGoG.js",revision:null},{url:"assets/DeleteCardDialog-BGVlI37-.js",revision:null},{url:"assets/DeleteCardDialog-Cb8qVSVb.js",revision:null},{url:"assets/developer-Bwq9EOSe.js",revision:null},{url:"assets/DialogTitle-DcCyxlil.js",revision:null},{url:"assets/dist-tewfm9Ec.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-P5KShsBk.js",revision:null},{url:"assets/effect--zg3C1LQ-DHHO_5U1.js",revision:null},{url:"assets/elevenlabs-9MwHykd2.js",revision:null},{url:"assets/emotions-DH9tsdiE.js",revision:null},{url:"assets/esm-CNGDxrUe.js",revision:null},{url:"assets/featherless-ai-B299Ssok.js",revision:null},{url:"assets/filter-message-CSSXhkMx.js",revision:null},{url:"assets/fireworks-ai-Ld2MWu8B.js",revision:null},{url:"assets/general-DSsVebJ9.js",revision:null},{url:"assets/gesture-circle-CtlpzRIp.js",revision:null},{url:"assets/google-generative-ai-DZieEaGY.js",revision:null},{url:"assets/HeaderLink-4n3ShASi.css",revision:null},{url:"assets/HeaderLink-D6jJjgut.js",revision:null},{url:"assets/hearing-CP0gq0in.js",revision:null},{url:"assets/home-yZcli0R-.js",revision:null},{url:"assets/icon-animation-PuVIGmi0.js",revision:null},{url:"assets/IconAnimation-eACnDPFz.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-y7UfzUtG.js",revision:null},{url:"assets/import-url-browser-D0zVIqhu.js",revision:null},{url:"assets/import-url-browser-DIrMeXJ_.js",revision:null},{url:"assets/import-url-node-Dl605kiZ.js",revision:null},{url:"assets/index-BqrqTEsQ.js",revision:null},{url:"assets/index-DStbve3n.css",revision:null},{url:"assets/InputFile-ClfQXb90.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-Bo9CmtPV.js",revision:null},{url:"assets/memory-long-term-BXPjIM3D.js",revision:null},{url:"assets/memory-short-term-D8vgusDg.js",revision:null},{url:"assets/messages-CgceS_ap.js",revision:null},{url:"assets/microsoft-speech-Di7D-Awi.js",revision:null},{url:"assets/mistral-ai-DaM_lNzJ.js",revision:null},{url:"assets/models-BlSfecLY.js",revision:null},{url:"assets/modules-DvaXnAgf.js",revision:null},{url:"assets/moonshot-ai-CzeRIZgw.js",revision:null},{url:"assets/novita-ai-B5_QZuND.js",revision:null},{url:"assets/ollama-CIvy2V5T.js",revision:null},{url:"assets/openai-audio-speech-1dVJvi78.js",revision:null},{url:"assets/openai-audio-transcription-BB_pETq3.js",revision:null},{url:"assets/openai-CcptUYcJ.js",revision:null},{url:"assets/openrouter-ai-Cy1v1-nn.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-CD0qLry_.js",revision:null},{url:"assets/plain-cTemKD3O.js",revision:null},{url:"assets/player2-speech-C91OFlCt.js",revision:null},{url:"assets/player2-Xoxrm0dX.js",revision:null},{url:"assets/polaroid-gAmjoIyd.js",revision:null},{url:"assets/process.worklet-CF6Ao8XG.js",revision:null},{url:"assets/providers-CNT7nN_l.js",revision:null},{url:"assets/queue-BhpwXiAb.js",revision:null},{url:"assets/route-block-gWR0cCIm.js",revision:null},{url:"assets/scene-TS-s_kmR.js",revision:null},{url:"assets/Scenes-2Kp3NQ_V.js",revision:null},{url:"assets/settings-DM_cxWPe.js",revision:null},{url:"assets/settings-DWeVUT02.js",revision:null},{url:"assets/speech-DJZRaUxH.js",revision:null},{url:"assets/stage-BC0FtFQ5.js",revision:null},{url:"assets/stage-CaqiKODx.js",revision:null},{url:"assets/sury-s6Akl-oc-SKuB4Eh8.js",revision:null},{url:"assets/Textarea-CQXjp80_.js",revision:null},{url:"assets/theme-color-DipcFg9a.js",revision:null},{url:"assets/together-ai-EVG40fRk.js",revision:null},{url:"assets/transformers.web-DwlcaNlo.js",revision:null},{url:"assets/valibot-DBCeetIe-Deu5LT3V.js",revision:null},{url:"assets/vibrant-Byz235YP.js",revision:null},{url:"assets/volcengine-B8eQhXRx.js",revision:null},{url:"assets/worker-_4r9VDQB.js",revision:null},{url:"assets/xai-CVd0KgMK.js",revision:null},{url:"assets/zod-Bw_60DVU-BAdMglWk.js",revision:null},{url:"index.html",revision:"d3dddacf37a360ecebab2c1d9e0257ae"},{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:"0a5a207cc5b76af4bd35f0b587dd1902"}],{}),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-DgcibqnP.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-BcDABPW0.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-NEutZrhx.js",revision:null},{url:"assets/_...all_-Cod6qNfE.js",revision:null},{url:"assets/airi-card-Q3k0tIwN.js",revision:null},{url:"assets/alibaba-cloud-model-studio-3eKy2f7l.js",revision:null},{url:"assets/AnimatedWave-Ctq8iFvb.js",revision:null},{url:"assets/AnimatedWave-CW4ij04Q.css",revision:null},{url:"assets/anthropic-BFqros6g.js",revision:null},{url:"assets/appearance-Be6MT6gl.js",revision:null},{url:"assets/arktype-C-GObzDh-CYoI0Osm.js",revision:null},{url:"assets/audio-C8SmZBs_.js",revision:null},{url:"assets/audio-record-Dm-nsCuP.js",revision:null},{url:"assets/azure-ai-foundry-BUoQbmRd.js",revision:null},{url:"assets/background-gradient-blending-6ss5Fg2-.css",revision:null},{url:"assets/background-gradient-blending-BFp2Vmjq.js",revision:null},{url:"assets/background-remove-D40tSYmj.js",revision:null},{url:"assets/Basic-JYGX2D37.js",revision:null},{url:"assets/browser-bFm1l1qg.js",revision:null},{url:"assets/browser-DPkKpj_5.js",revision:null},{url:"assets/CardCreate-BnRABIEk.js",revision:null},{url:"assets/CardCreate-mWaFTW4v.js",revision:null},{url:"assets/CardCreationDialog-qGwMbPGi.js",revision:null},{url:"assets/CardCreationDialog-UIvAa4Bx.css",revision:null},{url:"assets/CardCreationDialog-xeCipFWo.js",revision:null},{url:"assets/CardDetailDialog-42_DgObP.js",revision:null},{url:"assets/CardDetailDialog-B-AcpLM4.js",revision:null},{url:"assets/CardListItem-4sQIRPZf.js",revision:null},{url:"assets/CardListItem-DDliOhdn.js",revision:null},{url:"assets/chat-BpPMC4QJ.js",revision:null},{url:"assets/cloudflare-workers-ai-ZTPk31zu.js",revision:null},{url:"assets/color-scheme-CvisfZEM.js",revision:null},{url:"assets/color-scheme-r2m6hu6X.css",revision:null},{url:"assets/consciousness-D-yG2Hnx.js",revision:null},{url:"assets/core-BnIgvjB7.js",revision:null},{url:"assets/deepseek-Cqa3r5er.js",revision:null},{url:"assets/default-browser-ZWdN_TIR.js",revision:null},{url:"assets/default-BxAUVEXe.js",revision:null},{url:"assets/default-node-BtQ98lhg.js",revision:null},{url:"assets/delays-DIhxEe_R.js",revision:null},{url:"assets/DeleteCardDialog-Bc1chq43.js",revision:null},{url:"assets/DeleteCardDialog-BdkMZt0z.js",revision:null},{url:"assets/developer-50jFEq_D.js",revision:null},{url:"assets/DialogTitle-CaB1D00q.js",revision:null},{url:"assets/dist-tewfm9Ec.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-P5KShsBk.js",revision:null},{url:"assets/effect--zg3C1LQ-BJsXVcIa.js",revision:null},{url:"assets/elevenlabs-qXHu46wy.js",revision:null},{url:"assets/emotions-De0hw4UU.js",revision:null},{url:"assets/esm-CNGDxrUe.js",revision:null},{url:"assets/featherless-ai-MWKHOxPl.js",revision:null},{url:"assets/filter-message-C0Hk6aB0.js",revision:null},{url:"assets/fireworks-ai-Ba-jqHwG.js",revision:null},{url:"assets/general-yjkLwtKb.js",revision:null},{url:"assets/gesture-circle-DTzEVNvY.js",revision:null},{url:"assets/google-generative-ai-B99V0T18.js",revision:null},{url:"assets/HeaderLink-4n3ShASi.css",revision:null},{url:"assets/HeaderLink-CSWG6G--.js",revision:null},{url:"assets/hearing-HxzT9Wif.js",revision:null},{url:"assets/home-VSi7cQy-.js",revision:null},{url:"assets/icon-animation-DPHfIEG5.js",revision:null},{url:"assets/IconAnimation-9_sNHXpR.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-D_-1HjPP.js",revision:null},{url:"assets/import-url-browser-D0zVIqhu.js",revision:null},{url:"assets/import-url-browser-DIrMeXJ_.js",revision:null},{url:"assets/import-url-node-Dl605kiZ.js",revision:null},{url:"assets/index-D1IGsMK6.js",revision:null},{url:"assets/index-DStbve3n.css",revision:null},{url:"assets/InputFile-CrEM0anr.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-ChG-vOFt.js",revision:null},{url:"assets/memory-long-term-Cd4DfbOC.js",revision:null},{url:"assets/memory-short-term-By6tGgIb.js",revision:null},{url:"assets/messages-D_H5Gb5B.js",revision:null},{url:"assets/microsoft-speech-CGGcxjek.js",revision:null},{url:"assets/mistral-ai-DvCen1CG.js",revision:null},{url:"assets/models-Cr3L9UFF.js",revision:null},{url:"assets/modules-BEoGi95f.js",revision:null},{url:"assets/moonshot-ai-CHsJXWmE.js",revision:null},{url:"assets/novita-ai-DnXfEx2N.js",revision:null},{url:"assets/ollama-BVrnvhnT.js",revision:null},{url:"assets/openai-audio-speech-yymAjo1X.js",revision:null},{url:"assets/openai-audio-transcription-irFP0VIY.js",revision:null},{url:"assets/openai-CQDdOtKc.js",revision:null},{url:"assets/openrouter-ai--dshV5bL.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-CsEDt6j8.js",revision:null},{url:"assets/plain-DnlN44SY.js",revision:null},{url:"assets/player2-D8_1xZL8.js",revision:null},{url:"assets/player2-speech-3AR5_77E.js",revision:null},{url:"assets/polaroid-D5obYKPu.js",revision:null},{url:"assets/process.worklet-CF6Ao8XG.js",revision:null},{url:"assets/providers-BPXI6kVS.js",revision:null},{url:"assets/queue-CVzHeHkm.js",revision:null},{url:"assets/route-block-gWR0cCIm.js",revision:null},{url:"assets/scene-B0dmKhyc.js",revision:null},{url:"assets/Scenes-ZY5GY3Yk.js",revision:null},{url:"assets/settings-BlRMq2Zz.js",revision:null},{url:"assets/settings-QwpRJEhc.js",revision:null},{url:"assets/speech-BkDk1gxm.js",revision:null},{url:"assets/stage-D8eUtIds.js",revision:null},{url:"assets/stage-FQGYvFsu.js",revision:null},{url:"assets/sury-s6Akl-oc-BocPOnya.js",revision:null},{url:"assets/Textarea-D9rLaih7.js",revision:null},{url:"assets/theme-color-mhr1g0fO.js",revision:null},{url:"assets/together-ai-CQqUN16J.js",revision:null},{url:"assets/transformers.web-B7NywNTw.js",revision:null},{url:"assets/valibot-DBCeetIe-B3VjNc-Q.js",revision:null},{url:"assets/vibrant-BT2fm70_.js",revision:null},{url:"assets/volcengine-Br1b00Sw.js",revision:null},{url:"assets/worker-_4r9VDQB.js",revision:null},{url:"assets/xai-a3vK2rb5.js",revision:null},{url:"assets/zod-Bw_60DVU-CpZ2MqKY.js",revision:null},{url:"index.html",revision:"614a6b0b55ae0fee756e74b054144f44"},{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:"0a5a207cc5b76af4bd35f0b587dd1902"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/docs\//,/^\/ui\//,/^\/remote-assets\//,/^\/api\//]}))});