diff --git a/.gitattributes b/.gitattributes index 3945ebe919a450ca6dcc9d418732dd5f32827ab6..5bceb1eb15a6fcaa912a3cd466e698a2c6fc427c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ *.vrm filter=lfs diff=lfs merge=lfs -text +.vrma filter=lfs diff=lfs merge=lfs -text *.cmo3 filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text *.jpg filter=lfs diff=lfs merge=lfs -text diff --git a/assets/AnimatedWave-Bw1I6g_s.js b/assets/AnimatedWave-Bw1I6g_s.js deleted file mode 100644 index 4bfe5cef33251fa57ab1b4dcdc9c974a98148f49..0000000000000000000000000000000000000000 --- a/assets/AnimatedWave-Bw1I6g_s.js +++ /dev/null @@ -1,3 +0,0 @@ -import{b as e}from"./Basic-BfTEEIor.js";import{A as t,bT as n,c6 as r,c7 as i,c9 as a,cJ as o,cO as s,cc as c,ce as l,cj as u,d$ as d,d3 as f,d8 as p,dM 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,d_ as C,dc as w,dk as T,dl as E,e2 as D,e4 as O,e5 as k,e7 as A,e8 as j,e9 as M,eb as N,ec as P,ed as F,ee as I,ef as L,eg as R,ei as z,em as B,en as V,ep as ee,eq as H,n as U,o as W,p as G,q as K,s as q,x as J,y as Y}from"./index-B9WIljdS.js";import{b as X,c as Z,d as Q}from"./HeaderLink-Dp-qWbnF.js";import{d as $,e as te,f as ne}from"./Scenes-uCDQqCpn.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 A(),x(`div`,ae,[M(e.$slots,`default`,{},void 0,!0)])}var se=s(ie,[[`render`,oe],[`__scopeId`,`data-v-455eb62c`]]);const ce={"mb-1":``,"w-full":``,"gap-2":``},le={"w-full":``};var ue=d({__name:`Header`,setup(e){return(e,t)=>(A(),x(`header`,ce,[v(`div`,le,[C(X)]),C(B(f),{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:L(()=>t[0]||=[v(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),de=ue,fe=`/assets/worker-_4r9VDQB.js`;const pe={relative:``,px:`{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),l(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),(e,t)=>{let i=N(`auto-animate`);return A(),x(`div`,pe,[t[3]||=v(`div`,{"flex-1":``},null,-1),R((A(),x(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[t[2]||=v(`div`,{"flex-1":``},null,-1),(A(!0),x(h,null,j(B(a),(e,n)=>(A(),x(`div`,{key:n,"mb-2":``},[e.role===`error`?(A(),x(`div`,me,[v(`div`,he,[v(`div`,ge,[v(`div`,_e,[v(`span`,ve,H(B(r)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=v(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),B(o)&&n===B(a).length-1?(A(),x(`div`,ye)):(A(),x(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base (A(),x(`div`,{key:n},[e.type===`tool-call`?(A(),x(`div`,Te,[v(`div`,Ee,[t[1]||=S(` Called: `,-1),v(`code`,null,H(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(A(),x(`div`,De)):(A(),x(`div`,{key:2,innerHTML:B(s)(e.text)},null,8,Oe))]))),128))])):n===B(a).length-1&&!e.content?(A(),x(`div`,ke)):b(``,!0)])])):e.role===`user`?(A(),x(`div`,Ae,[v(`div`,je,[v(`div`,null,[v(`span`,Me,H(B(r)(`stage.chat.message.character-name.you`)),1)]),e.content?(A(),x(`div`,{key:0,class:`markdown-content break-words`,text:`base {if(!e||!e.trim())return;let t=d.getProviderConfig(f.value);await b(e,{chatProvider:await d.getProviderInstance(f.value),model:m.value,providerConfig:t})}});async function M(){if(!(!o.value.trim()||u.value))try{let e=d.getProviderConfig(f.value);await b(o.value,{chatProvider:await d.getProviderInstance(f.value),model:m.value,providerConfig:e})}catch(e){T.value.pop(),T.value.push({role:`error`,content:e.message})}}let{destroy:N,start:P}=r(y,{onSpeechStart:()=>{s.value=!0},onVADMisfire:()=>{s.value=!1},onSpeechEnd:e=>{s.value=!1,F(e.buffer)},auto:!1});async function F(e){await E.resume();let t=await a(e,E.sampleRate);O({type:`generate`,data:{audio:t,language:`en`}})}return I(_,async e=>{e===!1&&(N(),j())}),I(l,async e=>{e&&await g()}),I([f,m],async()=>{f.value&&m.value&&await w(m.value,await d.getProviderInstance(f.value),[])}),k(()=>{P()}),S(async()=>{o.value=``}),(t,n)=>(A(),x(`div`,Le,[v(`div`,Re,[v(`div`,ze,[C(Ie,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`o.value=e,placeholder:B(D)(`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:V({"transition-colors-none placeholder:transition-colors-none":B(h)}),onSubmit:M,onCompositionstart:n[1]||=e=>u.value=!0,onCompositionend:n[2]||=e=>u.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])])]))}}),He=Ve;const Ue=[`src`],We=[`src`];var Ge=d({__name:`MobileHeaderLink`,setup(e){let t=w();return(e,n)=>(A(),y(B(f),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:L(()=>[B(t)?(A(),x(`img`,{key:0,src:B(Q),"h-8":``,"w-8":``,class:`theme-colored`},null,8,Ue)):(A(),x(`img`,{key:1,src:B(Z),"h-8":``,"w-8":``,class:`theme-colored`},null,8,We))]),_:1}))}}),Ke=s(Ge,[[`__scopeId`,`data-v-9c3d67a4`]]);const qe={"mb-1":``,"w-full":``,"gap-2":``},Je={"w-full":``,flex:``,"justify-center":``};var Ye=d({__name:`MobileHeader`,setup(e){return(e,t)=>(A(),x(`header`,qe,[v(`div`,Je,[C(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 {O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),c(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),(e,t)=>{let i=N(`auto-animate`);return A(),x(`div`,Ze,[R((A(),x(`div`,{ref_key:`chatHistoryRef`,ref:n,"max-h":`35dvh`,"z-5":``,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,class:`chat-history`},[(A(!0),x(h,null,j(B(a),(e,n)=>(A(),x(`div`,{key:n,"mb-2":``},[e.role===`error`?(A(),x(`div`,Qe,[v(`div`,$e,[v(`div`,et,[v(`div`,null,[v(`span`,tt,H(B(r)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=v(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(A(),x(`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=`389ee0a57c`,Ct=`main`,wt=`Fri Aug 8 20:30:41 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=d({__name:`About`,setup(e){let t=z(!1),n=re(new vt(wt));return(e,r)=>(A(),x(h,null,[v(`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]||=[v(`div`,{"i-solar:info-circle-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),C(B(l),{modelValue:t.value,"onUpdate:modelValue":r[1]||=e=>t.value=e},{default:L(()=>[v(`div`,Tt,[r[7]||=v(`div`,{"mb-14":``,"text-center":``,"text-5xl":``,"font-sans-rounded":``},[v(`span`,{text:`neutral-400 dark:neutral-100/65`},`Project`),S(),v(`span`,{text:`pink-400 dark:pink-300/90`},`AIRI`),v(`div`,{"mt-2":``,"text-base":``},` Web ver. `)],-1),v(`div`,Et,[r[6]||=v(`div`,{text:`neutral-500 dark:neutral-400`},` Application build information `,-1),v(`div`,Dt,[r[3]||=v(`div`,{text:`neutral-500 dark:neutral-400`},` Branch `,-1),v(`div`,Ot,H(B(Ct)),1),r[4]||=v(`div`,{text:`neutral-500 dark:neutral-400`},` Commit `,-1),v(`div`,kt,H(B(St).substring(0,7)),1),r[5]||=v(`div`,{text:`neutral-500 dark:neutral-400`},` Built on `,-1),v(`div`,At,H(B(n)),1)])]),r[8]||=v(`div`,{"my-10":``},[v(`div`,{text:`neutral-500 dark:neutral-400`},` About `),v(`div`,{"mt-4":``,flex:``,"flex-col":``,"gap-2":``},[v(`a`,{class:V([`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`},[v(`div`,{"i-solar:home-smile-outline":``}),v(`div`,null,`Home`)]),v(`a`,{href:`https://airi.moeru.ai/docs/en/docs/overview/`,class:V([`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`},[v(`div`,{"i-solar:document-add-outline":``}),v(`div`,null,`Documentations`)]),v(`a`,{href:`https://github.com/moeru-ai/airi`,class:V([`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`},[v(`div`,{"i-simple-icons:github":``}),v(`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=d({__name:`ViewControls`,props:{modelValue:{required:!0},modelModifiers:{}},emits:D([`reset`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,{stageView:r,stageViewControlsEnabled:i}=p(W()),a=P(e,`modelValue`);function o(e){if(a.value===e){n(`reset`);return}a.value=e}return(e,t)=>(A(),x(`div`,Nt,[C(m,{name:`fade`},{default:L(()=>[B(i)?(A(),x(`div`,Pt,[C(B(u),{variant:`secondary-muted`,toggled:a.value===`x`,"w-full":``,onClick:t[0]||=e=>o(`x`)},{default:L(()=>t[5]||=[S(` X `,-1)]),_:1,__:[5]},8,[`toggled`]),C(B(u),{variant:`secondary-muted`,toggled:a.value===`y`,"w-full":``,onClick:t[1]||=e=>o(`y`)},{default:L(()=>t[6]||=[S(` Y `,-1)]),_:1,__:[6]},8,[`toggled`]),B(r)===`3d`?(A(),y(B(u),{key:0,variant:`secondary-muted`,toggled:a.value===`z`,"w-full":``,onClick:t[2]||=e=>o(`z`)},{default:L(()=>t[7]||=[S(` Z `,-1)]),_:1,__:[7]},8,[`toggled`])):b(``,!0),C(B(u),{variant:`secondary-muted`,toggled:a.value===`scale`,"w-full":``,onClick:t[3]||=e=>o(`scale`)},{default:L(()=>t[8]||=[S(` Scale `,-1)]),_:1,__:[8]},8,[`toggled`])])):b(``,!0)]),_:1}),v(`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=!B(i)},[C(m,{name:`fade`,mode:`out-in`},{default:L(()=>[B(i)?(A(),x(`div`,It)):(A(),x(`div`,Ft))]),_:1})])]))}}),Rt=s(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=d({__name:`Inputs`,props:{mode:{}},setup(e,{expose:t}){let n=e,{stageView:r,stageViewControlsEnabled:i}=p(W()),{scale:a,modelOffset:s,modelSize:c}=p(U()),{scale:l,position:u}=p(K()),d=_({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}}}),f=_(()=>r.value===`2d`?-500:-c.value.x-10),h=_(()=>r.value===`2d`?500:c.value.x+10),g=_({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}}}),S=_(()=>r.value===`2d`?-500:-c.value.y-10),w=_(()=>r.value===`2d`?500:c.value.y+10),T=_({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=_(()=>r.value===`2d`?-500:-c.value.z-10),D=_(()=>r.value===`2d`?500:c.value.z+10),O=_({get:()=>r.value===`2d`?l.value:a.value,set:e=>{r.value===`2d`?l.value=e:a.value=e}});function k(){switch(n.mode){case`x`:d.value=0;break;case`y`:g.value=0;break;case`z`:T.value=0;break;case`scale`:O.value=1;break}}return t({resetOnMode:k}),(e,t)=>(A(),y(m,{name:`fade-side-pops-in`},{default:L(()=>[B(i)?(A(),x(`div`,zt,[C(m,{name:`fade-side-pops-in`,mode:`out-in`},{default:L(()=>[n.mode===`x`?(A(),x(`div`,Bt,[C(B(o),{modelValue:d.value,"onUpdate:modelValue":t[0]||=e=>d.value=e,min:f.value,max:h.value,step:.01,"data-direction":`vertical`,h:`50%`,"write-vertical-left":``},null,8,[`modelValue`,`min`,`max`]),v(`div`,Vt,H(d.value.toFixed(2)),1)])):n.mode===`y`?(A(),x(`div`,Ht,[C(B(o),{modelValue:g.value,"onUpdate:modelValue":t[1]||=e=>g.value=e,min:S.value,max:w.value,step:.01,"write-vertical-left":``,h:`50%`,"data-direction":`vertical`},null,8,[`modelValue`,`min`,`max`]),v(`div`,Ut,H(g.value.toFixed(2)),1)])):B(r)===`3d`&&n.mode===`z`?(A(),x(`div`,Wt,[C(B(o),{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`]),v(`div`,Gt,H(T.value.toFixed(2)),1)])):n.mode===`scale`?(A(),x(`div`,Kt,[C(B(o),{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`]),v(`div`,qt,H(O.value.toFixed(2)),1)])):b(``,!0)]),_:1})])):b(``,!0)]),_:1}))}}),Yt=s(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=d({__name:`MobileInteractiveArea`,setup(n){let i=w({disableTransition:!1}),a=z(`scale`),o=F(`viewControlsInputs`),s=z(``),c=z(!1),l=z(!1),u=E(),d=Y(),{activeProvider:h,activeModel:_}=p(J());T(document.documentElement,()=>u.update());let{themeColorsHueDynamic:S,stageView:D,stageViewControlsEnabled:O}=p(W()),{enabled:j,selectedAudioInput:M}=p(G()),{send:N,onAfterMessageComposed:P,discoverToolsCompatibility:R}=q(),{messages:H}=p(q()),{t:U}=t();async function K(){if(!(!s.value.trim()||l.value))try{let e=d.getProviderConfig(h.value);await N(s.value,{chatProvider:await d.getProviderInstance(h.value),model:_.value,providerConfig:e})}catch(e){H.value.pop(),H.value.push({role:`error`,content:e.message})}}let{destroy:X,start:Z}=r(M,{onSpeechStart:()=>{c.value=!0},onVADMisfire:()=>{c.value=!1},onSpeechEnd:e=>{c.value=!1,Q(e)},auto:!1});function Q(e){alert(`Transcription is not implemented yet`)}return I(j,async e=>{e===!1&&X()}),P(async()=>{s.value=``}),I([h,_],async()=>{h.value&&_.value&&await R(_.value,await d.getProviderInstance(h.value),[])}),k(()=>{Z(),u.update()}),(t,n)=>(A(),x(`div`,Xt,[(A(),y(g,null,[C(m,{name:`fade`},{default:L(()=>[B(O)?b(``,!0):(A(),y(ht,{key:0,"max-w":`[calc(100%-3.5rem)]`,"w-full":``,"self-start":``,"pl-3":``}))]),_:1})],1024)),v(`div`,Zt,[v(`div`,Qt,[C(Yt,{ref:`viewControlsInputs`,mode:a.value},null,8,[`mode`])]),v(`div`,$t,[v(`div`,en,[C(Mt),v(`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=>i.value=!B(i)},[C(m,{name:`fade`,mode:`out-in`},{default:L(()=>[B(i)?(A(),x(`div`,tn)):(A(),x(`div`,nn))]),_:1})]),C(B(f),{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:L(()=>n[7]||=[v(`div`,{"i-solar:settings-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),_:1,__:[7]}),v(`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=>D.value=B(D)===`2d`?`3d`:`2d`},[B(D)===`2d`?(A(),x(`div`,rn,n[8]||=[v(`span`,null,`2D`,-1)])):b(``,!0),B(D)===`3d`?(A(),x(`div`,an,n[9]||=[v(`span`,null,`3D`,-1)])):b(``,!0)]),C(Rt,{modelValue:a.value,"onUpdate:modelValue":n[2]||=e=>a.value=e,onReset:n[3]||=()=>o.value?.resetOnMode()},null,8,[`modelValue`])])]),v(`div`,{bg:`white dark:neutral-800`,"max-h-100dvh":``,"max-w-100dvw":``,"w-full":``,flex:``,"gap-1":``,"overflow-auto":``,"px-3":``,"pt-2":``,style:ee({paddingBottom:`${Math.max(Number.parseFloat(B(u).bottom.value.replace(`px`,``)),12)}px`})},[C(B(e),{modelValue:s.value,"onUpdate:modelValue":n[4]||=e=>s.value=e,placeholder:B(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:V([B(S)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:()=>{},onCompositionstart:n[5]||=e=>l.value=!0,onCompositionend:n[6]||=e=>l.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),s.value.trim()||l.value?(A(),x(`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]||=[v(`div`,{"i-solar:arrow-up-outline":``},null,-1)])):b(``,!0)],4)])]))}}),sn=on;const cn={class:`relative`},ln={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var un=d({__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=z(t.height),r=z(t.amplitude),i=z(t.waveLength),a=z(t.fillColor),o=z(t.direction),s=z(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=_(()=>n.value+r.value*2),u=_(()=>{let e=` - - `;return`url(data:image/svg+xml;base64,${btoa(e)})`});return I(()=>[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)=>(A(),x(`div`,cn,[M(e.$slots,`default`,{},void 0,!0),v(`div`,ln,[v(`div`,{class:`colored-area wave`,style:ee({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=s(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/AnimatedWave-Cojz6rq7.js b/assets/AnimatedWave-Cojz6rq7.js new file mode 100644 index 0000000000000000000000000000000000000000..01f9f2ff80b610230a9e7e31abea94f31789d4c0 --- /dev/null +++ b/assets/AnimatedWave-Cojz6rq7.js @@ -0,0 +1,3 @@ +import{b as e}from"./Basic-BgQfJAar.js";import{A as t,bT as n,c6 as r,c7 as i,c9 as a,cK as o,cP as s,cc as c,ce as l,cj as u,d$ as d,d4 as f,d9 as p,dN as m,dT as h,dU as g,dV as _,dW as v,dX as y,dY as b,dZ as x,d_ as S,dd as C,dl as w,dm as T,e0 as E,e3 as D,e5 as O,e6 as k,e8 as A,e9 as j,ea as M,ec as N,ed as P,ee,ef as F,eg as I,eh as L,ej as R,en as z,eo as B,eq as V,er as H,n as U,o as W,p as G,q as K,s as q,x as J,y as Y}from"./index-BIGBQG2E.js";import{b as X,c as Z,d as Q}from"./HeaderLink-q8Ont_Aw.js";import{d as $,e as te,f as ne}from"./Scenes-D3-lazzf.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 A(),x(`div`,ae,[M(e.$slots,`default`,{},void 0,!0)])}var se=s(ie,[[`render`,oe],[`__scopeId`,`data-v-455eb62c`]]);const ce={"mb-1":``,"w-full":``,"gap-2":``},le={"w-full":``};var ue=E({__name:`Header`,setup(e){return(e,t)=>(A(),x(`header`,ce,[v(`div`,le,[d(X)]),d(z(f),{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]||=[v(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),de=ue,fe=`/assets/worker-_4r9VDQB.js`;const pe={relative:``,px:`{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),l(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),(e,t)=>{let i=N(`auto-animate`);return A(),x(`div`,pe,[t[3]||=v(`div`,{"flex-1":``},null,-1),L((A(),x(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[t[2]||=v(`div`,{"flex-1":``},null,-1),(A(!0),x(h,null,j(z(a),(e,n)=>(A(),x(`div`,{key:n,"mb-2":``},[e.role===`error`?(A(),x(`div`,me,[v(`div`,he,[v(`div`,ge,[v(`div`,_e,[v(`span`,ve,H(z(r)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=v(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),z(o)&&n===z(a).length-1?(A(),x(`div`,ye)):(A(),x(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base (A(),x(`div`,{key:n},[e.type===`tool-call`?(A(),x(`div`,Te,[v(`div`,Ee,[t[1]||=S(` Called: `,-1),v(`code`,null,H(e.toolCall.toolName),1)])])):e.type===`tool-call-result`?(A(),x(`div`,De)):(A(),x(`div`,{key:2,innerHTML:z(s)(e.text)},null,8,Oe))]))),128))])):n===z(a).length-1&&!e.content?(A(),x(`div`,ke)):b(``,!0)])])):e.role===`user`?(A(),x(`div`,Ae,[v(`div`,je,[v(`div`,null,[v(`span`,Me,H(z(r)(`stage.chat.message.character-name.you`)),1)]),e.content?(A(),x(`div`,{key:0,class:`markdown-content break-words`,text:`base {if(!e||!e.trim())return;let t=f.getProviderConfig(m.value);await S(e,{chatProvider:await f.getProviderInstance(m.value),model:h.value,providerConfig:t})}});async function M(){if(!(!o.value.trim()||u.value))try{let e=f.getProviderConfig(m.value);await S(o.value,{chatProvider:await f.getProviderInstance(m.value),model:h.value,providerConfig:e})}catch(e){T.value.pop(),T.value.push({role:`error`,content:e.message})}}let{destroy:N,start:P}=r(b,{onSpeechStart:()=>{s.value=!0},onVADMisfire:()=>{s.value=!1},onSpeechEnd:e=>{s.value=!1,ee(e.buffer)},auto:!1});async function ee(e){await E.resume();let t=await a(e,E.sampleRate);O({type:`generate`,data:{audio:t,language:`en`}})}return F(y,async e=>{e===!1&&(N(),j())}),F(l,async e=>{e&&await _()}),F([m,h],async()=>{m.value&&h.value&&await w(h.value,await f.getProviderInstance(m.value),[])}),k(()=>{P()}),C(async()=>{o.value=``}),(t,n)=>(A(),x(`div`,Le,[v(`div`,Re,[v(`div`,ze,[d(Ie,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`o.value=e,placeholder:z(D)(`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(g)}),onSubmit:M,onCompositionstart:n[1]||=e=>u.value=!0,onCompositionend:n[2]||=e=>u.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])])]))}}),He=Ve;const Ue=[`src`],We=[`src`];var Ge=E({__name:`MobileHeaderLink`,setup(e){let t=C();return(e,n)=>(A(),y(z(f),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:I(()=>[z(t)?(A(),x(`img`,{key:0,src:z(Q),"h-8":``,"w-8":``,class:`theme-colored`},null,8,Ue)):(A(),x(`img`,{key:1,src:z(Z),"h-8":``,"w-8":``,class:`theme-colored`},null,8,We))]),_:1}))}}),Ke=s(Ge,[[`__scopeId`,`data-v-9c3d67a4`]]);const qe={"mb-1":``,"w-full":``,"gap-2":``},Je={"w-full":``,flex:``,"justify-center":``};var Ye=E({__name:`MobileHeader`,setup(e){return(e,t)=>(A(),x(`header`,qe,[v(`div`,Je,[d(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 {O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),c(async()=>{O().then(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}),(e,t)=>{let i=N(`auto-animate`);return A(),x(`div`,Ze,[L((A(),x(`div`,{ref_key:`chatHistoryRef`,ref:n,"max-h":`35dvh`,"z-5":``,flex:`~ col`,"h-full":``,"w-full":``,"overflow-scroll":``,class:`chat-history`},[(A(!0),x(h,null,j(z(a),(e,n)=>(A(),x(`div`,{key:n,"mb-2":``},[e.role===`error`?(A(),x(`div`,Qe,[v(`div`,$e,[v(`div`,et,[v(`div`,null,[v(`span`,tt,H(z(r)(`stage.chat.message.character-name.core-system`)),1)]),t[0]||=v(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),e.content?(A(),x(`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=`ff6468f776`,Ct=`main`,wt=`Mon Aug 11 00:27:15 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=E({__name:`About`,setup(e){let t=R(!1),n=re(new vt(wt));return(e,r)=>(A(),x(h,null,[v(`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]||=[v(`div`,{"i-solar:info-circle-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),d(z(l),{modelValue:t.value,"onUpdate:modelValue":r[1]||=e=>t.value=e},{default:I(()=>[v(`div`,Tt,[r[7]||=v(`div`,{"mb-14":``,"text-center":``,"text-5xl":``,"font-sans-rounded":``},[v(`span`,{text:`neutral-400 dark:neutral-100/65`},`Project`),S(),v(`span`,{text:`pink-400 dark:pink-300/90`},`AIRI`),v(`div`,{"mt-2":``,"text-base":``},` Web ver. `)],-1),v(`div`,Et,[r[6]||=v(`div`,{text:`neutral-500 dark:neutral-400`},` Application build information `,-1),v(`div`,Dt,[r[3]||=v(`div`,{text:`neutral-500 dark:neutral-400`},` Branch `,-1),v(`div`,Ot,H(z(Ct)),1),r[4]||=v(`div`,{text:`neutral-500 dark:neutral-400`},` Commit `,-1),v(`div`,kt,H(z(St).substring(0,7)),1),r[5]||=v(`div`,{text:`neutral-500 dark:neutral-400`},` Built on `,-1),v(`div`,At,H(z(n)),1)])]),r[8]||=v(`div`,{"my-10":``},[v(`div`,{text:`neutral-500 dark:neutral-400`},` About `),v(`div`,{"mt-4":``,flex:``,"flex-col":``,"gap-2":``},[v(`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`},[v(`div`,{"i-solar:home-smile-outline":``}),v(`div`,null,`Home`)]),v(`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`},[v(`div`,{"i-solar:document-add-outline":``}),v(`div`,null,`Documentations`)]),v(`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`},[v(`div`,{"i-simple-icons:github":``}),v(`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=E({__name:`ViewControls`,props:{modelValue:{required:!0},modelModifiers:{}},emits:D([`reset`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,{stageView:r,stageViewControlsEnabled:i}=p(W()),a=P(e,`modelValue`);function o(e){if(a.value===e){n(`reset`);return}a.value=e}return(e,t)=>(A(),x(`div`,Nt,[d(m,{name:`fade`},{default:I(()=>[z(i)?(A(),x(`div`,Pt,[d(z(u),{variant:`secondary-muted`,toggled:a.value===`x`,"w-full":``,onClick:t[0]||=e=>o(`x`)},{default:I(()=>t[5]||=[S(` X `,-1)]),_:1,__:[5]},8,[`toggled`]),d(z(u),{variant:`secondary-muted`,toggled:a.value===`y`,"w-full":``,onClick:t[1]||=e=>o(`y`)},{default:I(()=>t[6]||=[S(` Y `,-1)]),_:1,__:[6]},8,[`toggled`]),z(r)===`3d`?(A(),y(z(u),{key:0,variant:`secondary-muted`,toggled:a.value===`z`,"w-full":``,onClick:t[2]||=e=>o(`z`)},{default:I(()=>t[7]||=[S(` Z `,-1)]),_:1,__:[7]},8,[`toggled`])):b(``,!0),d(z(u),{variant:`secondary-muted`,toggled:a.value===`scale`,"w-full":``,onClick:t[3]||=e=>o(`scale`)},{default:I(()=>t[8]||=[S(` Scale `,-1)]),_:1,__:[8]},8,[`toggled`])])):b(``,!0)]),_:1}),v(`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)},[d(m,{name:`fade`,mode:`out-in`},{default:I(()=>[z(i)?(A(),x(`div`,It)):(A(),x(`div`,Ft))]),_:1})])]))}}),Rt=s(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=E({__name:`Inputs`,props:{mode:{}},setup(e,{expose:t}){let n=e,{stageView:r,stageViewControlsEnabled:i}=p(W()),{scale:a,modelOffset:s,modelSize:c}=p(U()),{scale:l,position:u}=p(K()),f=_({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}}}),h=_(()=>r.value===`2d`?-500:-c.value.x-10),g=_(()=>r.value===`2d`?500:c.value.x+10),S=_({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=_(()=>r.value===`2d`?-500:-c.value.y-10),w=_(()=>r.value===`2d`?500:c.value.y+10),T=_({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=_(()=>r.value===`2d`?-500:-c.value.z-10),D=_(()=>r.value===`2d`?500:c.value.z+10),O=_({get:()=>r.value===`2d`?l.value:a.value,set:e=>{r.value===`2d`?l.value=e:a.value=e}});function k(){switch(n.mode){case`x`:f.value=0;break;case`y`:S.value=0;break;case`z`:T.value=0;break;case`scale`:O.value=1;break}}return t({resetOnMode:k}),(e,t)=>(A(),y(m,{name:`fade-side-pops-in`},{default:I(()=>[z(i)?(A(),x(`div`,zt,[d(m,{name:`fade-side-pops-in`,mode:`out-in`},{default:I(()=>[n.mode===`x`?(A(),x(`div`,Bt,[d(z(o),{modelValue:f.value,"onUpdate:modelValue":t[0]||=e=>f.value=e,min:h.value,max:g.value,step:.01,"data-direction":`vertical`,h:`50%`,"write-vertical-left":``},null,8,[`modelValue`,`min`,`max`]),v(`div`,Vt,H(f.value.toFixed(2)),1)])):n.mode===`y`?(A(),x(`div`,Ht,[d(z(o),{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`]),v(`div`,Ut,H(S.value.toFixed(2)),1)])):z(r)===`3d`&&n.mode===`z`?(A(),x(`div`,Wt,[d(z(o),{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`]),v(`div`,Gt,H(T.value.toFixed(2)),1)])):n.mode===`scale`?(A(),x(`div`,Kt,[d(z(o),{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`]),v(`div`,qt,H(O.value.toFixed(2)),1)])):b(``,!0)]),_:1})])):b(``,!0)]),_:1}))}}),Yt=s(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=E({__name:`MobileInteractiveArea`,setup(n){let i=C({disableTransition:!1}),a=R(`scale`),o=ee(`viewControlsInputs`),s=R(``),c=R(!1),l=R(!1),u=T(),h=Y(),{activeProvider:_,activeModel:S}=p(J());w(document.documentElement,()=>u.update());let{themeColorsHueDynamic:E,stageView:D,stageViewControlsEnabled:O}=p(W()),{enabled:j,selectedAudioInput:M}=p(G()),{send:N,onAfterMessageComposed:P,discoverToolsCompatibility:L}=q(),{messages:H}=p(q()),{t:U}=t();async function K(){if(!(!s.value.trim()||l.value))try{let e=h.getProviderConfig(_.value);await N(s.value,{chatProvider:await h.getProviderInstance(_.value),model:S.value,providerConfig:e})}catch(e){H.value.pop(),H.value.push({role:`error`,content:e.message})}}let{destroy:X,start:Z}=r(M,{onSpeechStart:()=>{c.value=!0},onVADMisfire:()=>{c.value=!1},onSpeechEnd:e=>{c.value=!1,Q(e)},auto:!1});function Q(e){alert(`Transcription is not implemented yet`)}return F(j,async e=>{e===!1&&X()}),P(async()=>{s.value=``}),F([_,S],async()=>{_.value&&S.value&&await L(S.value,await h.getProviderInstance(_.value),[])}),k(()=>{Z(),u.update()}),(t,n)=>(A(),x(`div`,Xt,[(A(),y(g,null,[d(m,{name:`fade`},{default:I(()=>[z(O)?b(``,!0):(A(),y(ht,{key:0,"max-w":`[calc(100%-3.5rem)]`,"w-full":``,"self-start":``,"pl-3":``}))]),_:1})],1024)),v(`div`,Zt,[v(`div`,Qt,[d(Yt,{ref:`viewControlsInputs`,mode:a.value},null,8,[`mode`])]),v(`div`,$t,[v(`div`,en,[d(Mt),v(`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=>i.value=!z(i)},[d(m,{name:`fade`,mode:`out-in`},{default:I(()=>[z(i)?(A(),x(`div`,tn)):(A(),x(`div`,nn))]),_:1})]),d(z(f),{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]||=[v(`div`,{"i-solar:settings-outline":``,"size-5":``,text:`neutral-500 dark:neutral-400`},null,-1)]),_:1,__:[7]}),v(`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=>D.value=z(D)===`2d`?`3d`:`2d`},[z(D)===`2d`?(A(),x(`div`,rn,n[8]||=[v(`span`,null,`2D`,-1)])):b(``,!0),z(D)===`3d`?(A(),x(`div`,an,n[9]||=[v(`span`,null,`3D`,-1)])):b(``,!0)]),d(Rt,{modelValue:a.value,"onUpdate:modelValue":n[2]||=e=>a.value=e,onReset:n[3]||=()=>o.value?.resetOnMode()},null,8,[`modelValue`])])]),v(`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(u).bottom.value.replace(`px`,``)),12)}px`})},[d(z(e),{modelValue:s.value,"onUpdate:modelValue":n[4]||=e=>s.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(E)?`transition-colors-none placeholder:transition-colors-none`:``]),"default-height":`1lh`,onSubmit:()=>{},onCompositionstart:n[5]||=e=>l.value=!0,onCompositionend:n[6]||=e=>l.value=!1},null,8,[`modelValue`,`placeholder`,`class`]),s.value.trim()||l.value?(A(),x(`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]||=[v(`div`,{"i-solar:arrow-up-outline":``},null,-1)])):b(``,!0)],4)])]))}}),sn=on;const cn={class:`relative`},ln={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var un=E({__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=_(()=>n.value+r.value*2),u=_(()=>{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)=>(A(),x(`div`,cn,[M(e.$slots,`default`,{},void 0,!0),v(`div`,ln,[v(`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=s(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-BfTEEIor.js b/assets/Basic-BgQfJAar.js similarity index 58% rename from assets/Basic-BfTEEIor.js rename to assets/Basic-BgQfJAar.js index 4574ff9e6e1fb80fac252c0d485e166e2bbae2e1..bd66045b77ca840db63c8e07b0a8c9d914f75d0b 100644 --- a/assets/Basic-BfTEEIor.js +++ b/assets/Basic-BgQfJAar.js @@ -1 +1 @@ -import{d$ as e,dP as t,dY as n,e2 as r,e7 as i,ec as a,ee as o,eg as s,ei as c,ep as l}from"./index-B9WIljdS.js";var u=e({__name:`Basic`,props:r({defaultHeight:{}},{modelValue:{default:``},modelModifiers:{}}),emits:r([`submit`],[`update:modelValue`]),setup(e,{emit:r}){let u=e,d=r,f=a(e,`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}),(e,r)=>s((i(),n(`textarea`,{ref_key:`textareaRef`,ref:p,"onUpdate:modelValue":r[0]||=e=>f.value=e,style:l({height:m.value}),onKeydown:h},null,36)),[[t,f.value]])}}),d=u;export{d as b}; \ No newline at end of file +import{dQ as e,dZ as t,e0 as n,e3 as r,e8 as i,ed as a,ef as o,eh as s,ej as c,eq as l}from"./index-BIGBQG2E.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-BU_uEtuV.js b/assets/CardCreate-BU_uEtuV.js deleted file mode 100644 index fded932c96ba0a736c06e459a48e04d3ca044ef9..0000000000000000000000000000000000000000 --- a/assets/CardCreate-BU_uEtuV.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./CardCreate-CutGwari.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreate-CutGwari.js b/assets/CardCreate-DfNbL4BD.js similarity index 54% rename from assets/CardCreate-CutGwari.js rename to assets/CardCreate-DfNbL4BD.js index c2880498dbadc152c4e589e02bbbced6091004ca..dbeea618464b3338c63e01cec46171fa01e300fb 100644 --- a/assets/CardCreate-CutGwari.js +++ b/assets/CardCreate-DfNbL4BD.js @@ -1 +1 @@ -import{A as e,d$ as t,dV as n,dY as r,e7 as i,em as a,eq as o}from"./index-B9WIljdS.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=t({__name:`CardCreate`,setup(t){let{t:l}=e();return(e,t)=>(i(),r(`div`,s,[t[0]||=n(`div`,{"i-solar:add-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),n(`p`,c,o(a(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as b}; \ No newline at end of file +import{A as e,dW as t,dZ as n,e0 as r,e8 as i,en as a,er as o}from"./index-BIGBQG2E.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=r({__name:`CardCreate`,setup(r){let{t:l}=e();return(e,r)=>(i(),n(`div`,s,[r[0]||=t(`div`,{"i-solar:add-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),t(`p`,c,o(a(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as b}; \ No newline at end of file diff --git a/assets/CardCreate-DswUjQ7w.js b/assets/CardCreate-DswUjQ7w.js new file mode 100644 index 0000000000000000000000000000000000000000..a18e22f295c729d0a41a157787bc269520d0a9c1 --- /dev/null +++ b/assets/CardCreate-DswUjQ7w.js @@ -0,0 +1 @@ +import{b as e}from"./CardCreate-DfNbL4BD.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-BSWV6-8O.js b/assets/CardCreationDialog-BSWV6-8O.js deleted file mode 100644 index 17a109bf927ce9c2e22a40c2eabdefb392796571..0000000000000000000000000000000000000000 --- a/assets/CardCreationDialog-BSWV6-8O.js +++ /dev/null @@ -1 +0,0 @@ -import"./DialogTitle-4J3ZFQI8.js";import{b as e}from"./CardCreationDialog-BYY8X8ME.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-BYY8X8ME.js b/assets/CardCreationDialog-CUhrihgO.js similarity index 83% rename from assets/CardCreationDialog-BYY8X8ME.js rename to assets/CardCreationDialog-CUhrihgO.js index bbc583dd7e4c83ad90267c97d20561b7b4dfc990..1c3d65d2574b88ba72c668155970b0048a0d7a8d 100644 --- a/assets/CardCreationDialog-BYY8X8ME.js +++ b/assets/CardCreationDialog-CUhrihgO.js @@ -1,3 +1,3 @@ -import{b as e}from"./DialogTitle-4J3ZFQI8.js";import{A as t,cL as n,cO as r,cQ as i,cU as a,cW as o,cX as s,cY as c,cj as l,d$ as u,dS as ee,dU as d,dV as f,dW as p,dX as m,dY as h,dZ as g,d_ as _,e2 as v,e7 as y,e8 as te,ec as ne,ef as b,eh as x,ei as S,ek as C,em as w,en as T,eq as E,er as D,ev as O,u as re}from"./index-B9WIljdS.js";var k=D(((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n})),A=D(((exports,t)=>{var n=k();t.exports=n})),j=D(((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n})),M=D(((exports,t)=>{var n=j();t.exports=n})),N=D(((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n})),P=D(((exports,t)=>{var n=String.prototype.trim;t.exports=n})),F=D(((exports,t)=>{var n=P(),r=` +import{b as e}from"./DialogTitle-icfnGx6M.js";import{A as t,cM as n,cP as r,cR as i,cV as a,cX as o,cY as s,cZ as c,cj as l,d$ as u,dT as ee,dV as d,dW as f,dX as p,dY as m,dZ as h,d_ as g,e0 as _,e3 as v,e8 as y,e9 as te,ed as ne,eg as b,ei as x,ej as S,el as C,en as w,eo as T,er as E,es as D,ew as O,u as re}from"./index-BIGBQG2E.js";var k=D(((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n})),A=D(((exports,t)=>{var n=k();t.exports=n})),j=D(((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n})),M=D(((exports,t)=>{var n=j();t.exports=n})),N=D(((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n})),P=D(((exports,t)=>{var n=String.prototype.trim;t.exports=n})),F=D(((exports,t)=>{var n=P(),r=` \r -\f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a})),I=D(((exports,t)=>{var n=M(),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})),L=D(((exports,t)=>{var n=P();function r(e){return n.call(e)}t.exports=r})),R=D(((exports,t)=>{var n=N(),r=F(),i=I(),a=L(),o;o=n&&r()?a:i,t.exports=o})),z=D(((exports,t)=>{var n=A(),r=M(),i=R(),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})),B=D(((exports,t)=>{var n=z();t.exports=n})),V=O(B());const H={class:`w-full flex flex-col gap-5`},U={class:`mt-4`},W={class:`border-b border-neutral-200 dark:border-neutral-700`},G={class:`flex justify-center -mb-px sm:justify-start space-x-1`},K=[`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=u({__name:`CardCreationDialog`,props:v({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:v([`update:modelValue`],[`update:modelValue`]),setup(r,{emit:u}){let v=u,D=ne(r,`modelValue`),{t:O}=t(),k=re(),A=S(``),j=[{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`}],M=d({get:()=>j.find(e=>e.id===A.value)?A.value:j[0]?.id||``,set:e=>{A.value=e}}),N=S(!1),P=S(``);function F(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 N.value=!0,P.value=O(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.systemprompt`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.scenario`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.personality`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.description`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.version`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.name`),!1;return N.value=!1,k.addCard(t),D.value=!1,!0}let I=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 L(e,t){return d({get:()=>I.value[e]??``,set:n=>{let r=n.trim();I.value[e]=r.length>0?t?t(r):r:``}})}let R=L(`name`,e=>(0,V.default)(e)),z=L(`nickname`),B=L(`description`),q=L(`notes`),J=L(`personality`),Y=L(`scenario`),X=d({get:()=>I.value.greetings??[],set:e=>{I.value.greetings=e||[]}}),Z=L(`version`),Q=L(`systemPrompt`),$=L(`postHistoryInstructions`);return(t,r)=>(y(),p(w(c),{open:D.value,"onUpdate:open":r[12]||=e=>v(`update:modelValue`,e)},{default:b(()=>[_(w(a),null,{default:b(()=>[_(w(o),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),_(w(s),{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(()=>[f(`div`,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(()=>[g(E(w(O)(`settings.pages.card.create_card`)),1)]),_:1}),f(`div`,U,[f(`div`,W,[f(`div`,G,[(y(),h(ee,null,te(j,e=>f(`button`,{key:e.id,class:T([`px-4 py-2 text-sm font-medium`,[M.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=>M.value=e.id},[f(`div`,ie,[f(`div`,{class:T(e.icon)},null,2),g(` `+E(e.label),1)])],10,K)),64))])])]),N.value?(y(),h(`div`,ae,[f(`p`,oe,E(P.value),1)])):m(``,!0),M.value===`identity`?(y(),h(`div`,se,[f(`p`,ce,E(w(O)(`settings.pages.card.creation.fields_info.subtitle`)),1),f(`div`,le,[_(w(i),{modelValue:w(R),"onUpdate:modelValue":r[0]||=e=>x(R)?R.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`]),_(w(i),{modelValue:w(z),"onUpdate:modelValue":r[1]||=e=>x(z)?z.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`]),_(w(i),{modelValue:w(B),"onUpdate:modelValue":r[2]||=e=>x(B)?B.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`]),_(w(i),{modelValue:w(q),"onUpdate:modelValue":r[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`])])])):M.value===`behavior`?(y(),h(`div`,ue,[f(`div`,de,[_(w(i),{modelValue:w(J),"onUpdate:modelValue":r[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`]),_(w(i),{modelValue:w(Y),"onUpdate:modelValue":r[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`]),_(w(n),{modelValue:X.value,"onUpdate:modelValue":r[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`])])])):M.value===`settings`?(y(),h(`div`,fe,[f(`div`,pe,[_(w(i),{modelValue:w(Q),"onUpdate:modelValue":r[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`]),_(w(i),{modelValue:w($),"onUpdate:modelValue":r[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`]),_(w(i),{modelValue:w(Z),"onUpdate:modelValue":r[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`])])])):m(``,!0),f(`div`,me,[_(w(l),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:w(O)(`settings.pages.card.cancel`),disabled:!1,onClick:r[10]||=e=>D.value=!1},null,8,[`label`]),_(w(l),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:w(O)(`settings.pages.card.creation.create`),disabled:!1,onClick:r[11]||=e=>F(I.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),J=r(q,[[`__scopeId`,`data-v-71e6e2f1`]]);export{J as b}; \ No newline at end of file +\f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a})),I=D(((exports,t)=>{var n=M(),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})),L=D(((exports,t)=>{var n=P();function r(e){return n.call(e)}t.exports=r})),R=D(((exports,t)=>{var n=N(),r=F(),i=I(),a=L(),o;o=n&&r()?a:i,t.exports=o})),z=D(((exports,t)=>{var n=A(),r=M(),i=R(),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})),B=D(((exports,t)=>{var n=z();t.exports=n})),V=O(B());const H={class:`w-full flex flex-col gap-5`},U={class:`mt-4`},W={class:`border-b border-neutral-200 dark:border-neutral-700`},G={class:`flex justify-center -mb-px sm:justify-start space-x-1`},K=[`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=_({__name:`CardCreationDialog`,props:v({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:v([`update:modelValue`],[`update:modelValue`]),setup(r,{emit:_}){let v=_,D=ne(r,`modelValue`),{t:O}=t(),k=re(),A=S(``),j=[{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`}],M=d({get:()=>j.find(e=>e.id===A.value)?A.value:j[0]?.id||``,set:e=>{A.value=e}}),N=S(!1),P=S(``);function F(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 N.value=!0,P.value=O(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.systemprompt`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.scenario`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.personality`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.description`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.version`),!1;else return N.value=!0,P.value=O(`settings.pages.card.creation.errors.name`),!1;return N.value=!1,k.addCard(t),D.value=!1,!0}let I=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 L(e,t){return d({get:()=>I.value[e]??``,set:n=>{let r=n.trim();I.value[e]=r.length>0?t?t(r):r:``}})}let R=L(`name`,e=>(0,V.default)(e)),z=L(`nickname`),B=L(`description`),q=L(`notes`),J=L(`personality`),Y=L(`scenario`),X=d({get:()=>I.value.greetings??[],set:e=>{I.value.greetings=e||[]}}),Z=L(`version`),Q=L(`systemPrompt`),$=L(`postHistoryInstructions`);return(t,r)=>(y(),p(w(c),{open:D.value,"onUpdate:open":r[12]||=e=>v(`update:modelValue`,e)},{default:b(()=>[u(w(a),null,{default:b(()=>[u(w(o),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),u(w(s),{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(()=>[f(`div`,H,[u(w(e),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:b(()=>[g(E(w(O)(`settings.pages.card.create_card`)),1)]),_:1}),f(`div`,U,[f(`div`,W,[f(`div`,G,[(y(),h(ee,null,te(j,e=>f(`button`,{key:e.id,class:T([`px-4 py-2 text-sm font-medium`,[M.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=>M.value=e.id},[f(`div`,ie,[f(`div`,{class:T(e.icon)},null,2),g(` `+E(e.label),1)])],10,K)),64))])])]),N.value?(y(),h(`div`,ae,[f(`p`,oe,E(P.value),1)])):m(``,!0),M.value===`identity`?(y(),h(`div`,se,[f(`p`,ce,E(w(O)(`settings.pages.card.creation.fields_info.subtitle`)),1),f(`div`,le,[u(w(i),{modelValue:w(R),"onUpdate:modelValue":r[0]||=e=>x(R)?R.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`]),u(w(i),{modelValue:w(z),"onUpdate:modelValue":r[1]||=e=>x(z)?z.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`]),u(w(i),{modelValue:w(B),"onUpdate:modelValue":r[2]||=e=>x(B)?B.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`]),u(w(i),{modelValue:w(q),"onUpdate:modelValue":r[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`])])])):M.value===`behavior`?(y(),h(`div`,ue,[f(`div`,de,[u(w(i),{modelValue:w(J),"onUpdate:modelValue":r[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`]),u(w(i),{modelValue:w(Y),"onUpdate:modelValue":r[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`]),u(w(n),{modelValue:X.value,"onUpdate:modelValue":r[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`])])])):M.value===`settings`?(y(),h(`div`,fe,[f(`div`,pe,[u(w(i),{modelValue:w(Q),"onUpdate:modelValue":r[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`]),u(w(i),{modelValue:w($),"onUpdate:modelValue":r[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`]),u(w(i),{modelValue:w(Z),"onUpdate:modelValue":r[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`])])])):m(``,!0),f(`div`,me,[u(w(l),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:w(O)(`settings.pages.card.cancel`),disabled:!1,onClick:r[10]||=e=>D.value=!1},null,8,[`label`]),u(w(l),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:w(O)(`settings.pages.card.creation.create`),disabled:!1,onClick:r[11]||=e=>F(I.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),J=r(q,[[`__scopeId`,`data-v-71e6e2f1`]]);export{J as b}; \ No newline at end of file diff --git a/assets/CardCreationDialog-CYhEzkFt.js b/assets/CardCreationDialog-CYhEzkFt.js new file mode 100644 index 0000000000000000000000000000000000000000..a4ab8c84f5b44107bbf368619e059db4a4b0f119 --- /dev/null +++ b/assets/CardCreationDialog-CYhEzkFt.js @@ -0,0 +1 @@ +import"./DialogTitle-icfnGx6M.js";import{b as e}from"./CardCreationDialog-CUhrihgO.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-B3nu2JGI.js b/assets/CardDetailDialog-B3nu2JGI.js new file mode 100644 index 0000000000000000000000000000000000000000..43cc95b4af49157c263fd0a1b13b41fea2a805b7 --- /dev/null +++ b/assets/CardDetailDialog-B3nu2JGI.js @@ -0,0 +1 @@ +import"./DeleteCardDialog-C5wCNpwE.js";import"./DialogTitle-icfnGx6M.js";import{b as e}from"./CardDetailDialog-dVpnsyGs.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-BLm7zRgk.js b/assets/CardDetailDialog-BLm7zRgk.js deleted file mode 100644 index a4d73699f37b657d2f5a476d29d385f9481d5905..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-BLm7zRgk.js +++ /dev/null @@ -1 +0,0 @@ -import"./DeleteCardDialog-DXxjLYbx.js";import"./DialogTitle-4J3ZFQI8.js";import{b as e}from"./CardDetailDialog-CcoHJxL0.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-CcoHJxL0.js b/assets/CardDetailDialog-CcoHJxL0.js deleted file mode 100644 index b4ffc659fe46881358f019f9e53858af601a051e..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-CcoHJxL0.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./DeleteCardDialog-DXxjLYbx.js";import{b as t}from"./DialogTitle-4J3ZFQI8.js";import{A as n,cU as ee,cW as te,cX as ne,cY as r,cj as re,d$ as i,d8 as ie,dS as a,dU as o,dV as s,dX as c,dY as l,dZ as u,d_ as d,e7 as f,e8 as p,ef as m,ei as h,em as g,en as _,eq as v,u as ae}from"./index-B9WIljdS.js";const oe={key:0,class:`w-full flex flex-col gap-5`},se={flex:`~ col`,"gap-3":``},ce={flex:`~ row`,"items-center":``,"justify-between":``},le={flex:`~ row`,"items-center":``,"gap-2":``},ue={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=i({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:{}},emits:[`update:modelValue`],setup(i,{emit:R}){let z=i,B=R,{t:V}=n(),H=ae(),{removeCard:xe}=H,{activeCardId:U}=ie(H),W=o(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=o(()=>{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=o(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=o(()=>z.cardId===U.value),J=h(!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=h(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=h(``),Q=o(()=>{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}),$=o({get:()=>Q.value.find(e=>e.id===Z.value)?Z.value:Q.value[0]?.id||``,set:e=>{Z.value=e}});return(n,i)=>(f(),l(a,null,[d(g(r),{open:n.modelValue,"onUpdate:open":i[0]||=e=>B(`update:modelValue`,e)},{default:m(()=>[d(g(ee),null,{default:m(()=>[d(g(te),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),d(g(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:m(()=>[W.value?(f(),l(`div`,oe,[s(`div`,se,[s(`div`,ce,[s(`div`,null,[s(`div`,le,[d(g(t),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:m(()=>[u(v(W.value.name),1)]),_:1}),q.value?(f(),l(`div`,ue,[i[3]||=s(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),u(` `+v(g(V)(`settings.pages.card.active_badge`)),1)])):c(``,!0)]),s(`div`,de,[u(` v`+v(W.value.version)+` `,1),W.value.creator?(f(),l(a,{key:0},[u(` · `+v(g(V)(`settings.pages.card.created_by`))+` `,1),s(`span`,fe,v(W.value.creator),1)],64)):c(``,!0)])]),s(`div`,pe,[d(g(re),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?g(V)(`settings.pages.card.active`):g(V)(`settings.pages.card.activate`),disabled:q.value,class:_({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),s(`div`,me,[s(`div`,he,[s(`div`,ge,[(f(!0),l(a,null,p(Q.value,e=>(f(),l(`button`,{key:e.id,class:_([`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},[s(`div`,b,[s(`div`,{class:_(e.icon)},null,2),u(` `+v(e.label),1)])],10,y))),128))])])]),$.value===`notes`&&W.value.notes?(f(),l(`div`,x,[s(`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)])):c(``,!0),$.value===`description`&&W.value.description?(f(),l(`div`,C,[s(`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)])):c(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(f(),l(`div`,T,[s(`div`,E,[(f(!0),l(a,null,p(K.value,(e,t)=>(f(),l(a,{key:t},[e?(f(),l(`div`,D,[s(`h2`,O,v(g(V)(`settings.pages.card.${t.toLowerCase()}`)),1),s(`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)])):c(``,!0)],64))),128))])])):c(``,!0),$.value===`modules`?(f(),l(`div`,A,[s(`div`,j,[s(`div`,M,[s(`span`,N,[i[4]||=s(`div`,{"i-lucide:ghost":``},null,-1),u(` `+v(g(V)(`settings.pages.card.consciousness.model`)),1)]),s(`div`,P,v(G.value.consciousness??`default`),1)]),s(`div`,F,[s(`span`,I,[i[5]||=s(`div`,{"i-lucide:mic":``},null,-1),u(` `+v(g(V)(`settings.pages.card.speech.model`)),1)]),s(`div`,L,v(G.value.speech??`default`),1)]),s(`div`,_e,[s(`span`,ve,[i[6]||=s(`div`,{"i-lucide:music":``},null,-1),u(` `+v(g(V)(`settings.pages.card.speech.voice`)),1)]),s(`div`,ye,v(G.value.voice??`default`),1)])])])):c(``,!0)])])):(f(),l(`div`,be,[i[7]||=s(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),u(` `+v(g(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),d(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-dVpnsyGs.js b/assets/CardDetailDialog-dVpnsyGs.js new file mode 100644 index 0000000000000000000000000000000000000000..f67fd5ec15010ecaa8060d2d474ee58f7cccdbab --- /dev/null +++ b/assets/CardDetailDialog-dVpnsyGs.js @@ -0,0 +1 @@ +import{b as e}from"./DeleteCardDialog-C5wCNpwE.js";import{b as t}from"./DialogTitle-icfnGx6M.js";import{A as n,cV as ee,cX as r,cY as te,cZ as ne,cj as re,d$ as i,d9 as a,dT as o,dV as s,dW as c,dY as l,dZ as u,d_ as d,e0 as f,e8 as p,e9 as m,eg as h,ej as g,en as _,eo as v,er as y,u as ie}from"./index-BIGBQG2E.js";const ae={key:0,class:`w-full flex flex-col gap-5`},oe={flex:`~ col`,"gap-3":``},se={flex:`~ row`,"items-center":``,"justify-between":``},ce={flex:`~ row`,"items-center":``,"gap-2":``},le={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`},ue={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},de={"font-medium":``},fe={flex:`~ row`,"gap-2":``},pe={class:`mt-4`},me={class:`border-b border-neutral-200 dark:border-neutral-700`},he={class:`flex justify-center -mb-px sm:justify-start space-x-1`},ge=[`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=f({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:{}},emits:[`update:modelValue`],setup(f,{emit:R}){let z=f,B=R,{t:V}=n(),H=ie(),{removeCard:xe}=H,{activeCardId:U}=a(H),W=s(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=s(()=>{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=s(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=s(()=>z.cardId===U.value),J=g(!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=g(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=g(``),Q=s(()=>{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}),$=s({get:()=>Q.value.find(e=>e.id===Z.value)?Z.value:Q.value[0]?.id||``,set:e=>{Z.value=e}});return(n,a)=>(p(),u(o,null,[i(_(ne),{open:n.modelValue,"onUpdate:open":a[0]||=e=>B(`update:modelValue`,e)},{default:h(()=>[i(_(ee),null,{default:h(()=>[i(_(r),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),i(_(te),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:h(()=>[W.value?(p(),u(`div`,ae,[c(`div`,oe,[c(`div`,se,[c(`div`,null,[c(`div`,ce,[i(_(t),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:h(()=>[d(y(W.value.name),1)]),_:1}),q.value?(p(),u(`div`,le,[a[3]||=c(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),d(` `+y(_(V)(`settings.pages.card.active_badge`)),1)])):l(``,!0)]),c(`div`,ue,[d(` v`+y(W.value.version)+` `,1),W.value.creator?(p(),u(o,{key:0},[d(` · `+y(_(V)(`settings.pages.card.created_by`))+` `,1),c(`span`,de,y(W.value.creator),1)],64)):l(``,!0)])]),c(`div`,fe,[i(_(re),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?_(V)(`settings.pages.card.active`):_(V)(`settings.pages.card.activate`),disabled:q.value,class:v({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),c(`div`,pe,[c(`div`,me,[c(`div`,he,[(p(!0),u(o,null,m(Q.value,e=>(p(),u(`button`,{key:e.id,class:v([`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},[c(`div`,b,[c(`div`,{class:v(e.icon)},null,2),d(` `+y(e.label),1)])],10,ge))),128))])])]),$.value===`notes`&&W.value.notes?(p(),u(`div`,x,[c(`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)])):l(``,!0),$.value===`description`&&W.value.description?(p(),u(`div`,C,[c(`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)])):l(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(p(),u(`div`,T,[c(`div`,E,[(p(!0),u(o,null,m(K.value,(e,t)=>(p(),u(o,{key:t},[e?(p(),u(`div`,D,[c(`h2`,O,y(_(V)(`settings.pages.card.${t.toLowerCase()}`)),1),c(`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)])):l(``,!0)],64))),128))])])):l(``,!0),$.value===`modules`?(p(),u(`div`,A,[c(`div`,j,[c(`div`,M,[c(`span`,N,[a[4]||=c(`div`,{"i-lucide:ghost":``},null,-1),d(` `+y(_(V)(`settings.pages.card.consciousness.model`)),1)]),c(`div`,P,y(G.value.consciousness??`default`),1)]),c(`div`,F,[c(`span`,I,[a[5]||=c(`div`,{"i-lucide:mic":``},null,-1),d(` `+y(_(V)(`settings.pages.card.speech.model`)),1)]),c(`div`,L,y(G.value.speech??`default`),1)]),c(`div`,_e,[c(`span`,ve,[a[6]||=c(`div`,{"i-lucide:music":``},null,-1),d(` `+y(_(V)(`settings.pages.card.speech.voice`)),1)]),c(`div`,ye,y(G.value.voice??`default`),1)])])])):l(``,!0)])])):(p(),u(`div`,be,[a[7]||=c(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),d(` `+y(_(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),i(e,{modelValue:X.value,"onUpdate:modelValue":a[1]||=e=>X.value=e,"card-name":W.value?.name,onConfirm:Ce,onCancel:a[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/CardListItem-1GFj18SB.js b/assets/CardListItem-1GFj18SB.js new file mode 100644 index 0000000000000000000000000000000000000000..d9c34ec82be43a3b235efc791c4b217a1abeb933 --- /dev/null +++ b/assets/CardListItem-1GFj18SB.js @@ -0,0 +1 @@ +import{b as e}from"./CardListItem-jWaHBlBm.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-X7iklUlr.js b/assets/CardListItem-X7iklUlr.js deleted file mode 100644 index a6209fa518075d83a00387e29d93b08fbccba75b..0000000000000000000000000000000000000000 --- a/assets/CardListItem-X7iklUlr.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./CardListItem-BJ53NvW9.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-BJ53NvW9.js b/assets/CardListItem-jWaHBlBm.js similarity index 65% rename from assets/CardListItem-BJ53NvW9.js rename to assets/CardListItem-jWaHBlBm.js index 7ca4d83ee9fe498923bfb46c1150b63ffd91a69f..36ab6a70c956e1255164f5c4330dd4509ef23fcc 100644 --- a/assets/CardListItem-BJ53NvW9.js +++ b/assets/CardListItem-jWaHBlBm.js @@ -1 +1 @@ -import{cf as e,d$ as t,dR as n,dV as r,dW as i,dX as a,dY as o,e7 as s,ef as c,em as l,en as u,eq as d}from"./index-B9WIljdS.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=t({__name:`CardListItem`,props:{id:{},name:{},description:{},isActive:{type:Boolean},isSelected:{type:Boolean},version:{},consciousnessModel:{},voiceModel:{}},emits:[`select`,`activate`,`delete`],setup(t,{emit:C}){let w=C;return(t,C)=>(s(),i(l(e),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:u([t.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(()=>[r(`div`,f,[r(`div`,p,[r(`h3`,m,d(t.name),1),t.isActive?(s(),o(`div`,h,C[3]||=[r(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):a(``,!0)]),t.description?(s(),o(`p`,g,d(t.description),1)):a(``,!0),r(`div`,_,[r(`div`,null,`v`+d(t.version),1),r(`div`,v,[r(`div`,y,[C[4]||=r(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),r(`span`,null,d(t.consciousnessModel),1)]),r(`div`,b,[C[5]||=r(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),r(`span`,null,d(t.voiceModel),1)])])])]),r(`div`,x,[r(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:t.isActive,onClick:C[0]||=n(e=>w(`activate`),[`stop`])},[r(`div`,{class:u([t.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),t.id===`default`?a(``,!0):(s(),o(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:C[1]||=n(e=>w(`delete`),[`stop`])},C[6]||=[r(`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{cf as e,dS as t,dW as n,dX as r,dY as i,dZ as a,e0 as o,e8 as s,eg as c,en as l,eo as u,er as d}from"./index-BIGBQG2E.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/DeleteCardDialog-DXxjLYbx.js b/assets/DeleteCardDialog-C5wCNpwE.js similarity index 63% rename from assets/DeleteCardDialog-DXxjLYbx.js rename to assets/DeleteCardDialog-C5wCNpwE.js index 6e37961b67af57911eaccd0d85b217e18de68229..3969772ec0e1e8a58c697035f2dc49ff11564dff 100644 --- a/assets/DeleteCardDialog-DXxjLYbx.js +++ b/assets/DeleteCardDialog-C5wCNpwE.js @@ -1 +1 @@ -import{b as e}from"./DialogTitle-4J3ZFQI8.js";import{A as t,c$ as n,cV as r,cW as i,cX as a,cY as o,cZ as s,c_ as c,cj as l,d$ as u,d0 as d,d1 as f,d2 as p,dR as m,dV as h,dW as g,dZ as _,d_ as v,e0 as y,e3 as b,e4 as x,e5 as S,e7 as C,e9 as w,ef as T,ei as E,em as D,eo as O,eq as k}from"./index-B9WIljdS.js";var A=u({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;d();let n=s();return(e,r)=>(C(),g(D(c),b(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>D(n).onOpenChange(!1)}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16,[`type`]))}}),j=A,M=u({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;d();let n=s();return(e,r)=>(C(),g(D(c),b(t,{id:D(n).descriptionId}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16,[`id`]))}}),N=M,P=u({__name:`AlertDialogAction`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;return d(),(e,n)=>(C(),g(D(j),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),F=P;const[I,L]=p(`AlertDialogContent`);var R=u({__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:t}){let n=e,r=t,i=f(r);d();let o=E();return L({onCancelElementChange:e=>{o.value=e}}),(e,t)=>(C(),g(D(a),b({...n,...D(i)},{role:`alertdialog`,onPointerDownOutside:t[0]||=m(()=>{},[`prevent`]),onInteractOutside:t[1]||=m(()=>{},[`prevent`]),onOpenAutoFocus:t[2]||=()=>{x(()=>{o.value?.focus({preventScroll:!0})})}}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),z=R,B=u({__name:`AlertDialogCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=I(),{forwardRef:r,currentElement:i}=d();return S(()=>{n.onCancelElementChange(i.value)}),(e,n)=>(C(),g(D(j),b(t,{ref:D(r)}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),V=B,H=u({__name:`AlertDialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;return d(),(e,n)=>(C(),g(D(N),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),U=H,W=u({__name:`AlertDialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return d(),(e,n)=>(C(),g(D(i),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),G=W,K=u({__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,n)=>(C(),g(D(r),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),q=K,J=u({__name:`AlertDialogRoot`,props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1}},emits:[`update:open`],setup(e,{emit:t}){let r=e,i=t,a=n(r,i);return d(),(e,t)=>(C(),g(D(o),b(D(a),{modal:!0}),{default:T(t=>[w(e.$slots,`default`,O(y(t)))]),_:3},16))}}),Y=J,X=u({__name:`AlertDialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(t){let n=t;return d(),(t,r)=>(C(),g(D(e),O(y(n)),{default:T(()=>[w(t.$slots,`default`)]),_:3},16))}}),Z=X;const Q={class:`flex flex-row justify-end gap-3`};var $=u({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:{}},emits:[`update:modelValue`,`confirm`,`cancel`],setup(e,{emit:n}){let r=n,{t:i}=t();function a(){r(`update:modelValue`,!1),r(`cancel`)}function o(){r(`update:modelValue`,!1),r(`confirm`)}return(e,t)=>(C(),g(D(Y),{open:e.modelValue,"onUpdate:open":t[0]||=e=>r(`update:modelValue`,e)},{default:T(()=>[v(D(q),null,{default:T(()=>[v(D(G),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),v(D(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:T(()=>[v(D(Z),{class:`mb-4 text-xl font-normal`},{default:T(()=>[_(k(D(i)(`settings.pages.card.delete_card`)),1)]),_:1}),v(D(U),{class:`mb-6`},{default:T(()=>[_(k(D(i)(`settings.pages.card.delete_confirmation`))+` `,1),h(`b`,null,`"`+k(e.cardName||``)+`"`,1)]),_:1}),h(`div`,Q,[v(D(V),{"as-child":``},{default:T(()=>[v(D(l),{variant:`secondary`,label:D(i)(`settings.pages.card.cancel`),onClick:a},null,8,[`label`])]),_:1}),v(D(F),{"as-child":``},{default:T(()=>[v(D(l),{variant:`danger`,label:D(i)(`settings.pages.card.delete`),onClick:o},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-icfnGx6M.js";import{A as t,c$ as n,cW as r,cX as i,cY as a,cZ as o,c_ as s,cj as c,d$ as l,d0 as u,d1 as d,d2 as f,d3 as p,dS as m,dW as h,dX as g,d_ as _,e0 as v,e1 as y,e4 as b,e5 as x,e6 as S,e8 as C,ea as w,eg as T,ej as E,en as D,ep as O,er as k}from"./index-BIGBQG2E.js";var A=v({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;d();let r=s();return(e,i)=>(C(),g(D(n),b(t,{type:e.as===`button`?`button`:void 0,onClick:i[0]||=e=>D(r).onOpenChange(!1)}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16,[`type`]))}}),j=A,M=v({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;d();let r=s();return(e,i)=>(C(),g(D(n),b(t,{id:D(r).descriptionId}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16,[`id`]))}}),N=M,P=v({__name:`AlertDialogAction`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;return d(),(e,n)=>(C(),g(D(j),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),F=P;const[I,L]=p(`AlertDialogContent`);var R=v({__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:t}){let n=e,r=t,i=f(r);d();let o=E();return L({onCancelElementChange:e=>{o.value=e}}),(e,t)=>(C(),g(D(a),b({...n,...D(i)},{role:`alertdialog`,onPointerDownOutside:t[0]||=m(()=>{},[`prevent`]),onInteractOutside:t[1]||=m(()=>{},[`prevent`]),onOpenAutoFocus:t[2]||=()=>{x(()=>{o.value?.focus({preventScroll:!0})})}}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),z=R,B=v({__name:`AlertDialogCancel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=I(),{forwardRef:r,currentElement:i}=d();return S(()=>{n.onCancelElementChange(i.value)}),(e,n)=>(C(),g(D(j),b(t,{ref:D(r)}),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),V=B,H=v({__name:`AlertDialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;return d(),(e,n)=>(C(),g(D(N),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),U=H,W=v({__name:`AlertDialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return d(),(e,n)=>(C(),g(D(i),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),G=W,K=v({__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,n)=>(C(),g(D(r),O(y(t)),{default:T(()=>[w(e.$slots,`default`)]),_:3},16))}}),q=K,J=v({__name:`AlertDialogRoot`,props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,i=u(n,r);return d(),(e,t)=>(C(),g(D(o),b(D(i),{modal:!0}),{default:T(t=>[w(e.$slots,`default`,O(y(t)))]),_:3},16))}}),Y=J,X=v({__name:`AlertDialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(t){let n=t;return d(),(t,r)=>(C(),g(D(e),O(y(n)),{default:T(()=>[w(t.$slots,`default`)]),_:3},16))}}),Z=X;const Q={class:`flex flex-row justify-end gap-3`};var $=v({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:{}},emits:[`update:modelValue`,`confirm`,`cancel`],setup(e,{emit:n}){let r=n,{t:i}=t();function a(){r(`update:modelValue`,!1),r(`cancel`)}function o(){r(`update:modelValue`,!1),r(`confirm`)}return(e,t)=>(C(),g(D(Y),{open:e.modelValue,"onUpdate:open":t[0]||=e=>r(`update:modelValue`,e)},{default:T(()=>[l(D(q),null,{default:T(()=>[l(D(G),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),l(D(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:T(()=>[l(D(Z),{class:`mb-4 text-xl font-normal`},{default:T(()=>[_(k(D(i)(`settings.pages.card.delete_card`)),1)]),_:1}),l(D(U),{class:`mb-6`},{default:T(()=>[_(k(D(i)(`settings.pages.card.delete_confirmation`))+` `,1),h(`b`,null,`"`+k(e.cardName||``)+`"`,1)]),_:1}),h(`div`,Q,[l(D(V),{"as-child":``},{default:T(()=>[l(D(c),{variant:`secondary`,label:D(i)(`settings.pages.card.cancel`),onClick:a},null,8,[`label`])]),_:1}),l(D(F),{"as-child":``},{default:T(()=>[l(D(c),{variant:`danger`,label:D(i)(`settings.pages.card.delete`),onClick:o},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-CAT_oitI.js b/assets/DeleteCardDialog-CAT_oitI.js deleted file mode 100644 index c16ed3d032cac8ca7d5812c7f853a44423cebb6d..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-CAT_oitI.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./DeleteCardDialog-DXxjLYbx.js";import"./DialogTitle-4J3ZFQI8.js";export{e as default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-Dyob2QXx.js b/assets/DeleteCardDialog-Dyob2QXx.js new file mode 100644 index 0000000000000000000000000000000000000000..5d38d530e2cfb2c41abd1c8c4078a555abfa6dc5 --- /dev/null +++ b/assets/DeleteCardDialog-Dyob2QXx.js @@ -0,0 +1 @@ +import{b as e}from"./DeleteCardDialog-C5wCNpwE.js";import"./DialogTitle-icfnGx6M.js";export{e as default}; \ No newline at end of file diff --git a/assets/DialogTitle-4J3ZFQI8.js b/assets/DialogTitle-4J3ZFQI8.js deleted file mode 100644 index 91e0f37a426c61d3a431cb264b069982e55a64a3..0000000000000000000000000000000000000000 --- a/assets/DialogTitle-4J3ZFQI8.js +++ /dev/null @@ -1 +0,0 @@ -import{cZ as e,c_ as t,d$ as n,d0 as r,dW as i,e3 as a,e7 as o,e9 as s,ef as c,em as l}from"./index-B9WIljdS.js";var u=n({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(n){let u=n,d=e();return r(),(e,n)=>(o(),i(l(t),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/DialogTitle-icfnGx6M.js b/assets/DialogTitle-icfnGx6M.js new file mode 100644 index 0000000000000000000000000000000000000000..79b87ec0678ea042587a7aeb99209a18e4ec4f1c --- /dev/null +++ b/assets/DialogTitle-icfnGx6M.js @@ -0,0 +1 @@ +import{c$ as e,c_ as t,d1 as n,dX as r,e0 as i,e4 as a,e8 as o,ea as s,eg as c,en as l}from"./index-BIGBQG2E.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 n(),(t,n)=>(o(),r(l(e),a(u,{id:l(d).titleId}),{default:c(()=>[s(t.$slots,`default`)]),_:3},16,[`id`]))}}),d=u;export{d as b}; \ No newline at end of file diff --git a/assets/HeaderLink-Dp-qWbnF.js b/assets/HeaderLink-Dp-qWbnF.js deleted file mode 100644 index 08d926f4ef49f08711b585f6cdc0ebca9a1b6002..0000000000000000000000000000000000000000 --- a/assets/HeaderLink-Dp-qWbnF.js +++ /dev/null @@ -1 +0,0 @@ -import{cO as e,d$ as t,d3 as n,dV as r,dW as i,dY as a,dc as o,e7 as s,ef as c,em as l}from"./index-B9WIljdS.js";var u=`/assets/logo-dark-B0bvNYTh.svg`,d=`/assets/logo-B2aCU-bH.svg`;const f=[`src`],p=[`src`];var m=t({__name:`HeaderLink`,setup(e){let t=o();return(e,o)=>(s(),i(l(n),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:c(()=>[l(t)?(s(),a(`img`,{key:0,src:l(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(s(),a(`img`,{key:1,src:l(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),o[0]||=r(`div`,{"translate-y":`[2px]`,"font-quicksand":``,"font-semibold":``},[r(`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/HeaderLink-q8Ont_Aw.js b/assets/HeaderLink-q8Ont_Aw.js new file mode 100644 index 0000000000000000000000000000000000000000..50a496dc804f7c11c67ea74a75bb36463f4ac43b --- /dev/null +++ b/assets/HeaderLink-q8Ont_Aw.js @@ -0,0 +1 @@ +import{cP as e,d4 as t,dW as n,dX as r,dZ as i,dd as a,e0 as o,e8 as s,eg as c,en as l}from"./index-BIGBQG2E.js";var u=`/assets/logo-dark-B0bvNYTh.svg`,d=`/assets/logo-B2aCU-bH.svg`;const f=[`src`],p=[`src`];var m=o({__name:`HeaderLink`,setup(e){let o=a();return(e,a)=>(s(),r(l(t),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:c(()=>[l(o)?(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)),a[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-BeiZddFw.js b/assets/IconAnimation-D-qvmNIz.js similarity index 68% rename from assets/IconAnimation-BeiZddFw.js rename to assets/IconAnimation-D-qvmNIz.js index eb7770f0dc2d9ed947590f9b215724111ef17ae1..e9a11d5344e6fd79ecb892478ea25fa422430979 100644 --- a/assets/IconAnimation-BeiZddFw.js +++ b/assets/IconAnimation-D-qvmNIz.js @@ -1 +1 @@ -import{d$ as e,dU as t,dV as n,dY as r,e7 as i,ee as a,ei as o,en as s,ep as c}from"./index-B9WIljdS.js";var l=e({__name:`IconAnimation`,props:{icon:{},iconSize:{},position:{},duration:{},started:{type:Boolean},textColor:{},isReverse:{type:Boolean},zIndex:{}},emits:[`animationEnded`],setup(e,{emit:l}){let u=e,d=l,f=o(!1);a(()=>u.started,e=>{e&&requestAnimationFrame(()=>{f.value=!0})});let p=t(()=>({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,t)=>(i(),r(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:c({zIndex:h.value?e.zIndex:void 0})},[n(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:c({opacity:p.value.opacity,transitionDuration:`${e.duration}ms`})},null,4),n(`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{dV as e,dW as t,dZ as n,e0 as r,e8 as i,ef as a,ej as o,eo as s,eq as c}from"./index-BIGBQG2E.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-CXpzJde3.js b/assets/InputFile-BcSJOVRJ.js similarity index 52% rename from assets/InputFile-CXpzJde3.js rename to assets/InputFile-BcSJOVRJ.js index 6acd5ae67a150bd3d8a2050827193a2778c88936..942aefdc89b9f5f7130e11db895b755c22766741 100644 --- a/assets/InputFile-CXpzJde3.js +++ b/assets/InputFile-BcSJOVRJ.js @@ -1 +1 @@ -import{d$ as e,dV as t,dY as n,dn as r,e2 as i,e7 as a,e9 as o,ec as s,ei as c,em as l,en as u}from"./index-B9WIljdS.js";const d=[`accept`,`multiple`],f={key:0,text:`center`,"text-sm":``},p={key:1,text:`center`,"text-sm":``};var m=e({__name:`InputFile`,props:i({accept:{},multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let i=s(e,`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(e,r)=>(a(),n(`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},[t(`input`,{type:`file`,accept:e.accept,multiple:e.multiple,"cursor-pointer":``,class:`absolute inset-0 h-full w-full opacity-0`,onChange:_},null,40,d),o(e.$slots,`default`,{isDragging:l(g),firstFile:m.value,files:i.value},()=>[t(`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]||=t(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),r[3]||=t(`p`,{"font-medium":``,text:`center lg`},` Upload `,-1),l(g)?(a(),n(`p`,f,` Release to upload `)):(a(),n(`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{dW as e,dZ as t,do as n,e0 as r,e3 as i,e8 as a,ea as o,ed as s,ej as c,en as l,eo as u}from"./index-BIGBQG2E.js";const d=[`accept`,`multiple`],f={key:0,text:`center`,"text-sm":``},p={key:1,text:`center`,"text-sm":``};var m=r({__name:`InputFile`,props:i({accept:{},multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(r){let i=s(r,`modelValue`),m=c(),h=c(!1),g=n(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-uCDQqCpn.js b/assets/Scenes-D3-lazzf.js similarity index 58% rename from assets/Scenes-uCDQqCpn.js rename to assets/Scenes-D3-lazzf.js index a5cda2a616142d8582bf175d73fd42d3ad015411..b51ed996810361f287a03fd8842b944a96d4a920 100644 --- a/assets/Scenes-uCDQqCpn.js +++ b/assets/Scenes-D3-lazzf.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-D71AMOyU.js","assets/index-B9WIljdS.js","assets/index-CdrV4-fw.css","assets/default-node-CUnR0j1U.js","assets/import-url-browser-DIrMeXJ_.js","assets/import-url-browser-D0zVIqhu.js","assets/duckdb-mvp-P5KShsBk.js","assets/import-url-node-TVB6v_2U.js"])))=>i.map(i=>d[i]); -import{b$ as e,bU as t,bV as n,bW as r,bX as i,bY as a,bZ as o,b_ as s,c0 as c,c1 as l,c2 as u,c3 as d,c4 as f,c5 as p,cA as m,cc as h,cd as g,ch as _,cu as v,cv as y,cw as b,cz as x,d$ 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 ee,dG as j,dH as te,dI as ne,dJ as M,dK as N,dL as P,dQ as re,dS as ie,dU as ae,dV as oe,dW as se,dX as ce,dY as le,d_ as ue,da as de,dc as fe,de as pe,dh as me,di as he,dp as ge,dq as _e,dr as ve,ds as ye,dt as be,du as xe,dv as Se,dw as Ce,dx as we,dy as Te,dz as Ee,e5 as De,e6 as Oe,e7 as ke,e9 as Ae,ee as je,ef as Me,eg as Ne,ei as Pe,ej as Fe,el as Ie,em as Le,er as Re,es as ze,et as Be,eu as Ve,ev as He,n as Ue,o as We,q as Ge,r as Ke,s as qe,v as Je,w as Ye,y as Xe}from"./index-B9WIljdS.js";import{b as Ze}from"./import-url-browser-D0zVIqhu.js"; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-CLt_IrJn.js","assets/index-BIGBQG2E.js","assets/index-9HJVUVbL.css","assets/default-node-BdKlRQ9_.js","assets/import-url-browser-DIrMeXJ_.js","assets/import-url-browser-D0zVIqhu.js","assets/duckdb-mvp-P5KShsBk.js","assets/import-url-node-TVB6v_2U.js"])))=>i.map(i=>d[i]); +import{b$ as e,bU as t,bV as n,bW as r,bX as i,bY as a,bZ as o,b_ as s,c0 as c,c1 as l,c2 as u,c3 as d,c4 as f,c5 as p,cG as m,cc as h,cd as g,ch as _,cu as v,cv as y,cw as b,cz as x,d$ as S,d8 as C,d9 as w,dA as T,dB as E,dC as D,dD as O,dE as k,dF as A,dG as j,dH as M,dI as ee,dJ as te,dK as N,dL as P,dM as F,dR as ne,dT as re,dV as ie,dW as ae,dX as oe,dY as se,dZ as ce,da as le,db as ue,dd as de,df as fe,di as pe,dj as me,dq as he,dr as ge,ds as _e,dt as ve,du as ye,dv as be,dw as xe,dx as Se,dy as Ce,dz as we,e0 as Te,e6 as Ee,e7 as De,e8 as Oe,ea as ke,ef as Ae,eg as je,eh as Me,ej as Ne,ek as Pe,em as Fe,en as Ie,es as Le,et as Re,eu as ze,ev as Be,ew as Ve,n as He,o as Ue,q as We,r as Ge,s as Ke,v as qe,w as Je,y as Ye}from"./index-BIGBQG2E.js";import{b as Xe}from"./import-url-browser-D0zVIqhu.js"; /*! * @pixi/constants - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC @@ -7,16 +7,16 @@ import{b$ as e,bU as t,bV as n,bW as r,bX as i,bY as a,bZ as o,b_ as s,c0 as c,c * @pixi/constants is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ -var Qe;(function(e){e[e.WEBGL_LEGACY=0]=`WEBGL_LEGACY`,e[e.WEBGL=1]=`WEBGL`,e[e.WEBGL2=2]=`WEBGL2`})(Qe||={});var $e;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.WEBGL=1]=`WEBGL`,e[e.CANVAS=2]=`CANVAS`})($e||={});var et;(function(e){e[e.COLOR=16384]=`COLOR`,e[e.DEPTH=256]=`DEPTH`,e[e.STENCIL=1024]=`STENCIL`})(et||={});var tt;(function(e){e[e.NORMAL=0]=`NORMAL`,e[e.ADD=1]=`ADD`,e[e.MULTIPLY=2]=`MULTIPLY`,e[e.SCREEN=3]=`SCREEN`,e[e.OVERLAY=4]=`OVERLAY`,e[e.DARKEN=5]=`DARKEN`,e[e.LIGHTEN=6]=`LIGHTEN`,e[e.COLOR_DODGE=7]=`COLOR_DODGE`,e[e.COLOR_BURN=8]=`COLOR_BURN`,e[e.HARD_LIGHT=9]=`HARD_LIGHT`,e[e.SOFT_LIGHT=10]=`SOFT_LIGHT`,e[e.DIFFERENCE=11]=`DIFFERENCE`,e[e.EXCLUSION=12]=`EXCLUSION`,e[e.HUE=13]=`HUE`,e[e.SATURATION=14]=`SATURATION`,e[e.COLOR=15]=`COLOR`,e[e.LUMINOSITY=16]=`LUMINOSITY`,e[e.NORMAL_NPM=17]=`NORMAL_NPM`,e[e.ADD_NPM=18]=`ADD_NPM`,e[e.SCREEN_NPM=19]=`SCREEN_NPM`,e[e.NONE=20]=`NONE`,e[e.SRC_OVER=0]=`SRC_OVER`,e[e.SRC_IN=21]=`SRC_IN`,e[e.SRC_OUT=22]=`SRC_OUT`,e[e.SRC_ATOP=23]=`SRC_ATOP`,e[e.DST_OVER=24]=`DST_OVER`,e[e.DST_IN=25]=`DST_IN`,e[e.DST_OUT=26]=`DST_OUT`,e[e.DST_ATOP=27]=`DST_ATOP`,e[e.ERASE=26]=`ERASE`,e[e.SUBTRACT=28]=`SUBTRACT`,e[e.XOR=29]=`XOR`})(tt||={});var nt;(function(e){e[e.POINTS=0]=`POINTS`,e[e.LINES=1]=`LINES`,e[e.LINE_LOOP=2]=`LINE_LOOP`,e[e.LINE_STRIP=3]=`LINE_STRIP`,e[e.TRIANGLES=4]=`TRIANGLES`,e[e.TRIANGLE_STRIP=5]=`TRIANGLE_STRIP`,e[e.TRIANGLE_FAN=6]=`TRIANGLE_FAN`})(nt||={});var F;(function(e){e[e.RGBA=6408]=`RGBA`,e[e.RGB=6407]=`RGB`,e[e.RG=33319]=`RG`,e[e.RED=6403]=`RED`,e[e.RGBA_INTEGER=36249]=`RGBA_INTEGER`,e[e.RGB_INTEGER=36248]=`RGB_INTEGER`,e[e.RG_INTEGER=33320]=`RG_INTEGER`,e[e.RED_INTEGER=36244]=`RED_INTEGER`,e[e.ALPHA=6406]=`ALPHA`,e[e.LUMINANCE=6409]=`LUMINANCE`,e[e.LUMINANCE_ALPHA=6410]=`LUMINANCE_ALPHA`,e[e.DEPTH_COMPONENT=6402]=`DEPTH_COMPONENT`,e[e.DEPTH_STENCIL=34041]=`DEPTH_STENCIL`})(F||={});var rt;(function(e){e[e.TEXTURE_2D=3553]=`TEXTURE_2D`,e[e.TEXTURE_CUBE_MAP=34067]=`TEXTURE_CUBE_MAP`,e[e.TEXTURE_2D_ARRAY=35866]=`TEXTURE_2D_ARRAY`,e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]=`TEXTURE_CUBE_MAP_POSITIVE_X`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]=`TEXTURE_CUBE_MAP_NEGATIVE_X`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]=`TEXTURE_CUBE_MAP_POSITIVE_Y`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]=`TEXTURE_CUBE_MAP_NEGATIVE_Y`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]=`TEXTURE_CUBE_MAP_POSITIVE_Z`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]=`TEXTURE_CUBE_MAP_NEGATIVE_Z`})(rt||={});var it;(function(e){e[e.UNSIGNED_BYTE=5121]=`UNSIGNED_BYTE`,e[e.UNSIGNED_SHORT=5123]=`UNSIGNED_SHORT`,e[e.UNSIGNED_SHORT_5_6_5=33635]=`UNSIGNED_SHORT_5_6_5`,e[e.UNSIGNED_SHORT_4_4_4_4=32819]=`UNSIGNED_SHORT_4_4_4_4`,e[e.UNSIGNED_SHORT_5_5_5_1=32820]=`UNSIGNED_SHORT_5_5_5_1`,e[e.UNSIGNED_INT=5125]=`UNSIGNED_INT`,e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]=`UNSIGNED_INT_10F_11F_11F_REV`,e[e.UNSIGNED_INT_2_10_10_10_REV=33640]=`UNSIGNED_INT_2_10_10_10_REV`,e[e.UNSIGNED_INT_24_8=34042]=`UNSIGNED_INT_24_8`,e[e.UNSIGNED_INT_5_9_9_9_REV=35902]=`UNSIGNED_INT_5_9_9_9_REV`,e[e.BYTE=5120]=`BYTE`,e[e.SHORT=5122]=`SHORT`,e[e.INT=5124]=`INT`,e[e.FLOAT=5126]=`FLOAT`,e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]=`FLOAT_32_UNSIGNED_INT_24_8_REV`,e[e.HALF_FLOAT=36193]=`HALF_FLOAT`})(it||={});var at;(function(e){e[e.FLOAT=0]=`FLOAT`,e[e.INT=1]=`INT`,e[e.UINT=2]=`UINT`})(at||={});var ot;(function(e){e[e.NEAREST=0]=`NEAREST`,e[e.LINEAR=1]=`LINEAR`})(ot||={});var st;(function(e){e[e.CLAMP=33071]=`CLAMP`,e[e.REPEAT=10497]=`REPEAT`,e[e.MIRRORED_REPEAT=33648]=`MIRRORED_REPEAT`})(st||={});var ct;(function(e){e[e.OFF=0]=`OFF`,e[e.POW2=1]=`POW2`,e[e.ON=2]=`ON`,e[e.ON_MANUAL=3]=`ON_MANUAL`})(ct||={});var lt;(function(e){e[e.NPM=0]=`NPM`,e[e.UNPACK=1]=`UNPACK`,e[e.PMA=2]=`PMA`,e[e.NO_PREMULTIPLIED_ALPHA=0]=`NO_PREMULTIPLIED_ALPHA`,e[e.PREMULTIPLY_ON_UPLOAD=1]=`PREMULTIPLY_ON_UPLOAD`,e[e.PREMULTIPLY_ALPHA=2]=`PREMULTIPLY_ALPHA`,e[e.PREMULTIPLIED_ALPHA=2]=`PREMULTIPLIED_ALPHA`})(lt||={});var ut;(function(e){e[e.NO=0]=`NO`,e[e.YES=1]=`YES`,e[e.AUTO=2]=`AUTO`,e[e.BLEND=0]=`BLEND`,e[e.CLEAR=1]=`CLEAR`,e[e.BLIT=2]=`BLIT`})(ut||={});var dt;(function(e){e[e.AUTO=0]=`AUTO`,e[e.MANUAL=1]=`MANUAL`})(dt||={});var ft;(function(e){e.LOW=`lowp`,e.MEDIUM=`mediump`,e.HIGH=`highp`})(ft||={});var pt;(function(e){e[e.NONE=0]=`NONE`,e[e.SCISSOR=1]=`SCISSOR`,e[e.STENCIL=2]=`STENCIL`,e[e.SPRITE=3]=`SPRITE`,e[e.COLOR=4]=`COLOR`})(pt||={});var mt;(function(e){e[e.RED=1]=`RED`,e[e.GREEN=2]=`GREEN`,e[e.BLUE=4]=`BLUE`,e[e.ALPHA=8]=`ALPHA`})(mt||={});var ht;(function(e){e[e.NONE=0]=`NONE`,e[e.LOW=2]=`LOW`,e[e.MEDIUM=4]=`MEDIUM`,e[e.HIGH=8]=`HIGH`})(ht||={});var gt;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]=`ELEMENT_ARRAY_BUFFER`,e[e.ARRAY_BUFFER=34962]=`ARRAY_BUFFER`,e[e.UNIFORM_BUFFER=35345]=`UNIFORM_BUFFER`})(gt||={});var _t={createCanvas:function(e,t){var n=document.createElement(`canvas`);return n.width=e,n.height=t,n},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var e;return(e=document.baseURI)??window.location.href},fetch:function(e,t){return fetch(e,t)}},vt=/iPhone/i,yt=/iPod/i,bt=/iPad/i,xt=/\biOS-universal(?:.+)Mac\b/i,St=/\bAndroid(?:.+)Mobile\b/i,Ct=/Android/i,wt=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Tt=/Silk/i,Et=/Windows Phone/i,Dt=/\bWindows(?:.+)ARM\b/i,Ot=/BlackBerry/i,kt=/BB10/i,At=/Opera Mini/i,jt=/\b(CriOS|Chrome)(?:.+)Mobile/i,Mt=/Mobile(?:.+)Firefox\b/i,Nt=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Pt(e){return function(t){return t.test(e)}}function Ft(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=Pt(n),a={apple:{phone:i(vt)&&!i(Et),ipod:i(yt),tablet:!i(vt)&&(i(bt)||Nt(t))&&!i(Et),universal:i(xt),device:(i(vt)||i(yt)||i(bt)||i(xt)||Nt(t))&&!i(Et)},amazon:{phone:i(wt),tablet:!i(wt)&&i(Tt),device:i(wt)||i(Tt)},android:{phone:!i(Et)&&i(wt)||!i(Et)&&i(St),tablet:!i(Et)&&!i(wt)&&!i(St)&&(i(Tt)||i(Ct)),device:!i(Et)&&(i(wt)||i(Tt)||i(St)||i(Ct))||i(/\bokhttp\b/i)},windows:{phone:i(Et),tablet:i(Dt),device:i(Et)||i(Dt)},other:{blackberry:i(Ot),blackberry10:i(kt),opera:i(At),firefox:i(Mt),chrome:i(jt),device:i(Ot)||i(kt)||i(At)||i(Mt)||i(jt)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var It=Ft(globalThis.navigator);function Lt(){return!It.apple.device}function Rt(e){var t=!0;if(It.tablet||It.phone){if(It.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(It.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var r=parseInt(n[1],10);r<7&&(t=!1)}}}return t?e:4}var I={ADAPTER:_t,MIPMAP_TEXTURES:ct.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:ht.NONE,SPRITE_MAX_TEXTURES:Rt(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:dt.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:st.CLAMP,SCALE_MODE:ot.LINEAR,PRECISION_VERTEX:ft.HIGH,PRECISION_FRAGMENT:It.apple.device?ft.HIGH:ft.MEDIUM,CAN_UPLOAD_SAME_BUFFER:Lt(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},zt=Re(((exports,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i{t.exports=n,t.exports.default=n;function n(e,t,n){n||=2;var i=t&&t.length,o=i?t[0]*n:e.length,s=r(e,0,o,n,!0),c=[];if(!s||s.next===s.prev)return c;var l,d,f,p,m,h,g;if(i&&(s=u(e,t,s,n)),e.length>80*n){l=f=e[0],d=p=e[1];for(var _=n;_f&&(f=m),h>p&&(p=h);g=Math.max(f-l,p-d),g=g===0?0:32767/g}return a(s,c,n,l,d,g,0),c}function r(e,t,n,r,i){var a,o;if(i===te(e,t,n,r)>0)for(a=t;a=t;a-=r)o=A(a,e[a],e[a+1],o);return o&&S(o,o.next)&&(ee(o),o=o.next),o}function i(e,t){if(!e)return e;t||=e;var n=e,r;do if(r=!1,!n.steiner&&(S(n,n.next)||x(n.prev,n,n.next)===0)){if(ee(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function a(e,t,n,r,u,d,f){if(e){!f&&d&&h(e,r,u,d);for(var p=e,m,g;e.prev!==e.next;){if(m=e.prev,g=e.next,d?s(e,r,u,d):o(e)){t.push(m.i/n|0),t.push(e.i/n|0),t.push(g.i/n|0),ee(e),e=g.next,p=g.next;continue}if(e=g,e===p){f?f===1?(e=c(i(e),t,n),a(e,t,n,r,u,d,2)):f===2&&l(e,t,n,r,u,d):a(i(e),t,n,r,u,d,1);break}}}}function o(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=ia?i>o?i:o:a>o?a:o,p=s>c?s>l?s:l:c>l?c:l,m=r.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&y(i,s,a,c,o,l,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function s(e,t,n,r){var i=e.prev,a=e,o=e.next;if(x(i,a,o)>=0)return!1;for(var s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=sc?s>l?s:l:c>l?c:l,g=u>d?u>f?u:f:d>f?d:f,v=_(p,m,t,n,r),b=_(h,g,t,n,r),S=e.prevZ,C=e.nextZ;S&&S.z>=v&&C&&C.z<=b;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0||(S=S.prevZ,C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;S&&S.z>=v;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;C&&C.z<=b;){if(C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function c(e,t,n){var r=e;do{var a=r.prev,o=r.next.next;!S(a,o)&&C(a,r,r.next,o)&&D(a,o)&&D(o,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),ee(r),ee(r.next),r=e=o),r=r.next}while(r!==e);return i(r)}function l(e,t,n,r,o,s){var c=e;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&b(c,l)){var u=k(c,l);c=i(c,c.next),u=i(u,u.next),a(c,t,n,r,o,s,0),a(u,t,n,r,o,s,0);return}l=l.next}c=c.next}while(c!==e)}function u(e,t,n,i){var a=[],o,s,c,l,u;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a&&(a=s,o=n.x=n.x&&n.x>=l&&r!==n.x&&y(io.x||n.x===o.x&&m(o,n)))&&(o=n,d=f)),n=n.next;while(n!==c);return o}function m(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,n,r){var i=e;do i.z===0&&(i.z=_(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(e){var t,n,r,i,a,o,s,c,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||c>0&&r;)s!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1);return e}function _(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function v(e){var t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!E(e,t)&&(D(e,t)&&D(t,e)&&O(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||S(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function S(e,t){return e.x===t.x&&e.y===t.y}function C(e,t,n,r){var i=T(x(e,t,n)),a=T(x(e,t,r)),o=T(x(n,r,e)),s=T(x(n,r,t));return!!(i!==a&&o!==s||i===0&&w(e,n,t)||a===0&&w(e,r,t)||o===0&&w(n,e,r)||s===0&&w(n,t,r))}function w(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function T(e){return e>0?1:e<0?-1:0}function E(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&C(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function D(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function O(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function k(e,t){var n=new j(e.i,e.x,e.y),r=new j(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function A(e,t,n,r){var i=new j(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function ee(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function j(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(te(e,0,a,n));if(i)for(var s=0,c=t.length;s0&&(r+=e[i-1].length,n.holes.push(r))}return n}})),Vt=Re(((exports,t)=>{(function(n){var r=typeof exports==`object`&&exports&&!exports.nodeType&&exports,i=typeof t==`object`&&t&&!t.nodeType&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a||a.self===a)&&(n=a);var o,s=2147483647,c=36,l=1,u=26,d=38,f=700,p=72,m=128,h=`-`,g=/^xn--/,_=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},b=c-l,x=Math.floor,S=String.fromCharCode,C;function w(e){throw RangeError(y[e])}function T(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(v,`.`);var i=e.split(`.`),a=T(i,t).join(`.`);return r+a}function D(e){for(var t=[],n=0,r=e.length,i,a;n=55296&&i<=56319&&n65535&&(e-=65536,t+=S(e>>>10&1023|55296),e=56320|e&1023),t+=S(e),t}).join(``)}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function A(e,t){return e+22+75*(e<26)-((t!=0)<<5)}function ee(e,t,n){var r=0;for(e=n?x(e/f):e>>1,e+=x(e/t);e>b*u>>1;r+=c)e=x(e/b);return x(r+(b+1)*e/(e+d))}function j(e){var t=[],n=e.length,r,i=0,a=m,o=p,d,f,g,_,v,y,b,S,C;for(d=e.lastIndexOf(h),d<0&&(d=0),f=0;f=128&&w(`not-basic`),t.push(e.charCodeAt(f));for(g=d>0?d+1:0;g=n&&w(`invalid-input`),b=k(e.charCodeAt(g++)),(b>=c||b>x((s-i)/v))&&w(`overflow`),i+=b*v,S=y<=o?l:y>=o+u?u:y-o,!(bx(s/C)&&w(`overflow`),v*=C;r=t.length+1,o=ee(i-_,r,_==0),x(i/r)>s-a&&w(`overflow`),a+=x(i/r),i%=r,t.splice(i++,0,a)}return O(t)}function te(e){var t,n,r,i,a,o,d,f,g,_,v,y=[],b,C,T,E;for(e=D(e),b=e.length,t=m,n=0,a=p,o=0;o=t&&vx((s-n)/C)&&w(`overflow`),n+=(d-t)*C,t=d,o=0;os&&w(`overflow`),v==t){for(f=n,g=c;_=g<=a?l:g>=a+u?u:g-a,!(f<_);g+=c)E=f-_,T=c-_,y.push(S(A(_+E%T,0))),f=x(E/T);y.push(S(A(f,0))),a=ee(n,C,r==i),n=0,++r}++n,++t}return y.join(``)}function ne(e){return E(e,function(e){return g.test(e)?j(e.slice(4).toLowerCase()):e})}function M(e){return E(e,function(e){return _.test(e)?`xn--`+te(e):e})}if(o={version:`1.4.1`,ucs2:{decode:D,encode:O},decode:j,encode:te,toASCII:M,toUnicode:ne},typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(`punycode`,function(){return o});else if(r&&i)if(t.exports==r)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(r[C]=o[C]);else n.punycode=o})(exports)})),Ht=Re(((exports,t)=>{Object.defineProperty(exports,`__esModule`,{value:!0});function n(){let e,t,n=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.get(n)}else if(t)return t.get(n)},r=(n,r)=>{n&&(typeof n==`object`||typeof n==`function`)?(e||=new WeakMap,e.set(n,r)):(t||=new Map,t.set(n,r))},i=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.has(n)}else if(t)return t.has(n);return!1},a=e=>{if(!i(e))throw TypeError(`Side channel does not contain the given key`)};return{get:n,set:r,has:i,assert:a}}exports.default=n,(typeof exports.default==`object`&&exports.default!==null||typeof exports.default==`function`)&&(Object.assign(exports.default,exports),t.exports=exports.default)})),Ut=Re(((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}})),Wt=Re(((exports,t)=>{var n=Ut(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=d?s.slice(l,l+d):s,f=[],p=0;p=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r{var n=Ht(),r=Wt(),i=Ut(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var A=D.get(t);if(O+=1,A!==void 0){if(A===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var ee=C?i:g(i,f.encoder,w,`key`,x);return[S(ee)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var j=[];if(E===void 0)return j;var te;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),te=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))te=_;else{var ne=Object.keys(E);te=v?ne.sort(v):ne}var M=h?String(i).replace(/\./g,`%2E`):String(i),N=o&&s(E)&&E.length===1?M+`[]`:M;if(c&&s(E)&&E.length===0)return N+`[]`;for(var P=0;P0?b+y:``}})),Kt=Re(((exports,t)=>{var n=Wt(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f{var n=Gt(),r=Kt(),i=Ut();t.exports={formats:i,parse:r,stringify:n}})),Jt=Re((exports=>{var t=Vt();function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=[`<`,`>`,`"`,"`",` `,`\r`,` -`,` `],s=[`{`,`}`,`|`,`\\`,`^`,"`"].concat(o),c=[`'`].concat(s),l=[`%`,`/`,`?`,`;`,`#`].concat(c),u=[`/`,`?`,`#`],d=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},h={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=qt();function v(e,t,r){if(e&&typeof e==`object`&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}n.prototype.parse=function(e,n,i){if(typeof e!=`string`)throw TypeError(`Parameter 'url' must be a string, not `+typeof e);var o=e.indexOf(`?`),s=o!==-1&&o127?ne+=`x`:ne+=te[M];if(!ne.match(f)){var P=ee.slice(0,E),re=ee.slice(E+1),ie=te.match(p);ie&&(P.push(ie[1]),re.unshift(ie[2])),re.length&&(b=`/`+re.join(`.`)+b),this.hostname=P.join(`.`);break}}}this.hostname.length>d?this.hostname=``:this.hostname=this.hostname.toLowerCase(),A||(this.hostname=t.toASCII(this.hostname));var ae=this.port?`:`+this.port:``,oe=this.hostname||``;this.host=oe+ae,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),b[0]!==`/`&&(b=`/`+b))}if(!m[C])for(var E=0,j=c.length;E0?r.host.split(`@`):!1;w&&(r.auth=w.shift(),r.hostname=w.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path=`/`+r.search:r.path=null,r.href=r.format(),r;for(var T=S.slice(-1)[0],E=(r.host||e.host||S.length>1)&&(T===`.`||T===`..`)||T===``,D=0,O=S.length;O>=0;O--)T=S[O],T===`.`?S.splice(O,1):T===`..`?(S.splice(O,1),D++):D&&(S.splice(O,1),D--);if(!b&&!x)for(;D--;)S.unshift(`..`);b&&S[0]!==``&&(!S[0]||S[0].charAt(0)!==`/`)&&S.unshift(``),E&&S.join(`/`).substr(-1)!==`/`&&S.push(``);var k=S[0]===``||S[0]&&S[0].charAt(0)===`/`;if(C){r.hostname=k?``:S.length?S.shift():``,r.host=r.hostname;var w=r.host&&r.host.indexOf(`@`)>0?r.host.split(`@`):!1;w&&(r.auth=w.shift(),r.hostname=w.shift(),r.host=r.hostname)}return b||=r.host&&S.length,b&&!k&&S.unshift(``),S.length>0?r.pathname=S.join(`/`):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},exports.parse=v,exports.resolve=b,exports.format=y})),Yt=He(zt(),1);Bt();var Xt=He(Jt(),1),Zt={parse:Xt.parse,format:Xt.format,resolve:Xt.resolve};I.RETINA_PREFIX=/@([0-9\.]+)x/,I.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Qt=!1,$t=`6.5.10`;function en(e){var t;if(!Qt){if(I.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf(`chrome`)>-1){var n=[` - %c %c %c PixiJS `+$t+` - ✰ `+e+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ +var Ze;(function(e){e[e.WEBGL_LEGACY=0]=`WEBGL_LEGACY`,e[e.WEBGL=1]=`WEBGL`,e[e.WEBGL2=2]=`WEBGL2`})(Ze||={});var Qe;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.WEBGL=1]=`WEBGL`,e[e.CANVAS=2]=`CANVAS`})(Qe||={});var $e;(function(e){e[e.COLOR=16384]=`COLOR`,e[e.DEPTH=256]=`DEPTH`,e[e.STENCIL=1024]=`STENCIL`})($e||={});var et;(function(e){e[e.NORMAL=0]=`NORMAL`,e[e.ADD=1]=`ADD`,e[e.MULTIPLY=2]=`MULTIPLY`,e[e.SCREEN=3]=`SCREEN`,e[e.OVERLAY=4]=`OVERLAY`,e[e.DARKEN=5]=`DARKEN`,e[e.LIGHTEN=6]=`LIGHTEN`,e[e.COLOR_DODGE=7]=`COLOR_DODGE`,e[e.COLOR_BURN=8]=`COLOR_BURN`,e[e.HARD_LIGHT=9]=`HARD_LIGHT`,e[e.SOFT_LIGHT=10]=`SOFT_LIGHT`,e[e.DIFFERENCE=11]=`DIFFERENCE`,e[e.EXCLUSION=12]=`EXCLUSION`,e[e.HUE=13]=`HUE`,e[e.SATURATION=14]=`SATURATION`,e[e.COLOR=15]=`COLOR`,e[e.LUMINOSITY=16]=`LUMINOSITY`,e[e.NORMAL_NPM=17]=`NORMAL_NPM`,e[e.ADD_NPM=18]=`ADD_NPM`,e[e.SCREEN_NPM=19]=`SCREEN_NPM`,e[e.NONE=20]=`NONE`,e[e.SRC_OVER=0]=`SRC_OVER`,e[e.SRC_IN=21]=`SRC_IN`,e[e.SRC_OUT=22]=`SRC_OUT`,e[e.SRC_ATOP=23]=`SRC_ATOP`,e[e.DST_OVER=24]=`DST_OVER`,e[e.DST_IN=25]=`DST_IN`,e[e.DST_OUT=26]=`DST_OUT`,e[e.DST_ATOP=27]=`DST_ATOP`,e[e.ERASE=26]=`ERASE`,e[e.SUBTRACT=28]=`SUBTRACT`,e[e.XOR=29]=`XOR`})(et||={});var tt;(function(e){e[e.POINTS=0]=`POINTS`,e[e.LINES=1]=`LINES`,e[e.LINE_LOOP=2]=`LINE_LOOP`,e[e.LINE_STRIP=3]=`LINE_STRIP`,e[e.TRIANGLES=4]=`TRIANGLES`,e[e.TRIANGLE_STRIP=5]=`TRIANGLE_STRIP`,e[e.TRIANGLE_FAN=6]=`TRIANGLE_FAN`})(tt||={});var I;(function(e){e[e.RGBA=6408]=`RGBA`,e[e.RGB=6407]=`RGB`,e[e.RG=33319]=`RG`,e[e.RED=6403]=`RED`,e[e.RGBA_INTEGER=36249]=`RGBA_INTEGER`,e[e.RGB_INTEGER=36248]=`RGB_INTEGER`,e[e.RG_INTEGER=33320]=`RG_INTEGER`,e[e.RED_INTEGER=36244]=`RED_INTEGER`,e[e.ALPHA=6406]=`ALPHA`,e[e.LUMINANCE=6409]=`LUMINANCE`,e[e.LUMINANCE_ALPHA=6410]=`LUMINANCE_ALPHA`,e[e.DEPTH_COMPONENT=6402]=`DEPTH_COMPONENT`,e[e.DEPTH_STENCIL=34041]=`DEPTH_STENCIL`})(I||={});var nt;(function(e){e[e.TEXTURE_2D=3553]=`TEXTURE_2D`,e[e.TEXTURE_CUBE_MAP=34067]=`TEXTURE_CUBE_MAP`,e[e.TEXTURE_2D_ARRAY=35866]=`TEXTURE_2D_ARRAY`,e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]=`TEXTURE_CUBE_MAP_POSITIVE_X`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]=`TEXTURE_CUBE_MAP_NEGATIVE_X`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]=`TEXTURE_CUBE_MAP_POSITIVE_Y`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]=`TEXTURE_CUBE_MAP_NEGATIVE_Y`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]=`TEXTURE_CUBE_MAP_POSITIVE_Z`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]=`TEXTURE_CUBE_MAP_NEGATIVE_Z`})(nt||={});var rt;(function(e){e[e.UNSIGNED_BYTE=5121]=`UNSIGNED_BYTE`,e[e.UNSIGNED_SHORT=5123]=`UNSIGNED_SHORT`,e[e.UNSIGNED_SHORT_5_6_5=33635]=`UNSIGNED_SHORT_5_6_5`,e[e.UNSIGNED_SHORT_4_4_4_4=32819]=`UNSIGNED_SHORT_4_4_4_4`,e[e.UNSIGNED_SHORT_5_5_5_1=32820]=`UNSIGNED_SHORT_5_5_5_1`,e[e.UNSIGNED_INT=5125]=`UNSIGNED_INT`,e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]=`UNSIGNED_INT_10F_11F_11F_REV`,e[e.UNSIGNED_INT_2_10_10_10_REV=33640]=`UNSIGNED_INT_2_10_10_10_REV`,e[e.UNSIGNED_INT_24_8=34042]=`UNSIGNED_INT_24_8`,e[e.UNSIGNED_INT_5_9_9_9_REV=35902]=`UNSIGNED_INT_5_9_9_9_REV`,e[e.BYTE=5120]=`BYTE`,e[e.SHORT=5122]=`SHORT`,e[e.INT=5124]=`INT`,e[e.FLOAT=5126]=`FLOAT`,e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]=`FLOAT_32_UNSIGNED_INT_24_8_REV`,e[e.HALF_FLOAT=36193]=`HALF_FLOAT`})(rt||={});var it;(function(e){e[e.FLOAT=0]=`FLOAT`,e[e.INT=1]=`INT`,e[e.UINT=2]=`UINT`})(it||={});var at;(function(e){e[e.NEAREST=0]=`NEAREST`,e[e.LINEAR=1]=`LINEAR`})(at||={});var ot;(function(e){e[e.CLAMP=33071]=`CLAMP`,e[e.REPEAT=10497]=`REPEAT`,e[e.MIRRORED_REPEAT=33648]=`MIRRORED_REPEAT`})(ot||={});var st;(function(e){e[e.OFF=0]=`OFF`,e[e.POW2=1]=`POW2`,e[e.ON=2]=`ON`,e[e.ON_MANUAL=3]=`ON_MANUAL`})(st||={});var ct;(function(e){e[e.NPM=0]=`NPM`,e[e.UNPACK=1]=`UNPACK`,e[e.PMA=2]=`PMA`,e[e.NO_PREMULTIPLIED_ALPHA=0]=`NO_PREMULTIPLIED_ALPHA`,e[e.PREMULTIPLY_ON_UPLOAD=1]=`PREMULTIPLY_ON_UPLOAD`,e[e.PREMULTIPLY_ALPHA=2]=`PREMULTIPLY_ALPHA`,e[e.PREMULTIPLIED_ALPHA=2]=`PREMULTIPLIED_ALPHA`})(ct||={});var lt;(function(e){e[e.NO=0]=`NO`,e[e.YES=1]=`YES`,e[e.AUTO=2]=`AUTO`,e[e.BLEND=0]=`BLEND`,e[e.CLEAR=1]=`CLEAR`,e[e.BLIT=2]=`BLIT`})(lt||={});var ut;(function(e){e[e.AUTO=0]=`AUTO`,e[e.MANUAL=1]=`MANUAL`})(ut||={});var dt;(function(e){e.LOW=`lowp`,e.MEDIUM=`mediump`,e.HIGH=`highp`})(dt||={});var ft;(function(e){e[e.NONE=0]=`NONE`,e[e.SCISSOR=1]=`SCISSOR`,e[e.STENCIL=2]=`STENCIL`,e[e.SPRITE=3]=`SPRITE`,e[e.COLOR=4]=`COLOR`})(ft||={});var pt;(function(e){e[e.RED=1]=`RED`,e[e.GREEN=2]=`GREEN`,e[e.BLUE=4]=`BLUE`,e[e.ALPHA=8]=`ALPHA`})(pt||={});var mt;(function(e){e[e.NONE=0]=`NONE`,e[e.LOW=2]=`LOW`,e[e.MEDIUM=4]=`MEDIUM`,e[e.HIGH=8]=`HIGH`})(mt||={});var ht;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]=`ELEMENT_ARRAY_BUFFER`,e[e.ARRAY_BUFFER=34962]=`ARRAY_BUFFER`,e[e.UNIFORM_BUFFER=35345]=`UNIFORM_BUFFER`})(ht||={});var gt={createCanvas:function(e,t){var n=document.createElement(`canvas`);return n.width=e,n.height=t,n},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var e;return(e=document.baseURI)??window.location.href},fetch:function(e,t){return fetch(e,t)}},_t=/iPhone/i,vt=/iPod/i,yt=/iPad/i,bt=/\biOS-universal(?:.+)Mac\b/i,xt=/\bAndroid(?:.+)Mobile\b/i,St=/Android/i,Ct=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,wt=/Silk/i,Tt=/Windows Phone/i,Et=/\bWindows(?:.+)ARM\b/i,Dt=/BlackBerry/i,Ot=/BB10/i,kt=/Opera Mini/i,At=/\b(CriOS|Chrome)(?:.+)Mobile/i,jt=/Mobile(?:.+)Firefox\b/i,Mt=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Nt(e){return function(t){return t.test(e)}}function Pt(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=Nt(n),a={apple:{phone:i(_t)&&!i(Tt),ipod:i(vt),tablet:!i(_t)&&(i(yt)||Mt(t))&&!i(Tt),universal:i(bt),device:(i(_t)||i(vt)||i(yt)||i(bt)||Mt(t))&&!i(Tt)},amazon:{phone:i(Ct),tablet:!i(Ct)&&i(wt),device:i(Ct)||i(wt)},android:{phone:!i(Tt)&&i(Ct)||!i(Tt)&&i(xt),tablet:!i(Tt)&&!i(Ct)&&!i(xt)&&(i(wt)||i(St)),device:!i(Tt)&&(i(Ct)||i(wt)||i(xt)||i(St))||i(/\bokhttp\b/i)},windows:{phone:i(Tt),tablet:i(Et),device:i(Tt)||i(Et)},other:{blackberry:i(Dt),blackberry10:i(Ot),opera:i(kt),firefox:i(jt),chrome:i(At),device:i(Dt)||i(Ot)||i(kt)||i(jt)||i(At)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var Ft=Pt(globalThis.navigator);function It(){return!Ft.apple.device}function Lt(e){var t=!0;if(Ft.tablet||Ft.phone){if(Ft.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(Ft.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var r=parseInt(n[1],10);r<7&&(t=!1)}}}return t?e:4}var L={ADAPTER:gt,MIPMAP_TEXTURES:st.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:mt.NONE,SPRITE_MAX_TEXTURES:Lt(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:ut.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:ot.CLAMP,SCALE_MODE:at.LINEAR,PRECISION_VERTEX:dt.HIGH,PRECISION_FRAGMENT:Ft.apple.device?dt.HIGH:dt.MEDIUM,CAN_UPLOAD_SAME_BUFFER:It(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Rt=Le(((exports,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i{t.exports=n,t.exports.default=n;function n(e,t,n){n||=2;var i=t&&t.length,o=i?t[0]*n:e.length,s=r(e,0,o,n,!0),c=[];if(!s||s.next===s.prev)return c;var l,d,f,p,m,h,g;if(i&&(s=u(e,t,s,n)),e.length>80*n){l=f=e[0],d=p=e[1];for(var _=n;_f&&(f=m),h>p&&(p=h);g=Math.max(f-l,p-d),g=g===0?0:32767/g}return a(s,c,n,l,d,g,0),c}function r(e,t,n,r,i){var a,o;if(i===ee(e,t,n,r)>0)for(a=t;a=t;a-=r)o=A(a,e[a],e[a+1],o);return o&&S(o,o.next)&&(j(o),o=o.next),o}function i(e,t){if(!e)return e;t||=e;var n=e,r;do if(r=!1,!n.steiner&&(S(n,n.next)||x(n.prev,n,n.next)===0)){if(j(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function a(e,t,n,r,u,d,f){if(e){!f&&d&&h(e,r,u,d);for(var p=e,m,g;e.prev!==e.next;){if(m=e.prev,g=e.next,d?s(e,r,u,d):o(e)){t.push(m.i/n|0),t.push(e.i/n|0),t.push(g.i/n|0),j(e),e=g.next,p=g.next;continue}if(e=g,e===p){f?f===1?(e=c(i(e),t,n),a(e,t,n,r,u,d,2)):f===2&&l(e,t,n,r,u,d):a(i(e),t,n,r,u,d,1);break}}}}function o(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=ia?i>o?i:o:a>o?a:o,p=s>c?s>l?s:l:c>l?c:l,m=r.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&y(i,s,a,c,o,l,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function s(e,t,n,r){var i=e.prev,a=e,o=e.next;if(x(i,a,o)>=0)return!1;for(var s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=sc?s>l?s:l:c>l?c:l,g=u>d?u>f?u:f:d>f?d:f,v=_(p,m,t,n,r),b=_(h,g,t,n,r),S=e.prevZ,C=e.nextZ;S&&S.z>=v&&C&&C.z<=b;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0||(S=S.prevZ,C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;S&&S.z>=v;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;C&&C.z<=b;){if(C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function c(e,t,n){var r=e;do{var a=r.prev,o=r.next.next;!S(a,o)&&C(a,r,r.next,o)&&D(a,o)&&D(o,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),j(r),j(r.next),r=e=o),r=r.next}while(r!==e);return i(r)}function l(e,t,n,r,o,s){var c=e;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&b(c,l)){var u=k(c,l);c=i(c,c.next),u=i(u,u.next),a(c,t,n,r,o,s,0),a(u,t,n,r,o,s,0);return}l=l.next}c=c.next}while(c!==e)}function u(e,t,n,i){var a=[],o,s,c,l,u;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a&&(a=s,o=n.x=n.x&&n.x>=l&&r!==n.x&&y(io.x||n.x===o.x&&m(o,n)))&&(o=n,d=f)),n=n.next;while(n!==c);return o}function m(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,n,r){var i=e;do i.z===0&&(i.z=_(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(e){var t,n,r,i,a,o,s,c,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||c>0&&r;)s!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1);return e}function _(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function v(e){var t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!E(e,t)&&(D(e,t)&&D(t,e)&&O(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||S(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function S(e,t){return e.x===t.x&&e.y===t.y}function C(e,t,n,r){var i=T(x(e,t,n)),a=T(x(e,t,r)),o=T(x(n,r,e)),s=T(x(n,r,t));return!!(i!==a&&o!==s||i===0&&w(e,n,t)||a===0&&w(e,r,t)||o===0&&w(n,e,r)||s===0&&w(n,t,r))}function w(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function T(e){return e>0?1:e<0?-1:0}function E(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&C(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function D(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function O(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function k(e,t){var n=new M(e.i,e.x,e.y),r=new M(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function A(e,t,n,r){var i=new M(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function j(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(ee(e,0,a,n));if(i)for(var s=0,c=t.length;s0&&(r+=e[i-1].length,n.holes.push(r))}return n}})),Bt=Le(((exports,t)=>{(function(n){var r=typeof exports==`object`&&exports&&!exports.nodeType&&exports,i=typeof t==`object`&&t&&!t.nodeType&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a||a.self===a)&&(n=a);var o,s=2147483647,c=36,l=1,u=26,d=38,f=700,p=72,m=128,h=`-`,g=/^xn--/,_=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},b=c-l,x=Math.floor,S=String.fromCharCode,C;function w(e){throw RangeError(y[e])}function T(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(v,`.`);var i=e.split(`.`),a=T(i,t).join(`.`);return r+a}function D(e){for(var t=[],n=0,r=e.length,i,a;n=55296&&i<=56319&&n65535&&(e-=65536,t+=S(e>>>10&1023|55296),e=56320|e&1023),t+=S(e),t}).join(``)}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function A(e,t){return e+22+75*(e<26)-((t!=0)<<5)}function j(e,t,n){var r=0;for(e=n?x(e/f):e>>1,e+=x(e/t);e>b*u>>1;r+=c)e=x(e/b);return x(r+(b+1)*e/(e+d))}function M(e){var t=[],n=e.length,r,i=0,a=m,o=p,d,f,g,_,v,y,b,S,C;for(d=e.lastIndexOf(h),d<0&&(d=0),f=0;f=128&&w(`not-basic`),t.push(e.charCodeAt(f));for(g=d>0?d+1:0;g=n&&w(`invalid-input`),b=k(e.charCodeAt(g++)),(b>=c||b>x((s-i)/v))&&w(`overflow`),i+=b*v,S=y<=o?l:y>=o+u?u:y-o,!(bx(s/C)&&w(`overflow`),v*=C;r=t.length+1,o=j(i-_,r,_==0),x(i/r)>s-a&&w(`overflow`),a+=x(i/r),i%=r,t.splice(i++,0,a)}return O(t)}function ee(e){var t,n,r,i,a,o,d,f,g,_,v,y=[],b,C,T,E;for(e=D(e),b=e.length,t=m,n=0,a=p,o=0;o=t&&vx((s-n)/C)&&w(`overflow`),n+=(d-t)*C,t=d,o=0;os&&w(`overflow`),v==t){for(f=n,g=c;_=g<=a?l:g>=a+u?u:g-a,!(f<_);g+=c)E=f-_,T=c-_,y.push(S(A(_+E%T,0))),f=x(E/T);y.push(S(A(f,0))),a=j(n,C,r==i),n=0,++r}++n,++t}return y.join(``)}function te(e){return E(e,function(e){return g.test(e)?M(e.slice(4).toLowerCase()):e})}function N(e){return E(e,function(e){return _.test(e)?`xn--`+ee(e):e})}if(o={version:`1.4.1`,ucs2:{decode:D,encode:O},decode:M,encode:ee,toASCII:N,toUnicode:te},typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(`punycode`,function(){return o});else if(r&&i)if(t.exports==r)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(r[C]=o[C]);else n.punycode=o})(exports)})),Vt=Le(((exports,t)=>{Object.defineProperty(exports,`__esModule`,{value:!0});function n(){let e,t,n=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.get(n)}else if(t)return t.get(n)},r=(n,r)=>{n&&(typeof n==`object`||typeof n==`function`)?(e||=new WeakMap,e.set(n,r)):(t||=new Map,t.set(n,r))},i=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.has(n)}else if(t)return t.has(n);return!1},a=e=>{if(!i(e))throw TypeError(`Side channel does not contain the given key`)};return{get:n,set:r,has:i,assert:a}}exports.default=n,(typeof exports.default==`object`&&exports.default!==null||typeof exports.default==`function`)&&(Object.assign(exports.default,exports),t.exports=exports.default)})),Ht=Le(((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}})),Ut=Le(((exports,t)=>{var n=Ht(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=d?s.slice(l,l+d):s,f=[],p=0;p=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r{var n=Vt(),r=Ut(),i=Ht(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var A=D.get(t);if(O+=1,A!==void 0){if(A===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var j=C?i:g(i,f.encoder,w,`key`,x);return[S(j)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var M=[];if(E===void 0)return M;var ee;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),ee=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))ee=_;else{var te=Object.keys(E);ee=v?te.sort(v):te}var N=h?String(i).replace(/\./g,`%2E`):String(i),P=o&&s(E)&&E.length===1?N+`[]`:N;if(c&&s(E)&&E.length===0)return P+`[]`;for(var F=0;F0?b+y:``}})),Gt=Le(((exports,t)=>{var n=Ut(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f{var n=Wt(),r=Gt(),i=Ht();t.exports={formats:i,parse:r,stringify:n}})),qt=Le((exports=>{var t=Bt();function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=[`<`,`>`,`"`,"`",` `,`\r`,` +`,` `],s=[`{`,`}`,`|`,`\\`,`^`,"`"].concat(o),c=[`'`].concat(s),l=[`%`,`/`,`?`,`;`,`#`].concat(c),u=[`/`,`?`,`#`],d=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},h={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=Kt();function v(e,t,r){if(e&&typeof e==`object`&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}n.prototype.parse=function(e,n,i){if(typeof e!=`string`)throw TypeError(`Parameter 'url' must be a string, not `+typeof e);var o=e.indexOf(`?`),s=o!==-1&&o127?te+=`x`:te+=ee[N];if(!te.match(f)){var F=j.slice(0,E),ne=j.slice(E+1),re=ee.match(p);re&&(F.push(re[1]),ne.unshift(re[2])),ne.length&&(b=`/`+ne.join(`.`)+b),this.hostname=F.join(`.`);break}}}this.hostname.length>d?this.hostname=``:this.hostname=this.hostname.toLowerCase(),A||(this.hostname=t.toASCII(this.hostname));var ie=this.port?`:`+this.port:``,ae=this.hostname||``;this.host=ae+ie,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),b[0]!==`/`&&(b=`/`+b))}if(!m[C])for(var E=0,M=c.length;E0?r.host.split(`@`):!1;w&&(r.auth=w.shift(),r.hostname=w.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path=`/`+r.search:r.path=null,r.href=r.format(),r;for(var T=S.slice(-1)[0],E=(r.host||e.host||S.length>1)&&(T===`.`||T===`..`)||T===``,D=0,O=S.length;O>=0;O--)T=S[O],T===`.`?S.splice(O,1):T===`..`?(S.splice(O,1),D++):D&&(S.splice(O,1),D--);if(!b&&!x)for(;D--;)S.unshift(`..`);b&&S[0]!==``&&(!S[0]||S[0].charAt(0)!==`/`)&&S.unshift(``),E&&S.join(`/`).substr(-1)!==`/`&&S.push(``);var k=S[0]===``||S[0]&&S[0].charAt(0)===`/`;if(C){r.hostname=k?``:S.length?S.shift():``,r.host=r.hostname;var w=r.host&&r.host.indexOf(`@`)>0?r.host.split(`@`):!1;w&&(r.auth=w.shift(),r.hostname=w.shift(),r.host=r.hostname)}return b||=r.host&&S.length,b&&!k&&S.unshift(``),S.length>0?r.pathname=S.join(`/`):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},exports.parse=v,exports.resolve=b,exports.format=y})),Jt=Ve(Rt(),1);zt();var Yt=Ve(qt(),1),Xt={parse:Yt.parse,format:Yt.format,resolve:Yt.resolve};L.RETINA_PREFIX=/@([0-9\.]+)x/,L.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Zt=!1,Qt=`6.5.10`;function $t(e){var t;if(!Zt){if(L.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf(`chrome`)>-1){var n=[` + %c %c %c PixiJS `+Qt+` - ✰ `+e+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ -`,`background: #ff66a5; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`color: #ff66a5; background: #030307; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`background: #ffc3dc; padding:5px 0;`,`background: #ff66a5; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`,`color: #ff2424; background: #fff; padding:5px 0;`];(t=globalThis.console).log.apply(t,n)}else globalThis.console&&globalThis.console.log(`PixiJS `+$t+` - `+e+` - http://www.pixijs.com/`);Qt=!0}}var tn;function nn(){return tn===void 0&&(tn=(function(){var e={stencil:!0,failIfMajorPerformanceCaveat:I.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!I.ADAPTER.getWebGLRenderingContext())return!1;var t=I.ADAPTER.createCanvas(),n=t.getContext(`webgl`,e)||t.getContext(`experimental-webgl`,e),r=!!(n&&n.getContextAttributes().stencil);if(n){var i=n.getExtension(`WEBGL_lose_context`);i&&i.loseContext()}return n=null,r}catch{return!1}})()),tn}function rn(e,t){return t===void 0&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t}function an(e){var t=e.toString(16);return t=`000000`.substring(0,6-t.length)+t,`#`+t}function on(e){return(e[0]*255<<16)+(e[1]*255<<8)+(e[2]*255|0)}function sn(){for(var e=[],t=[],n=0;n<32;n++)e[n]=n,t[n]=n;e[tt.NORMAL_NPM]=tt.NORMAL,e[tt.ADD_NPM]=tt.ADD,e[tt.SCREEN_NPM]=tt.SCREEN,t[tt.NORMAL]=tt.NORMAL_NPM,t[tt.ADD]=tt.ADD_NPM,t[tt.SCREEN]=tt.SCREEN_NPM;var r=[];return r.push(t),r.push(e),r}var cn=sn();function ln(e,t){if(t===1)return(t*255<<24)+e;if(t===0)return 0;var n=e>>16&255,r=e>>8&255,i=e&255;return n=n*t+.5|0,r=r*t+.5|0,i=i*t+.5|0,(t*255<<24)+(n<<16)+(r<<8)+i}function un(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?`Float32Array`:e instanceof Uint32Array?`Uint32Array`:`Int32Array`;if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return`Uint16Array`}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return`Uint8Array`;return null}function dn(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function fn(e){return!(e&e-1)&&!!e}function pn(e){var t=(e>65535?1:0)<<4;e>>>=t;var n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function mn(e,t,n){var r=e.length,i;if(!(t>=r||n===0)){n=t+n>r?r-t:n;var a=r-n;for(i=t;i>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t}function rn(e){var t=e.toString(16);return t=`000000`.substring(0,6-t.length)+t,`#`+t}function an(e){return(e[0]*255<<16)+(e[1]*255<<8)+(e[2]*255|0)}function on(){for(var e=[],t=[],n=0;n<32;n++)e[n]=n,t[n]=n;e[et.NORMAL_NPM]=et.NORMAL,e[et.ADD_NPM]=et.ADD,e[et.SCREEN_NPM]=et.SCREEN,t[et.NORMAL]=et.NORMAL_NPM,t[et.ADD]=et.ADD_NPM,t[et.SCREEN]=et.SCREEN_NPM;var r=[];return r.push(t),r.push(e),r}var sn=on();function cn(e,t){if(t===1)return(t*255<<24)+e;if(t===0)return 0;var n=e>>16&255,r=e>>8&255,i=e&255;return n=n*t+.5|0,r=r*t+.5|0,i=i*t+.5|0,(t*255<<24)+(n<<16)+(r<<8)+i}function ln(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?`Float32Array`:e instanceof Uint32Array?`Uint32Array`:`Int32Array`;if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return`Uint16Array`}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return`Uint8Array`;return null}function un(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function dn(e){return!(e&e-1)&&!!e}function fn(e){var t=(e>65535?1:0)<<4;e>>>=t;var n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function pn(e,t,n){var r=e.length,i;if(!(t>=r||n===0)){n=t+n>r?r-t:n;var a=r-n;for(i=t;i8)throw Error(`max arguments reached`);var c=this,l=c.name,u=c.items;this._aliasCount++;for(var d=0,f=u.length;d0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this},e.prototype.remove=function(e){var t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this},e.prototype.contains=function(e){return this.items.indexOf(e)!==-1},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(e.prototype,`empty`,{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`name`,{get:function(){return this._name},enumerable:!1,configurable:!0}),e}();Object.defineProperties(kn.prototype,{dispatch:{value:kn.prototype.emit},run:{value:kn.prototype.emit}}),I.TARGET_FPMS=.06;var An;(function(e){e[e.INTERACTION=50]=`INTERACTION`,e[e.HIGH=25]=`HIGH`,e[e.NORMAL=0]=`NORMAL`,e[e.LOW=-25]=`LOW`,e[e.UTILITY=-50]=`UTILITY`})(An||={});var jn=function(){function e(e,t,n,r){t===void 0&&(t=null),n===void 0&&(n=0),r===void 0&&(r=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=n,this.once=r}return e.prototype.match=function(e,t){return t===void 0&&(t=null),this.fn===e&&this.context===t},e.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t},e.prototype.connect=function(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this},e.prototype.destroy=function(e){e===void 0&&(e=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var t=this.next;return this.next=e?null:t,this.previous=null,t},e}(),Mn=function(){function e(){var e=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new jn(null,null,1/0),this.deltaMS=1/I.TARGET_FPMS,this.elapsedMS=1/I.TARGET_FPMS,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&e._requestId===null&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return e.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(e,t,n){return n===void 0&&(n=An.NORMAL),this._addListener(new jn(e,t,n))},e.prototype.addOnce=function(e,t,n){return n===void 0&&(n=An.NORMAL),this._addListener(new jn(e,t,n,!0))},e.prototype._addListener=function(e){var t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this},e.prototype.remove=function(e,t){for(var n=this._head.next;n;)n=n.match(e,t)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,`count`,{get:function(){if(!this._head)return 0;for(var e=0,t=this._head;t=t.next;)e++;return e},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(e){e===void 0&&(e=performance.now());var t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){var n=e-this._lastFrame|0;if(n=this.x&&e=this.y&&te.right?e.right:this.right;if(r<=n)return!1;var i=this.ye.bottom?e.bottom:this.bottom;return a>i}var o=this.left,s=this.right,c=this.top,l=this.bottom;if(s<=o||l<=c)return!1;var u=zn[0].set(e.left,e.top),d=zn[1].set(e.left,e.bottom),f=zn[2].set(e.right,e.top),p=zn[3].set(e.right,e.bottom);if(f.x<=u.x||d.y<=u.y)return!1;var m=Math.sign(t.a*t.d-t.b*t.c);if(m===0||(t.apply(u,u),t.apply(d,d),t.apply(f,f),t.apply(p,p),Math.max(u.x,d.x,f.x,p.x)<=o||Math.min(u.x,d.x,f.x,p.x)>=s||Math.max(u.y,d.y,f.y,p.y)<=c||Math.min(u.y,d.y,f.y,p.y)>=l))return!1;var h=m*(d.y-u.y),g=m*(u.x-d.x),_=h*o+g*c,v=h*s+g*c,y=h*o+g*l,b=h*s+g*l;if(Math.max(_,v,y,b)<=h*u.x+g*u.y||Math.min(_,v,y,b)>=h*p.x+g*p.y)return!1;var x=m*(u.y-f.y),S=m*(f.x-u.x),C=x*o+S*c,w=x*s+S*c,T=x*o+S*l,E=x*s+S*l;return!(Math.max(C,w,T,E)<=x*u.x+S*u.y||Math.min(C,w,T,E)>=x*p.x+S*p.y)},e.prototype.pad=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this},e.prototype.fit=function(e){var t=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),r=Math.max(this.y,e.y),i=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(n-t,0),this.y=r,this.height=Math.max(i-r,0),this},e.prototype.ceil=function(e,t){e===void 0&&(e=1),t===void 0&&(t=.001);var n=Math.ceil((this.x+this.width-t)*e)/e,r=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=n-this.x,this.height=r-this.y,this},e.prototype.enlarge=function(e){var t=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),r=Math.min(this.y,e.y),i=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=n-t,this.y=r,this.height=i-r,this},e.prototype.toString=function(){return`[@pixi/math:Rectangle x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}();(function(){function e(e,t,n){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),this.x=e,this.y=t,this.radius=n,this.type=Ln.CIRC}return e.prototype.clone=function(){return new e(this.x,this.y,this.radius)},e.prototype.contains=function(e,t){if(this.radius<=0)return!1;var n=this.radius*this.radius,r=this.x-e,i=this.y-t;return r*=r,i*=i,r+i<=n},e.prototype.getBounds=function(){return new Bn(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)},e.prototype.toString=function(){return`[@pixi/math:Circle x=`+this.x+` y=`+this.y+` radius=`+this.radius+`]`},e})(),function(){function e(e,t,n,r){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),this.x=e,this.y=t,this.width=n,this.height=r,this.type=Ln.ELIP}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var n=(e-this.x)/this.width,r=(t-this.y)/this.height;return n*=n,r*=r,n+r<=1},e.prototype.getBounds=function(){return new Bn(this.x-this.width,this.y-this.height,this.width,this.height)},e.prototype.toString=function(){return`[@pixi/math:Ellipse x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}(),function(){function e(){for(var e=arguments,t=[],n=0;nt!=l>t&&e<(c-o)*((t-s)/(l-s))+o;u&&(n=!n)}return n},e.prototype.toString=function(){return`[@pixi/math:Polygon`+(`closeStroke=`+this.closeStroke)+(`points=`+this.points.reduce(function(e,t){return e+`, `+t},``)+`]`)},e}(),function(){function e(e,t,n,r,i){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=20),this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i,this.type=Ln.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){var n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;var r=e-(this.x+n),i=t-(this.y+n),a=n*n;if(r*r+i*i<=a||(r=e-(this.x+this.width-n),r*r+i*i<=a)||(i=t-(this.y+this.height-n),r*r+i*i<=a)||(r=e-(this.x+n),r*r+i*i<=a))return!0}return!1},e.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=`+this.x+` y=`+this.y+(`width=`+this.width+` height=`+this.height+` radius=`+this.radius+`]`)},e}();var Vn=function(){function e(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0),this._x=n,this._y=r,this.cb=e,this.scope=t}return e.prototype.clone=function(t,n){return t===void 0&&(t=this.cb),n===void 0&&(n=this.scope),new e(t,n,this._x,this._y)},e.prototype.set=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this},e.prototype.copyFrom=function(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},e.prototype.copyTo=function(e){return e.set(this._x,this._y),e},e.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},e.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=`+this.scope+`]`},Object.defineProperty(e.prototype,`x`,{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`y`,{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),e}(),Hn=function(){function e(e,t,n,r,i,a){e===void 0&&(e=1),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=1),i===void 0&&(i=0),a===void 0&&(a=0),this.array=null,this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a}return e.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},e.prototype.set=function(e,t,n,r,i,a){return this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a,this},e.prototype.toArray=function(e,t){this.array||=new Float32Array(9);var n=t||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},e.prototype.apply=function(e,t){t||=new Rn;var n=e.x,r=e.y;return t.x=this.a*n+this.c*r+this.tx,t.y=this.b*n+this.d*r+this.ty,t},e.prototype.applyInverse=function(e,t){t||=new Rn;var n=1/(this.a*this.d+this.c*-this.b),r=e.x,i=e.y;return t.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,t.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,t},e.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},e.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},e.prototype.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this.a,i=this.c,a=this.tx;return this.a=r*t-this.b*n,this.b=r*n+this.b*t,this.c=i*t-this.d*n,this.d=i*n+this.d*t,this.tx=a*t-this.ty*n,this.ty=a*n+this.ty*t,this},e.prototype.append=function(e){var t=this.a,n=this.b,r=this.c,i=this.d;return this.a=e.a*t+e.b*r,this.b=e.a*n+e.b*i,this.c=e.c*t+e.d*r,this.d=e.c*n+e.d*i,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*n+e.ty*i+this.ty,this},e.prototype.setTransform=function(e,t,n,r,i,a,o,s,c){return this.a=Math.cos(o+c)*i,this.b=Math.sin(o+c)*i,this.c=-Math.sin(o-s)*a,this.d=Math.cos(o-s)*a,this.tx=e-(n*this.a+r*this.c),this.ty=t-(n*this.b+r*this.d),this},e.prototype.prepend=function(e){var t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){var n=this.a,r=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},e.prototype.decompose=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=e.pivot,o=-Math.atan2(-r,i),s=Math.atan2(n,t),c=Math.abs(o+s);return c<1e-5||Math.abs(Pn-c)<1e-5?(e.rotation=s,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=s),e.scale.x=Math.sqrt(t*t+n*n),e.scale.y=Math.sqrt(r*r+i*i),e.position.x=this.tx+(a.x*t+a.y*r),e.position.y=this.ty+(a.x*n+a.y*i),e},e.prototype.invert=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.tx,a=e*r-t*n;return this.a=r/a,this.b=-t/a,this.c=-n/a,this.d=e/a,this.tx=(n*this.ty-r*i)/a,this.ty=-(e*this.ty-t*i)/a,this},e.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},e.prototype.clone=function(){var t=new e;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},e.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},e.prototype.toString=function(){return`[@pixi/math:Matrix a=`+this.a+` b=`+this.b+` c=`+this.c+` d=`+this.d+` tx=`+this.tx+` ty=`+this.ty+`]`},Object.defineProperty(e,`IDENTITY`,{get:function(){return new e},enumerable:!1,configurable:!0}),Object.defineProperty(e,`TEMP_MATRIX`,{get:function(){return new e},enumerable:!1,configurable:!0}),e}(),Un=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Wn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Gn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Kn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],qn=[],Jn=[],Yn=Math.sign;function Xn(){for(var e=0;e<16;e++){var t=[];qn.push(t);for(var n=0;n<16;n++)for(var r=Yn(Un[e]*Un[n]+Gn[e]*Wn[n]),i=Yn(Wn[e]*Un[n]+Kn[e]*Wn[n]),a=Yn(Un[e]*Gn[n]+Gn[e]*Kn[n]),o=Yn(Wn[e]*Gn[n]+Kn[e]*Kn[n]),s=0;s<16;s++)if(Un[s]===r&&Wn[s]===i&&Gn[s]===a&&Kn[s]===o){t.push(s);break}}for(var e=0;e<16;e++){var c=new Hn;c.set(Un[e],Wn[e],Gn[e],Kn[e],0,0),Jn.push(c)}}Xn();var Zn={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return Un[e]},uY:function(e){return Wn[e]},vX:function(e){return Gn[e]},vY:function(e){return Kn[e]},inv:function(e){return e&8?e&15:-e&7},add:function(e,t){return qn[e][t]},sub:function(e,t){return qn[e][Zn.inv(t)]},rotate180:function(e){return e^4},isVertical:function(e){return(e&3)==2},byDirection:function(e,t){return Math.abs(e)*2<=Math.abs(t)?t>=0?Zn.S:Zn.N:Math.abs(t)*2<=Math.abs(e)?e>0?Zn.E:Zn.W:t>0?e>0?Zn.SE:Zn.SW:e>0?Zn.NE:Zn.NW},matrixAppendRotationInv:function(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=Jn[Zn.inv(t)];i.tx=n,i.ty=r,e.append(i)}},Qn=function(){function e(){this.worldTransform=new Hn,this.localTransform=new Hn,this.position=new Vn(this.onChange,this,0,0),this.scale=new Vn(this.onChange,this,1,1),this.pivot=new Vn(this.onChange,this,0,0),this.skew=new Vn(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},e.prototype.toString=function(){return`[@pixi/math:Transform `+(`position=(`+this.position.x+`, `+this.position.y+`) `)+(`rotation=`+this.rotation+` `)+(`scale=(`+this.scale.x+`, `+this.scale.y+`) `)+(`skew=(`+this.skew.x+`, `+this.skew.y+`) `)+`]`},e.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}},e.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(e.prototype,`rotation`,{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),e.IDENTITY=new e,e}();I.PREFER_ENV=It.any?Qe.WEBGL:Qe.WEBGL2,I.STRICT_TEXTURE_CACHE=!1;var $n=[];function er(e,t){if(!e)return null;var n=``;if(typeof e==`string`){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);r&&(n=r[1].toLowerCase())}for(var i=$n.length-1;i>=0;--i){var a=$n[i];if(a.test&&a.test(e,n))return new a(e,t)}throw Error(`Unrecognized source type to auto-detect Resource`)} +var wn=function(){return wn=Object.assign||function(e){for(var t=arguments,n,r=1,i=arguments.length;r8)throw Error(`max arguments reached`);var c=this,l=c.name,u=c.items;this._aliasCount++;for(var d=0,f=u.length;d0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this},e.prototype.remove=function(e){var t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this},e.prototype.contains=function(e){return this.items.indexOf(e)!==-1},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(e.prototype,`empty`,{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`name`,{get:function(){return this._name},enumerable:!1,configurable:!0}),e}();Object.defineProperties(On.prototype,{dispatch:{value:On.prototype.emit},run:{value:On.prototype.emit}}),L.TARGET_FPMS=.06;var kn;(function(e){e[e.INTERACTION=50]=`INTERACTION`,e[e.HIGH=25]=`HIGH`,e[e.NORMAL=0]=`NORMAL`,e[e.LOW=-25]=`LOW`,e[e.UTILITY=-50]=`UTILITY`})(kn||={});var An=function(){function e(e,t,n,r){t===void 0&&(t=null),n===void 0&&(n=0),r===void 0&&(r=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=n,this.once=r}return e.prototype.match=function(e,t){return t===void 0&&(t=null),this.fn===e&&this.context===t},e.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t},e.prototype.connect=function(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this},e.prototype.destroy=function(e){e===void 0&&(e=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var t=this.next;return this.next=e?null:t,this.previous=null,t},e}(),jn=function(){function e(){var e=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new An(null,null,1/0),this.deltaMS=1/L.TARGET_FPMS,this.elapsedMS=1/L.TARGET_FPMS,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&e._requestId===null&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return e.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(e,t,n){return n===void 0&&(n=kn.NORMAL),this._addListener(new An(e,t,n))},e.prototype.addOnce=function(e,t,n){return n===void 0&&(n=kn.NORMAL),this._addListener(new An(e,t,n,!0))},e.prototype._addListener=function(e){var t=this._head.next,n=this._head;if(!t)e.connect(n);else{for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}return this._startIfPossible(),this},e.prototype.remove=function(e,t){for(var n=this._head.next;n;)n=n.match(e,t)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,`count`,{get:function(){if(!this._head)return 0;for(var e=0,t=this._head;t=t.next;)e++;return e},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(e){e===void 0&&(e=performance.now());var t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){var n=e-this._lastFrame|0;if(n=this.x&&e=this.y&&te.right?e.right:this.right;if(r<=n)return!1;var i=this.ye.bottom?e.bottom:this.bottom;return a>i}var o=this.left,s=this.right,c=this.top,l=this.bottom;if(s<=o||l<=c)return!1;var u=Rn[0].set(e.left,e.top),d=Rn[1].set(e.left,e.bottom),f=Rn[2].set(e.right,e.top),p=Rn[3].set(e.right,e.bottom);if(f.x<=u.x||d.y<=u.y)return!1;var m=Math.sign(t.a*t.d-t.b*t.c);if(m===0||(t.apply(u,u),t.apply(d,d),t.apply(f,f),t.apply(p,p),Math.max(u.x,d.x,f.x,p.x)<=o||Math.min(u.x,d.x,f.x,p.x)>=s||Math.max(u.y,d.y,f.y,p.y)<=c||Math.min(u.y,d.y,f.y,p.y)>=l))return!1;var h=m*(d.y-u.y),g=m*(u.x-d.x),_=h*o+g*c,v=h*s+g*c,y=h*o+g*l,b=h*s+g*l;if(Math.max(_,v,y,b)<=h*u.x+g*u.y||Math.min(_,v,y,b)>=h*p.x+g*p.y)return!1;var x=m*(u.y-f.y),S=m*(f.x-u.x),C=x*o+S*c,w=x*s+S*c,T=x*o+S*l,E=x*s+S*l;return!(Math.max(C,w,T,E)<=x*u.x+S*u.y||Math.min(C,w,T,E)>=x*p.x+S*p.y)},e.prototype.pad=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this},e.prototype.fit=function(e){var t=Math.max(this.x,e.x),n=Math.min(this.x+this.width,e.x+e.width),r=Math.max(this.y,e.y),i=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(n-t,0),this.y=r,this.height=Math.max(i-r,0),this},e.prototype.ceil=function(e,t){e===void 0&&(e=1),t===void 0&&(t=.001);var n=Math.ceil((this.x+this.width-t)*e)/e,r=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=n-this.x,this.height=r-this.y,this},e.prototype.enlarge=function(e){var t=Math.min(this.x,e.x),n=Math.max(this.x+this.width,e.x+e.width),r=Math.min(this.y,e.y),i=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=n-t,this.y=r,this.height=i-r,this},e.prototype.toString=function(){return`[@pixi/math:Rectangle x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}();(function(){function e(e,t,n){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),this.x=e,this.y=t,this.radius=n,this.type=In.CIRC}return e.prototype.clone=function(){return new e(this.x,this.y,this.radius)},e.prototype.contains=function(e,t){if(this.radius<=0)return!1;var n=this.radius*this.radius,r=this.x-e,i=this.y-t;return r*=r,i*=i,r+i<=n},e.prototype.getBounds=function(){return new zn(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)},e.prototype.toString=function(){return`[@pixi/math:Circle x=`+this.x+` y=`+this.y+` radius=`+this.radius+`]`},e})(),function(){function e(e,t,n,r){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),this.x=e,this.y=t,this.width=n,this.height=r,this.type=In.ELIP}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;var n=(e-this.x)/this.width,r=(t-this.y)/this.height;return n*=n,r*=r,n+r<=1},e.prototype.getBounds=function(){return new zn(this.x-this.width,this.y-this.height,this.width,this.height)},e.prototype.toString=function(){return`[@pixi/math:Ellipse x=`+this.x+` y=`+this.y+` width=`+this.width+` height=`+this.height+`]`},e}(),function(){function e(){for(var e=arguments,t=[],n=0;nt!=l>t&&e<(c-o)*((t-s)/(l-s))+o;u&&(n=!n)}return n},e.prototype.toString=function(){return`[@pixi/math:Polygon`+(`closeStroke=`+this.closeStroke)+(`points=`+this.points.reduce(function(e,t){return e+`, `+t},``)+`]`)},e}(),function(){function e(e,t,n,r,i){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=20),this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i,this.type=In.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){var n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;var r=e-(this.x+n),i=t-(this.y+n),a=n*n;if(r*r+i*i<=a||(r=e-(this.x+this.width-n),r*r+i*i<=a)||(i=t-(this.y+this.height-n),r*r+i*i<=a)||(r=e-(this.x+n),r*r+i*i<=a))return!0}return!1},e.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=`+this.x+` y=`+this.y+(`width=`+this.width+` height=`+this.height+` radius=`+this.radius+`]`)},e}();var Bn=function(){function e(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0),this._x=n,this._y=r,this.cb=e,this.scope=t}return e.prototype.clone=function(t,n){return t===void 0&&(t=this.cb),n===void 0&&(n=this.scope),new e(t,n,this._x,this._y)},e.prototype.set=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=e),(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this},e.prototype.copyFrom=function(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},e.prototype.copyTo=function(e){return e.set(this._x,this._y),e},e.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},e.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=`+this.scope+`]`},Object.defineProperty(e.prototype,`x`,{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`y`,{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),e}(),Vn=function(){function e(e,t,n,r,i,a){e===void 0&&(e=1),t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=1),i===void 0&&(i=0),a===void 0&&(a=0),this.array=null,this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a}return e.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},e.prototype.set=function(e,t,n,r,i,a){return this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=a,this},e.prototype.toArray=function(e,t){this.array||=new Float32Array(9);var n=t||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},e.prototype.apply=function(e,t){t||=new Ln;var n=e.x,r=e.y;return t.x=this.a*n+this.c*r+this.tx,t.y=this.b*n+this.d*r+this.ty,t},e.prototype.applyInverse=function(e,t){t||=new Ln;var n=1/(this.a*this.d+this.c*-this.b),r=e.x,i=e.y;return t.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,t.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,t},e.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},e.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},e.prototype.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this.a,i=this.c,a=this.tx;return this.a=r*t-this.b*n,this.b=r*n+this.b*t,this.c=i*t-this.d*n,this.d=i*n+this.d*t,this.tx=a*t-this.ty*n,this.ty=a*n+this.ty*t,this},e.prototype.append=function(e){var t=this.a,n=this.b,r=this.c,i=this.d;return this.a=e.a*t+e.b*r,this.b=e.a*n+e.b*i,this.c=e.c*t+e.d*r,this.d=e.c*n+e.d*i,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*n+e.ty*i+this.ty,this},e.prototype.setTransform=function(e,t,n,r,i,a,o,s,c){return this.a=Math.cos(o+c)*i,this.b=Math.sin(o+c)*i,this.c=-Math.sin(o-s)*a,this.d=Math.cos(o-s)*a,this.tx=e-(n*this.a+r*this.c),this.ty=t-(n*this.b+r*this.d),this},e.prototype.prepend=function(e){var t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){var n=this.a,r=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},e.prototype.decompose=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,a=e.pivot,o=-Math.atan2(-r,i),s=Math.atan2(n,t),c=Math.abs(o+s);return c<1e-5||Math.abs(Nn-c)<1e-5?(e.rotation=s,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=s),e.scale.x=Math.sqrt(t*t+n*n),e.scale.y=Math.sqrt(r*r+i*i),e.position.x=this.tx+(a.x*t+a.y*r),e.position.y=this.ty+(a.x*n+a.y*i),e},e.prototype.invert=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.tx,a=e*r-t*n;return this.a=r/a,this.b=-t/a,this.c=-n/a,this.d=e/a,this.tx=(n*this.ty-r*i)/a,this.ty=-(e*this.ty-t*i)/a,this},e.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},e.prototype.clone=function(){var t=new e;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},e.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},e.prototype.toString=function(){return`[@pixi/math:Matrix a=`+this.a+` b=`+this.b+` c=`+this.c+` d=`+this.d+` tx=`+this.tx+` ty=`+this.ty+`]`},Object.defineProperty(e,`IDENTITY`,{get:function(){return new e},enumerable:!1,configurable:!0}),Object.defineProperty(e,`TEMP_MATRIX`,{get:function(){return new e},enumerable:!1,configurable:!0}),e}(),Hn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Un=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Wn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Gn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Kn=[],qn=[],Jn=Math.sign;function Yn(){for(var e=0;e<16;e++){var t=[];Kn.push(t);for(var n=0;n<16;n++)for(var r=Jn(Hn[e]*Hn[n]+Wn[e]*Un[n]),i=Jn(Un[e]*Hn[n]+Gn[e]*Un[n]),a=Jn(Hn[e]*Wn[n]+Wn[e]*Gn[n]),o=Jn(Un[e]*Wn[n]+Gn[e]*Gn[n]),s=0;s<16;s++)if(Hn[s]===r&&Un[s]===i&&Wn[s]===a&&Gn[s]===o){t.push(s);break}}for(var e=0;e<16;e++){var c=new Vn;c.set(Hn[e],Un[e],Wn[e],Gn[e],0,0),qn.push(c)}}Yn();var Xn={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return Hn[e]},uY:function(e){return Un[e]},vX:function(e){return Wn[e]},vY:function(e){return Gn[e]},inv:function(e){return e&8?e&15:-e&7},add:function(e,t){return Kn[e][t]},sub:function(e,t){return Kn[e][Xn.inv(t)]},rotate180:function(e){return e^4},isVertical:function(e){return(e&3)==2},byDirection:function(e,t){return Math.abs(e)*2<=Math.abs(t)?t>=0?Xn.S:Xn.N:Math.abs(t)*2<=Math.abs(e)?e>0?Xn.E:Xn.W:t>0?e>0?Xn.SE:Xn.SW:e>0?Xn.NE:Xn.NW},matrixAppendRotationInv:function(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=qn[Xn.inv(t)];i.tx=n,i.ty=r,e.append(i)}},Zn=function(){function e(){this.worldTransform=new Vn,this.localTransform=new Vn,this.position=new Bn(this.onChange,this,0,0),this.scale=new Bn(this.onChange,this,1,1),this.pivot=new Bn(this.onChange,this,0,0),this.skew=new Bn(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},e.prototype.toString=function(){return`[@pixi/math:Transform `+(`position=(`+this.position.x+`, `+this.position.y+`) `)+(`rotation=`+this.rotation+` `)+(`scale=(`+this.scale.x+`, `+this.scale.y+`) `)+(`skew=(`+this.skew.x+`, `+this.skew.y+`) `)+`]`},e.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}},e.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(e.prototype,`rotation`,{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),e.IDENTITY=new e,e}();L.PREFER_ENV=Ft.any?Ze.WEBGL:Ze.WEBGL2,L.STRICT_TEXTURE_CACHE=!1;var Qn=[];function $n(e,t){if(!e)return null;var n=``;if(typeof e==`string`){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);r&&(n=r[1].toLowerCase())}for(var i=Qn.length-1;i>=0;--i){var a=Qn[i];if(a.test&&a.test(e,n))return new a(e,t)}throw Error(`Unrecognized source type to auto-detect Resource`)} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -79,11 +79,11 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var tr=function(e,t){return tr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},tr(e,t)};function nr(e,t){tr(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var rr=function(){return rr=Object.assign||function(e){for(var t=arguments,n,r=1,i=arguments.length;r0&&l>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(t),r}return Object.defineProperty(t.prototype,`realWidth`,{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`realHeight`,{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`mipmap`,{get:function(){return this._mipmap},set:function(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scaleMode`,{get:function(){return this._scaleMode},set:function(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`wrapMode`,{get:function(){return this._wrapMode},set:function(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(e,t){var n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this},t.prototype.setSize=function(e,t,n){return n||=this.resolution,this.setRealSize(e*n,t*n,n)},t.prototype.setRealSize=function(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=fn(this.realWidth)&&fn(this.realHeight)},t.prototype.setResolution=function(e){var t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit(`update`,this)),this._refreshPOT(),this)},t.prototype.setResource=function(e){if(this.resource===e)return this;if(this.resource)throw Error(`Resource can be set only once`);return e.bind(this),this.resource=e,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit(`update`,this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit(`loaded`,this),this.emit(`update`,this))},t.prototype.onError=function(e){this.emit(`error`,this,e)},t.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete xn[this.cacheId],delete bn[this.cacheId],this.cacheId=null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit(`dispose`,this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(e,n,r){r===void 0&&(r=I.STRICT_TEXTURE_CACHE);var i=typeof e==`string`,a=null;if(i)a=e;else{if(!e._pixiId){var o=n&&n.pixiIdPrefix||`pixiid`;e._pixiId=o+`_`+gn()}a=e._pixiId}var s=xn[a];if(i&&r&&!s)throw Error(`The cacheId "`+a+`" does not exist in BaseTextureCache.`);return s||(s=new t(e,n),s.cacheId=a,t.addToCache(s,a)),s},t.fromBuffer=function(e,n,r,i){e||=new Float32Array(n*r*4);var a=new or(e,{width:n,height:r}),o=e instanceof Float32Array?it.FLOAT:it.UNSIGNED_BYTE;return new t(a,Object.assign({},sr,i||{width:n,height:r,type:o}))},t.addToCache=function(e,t){t&&(e.textureCacheIds.indexOf(t)===-1&&e.textureCacheIds.push(t),xn[t]&&console.warn(`BaseTexture added to the cache with an id [`+t+`] that already had an entry`),xn[t]=e)},t.removeFromCache=function(e){if(typeof e==`string`){var t=xn[e];if(t){var n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete xn[e],t}}else if(e&&e.textureCacheIds){for(var r=0;r0)if(e.resource)this.addResourceAt(e.resource,t);else throw Error(`CubeResource does not support copying of renderTexture.`);else e.target=rt.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this},t.prototype.upload=function(e,n,r){for(var i=this.itemDirtyIds,a=0;a)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(dr),gr=function(e){nr(t,e);function t(n,r){var i=this;if(r||={},!(n instanceof HTMLVideoElement)){var a=document.createElement(`video`);a.setAttribute(`preload`,`auto`),a.setAttribute(`webkit-playsinline`,``),a.setAttribute(`playsinline`,``),typeof n==`string`&&(n=[n]);var o=n[0].src||n[0];dr.crossOrigin(a,o,r.crossorigin);for(var s=0;s2},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Mn.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Mn.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var e=this.source;e.removeEventListener(`canplay`,this._onCanPlay),e.removeEventListener(`canplaythrough`,this._onCanPlay);var t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&(Mn.shared.remove(this.update,this),this._isConnectedToTicker=!1);var t=this.source;t&&(t.removeEventListener(`error`,this._onError,!0),t.pause(),t.src=``,t.load()),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,`autoUpdate`,{get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Mn.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Mn.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`updateFPS`,{get:function(){return this._updateFPS},set:function(e){e!==this._updateFPS&&(this._updateFPS=e)},enumerable:!1,configurable:!0}),t.test=function(e,n){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||t.TYPES.indexOf(n)>-1},t.TYPES=[`mp4`,`m4v`,`webm`,`ogg`,`ogv`,`h264`,`avi`,`mov`],t.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`},t}(dr),_r=function(e){nr(t,e);function t(t){return e.call(this,t)||this}return t.test=function(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<`u`&&e instanceof ImageBitmap},t}(dr);$n.push(mr,_r,fr,gr,hr,or,pr,ur);var vr={__proto__:null,Resource:ar,BaseImageResource:dr,INSTALLED:$n,autoDetectResource:er,AbstractMultiResource:lr,ArrayResource:ur,BufferResource:or,CanvasResource:fr,CubeResource:pr,ImageResource:mr,SVGResource:hr,VideoResource:gr,ImageBitmapResource:_r},yr=function(e){nr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.upload=function(e,t,n){var r=e.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===lt.UNPACK);var i=t.realWidth,a=t.realHeight;return n.width===i&&n.height===a?r.texSubImage2D(t.target,0,0,0,i,a,t.format,n.type,this.data):(n.width=i,n.height=a,r.texImage2D(t.target,0,n.internalFormat,i,a,0,t.format,n.type,this.data)),!0},t}(or),br=function(){function e(e,t){this.width=Math.round(e||100),this.height=Math.round(t||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new kn(`disposeFramebuffer`),this.multisample=ht.NONE}return Object.defineProperty(e.prototype,`colorTexture`,{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,t){return e===void 0&&(e=0),this.colorTextures[e]=t||new cr(null,{scaleMode:ot.NEAREST,resolution:1,mipmap:ct.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new cr(new yr(null,{width:this.width,height:this.height}),{scaleMode:ot.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:ct.OFF,format:F.DEPTH_COMPONENT,type:it.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(e,t){if(e=Math.round(e),t=Math.round(t),!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&t.textureCacheIds.splice(n,1),delete bn[e],t}}else if(e&&e.textureCacheIds){for(var r=0;rthis.baseTexture.width,o=n+i>this.baseTexture.height;if(a||o){var s=a&&o?`and`:`or`,c=`X: `+t+` + `+r+` = `+(t+r)+` > `+this.baseTexture.width,l=`Y: `+n+` + `+i+` = `+(n+i)+` > `+this.baseTexture.height;throw Error(`Texture Error: frame does not fit inside the base Texture dimensions: `+(c+` `+s+` `+l))}this.valid=r&&i&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`rotate`,{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`width`,{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(t,`EMPTY`,{get:function(){return t._EMPTY||(t._EMPTY=new t(new cr),wr(t._EMPTY),wr(t._EMPTY.baseTexture)),t._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(t,`WHITE`,{get:function(){if(!t._WHITE){var e=I.ADAPTER.createCanvas(16,16),n=e.getContext(`2d`);e.width=16,e.height=16,n.fillStyle=`white`,n.fillRect(0,0,16,16),t._WHITE=new t(cr.from(e)),wr(t._WHITE),wr(t._WHITE.baseTexture)}return t._WHITE},enumerable:!1,configurable:!0}),t}(Yt.default),Er=function(e){nr(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Object.defineProperty(t.prototype,`framebuffer`,{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`multisample`,{get:function(){return this.framebuffer.multisample},set:function(e){this.framebuffer.multisample=e},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t,n){n===void 0&&(n=!0);var r=this.baseTexture.resolution,i=Math.round(e*r)/r,a=Math.round(t*r)/r;this.valid=i>0&&a>0,this._frame.width=this.orig.width=i,this._frame.height=this.orig.height=a,n&&this.baseTexture.resize(i,a),this.updateUvs()},t.prototype.setResolution=function(e){var t=this.baseTexture;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))},t.create=function(e){for(var n=arguments,r=[],i=1;i>>0,r>1&&(i+=r*4294967296)):i=r>1?-r:-1,this.texturePool[i]||(this.texturePool[i]=[]);var a=this.texturePool[i].pop();return a||=this.createTexture(e,t,r),a.filterPoolKey=i,a.setResolution(n),a},e.prototype.getFilterTexture=function(e,t,n){var r=this.getOptimalTexture(e.width,e.height,t||e.resolution,n||ht.NONE);return r.filterFrame=e.filterFrame,r},e.prototype.returnTexture=function(e){var t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)},e.prototype.returnFilterTexture=function(e){this.returnTexture(e)},e.prototype.clear=function(e){if(e=e!==!1,e)for(var t in this.texturePool){var n=this.texturePool[t];if(n)for(var r=0;r0&&e.height>0,this.texturePool){if(!(Number(t)<0))continue;var n=this.texturePool[t];if(n)for(var r=0;r1){for(var l=0;l1&&(u=this.getOptimalFilterTexture(l.width,l.height,t.resolution),u.filterFrame=l.filterFrame),n[d].apply(this,l,u,ut.CLEAR,t);var f=l;l=u,u=f}n[d].apply(this,l,c.renderTexture,ut.BLEND,t),d>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(u)}t.clear(),this.statePool.push(t)},e.prototype.bindAndClear=function(e,t){t===void 0&&(t=ut.CLEAR);var n=this.renderer,r=n.renderTexture,i=n.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,r.bind(e,e.filterFrame,a)}else e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame):r.bind(e);var o=i.stateId&1||this.forceClear;(t===ut.CLEAR||t===ut.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)},e.prototype.applyFilter=function(e,t,n,r){var i=this.renderer;i.state.set(e.state),this.bindAndClear(n,r),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,i.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),i.geometry.bind(this.quadUv),i.geometry.draw(nt.TRIANGLES)):(i.geometry.bind(this.quad),i.geometry.draw(nt.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(e,t){var n=this.activeState,r=n.sourceFrame,i=n.destinationFrame,a=t._texture.orig,o=e.set(i.width,0,0,i.height,r.x,r.y),s=t.worldTransform.copyTo(Hn.TEMP_MATRIX);return s.invert(),o.prepend(s),o.scale(1/a.width,1/a.height),o.translate(t.anchor.x,t.anchor.y),o},e.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(e,t,n,r){return n===void 0&&(n=1),r===void 0&&(r=ht.NONE),this.texturePool.getOptimalTexture(e,t,n,r)},e.prototype.getFilterTexture=function(e,t,n){if(typeof e==`number`){var r=e;e=t,t=r}e||=this.activeState.renderTexture;var i=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,n||ht.NONE);return i.filterFrame=e.filterFrame,i},e.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e.prototype.transformAABB=function(e,t){var n=Hr[0],r=Hr[1],i=Hr[2],a=Hr[3];n.set(t.left,t.top),r.set(t.left,t.bottom),i.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(n,n),e.apply(r,r),e.apply(i,i),e.apply(a,a);var o=Math.min(n.x,r.x,i.x,a.x),s=Math.min(n.y,r.y,i.y,a.y),c=Math.max(n.x,r.x,i.x,a.x),l=Math.max(n.y,r.y,i.y,a.y);t.x=o,t.y=s,t.width=c-o,t.height=l-s},e.prototype.roundFrame=function(e,t,n,r,i){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(i){var a=i.a,o=i.b,s=i.c,c=i.d;if((Math.abs(o)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(c)>1e-4))return}i=i?Ur.copyFrom(i):Ur.identity(),i.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.transformAABB(i,e),e.ceil(t),this.transformAABB(i.invert(),e)}},e}(),Gr=function(){function e(e){this.renderer=e}return e.prototype.flush=function(){},e.prototype.destroy=function(){this.renderer=null},e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.render=function(e){},e}(),Kr=function(){function e(e){this.renderer=e,this.emptyRenderer=new Gr(e),this.currentRenderer=this.emptyRenderer}return e.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(e,t){for(var n=this.renderer.texture.boundTextures,r=t-1;r>=0;--r)e[r]=n[r]||null,e[r]&&(e[r]._batchLocation=r)},e.prototype.boundArray=function(e,t,n,r){for(var i=e.elements,a=e.ids,o=e.count,s=0,c=0;c=0&&u=Qe.WEBGL2&&(n=e.getContext(`webgl2`,t)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext(`webgl`,t)||e.getContext(`experimental-webgl`,t),!n)throw Error(`This browser does not support WebGL. Try using the canvas renderer`);return this.gl=n,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var e=this.gl,t={loseContext:e.getExtension(`WEBGL_lose_context`),anisotropicFiltering:e.getExtension(`EXT_texture_filter_anisotropic`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),s3tc:e.getExtension(`WEBGL_compressed_texture_s3tc`),s3tc_sRGB:e.getExtension(`WEBGL_compressed_texture_s3tc_srgb`),etc:e.getExtension(`WEBGL_compressed_texture_etc`),etc1:e.getExtension(`WEBGL_compressed_texture_etc1`),pvrtc:e.getExtension(`WEBGL_compressed_texture_pvrtc`)||e.getExtension(`WEBKIT_WEBGL_compressed_texture_pvrtc`),atc:e.getExtension(`WEBGL_compressed_texture_atc`),astc:e.getExtension(`WEBGL_compressed_texture_astc`)};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension(`WEBGL_draw_buffers`),depthTexture:e.getExtension(`WEBGL_depth_texture`),vertexArrayObject:e.getExtension(`OES_vertex_array_object`)||e.getExtension(`MOZ_OES_vertex_array_object`)||e.getExtension(`WEBKIT_OES_vertex_array_object`),uint32ElementIndex:e.getExtension(`OES_element_index_uint`),floatTexture:e.getExtension(`OES_texture_float`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),textureHalfFloat:e.getExtension(`OES_texture_half_float`),textureHalfFloatLinear:e.getExtension(`OES_texture_half_float_linear`)}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension(`EXT_color_buffer_float`)})},e.prototype.handleContextLost=function(e){var t=this;e.preventDefault(),setTimeout(function(){t.gl.isContextLost()&&t.extensions.loseContext&&t.extensions.loseContext.restoreContext()},0)},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener(`webglcontextlost`,this.handleContextLost),e.removeEventListener(`webglcontextrestored`,this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(e){var t=e.getContextAttributes(),n=`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),t&&!t.stencil&&console.warn(`Provided WebGL context does not have a stencil buffer, masks may not render correctly`);var r=n||!!e.getExtension(`OES_element_index_uint`);this.supports.uint32Indices=r,r||console.warn(`Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly`)},e}(),Yr=function(){function e(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ht.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return e}(),Xr=new Bn,Zr=function(){function e(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new br(10,10),this.msaaSamples=null}return e.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Bn,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var t=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;I.PREFER_ENV===Qe.WEBGL_LEGACY&&(t=null,n=null),t?e.drawBuffers=function(e){return t.drawBuffersWEBGL(e)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},e.prototype.bind=function(e,t,n){n===void 0&&(n=0);var r=this.gl;if(e){var i=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,i.mipLevel=n),i.dirtyId!==e.dirtyId&&(i.dirtyId=e.dirtyId,i.dirtyFormat===e.dirtyFormat?i.dirtySize!==e.dirtySize&&(i.dirtySize=e.dirtySize,this.resizeFramebuffer(e)):(i.dirtyFormat=e.dirtyFormat,i.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)));for(var a=0;a>n,c=t.height>>n,l=s/t.width;this.setViewport(t.x*l,t.y*l,s,c)}else{var s=e.width>>n,c=e.height>>n;this.setViewport(0,0,s,c)}}else this.current&&(this.current=null,r.bindFramebuffer(r.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(e,t,n,r){var i=this.viewport;e=Math.round(e),t=Math.round(t),n=Math.round(n),r=Math.round(r),(i.width!==n||i.height!==r||i.x!==e||i.y!==t)&&(i.x=e,i.y=t,i.width=n,i.height=r,this.gl.viewport(e,t,n,r))},Object.defineProperty(e.prototype,`size`,{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),e.prototype.clear=function(e,t,n,r,i){i===void 0&&(i=et.COLOR|et.DEPTH);var a=this.gl;a.clearColor(e,t,n,r),a.clear(i)},e.prototype.initFramebuffer=function(e){var t=this.gl,n=new Yr(t.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n},e.prototype.resizeFramebuffer=function(e){var t=this.gl,n=e.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,n.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.RGBA8,e.width,e.height)),n.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,n.stencil),n.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height));var r=e.colorTextures,i=r.length;t.drawBuffers||(i=Math.min(i,1));for(var a=0;a1&&this.canMultisampleFramebuffer(e)?(r.msaaBuffer=r.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.RGBA8,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,r.msaaBuffer)):r.msaaBuffer&&(n.deleteRenderbuffer(r.msaaBuffer),r.msaaBuffer=null,r.blitFramebuffer&&(r.blitFramebuffer.dispose(),r.blitFramebuffer=null));for(var o=[],s=0;s1&&n.drawBuffers(o),e.depthTexture){var u=this.writeDepthTexture;if(u){var d=e.depthTexture;this.renderer.texture.bind(d,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,t)}}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(r.stencil=r.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,r.stencil)):r.stencil&&(n.deleteRenderbuffer(r.stencil),r.stencil=null)},e.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},e.prototype.detectSamples=function(e){var t=this.msaaSamples,n=ht.NONE;if(e<=1||t===null)return n;for(var r=0;r=0&&this.managedFramebuffers.splice(i,1),e.disposeRunner.remove(this),t||(r.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&r.deleteRenderbuffer(n.msaaBuffer),n.stencil&&r.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},e.prototype.disposeAll=function(e){var t=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n0&&l>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(t),r}return Object.defineProperty(t.prototype,`realWidth`,{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`realHeight`,{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`mipmap`,{get:function(){return this._mipmap},set:function(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`scaleMode`,{get:function(){return this._scaleMode},set:function(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`wrapMode`,{get:function(){return this._wrapMode},set:function(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(e,t){var n;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this},t.prototype.setSize=function(e,t,n){return n||=this.resolution,this.setRealSize(e*n,t*n,n)},t.prototype.setRealSize=function(e,t,n){return this.resolution=n||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=dn(this.realWidth)&&dn(this.realHeight)},t.prototype.setResolution=function(e){var t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit(`update`,this)),this._refreshPOT(),this)},t.prototype.setResource=function(e){if(this.resource===e)return this;if(this.resource)throw Error(`Resource can be set only once`);return e.bind(this),this.resource=e,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit(`update`,this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit(`loaded`,this),this.emit(`update`,this))},t.prototype.onError=function(e){this.emit(`error`,this,e)},t.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete bn[this.cacheId],delete yn[this.cacheId],this.cacheId=null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit(`dispose`,this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(e,n,r){r===void 0&&(r=L.STRICT_TEXTURE_CACHE);var i=typeof e==`string`,a=null;if(i)a=e;else{if(!e._pixiId){var o=n&&n.pixiIdPrefix||`pixiid`;e._pixiId=o+`_`+hn()}a=e._pixiId}var s=bn[a];if(i&&r&&!s)throw Error(`The cacheId "`+a+`" does not exist in BaseTextureCache.`);return s||(s=new t(e,n),s.cacheId=a,t.addToCache(s,a)),s},t.fromBuffer=function(e,n,r,i){e||=new Float32Array(n*r*4);var a=new ar(e,{width:n,height:r}),o=e instanceof Float32Array?rt.FLOAT:rt.UNSIGNED_BYTE;return new t(a,Object.assign({},or,i||{width:n,height:r,type:o}))},t.addToCache=function(e,t){t&&(e.textureCacheIds.indexOf(t)===-1&&e.textureCacheIds.push(t),bn[t]&&console.warn(`BaseTexture added to the cache with an id [`+t+`] that already had an entry`),bn[t]=e)},t.removeFromCache=function(e){if(typeof e==`string`){var t=bn[e];if(t){var n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete bn[e],t}}else if(e&&e.textureCacheIds){for(var r=0;r0)if(e.resource)this.addResourceAt(e.resource,t);else throw Error(`CubeResource does not support copying of renderTexture.`);else e.target=nt.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this},t.prototype.upload=function(e,n,r){for(var i=this.itemDirtyIds,a=0;a)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(ur),hr=function(e){tr(t,e);function t(n,r){var i=this;if(r||={},!(n instanceof HTMLVideoElement)){var a=document.createElement(`video`);a.setAttribute(`preload`,`auto`),a.setAttribute(`webkit-playsinline`,``),a.setAttribute(`playsinline`,``),typeof n==`string`&&(n=[n]);var o=n[0].src||n[0];ur.crossOrigin(a,o,r.crossorigin);for(var s=0;s2},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(jn.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(jn.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var e=this.source;e.removeEventListener(`canplay`,this._onCanPlay),e.removeEventListener(`canplaythrough`,this._onCanPlay);var t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&(jn.shared.remove(this.update,this),this._isConnectedToTicker=!1);var t=this.source;t&&(t.removeEventListener(`error`,this._onError,!0),t.pause(),t.src=``,t.load()),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,`autoUpdate`,{get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(jn.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(jn.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`updateFPS`,{get:function(){return this._updateFPS},set:function(e){e!==this._updateFPS&&(this._updateFPS=e)},enumerable:!1,configurable:!0}),t.test=function(e,n){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||t.TYPES.indexOf(n)>-1},t.TYPES=[`mp4`,`m4v`,`webm`,`ogg`,`ogv`,`h264`,`avi`,`mov`],t.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`},t}(ur),gr=function(e){tr(t,e);function t(t){return e.call(this,t)||this}return t.test=function(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<`u`&&e instanceof ImageBitmap},t}(ur);Qn.push(pr,gr,dr,hr,mr,ar,fr,lr);var _r={__proto__:null,Resource:ir,BaseImageResource:ur,INSTALLED:Qn,autoDetectResource:$n,AbstractMultiResource:cr,ArrayResource:lr,BufferResource:ar,CanvasResource:dr,CubeResource:fr,ImageResource:pr,SVGResource:mr,VideoResource:hr,ImageBitmapResource:gr},vr=function(e){tr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.upload=function(e,t,n){var r=e.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===ct.UNPACK);var i=t.realWidth,a=t.realHeight;return n.width===i&&n.height===a?r.texSubImage2D(t.target,0,0,0,i,a,t.format,n.type,this.data):(n.width=i,n.height=a,r.texImage2D(t.target,0,n.internalFormat,i,a,0,t.format,n.type,this.data)),!0},t}(ar),yr=function(){function e(e,t){this.width=Math.round(e||100),this.height=Math.round(t||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new On(`disposeFramebuffer`),this.multisample=mt.NONE}return Object.defineProperty(e.prototype,`colorTexture`,{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,t){return e===void 0&&(e=0),this.colorTextures[e]=t||new sr(null,{scaleMode:at.NEAREST,resolution:1,mipmap:st.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new sr(new vr(null,{width:this.width,height:this.height}),{scaleMode:at.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:st.OFF,format:I.DEPTH_COMPONENT,type:rt.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(e,t){if(e=Math.round(e),t=Math.round(t),!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&t.textureCacheIds.splice(n,1),delete yn[e],t}}else if(e&&e.textureCacheIds){for(var r=0;rthis.baseTexture.width,o=n+i>this.baseTexture.height;if(a||o){var s=a&&o?`and`:`or`,c=`X: `+t+` + `+r+` = `+(t+r)+` > `+this.baseTexture.width,l=`Y: `+n+` + `+i+` = `+(n+i)+` > `+this.baseTexture.height;throw Error(`Texture Error: frame does not fit inside the base Texture dimensions: `+(c+` `+s+` `+l))}this.valid=r&&i&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`rotate`,{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`width`,{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(t,`EMPTY`,{get:function(){return t._EMPTY||(t._EMPTY=new t(new sr),Cr(t._EMPTY),Cr(t._EMPTY.baseTexture)),t._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(t,`WHITE`,{get:function(){if(!t._WHITE){var e=L.ADAPTER.createCanvas(16,16),n=e.getContext(`2d`);e.width=16,e.height=16,n.fillStyle=`white`,n.fillRect(0,0,16,16),t._WHITE=new t(sr.from(e)),Cr(t._WHITE),Cr(t._WHITE.baseTexture)}return t._WHITE},enumerable:!1,configurable:!0}),t}(Jt.default),Tr=function(e){tr(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Object.defineProperty(t.prototype,`framebuffer`,{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`multisample`,{get:function(){return this.framebuffer.multisample},set:function(e){this.framebuffer.multisample=e},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t,n){n===void 0&&(n=!0);var r=this.baseTexture.resolution,i=Math.round(e*r)/r,a=Math.round(t*r)/r;this.valid=i>0&&a>0,this._frame.width=this.orig.width=i,this._frame.height=this.orig.height=a,n&&this.baseTexture.resize(i,a),this.updateUvs()},t.prototype.setResolution=function(e){var t=this.baseTexture;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))},t.create=function(e){for(var n=arguments,r=[],i=1;i>>0,r>1&&(i+=r*4294967296)):i=r>1?-r:-1,this.texturePool[i]||(this.texturePool[i]=[]);var a=this.texturePool[i].pop();return a||=this.createTexture(e,t,r),a.filterPoolKey=i,a.setResolution(n),a},e.prototype.getFilterTexture=function(e,t,n){var r=this.getOptimalTexture(e.width,e.height,t||e.resolution,n||mt.NONE);return r.filterFrame=e.filterFrame,r},e.prototype.returnTexture=function(e){var t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)},e.prototype.returnFilterTexture=function(e){this.returnTexture(e)},e.prototype.clear=function(e){if(e=e!==!1,e)for(var t in this.texturePool){var n=this.texturePool[t];if(n)for(var r=0;r0&&e.height>0,this.texturePool){if(!(Number(t)<0))continue;var n=this.texturePool[t];if(n)for(var r=0;r1){for(var l=0;l1&&(u=this.getOptimalFilterTexture(l.width,l.height,t.resolution),u.filterFrame=l.filterFrame),n[d].apply(this,l,u,lt.CLEAR,t);var f=l;l=u,u=f}n[d].apply(this,l,c.renderTexture,lt.BLEND,t),d>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(u)}t.clear(),this.statePool.push(t)},e.prototype.bindAndClear=function(e,t){t===void 0&&(t=lt.CLEAR);var n=this.renderer,r=n.renderTexture,i=n.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,r.bind(e,e.filterFrame,a)}else e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame):r.bind(e);var o=i.stateId&1||this.forceClear;(t===lt.CLEAR||t===lt.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)},e.prototype.applyFilter=function(e,t,n,r){var i=this.renderer;i.state.set(e.state),this.bindAndClear(n,r),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,i.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),i.geometry.bind(this.quadUv),i.geometry.draw(tt.TRIANGLES)):(i.geometry.bind(this.quad),i.geometry.draw(tt.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(e,t){var n=this.activeState,r=n.sourceFrame,i=n.destinationFrame,a=t._texture.orig,o=e.set(i.width,0,0,i.height,r.x,r.y),s=t.worldTransform.copyTo(Vn.TEMP_MATRIX);return s.invert(),o.prepend(s),o.scale(1/a.width,1/a.height),o.translate(t.anchor.x,t.anchor.y),o},e.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(e,t,n,r){return n===void 0&&(n=1),r===void 0&&(r=mt.NONE),this.texturePool.getOptimalTexture(e,t,n,r)},e.prototype.getFilterTexture=function(e,t,n){if(typeof e==`number`){var r=e;e=t,t=r}e||=this.activeState.renderTexture;var i=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,n||mt.NONE);return i.filterFrame=e.filterFrame,i},e.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e.prototype.transformAABB=function(e,t){var n=Vr[0],r=Vr[1],i=Vr[2],a=Vr[3];n.set(t.left,t.top),r.set(t.left,t.bottom),i.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(n,n),e.apply(r,r),e.apply(i,i),e.apply(a,a);var o=Math.min(n.x,r.x,i.x,a.x),s=Math.min(n.y,r.y,i.y,a.y),c=Math.max(n.x,r.x,i.x,a.x),l=Math.max(n.y,r.y,i.y,a.y);t.x=o,t.y=s,t.width=c-o,t.height=l-s},e.prototype.roundFrame=function(e,t,n,r,i){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(i){var a=i.a,o=i.b,s=i.c,c=i.d;if((Math.abs(o)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(c)>1e-4))return}i=i?Hr.copyFrom(i):Hr.identity(),i.translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.transformAABB(i,e),e.ceil(t),this.transformAABB(i.invert(),e)}},e}(),Wr=function(){function e(e){this.renderer=e}return e.prototype.flush=function(){},e.prototype.destroy=function(){this.renderer=null},e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.render=function(e){},e}(),Gr=function(){function e(e){this.renderer=e,this.emptyRenderer=new Wr(e),this.currentRenderer=this.emptyRenderer}return e.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(e,t){for(var n=this.renderer.texture.boundTextures,r=t-1;r>=0;--r)e[r]=n[r]||null,e[r]&&(e[r]._batchLocation=r)},e.prototype.boundArray=function(e,t,n,r){for(var i=e.elements,a=e.ids,o=e.count,s=0,c=0;c=0&&u=Ze.WEBGL2&&(n=e.getContext(`webgl2`,t)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext(`webgl`,t)||e.getContext(`experimental-webgl`,t),!n)throw Error(`This browser does not support WebGL. Try using the canvas renderer`);return this.gl=n,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var e=this.gl,t={loseContext:e.getExtension(`WEBGL_lose_context`),anisotropicFiltering:e.getExtension(`EXT_texture_filter_anisotropic`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),s3tc:e.getExtension(`WEBGL_compressed_texture_s3tc`),s3tc_sRGB:e.getExtension(`WEBGL_compressed_texture_s3tc_srgb`),etc:e.getExtension(`WEBGL_compressed_texture_etc`),etc1:e.getExtension(`WEBGL_compressed_texture_etc1`),pvrtc:e.getExtension(`WEBGL_compressed_texture_pvrtc`)||e.getExtension(`WEBKIT_WEBGL_compressed_texture_pvrtc`),atc:e.getExtension(`WEBGL_compressed_texture_atc`),astc:e.getExtension(`WEBGL_compressed_texture_astc`)};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension(`WEBGL_draw_buffers`),depthTexture:e.getExtension(`WEBGL_depth_texture`),vertexArrayObject:e.getExtension(`OES_vertex_array_object`)||e.getExtension(`MOZ_OES_vertex_array_object`)||e.getExtension(`WEBKIT_OES_vertex_array_object`),uint32ElementIndex:e.getExtension(`OES_element_index_uint`),floatTexture:e.getExtension(`OES_texture_float`),floatTextureLinear:e.getExtension(`OES_texture_float_linear`),textureHalfFloat:e.getExtension(`OES_texture_half_float`),textureHalfFloatLinear:e.getExtension(`OES_texture_half_float_linear`)}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension(`EXT_color_buffer_float`)})},e.prototype.handleContextLost=function(e){var t=this;e.preventDefault(),setTimeout(function(){t.gl.isContextLost()&&t.extensions.loseContext&&t.extensions.loseContext.restoreContext()},0)},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener(`webglcontextlost`,this.handleContextLost),e.removeEventListener(`webglcontextrestored`,this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(e){var t=e.getContextAttributes(),n=`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),t&&!t.stencil&&console.warn(`Provided WebGL context does not have a stencil buffer, masks may not render correctly`);var r=n||!!e.getExtension(`OES_element_index_uint`);this.supports.uint32Indices=r,r||console.warn(`Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly`)},e}(),Jr=function(){function e(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=mt.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return e}(),Yr=new zn,Xr=function(){function e(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new yr(10,10),this.msaaSamples=null}return e.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new zn,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var t=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;L.PREFER_ENV===Ze.WEBGL_LEGACY&&(t=null,n=null),t?e.drawBuffers=function(e){return t.drawBuffersWEBGL(e)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},e.prototype.bind=function(e,t,n){n===void 0&&(n=0);var r=this.gl;if(e){var i=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,i.mipLevel=n),i.dirtyId!==e.dirtyId&&(i.dirtyId=e.dirtyId,i.dirtyFormat===e.dirtyFormat?i.dirtySize!==e.dirtySize&&(i.dirtySize=e.dirtySize,this.resizeFramebuffer(e)):(i.dirtyFormat=e.dirtyFormat,i.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)));for(var a=0;a>n,c=t.height>>n,l=s/t.width;this.setViewport(t.x*l,t.y*l,s,c)}else{var s=e.width>>n,c=e.height>>n;this.setViewport(0,0,s,c)}}else this.current&&(this.current=null,r.bindFramebuffer(r.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(e,t,n,r){var i=this.viewport;e=Math.round(e),t=Math.round(t),n=Math.round(n),r=Math.round(r),(i.width!==n||i.height!==r||i.x!==e||i.y!==t)&&(i.x=e,i.y=t,i.width=n,i.height=r,this.gl.viewport(e,t,n,r))},Object.defineProperty(e.prototype,`size`,{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),e.prototype.clear=function(e,t,n,r,i){i===void 0&&(i=$e.COLOR|$e.DEPTH);var a=this.gl;a.clearColor(e,t,n,r),a.clear(i)},e.prototype.initFramebuffer=function(e){var t=this.gl,n=new Jr(t.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n},e.prototype.resizeFramebuffer=function(e){var t=this.gl,n=e.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,n.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.RGBA8,e.width,e.height)),n.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,n.stencil),n.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height));var r=e.colorTextures,i=r.length;t.drawBuffers||(i=Math.min(i,1));for(var a=0;a1&&this.canMultisampleFramebuffer(e)?(r.msaaBuffer=r.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.RGBA8,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,r.msaaBuffer)):r.msaaBuffer&&(n.deleteRenderbuffer(r.msaaBuffer),r.msaaBuffer=null,r.blitFramebuffer&&(r.blitFramebuffer.dispose(),r.blitFramebuffer=null));for(var o=[],s=0;s1&&n.drawBuffers(o),e.depthTexture){var u=this.writeDepthTexture;if(u){var d=e.depthTexture;this.renderer.texture.bind(d,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,t)}}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(r.stencil=r.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,r.stencil)):r.stencil&&(n.deleteRenderbuffer(r.stencil),r.stencil=null)},e.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},e.prototype.detectSamples=function(e){var t=this.msaaSamples,n=mt.NONE;if(e<=1||t===null)return n;for(var r=0;r=0&&this.managedFramebuffers.splice(i,1),e.disposeRunner.remove(this),t||(r.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&r.deleteRenderbuffer(n.msaaBuffer),n.stencil&&r.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},e.prototype.disposeAll=function(e){var t=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=Qe.WEBGL2&&(t=e.getContext(`webgl2`,{})),t||(t=e.getContext(`webgl`,{})||e.getContext(`experimental-webgl`,{}),t?t.getExtension(`WEBGL_draw_buffers`):t=null),si=t}return si}var li;function ui(){if(!li){li=ft.MEDIUM;var e=ci();if(e&&e.getShaderPrecisionFormat){var t=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);li=t.precision?ft.HIGH:ft.MEDIUM}}return li}function di(e,t,n){if(e.substring(0,9)!==`precision`){var r=t;return t===ft.HIGH&&n!==ft.HIGH&&(r=ft.MEDIUM),`precision `+r+` float; -`+e}else if(n!==ft.HIGH&&e.substring(0,15)===`precision highp`)return e.replace(`precision highp`,`precision mediump`);return e}var fi={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function pi(e){return fi[e]}var mi=null,hi={FLOAT:`float`,FLOAT_VEC2:`vec2`,FLOAT_VEC3:`vec3`,FLOAT_VEC4:`vec4`,INT:`int`,INT_VEC2:`ivec2`,INT_VEC3:`ivec3`,INT_VEC4:`ivec4`,UNSIGNED_INT:`uint`,UNSIGNED_INT_VEC2:`uvec2`,UNSIGNED_INT_VEC3:`uvec3`,UNSIGNED_INT_VEC4:`uvec4`,BOOL:`bool`,BOOL_VEC2:`bvec2`,BOOL_VEC3:`bvec3`,BOOL_VEC4:`bvec4`,FLOAT_MAT2:`mat2`,FLOAT_MAT3:`mat3`,FLOAT_MAT4:`mat4`,SAMPLER_2D:`sampler2D`,INT_SAMPLER_2D:`sampler2D`,UNSIGNED_INT_SAMPLER_2D:`sampler2D`,SAMPLER_CUBE:`samplerCube`,INT_SAMPLER_CUBE:`samplerCube`,UNSIGNED_INT_SAMPLER_CUBE:`samplerCube`,SAMPLER_2D_ARRAY:`sampler2DArray`,INT_SAMPLER_2D_ARRAY:`sampler2DArray`,UNSIGNED_INT_SAMPLER_2D_ARRAY:`sampler2DArray`};function gi(e,t){if(!mi){var n=Object.keys(hi);mi={};for(var r=0;r=Ze.WEBGL2&&(t=e.getContext(`webgl2`,{})),t||(t=e.getContext(`webgl`,{})||e.getContext(`experimental-webgl`,{}),t?t.getExtension(`WEBGL_draw_buffers`):t=null),oi=t}return oi}var ci;function li(){if(!ci){ci=dt.MEDIUM;var e=si();if(e&&e.getShaderPrecisionFormat){var t=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);ci=t.precision?dt.HIGH:dt.MEDIUM}}return ci}function ui(e,t,n){if(e.substring(0,9)!==`precision`){var r=t;return t===dt.HIGH&&n!==dt.HIGH&&(r=dt.MEDIUM),`precision `+r+` float; +`+e}else if(n!==dt.HIGH&&e.substring(0,15)===`precision highp`)return e.replace(`precision highp`,`precision mediump`);return e}var di={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function fi(e){return di[e]}var pi=null,mi={FLOAT:`float`,FLOAT_VEC2:`vec2`,FLOAT_VEC3:`vec3`,FLOAT_VEC4:`vec4`,INT:`int`,INT_VEC2:`ivec2`,INT_VEC3:`ivec3`,INT_VEC4:`ivec4`,UNSIGNED_INT:`uint`,UNSIGNED_INT_VEC2:`uvec2`,UNSIGNED_INT_VEC3:`uvec3`,UNSIGNED_INT_VEC4:`uvec4`,BOOL:`bool`,BOOL_VEC2:`bvec2`,BOOL_VEC3:`bvec3`,BOOL_VEC4:`bvec4`,FLOAT_MAT2:`mat2`,FLOAT_MAT3:`mat3`,FLOAT_MAT4:`mat4`,SAMPLER_2D:`sampler2D`,INT_SAMPLER_2D:`sampler2D`,UNSIGNED_INT_SAMPLER_2D:`sampler2D`,SAMPLER_CUBE:`samplerCube`,INT_SAMPLER_CUBE:`samplerCube`,UNSIGNED_INT_SAMPLER_CUBE:`samplerCube`,SAMPLER_2D_ARRAY:`sampler2DArray`,INT_SAMPLER_2D_ARRAY:`sampler2DArray`,UNSIGNED_INT_SAMPLER_2D_ARRAY:`sampler2DArray`};function hi(e,t){if(!pi){var n=Object.keys(mi);pi={};for(var r=0;r0&&(t+=` -else `),n0&&(t+=` +else `),n0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==t&&this.renderer.gl.colorMask((n&1)!=0,(n&2)!=0,(n&4)!=0,(n&8)!=0)},e.prototype.destroy=function(){this.renderer=null},e}(),Ji=function(){function e(e){this.renderer=e,this.maskStack=[],this.glConst=0}return e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(e){var t=this.renderer.gl,n=this.getStackLength();this.maskStack=e;var r=this.getStackLength();r!==n&&(r===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){this.renderer=null,this.maskStack=null},e}(),Yi=new Hn,Xi=[],Zi=function(e){nr(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=I.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0},t.prototype.calcScissorRect=function(e){var t;if(!e._scissorRectLocal){var n=e._scissorRect,r=e.maskObject,i=this.renderer,a=i.renderTexture,o=r.getBounds(!0,(t=Xi.pop())??new Bn);this.roundFrameToPixels(o,a.current?a.current.resolution:i.resolution,a.sourceFrame,a.destinationFrame,i.projection.transform),n&&o.fit(n),e._scissorRectLocal=o}},t.isMatrixRotated=function(e){if(!e)return!1;var t=e.a,n=e.b,r=e.c,i=e.d;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)},t.prototype.testScissor=function(e){var n=e.maskObject;if(!n.isFastRect||!n.isFastRect()||t.isMatrixRotated(n.worldTransform)||t.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);var r=e._scissorRectLocal;return r.width>0&&r.height>0},t.prototype.roundFrameToPixels=function(e,n,r,i,a){t.isMatrixRotated(a)||(a=a?Yi.copyFrom(a):Yi.identity(),a.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.renderer.filter.transformAABB(a,e),e.fit(i),e.x=Math.round(e.x*n),e.y=Math.round(e.y*n),e.width=Math.round(e.width*n),e.height=Math.round(e.height*n))},t.prototype.push=function(e){e._scissorRectLocal||this.calcScissorRect(e);var t=this.renderer.gl;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;e&&Xi.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},t.prototype._useCurrent=function(){var e=this.maskStack[this.maskStack.length-1]._scissorRect,t;t=this.renderer.renderTexture.current?e.y:this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)},t}(Ji),Qi=function(e){nr(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=I.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0},t.prototype.push=function(e){var t=e.maskObject,n=this.renderer.gl,r=e._stencilCounter;r===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;var i=e._colorMask;i!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,r,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(e._colorMask=i,n.colorMask((i&1)!=0,(i&2)!=0,(i&4)!=0,(i&8)!=0)),this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{var n=this.maskStack.length===0?null:this.maskStack[this.maskStack.length-1],r=n?n._colorMask:15;r!==0&&(n._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,r!==0&&(n._colorMask=r,t.colorMask((r&1)!=0,(r&2)!=0,(r&4)!=0,(r&8)!=0)),this._useCurrent()}},t.prototype._useCurrent=function(){var e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},t}(Ji),$i=function(){function e(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Hn,this.transform=null}return e.prototype.update=function(e,t,n,r){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,r),this.transform&&this.projectionMatrix.append(this.transform);var i=this.renderer;i.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,i.globalUniforms.update(),i.shader.shader&&i.shader.syncUniformGroup(i.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(e,t,n,r){var i=this.projectionMatrix,a=r?-1:1;i.identity(),i.a=1/t.width*2,i.d=a*(1/t.height*2),i.tx=-1-t.x*i.a,i.ty=-a-t.y*i.d},e.prototype.setTransform=function(e){},e.prototype.destroy=function(){this.renderer=null},e}(),ea=new Bn,ta=new Bn,na=function(){function e(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Bn,this.destinationFrame=new Bn,this.viewportFrame=new Bn}return e.prototype.bind=function(e,t,n){e===void 0&&(e=null);var r=this.renderer;this.current=e;var i,a,o;e?(i=e.baseTexture,o=i.resolution,t||(ea.width=e.frame.width,ea.height=e.frame.height,t=ea),n||(ta.x=e.frame.x,ta.y=e.frame.y,ta.width=t.width,ta.height=t.height,n=ta),a=i.framebuffer):(o=r.resolution,t||(ea.width=r.screen.width,ea.height=r.screen.height,t=ea),n||(n=ea,n.width=t.width,n.height=t.height));var s=this.viewportFrame;s.x=n.x*o,s.y=n.y*o,s.width=n.width*o,s.height=n.height*o,e||(s.y=r.view.height-(s.y+s.height)),s.ceil(),this.renderer.framebuffer.bind(a,s),this.renderer.projection.update(n,t,o,!a),e?this.renderer.mask.setMaskStack(i.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(n)},e.prototype.clear=function(e,t){this.current?e||=this.current.baseTexture.clearColor:e||=this.clearColor;var n=this.destinationFrame,r=this.current?this.current.baseTexture:this.renderer.screen,i=n.width!==r.width||n.height!==r.height;if(i){var a=this.viewportFrame,o=a.x,s=a.y,c=a.width,l=a.height;o=Math.round(o),s=Math.round(s),c=Math.round(c),l=Math.round(l),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(o,s,c,l)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],t),i&&this.renderer.scissor.pop()},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e.prototype.destroy=function(){this.renderer=null},e}();function ra(e,t,n,r,i){n.buffer.update(i)}var ia={float:` +`,Ui=new Vn,Wi=function(){function e(e,t){this._texture=e,this.mapCoord=new Vn,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=t===void 0?.5:t,this.isSimple=!1}return Object.defineProperty(e.prototype,`texture`,{get:function(){return this._texture},set:function(e){this._texture=e,this._textureID=-1},enumerable:!1,configurable:!0}),e.prototype.multiplyUvs=function(e,t){t===void 0&&(t=e);for(var n=this.mapCoord,r=0;r0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==t&&this.renderer.gl.colorMask((n&1)!=0,(n&2)!=0,(n&4)!=0,(n&8)!=0)},e.prototype.destroy=function(){this.renderer=null},e}(),qi=function(){function e(e){this.renderer=e,this.maskStack=[],this.glConst=0}return e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(e){var t=this.renderer.gl,n=this.getStackLength();this.maskStack=e;var r=this.getStackLength();r!==n&&(r===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){this.renderer=null,this.maskStack=null},e}(),Ji=new Vn,Yi=[],Xi=function(e){tr(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=L.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0},t.prototype.calcScissorRect=function(e){var t;if(!e._scissorRectLocal){var n=e._scissorRect,r=e.maskObject,i=this.renderer,a=i.renderTexture,o=r.getBounds(!0,(t=Yi.pop())??new zn);this.roundFrameToPixels(o,a.current?a.current.resolution:i.resolution,a.sourceFrame,a.destinationFrame,i.projection.transform),n&&o.fit(n),e._scissorRectLocal=o}},t.isMatrixRotated=function(e){if(!e)return!1;var t=e.a,n=e.b,r=e.c,i=e.d;return(Math.abs(n)>1e-4||Math.abs(r)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)},t.prototype.testScissor=function(e){var n=e.maskObject;if(!n.isFastRect||!n.isFastRect()||t.isMatrixRotated(n.worldTransform)||t.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);var r=e._scissorRectLocal;return r.width>0&&r.height>0},t.prototype.roundFrameToPixels=function(e,n,r,i,a){t.isMatrixRotated(a)||(a=a?Ji.copyFrom(a):Ji.identity(),a.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.renderer.filter.transformAABB(a,e),e.fit(i),e.x=Math.round(e.x*n),e.y=Math.round(e.y*n),e.width=Math.round(e.width*n),e.height=Math.round(e.height*n))},t.prototype.push=function(e){e._scissorRectLocal||this.calcScissorRect(e);var t=this.renderer.gl;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;e&&Yi.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},t.prototype._useCurrent=function(){var e=this.maskStack[this.maskStack.length-1]._scissorRect,t;t=this.renderer.renderTexture.current?e.y:this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)},t}(qi),Zi=function(e){tr(t,e);function t(t){var n=e.call(this,t)||this;return n.glConst=L.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,n}return t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0},t.prototype.push=function(e){var t=e.maskObject,n=this.renderer.gl,r=e._stencilCounter;r===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),e._stencilCounter++;var i=e._colorMask;i!==0&&(e._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,r,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(e._colorMask=i,n.colorMask((i&1)!=0,(i&2)!=0,(i&4)!=0,(i&8)!=0)),this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{var n=this.maskStack.length===0?null:this.maskStack[this.maskStack.length-1],r=n?n._colorMask:15;r!==0&&(n._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,r!==0&&(n._colorMask=r,t.colorMask((r&1)!=0,(r&2)!=0,(r&4)!=0,(r&8)!=0)),this._useCurrent()}},t.prototype._useCurrent=function(){var e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},t}(qi),Qi=function(){function e(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Vn,this.transform=null}return e.prototype.update=function(e,t,n,r){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,r),this.transform&&this.projectionMatrix.append(this.transform);var i=this.renderer;i.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,i.globalUniforms.update(),i.shader.shader&&i.shader.syncUniformGroup(i.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(e,t,n,r){var i=this.projectionMatrix,a=r?-1:1;i.identity(),i.a=1/t.width*2,i.d=a*(1/t.height*2),i.tx=-1-t.x*i.a,i.ty=-a-t.y*i.d},e.prototype.setTransform=function(e){},e.prototype.destroy=function(){this.renderer=null},e}(),$i=new zn,ea=new zn,ta=function(){function e(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new zn,this.destinationFrame=new zn,this.viewportFrame=new zn}return e.prototype.bind=function(e,t,n){e===void 0&&(e=null);var r=this.renderer;this.current=e;var i,a,o;e?(i=e.baseTexture,o=i.resolution,t||($i.width=e.frame.width,$i.height=e.frame.height,t=$i),n||(ea.x=e.frame.x,ea.y=e.frame.y,ea.width=t.width,ea.height=t.height,n=ea),a=i.framebuffer):(o=r.resolution,t||($i.width=r.screen.width,$i.height=r.screen.height,t=$i),n||(n=$i,n.width=t.width,n.height=t.height));var s=this.viewportFrame;s.x=n.x*o,s.y=n.y*o,s.width=n.width*o,s.height=n.height*o,e||(s.y=r.view.height-(s.y+s.height)),s.ceil(),this.renderer.framebuffer.bind(a,s),this.renderer.projection.update(n,t,o,!a),e?this.renderer.mask.setMaskStack(i.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(n)},e.prototype.clear=function(e,t){this.current?e||=this.current.baseTexture.clearColor:e||=this.clearColor;var n=this.destinationFrame,r=this.current?this.current.baseTexture:this.renderer.screen,i=n.width!==r.width||n.height!==r.height;if(i){var a=this.viewportFrame,o=a.x,s=a.y,c=a.width,l=a.height;o=Math.round(o),s=Math.round(s),c=Math.round(c),l=Math.round(l),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(o,s,c,l)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],t),i&&this.renderer.scissor.pop()},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e.prototype.destroy=function(){this.renderer=null},e}();function na(e,t,n,r,i){n.buffer.update(i)}var ra={float:` data[offset] = v; `,vec2:` data[offset] = v[0]; @@ -452,7 +452,7 @@ void main(void) { data[offset + i] = v[i]; } - `},aa={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function oa(e){for(var t=e.map(function(e){return{data:e,offset:0,dataLen:0,dirty:0}}),n=0,r=0,i=0,a=0;a1&&(n=Math.max(n,16)*o.data.size),o.dataLen=n,r%n!==0&&r<16){var s=r%n%16;r+=s,i+=s}r+n>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=n,r=n):(o.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function sa(e,t){var n=[];for(var r in e)t[r]&&n.push(t[r]);return n.sort(function(e,t){return e.index-t.index}),n}function ca(e,t){if(!e.autoManage)return{size:0,syncFunc:ra};for(var n=sa(e.uniforms,t),r=oa(n),i=r.uboElements,a=r.size,o=[` + `},ia={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function aa(e){for(var t=e.map(function(e){return{data:e,offset:0,dataLen:0,dirty:0}}),n=0,r=0,i=0,a=0;a1&&(n=Math.max(n,16)*o.data.size),o.dataLen=n,r%n!==0&&r<16){var s=r%n%16;r+=s,i+=s}r+n>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=n,r=n):(o.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function oa(e,t){var n=[];for(var r in e)t[r]&&n.push(t[r]);return n.sort(function(e,t){return e.index-t.index}),n}function sa(e,t){if(!e.autoManage)return{size:0,syncFunc:na};for(var n=oa(e.uniforms,t),r=aa(n),i=r.uboElements,a=r.size,o=[` var v = null; var v2 = null; var cv = null; @@ -460,7 +460,7 @@ void main(void) var gl = renderer.gl var index = 0; var data = buffer.data; - `],s=0;s1){var m=pi(c.data.type),h=Math.max(aa[c.data.type]/16,1),g=m/h,_=(4-g%4)%4;o.push(` + `],s=0;s1){var m=fi(c.data.type),h=Math.max(ia[c.data.type]/16,1),g=m/h,_=(4-g%4)%4;o.push(` cv = ud.`+u+`.value; v = uv.`+u+`; offset = `+c.offset/4+`; @@ -476,7 +476,7 @@ void main(void) offset += `+_+`; } - `)}else{var v=ia[c.data.type];o.push(` + `)}else{var v=ra[c.data.type];o.push(` cv = ud.`+u+`.value; v = uv.`+u+`; offset = `+c.offset/4+`; @@ -484,7 +484,7 @@ void main(void) `)}}return o.push(` renderer.buffer.update(buffer); `),{size:a,syncFunc:Function(`ud`,`uv`,`renderer`,`syncData`,`buffer`,o.join(` -`))}}(function(){function e(){}return e})();var la=function(){function e(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return e.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},e}();function ua(e,t){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;it?1:-1});for(var o=0;o>=1,n++;this.stateId=e.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var e=this.renderer.texture,t=e.managedTextures,n=!1,r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){for(var a=0,r=0;r=0;r--)this.unload(e.children[r])},e.prototype.destroy=function(){this.renderer=null},e}();function Ta(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;return C=`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext?(t={},t[it.UNSIGNED_BYTE]=(n={},n[F.RGBA]=e.RGBA8,n[F.RGB]=e.RGB8,n[F.RG]=e.RG8,n[F.RED]=e.R8,n[F.RGBA_INTEGER]=e.RGBA8UI,n[F.RGB_INTEGER]=e.RGB8UI,n[F.RG_INTEGER]=e.RG8UI,n[F.RED_INTEGER]=e.R8UI,n[F.ALPHA]=e.ALPHA,n[F.LUMINANCE]=e.LUMINANCE,n[F.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,n),t[it.BYTE]=(r={},r[F.RGBA]=e.RGBA8_SNORM,r[F.RGB]=e.RGB8_SNORM,r[F.RG]=e.RG8_SNORM,r[F.RED]=e.R8_SNORM,r[F.RGBA_INTEGER]=e.RGBA8I,r[F.RGB_INTEGER]=e.RGB8I,r[F.RG_INTEGER]=e.RG8I,r[F.RED_INTEGER]=e.R8I,r),t[it.UNSIGNED_SHORT]=(i={},i[F.RGBA_INTEGER]=e.RGBA16UI,i[F.RGB_INTEGER]=e.RGB16UI,i[F.RG_INTEGER]=e.RG16UI,i[F.RED_INTEGER]=e.R16UI,i[F.DEPTH_COMPONENT]=e.DEPTH_COMPONENT16,i),t[it.SHORT]=(a={},a[F.RGBA_INTEGER]=e.RGBA16I,a[F.RGB_INTEGER]=e.RGB16I,a[F.RG_INTEGER]=e.RG16I,a[F.RED_INTEGER]=e.R16I,a),t[it.UNSIGNED_INT]=(o={},o[F.RGBA_INTEGER]=e.RGBA32UI,o[F.RGB_INTEGER]=e.RGB32UI,o[F.RG_INTEGER]=e.RG32UI,o[F.RED_INTEGER]=e.R32UI,o[F.DEPTH_COMPONENT]=e.DEPTH_COMPONENT24,o),t[it.INT]=(s={},s[F.RGBA_INTEGER]=e.RGBA32I,s[F.RGB_INTEGER]=e.RGB32I,s[F.RG_INTEGER]=e.RG32I,s[F.RED_INTEGER]=e.R32I,s),t[it.FLOAT]=(c={},c[F.RGBA]=e.RGBA32F,c[F.RGB]=e.RGB32F,c[F.RG]=e.RG32F,c[F.RED]=e.R32F,c[F.DEPTH_COMPONENT]=e.DEPTH_COMPONENT32F,c),t[it.HALF_FLOAT]=(l={},l[F.RGBA]=e.RGBA16F,l[F.RGB]=e.RGB16F,l[F.RG]=e.RG16F,l[F.RED]=e.R16F,l),t[it.UNSIGNED_SHORT_5_6_5]=(u={},u[F.RGB]=e.RGB565,u),t[it.UNSIGNED_SHORT_4_4_4_4]=(d={},d[F.RGBA]=e.RGBA4,d),t[it.UNSIGNED_SHORT_5_5_5_1]=(f={},f[F.RGBA]=e.RGB5_A1,f),t[it.UNSIGNED_INT_2_10_10_10_REV]=(p={},p[F.RGBA]=e.RGB10_A2,p[F.RGBA_INTEGER]=e.RGB10_A2UI,p),t[it.UNSIGNED_INT_10F_11F_11F_REV]=(m={},m[F.RGB]=e.R11F_G11F_B10F,m),t[it.UNSIGNED_INT_5_9_9_9_REV]=(h={},h[F.RGB]=e.RGB9_E5,h),t[it.UNSIGNED_INT_24_8]=(g={},g[F.DEPTH_STENCIL]=e.DEPTH24_STENCIL8,g),t[it.FLOAT_32_UNSIGNED_INT_24_8_REV]=(_={},_[F.DEPTH_STENCIL]=e.DEPTH32F_STENCIL8,_),t):(v={},v[it.UNSIGNED_BYTE]=(y={},y[F.RGBA]=e.RGBA,y[F.RGB]=e.RGB,y[F.ALPHA]=e.ALPHA,y[F.LUMINANCE]=e.LUMINANCE,y[F.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,y),v[it.UNSIGNED_SHORT_5_6_5]=(b={},b[F.RGB]=e.RGB,b),v[it.UNSIGNED_SHORT_4_4_4_4]=(x={},x[F.RGBA]=e.RGBA,x),v[it.UNSIGNED_SHORT_5_5_5_1]=(S={},S[F.RGBA]=e.RGBA,S),v),C}var Ea=function(){function e(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=it.UNSIGNED_BYTE,this.internalFormat=F.RGBA,this.samplerType=0}return e}(),Da=function(){function e(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new cr,this.hasIntegerTextures=!1}return e.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=Ta(e);var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(var n=0;n=0;--a){var o=n[a];if(o){var s=o._glTextures[i];s.samplerType!==at.FLOAT&&this.renderer.texture.unbind(o)}}},e.prototype.initTexture=function(e){var t=new Ea(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on(`dispose`,this.destroyTexture,this),t},e.prototype.initTextureType=function(e,t){var n,r;t.internalFormat=(r=(n=this.internalFormats[e.type])?.[e.format])??e.format,this.webGLVersion===2&&e.type===it.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type},e.prototype.updateTexture=function(e){var t=e._glTextures[this.CONTEXT_UID];if(t){var n=this.renderer;if(this.initTextureType(e,t),e.resource&&e.resource.upload(n,e,t))t.samplerType!==at.FLOAT&&(this.hasIntegerTextures=!0);else{var r=e.realWidth,i=e.realHeight,a=n.gl;(t.width!==r||t.height!==i||t.dirtyId<0)&&(t.width=r,t.height=i,a.texImage2D(e.target,0,t.internalFormat,r,i,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}},e.prototype.destroyTexture=function(e,t){var n=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off(`dispose`,this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){var r=this.managedTextures.indexOf(e);r!==-1&&mn(this.managedTextures,r,1)}},e.prototype.updateTextureStyle=function(e){var t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===ct.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=st.CLAMP:t.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)},e.prototype.setStyle=function(e,t){var n=this.gl;if(t.mipmap&&e.mipmap!==ct.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,t.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===ot.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&e.anisotropicLevel>0&&e.scaleMode===ot.LINEAR){var i=Math.min(e.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===ot.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===ot.LINEAR?n.LINEAR:n.NEAREST)},e.prototype.destroy=function(){this.renderer=null},e}(),Oa={__proto__:null,FilterSystem:Wr,BatchSystem:Kr,ContextSystem:Jr,FramebufferSystem:Zr,GeometrySystem:$r,MaskSystem:qi,ScissorSystem:Zi,StencilSystem:Qi,ProjectionSystem:$i,RenderTextureSystem:na,ShaderSystem:ha,StateSystem:Ca,TextureGCSystem:wa,TextureSystem:Da},ka=new Hn,Aa=function(e){nr(t,e);function t(t,n){t===void 0&&(t=$e.UNKNOWN);var r=e.call(this)||this;return n=Object.assign({},I.RENDER_OPTIONS,n),r.options=n,r.type=t,r.screen=new Bn(0,0,n.width,n.height),r.view=n.view||I.ADAPTER.createCanvas(),r.resolution=n.resolution||I.RESOLUTION,r.useContextAlpha=n.useContextAlpha,r.autoDensity=!!n.autoDensity,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,1],r._backgroundColorString=`#000000`,r.backgroundColor=n.backgroundColor||r._backgroundColor,r.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(vn(`6.0.0`,`Option transparent is deprecated, please use backgroundAlpha instead.`),r.useContextAlpha=n.transparent,r.backgroundAlpha=n.transparent?0:1),r._lastObjectRendered=null,r.plugins={},r}return t.prototype.initPlugins=function(e){for(var t in e)this.plugins[t]=new e[t](this)},Object.defineProperty(t.prototype,`width`,{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t){this.view.width=Math.round(e*this.resolution),this.view.height=Math.round(t*this.resolution);var n=this.view.width/this.resolution,r=this.view.height/this.resolution;this.screen.width=n,this.screen.height=r,this.autoDensity&&(this.view.style.width=n+`px`,this.view.style.height=r+`px`),this.emit(`resize`,n,r)},t.prototype.generateTexture=function(e,t,n,r){t===void 0&&(t={}),typeof t==`number`&&(vn(`6.1.0`,`generateTexture options (scaleMode, resolution, region) are now object options.`),t={scaleMode:t,resolution:n,region:r});var i=t.region,a=ir(t,[`region`]);r=i||e.getLocalBounds(null,!0),r.width===0&&(r.width=1),r.height===0&&(r.height=1);var o=Er.create(rr({width:r.width,height:r.height},a));return ka.tx=-r.x,ka.ty=-r.y,this.render(e,{renderTexture:o,clear:!1,transform:ka,skipUpdateTransform:!!e.parent}),o},t.prototype.destroy=function(e){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=$e.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,`backgroundColor`,{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=an(e),rn(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`backgroundAlpha`,{get:function(){return this._backgroundColorRgba[3]},set:function(e){this._backgroundColorRgba[3]=e},enumerable:!1,configurable:!0}),t}(Yt.default),ja=function(){function e(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return e}(),Ma=function(){function e(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return e.prototype.destroy=function(){this.renderer=null},e.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},e.prototype.bind=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r]||this.createGLBuffer(e);n.bindBuffer(e.type,i.buffer)},e.prototype.bindBufferBase=function(e,t){var n=this,r=n.gl,i=n.CONTEXT_UID;if(this.boundBufferBases[t]!==e){var a=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[t]=e,r.bindBufferBase(r.UNIFORM_BUFFER,t,a.buffer)}},e.prototype.bindBufferRange=function(e,t,n){var r=this,i=r.gl,a=r.CONTEXT_UID;n||=0;var o=e._glBuffers[a]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,t||0,o.buffer,n*256,256)},e.prototype.update=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r];if(e._updateID!==i.updateID)if(i.updateID=e._updateID,n.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)n.bufferSubData(e.type,0,e.data);else{var a=e.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,n.bufferData(e.type,e.data,a)}},e.prototype.dispose=function(e,t){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var n=e._glBuffers[this.CONTEXT_UID],r=this.gl;e.disposeRunner.remove(this),n&&(t||r.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeAll=function(e){for(var t=Object.keys(this.managedBuffers),n=0;n=ht.HIGH?this.multisample=ht.HIGH:t>=ht.MEDIUM?this.multisample=ht.MEDIUM:t>=ht.LOW?this.multisample=ht.LOW:this.multisample=ht.NONE},t.prototype.addSystem=function(e,t){var n=new e(this);if(this[t])throw Error(`Whoops! The name "`+t+`" is already in use`);for(var r in this[t]=n,this.runners)this.runners[r].add(n);return this},t.prototype.render=function(e,t){var n,r,i,a;if(t&&(t instanceof Er?(vn(`6.0.0`,`Renderer#render arguments changed, use options instead.`),n=t,r=arguments[2],i=arguments[3],a=arguments[4]):(n=t.renderTexture,r=t.clear,i=t.transform,a=t.skipUpdateTransform)),this.renderingToScreen=!n,this.runners.prerender.emit(),this.emit(`prerender`),this.projection.transform=i,!this.context.isLost){if(n||(this._lastObjectRendered=e),!a){var o=e.enableTempParent();e.updateTransform(),e.disableTempParent(o)}this.renderTexture.bind(n),this.batch.currentRenderer.start(),(r===void 0?this.clearBeforeRender:r)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),n&&n.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit(`postrender`)}},t.prototype.generateTexture=function(t,n,r,i){n===void 0&&(n={});var a=e.prototype.generateTexture.call(this,t,n,r,i);return this.framebuffer.blit(),a},t.prototype.resize=function(t,n){e.prototype.resize.call(this,t,n),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(t){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();e.prototype.destroy.call(this,t),this.gl=null},Object.defineProperty(t.prototype,`extract`,{get:function(){return vn(`6.0.0`,`Renderer#extract has been deprecated, please use Renderer#plugins.extract instead.`),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(e,t){vn(`6.5.0`,`Renderer.registerPlugin() has been deprecated, please use extensions.add() instead.`),On.add({name:e,type:En.RendererPlugin,ref:t})},t.__plugins={},t}(Aa);On.handleByMap(En.RendererPlugin,Na.__plugins);function Pa(e){return Na.create(e)}var Fa=`attribute vec2 aVertexPosition; +`))}}(function(){function e(){}return e})();var ca=function(){function e(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return e.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},e}();function la(e,t){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;it?1:-1});for(var o=0;o>=1,n++;this.stateId=e.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var e=this.renderer.texture,t=e.managedTextures,n=!1,r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){for(var a=0,r=0;r=0;r--)this.unload(e.children[r])},e.prototype.destroy=function(){this.renderer=null},e}();function wa(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;return C=`WebGL2RenderingContext`in globalThis&&e instanceof globalThis.WebGL2RenderingContext?(t={},t[rt.UNSIGNED_BYTE]=(n={},n[I.RGBA]=e.RGBA8,n[I.RGB]=e.RGB8,n[I.RG]=e.RG8,n[I.RED]=e.R8,n[I.RGBA_INTEGER]=e.RGBA8UI,n[I.RGB_INTEGER]=e.RGB8UI,n[I.RG_INTEGER]=e.RG8UI,n[I.RED_INTEGER]=e.R8UI,n[I.ALPHA]=e.ALPHA,n[I.LUMINANCE]=e.LUMINANCE,n[I.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,n),t[rt.BYTE]=(r={},r[I.RGBA]=e.RGBA8_SNORM,r[I.RGB]=e.RGB8_SNORM,r[I.RG]=e.RG8_SNORM,r[I.RED]=e.R8_SNORM,r[I.RGBA_INTEGER]=e.RGBA8I,r[I.RGB_INTEGER]=e.RGB8I,r[I.RG_INTEGER]=e.RG8I,r[I.RED_INTEGER]=e.R8I,r),t[rt.UNSIGNED_SHORT]=(i={},i[I.RGBA_INTEGER]=e.RGBA16UI,i[I.RGB_INTEGER]=e.RGB16UI,i[I.RG_INTEGER]=e.RG16UI,i[I.RED_INTEGER]=e.R16UI,i[I.DEPTH_COMPONENT]=e.DEPTH_COMPONENT16,i),t[rt.SHORT]=(a={},a[I.RGBA_INTEGER]=e.RGBA16I,a[I.RGB_INTEGER]=e.RGB16I,a[I.RG_INTEGER]=e.RG16I,a[I.RED_INTEGER]=e.R16I,a),t[rt.UNSIGNED_INT]=(o={},o[I.RGBA_INTEGER]=e.RGBA32UI,o[I.RGB_INTEGER]=e.RGB32UI,o[I.RG_INTEGER]=e.RG32UI,o[I.RED_INTEGER]=e.R32UI,o[I.DEPTH_COMPONENT]=e.DEPTH_COMPONENT24,o),t[rt.INT]=(s={},s[I.RGBA_INTEGER]=e.RGBA32I,s[I.RGB_INTEGER]=e.RGB32I,s[I.RG_INTEGER]=e.RG32I,s[I.RED_INTEGER]=e.R32I,s),t[rt.FLOAT]=(c={},c[I.RGBA]=e.RGBA32F,c[I.RGB]=e.RGB32F,c[I.RG]=e.RG32F,c[I.RED]=e.R32F,c[I.DEPTH_COMPONENT]=e.DEPTH_COMPONENT32F,c),t[rt.HALF_FLOAT]=(l={},l[I.RGBA]=e.RGBA16F,l[I.RGB]=e.RGB16F,l[I.RG]=e.RG16F,l[I.RED]=e.R16F,l),t[rt.UNSIGNED_SHORT_5_6_5]=(u={},u[I.RGB]=e.RGB565,u),t[rt.UNSIGNED_SHORT_4_4_4_4]=(d={},d[I.RGBA]=e.RGBA4,d),t[rt.UNSIGNED_SHORT_5_5_5_1]=(f={},f[I.RGBA]=e.RGB5_A1,f),t[rt.UNSIGNED_INT_2_10_10_10_REV]=(p={},p[I.RGBA]=e.RGB10_A2,p[I.RGBA_INTEGER]=e.RGB10_A2UI,p),t[rt.UNSIGNED_INT_10F_11F_11F_REV]=(m={},m[I.RGB]=e.R11F_G11F_B10F,m),t[rt.UNSIGNED_INT_5_9_9_9_REV]=(h={},h[I.RGB]=e.RGB9_E5,h),t[rt.UNSIGNED_INT_24_8]=(g={},g[I.DEPTH_STENCIL]=e.DEPTH24_STENCIL8,g),t[rt.FLOAT_32_UNSIGNED_INT_24_8_REV]=(_={},_[I.DEPTH_STENCIL]=e.DEPTH32F_STENCIL8,_),t):(v={},v[rt.UNSIGNED_BYTE]=(y={},y[I.RGBA]=e.RGBA,y[I.RGB]=e.RGB,y[I.ALPHA]=e.ALPHA,y[I.LUMINANCE]=e.LUMINANCE,y[I.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,y),v[rt.UNSIGNED_SHORT_5_6_5]=(b={},b[I.RGB]=e.RGB,b),v[rt.UNSIGNED_SHORT_4_4_4_4]=(x={},x[I.RGBA]=e.RGBA,x),v[rt.UNSIGNED_SHORT_5_5_5_1]=(S={},S[I.RGBA]=e.RGBA,S),v),C}var Ta=function(){function e(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=rt.UNSIGNED_BYTE,this.internalFormat=I.RGBA,this.samplerType=0}return e}(),Ea=function(){function e(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new sr,this.hasIntegerTextures=!1}return e.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=wa(e);var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(var n=0;n=0;--a){var o=n[a];if(o){var s=o._glTextures[i];s.samplerType!==it.FLOAT&&this.renderer.texture.unbind(o)}}},e.prototype.initTexture=function(e){var t=new Ta(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on(`dispose`,this.destroyTexture,this),t},e.prototype.initTextureType=function(e,t){var n,r;t.internalFormat=(r=(n=this.internalFormats[e.type])?.[e.format])??e.format,this.webGLVersion===2&&e.type===rt.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type},e.prototype.updateTexture=function(e){var t=e._glTextures[this.CONTEXT_UID];if(t){var n=this.renderer;if(this.initTextureType(e,t),e.resource&&e.resource.upload(n,e,t))t.samplerType!==it.FLOAT&&(this.hasIntegerTextures=!0);else{var r=e.realWidth,i=e.realHeight,a=n.gl;(t.width!==r||t.height!==i||t.dirtyId<0)&&(t.width=r,t.height=i,a.texImage2D(e.target,0,t.internalFormat,r,i,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}},e.prototype.destroyTexture=function(e,t){var n=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off(`dispose`,this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){var r=this.managedTextures.indexOf(e);r!==-1&&pn(this.managedTextures,r,1)}},e.prototype.updateTextureStyle=function(e){var t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===st.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=ot.CLAMP:t.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)},e.prototype.setStyle=function(e,t){var n=this.gl;if(t.mipmap&&e.mipmap!==st.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,t.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===at.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&e.anisotropicLevel>0&&e.scaleMode===at.LINEAR){var i=Math.min(e.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===at.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===at.LINEAR?n.LINEAR:n.NEAREST)},e.prototype.destroy=function(){this.renderer=null},e}(),Da={__proto__:null,FilterSystem:Ur,BatchSystem:Gr,ContextSystem:qr,FramebufferSystem:Xr,GeometrySystem:Qr,MaskSystem:Ki,ScissorSystem:Xi,StencilSystem:Zi,ProjectionSystem:Qi,RenderTextureSystem:ta,ShaderSystem:ma,StateSystem:Sa,TextureGCSystem:Ca,TextureSystem:Ea},Oa=new Vn,ka=function(e){tr(t,e);function t(t,n){t===void 0&&(t=Qe.UNKNOWN);var r=e.call(this)||this;return n=Object.assign({},L.RENDER_OPTIONS,n),r.options=n,r.type=t,r.screen=new zn(0,0,n.width,n.height),r.view=n.view||L.ADAPTER.createCanvas(),r.resolution=n.resolution||L.RESOLUTION,r.useContextAlpha=n.useContextAlpha,r.autoDensity=!!n.autoDensity,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,1],r._backgroundColorString=`#000000`,r.backgroundColor=n.backgroundColor||r._backgroundColor,r.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(_n(`6.0.0`,`Option transparent is deprecated, please use backgroundAlpha instead.`),r.useContextAlpha=n.transparent,r.backgroundAlpha=n.transparent?0:1),r._lastObjectRendered=null,r.plugins={},r}return t.prototype.initPlugins=function(e){for(var t in e)this.plugins[t]=new e[t](this)},Object.defineProperty(t.prototype,`width`,{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`height`,{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t){this.view.width=Math.round(e*this.resolution),this.view.height=Math.round(t*this.resolution);var n=this.view.width/this.resolution,r=this.view.height/this.resolution;this.screen.width=n,this.screen.height=r,this.autoDensity&&(this.view.style.width=n+`px`,this.view.style.height=r+`px`),this.emit(`resize`,n,r)},t.prototype.generateTexture=function(e,t,n,r){t===void 0&&(t={}),typeof t==`number`&&(_n(`6.1.0`,`generateTexture options (scaleMode, resolution, region) are now object options.`),t={scaleMode:t,resolution:n,region:r});var i=t.region,a=rr(t,[`region`]);r=i||e.getLocalBounds(null,!0),r.width===0&&(r.width=1),r.height===0&&(r.height=1);var o=Tr.create(nr({width:r.width,height:r.height},a));return Oa.tx=-r.x,Oa.ty=-r.y,this.render(e,{renderTexture:o,clear:!1,transform:Oa,skipUpdateTransform:!!e.parent}),o},t.prototype.destroy=function(e){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=Qe.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,`backgroundColor`,{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=rn(e),nn(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`backgroundAlpha`,{get:function(){return this._backgroundColorRgba[3]},set:function(e){this._backgroundColorRgba[3]=e},enumerable:!1,configurable:!0}),t}(Jt.default),Aa=function(){function e(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return e}(),ja=function(){function e(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return e.prototype.destroy=function(){this.renderer=null},e.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},e.prototype.bind=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r]||this.createGLBuffer(e);n.bindBuffer(e.type,i.buffer)},e.prototype.bindBufferBase=function(e,t){var n=this,r=n.gl,i=n.CONTEXT_UID;if(this.boundBufferBases[t]!==e){var a=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[t]=e,r.bindBufferBase(r.UNIFORM_BUFFER,t,a.buffer)}},e.prototype.bindBufferRange=function(e,t,n){var r=this,i=r.gl,a=r.CONTEXT_UID;n||=0;var o=e._glBuffers[a]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,t||0,o.buffer,n*256,256)},e.prototype.update=function(e){var t=this,n=t.gl,r=t.CONTEXT_UID,i=e._glBuffers[r];if(e._updateID!==i.updateID)if(i.updateID=e._updateID,n.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)n.bufferSubData(e.type,0,e.data);else{var a=e.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,n.bufferData(e.type,e.data,a)}},e.prototype.dispose=function(e,t){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var n=e._glBuffers[this.CONTEXT_UID],r=this.gl;e.disposeRunner.remove(this),n&&(t||r.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeAll=function(e){for(var t=Object.keys(this.managedBuffers),n=0;n=mt.HIGH?this.multisample=mt.HIGH:t>=mt.MEDIUM?this.multisample=mt.MEDIUM:t>=mt.LOW?this.multisample=mt.LOW:this.multisample=mt.NONE},t.prototype.addSystem=function(e,t){var n=new e(this);if(this[t])throw Error(`Whoops! The name "`+t+`" is already in use`);for(var r in this[t]=n,this.runners)this.runners[r].add(n);return this},t.prototype.render=function(e,t){var n,r,i,a;if(t&&(t instanceof Tr?(_n(`6.0.0`,`Renderer#render arguments changed, use options instead.`),n=t,r=arguments[2],i=arguments[3],a=arguments[4]):(n=t.renderTexture,r=t.clear,i=t.transform,a=t.skipUpdateTransform)),this.renderingToScreen=!n,this.runners.prerender.emit(),this.emit(`prerender`),this.projection.transform=i,!this.context.isLost){if(n||(this._lastObjectRendered=e),!a){var o=e.enableTempParent();e.updateTransform(),e.disableTempParent(o)}this.renderTexture.bind(n),this.batch.currentRenderer.start(),(r===void 0?this.clearBeforeRender:r)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),n&&n.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit(`postrender`)}},t.prototype.generateTexture=function(t,n,r,i){n===void 0&&(n={});var a=e.prototype.generateTexture.call(this,t,n,r,i);return this.framebuffer.blit(),a},t.prototype.resize=function(t,n){e.prototype.resize.call(this,t,n),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(t){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();e.prototype.destroy.call(this,t),this.gl=null},Object.defineProperty(t.prototype,`extract`,{get:function(){return _n(`6.0.0`,`Renderer#extract has been deprecated, please use Renderer#plugins.extract instead.`),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(e,t){_n(`6.5.0`,`Renderer.registerPlugin() has been deprecated, please use extensions.add() instead.`),Dn.add({name:e,type:Tn.RendererPlugin,ref:t})},t.__plugins={},t}(ka);Dn.handleByMap(Tn.RendererPlugin,Ma.__plugins);function Na(e){return Ma.create(e)}var Pa=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -495,7 +495,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Ia=Fa;(function(){function e(e){vn(`6.1.0`,`System class is deprecated, implemement ISystem interface instead.`),this.renderer=e}return e.prototype.destroy=function(){this.renderer=null},e})();var La=function(){function e(){this.texArray=null,this.blend=0,this.type=nt.TRIANGLES,this.start=0,this.size=0,this.data=null}return e}(),Ra=function(){function e(){this.elements=[],this.ids=[],this.count=0}return e.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},t.prototype.buildTexturesAndDrawCalls=function(){var e=this,n=e._bufferedTextures,r=e.MAX_TEXTURES,i=t._textureArrayPool,a=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,c=++cr._globalBatch,l=0,u=i[0],d=0;a.copyBoundTextures(o,r);for(var f=0;f=r&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,f),d=f,u=i[++l],++c),p._batchEnabled=c,p.touched=s,u.elements[u.count++]=p)}u.count>0&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,this._bufferSize),++l,++c);for(var f=0;fthis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},t.prototype.buildTexturesAndDrawCalls=function(){var e=this,n=e._bufferedTextures,r=e.MAX_TEXTURES,i=t._textureArrayPool,a=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,c=++sr._globalBatch,l=0,u=i[0],d=0;a.copyBoundTextures(o,r);for(var f=0;f=r&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,f),d=f,u=i[++l],++c),p._batchEnabled=c,p.touched=s,u.elements[u.count++]=p)}u.count>0&&(a.boundArray(u,o,c,r),this.buildDrawCalls(u,d,this._bufferSize),++l,++c);for(var f=0;f0&&(t+=` else `),nthis.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?Bn.EMPTY:(e||=new Bn(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},e.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},e.prototype.addPointMatrix=function(e,t){var n=e.a,r=e.b,i=e.c,a=e.d,o=e.tx,s=e.ty,c=n*t.x+i*t.y+o,l=r*t.x+a*t.y+s;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},e.prototype.addQuad=function(e){var t=this.minX,n=this.minY,r=this.maxX,i=this.maxY,a=e[0],o=e[1];t=ar?a:r,i=o>i?o:i,a=e[2],o=e[3],t=ar?a:r,i=o>i?o:i,a=e[4],o=e[5],t=ar?a:r,i=o>i?o:i,a=e[6],o=e[7],t=ar?a:r,i=o>i?o:i,this.minX=t,this.minY=n,this.maxX=r,this.maxY=i},e.prototype.addFrame=function(e,t,n,r,i){this.addFrameMatrix(e.worldTransform,t,n,r,i)},e.prototype.addFrameMatrix=function(e,t,n,r,i){var a=e.a,o=e.b,s=e.c,c=e.d,l=e.tx,u=e.ty,d=this.minX,f=this.minY,p=this.maxX,m=this.maxY,h=a*t+s*n+l,g=o*t+c*n+u;d=hp?h:p,m=g>m?g:m,h=a*r+s*n+l,g=o*r+c*n+u,d=hp?h:p,m=g>m?g:m,h=a*t+s*i+l,g=o*t+c*i+u,d=hp?h:p,m=g>m?g:m,h=a*r+s*i+l,g=o*r+c*i+u,d=hp?h:p,m=g>m?g:m,this.minX=d,this.minY=f,this.maxX=p,this.maxY=m},e.prototype.addVertexData=function(e,t,n){for(var r=this.minX,i=this.minY,a=this.maxX,o=this.maxY,s=t;sa?c:a,o=l>o?l:o}this.minX=r,this.minY=i,this.maxX=a,this.maxY=o},e.prototype.addVertices=function(e,t,n,r){this.addVerticesMatrix(e.worldTransform,t,n,r)},e.prototype.addVerticesMatrix=function(e,t,n,r,i,a){i===void 0&&(i=0),a===void 0&&(a=i);for(var o=e.a,s=e.b,c=e.c,l=e.d,u=e.tx,d=e.ty,f=this.minX,p=this.minY,m=this.maxX,h=this.maxY,g=n;gr?e.maxX:r,this.maxY=e.maxY>i?e.maxY:i},e.prototype.addBoundsMask=function(e,t){var n=e.minX>t.minX?e.minX:t.minX,r=e.minY>t.minY?e.minY:t.minY,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.addBoundsMatrix=function(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)},e.prototype.addBoundsArea=function(e,t){var n=e.minX>t.x?e.minX:t.x,r=e.minY>t.y?e.minY:t.y,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.pad=function(e,t){e===void 0&&(e=0),t===void 0&&(t=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)},e.prototype.addFramePad=function(e,t,n,r,i,a){e-=i,t-=a,n+=i,r+=a,this.minX=this.minXn?this.maxX:n,this.minY=this.minYr?this.maxY:r},e}(),$a=function(e,t){return $a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},$a(e,t)};function eo(e,t){$a(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var to=function(e){eo(t,e);function t(){var t=e.call(this)||this;return t.tempDisplayObjectParent=null,t.transform=new Qn,t.alpha=1,t.visible=!0,t.renderable=!0,t.cullable=!1,t.cullArea=null,t.parent=null,t.worldAlpha=1,t._lastSortedIndex=0,t._zIndex=0,t.filterArea=null,t.filters=null,t._enabledFilters=null,t._bounds=new Qa,t._localBounds=null,t._boundsID=0,t._boundsRect=null,t._localBoundsRect=null,t._mask=null,t._maskRefCount=0,t._destroyed=!1,t.isSprite=!1,t.isMask=!1,t}return t.mixin=function(e){for(var n=Object.keys(e),r=0;r1)for(var r=0;rthis.children.length)throw Error(e+`addChildAt: The index `+t+` supplied is out of bounds `+this.children.length);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit(`added`,this),this.emit(`childAdded`,e,this,t),e},t.prototype.swapChildren=function(e,t){if(e!==t){var n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw Error(`The index `+t+` supplied is out of bounds `+this.children.length);var n=this.getChildIndex(e);mn(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)},t.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw Error(`getChildAt: Index (`+e+`) does not exist.`);return this.children[e]},t.prototype.removeChild=function(){for(var e=arguments,t=[],n=0;n1)for(var r=0;r0&&i<=r){a=this.children.splice(n,i);for(var o=0;o1&&this.children.sort(ro),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var e=0,t=this.children.length;e0&&n.height>0){var r,i;if(this.cullArea?(r=this.cullArea,i=this.worldTransform):this._render!==t.prototype._render&&(r=this.getBounds(!0)),r&&n.intersects(r,i))this._render(e);else if(this.cullArea)return;for(var a=0,o=this.children.length;a=0;f--){var p=d[f],m=this.recursiveFindHit(e,p,n,r,c);if(m){if(!p.parent)continue;c=!1,m&&(e.target&&(r=!1),s=!0)}}return i&&(r&&!e.target&&!t.hitArea&&t.containsPoint&&t.containsPoint(o)&&(s=!0),t.interactive&&(s&&!e.target&&(e.target=t),n&&n(e,t,!!s))),s},e.prototype.findHit=function(e,t,n,r){this.recursiveFindHit(e,t,n,r,!1)},e}(),mo={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor===`pointer`},set buttonMode(e){e?this.cursor=`pointer`:this.cursor===`pointer`&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};to.mixin(mo);var ho=1,go={target:null,data:{global:null}},_o=function(e){lo(t,e);function t(t,n){var r=e.call(this)||this;return n||={},r.renderer=t,r.autoPreventDefault=n.autoPreventDefault===void 0?!0:n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new so,r.mouse.identifier=ho,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[ho]=r.mouse,r.interactionDataPool=[],r.eventData=new uo,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!(`PointerEvent`in globalThis),r.supportsTouchEvents=`ontouchstart`in globalThis,r.supportsPointerEvents=!!globalThis.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:`inherit`,pointer:`pointer`},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new po,r._tempDisplayObject=new no,r._eventListenerOptions={capture:!0,passive:!1},r._useSystemTicker=n.useSystemTicker===void 0?!0:n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return Object.defineProperty(t.prototype,`useSystemTicker`,{get:function(){return this._useSystemTicker},set:function(e){this._useSystemTicker=e,e?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lastObjectRendered`,{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(e,t){return go.target=null,go.data.global=e,t||=this.lastObjectRendered,this.processInteractive(go,t,null,!0),go.target},t.prototype.setTargetElement=function(e,t){t===void 0&&(t=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=e,this.resolution=t,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(Mn.system.add(this.tickerUpdate,this,An.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(Mn.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(e){this._deltaTime+=e,!(this._deltaTime0&&(a=e.composedPath()[0]);for(var o=a===this.interactionDOMElement?``:`outside`,s=0;snew Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),bo=class e{constructor(){this._breathParameters=[],this._currentTime=0}static create(){return new e}setParameters(e){this._breathParameters=e}getParameters(){return this._breathParameters}updateParameters(e,t){this._currentTime+=t;let n=this._currentTime*2*3.14159;for(let t=0;t=1&&(r=1,this._blinkingState=wo.EyeState_Closed,this._stateStartTimeSeconds=this._userTimeSeconds),n=1-r;break;case wo.EyeState_Closed:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._closedSeconds,r>=1&&(this._blinkingState=wo.EyeState_Opening,this._stateStartTimeSeconds=this._userTimeSeconds),n=0;break;case wo.EyeState_Opening:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._openingSeconds,r>=1&&(r=1,this._blinkingState=wo.EyeState_Interval,this._nextBlinkingTime=this.determinNextBlinkingTiming()),n=r;break;case wo.EyeState_Interval:this._nextBlinkingTime(e[e.EyeState_First=0]=`EyeState_First`,e[e.EyeState_Interval=1]=`EyeState_Interval`,e[e.EyeState_Closing=2]=`EyeState_Closing`,e[e.EyeState_Closed=3]=`EyeState_Closed`,e[e.EyeState_Opening=4]=`EyeState_Opening`,e))(wo||{});const To=.001,Eo=.5;var Do=class e{static create(t){let n=new e;typeof t.FadeInTime==`number`&&(n._fadeTimeSeconds=t.FadeInTime,n._fadeTimeSeconds<=0&&(n._fadeTimeSeconds=Eo));let r=t.Groups,i=r.length;for(let e=0;eTo){if(i>=0)break;i=o,a=e.getPartOpacityByIndex(n),a+=t/this._fadeTimeSeconds,a>1&&(a=1)}}i<0&&(i=0,a=1);for(let t=n;ts&&(r=1-s/(1-a)),t>r&&(t=r),e.setPartOpacityByIndex(n,t)}}}constructor(){this._fadeTimeSeconds=Eo,this._lastModel=void 0,this._partGroups=[],this._partGroupCounts=[]}},Oo=class e{constructor(e){this.parameterIndex=0,this.partIndex=0,this.partId=``,this.link=[],e!=null&&this.assignment(e)}assignment(e){return this.partId=e.partId,this.link=e.link.map(e=>e.clone()),this}initialize(e){this.parameterIndex=e.getParameterIndex(this.partId),this.partIndex=e.getPartIndex(this.partId),e.setParameterValueByIndex(this.parameterIndex,1)}clone(){let t=new e;return t.partId=this.partId,t.parameterIndex=this.parameterIndex,t.partIndex=this.partIndex,t.link=this.link.map(e=>e.clone()),t}},ko=class e{constructor(e,t){this.x=e||0,this.y=t||0}add(t){let n=new e(0,0);return n.x=this.x+t.x,n.y=this.y+t.y,n}substract(t){let n=new e(0,0);return n.x=this.x-t.x,n.y=this.y-t.y,n}multiply(t){let n=new e(0,0);return n.x=this.x*t.x,n.y=this.y*t.y,n}multiplyByScaler(t){return this.multiply(new e(t,t))}division(t){let n=new e(0,0);return n.x=this.x/t.x,n.y=this.y/t.y,n}divisionByScalar(t){return this.division(new e(t,t))}getLength(){return Math.sqrt(this.x*this.x+this.y*this.y)}getDistanceWith(e){return Math.sqrt((this.x-e.x)*(this.x-e.x)+(this.y-e.y)*(this.y-e.y))}dot(e){return this.x*e.x+this.y*e.y}normalize(){let e=(this.x*this.x+this.y*this.y)**.5;this.x/=e,this.y/=e}isEqual(e){return this.x==e.x&&this.y==e.y}isNotEqual(e){return!this.isEqual(e)}};const Ao=class{static range(e,t,n){return en&&(e=n),e}static sin(e){return Math.sin(e)}static cos(e){return Math.cos(e)}static abs(e){return Math.abs(e)}static sqrt(e){return Math.sqrt(e)}static cbrt(e){if(e===0)return e;let t=e,n=t<0;n&&(t=-t);let r;return t===1/0?r=1/0:(r=Math.exp(Math.log(t)/3),r=(t/(r*r)+2*r)/3),n?-r:r}static getEasingSine(e){return e<0?0:e>1?1:.5-.5*this.cos(e*Math.PI)}static max(e,t){return e>t?e:t}static min(e,t){return e>t?t:e}static degreesToRadian(e){return e/180*Math.PI}static radianToDegrees(e){return e*180/Math.PI}static directionToRadian(e,t){let n=Math.atan2(t.y,t.x),r=Math.atan2(e.y,e.x),i=n-r;for(;i<-Math.PI;)i+=Math.PI*2;for(;i>Math.PI;)i-=Math.PI*2;return i}static directionToDegrees(e,t){let n=this.directionToRadian(e,t),r=this.radianToDegrees(n);return t.x-e.x>0&&(r=-r),r}static radianToDirection(e){let t=new ko;return t.x=this.sin(e),t.y=this.cos(e),t}static quadraticEquation(e,t,n){return this.abs(e)1&&(e=1),t<0?t=0:t>1&&(t=1),n<0?n=0:n>1&&(n=1),r<0?r=0:r>1&&(r=1),this._modelColor.R=e,this._modelColor.G=t,this._modelColor.B=n,this._modelColor.A=r}getModelColor(){return Object.assign({},this._modelColor)}setIsPremultipliedAlpha(e){this._isPremultipliedAlpha=e}isPremultipliedAlpha(){return this._isPremultipliedAlpha}setIsCulling(e){this._isCulling=e}isCulling(){return this._isCulling}setAnisotropy(e){this._anisortopy=e}getAnisotropy(){return this._anisortopy}getModel(){return this._model}constructor(){this._isCulling=!1,this._isPremultipliedAlpha=!1,this._anisortopy=0,this._modelColor=new Fo,this._mvpMatrix4x4=new Mo,this._mvpMatrix4x4.loadIdentity()}},Po=(e=>(e[e.CubismBlendMode_Normal=0]=`CubismBlendMode_Normal`,e[e.CubismBlendMode_Additive=1]=`CubismBlendMode_Additive`,e[e.CubismBlendMode_Multiplicative=2]=`CubismBlendMode_Multiplicative`,e))(Po||{}),Fo=class{constructor(){this.R=1,this.G=1,this.B=1,this.A=1}};let Io=!1,Lo=!1,Ro;const zo={vertexOffset:0,vertexStep:2};var Bo=class{static startUp(e){if(Io)return Uo(`CubismFramework.startUp() is already done.`),Io;if(Live2DCubismCore._isStarted)return Io=!0,!0;if(Live2DCubismCore._isStarted=!0,Ro=e,Ro&&Live2DCubismCore.Logging.csmSetLogFunction(Ro.logFunction),Io=!0,Io){let e=Live2DCubismCore.Version.csmGetVersion(),t=(e&4278190080)>>24,n=(e&16711680)>>16,r=e&65535,i=e;Uo(`Live2D Cubism Core version: {0}.{1}.{2} ({3})`,(`00`+t).slice(-2),(`00`+n).slice(-2),(`0000`+r).slice(-4),i)}return Uo(`CubismFramework.startUp() is complete.`),Io}static cleanUp(){Io=!1,Lo=!1,Ro=void 0}static initialize(){if(!Io){Wo(`CubismFramework is not started.`);return}if(Lo){Wo(`CubismFramework.initialize() skipped, already initialized.`);return}Lo=!0,Uo(`CubismFramework.initialize() is complete.`)}static dispose(){if(!Io){Wo(`CubismFramework is not started.`);return}if(!Lo){Wo(`CubismFramework.dispose() skipped, not initialized.`);return}No.staticRelease(),Lo=!1,Uo(`CubismFramework.dispose() is complete.`)}static isStarted(){return Io}static isInitialized(){return Lo}static coreLogFunction(e){Live2DCubismCore.Logging.csmGetLogFunction()&&Live2DCubismCore.Logging.csmGetLogFunction()(e)}static getLoggingLevel(){return Ro==null?Vo.LogLevel_Off:Ro.loggingLevel}constructor(){}},Vo=(e=>(e[e.LogLevel_Verbose=0]=`LogLevel_Verbose`,e[e.LogLevel_Debug=1]=`LogLevel_Debug`,e[e.LogLevel_Info=2]=`LogLevel_Info`,e[e.LogLevel_Warning=3]=`LogLevel_Warning`,e[e.LogLevel_Error=4]=`LogLevel_Error`,e[e.LogLevel_Off=5]=`LogLevel_Off`,e))(Vo||{});function Ho(e,...t){Ko.print(Vo.LogLevel_Debug,`[CSM][D]`+e+` -`,t)}function Uo(e,...t){Ko.print(Vo.LogLevel_Info,`[CSM][I]`+e+` -`,t)}function Wo(e,...t){Ko.print(Vo.LogLevel_Warning,`[CSM][W]`+e+` -`,t)}function Go(e,...t){Ko.print(Vo.LogLevel_Error,`[CSM][E]`+e+` -`,t)}var Ko=class{static print(e,t,n){if(en[t]);r(i)}static dumpBytes(e,t,n){for(let r=0;r0?this.print(e,` +`,Wa=function(){function e(){}return e.create=function(e){var t=Object.assign({vertex:Ha,fragment:Ua,geometryClass:Va,vertexSize:6},e),n=t.vertex,r=t.fragment,i=t.vertexSize,a=t.geometryClass;return function(e){tr(t,e);function t(t){var o=e.call(this,t)||this;return o.shaderGenerator=new Ba(n,r),o.geometryClass=a,o.vertexSize=i,o}return t}(za)},Object.defineProperty(e,`defaultVertexSrc`,{get:function(){return Ha},enumerable:!1,configurable:!0}),Object.defineProperty(e,`defaultFragmentTemplate`,{get:function(){return Ua},enumerable:!1,configurable:!0}),e}(),Ga=Wa.create();Object.assign(Ga,{extension:{name:`batch`,type:Tn.RendererPlugin}});var Ka={},qa=function(e){Object.defineProperty(Ka,e,{get:function(){return _n(`6.0.0`,`PIXI.systems.`+e+` has moved to PIXI.`+e),_r[e]}})};for(var Ja in _r)qa(Ja);var Ya={},Xa=function(e){Object.defineProperty(Ya,e,{get:function(){return _n(`6.0.0`,`PIXI.resources.`+e+` has moved to PIXI.`+e),Da[e]}})};for(var Ja in Da)Xa(Ja);L.SORTABLE_CHILDREN=!1;var Za=function(){function e(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return e.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?zn.EMPTY:(e||=new zn(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},e.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},e.prototype.addPointMatrix=function(e,t){var n=e.a,r=e.b,i=e.c,a=e.d,o=e.tx,s=e.ty,c=n*t.x+i*t.y+o,l=r*t.x+a*t.y+s;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},e.prototype.addQuad=function(e){var t=this.minX,n=this.minY,r=this.maxX,i=this.maxY,a=e[0],o=e[1];t=ar?a:r,i=o>i?o:i,a=e[2],o=e[3],t=ar?a:r,i=o>i?o:i,a=e[4],o=e[5],t=ar?a:r,i=o>i?o:i,a=e[6],o=e[7],t=ar?a:r,i=o>i?o:i,this.minX=t,this.minY=n,this.maxX=r,this.maxY=i},e.prototype.addFrame=function(e,t,n,r,i){this.addFrameMatrix(e.worldTransform,t,n,r,i)},e.prototype.addFrameMatrix=function(e,t,n,r,i){var a=e.a,o=e.b,s=e.c,c=e.d,l=e.tx,u=e.ty,d=this.minX,f=this.minY,p=this.maxX,m=this.maxY,h=a*t+s*n+l,g=o*t+c*n+u;d=hp?h:p,m=g>m?g:m,h=a*r+s*n+l,g=o*r+c*n+u,d=hp?h:p,m=g>m?g:m,h=a*t+s*i+l,g=o*t+c*i+u,d=hp?h:p,m=g>m?g:m,h=a*r+s*i+l,g=o*r+c*i+u,d=hp?h:p,m=g>m?g:m,this.minX=d,this.minY=f,this.maxX=p,this.maxY=m},e.prototype.addVertexData=function(e,t,n){for(var r=this.minX,i=this.minY,a=this.maxX,o=this.maxY,s=t;sa?c:a,o=l>o?l:o}this.minX=r,this.minY=i,this.maxX=a,this.maxY=o},e.prototype.addVertices=function(e,t,n,r){this.addVerticesMatrix(e.worldTransform,t,n,r)},e.prototype.addVerticesMatrix=function(e,t,n,r,i,a){i===void 0&&(i=0),a===void 0&&(a=i);for(var o=e.a,s=e.b,c=e.c,l=e.d,u=e.tx,d=e.ty,f=this.minX,p=this.minY,m=this.maxX,h=this.maxY,g=n;gr?e.maxX:r,this.maxY=e.maxY>i?e.maxY:i},e.prototype.addBoundsMask=function(e,t){var n=e.minX>t.minX?e.minX:t.minX,r=e.minY>t.minY?e.minY:t.minY,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.addBoundsMatrix=function(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)},e.prototype.addBoundsArea=function(e,t){var n=e.minX>t.x?e.minX:t.x,r=e.minY>t.y?e.minY:t.y,i=e.maxXc?i:c,this.maxY=a>l?a:l}},e.prototype.pad=function(e,t){e===void 0&&(e=0),t===void 0&&(t=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)},e.prototype.addFramePad=function(e,t,n,r,i,a){e-=i,t-=a,n+=i,r+=a,this.minX=this.minXn?this.maxX:n,this.minY=this.minYr?this.maxY:r},e}(),Qa=function(e,t){return Qa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Qa(e,t)};function $a(e,t){Qa(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var eo=function(e){$a(t,e);function t(){var t=e.call(this)||this;return t.tempDisplayObjectParent=null,t.transform=new Zn,t.alpha=1,t.visible=!0,t.renderable=!0,t.cullable=!1,t.cullArea=null,t.parent=null,t.worldAlpha=1,t._lastSortedIndex=0,t._zIndex=0,t.filterArea=null,t.filters=null,t._enabledFilters=null,t._bounds=new Za,t._localBounds=null,t._boundsID=0,t._boundsRect=null,t._localBoundsRect=null,t._mask=null,t._maskRefCount=0,t._destroyed=!1,t.isSprite=!1,t.isMask=!1,t}return t.mixin=function(e){for(var n=Object.keys(e),r=0;r1)for(var r=0;rthis.children.length)throw Error(e+`addChildAt: The index `+t+` supplied is out of bounds `+this.children.length);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit(`added`,this),this.emit(`childAdded`,e,this,t),e},t.prototype.swapChildren=function(e,t){if(e!==t){var n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw Error(`The index `+t+` supplied is out of bounds `+this.children.length);var n=this.getChildIndex(e);pn(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)},t.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw Error(`getChildAt: Index (`+e+`) does not exist.`);return this.children[e]},t.prototype.removeChild=function(){for(var e=arguments,t=[],n=0;n1)for(var r=0;r0&&i<=r){a=this.children.splice(n,i);for(var o=0;o1&&this.children.sort(no),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var e=0,t=this.children.length;e0&&n.height>0){var r,i;if(this.cullArea?(r=this.cullArea,i=this.worldTransform):this._render!==t.prototype._render&&(r=this.getBounds(!0)),r&&n.intersects(r,i))this._render(e);else if(this.cullArea)return;for(var a=0,o=this.children.length;a=0;f--){var p=d[f],m=this.recursiveFindHit(e,p,n,r,c);if(m){if(!p.parent)continue;c=!1,m&&(e.target&&(r=!1),s=!0)}}return i&&(r&&!e.target&&!t.hitArea&&t.containsPoint&&t.containsPoint(o)&&(s=!0),t.interactive&&(s&&!e.target&&(e.target=t),n&&n(e,t,!!s))),s},e.prototype.findHit=function(e,t,n,r){this.recursiveFindHit(e,t,n,r,!1)},e}(),po={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor===`pointer`},set buttonMode(e){e?this.cursor=`pointer`:this.cursor===`pointer`&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};eo.mixin(po);var mo=1,ho={target:null,data:{global:null}},go=function(e){co(t,e);function t(t,n){var r=e.call(this)||this;return n||={},r.renderer=t,r.autoPreventDefault=n.autoPreventDefault===void 0?!0:n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new oo,r.mouse.identifier=mo,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[mo]=r.mouse,r.interactionDataPool=[],r.eventData=new lo,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!(`PointerEvent`in globalThis),r.supportsTouchEvents=`ontouchstart`in globalThis,r.supportsPointerEvents=!!globalThis.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:`inherit`,pointer:`pointer`},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new fo,r._tempDisplayObject=new to,r._eventListenerOptions={capture:!0,passive:!1},r._useSystemTicker=n.useSystemTicker===void 0?!0:n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return Object.defineProperty(t.prototype,`useSystemTicker`,{get:function(){return this._useSystemTicker},set:function(e){this._useSystemTicker=e,e?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lastObjectRendered`,{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(e,t){return ho.target=null,ho.data.global=e,t||=this.lastObjectRendered,this.processInteractive(ho,t,null,!0),ho.target},t.prototype.setTargetElement=function(e,t){t===void 0&&(t=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=e,this.resolution=t,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(jn.system.add(this.tickerUpdate,this,kn.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(jn.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(e){this._deltaTime+=e,!(this._deltaTime0&&(a=e.composedPath()[0]);for(var o=a===this.interactionDOMElement?``:`outside`,s=0;snew Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),yo=class e{constructor(){this._breathParameters=[],this._currentTime=0}static create(){return new e}setParameters(e){this._breathParameters=e}getParameters(){return this._breathParameters}updateParameters(e,t){this._currentTime+=t;let n=this._currentTime*2*3.14159;for(let t=0;t=1&&(r=1,this._blinkingState=Co.EyeState_Closed,this._stateStartTimeSeconds=this._userTimeSeconds),n=1-r;break;case Co.EyeState_Closed:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._closedSeconds,r>=1&&(this._blinkingState=Co.EyeState_Opening,this._stateStartTimeSeconds=this._userTimeSeconds),n=0;break;case Co.EyeState_Opening:r=(this._userTimeSeconds-this._stateStartTimeSeconds)/this._openingSeconds,r>=1&&(r=1,this._blinkingState=Co.EyeState_Interval,this._nextBlinkingTime=this.determinNextBlinkingTiming()),n=r;break;case Co.EyeState_Interval:this._nextBlinkingTime(e[e.EyeState_First=0]=`EyeState_First`,e[e.EyeState_Interval=1]=`EyeState_Interval`,e[e.EyeState_Closing=2]=`EyeState_Closing`,e[e.EyeState_Closed=3]=`EyeState_Closed`,e[e.EyeState_Opening=4]=`EyeState_Opening`,e))(Co||{});const wo=.001,To=.5;var Eo=class e{static create(t){let n=new e;typeof t.FadeInTime==`number`&&(n._fadeTimeSeconds=t.FadeInTime,n._fadeTimeSeconds<=0&&(n._fadeTimeSeconds=To));let r=t.Groups,i=r.length;for(let e=0;ewo){if(i>=0)break;i=o,a=e.getPartOpacityByIndex(n),a+=t/this._fadeTimeSeconds,a>1&&(a=1)}}i<0&&(i=0,a=1);for(let t=n;ts&&(r=1-s/(1-a)),t>r&&(t=r),e.setPartOpacityByIndex(n,t)}}}constructor(){this._fadeTimeSeconds=To,this._lastModel=void 0,this._partGroups=[],this._partGroupCounts=[]}},Do=class e{constructor(e){this.parameterIndex=0,this.partIndex=0,this.partId=``,this.link=[],e!=null&&this.assignment(e)}assignment(e){return this.partId=e.partId,this.link=e.link.map(e=>e.clone()),this}initialize(e){this.parameterIndex=e.getParameterIndex(this.partId),this.partIndex=e.getPartIndex(this.partId),e.setParameterValueByIndex(this.parameterIndex,1)}clone(){let t=new e;return t.partId=this.partId,t.parameterIndex=this.parameterIndex,t.partIndex=this.partIndex,t.link=this.link.map(e=>e.clone()),t}},Oo=class e{constructor(e,t){this.x=e||0,this.y=t||0}add(t){let n=new e(0,0);return n.x=this.x+t.x,n.y=this.y+t.y,n}substract(t){let n=new e(0,0);return n.x=this.x-t.x,n.y=this.y-t.y,n}multiply(t){let n=new e(0,0);return n.x=this.x*t.x,n.y=this.y*t.y,n}multiplyByScaler(t){return this.multiply(new e(t,t))}division(t){let n=new e(0,0);return n.x=this.x/t.x,n.y=this.y/t.y,n}divisionByScalar(t){return this.division(new e(t,t))}getLength(){return Math.sqrt(this.x*this.x+this.y*this.y)}getDistanceWith(e){return Math.sqrt((this.x-e.x)*(this.x-e.x)+(this.y-e.y)*(this.y-e.y))}dot(e){return this.x*e.x+this.y*e.y}normalize(){let e=(this.x*this.x+this.y*this.y)**.5;this.x/=e,this.y/=e}isEqual(e){return this.x==e.x&&this.y==e.y}isNotEqual(e){return!this.isEqual(e)}};const ko=class{static range(e,t,n){return en&&(e=n),e}static sin(e){return Math.sin(e)}static cos(e){return Math.cos(e)}static abs(e){return Math.abs(e)}static sqrt(e){return Math.sqrt(e)}static cbrt(e){if(e===0)return e;let t=e,n=t<0;n&&(t=-t);let r;return t===1/0?r=1/0:(r=Math.exp(Math.log(t)/3),r=(t/(r*r)+2*r)/3),n?-r:r}static getEasingSine(e){return e<0?0:e>1?1:.5-.5*this.cos(e*Math.PI)}static max(e,t){return e>t?e:t}static min(e,t){return e>t?t:e}static degreesToRadian(e){return e/180*Math.PI}static radianToDegrees(e){return e*180/Math.PI}static directionToRadian(e,t){let n=Math.atan2(t.y,t.x),r=Math.atan2(e.y,e.x),i=n-r;for(;i<-Math.PI;)i+=Math.PI*2;for(;i>Math.PI;)i-=Math.PI*2;return i}static directionToDegrees(e,t){let n=this.directionToRadian(e,t),r=this.radianToDegrees(n);return t.x-e.x>0&&(r=-r),r}static radianToDirection(e){let t=new Oo;return t.x=this.sin(e),t.y=this.cos(e),t}static quadraticEquation(e,t,n){return this.abs(e)1&&(e=1),t<0?t=0:t>1&&(t=1),n<0?n=0:n>1&&(n=1),r<0?r=0:r>1&&(r=1),this._modelColor.R=e,this._modelColor.G=t,this._modelColor.B=n,this._modelColor.A=r}getModelColor(){return Object.assign({},this._modelColor)}setIsPremultipliedAlpha(e){this._isPremultipliedAlpha=e}isPremultipliedAlpha(){return this._isPremultipliedAlpha}setIsCulling(e){this._isCulling=e}isCulling(){return this._isCulling}setAnisotropy(e){this._anisortopy=e}getAnisotropy(){return this._anisortopy}getModel(){return this._model}constructor(){this._isCulling=!1,this._isPremultipliedAlpha=!1,this._anisortopy=0,this._modelColor=new Po,this._mvpMatrix4x4=new jo,this._mvpMatrix4x4.loadIdentity()}},No=(e=>(e[e.CubismBlendMode_Normal=0]=`CubismBlendMode_Normal`,e[e.CubismBlendMode_Additive=1]=`CubismBlendMode_Additive`,e[e.CubismBlendMode_Multiplicative=2]=`CubismBlendMode_Multiplicative`,e))(No||{}),Po=class{constructor(){this.R=1,this.G=1,this.B=1,this.A=1}};let Fo=!1,Io=!1,Lo;const Ro={vertexOffset:0,vertexStep:2};var zo=class{static startUp(e){if(Fo)return Ho(`CubismFramework.startUp() is already done.`),Fo;if(Live2DCubismCore._isStarted)return Fo=!0,!0;if(Live2DCubismCore._isStarted=!0,Lo=e,Lo&&Live2DCubismCore.Logging.csmSetLogFunction(Lo.logFunction),Fo=!0,Fo){let e=Live2DCubismCore.Version.csmGetVersion(),t=(e&4278190080)>>24,n=(e&16711680)>>16,r=e&65535,i=e;Ho(`Live2D Cubism Core version: {0}.{1}.{2} ({3})`,(`00`+t).slice(-2),(`00`+n).slice(-2),(`0000`+r).slice(-4),i)}return Ho(`CubismFramework.startUp() is complete.`),Fo}static cleanUp(){Fo=!1,Io=!1,Lo=void 0}static initialize(){if(!Fo){Uo(`CubismFramework is not started.`);return}if(Io){Uo(`CubismFramework.initialize() skipped, already initialized.`);return}Io=!0,Ho(`CubismFramework.initialize() is complete.`)}static dispose(){if(!Fo){Uo(`CubismFramework is not started.`);return}if(!Io){Uo(`CubismFramework.dispose() skipped, not initialized.`);return}Mo.staticRelease(),Io=!1,Ho(`CubismFramework.dispose() is complete.`)}static isStarted(){return Fo}static isInitialized(){return Io}static coreLogFunction(e){Live2DCubismCore.Logging.csmGetLogFunction()&&Live2DCubismCore.Logging.csmGetLogFunction()(e)}static getLoggingLevel(){return Lo==null?Bo.LogLevel_Off:Lo.loggingLevel}constructor(){}},Bo=(e=>(e[e.LogLevel_Verbose=0]=`LogLevel_Verbose`,e[e.LogLevel_Debug=1]=`LogLevel_Debug`,e[e.LogLevel_Info=2]=`LogLevel_Info`,e[e.LogLevel_Warning=3]=`LogLevel_Warning`,e[e.LogLevel_Error=4]=`LogLevel_Error`,e[e.LogLevel_Off=5]=`LogLevel_Off`,e))(Bo||{});function Vo(e,...t){Go.print(Bo.LogLevel_Debug,`[CSM][D]`+e+` +`,t)}function Ho(e,...t){Go.print(Bo.LogLevel_Info,`[CSM][I]`+e+` +`,t)}function Uo(e,...t){Go.print(Bo.LogLevel_Warning,`[CSM][W]`+e+` +`,t)}function Wo(e,...t){Go.print(Bo.LogLevel_Error,`[CSM][E]`+e+` +`,t)}var Go=class{static print(e,t,n){if(en[t]);r(i)}static dumpBytes(e,t,n){for(let r=0;r0?this.print(e,` `):r%8==0&&r>0&&this.print(e,` `),this.print(e,`{0} `,[t[r]&255]);this.print(e,` -`)}constructor(){}},qo=class{update(){this._model.update(),this._model.drawables.resetDynamicFlags()}getCanvasWidth(){return this._model==null?0:this._model.canvasinfo.CanvasWidth/this._model.canvasinfo.PixelsPerUnit}getCanvasHeight(){return this._model==null?0:this._model.canvasinfo.CanvasHeight/this._model.canvasinfo.PixelsPerUnit}saveParameters(){let e=this._model.parameters.count,t=this._savedParameters.length;for(let n=0;nt&&(t=this._model.parameters.minimumValues[e]),this._parameterValues[e]=n==1?t:this._parameterValues[e]=this._parameterValues[e]*(1-n)+t*n}setParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.setParameterValueByIndex(r,t,n)}addParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)+t*n)}addParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.addParameterValueByIndex(r,t,n)}multiplyParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.multiplyParameterValueByIndex(r,t,n)}multiplyParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)*(1+(t-1)*n))}getDrawableIds(){return this._drawableIds.slice()}getDrawableIndex(e){let t=this._model.drawables.count;for(let n=0;nt&&(e=t);for(let t=0;t0&&t.getEndTime()(e[e.ExpressionBlendType_Add=0]=`ExpressionBlendType_Add`,e[e.ExpressionBlendType_Multiply=1]=`ExpressionBlendType_Multiply`,e[e.ExpressionBlendType_Overwrite=2]=`ExpressionBlendType_Overwrite`,e))(Qo||{}),$o;(e=>{e.supportMoreMaskDivisions=!0,e.setOpacityFromMotion=!1})($o||={});var es=(e=>(e[e.CubismMotionCurveTarget_Model=0]=`CubismMotionCurveTarget_Model`,e[e.CubismMotionCurveTarget_Parameter=1]=`CubismMotionCurveTarget_Parameter`,e[e.CubismMotionCurveTarget_PartOpacity=2]=`CubismMotionCurveTarget_PartOpacity`,e))(es||{}),ts=(e=>(e[e.CubismMotionSegmentType_Linear=0]=`CubismMotionSegmentType_Linear`,e[e.CubismMotionSegmentType_Bezier=1]=`CubismMotionSegmentType_Bezier`,e[e.CubismMotionSegmentType_Stepped=2]=`CubismMotionSegmentType_Stepped`,e[e.CubismMotionSegmentType_InverseStepped=3]=`CubismMotionSegmentType_InverseStepped`,e))(ts||{}),ns=class{constructor(e=0,t=0){this.time=e,this.value=t}},rs=class{constructor(){this.basePointIndex=0,this.segmentType=0}},os=class{constructor(){this.id=``,this.type=0,this.segmentCount=0,this.baseSegmentIndex=0,this.fadeInTime=0,this.fadeOutTime=0}},ss=class{constructor(){this.fireTime=0,this.value=``}},cs=class{constructor(){this.duration=0,this.loop=!1,this.curveCount=0,this.eventCount=0,this.fps=0,this.curves=[],this.segments=[],this.points=[],this.events=[]}},ls=class{constructor(e){this._json=e}release(){this._json=void 0}getMotionDuration(){return this._json.Meta.Duration}isMotionLoop(){return this._json.Meta.Loop||!1}getEvaluationOptionFlag(e){return us.EvaluationOptionFlag_AreBeziersRistricted==e?!!this._json.Meta.AreBeziersRestricted:!1}getMotionCurveCount(){return this._json.Meta.CurveCount}getMotionFps(){return this._json.Meta.Fps}getMotionTotalSegmentCount(){return this._json.Meta.TotalSegmentCount}getMotionTotalPointCount(){return this._json.Meta.TotalPointCount}getMotionFadeInTime(){return this._json.Meta.FadeInTime}getMotionFadeOutTime(){return this._json.Meta.FadeOutTime}getMotionCurveTarget(e){return this._json.Curves[e].Target}getMotionCurveId(e){return this._json.Curves[e].Id}getMotionCurveFadeInTime(e){return this._json.Curves[e].FadeInTime}getMotionCurveFadeOutTime(e){return this._json.Curves[e].FadeOutTime}getMotionCurveSegmentCount(e){return this._json.Curves[e].Segments.length}getMotionCurveSegment(e,t){return this._json.Curves[e].Segments[t]}getEventCount(){return this._json.Meta.UserDataCount||0}getTotalEventValueSize(){return this._json.Meta.TotalUserDataSize}getEventTime(e){return this._json.UserData[e].Time}getEventValue(e){return this._json.UserData[e].Value}},us=(e=>(e[e.EvaluationOptionFlag_AreBeziersRistricted=0]=`EvaluationOptionFlag_AreBeziersRistricted`,e))(us||{});const ds=`EyeBlink`,fs=`LipSync`,ps=`Model`,ms=`Parameter`,hs=`PartOpacity`;function gs(e,t,n){let r=new ns;return r.time=e.time+(t.time-e.time)*n,r.value=e.value+(t.value-e.value)*n,r}function _s(e,t){let n=(t-e[0].time)/(e[1].time-e[0].time);return n<0&&(n=0),e[0].value+(e[1].value-e[0].value)*n}function vs(e,t){let n=(t-e[0].time)/(e[3].time-e[0].time);n<0&&(n=0);let r=gs(e[0],e[1],n),i=gs(e[1],e[2],n),a=gs(e[2],e[3],n),o=gs(r,i,n),s=gs(i,a,n);return gs(o,s,n).value}function ys(e,t){let n=t,r=e[0].time,i=e[3].time,a=e[1].time,o=e[2].time,s=i-3*o+3*a-r,c=3*o-6*a+3*r,l=3*a-3*r,u=r-n,d=jo.cardanoAlgorithmForBezier(s,c,l,u),f=gs(e[0],e[1],d),p=gs(e[1],e[2],d),m=gs(e[2],e[3],d),h=gs(f,p,d),g=gs(p,m,d);return gs(h,g,d).value}function bs(e,t){return e[0].value}function xs(e,t){return e[1].value}function Ss(e,t,n){let r=e.curves[t],i=-1,a=r.baseSegmentIndex+r.segmentCount,o=0;for(let t=r.baseSegmentIndex;tn){i=t;break}if(i==-1)return e.points[o].value;let s=e.segments[i];return s.evaluate(e.points.slice(s.basePointIndex),n)}var Cs=class e extends Yo{constructor(){super(),this._eyeBlinkParameterIds=[],this._lipSyncParameterIds=[],this._sourceFrameRate=30,this._loopDurationSeconds=-1,this._isLoop=!1,this._isLoopFadeIn=!0,this._lastWeight=0}static create(t,n){let r=new e;return r.parse(t),r._sourceFrameRate=r._motionData.fps,r._loopDurationSeconds=r._motionData.duration,r._onFinishedMotion=n,r}doUpdateParameters(e,t,n,r){this._modelCurveIdEyeBlink??=ds,this._modelCurveIdLipSync??=fs;let i=t-r.getStartTime();i<0&&(i=0);let a=Number.MAX_VALUE,o=Number.MAX_VALUE,s=64,c=0,l=0;this._eyeBlinkParameterIds.length>s&&Ho(`too many eye blink targets : {0}`,this._eyeBlinkParameterIds.length),this._lipSyncParameterIds.length>s&&Ho(`too many lip sync targets : {0}`,this._lipSyncParameterIds.length);let u=this._fadeInSeconds<=0?1:jo.getEasingSine((t-r.getFadeInStartTime())/this._fadeInSeconds),d=this._fadeOutSeconds<=0||r.getEndTime()<0?1:jo.getEasingSine((r.getEndTime()-t)/this._fadeOutSeconds),f,p,m,h=i;if(this._isLoop)for(;h>this._motionData.duration;)h-=this._motionData.duration;let g=this._motionData.curves;for(p=0;p>t&1)continue;let i=r+(o-r)*n;e.setParameterValueById(this._eyeBlinkParameterIds[t],i)}if(a!=Number.MAX_VALUE)for(let t=0;t>t&1)continue;let i=r+(a-r)*n;e.setParameterValueById(this._lipSyncParameterIds[t],i)}for(;p=this._motionData.duration&&(this._isLoop?(r.setStartTime(t),this._isLoopFadeIn&&r.setFadeInStartTime(t)):(this._onFinishedMotion&&this._onFinishedMotion(this),r.setIsFinished(!0))),this._lastWeight=n}setIsLoop(e){this._isLoop=e}isLoop(){return this._isLoop}setIsLoopFadeIn(e){this._isLoopFadeIn=e}isLoopFadeIn(){return this._isLoopFadeIn}getDuration(){return this._isLoop?-1:this._loopDurationSeconds}getLoopDuration(){return this._loopDurationSeconds}setParameterFadeInTime(e,t){let n=this._motionData.curves;for(let r=0;rnew os),this._motionData.segments=Array.from({length:t.getMotionTotalSegmentCount()}).map(()=>new rs),this._motionData.events=Array.from({length:this._motionData.eventCount}).map(()=>new ss),this._motionData.points=[];let a=0,o=0;for(let e=0;ee&&this._motionData.events[n].fireTime<=t&&this._firedEventValues.push(this._motionData.events[n].value);return this._firedEventValues}},ws=class{constructor(){this._autoDelete=!1,this._available=!0,this._finished=!1,this._started=!1,this._startTimeSeconds=-1,this._fadeInStartTimeSeconds=0,this._endTimeSeconds=-1,this._stateTimeSeconds=0,this._stateWeight=0,this._lastEventCheckSeconds=0,this._motionQueueEntryHandle=this,this._fadeOutSeconds=0,this._isTriggeredFadeOut=!1}release(){this._autoDelete&&this._motion&&this._motion.release()}setFadeOut(e){this._fadeOutSeconds=e,this._isTriggeredFadeOut=!0}startFadeOut(e,t){let n=t+e;this._isTriggeredFadeOut=!0,(this._endTimeSeconds<0||nt!=null&&t._motionQueueEntryHandle==e)}setEventCallback(e,t=null){this._eventCallBack=e,this._eventCustomData=t}doUpdateMotion(e,t){let n=!1,r=0;for(;r(e[e.CubismPhysicsTargetType_Parameter=0]=`CubismPhysicsTargetType_Parameter`,e))(Ds||{}),Os=(e=>(e[e.CubismPhysicsSource_X=0]=`CubismPhysicsSource_X`,e[e.CubismPhysicsSource_Y=1]=`CubismPhysicsSource_Y`,e[e.CubismPhysicsSource_Angle=2]=`CubismPhysicsSource_Angle`,e))(Os||{}),ks=class{constructor(){this.initialPosition=new ko(0,0),this.position=new ko(0,0),this.lastPosition=new ko(0,0),this.lastGravity=new ko(0,0),this.force=new ko(0,0),this.velocity=new ko(0,0)}},As=class{constructor(){this.normalizationPosition={},this.normalizationAngle={}}},js=class{constructor(){this.source={}}},Ms=class{constructor(){this.destination={},this.translationScale=new ko(0,0)}},Ns=class{constructor(){this.settings=[],this.inputs=[],this.outputs=[],this.particles=[],this.gravity=new ko(0,0),this.wind=new ko(0,0)}},Ps=class{constructor(e){this._json=e}release(){this._json=void 0}getGravity(){let e=new ko(0,0);return e.x=this._json.Meta.EffectiveForces.Gravity.X,e.y=this._json.Meta.EffectiveForces.Gravity.Y,e}getWind(){let e=new ko(0,0);return e.x=this._json.Meta.EffectiveForces.Wind.X,e.y=this._json.Meta.EffectiveForces.Wind.Y,e}getSubRigCount(){return this._json.Meta.PhysicsSettingCount}getTotalInputCount(){return this._json.Meta.TotalInputCount}getTotalOutputCount(){return this._json.Meta.TotalOutputCount}getVertexCount(){return this._json.Meta.VertexCount}getNormalizationPositionMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Minimum}getNormalizationPositionMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Maximum}getNormalizationPositionDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Default}getNormalizationAngleMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Minimum}getNormalizationAngleMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Maximum}getNormalizationAngleDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Default}getInputCount(e){return this._json.PhysicsSettings[e].Input.length}getInputWeight(e,t){return this._json.PhysicsSettings[e].Input[t].Weight}getInputReflect(e,t){return this._json.PhysicsSettings[e].Input[t].Reflect}getInputType(e,t){return this._json.PhysicsSettings[e].Input[t].Type}getInputSourceId(e,t){return this._json.PhysicsSettings[e].Input[t].Source.Id}getOutputCount(e){return this._json.PhysicsSettings[e].Output.length}getOutputVertexIndex(e,t){return this._json.PhysicsSettings[e].Output[t].VertexIndex}getOutputAngleScale(e,t){return this._json.PhysicsSettings[e].Output[t].Scale}getOutputWeight(e,t){return this._json.PhysicsSettings[e].Output[t].Weight}getOutputDestinationId(e,t){return this._json.PhysicsSettings[e].Output[t].Destination.Id}getOutputType(e,t){return this._json.PhysicsSettings[e].Output[t].Type}getOutputReflect(e,t){return this._json.PhysicsSettings[e].Output[t].Reflect}getParticleCount(e){return this._json.PhysicsSettings[e].Vertices.length}getParticleMobility(e,t){return this._json.PhysicsSettings[e].Vertices[t].Mobility}getParticleDelay(e,t){return this._json.PhysicsSettings[e].Vertices[t].Delay}getParticleAcceleration(e,t){return this._json.PhysicsSettings[e].Vertices[t].Acceleration}getParticleRadius(e,t){return this._json.PhysicsSettings[e].Vertices[t].Radius}getParticlePosition(e,t){let n=new ko(0,0);return n.x=this._json.PhysicsSettings[e].Vertices[t].Position.X,n.y=this._json.PhysicsSettings[e].Vertices[t].Position.Y,n}};const Fs=`X`,Is=`Y`,Ls=`Angle`,Rs=5,zs=100,Bs=.001;var Vs=class e{static create(t){let n=new e;return n.parse(t),n._physicsRig.gravity.y=0,n}evaluate(e,t){let n,r,i,a,o=new ko,s,c,l,u,d,f,p,m;d=e.getModel().parameters.values,f=e.getModel().parameters.maximumValues,p=e.getModel().parameters.minimumValues,m=e.getModel().parameters.defaultValues;for(let h=0;h=s.particleCount)break;l[t].destinationParameterIndex==-1&&(l[t].destinationParameterIndex=e.getParameterIndex(l[t].destination.id));let r=new ko;r.x=u[n].position.x-u[n-1].position.x,r.y=u[n].position.y-u[n-1].position.y,a=l[t].getValue(r,u,n,l[t].reflect,this._options.gravity);let i=l[t].destinationParameterIndex,o=!Float32Array.prototype.slice&&`subarray`in Float32Array.prototype?JSON.parse(JSON.stringify(d.subarray(i))):d.slice(i);tc(o,p[i],f[i],a,l[t]);for(let e=i,t=0;e=2?t[n-1].position.substract(t[n-2].position):i.multiplyByScaler(-1),a=jo.directionToRadian(i,e),r&&(a*=-1),a}function Ys(e,t){return Math.abs(Math.max(e,t)-Math.min(e,t))}function Xs(e,t){let n=Math.min(e,t);return n+Ys(e,t)/2}function Zs(e,t){return e.x}function Qs(e,t){return e.y}function $s(e,t){return t}function ec(e,t,n,r,i,a,o,s){let c,l,u,d,f=new ko(0,0),p=new ko(0,0),m=new ko(0,0),h=new ko(0,0);e[0].position=new ko(n.x,n.y),c=jo.degreesToRadian(r),d=jo.radianToDirection(c),d.normalize();for(let n=1;nn&&(o>i.valueExceededMaximum&&(i.valueExceededMaximum=o),o=n),s=i.weight/zs,s>=1||(o=e[0]*(1-s)+o*s),e[0]=o}function nc(e,t,n,r,i,a,o,s){let c=0,l=jo.max(n,t);le&&(e=u);let d=jo.min(i,a),f=jo.max(i,a),p=o,m=Xs(u,l),h=e-m;switch(Math.sign(h)){case 1:{let e=f-p,t=l-m;t!=0&&(c=h*(e/t),c+=p);break}case-1:{let e=d-p,t=u-m;t!=0&&(c=h*(e/t),c+=p);break}case 0:c=p;break}return s?c:c*-1}var rc=class{constructor(e=0,t=0,n=0,r=0){this.x=e,this.y=t,this.width=n,this.height=r}getCenterX(){return this.x+.5*this.width}getCenterY(){return this.y+.5*this.height}getRight(){return this.x+this.width}getBottom(){return this.y+this.height}setRect(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height}expand(e,t){this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2}};const ic=4,ac=10;let oc,sc,cc;var lc=class{getChannelFlagAsColor(e){return this._channelColors[e]}getMaskRenderTexture(){let e=0;if(this._maskTexture&&this._maskTexture.texture!=0&&(this._maskTexture.frameNo=this._currentFrameNo,e=this._maskTexture.texture),e==0){let t=this._clippingMaskBufferSize;this._colorBuffer=this.gl.createTexture(),this.gl.bindTexture(this.gl.TEXTURE_2D,this._colorBuffer),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,t,t,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.bindTexture(this.gl.TEXTURE_2D,null),e=this.gl.createFramebuffer(),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e),this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,this._colorBuffer,0),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,cc),this._maskTexture=new uc(this._currentFrameNo,e)}return e}setGL(e){this.gl=e}calcClippedDrawTotalBounds(e,t){let n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,o=t._clippedDrawableIndexList.length;for(let s=0;sf&&(f=t),np&&(p=n)}if(u!=Number.MAX_VALUE)if(ui&&(i=f),p>a&&(a=p),n==Number.MAX_VALUE)t._allClippedDrawRect.x=0,t._allClippedDrawRect.y=0,t._allClippedDrawRect.width=0,t._allClippedDrawRect.height=0,t._isUsing=!1;else{t._isUsing=!0;let e=i-n,o=a-r;t._allClippedDrawRect.x=n,t._allClippedDrawRect.y=r,t._allClippedDrawRect.width=e,t._allClippedDrawRect.height=o}}}constructor(){this._maskRenderTexture=null,this._colorBuffer=null,this._currentFrameNo=0,this._clippingMaskBufferSize=256,this._clippingContextListForMask=[],this._clippingContextListForDraw=[],this._channelColors=[],this._tmpBoundsOnModel=new rc,this._tmpMatrix=new Mo,this._tmpMatrixForMask=new Mo,this._tmpMatrixForDraw=new Mo;let e=new Fo;e.R=1,e.G=0,e.B=0,e.A=0,this._channelColors.push(e),e=new Fo,e.R=0,e.G=1,e.B=0,e.A=0,this._channelColors.push(e),e=new Fo,e.R=0,e.G=0,e.B=1,e.A=0,this._channelColors.push(e),e=new Fo,e.R=0,e.G=0,e.B=0,e.A=1,this._channelColors.push(e)}release(){var e,t,n;let r=this;for(let t=0;t0){this.gl.viewport(0,0,this._clippingMaskBufferSize,this._clippingMaskBufferSize),this._maskRenderTexture=this.getMaskRenderTexture(),t.getMvpMatrix(),t.preDraw(),this.setupLayoutBounds(n),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this._maskRenderTexture),this.gl.clearColor(1,1,1,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT);for(let n=0;n(e[e.ShaderNames_SetupMask=0]=`ShaderNames_SetupMask`,e[e.ShaderNames_NormalPremultipliedAlpha=1]=`ShaderNames_NormalPremultipliedAlpha`,e[e.ShaderNames_NormalMaskedPremultipliedAlpha=2]=`ShaderNames_NormalMaskedPremultipliedAlpha`,e[e.ShaderNames_NomralMaskedInvertedPremultipliedAlpha=3]=`ShaderNames_NomralMaskedInvertedPremultipliedAlpha`,e[e.ShaderNames_AddPremultipliedAlpha=4]=`ShaderNames_AddPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlpha=5]=`ShaderNames_AddMaskedPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlphaInverted=6]=`ShaderNames_AddMaskedPremultipliedAlphaInverted`,e[e.ShaderNames_MultPremultipliedAlpha=7]=`ShaderNames_MultPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlpha=8]=`ShaderNames_MultMaskedPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlphaInverted=9]=`ShaderNames_MultMaskedPremultipliedAlphaInverted`,e))(pc||{});const mc=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_myPos;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_clipMatrix * a_position; v_myPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,hc=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_myPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;void main(){ float isInside = step(u_baseColor.x, v_myPos.x/v_myPos.w) * step(u_baseColor.y, v_myPos.y/v_myPos.w) * step(v_myPos.x/v_myPos.w, u_baseColor.z) * step(v_myPos.y/v_myPos.w, u_baseColor.w); gl_FragColor = u_channelFlag * texture2D(s_texture0, v_texCoord).a * isInside;}`,gc=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;uniform mat4 u_matrix;void main(){ gl_Position = u_matrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,_c=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform mat4 u_matrix;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_matrix * a_position; v_clipPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,vc=`precision mediump float;varying vec2 v_texCoord;uniform vec4 u_baseColor;uniform sampler2D s_texture0;void main(){ gl_FragColor = texture2D(s_texture0 , v_texCoord) * u_baseColor;}`,yc=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;uniform sampler2D s_texture1;void main(){ vec4 col_formask = texture2D(s_texture0 , v_texCoord) * u_baseColor; vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}`,bc=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;void main(){vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor;vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag;float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a;col_formask = col_formask * (1.0 - maskVal);gl_FragColor = col_formask;}`;var xc=class extends No{constructor(){super(),this._clippingContextBufferForMask=null,this._clippingContextBufferForDraw=null,this._clippingManager=new lc,this.firstDraw=!0,this._textures={},this._sortedDrawableIndexList=[],this._bufferData={vertex:null,uv:null,index:null}}initialize(e){e.isUsingMasking()&&(this._clippingManager=new lc,this._clippingManager.initialize(e,e.getDrawableCount(),e.getDrawableMasks(),e.getDrawableMaskCounts()));for(let t=e.getDrawableCount()-1;t>=0;t--)this._sortedDrawableIndexList[t]=0;super.initialize(e)}bindTexture(e,t){this._textures[e]=t}getBindedTextures(){return this._textures}setClippingMaskBufferSize(e){this._clippingManager.release(),this._clippingManager=new lc,this._clippingManager.setClippingMaskBufferSize(e),this._clippingManager.initialize(this.getModel(),this.getModel().getDrawableCount(),this.getModel().getDrawableMasks(),this.getModel().getDrawableMaskCounts())}getClippingMaskBufferSize(){return this._clippingManager.getClippingMaskBufferSize()}release(){var e,t,n;let r=this;this._clippingManager.release(),r._clippingManager=void 0,(e=this.gl)==null||e.deleteBuffer(this._bufferData.vertex),this._bufferData.vertex=null,(t=this.gl)==null||t.deleteBuffer(this._bufferData.uv),this._bufferData.uv=null,(n=this.gl)==null||n.deleteBuffer(this._bufferData.index),this._bufferData.index=null,r._bufferData=void 0,r._textures=void 0}doDrawModel(){this.preDraw(),this._clippingManager!=null&&this._clippingManager.setupClippingContext(this.getModel(),this);let e=this.getModel().getDrawableCount(),t=this.getModel().getDrawableRenderOrders();for(let n=0;n{xc.doStaticRelease()};var Sc=class{constructor(e){this.groups=e.Groups,this.hitAreas=e.HitAreas,this.layout=e.Layout,this.moc=e.FileReferences.Moc,this.expressions=e.FileReferences.Expressions,this.motions=e.FileReferences.Motions,this.textures=e.FileReferences.Textures,this.physics=e.FileReferences.Physics,this.pose=e.FileReferences.Pose}getEyeBlinkParameters(){var e,t;return(t=(e=this.groups)?.find(e=>e.Name===`EyeBlink`))?.Ids}getLipSyncParameters(){var e,t;return(t=(e=this.groups)?.find(e=>e.Name===`LipSync`))?.Ids}};const Cc=`ParamAngleX`,wc=`ParamAngleY`,Tc=`ParamAngleZ`,Ec=`ParamEyeBallX`,Dc=`ParamEyeBallY`,Oc=`ParamBodyAngleX`,kc=`ParamBreath`,Ac=2,jc=2;var Mc;(e=>{e.LOG_LEVEL_VERBOSE=0,e.LOG_LEVEL_WARNING=1,e.LOG_LEVEL_ERROR=2,e.LOG_LEVEL_NONE=999,e.logLevel=e.LOG_LEVEL_WARNING,e.sound=!0,e.motionSync=!0,e.motionFadingDuration=500,e.idleMotionFadingDuration=2e3,e.expressionFadingDuration=500,e.preserveExpressionOnMotion=!0,e.cubism4=$o})(Mc||={});const Nc={log(e,...t){Mc.logLevel<=Mc.LOG_LEVEL_VERBOSE&&console.log(`[${e}]`,...t)},warn(e,...t){Mc.logLevel<=Mc.LOG_LEVEL_WARNING&&console.warn(`[${e}]`,...t)},error(e,...t){Mc.logLevel<=Mc.LOG_LEVEL_ERROR&&console.error(`[${e}]`,...t)}};function Pc(e,t,n){return en?n:e}function Fc(e,t){t.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(n=>{n!==`constructor`&&Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})})}function Ic(e){let t=e.lastIndexOf(`/`);return t!=-1&&(e=e.slice(0,t)),t=e.lastIndexOf(`/`),t!==-1&&(e=e.slice(t+1)),e}function Lc(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}var Rc=class extends Yt.default{constructor(e,t){super(),this.expressions=[],this.reserveExpressionIndex=-1,this.destroyed=!1,this.settings=e,this.tag=`ExpressionManager(${e.name})`}init(){this.defaultExpression=this.createExpression({},void 0),this.currentExpression=this.defaultExpression,this.stopAllExpressions()}loadExpression(e){return yo(this,null,function*(){if(!this.definitions[e]){Nc.warn(this.tag,`Undefined expression at [${e}]`);return}if(this.expressions[e]===null){Nc.warn(this.tag,`Cannot set expression at [${e}] because it's already failed in loading.`);return}if(this.expressions[e])return this.expressions[e];let t=yield this._loadExpression(e);return this.expressions[e]=t,t})}_loadExpression(e){throw Error(`Not implemented.`)}setRandomExpression(){return yo(this,null,function*(){if(this.definitions.length){let e=[];for(let t=0;t-1&&ec&&(a*=c/s,o*=c/s),this.vx+=a,this.vy+=o;let l=Math.sqrt(vo(this.vx,2)+vo(this.vy,2)),u=.5*(Math.sqrt(vo(c,2)+8*c*r)-c);l>u&&(this.vx*=u/l,this.vy*=u/l),this.x+=this.vx,this.y+=this.vy}},Uc=class{constructor(e){this.json=e;let t=e.url;if(typeof t!=`string`)throw TypeError("The `url` field in settings JSON must be defined as a string.");this.url=t,this.name=Ic(this.url)}resolveURL(e){return Zt.resolve(this.url,e)}replaceFiles(e){this.moc=e(this.moc,`moc`),this.pose!==void 0&&(this.pose=e(this.pose,`pose`)),this.physics!==void 0&&(this.physics=e(this.physics,`physics`));for(let t=0;t(e.push(t),t)),e}validateFiles(e){let t=(t,n)=>{let r=this.resolveURL(t);if(!e.includes(r)){if(n)throw Error(`File "${t}" is defined in settings, but doesn't exist in given files`);return!1}return!0},n=[this.moc,...this.textures];n.forEach(e=>t(e,!0));let r=this.getDefinedFiles();return r.filter(e=>t(e,!1))}},Wc=(e=>(e[e.NONE=0]=`NONE`,e[e.IDLE=1]=`IDLE`,e[e.NORMAL=2]=`NORMAL`,e[e.FORCE=3]=`FORCE`,e))(Wc||{}),Gc=class{constructor(){this.debug=!1,this.currentPriority=0,this.reservePriority=0}reserve(e,t,n){if(n<=0)return Nc.log(this.tag,`Cannot start a motion with MotionPriority.NONE.`),!1;if(e===this.currentGroup&&t===this.currentIndex)return Nc.log(this.tag,`Motion is already playing.`,this.dump(e,t)),!1;if(e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex)return Nc.log(this.tag,`Motion is already reserved.`,this.dump(e,t)),!1;if(n===1){if(this.currentPriority!==0)return Nc.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(e,t)),!1;if(this.reservedIdleGroup!==void 0)return Nc.log(this.tag,`Cannot start idle motion because another idle motion has reserved.`,this.dump(e,t)),!1;this.setReservedIdle(e,t)}else{if(n<3){if(n<=this.currentPriority)return Nc.log(this.tag,`Cannot start motion because another motion is playing as an equivalent or higher priority.`,this.dump(e,t)),!1;if(n<=this.reservePriority)return Nc.log(this.tag,`Cannot start motion because another motion has reserved as an equivalent or higher priority.`,this.dump(e,t)),!1}this.setReserved(e,t,n)}return!0}start(e,t,n,r){if(r===1){if(this.setReservedIdle(void 0,void 0),this.currentPriority!==0)return Nc.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(t,n)),!1}else{if(t!==this.reservedGroup||n!==this.reservedIndex)return Nc.log(this.tag,`Cannot start motion because another motion has taken the place.`,this.dump(t,n)),!1;this.setReserved(void 0,void 0,0)}return e?(this.setCurrent(t,n,r),!0):!1}complete(){this.setCurrent(void 0,void 0,0)}setCurrent(e,t,n){this.currentPriority=n,this.currentGroup=e,this.currentIndex=t}setReserved(e,t,n){this.reservePriority=n,this.reservedGroup=e,this.reservedIndex=t}setReservedIdle(e,t){this.reservedIdleGroup=e,this.reservedIdleIndex=t}isActive(e,t){return e===this.currentGroup&&t===this.currentIndex||e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex}reset(){this.setCurrent(void 0,void 0,0),this.setReserved(void 0,void 0,0),this.setReservedIdle(void 0,void 0)}shouldRequestIdleMotion(){return this.currentGroup===void 0&&this.reservedIdleGroup===void 0}shouldOverrideExpression(){return!Mc.preserveExpressionOnMotion&&this.currentPriority>1}dump(e,t){if(this.debug){let n=[`currentPriority`,`reservePriority`,`currentGroup`,`currentIndex`,`reservedGroup`,`reservedIndex`,`reservedIdleGroup`,`reservedIdleIndex`];return` +`)}constructor(){}},Ko=class{update(){this._model.update(),this._model.drawables.resetDynamicFlags()}getCanvasWidth(){return this._model==null?0:this._model.canvasinfo.CanvasWidth/this._model.canvasinfo.PixelsPerUnit}getCanvasHeight(){return this._model==null?0:this._model.canvasinfo.CanvasHeight/this._model.canvasinfo.PixelsPerUnit}saveParameters(){let e=this._model.parameters.count,t=this._savedParameters.length;for(let n=0;nt&&(t=this._model.parameters.minimumValues[e]),this._parameterValues[e]=n==1?t:this._parameterValues[e]=this._parameterValues[e]*(1-n)+t*n}setParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.setParameterValueByIndex(r,t,n)}addParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)+t*n)}addParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.addParameterValueByIndex(r,t,n)}multiplyParameterValueById(e,t,n=1){let r=this.getParameterIndex(e);this.multiplyParameterValueByIndex(r,t,n)}multiplyParameterValueByIndex(e,t,n=1){this.setParameterValueByIndex(e,this.getParameterValueByIndex(e)*(1+(t-1)*n))}getDrawableIds(){return this._drawableIds.slice()}getDrawableIndex(e){let t=this._model.drawables.count;for(let n=0;nt&&(e=t);for(let t=0;t0&&t.getEndTime()(e[e.ExpressionBlendType_Add=0]=`ExpressionBlendType_Add`,e[e.ExpressionBlendType_Multiply=1]=`ExpressionBlendType_Multiply`,e[e.ExpressionBlendType_Overwrite=2]=`ExpressionBlendType_Overwrite`,e))(Zo||{}),Qo;(e=>{e.supportMoreMaskDivisions=!0,e.setOpacityFromMotion=!1})(Qo||={});var $o=(e=>(e[e.CubismMotionCurveTarget_Model=0]=`CubismMotionCurveTarget_Model`,e[e.CubismMotionCurveTarget_Parameter=1]=`CubismMotionCurveTarget_Parameter`,e[e.CubismMotionCurveTarget_PartOpacity=2]=`CubismMotionCurveTarget_PartOpacity`,e))($o||{}),es=(e=>(e[e.CubismMotionSegmentType_Linear=0]=`CubismMotionSegmentType_Linear`,e[e.CubismMotionSegmentType_Bezier=1]=`CubismMotionSegmentType_Bezier`,e[e.CubismMotionSegmentType_Stepped=2]=`CubismMotionSegmentType_Stepped`,e[e.CubismMotionSegmentType_InverseStepped=3]=`CubismMotionSegmentType_InverseStepped`,e))(es||{}),ts=class{constructor(e=0,t=0){this.time=e,this.value=t}},ns=class{constructor(){this.basePointIndex=0,this.segmentType=0}},rs=class{constructor(){this.id=``,this.type=0,this.segmentCount=0,this.baseSegmentIndex=0,this.fadeInTime=0,this.fadeOutTime=0}},os=class{constructor(){this.fireTime=0,this.value=``}},ss=class{constructor(){this.duration=0,this.loop=!1,this.curveCount=0,this.eventCount=0,this.fps=0,this.curves=[],this.segments=[],this.points=[],this.events=[]}},cs=class{constructor(e){this._json=e}release(){this._json=void 0}getMotionDuration(){return this._json.Meta.Duration}isMotionLoop(){return this._json.Meta.Loop||!1}getEvaluationOptionFlag(e){return ls.EvaluationOptionFlag_AreBeziersRistricted==e?!!this._json.Meta.AreBeziersRestricted:!1}getMotionCurveCount(){return this._json.Meta.CurveCount}getMotionFps(){return this._json.Meta.Fps}getMotionTotalSegmentCount(){return this._json.Meta.TotalSegmentCount}getMotionTotalPointCount(){return this._json.Meta.TotalPointCount}getMotionFadeInTime(){return this._json.Meta.FadeInTime}getMotionFadeOutTime(){return this._json.Meta.FadeOutTime}getMotionCurveTarget(e){return this._json.Curves[e].Target}getMotionCurveId(e){return this._json.Curves[e].Id}getMotionCurveFadeInTime(e){return this._json.Curves[e].FadeInTime}getMotionCurveFadeOutTime(e){return this._json.Curves[e].FadeOutTime}getMotionCurveSegmentCount(e){return this._json.Curves[e].Segments.length}getMotionCurveSegment(e,t){return this._json.Curves[e].Segments[t]}getEventCount(){return this._json.Meta.UserDataCount||0}getTotalEventValueSize(){return this._json.Meta.TotalUserDataSize}getEventTime(e){return this._json.UserData[e].Time}getEventValue(e){return this._json.UserData[e].Value}},ls=(e=>(e[e.EvaluationOptionFlag_AreBeziersRistricted=0]=`EvaluationOptionFlag_AreBeziersRistricted`,e))(ls||{});const us=`EyeBlink`,ds=`LipSync`,fs=`Model`,ps=`Parameter`,ms=`PartOpacity`;function hs(e,t,n){let r=new ts;return r.time=e.time+(t.time-e.time)*n,r.value=e.value+(t.value-e.value)*n,r}function gs(e,t){let n=(t-e[0].time)/(e[1].time-e[0].time);return n<0&&(n=0),e[0].value+(e[1].value-e[0].value)*n}function _s(e,t){let n=(t-e[0].time)/(e[3].time-e[0].time);n<0&&(n=0);let r=hs(e[0],e[1],n),i=hs(e[1],e[2],n),a=hs(e[2],e[3],n),o=hs(r,i,n),s=hs(i,a,n);return hs(o,s,n).value}function vs(e,t){let n=t,r=e[0].time,i=e[3].time,a=e[1].time,o=e[2].time,s=i-3*o+3*a-r,c=3*o-6*a+3*r,l=3*a-3*r,u=r-n,d=Ao.cardanoAlgorithmForBezier(s,c,l,u),f=hs(e[0],e[1],d),p=hs(e[1],e[2],d),m=hs(e[2],e[3],d),h=hs(f,p,d),g=hs(p,m,d);return hs(h,g,d).value}function ys(e,t){return e[0].value}function bs(e,t){return e[1].value}function xs(e,t,n){let r=e.curves[t],i=-1,a=r.baseSegmentIndex+r.segmentCount,o=0;for(let t=r.baseSegmentIndex;tn){i=t;break}if(i==-1)return e.points[o].value;let s=e.segments[i];return s.evaluate(e.points.slice(s.basePointIndex),n)}var Ss=class e extends Jo{constructor(){super(),this._eyeBlinkParameterIds=[],this._lipSyncParameterIds=[],this._sourceFrameRate=30,this._loopDurationSeconds=-1,this._isLoop=!1,this._isLoopFadeIn=!0,this._lastWeight=0}static create(t,n){let r=new e;return r.parse(t),r._sourceFrameRate=r._motionData.fps,r._loopDurationSeconds=r._motionData.duration,r._onFinishedMotion=n,r}doUpdateParameters(e,t,n,r){this._modelCurveIdEyeBlink??=us,this._modelCurveIdLipSync??=ds;let i=t-r.getStartTime();i<0&&(i=0);let a=Number.MAX_VALUE,o=Number.MAX_VALUE,s=64,c=0,l=0;this._eyeBlinkParameterIds.length>s&&Vo(`too many eye blink targets : {0}`,this._eyeBlinkParameterIds.length),this._lipSyncParameterIds.length>s&&Vo(`too many lip sync targets : {0}`,this._lipSyncParameterIds.length);let u=this._fadeInSeconds<=0?1:Ao.getEasingSine((t-r.getFadeInStartTime())/this._fadeInSeconds),d=this._fadeOutSeconds<=0||r.getEndTime()<0?1:Ao.getEasingSine((r.getEndTime()-t)/this._fadeOutSeconds),f,p,m,h=i;if(this._isLoop)for(;h>this._motionData.duration;)h-=this._motionData.duration;let g=this._motionData.curves;for(p=0;p>t&1)continue;let i=r+(o-r)*n;e.setParameterValueById(this._eyeBlinkParameterIds[t],i)}if(a!=Number.MAX_VALUE)for(let t=0;t>t&1)continue;let i=r+(a-r)*n;e.setParameterValueById(this._lipSyncParameterIds[t],i)}for(;p=this._motionData.duration&&(this._isLoop?(r.setStartTime(t),this._isLoopFadeIn&&r.setFadeInStartTime(t)):(this._onFinishedMotion&&this._onFinishedMotion(this),r.setIsFinished(!0))),this._lastWeight=n}setIsLoop(e){this._isLoop=e}isLoop(){return this._isLoop}setIsLoopFadeIn(e){this._isLoopFadeIn=e}isLoopFadeIn(){return this._isLoopFadeIn}getDuration(){return this._isLoop?-1:this._loopDurationSeconds}getLoopDuration(){return this._loopDurationSeconds}setParameterFadeInTime(e,t){let n=this._motionData.curves;for(let r=0;rnew rs),this._motionData.segments=Array.from({length:t.getMotionTotalSegmentCount()}).map(()=>new ns),this._motionData.events=Array.from({length:this._motionData.eventCount}).map(()=>new os),this._motionData.points=[];let a=0,o=0;for(let e=0;ee&&this._motionData.events[n].fireTime<=t&&this._firedEventValues.push(this._motionData.events[n].value);return this._firedEventValues}},Cs=class{constructor(){this._autoDelete=!1,this._available=!0,this._finished=!1,this._started=!1,this._startTimeSeconds=-1,this._fadeInStartTimeSeconds=0,this._endTimeSeconds=-1,this._stateTimeSeconds=0,this._stateWeight=0,this._lastEventCheckSeconds=0,this._motionQueueEntryHandle=this,this._fadeOutSeconds=0,this._isTriggeredFadeOut=!1}release(){this._autoDelete&&this._motion&&this._motion.release()}setFadeOut(e){this._fadeOutSeconds=e,this._isTriggeredFadeOut=!0}startFadeOut(e,t){let n=t+e;this._isTriggeredFadeOut=!0,(this._endTimeSeconds<0||nt!=null&&t._motionQueueEntryHandle==e)}setEventCallback(e,t=null){this._eventCallBack=e,this._eventCustomData=t}doUpdateMotion(e,t){let n=!1,r=0;for(;r(e[e.CubismPhysicsTargetType_Parameter=0]=`CubismPhysicsTargetType_Parameter`,e))(Es||{}),Ds=(e=>(e[e.CubismPhysicsSource_X=0]=`CubismPhysicsSource_X`,e[e.CubismPhysicsSource_Y=1]=`CubismPhysicsSource_Y`,e[e.CubismPhysicsSource_Angle=2]=`CubismPhysicsSource_Angle`,e))(Ds||{}),Os=class{constructor(){this.initialPosition=new Oo(0,0),this.position=new Oo(0,0),this.lastPosition=new Oo(0,0),this.lastGravity=new Oo(0,0),this.force=new Oo(0,0),this.velocity=new Oo(0,0)}},ks=class{constructor(){this.normalizationPosition={},this.normalizationAngle={}}},As=class{constructor(){this.source={}}},js=class{constructor(){this.destination={},this.translationScale=new Oo(0,0)}},Ms=class{constructor(){this.settings=[],this.inputs=[],this.outputs=[],this.particles=[],this.gravity=new Oo(0,0),this.wind=new Oo(0,0)}},Ns=class{constructor(e){this._json=e}release(){this._json=void 0}getGravity(){let e=new Oo(0,0);return e.x=this._json.Meta.EffectiveForces.Gravity.X,e.y=this._json.Meta.EffectiveForces.Gravity.Y,e}getWind(){let e=new Oo(0,0);return e.x=this._json.Meta.EffectiveForces.Wind.X,e.y=this._json.Meta.EffectiveForces.Wind.Y,e}getSubRigCount(){return this._json.Meta.PhysicsSettingCount}getTotalInputCount(){return this._json.Meta.TotalInputCount}getTotalOutputCount(){return this._json.Meta.TotalOutputCount}getVertexCount(){return this._json.Meta.VertexCount}getNormalizationPositionMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Minimum}getNormalizationPositionMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Maximum}getNormalizationPositionDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Position.Default}getNormalizationAngleMinimumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Minimum}getNormalizationAngleMaximumValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Maximum}getNormalizationAngleDefaultValue(e){return this._json.PhysicsSettings[e].Normalization.Angle.Default}getInputCount(e){return this._json.PhysicsSettings[e].Input.length}getInputWeight(e,t){return this._json.PhysicsSettings[e].Input[t].Weight}getInputReflect(e,t){return this._json.PhysicsSettings[e].Input[t].Reflect}getInputType(e,t){return this._json.PhysicsSettings[e].Input[t].Type}getInputSourceId(e,t){return this._json.PhysicsSettings[e].Input[t].Source.Id}getOutputCount(e){return this._json.PhysicsSettings[e].Output.length}getOutputVertexIndex(e,t){return this._json.PhysicsSettings[e].Output[t].VertexIndex}getOutputAngleScale(e,t){return this._json.PhysicsSettings[e].Output[t].Scale}getOutputWeight(e,t){return this._json.PhysicsSettings[e].Output[t].Weight}getOutputDestinationId(e,t){return this._json.PhysicsSettings[e].Output[t].Destination.Id}getOutputType(e,t){return this._json.PhysicsSettings[e].Output[t].Type}getOutputReflect(e,t){return this._json.PhysicsSettings[e].Output[t].Reflect}getParticleCount(e){return this._json.PhysicsSettings[e].Vertices.length}getParticleMobility(e,t){return this._json.PhysicsSettings[e].Vertices[t].Mobility}getParticleDelay(e,t){return this._json.PhysicsSettings[e].Vertices[t].Delay}getParticleAcceleration(e,t){return this._json.PhysicsSettings[e].Vertices[t].Acceleration}getParticleRadius(e,t){return this._json.PhysicsSettings[e].Vertices[t].Radius}getParticlePosition(e,t){let n=new Oo(0,0);return n.x=this._json.PhysicsSettings[e].Vertices[t].Position.X,n.y=this._json.PhysicsSettings[e].Vertices[t].Position.Y,n}};const Ps=`X`,Fs=`Y`,Is=`Angle`,Ls=5,Rs=100,zs=.001;var Bs=class e{static create(t){let n=new e;return n.parse(t),n._physicsRig.gravity.y=0,n}evaluate(e,t){let n,r,i,a,o=new Oo,s,c,l,u,d,f,p,m;d=e.getModel().parameters.values,f=e.getModel().parameters.maximumValues,p=e.getModel().parameters.minimumValues,m=e.getModel().parameters.defaultValues;for(let h=0;h=s.particleCount)break;l[t].destinationParameterIndex==-1&&(l[t].destinationParameterIndex=e.getParameterIndex(l[t].destination.id));let r=new Oo;r.x=u[n].position.x-u[n-1].position.x,r.y=u[n].position.y-u[n-1].position.y,a=l[t].getValue(r,u,n,l[t].reflect,this._options.gravity);let i=l[t].destinationParameterIndex,o=!Float32Array.prototype.slice&&`subarray`in Float32Array.prototype?JSON.parse(JSON.stringify(d.subarray(i))):d.slice(i);ec(o,p[i],f[i],a,l[t]);for(let e=i,t=0;e=2?t[n-1].position.substract(t[n-2].position):i.multiplyByScaler(-1),a=Ao.directionToRadian(i,e),r&&(a*=-1),a}function Js(e,t){return Math.abs(Math.max(e,t)-Math.min(e,t))}function Ys(e,t){let n=Math.min(e,t);return n+Js(e,t)/2}function Xs(e,t){return e.x}function Zs(e,t){return e.y}function Qs(e,t){return t}function $s(e,t,n,r,i,a,o,s){let c,l,u,d,f=new Oo(0,0),p=new Oo(0,0),m=new Oo(0,0),h=new Oo(0,0);e[0].position=new Oo(n.x,n.y),c=Ao.degreesToRadian(r),d=Ao.radianToDirection(c),d.normalize();for(let n=1;nn&&(o>i.valueExceededMaximum&&(i.valueExceededMaximum=o),o=n),s=i.weight/Rs,s>=1||(o=e[0]*(1-s)+o*s),e[0]=o}function tc(e,t,n,r,i,a,o,s){let c=0,l=Ao.max(n,t);le&&(e=u);let d=Ao.min(i,a),f=Ao.max(i,a),p=o,m=Ys(u,l),h=e-m;switch(Math.sign(h)){case 1:{let e=f-p,t=l-m;t!=0&&(c=h*(e/t),c+=p);break}case-1:{let e=d-p,t=u-m;t!=0&&(c=h*(e/t),c+=p);break}case 0:c=p;break}return s?c:c*-1}var nc=class{constructor(e=0,t=0,n=0,r=0){this.x=e,this.y=t,this.width=n,this.height=r}getCenterX(){return this.x+.5*this.width}getCenterY(){return this.y+.5*this.height}getRight(){return this.x+this.width}getBottom(){return this.y+this.height}setRect(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height}expand(e,t){this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2}};const rc=4,ic=10;let ac,oc,sc;var cc=class{getChannelFlagAsColor(e){return this._channelColors[e]}getMaskRenderTexture(){let e=0;if(this._maskTexture&&this._maskTexture.texture!=0&&(this._maskTexture.frameNo=this._currentFrameNo,e=this._maskTexture.texture),e==0){let t=this._clippingMaskBufferSize;this._colorBuffer=this.gl.createTexture(),this.gl.bindTexture(this.gl.TEXTURE_2D,this._colorBuffer),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,t,t,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.bindTexture(this.gl.TEXTURE_2D,null),e=this.gl.createFramebuffer(),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e),this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,this.gl.TEXTURE_2D,this._colorBuffer,0),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,sc),this._maskTexture=new lc(this._currentFrameNo,e)}return e}setGL(e){this.gl=e}calcClippedDrawTotalBounds(e,t){let n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,o=t._clippedDrawableIndexList.length;for(let s=0;sf&&(f=t),np&&(p=n)}if(u!=Number.MAX_VALUE)if(ui&&(i=f),p>a&&(a=p),n==Number.MAX_VALUE)t._allClippedDrawRect.x=0,t._allClippedDrawRect.y=0,t._allClippedDrawRect.width=0,t._allClippedDrawRect.height=0,t._isUsing=!1;else{t._isUsing=!0;let e=i-n,o=a-r;t._allClippedDrawRect.x=n,t._allClippedDrawRect.y=r,t._allClippedDrawRect.width=e,t._allClippedDrawRect.height=o}}}constructor(){this._maskRenderTexture=null,this._colorBuffer=null,this._currentFrameNo=0,this._clippingMaskBufferSize=256,this._clippingContextListForMask=[],this._clippingContextListForDraw=[],this._channelColors=[],this._tmpBoundsOnModel=new nc,this._tmpMatrix=new jo,this._tmpMatrixForMask=new jo,this._tmpMatrixForDraw=new jo;let e=new Po;e.R=1,e.G=0,e.B=0,e.A=0,this._channelColors.push(e),e=new Po,e.R=0,e.G=1,e.B=0,e.A=0,this._channelColors.push(e),e=new Po,e.R=0,e.G=0,e.B=1,e.A=0,this._channelColors.push(e),e=new Po,e.R=0,e.G=0,e.B=0,e.A=1,this._channelColors.push(e)}release(){var e,t,n;let r=this;for(let t=0;t0){this.gl.viewport(0,0,this._clippingMaskBufferSize,this._clippingMaskBufferSize),this._maskRenderTexture=this.getMaskRenderTexture(),t.getMvpMatrix(),t.preDraw(),this.setupLayoutBounds(n),this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this._maskRenderTexture),this.gl.clearColor(1,1,1,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT);for(let n=0;n(e[e.ShaderNames_SetupMask=0]=`ShaderNames_SetupMask`,e[e.ShaderNames_NormalPremultipliedAlpha=1]=`ShaderNames_NormalPremultipliedAlpha`,e[e.ShaderNames_NormalMaskedPremultipliedAlpha=2]=`ShaderNames_NormalMaskedPremultipliedAlpha`,e[e.ShaderNames_NomralMaskedInvertedPremultipliedAlpha=3]=`ShaderNames_NomralMaskedInvertedPremultipliedAlpha`,e[e.ShaderNames_AddPremultipliedAlpha=4]=`ShaderNames_AddPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlpha=5]=`ShaderNames_AddMaskedPremultipliedAlpha`,e[e.ShaderNames_AddMaskedPremultipliedAlphaInverted=6]=`ShaderNames_AddMaskedPremultipliedAlphaInverted`,e[e.ShaderNames_MultPremultipliedAlpha=7]=`ShaderNames_MultPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlpha=8]=`ShaderNames_MultMaskedPremultipliedAlpha`,e[e.ShaderNames_MultMaskedPremultipliedAlphaInverted=9]=`ShaderNames_MultMaskedPremultipliedAlphaInverted`,e))(fc||{});const pc=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_myPos;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_clipMatrix * a_position; v_myPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,mc=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_myPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;void main(){ float isInside = step(u_baseColor.x, v_myPos.x/v_myPos.w) * step(u_baseColor.y, v_myPos.y/v_myPos.w) * step(v_myPos.x/v_myPos.w, u_baseColor.z) * step(v_myPos.y/v_myPos.w, u_baseColor.w); gl_FragColor = u_channelFlag * texture2D(s_texture0, v_texCoord).a * isInside;}`,hc=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;uniform mat4 u_matrix;void main(){ gl_Position = u_matrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,gc=`attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform mat4 u_matrix;uniform mat4 u_clipMatrix;void main(){ gl_Position = u_matrix * a_position; v_clipPos = u_clipMatrix * a_position; v_texCoord = a_texCoord; v_texCoord.y = 1.0 - v_texCoord.y;}`,_c=`precision mediump float;varying vec2 v_texCoord;uniform vec4 u_baseColor;uniform sampler2D s_texture0;void main(){ gl_FragColor = texture2D(s_texture0 , v_texCoord) * u_baseColor;}`,vc=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform vec4 u_baseColor;uniform vec4 u_channelFlag;uniform sampler2D s_texture0;uniform sampler2D s_texture1;void main(){ vec4 col_formask = texture2D(s_texture0 , v_texCoord) * u_baseColor; vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag; float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a; col_formask = col_formask * maskVal; gl_FragColor = col_formask;}`,yc=`precision mediump float;varying vec2 v_texCoord;varying vec4 v_clipPos;uniform sampler2D s_texture0;uniform sampler2D s_texture1;uniform vec4 u_channelFlag;uniform vec4 u_baseColor;void main(){vec4 col_formask = texture2D(s_texture0, v_texCoord) * u_baseColor;vec4 clipMask = (1.0 - texture2D(s_texture1, v_clipPos.xy / v_clipPos.w)) * u_channelFlag;float maskVal = clipMask.r + clipMask.g + clipMask.b + clipMask.a;col_formask = col_formask * (1.0 - maskVal);gl_FragColor = col_formask;}`;var bc=class extends Mo{constructor(){super(),this._clippingContextBufferForMask=null,this._clippingContextBufferForDraw=null,this._clippingManager=new cc,this.firstDraw=!0,this._textures={},this._sortedDrawableIndexList=[],this._bufferData={vertex:null,uv:null,index:null}}initialize(e){e.isUsingMasking()&&(this._clippingManager=new cc,this._clippingManager.initialize(e,e.getDrawableCount(),e.getDrawableMasks(),e.getDrawableMaskCounts()));for(let t=e.getDrawableCount()-1;t>=0;t--)this._sortedDrawableIndexList[t]=0;super.initialize(e)}bindTexture(e,t){this._textures[e]=t}getBindedTextures(){return this._textures}setClippingMaskBufferSize(e){this._clippingManager.release(),this._clippingManager=new cc,this._clippingManager.setClippingMaskBufferSize(e),this._clippingManager.initialize(this.getModel(),this.getModel().getDrawableCount(),this.getModel().getDrawableMasks(),this.getModel().getDrawableMaskCounts())}getClippingMaskBufferSize(){return this._clippingManager.getClippingMaskBufferSize()}release(){var e,t,n;let r=this;this._clippingManager.release(),r._clippingManager=void 0,(e=this.gl)==null||e.deleteBuffer(this._bufferData.vertex),this._bufferData.vertex=null,(t=this.gl)==null||t.deleteBuffer(this._bufferData.uv),this._bufferData.uv=null,(n=this.gl)==null||n.deleteBuffer(this._bufferData.index),this._bufferData.index=null,r._bufferData=void 0,r._textures=void 0}doDrawModel(){this.preDraw(),this._clippingManager!=null&&this._clippingManager.setupClippingContext(this.getModel(),this);let e=this.getModel().getDrawableCount(),t=this.getModel().getDrawableRenderOrders();for(let n=0;n{bc.doStaticRelease()};var xc=class{constructor(e){this.groups=e.Groups,this.hitAreas=e.HitAreas,this.layout=e.Layout,this.moc=e.FileReferences.Moc,this.expressions=e.FileReferences.Expressions,this.motions=e.FileReferences.Motions,this.textures=e.FileReferences.Textures,this.physics=e.FileReferences.Physics,this.pose=e.FileReferences.Pose}getEyeBlinkParameters(){var e,t;return(t=(e=this.groups)?.find(e=>e.Name===`EyeBlink`))?.Ids}getLipSyncParameters(){var e,t;return(t=(e=this.groups)?.find(e=>e.Name===`LipSync`))?.Ids}};const Sc=`ParamAngleX`,Cc=`ParamAngleY`,wc=`ParamAngleZ`,Tc=`ParamEyeBallX`,Ec=`ParamEyeBallY`,Dc=`ParamBodyAngleX`,Oc=`ParamBreath`,kc=2,Ac=2;var jc;(e=>{e.LOG_LEVEL_VERBOSE=0,e.LOG_LEVEL_WARNING=1,e.LOG_LEVEL_ERROR=2,e.LOG_LEVEL_NONE=999,e.logLevel=e.LOG_LEVEL_WARNING,e.sound=!0,e.motionSync=!0,e.motionFadingDuration=500,e.idleMotionFadingDuration=2e3,e.expressionFadingDuration=500,e.preserveExpressionOnMotion=!0,e.cubism4=Qo})(jc||={});const Mc={log(e,...t){jc.logLevel<=jc.LOG_LEVEL_VERBOSE&&console.log(`[${e}]`,...t)},warn(e,...t){jc.logLevel<=jc.LOG_LEVEL_WARNING&&console.warn(`[${e}]`,...t)},error(e,...t){jc.logLevel<=jc.LOG_LEVEL_ERROR&&console.error(`[${e}]`,...t)}};function Nc(e,t,n){return en?n:e}function Pc(e,t){t.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(n=>{n!==`constructor`&&Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})})}function Fc(e){let t=e.lastIndexOf(`/`);return t!=-1&&(e=e.slice(0,t)),t=e.lastIndexOf(`/`),t!==-1&&(e=e.slice(t+1)),e}function Ic(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}var Lc=class extends Jt.default{constructor(e,t){super(),this.expressions=[],this.reserveExpressionIndex=-1,this.destroyed=!1,this.settings=e,this.tag=`ExpressionManager(${e.name})`}init(){this.defaultExpression=this.createExpression({},void 0),this.currentExpression=this.defaultExpression,this.stopAllExpressions()}loadExpression(e){return vo(this,null,function*(){if(!this.definitions[e]){Mc.warn(this.tag,`Undefined expression at [${e}]`);return}if(this.expressions[e]===null){Mc.warn(this.tag,`Cannot set expression at [${e}] because it's already failed in loading.`);return}if(this.expressions[e])return this.expressions[e];let t=yield this._loadExpression(e);return this.expressions[e]=t,t})}_loadExpression(e){throw Error(`Not implemented.`)}setRandomExpression(){return vo(this,null,function*(){if(this.definitions.length){let e=[];for(let t=0;t-1&&ec&&(a*=c/s,o*=c/s),this.vx+=a,this.vy+=o;let l=Math.sqrt(_o(this.vx,2)+_o(this.vy,2)),u=.5*(Math.sqrt(_o(c,2)+8*c*r)-c);l>u&&(this.vx*=u/l,this.vy*=u/l),this.x+=this.vx,this.y+=this.vy}},Hc=class{constructor(e){this.json=e;let t=e.url;if(typeof t!=`string`)throw TypeError("The `url` field in settings JSON must be defined as a string.");this.url=t,this.name=Fc(this.url)}resolveURL(e){return Xt.resolve(this.url,e)}replaceFiles(e){this.moc=e(this.moc,`moc`),this.pose!==void 0&&(this.pose=e(this.pose,`pose`)),this.physics!==void 0&&(this.physics=e(this.physics,`physics`));for(let t=0;t(e.push(t),t)),e}validateFiles(e){let t=(t,n)=>{let r=this.resolveURL(t);if(!e.includes(r)){if(n)throw Error(`File "${t}" is defined in settings, but doesn't exist in given files`);return!1}return!0},n=[this.moc,...this.textures];n.forEach(e=>t(e,!0));let r=this.getDefinedFiles();return r.filter(e=>t(e,!1))}},Uc=(e=>(e[e.NONE=0]=`NONE`,e[e.IDLE=1]=`IDLE`,e[e.NORMAL=2]=`NORMAL`,e[e.FORCE=3]=`FORCE`,e))(Uc||{}),Wc=class{constructor(){this.debug=!1,this.currentPriority=0,this.reservePriority=0}reserve(e,t,n){if(n<=0)return Mc.log(this.tag,`Cannot start a motion with MotionPriority.NONE.`),!1;if(e===this.currentGroup&&t===this.currentIndex)return Mc.log(this.tag,`Motion is already playing.`,this.dump(e,t)),!1;if(e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex)return Mc.log(this.tag,`Motion is already reserved.`,this.dump(e,t)),!1;if(n===1){if(this.currentPriority!==0)return Mc.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(e,t)),!1;if(this.reservedIdleGroup!==void 0)return Mc.log(this.tag,`Cannot start idle motion because another idle motion has reserved.`,this.dump(e,t)),!1;this.setReservedIdle(e,t)}else{if(n<3){if(n<=this.currentPriority)return Mc.log(this.tag,`Cannot start motion because another motion is playing as an equivalent or higher priority.`,this.dump(e,t)),!1;if(n<=this.reservePriority)return Mc.log(this.tag,`Cannot start motion because another motion has reserved as an equivalent or higher priority.`,this.dump(e,t)),!1}this.setReserved(e,t,n)}return!0}start(e,t,n,r){if(r===1){if(this.setReservedIdle(void 0,void 0),this.currentPriority!==0)return Mc.log(this.tag,`Cannot start idle motion because another motion is playing.`,this.dump(t,n)),!1}else{if(t!==this.reservedGroup||n!==this.reservedIndex)return Mc.log(this.tag,`Cannot start motion because another motion has taken the place.`,this.dump(t,n)),!1;this.setReserved(void 0,void 0,0)}return e?(this.setCurrent(t,n,r),!0):!1}complete(){this.setCurrent(void 0,void 0,0)}setCurrent(e,t,n){this.currentPriority=n,this.currentGroup=e,this.currentIndex=t}setReserved(e,t,n){this.reservePriority=n,this.reservedGroup=e,this.reservedIndex=t}setReservedIdle(e,t){this.reservedIdleGroup=e,this.reservedIdleIndex=t}isActive(e,t){return e===this.currentGroup&&t===this.currentIndex||e===this.reservedGroup&&t===this.reservedIndex||e===this.reservedIdleGroup&&t===this.reservedIdleIndex}reset(){this.setCurrent(void 0,void 0,0),this.setReserved(void 0,void 0,0),this.setReservedIdle(void 0,void 0)}shouldRequestIdleMotion(){return this.currentGroup===void 0&&this.reservedIdleGroup===void 0}shouldOverrideExpression(){return!jc.preserveExpressionOnMotion&&this.currentPriority>1}dump(e,t){if(this.debug){let n=[`currentPriority`,`reservePriority`,`currentGroup`,`currentIndex`,`reservedGroup`,`reservedIndex`,`reservedIdleGroup`,`reservedIdleIndex`];return` group = "${e}", index = ${t} `+n.map(e=>`[`+e+`] `+this[e]).join(` -`)}return``}};const Kc=`SoundManager`,qc=.5;var Jc=class{static get volume(){return this._volume}static set volume(e){this._volume=(e>1?1:e<0?0:e)||0,this.audios.forEach(e=>e.volume=this._volume)}static add(e,t,n){let r=new Audio(e);return r.volume=this._volume,r.preload=`auto`,r.addEventListener(`ended`,()=>{this.dispose(r),t?.()}),r.addEventListener(`error`,t=>{this.dispose(r),Nc.warn(Kc,`Error occurred on "${e}"`,t.error),n?.(t.error)}),this.audios.push(r),r}static play(e){return new Promise((t,n)=>{var r;(r=e.play())==null||r.catch(t=>{e.dispatchEvent(new ErrorEvent(`error`,{error:t})),n(t)}),e.readyState===e.HAVE_ENOUGH_DATA?t():e.addEventListener(`canplaythrough`,t)})}static dispose(e){e.pause(),e.removeAttribute(`src`),Lc(this.audios,e)}static destroy(){for(let e=this.audios.length-1;e>=0;e--)this.dispose(this.audios[e])}};Jc.audios=[],Jc._volume=qc;var Yc=class extends Yt.default{constructor(e,t){super(),this.motionGroups={},this.state=new Gc,this.playing=!1,this.destroyed=!1,this.settings=e,this.tag=`MotionManager(${e.name})`,this.state.tag=this.tag}init(e){e?.idleMotionGroup&&(this.groups.idle=e.idleMotionGroup),this.setupMotions(e),this.stopAllMotions()}setupMotions(e){for(let e of Object.keys(this.definitions))this.motionGroups[e]=[];let t;switch(e?.motionPreload){case`NONE`:return;case`ALL`:t=Object.keys(this.definitions);break;case`IDLE`:default:t=[this.groups.idle];break}for(let e of t)if(this.definitions[e])for(let t=0;tthis.currentAudio=void 0,()=>this.currentAudio=void 0),this.currentAudio=a}catch(t){Nc.warn(this.tag,`Failed to create audio`,e,t)}}let o=yield this.loadMotion(e,t);if(a){let e=Jc.play(a).catch(e=>Nc.warn(this.tag,`Failed to play audio`,a.src,e));Mc.motionSync&&(yield e)}return this.state.start(o,e,t,n)?(Nc.log(this.tag,`Start motion:`,this.getMotionName(i)),this.emit(`motionStart`,e,t,a),this.state.shouldOverrideExpression()&&this.expressionManager&&this.expressionManager.resetExpression(),this.playing=!0,this._startMotion(o),!0):(a&&(Jc.dispose(a),this.currentAudio=void 0),!1)})}startRandomMotion(e,t){return yo(this,null,function*(){let n=this.definitions[e];if(n?.length){let r=[];for(let t=0;te.index>=0);for(let t of e)this.hitAreas[t.name]=t}hitTest(e,t){return Object.keys(this.hitAreas).filter(n=>this.isHit(n,e,t))}isHit(e,t,n){if(!this.hitAreas[e])return!1;let r=this.hitAreas[e].index,i=this.getDrawableBounds(r,Xc);return i.x<=t&&t<=i.x+i.width&&i.y<=n&&n<=i.y+i.height}getDrawableBounds(e,t){let n=this.getDrawableVertices(e),r=n[0],i=n[0],a=n[1],o=n[1];for(let e=0;e{(a.status===200||a.status===0)&&a.response?r(a.response):a.onerror()},a.onerror=()=>{Nc.warn(Qc,`Failed to load resource as ${a.responseType} (Status ${a.status}): ${t}`),i(new $c(`Network error.`,t,a.status))},a.onabort=()=>i(new $c(`Aborted.`,t,a.status,!0)),a.onloadend=()=>{var t;el.allXhrSet.delete(a),e&&((t=el.xhrMap.get(e))==null||t.delete(a))},a}static cancelXHRs(){var e;(e=el.xhrMap.get(this))==null||e.forEach(e=>{e.abort(),el.allXhrSet.delete(e)}),el.xhrMap.delete(this)}static release(){el.allXhrSet.forEach(e=>e.abort()),el.allXhrSet.clear(),el.xhrMap=new WeakMap}};let tl=el;tl.xhrMap=new WeakMap,tl.allXhrSet=new Set,tl.loader=(e,t)=>new Promise((t,n)=>{let r=el.createXHR(e.target,e.settings?e.settings.resolveURL(e.url):e.url,e.type,n=>{e.result=n,t()},n);r.send()});function nl(e,t){let n=-1;return r(0);function r(i,a){if(a)return Promise.reject(a);if(i<=n)return Promise.reject(Error(`next() called multiple times`));n=i;let o=e[i];if(!o)return Promise.resolve();try{return Promise.resolve(o(t,r.bind(null,i+1)))}catch(e){return Promise.reject(e)}}}var rl=class{static load(e){return nl(this.middlewares,e).then(()=>e.result)}};rl.middlewares=[tl.loader];function il(e,t={}){var n;let r={resourceOptions:{crossorigin:t.crossOrigin}};if(Tr.fromURL)return Tr.fromURL(e,r).catch(e=>{if(e instanceof Error)throw e;let t=Error(`Texture loading error`);throw t.event=e,t});r.resourceOptions.autoLoad=!1;let i=Tr.from(e,r);if(i.baseTexture.valid)return Promise.resolve(i);let a=i.baseTexture.resource;return(n=a._live2d_load)??(a._live2d_load=new Promise((e,t)=>{let n=e=>{a.source.removeEventListener(`error`,n);let r=Error(`Texture loading error`);r.event=e,t(r)};a.source.addEventListener(`error`,n),a.load().then(()=>e(i)).catch(n)})),a._live2d_load}const al=`Live2DFactory`,ol=(e,t)=>yo(void 0,null,function*(){if(typeof e.source==`string`){let t=yield rl.load({url:e.source,type:`json`,target:e.live2dModel});t.url=e.source,e.source=t,e.live2dModel.emit(`settingsJSONLoaded`,t)}return t()}),sl=(e,t)=>yo(void 0,null,function*(){if(e.source instanceof Uc)return e.settings=e.source,t();if(typeof e.source==`object`){let n=pl.findRuntime(e.source);if(n){let r=n.createModelSettings(e.source);return e.settings=r,e.live2dModel.emit(`settingsLoaded`,r),t()}}throw TypeError(`Unknown settings format.`)}),cl=(e,t)=>{if(e.settings){let n=pl.findRuntime(e.settings);if(n)return n.ready().then(t)}return t()},ll=(e,t)=>yo(void 0,null,function*(){yield t();let n=e.internalModel;if(n){let t=e.settings,r=pl.findRuntime(t);if(r){let i=[];t.pose&&i.push(rl.load({settings:t,url:t.pose,type:`json`,target:n}).then(t=>{n.pose=r.createPose(n.coreModel,t),e.live2dModel.emit(`poseLoaded`,n.pose)}).catch(t=>{e.live2dModel.emit(`poseLoadError`,t),Nc.warn(al,`Failed to load pose.`,t)})),t.physics&&i.push(rl.load({settings:t,url:t.physics,type:`json`,target:n}).then(t=>{n.physics=r.createPhysics(n.coreModel,t),e.live2dModel.emit(`physicsLoaded`,n.physics)}).catch(t=>{e.live2dModel.emit(`physicsLoadError`,t),Nc.warn(al,`Failed to load physics.`,t)})),i.length&&(yield Promise.all(i))}}}),ul=(e,t)=>yo(void 0,null,function*(){if(e.settings){let n=e.live2dModel,r=e.settings.textures.map(t=>{let n=e.settings.resolveURL(t);return il(n,{crossOrigin:e.options.crossOrigin})});if(yield t(),e.internalModel)n.internalModel=e.internalModel,n.emit(`modelLoaded`,e.internalModel);else throw TypeError(`Missing internal model.`);n.textures=yield Promise.all(r),n.emit(`textureLoaded`,n.textures)}else throw TypeError(`Missing settings.`)}),dl=(e,t)=>yo(void 0,null,function*(){let n=e.settings;if(n instanceof Uc){let r=pl.findRuntime(n);if(!r)throw TypeError(`Unknown model settings.`);let i=yield rl.load({settings:n,url:n.moc,type:`arraybuffer`,target:e.live2dModel});if(!r.isValidMoc(i))throw Error(`Invalid moc data`);let a=r.createCoreModel(i);return e.internalModel=r.createInternalModel(a,n,e.options),t()}throw TypeError(`Missing settings.`)}),fl=class{static registerRuntime(e){fl.runtimes.push(e),fl.runtimes.sort((e,t)=>t.version-e.version)}static findRuntime(e){for(let t of fl.runtimes)if(t.test(e))return t}static setupLive2DModel(e,t,n){return yo(this,null,function*(){let r=new Promise(t=>e.once(`textureLoaded`,t)),i=new Promise(t=>e.once(`modelLoaded`,t)),a=Promise.all([r,i]).then(()=>e.emit(`ready`));yield nl(fl.live2DModelMiddlewares,{live2dModel:e,source:t,options:n||{}}),yield a,e.emit(`load`)})}static loadMotion(e,t,n){var r,i;let a=r=>e.emit(`motionLoadError`,t,n,r);try{let o=(r=e.definitions[t])?.[n];if(!o)return Promise.resolve(void 0);e.listeners(`destroy`).includes(fl.releaseTasks)||e.once(`destroy`,fl.releaseTasks);let s=fl.motionTasksMap.get(e);s||(s={},fl.motionTasksMap.set(e,s));let c=s[t];c||(c=[],s[t]=c);let l=e.getMotionFile(o);return(i=c[n])??(c[n]=rl.load({url:l,settings:e.settings,type:e.motionDataType,target:e}).then(r=>{var i;let a=(i=fl.motionTasksMap.get(e))?.[t];a&&delete a[n];let s=e.createMotion(r,t,o);return e.emit(`motionLoaded`,t,n,s),s}).catch(t=>{Nc.warn(e.tag,`Failed to load motion: ${l} -`,t),a(t)})),c[n]}catch(r){Nc.warn(e.tag,`Failed to load motion at "${t}"[${n}] -`,r),a(r)}return Promise.resolve(void 0)}static loadExpression(e,t){var n;let r=n=>e.emit(`expressionLoadError`,t,n);try{let i=e.definitions[t];if(!i)return Promise.resolve(void 0);e.listeners(`destroy`).includes(fl.releaseTasks)||e.once(`destroy`,fl.releaseTasks);let a=fl.expressionTasksMap.get(e);a||(a=[],fl.expressionTasksMap.set(e,a));let o=e.getExpressionFile(i);return(n=a[t])??(a[t]=rl.load({url:o,settings:e.settings,type:`json`,target:e}).then(n=>{let r=fl.expressionTasksMap.get(e);r&&delete r[t];let a=e.createExpression(n,i);return e.emit(`expressionLoaded`,t,a),a}).catch(t=>{Nc.warn(e.tag,`Failed to load expression: ${o} -`,t),r(t)})),a[t]}catch(n){Nc.warn(e.tag,`Failed to load expression at [${t}] -`,n),r(n)}return Promise.resolve(void 0)}static releaseTasks(){this instanceof Yc?fl.motionTasksMap.delete(this):fl.expressionTasksMap.delete(this)}};let pl=fl;pl.runtimes=[],pl.urlToJSON=ol,pl.jsonToSettings=sl,pl.waitUntilReady=cl,pl.setupOptionals=ll,pl.setupEssentials=ul,pl.createInternalModel=dl,pl.live2DModelMiddlewares=[ol,sl,cl,ll,ul,dl],pl.motionTasksMap=new WeakMap,pl.expressionTasksMap=new WeakMap,Yc.prototype._loadMotion=function(e,t){return pl.loadMotion(this,e,t)},Rc.prototype._loadExpression=function(e){return pl.loadExpression(this,e)};var ml=class{constructor(){this._autoInteract=!1}get autoInteract(){return this._autoInteract}set autoInteract(e){e!==this._autoInteract&&(e?this.on(`pointertap`,hl,this):this.off(`pointertap`,hl,this),this._autoInteract=e)}registerInteraction(e){e!==this.interactionManager&&(this.unregisterInteraction(),this._autoInteract&&e&&(this.interactionManager=e,e.on(`pointermove`,gl,this)))}unregisterInteraction(){var e;this.interactionManager&&((e=this.interactionManager)==null||e.off(`pointermove`,gl,this),this.interactionManager=void 0)}};function hl(e){this.tap(e.data.global.x,e.data.global.y)}function gl(e){this.focus(e.data.global.x,e.data.global.y)}var _l=class extends Qn{};const vl=new Rn,yl=new Hn;let bl;var xl=class extends io{constructor(e){super(),this.tag=`Live2DModel(uninitialized)`,this.textures=[],this.transform=new _l,this.anchor=new Vn(this.onAnchorChange,this,0,0),this.glContextID=-1,this.elapsedTime=performance.now(),this.deltaTime=0,this._autoUpdate=!1,this.once(`modelLoaded`,()=>this.init(e))}static from(e,t){let n=new this(t);return pl.setupLive2DModel(n,e,t).then(()=>n)}static fromSync(e,t){let n=new this(t);return pl.setupLive2DModel(n,e,t).then(t?.onLoad).catch(t?.onError),n}static registerTicker(e){bl=e}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){var t;bl||=(t=window.PIXI)?.Ticker,e?this._destroyed||(bl?(bl.shared.add(this.onTickerUpdate,this),this._autoUpdate=!0):Nc.warn(this.tag,`No Ticker registered, please call Live2DModel.registerTicker(Ticker).`)):(bl?.shared.remove(this.onTickerUpdate,this),this._autoUpdate=!1)}init(e){this.tag=`Live2DModel(${this.internalModel.settings.name})`;let t=Object.assign({autoUpdate:!0,autoInteract:!0},e);t.autoInteract&&(this.interactive=!0),this.autoInteract=t.autoInteract,this.autoUpdate=t.autoUpdate}onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width,this.anchor.y*this.internalModel.height)}motion(e,t,n){return t===void 0?this.internalModel.motionManager.startRandomMotion(e,n):this.internalModel.motionManager.startMotion(e,t,n)}expression(e){return this.internalModel.motionManager.expressionManager?e===void 0?this.internalModel.motionManager.expressionManager.setRandomExpression():this.internalModel.motionManager.expressionManager.setExpression(e):Promise.resolve(!1)}focus(e,t,n=!1){vl.x=e,vl.y=t,this.toModelPosition(vl,vl,!0);let r=vl.x/this.internalModel.originalWidth*2-1,i=vl.y/this.internalModel.originalHeight*2-1,a=Math.atan2(i,r);this.internalModel.focusController.focus(Math.cos(a),-Math.sin(a),n)}tap(e,t){let n=this.hitTest(e,t);n.length&&(Nc.log(this.tag,`Hit`,n),this.emit(`hit`,n))}hitTest(e,t){return vl.x=e,vl.y=t,this.toModelPosition(vl,vl),this.internalModel.hitTest(vl.x,vl.y)}toModelPosition(e,t=e.clone(),n){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.transform.worldTransform.applyInverse(e,t),this.internalModel.localTransform.applyInverse(t,t),t}containsPoint(e){return this.getBounds(!0).contains(e.x,e.y)}_calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.internalModel.width,this.internalModel.height)}onTickerUpdate(){this.update(bl.shared.deltaMS)}update(e){this.deltaTime+=e,this.elapsedTime+=e}_render(e){this.registerInteraction(e.plugins.interaction),e.batch.reset(),e.geometry.reset(),e.shader.reset(),e.state.reset();let t=!1;this.glContextID!==e.CONTEXT_UID&&(this.glContextID=e.CONTEXT_UID,this.internalModel.updateWebGLContext(e.gl,this.glContextID),t=!0);for(let n=0;nt.destroy(e.baseTexture)),this.internalModel.destroy(),super.destroy(e)}};Fc(xl,[ml]);const Sl=class{static resolveURL(e,t){var n;let r=(n=Sl.filesMap[e])?.[t];if(r===void 0)throw Error(`Cannot find this file from uploaded files: `+t);return r}static upload(e,t){return yo(this,null,function*(){let n={};for(let r of t.getDefinedFiles()){let i=decodeURI(Zt.resolve(t.url,r)),a=e.find(e=>e.webkitRelativePath===i);a&&(n[r]=URL.createObjectURL(a))}Sl.filesMap[t._objectURL]=n})}static createSettings(e){return yo(this,null,function*(){let t=e.find(e=>e.name.endsWith(`model.json`)||e.name.endsWith(`model3.json`));if(!t)throw TypeError(`Settings file not found`);let n=yield Sl.readText(t),r=JSON.parse(n);r.url=t.webkitRelativePath;let i=pl.findRuntime(r);if(!i)throw Error(`Unknown settings JSON`);let a=i.createModelSettings(r);return a._objectURL=URL.createObjectURL(t),a})}static readText(e){return yo(this,null,function*(){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsText(e,`utf8`)})})}};let Cl=Sl;Cl.filesMap={},Cl.factory=(e,t)=>yo(void 0,null,function*(){if(Array.isArray(e.source)&&e.source[0]instanceof File){let t=e.source,n=t.settings;if(!n)n=yield Sl.createSettings(t);else if(!n._objectURL)throw Error(`"_objectURL" must be specified in ModelSettings`);n.validateFiles(t.map(e=>encodeURI(e.webkitRelativePath))),yield Sl.upload(t,n),n.resolveURL=function(e){return Sl.resolveURL(this._objectURL,e)},e.source=n,e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){let e=this.settings._objectURL;if(URL.revokeObjectURL(e),Sl.filesMap[e])for(let t of Object.values(Sl.filesMap[e]))URL.revokeObjectURL(t);delete Sl.filesMap[e]})})}return t()}),pl.live2DModelMiddlewares.unshift(Cl.factory);const wl=class{static unzip(e,t){return yo(this,null,function*(){let n=yield wl.getFilePaths(e),r=[];for(let e of t.getDefinedFiles()){let i=decodeURI(Zt.resolve(t.url,e));n.includes(i)&&r.push(i)}let i=yield wl.getFiles(e,r);for(let e=0;ee.endsWith(`model.json`)||e.endsWith(`model3.json`));if(!n)throw Error(`Settings file not found`);let r=yield wl.readText(e,n);if(!r)throw Error(`Empty settings file: `+n);let i=JSON.parse(r);i.url=n;let a=pl.findRuntime(i);if(!a)throw Error(`Unknown settings JSON`);return a.createModelSettings(i)})}static zipReader(e,t){return yo(this,null,function*(){throw Error(`Not implemented`)})}static getFilePaths(e){return yo(this,null,function*(){throw Error(`Not implemented`)})}static getFiles(e,t){return yo(this,null,function*(){throw Error(`Not implemented`)})}static readText(e,t){return yo(this,null,function*(){throw Error(`Not implemented`)})}static releaseReader(e){}};let Tl=wl;if(Tl.ZIP_PROTOCOL=`zip://`,Tl.uid=0,Tl.factory=(e,t)=>yo(void 0,null,function*(){let n=e.source,r,i,a;if(typeof n==`string`&&(n.endsWith(`.zip`)||n.startsWith(wl.ZIP_PROTOCOL))?(r=n.startsWith(wl.ZIP_PROTOCOL)?n.slice(wl.ZIP_PROTOCOL.length):n,i=yield rl.load({url:r,type:`blob`,target:e.live2dModel})):Array.isArray(n)&&n.length===1&&n[0]instanceof File&&n[0].name.endsWith(`.zip`)&&(i=n[0],r=URL.createObjectURL(i),a=n.settings),i){if(!i.size)throw Error(`Empty zip file`);let t=yield wl.zipReader(i,r);a||=yield wl.createSettings(t),a._objectURL=wl.ZIP_PROTOCOL+wl.uid+`/`+a.url;let n=yield wl.unzip(t,a);n.settings=a,e.source=n,r.startsWith(`blob:`)&&e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){URL.revokeObjectURL(r)})}),wl.releaseReader(t)}return t()}),pl.live2DModelMiddlewares.unshift(Tl.factory),!window.Live2DCubismCore)throw Error(`Could not find Cubism 4 runtime. This plugin requires live2dcubismcore.js to be loaded.`);var El=class extends Rc{constructor(e,t){var n;super(e,t),this.queueManager=new Ts,this.definitions=(n=e.expressions)??[],this.init()}isFinished(){return this.queueManager.isFinished()}getExpressionIndex(e){return this.definitions.findIndex(t=>t.Name===e)}getExpressionFile(e){return e.File}createExpression(e,t){return Zo.create(e)}_setExpression(e){return this.queueManager.startMotion(e,!1,performance.now())}stopAllExpressions(){this.queueManager.stopAllMotions()}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}},Dl=class e extends Uc{constructor(t){if(super(t),!e.isValidJSON(t))throw TypeError(`Invalid JSON.`);Object.assign(this,new Sc(t))}static isValidJSON(e){var t;return!!e?.FileReferences&&typeof e.FileReferences.Moc==`string`&&(t=e.FileReferences.Textures)?.length>0&&e.FileReferences.Textures.every(e=>typeof e==`string`)}replaceFiles(e){if(super.replaceFiles(e),this.motions)for(let[t,n]of Object.entries(this.motions))for(let r=0;r{this.emit(`motion:`+t)})}isFinished(){return this.queueManager.isFinished()}_startMotion(e,t){return e.setFinishedMotionHandler(t),this.queueManager.stopAllMotions(),this.queueManager.startMotion(e,!1,performance.now())}_stopAllMotions(){this.queueManager.stopAllMotions()}createMotion(e,t,n){let r=Cs.create(e),i=new ls(e),a=(t===this.groups.idle?Mc.idleMotionFadingDuration:Mc.motionFadingDuration)/1e3;return i.getMotionFadeInTime()===void 0&&r.setFadeInTime(n.FadeInTime>0?n.FadeInTime:a),i.getMotionFadeOutTime()===void 0&&r.setFadeOutTime(n.FadeOutTime>0?n.FadeOutTime:a),r.setEffectIds(this.eyeBlinkIds,this.lipSyncIds),r}getMotionFile(e){return e.File}getMotionName(e){return e.File}getSoundFile(e){return e.Sound}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}destroy(){super.destroy(),this.queueManager.release(),this.queueManager=void 0}};const kl=new Mo;var Al=class extends Zc{constructor(e,t,n){super(),this.lipSync=!0,this.breath=bo.create(),this.renderer=new xc,this.idParamAngleX=Cc,this.idParamAngleY=wc,this.idParamAngleZ=Tc,this.idParamEyeBallX=Ec,this.idParamEyeBallY=Dc,this.idParamBodyAngleX=Oc,this.idParamBreath=kc,this.pixelsPerUnit=1,this.centeringTransform=new Hn,this.coreModel=e,this.settings=t,this.motionManager=new Ol(t,n),this.init()}init(){var e;super.init(),(e=this.settings.getEyeBlinkParameters())?.length>0&&(this.eyeBlink=Co.create(this.settings)),this.breath.setParameters([new xo(this.idParamAngleX,0,15,6.5345,.5),new xo(this.idParamAngleY,0,8,3.5345,.5),new xo(this.idParamAngleZ,0,10,5.5345,.5),new xo(this.idParamBodyAngleX,0,4,15.5345,.5),new xo(this.idParamBreath,0,.5,3.2345,.5)]),this.renderer.initialize(this.coreModel),this.renderer.setIsPremultipliedAlpha(!0)}getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this.coreModel.getModel().canvasinfo.CanvasHeight]}getLayout(){let e={};if(this.settings.layout)for(let t of Object.keys(this.settings.layout)){let n=t.charAt(0).toLowerCase()+t.slice(1);e[n]=this.settings.layout[t]}return e}setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.getModel().canvasinfo.PixelsPerUnit,this.centeringTransform.scale(this.pixelsPerUnit,this.pixelsPerUnit).translate(this.originalWidth/2,this.originalHeight/2)}updateWebGLContext(e,t){this.renderer.firstDraw=!0,this.renderer._bufferData={vertex:null,uv:null,index:null},this.renderer.startUp(e),this.renderer._clippingManager._currentFrameNo=t,this.renderer._clippingManager._maskTexture=void 0,fc.getInstance()._shaderSets=[]}bindTexture(e,t){this.renderer.bindTexture(e,t)}getHitAreaDefs(){var e,t;return(t=(e=this.settings.hitAreas)?.map(e=>({id:e.Id,name:e.Name,index:this.coreModel.getDrawableIndex(e.Id)})))??[]}getDrawableIDs(){return this.coreModel.getDrawableIds()}getDrawableIndex(e){return this.coreModel.getDrawableIndex(e)}getDrawableVertices(e){if(typeof e==`string`&&(e=this.coreModel.getDrawableIndex(e),e===-1))throw TypeError(`Unable to find drawable ID: `+e);let t=this.coreModel.getDrawableVertices(e).slice();for(let e=0;e{function n(){try{Pl(),e()}catch(e){if(Ml--,Ml<0){let n=Error(`Failed to start up Cubism 4 framework.`);n.cause=e,t(n);return}Nc.log(`Cubism4`,`Startup failed, retrying 10ms later...`),setTimeout(n,10)}}n()}),jl)}function Pl(e){e=Object.assign({logFunction:console.log,loggingLevel:Vo.LogLevel_Verbose},e),Bo.startUp(e),Bo.initialize()}pl.registerRuntime({version:4,ready:Nl,test(e){return e instanceof Dl||Dl.isValidJSON(e)},isValidMoc(e){if(e.byteLength<4)return!1;let t=new Int8Array(e,0,4);return String.fromCharCode(...t)===`MOC3`},createModelSettings(e){return new Dl(e)},createCoreModel(e){let t=Jo.create(e);try{let e=t.createModel();return e.__moc=t,e}catch(e){try{t.release()}catch{}throw e}},createInternalModel(e,t,n){let r=new Al(e,t,n),i=e;return i.__moc&&(r.__moc=i.__moc,delete i.__moc,r.once(`destroy`,Fl)),r},createPhysics(e,t){return Vs.create(t)},createPose(e,t){return Do.create(t)}});function Fl(){var e;(e=this.__moc)==null||e.release()}var Il=S({__name:`Canvas`,props:{width:{},height:{},resolution:{default:2}},setup(e,{expose:t}){let n=e,r=Pe(),i=Pe(!1),a=Pe(),o=Pe();async function s(e){i.value=!0,xl.registerTicker(Mn),On.add(Nn),On.add(_o),a.value=new oo({width:n.width*n.resolution,height:n.height*n.resolution,backgroundAlpha:0,preserveDrawingBuffer:!0}),o.value=a.value.view,o.value.style.width=`100%`,o.value.style.height=`100%`,o.value.style.objectFit=`cover`,o.value.style.display=`block`,e.appendChild(a.value.view),i.value=!0}function c(){a.value&&a.value.renderer.resize(n.width,n.height)}je([()=>n.width,()=>n.height],()=>c()),je(()=>n.resolution,e=>{a.value&&e&&(a.value.renderer.resolution=e,c())}),De(async()=>r.value&&await s(r.value)),Oe(()=>a.value?.destroy());async function l(){let e=new Promise(e=>{if(!o.value||!a.value)return e(null);a.value.render(),o.value.toBlob(e)});return e}function u(){return o.value}return t({captureFrame:l,canvasElement:u}),(e,t)=>(ke(),le(`div`,{ref_key:`containerRef`,ref:r,"h-full":``,"w-full":``},[i.value?Ae(e.$slots,`default`,{key:0,app:a.value}):ce(``,!0)],512))}}),Ll=Il,Rl=function(e,t){return Rl=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])},Rl(e,t)};function zl(e,t){Rl(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Bl=`attribute vec2 aVertexPosition; +`)}return``}};const Gc=`SoundManager`,Kc=.5;var qc=class{static get volume(){return this._volume}static set volume(e){this._volume=(e>1?1:e<0?0:e)||0,this.audios.forEach(e=>e.volume=this._volume)}static add(e,t,n){let r=new Audio(e);return r.volume=this._volume,r.preload=`auto`,r.addEventListener(`ended`,()=>{this.dispose(r),t?.()}),r.addEventListener(`error`,t=>{this.dispose(r),Mc.warn(Gc,`Error occurred on "${e}"`,t.error),n?.(t.error)}),this.audios.push(r),r}static play(e){return new Promise((t,n)=>{var r;(r=e.play())==null||r.catch(t=>{e.dispatchEvent(new ErrorEvent(`error`,{error:t})),n(t)}),e.readyState===e.HAVE_ENOUGH_DATA?t():e.addEventListener(`canplaythrough`,t)})}static dispose(e){e.pause(),e.removeAttribute(`src`),Ic(this.audios,e)}static destroy(){for(let e=this.audios.length-1;e>=0;e--)this.dispose(this.audios[e])}};qc.audios=[],qc._volume=Kc;var Jc=class extends Jt.default{constructor(e,t){super(),this.motionGroups={},this.state=new Wc,this.playing=!1,this.destroyed=!1,this.settings=e,this.tag=`MotionManager(${e.name})`,this.state.tag=this.tag}init(e){e?.idleMotionGroup&&(this.groups.idle=e.idleMotionGroup),this.setupMotions(e),this.stopAllMotions()}setupMotions(e){for(let e of Object.keys(this.definitions))this.motionGroups[e]=[];let t;switch(e?.motionPreload){case`NONE`:return;case`ALL`:t=Object.keys(this.definitions);break;case`IDLE`:default:t=[this.groups.idle];break}for(let e of t)if(this.definitions[e])for(let t=0;tthis.currentAudio=void 0,()=>this.currentAudio=void 0),this.currentAudio=a}catch(t){Mc.warn(this.tag,`Failed to create audio`,e,t)}}let o=yield this.loadMotion(e,t);if(a){let e=qc.play(a).catch(e=>Mc.warn(this.tag,`Failed to play audio`,a.src,e));jc.motionSync&&(yield e)}return this.state.start(o,e,t,n)?(Mc.log(this.tag,`Start motion:`,this.getMotionName(i)),this.emit(`motionStart`,e,t,a),this.state.shouldOverrideExpression()&&this.expressionManager&&this.expressionManager.resetExpression(),this.playing=!0,this._startMotion(o),!0):(a&&(qc.dispose(a),this.currentAudio=void 0),!1)})}startRandomMotion(e,t){return vo(this,null,function*(){let n=this.definitions[e];if(n?.length){let r=[];for(let t=0;te.index>=0);for(let t of e)this.hitAreas[t.name]=t}hitTest(e,t){return Object.keys(this.hitAreas).filter(n=>this.isHit(n,e,t))}isHit(e,t,n){if(!this.hitAreas[e])return!1;let r=this.hitAreas[e].index,i=this.getDrawableBounds(r,Yc);return i.x<=t&&t<=i.x+i.width&&i.y<=n&&n<=i.y+i.height}getDrawableBounds(e,t){let n=this.getDrawableVertices(e),r=n[0],i=n[0],a=n[1],o=n[1];for(let e=0;e{(a.status===200||a.status===0)&&a.response?r(a.response):a.onerror()},a.onerror=()=>{Mc.warn(Zc,`Failed to load resource as ${a.responseType} (Status ${a.status}): ${t}`),i(new Qc(`Network error.`,t,a.status))},a.onabort=()=>i(new Qc(`Aborted.`,t,a.status,!0)),a.onloadend=()=>{var t;$c.allXhrSet.delete(a),e&&((t=$c.xhrMap.get(e))==null||t.delete(a))},a}static cancelXHRs(){var e;(e=$c.xhrMap.get(this))==null||e.forEach(e=>{e.abort(),$c.allXhrSet.delete(e)}),$c.xhrMap.delete(this)}static release(){$c.allXhrSet.forEach(e=>e.abort()),$c.allXhrSet.clear(),$c.xhrMap=new WeakMap}};let el=$c;el.xhrMap=new WeakMap,el.allXhrSet=new Set,el.loader=(e,t)=>new Promise((t,n)=>{let r=$c.createXHR(e.target,e.settings?e.settings.resolveURL(e.url):e.url,e.type,n=>{e.result=n,t()},n);r.send()});function tl(e,t){let n=-1;return r(0);function r(i,a){if(a)return Promise.reject(a);if(i<=n)return Promise.reject(Error(`next() called multiple times`));n=i;let o=e[i];if(!o)return Promise.resolve();try{return Promise.resolve(o(t,r.bind(null,i+1)))}catch(e){return Promise.reject(e)}}}var nl=class{static load(e){return tl(this.middlewares,e).then(()=>e.result)}};nl.middlewares=[el.loader];function rl(e,t={}){var n;let r={resourceOptions:{crossorigin:t.crossOrigin}};if(wr.fromURL)return wr.fromURL(e,r).catch(e=>{if(e instanceof Error)throw e;let t=Error(`Texture loading error`);throw t.event=e,t});r.resourceOptions.autoLoad=!1;let i=wr.from(e,r);if(i.baseTexture.valid)return Promise.resolve(i);let a=i.baseTexture.resource;return(n=a._live2d_load)??(a._live2d_load=new Promise((e,t)=>{let n=e=>{a.source.removeEventListener(`error`,n);let r=Error(`Texture loading error`);r.event=e,t(r)};a.source.addEventListener(`error`,n),a.load().then(()=>e(i)).catch(n)})),a._live2d_load}const il=`Live2DFactory`,al=(e,t)=>vo(void 0,null,function*(){if(typeof e.source==`string`){let t=yield nl.load({url:e.source,type:`json`,target:e.live2dModel});t.url=e.source,e.source=t,e.live2dModel.emit(`settingsJSONLoaded`,t)}return t()}),ol=(e,t)=>vo(void 0,null,function*(){if(e.source instanceof Hc)return e.settings=e.source,t();if(typeof e.source==`object`){let n=fl.findRuntime(e.source);if(n){let r=n.createModelSettings(e.source);return e.settings=r,e.live2dModel.emit(`settingsLoaded`,r),t()}}throw TypeError(`Unknown settings format.`)}),sl=(e,t)=>{if(e.settings){let n=fl.findRuntime(e.settings);if(n)return n.ready().then(t)}return t()},cl=(e,t)=>vo(void 0,null,function*(){yield t();let n=e.internalModel;if(n){let t=e.settings,r=fl.findRuntime(t);if(r){let i=[];t.pose&&i.push(nl.load({settings:t,url:t.pose,type:`json`,target:n}).then(t=>{n.pose=r.createPose(n.coreModel,t),e.live2dModel.emit(`poseLoaded`,n.pose)}).catch(t=>{e.live2dModel.emit(`poseLoadError`,t),Mc.warn(il,`Failed to load pose.`,t)})),t.physics&&i.push(nl.load({settings:t,url:t.physics,type:`json`,target:n}).then(t=>{n.physics=r.createPhysics(n.coreModel,t),e.live2dModel.emit(`physicsLoaded`,n.physics)}).catch(t=>{e.live2dModel.emit(`physicsLoadError`,t),Mc.warn(il,`Failed to load physics.`,t)})),i.length&&(yield Promise.all(i))}}}),ll=(e,t)=>vo(void 0,null,function*(){if(e.settings){let n=e.live2dModel,r=e.settings.textures.map(t=>{let n=e.settings.resolveURL(t);return rl(n,{crossOrigin:e.options.crossOrigin})});if(yield t(),e.internalModel)n.internalModel=e.internalModel,n.emit(`modelLoaded`,e.internalModel);else throw TypeError(`Missing internal model.`);n.textures=yield Promise.all(r),n.emit(`textureLoaded`,n.textures)}else throw TypeError(`Missing settings.`)}),ul=(e,t)=>vo(void 0,null,function*(){let n=e.settings;if(n instanceof Hc){let r=fl.findRuntime(n);if(!r)throw TypeError(`Unknown model settings.`);let i=yield nl.load({settings:n,url:n.moc,type:`arraybuffer`,target:e.live2dModel});if(!r.isValidMoc(i))throw Error(`Invalid moc data`);let a=r.createCoreModel(i);return e.internalModel=r.createInternalModel(a,n,e.options),t()}throw TypeError(`Missing settings.`)}),dl=class{static registerRuntime(e){dl.runtimes.push(e),dl.runtimes.sort((e,t)=>t.version-e.version)}static findRuntime(e){for(let t of dl.runtimes)if(t.test(e))return t}static setupLive2DModel(e,t,n){return vo(this,null,function*(){let r=new Promise(t=>e.once(`textureLoaded`,t)),i=new Promise(t=>e.once(`modelLoaded`,t)),a=Promise.all([r,i]).then(()=>e.emit(`ready`));yield tl(dl.live2DModelMiddlewares,{live2dModel:e,source:t,options:n||{}}),yield a,e.emit(`load`)})}static loadMotion(e,t,n){var r,i;let a=r=>e.emit(`motionLoadError`,t,n,r);try{let o=(r=e.definitions[t])?.[n];if(!o)return Promise.resolve(void 0);e.listeners(`destroy`).includes(dl.releaseTasks)||e.once(`destroy`,dl.releaseTasks);let s=dl.motionTasksMap.get(e);s||(s={},dl.motionTasksMap.set(e,s));let c=s[t];c||(c=[],s[t]=c);let l=e.getMotionFile(o);return(i=c[n])??(c[n]=nl.load({url:l,settings:e.settings,type:e.motionDataType,target:e}).then(r=>{var i;let a=(i=dl.motionTasksMap.get(e))?.[t];a&&delete a[n];let s=e.createMotion(r,t,o);return e.emit(`motionLoaded`,t,n,s),s}).catch(t=>{Mc.warn(e.tag,`Failed to load motion: ${l} +`,t),a(t)})),c[n]}catch(r){Mc.warn(e.tag,`Failed to load motion at "${t}"[${n}] +`,r),a(r)}return Promise.resolve(void 0)}static loadExpression(e,t){var n;let r=n=>e.emit(`expressionLoadError`,t,n);try{let i=e.definitions[t];if(!i)return Promise.resolve(void 0);e.listeners(`destroy`).includes(dl.releaseTasks)||e.once(`destroy`,dl.releaseTasks);let a=dl.expressionTasksMap.get(e);a||(a=[],dl.expressionTasksMap.set(e,a));let o=e.getExpressionFile(i);return(n=a[t])??(a[t]=nl.load({url:o,settings:e.settings,type:`json`,target:e}).then(n=>{let r=dl.expressionTasksMap.get(e);r&&delete r[t];let a=e.createExpression(n,i);return e.emit(`expressionLoaded`,t,a),a}).catch(t=>{Mc.warn(e.tag,`Failed to load expression: ${o} +`,t),r(t)})),a[t]}catch(n){Mc.warn(e.tag,`Failed to load expression at [${t}] +`,n),r(n)}return Promise.resolve(void 0)}static releaseTasks(){this instanceof Jc?dl.motionTasksMap.delete(this):dl.expressionTasksMap.delete(this)}};let fl=dl;fl.runtimes=[],fl.urlToJSON=al,fl.jsonToSettings=ol,fl.waitUntilReady=sl,fl.setupOptionals=cl,fl.setupEssentials=ll,fl.createInternalModel=ul,fl.live2DModelMiddlewares=[al,ol,sl,cl,ll,ul],fl.motionTasksMap=new WeakMap,fl.expressionTasksMap=new WeakMap,Jc.prototype._loadMotion=function(e,t){return fl.loadMotion(this,e,t)},Lc.prototype._loadExpression=function(e){return fl.loadExpression(this,e)};var pl=class{constructor(){this._autoInteract=!1}get autoInteract(){return this._autoInteract}set autoInteract(e){e!==this._autoInteract&&(e?this.on(`pointertap`,ml,this):this.off(`pointertap`,ml,this),this._autoInteract=e)}registerInteraction(e){e!==this.interactionManager&&(this.unregisterInteraction(),this._autoInteract&&e&&(this.interactionManager=e,e.on(`pointermove`,hl,this)))}unregisterInteraction(){var e;this.interactionManager&&((e=this.interactionManager)==null||e.off(`pointermove`,hl,this),this.interactionManager=void 0)}};function ml(e){this.tap(e.data.global.x,e.data.global.y)}function hl(e){this.focus(e.data.global.x,e.data.global.y)}var gl=class extends Zn{};const _l=new Ln,vl=new Vn;let yl;var bl=class extends ro{constructor(e){super(),this.tag=`Live2DModel(uninitialized)`,this.textures=[],this.transform=new gl,this.anchor=new Bn(this.onAnchorChange,this,0,0),this.glContextID=-1,this.elapsedTime=performance.now(),this.deltaTime=0,this._autoUpdate=!1,this.once(`modelLoaded`,()=>this.init(e))}static from(e,t){let n=new this(t);return fl.setupLive2DModel(n,e,t).then(()=>n)}static fromSync(e,t){let n=new this(t);return fl.setupLive2DModel(n,e,t).then(t?.onLoad).catch(t?.onError),n}static registerTicker(e){yl=e}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){var t;yl||=(t=window.PIXI)?.Ticker,e?this._destroyed||(yl?(yl.shared.add(this.onTickerUpdate,this),this._autoUpdate=!0):Mc.warn(this.tag,`No Ticker registered, please call Live2DModel.registerTicker(Ticker).`)):(yl?.shared.remove(this.onTickerUpdate,this),this._autoUpdate=!1)}init(e){this.tag=`Live2DModel(${this.internalModel.settings.name})`;let t=Object.assign({autoUpdate:!0,autoInteract:!0},e);t.autoInteract&&(this.interactive=!0),this.autoInteract=t.autoInteract,this.autoUpdate=t.autoUpdate}onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width,this.anchor.y*this.internalModel.height)}motion(e,t,n){return t===void 0?this.internalModel.motionManager.startRandomMotion(e,n):this.internalModel.motionManager.startMotion(e,t,n)}expression(e){return this.internalModel.motionManager.expressionManager?e===void 0?this.internalModel.motionManager.expressionManager.setRandomExpression():this.internalModel.motionManager.expressionManager.setExpression(e):Promise.resolve(!1)}focus(e,t,n=!1){_l.x=e,_l.y=t,this.toModelPosition(_l,_l,!0);let r=_l.x/this.internalModel.originalWidth*2-1,i=_l.y/this.internalModel.originalHeight*2-1,a=Math.atan2(i,r);this.internalModel.focusController.focus(Math.cos(a),-Math.sin(a),n)}tap(e,t){let n=this.hitTest(e,t);n.length&&(Mc.log(this.tag,`Hit`,n),this.emit(`hit`,n))}hitTest(e,t){return _l.x=e,_l.y=t,this.toModelPosition(_l,_l),this.internalModel.hitTest(_l.x,_l.y)}toModelPosition(e,t=e.clone(),n){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.transform.worldTransform.applyInverse(e,t),this.internalModel.localTransform.applyInverse(t,t),t}containsPoint(e){return this.getBounds(!0).contains(e.x,e.y)}_calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.internalModel.width,this.internalModel.height)}onTickerUpdate(){this.update(yl.shared.deltaMS)}update(e){this.deltaTime+=e,this.elapsedTime+=e}_render(e){this.registerInteraction(e.plugins.interaction),e.batch.reset(),e.geometry.reset(),e.shader.reset(),e.state.reset();let t=!1;this.glContextID!==e.CONTEXT_UID&&(this.glContextID=e.CONTEXT_UID,this.internalModel.updateWebGLContext(e.gl,this.glContextID),t=!0);for(let n=0;nt.destroy(e.baseTexture)),this.internalModel.destroy(),super.destroy(e)}};Pc(bl,[pl]);const xl=class{static resolveURL(e,t){var n;let r=(n=xl.filesMap[e])?.[t];if(r===void 0)throw Error(`Cannot find this file from uploaded files: `+t);return r}static upload(e,t){return vo(this,null,function*(){let n={};for(let r of t.getDefinedFiles()){let i=decodeURI(Xt.resolve(t.url,r)),a=e.find(e=>e.webkitRelativePath===i);a&&(n[r]=URL.createObjectURL(a))}xl.filesMap[t._objectURL]=n})}static createSettings(e){return vo(this,null,function*(){let t=e.find(e=>e.name.endsWith(`model.json`)||e.name.endsWith(`model3.json`));if(!t)throw TypeError(`Settings file not found`);let n=yield xl.readText(t),r=JSON.parse(n);r.url=t.webkitRelativePath;let i=fl.findRuntime(r);if(!i)throw Error(`Unknown settings JSON`);let a=i.createModelSettings(r);return a._objectURL=URL.createObjectURL(t),a})}static readText(e){return vo(this,null,function*(){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsText(e,`utf8`)})})}};let Sl=xl;Sl.filesMap={},Sl.factory=(e,t)=>vo(void 0,null,function*(){if(Array.isArray(e.source)&&e.source[0]instanceof File){let t=e.source,n=t.settings;if(!n)n=yield xl.createSettings(t);else if(!n._objectURL)throw Error(`"_objectURL" must be specified in ModelSettings`);n.validateFiles(t.map(e=>encodeURI(e.webkitRelativePath))),yield xl.upload(t,n),n.resolveURL=function(e){return xl.resolveURL(this._objectURL,e)},e.source=n,e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){let e=this.settings._objectURL;if(URL.revokeObjectURL(e),xl.filesMap[e])for(let t of Object.values(xl.filesMap[e]))URL.revokeObjectURL(t);delete xl.filesMap[e]})})}return t()}),fl.live2DModelMiddlewares.unshift(Sl.factory);const Cl=class{static unzip(e,t){return vo(this,null,function*(){let n=yield Cl.getFilePaths(e),r=[];for(let e of t.getDefinedFiles()){let i=decodeURI(Xt.resolve(t.url,e));n.includes(i)&&r.push(i)}let i=yield Cl.getFiles(e,r);for(let e=0;ee.endsWith(`model.json`)||e.endsWith(`model3.json`));if(!n)throw Error(`Settings file not found`);let r=yield Cl.readText(e,n);if(!r)throw Error(`Empty settings file: `+n);let i=JSON.parse(r);i.url=n;let a=fl.findRuntime(i);if(!a)throw Error(`Unknown settings JSON`);return a.createModelSettings(i)})}static zipReader(e,t){return vo(this,null,function*(){throw Error(`Not implemented`)})}static getFilePaths(e){return vo(this,null,function*(){throw Error(`Not implemented`)})}static getFiles(e,t){return vo(this,null,function*(){throw Error(`Not implemented`)})}static readText(e,t){return vo(this,null,function*(){throw Error(`Not implemented`)})}static releaseReader(e){}};let wl=Cl;if(wl.ZIP_PROTOCOL=`zip://`,wl.uid=0,wl.factory=(e,t)=>vo(void 0,null,function*(){let n=e.source,r,i,a;if(typeof n==`string`&&(n.endsWith(`.zip`)||n.startsWith(Cl.ZIP_PROTOCOL))?(r=n.startsWith(Cl.ZIP_PROTOCOL)?n.slice(Cl.ZIP_PROTOCOL.length):n,i=yield nl.load({url:r,type:`blob`,target:e.live2dModel})):Array.isArray(n)&&n.length===1&&n[0]instanceof File&&n[0].name.endsWith(`.zip`)&&(i=n[0],r=URL.createObjectURL(i),a=n.settings),i){if(!i.size)throw Error(`Empty zip file`);let t=yield Cl.zipReader(i,r);a||=yield Cl.createSettings(t),a._objectURL=Cl.ZIP_PROTOCOL+Cl.uid+`/`+a.url;let n=yield Cl.unzip(t,a);n.settings=a,e.source=n,r.startsWith(`blob:`)&&e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){URL.revokeObjectURL(r)})}),Cl.releaseReader(t)}return t()}),fl.live2DModelMiddlewares.unshift(wl.factory),!window.Live2DCubismCore)throw Error(`Could not find Cubism 4 runtime. This plugin requires live2dcubismcore.js to be loaded.`);var Tl=class extends Lc{constructor(e,t){var n;super(e,t),this.queueManager=new ws,this.definitions=(n=e.expressions)??[],this.init()}isFinished(){return this.queueManager.isFinished()}getExpressionIndex(e){return this.definitions.findIndex(t=>t.Name===e)}getExpressionFile(e){return e.File}createExpression(e,t){return Xo.create(e)}_setExpression(e){return this.queueManager.startMotion(e,!1,performance.now())}stopAllExpressions(){this.queueManager.stopAllMotions()}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}},El=class e extends Hc{constructor(t){if(super(t),!e.isValidJSON(t))throw TypeError(`Invalid JSON.`);Object.assign(this,new xc(t))}static isValidJSON(e){var t;return!!e?.FileReferences&&typeof e.FileReferences.Moc==`string`&&(t=e.FileReferences.Textures)?.length>0&&e.FileReferences.Textures.every(e=>typeof e==`string`)}replaceFiles(e){if(super.replaceFiles(e),this.motions)for(let[t,n]of Object.entries(this.motions))for(let r=0;r{this.emit(`motion:`+t)})}isFinished(){return this.queueManager.isFinished()}_startMotion(e,t){return e.setFinishedMotionHandler(t),this.queueManager.stopAllMotions(),this.queueManager.startMotion(e,!1,performance.now())}_stopAllMotions(){this.queueManager.stopAllMotions()}createMotion(e,t,n){let r=Ss.create(e),i=new cs(e),a=(t===this.groups.idle?jc.idleMotionFadingDuration:jc.motionFadingDuration)/1e3;return i.getMotionFadeInTime()===void 0&&r.setFadeInTime(n.FadeInTime>0?n.FadeInTime:a),i.getMotionFadeOutTime()===void 0&&r.setFadeOutTime(n.FadeOutTime>0?n.FadeOutTime:a),r.setEffectIds(this.eyeBlinkIds,this.lipSyncIds),r}getMotionFile(e){return e.File}getMotionName(e){return e.File}getSoundFile(e){return e.Sound}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}destroy(){super.destroy(),this.queueManager.release(),this.queueManager=void 0}};const Ol=new jo;var kl=class extends Xc{constructor(e,t,n){super(),this.lipSync=!0,this.breath=yo.create(),this.renderer=new bc,this.idParamAngleX=Sc,this.idParamAngleY=Cc,this.idParamAngleZ=wc,this.idParamEyeBallX=Tc,this.idParamEyeBallY=Ec,this.idParamBodyAngleX=Dc,this.idParamBreath=Oc,this.pixelsPerUnit=1,this.centeringTransform=new Vn,this.coreModel=e,this.settings=t,this.motionManager=new Dl(t,n),this.init()}init(){var e;super.init(),(e=this.settings.getEyeBlinkParameters())?.length>0&&(this.eyeBlink=So.create(this.settings)),this.breath.setParameters([new bo(this.idParamAngleX,0,15,6.5345,.5),new bo(this.idParamAngleY,0,8,3.5345,.5),new bo(this.idParamAngleZ,0,10,5.5345,.5),new bo(this.idParamBodyAngleX,0,4,15.5345,.5),new bo(this.idParamBreath,0,.5,3.2345,.5)]),this.renderer.initialize(this.coreModel),this.renderer.setIsPremultipliedAlpha(!0)}getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this.coreModel.getModel().canvasinfo.CanvasHeight]}getLayout(){let e={};if(this.settings.layout)for(let t of Object.keys(this.settings.layout)){let n=t.charAt(0).toLowerCase()+t.slice(1);e[n]=this.settings.layout[t]}return e}setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.getModel().canvasinfo.PixelsPerUnit,this.centeringTransform.scale(this.pixelsPerUnit,this.pixelsPerUnit).translate(this.originalWidth/2,this.originalHeight/2)}updateWebGLContext(e,t){this.renderer.firstDraw=!0,this.renderer._bufferData={vertex:null,uv:null,index:null},this.renderer.startUp(e),this.renderer._clippingManager._currentFrameNo=t,this.renderer._clippingManager._maskTexture=void 0,dc.getInstance()._shaderSets=[]}bindTexture(e,t){this.renderer.bindTexture(e,t)}getHitAreaDefs(){var e,t;return(t=(e=this.settings.hitAreas)?.map(e=>({id:e.Id,name:e.Name,index:this.coreModel.getDrawableIndex(e.Id)})))??[]}getDrawableIDs(){return this.coreModel.getDrawableIds()}getDrawableIndex(e){return this.coreModel.getDrawableIndex(e)}getDrawableVertices(e){if(typeof e==`string`&&(e=this.coreModel.getDrawableIndex(e),e===-1))throw TypeError(`Unable to find drawable ID: `+e);let t=this.coreModel.getDrawableVertices(e).slice();for(let e=0;e{function n(){try{Nl(),e()}catch(e){if(jl--,jl<0){let n=Error(`Failed to start up Cubism 4 framework.`);n.cause=e,t(n);return}Mc.log(`Cubism4`,`Startup failed, retrying 10ms later...`),setTimeout(n,10)}}n()}),Al)}function Nl(e){e=Object.assign({logFunction:console.log,loggingLevel:Bo.LogLevel_Verbose},e),zo.startUp(e),zo.initialize()}fl.registerRuntime({version:4,ready:Ml,test(e){return e instanceof El||El.isValidJSON(e)},isValidMoc(e){if(e.byteLength<4)return!1;let t=new Int8Array(e,0,4);return String.fromCharCode(...t)===`MOC3`},createModelSettings(e){return new El(e)},createCoreModel(e){let t=qo.create(e);try{let e=t.createModel();return e.__moc=t,e}catch(e){try{t.release()}catch{}throw e}},createInternalModel(e,t,n){let r=new kl(e,t,n),i=e;return i.__moc&&(r.__moc=i.__moc,delete i.__moc,r.once(`destroy`,Pl)),r},createPhysics(e,t){return Bs.create(t)},createPose(e,t){return Eo.create(t)}});function Pl(){var e;(e=this.__moc)==null||e.release()}var Fl=Te({__name:`Canvas`,props:{width:{},height:{},resolution:{default:2}},setup(e,{expose:t}){let n=e,r=Ne(),i=Ne(!1),a=Ne(),o=Ne();async function s(e){i.value=!0,bl.registerTicker(jn),Dn.add(Mn),Dn.add(go),a.value=new ao({width:n.width*n.resolution,height:n.height*n.resolution,backgroundAlpha:0,preserveDrawingBuffer:!0}),o.value=a.value.view,o.value.style.width=`100%`,o.value.style.height=`100%`,o.value.style.objectFit=`cover`,o.value.style.display=`block`,e.appendChild(a.value.view),i.value=!0}function c(){a.value&&a.value.renderer.resize(n.width,n.height)}Ae([()=>n.width,()=>n.height],()=>c()),Ae(()=>n.resolution,e=>{a.value&&e&&(a.value.renderer.resolution=e,c())}),Ee(async()=>r.value&&await s(r.value)),De(()=>a.value?.destroy());async function l(){let e=new Promise(e=>{if(!o.value||!a.value)return e(null);a.value.render(),o.value.toBlob(e)});return e}function u(){return o.value}return t({captureFrame:l,canvasElement:u}),(e,t)=>(Oe(),ce(`div`,{ref_key:`containerRef`,ref:r,"h-full":``,"w-full":``},[i.value?ke(e.$slots,`default`,{key:0,app:a.value}):se(``,!0)],512))}}),Il=Fl,Ll=function(e,t){return Ll=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])},Ll(e,t)};function Rl(e,t){Ll(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var zl=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -558,7 +558,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Vl=`varying vec2 vTextureCoord; +}`,Bl=`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform float gamma; @@ -589,7 +589,7 @@ void main(void) gl_FragColor = c * alpha; } -`;(function(e){zl(t,e);function t(t){var n=e.call(this,Bl,Vl)||this;return n.gamma=1,n.saturation=1,n.contrast=1,n.brightness=1,n.red=1,n.green=1,n.blue=1,n.alpha=1,Object.assign(n,t),n}return t.prototype.apply=function(e,t,n,r){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,n,r)},t})(Vi); +`;(function(e){Rl(t,e);function t(t){var n=e.call(this,zl,Bl)||this;return n.gamma=1,n.saturation=1,n.contrast=1,n.brightness=1,n.red=1,n.green=1,n.blue=1,n.alpha=1,Object.assign(n,t),n}return t.prototype.apply=function(e,t,n,r){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,t,n,r)},t})(Bi); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -617,7 +617,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var Hl=function(e,t){return Hl=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])},Hl(e,t)};function Ul(e,t){Hl(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Wl=`attribute vec2 aVertexPosition; +var Vl=function(e,t){return Vl=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])},Vl(e,t)};function Hl(e,t){Vl(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ul=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -628,7 +628,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Gl=` +}`,Wl=` varying vec2 vTextureCoord; uniform sampler2D uSampler; @@ -654,7 +654,7 @@ void main(void) color *= 0.25; gl_FragColor = color; -}`,Kl=` +}`,Gl=` varying vec2 vTextureCoord; uniform sampler2D uSampler; @@ -682,7 +682,7 @@ void main(void) gl_FragColor = color; } -`,ql=function(e){Ul(t,e);function t(t,n,r){t===void 0&&(t=4),n===void 0&&(n=3),r===void 0&&(r=!1);var i=e.call(this,Wl,r?Kl:Gl)||this;return i._kernels=[],i._blur=4,i._quality=3,i.uniforms.uOffset=new Float32Array(2),i._pixelSize=new Rn,i.pixelSize=1,i._clamp=r,Array.isArray(t)?i.kernels=t:(i._blur=t,i.quality=n),i}return t.prototype.apply=function(e,t,n,r){var i=this._pixelSize.x/t._frame.width,a=this._pixelSize.y/t._frame.height,o;if(this._quality===1||this._blur===0)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*i,this.uniforms.uOffset[1]=o*a,e.applyFilter(this,t,n,r);else{for(var s=e.getFilterTexture(),c=t,l=s,u=void 0,d=this._quality-1,f=0;f0)for(var r=e,i=e/t,a=1;a0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`clamp`,{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`pixelSize`,{get:function(){return this._pixelSize},set:function(e){typeof e==`number`?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof Rn?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`quality`,{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blur`,{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),t}(Vi),Jl=function(e,t){return Jl=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])},Jl(e,t)};function Yl(e,t){Jl(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Xl=`attribute vec2 aVertexPosition; +`,Kl=function(e){Hl(t,e);function t(t,n,r){t===void 0&&(t=4),n===void 0&&(n=3),r===void 0&&(r=!1);var i=e.call(this,Ul,r?Gl:Wl)||this;return i._kernels=[],i._blur=4,i._quality=3,i.uniforms.uOffset=new Float32Array(2),i._pixelSize=new Ln,i.pixelSize=1,i._clamp=r,Array.isArray(t)?i.kernels=t:(i._blur=t,i.quality=n),i}return t.prototype.apply=function(e,t,n,r){var i=this._pixelSize.x/t._frame.width,a=this._pixelSize.y/t._frame.height,o;if(this._quality===1||this._blur===0)o=this._kernels[0]+.5,this.uniforms.uOffset[0]=o*i,this.uniforms.uOffset[1]=o*a,e.applyFilter(this,t,n,r);else{for(var s=e.getFilterTexture(),c=t,l=s,u=void 0,d=this._quality-1,f=0;f0)for(var r=e,i=e/t,a=1;a0?(this._kernels=e,this._quality=e.length,this._blur=Math.max.apply(Math,e)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`clamp`,{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`pixelSize`,{get:function(){return this._pixelSize},set:function(e){typeof e==`number`?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof Ln?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`quality`,{get:function(){return this._quality},set:function(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blur`,{get:function(){return this._blur},set:function(e){this._blur=e,this._generateKernels()},enumerable:!1,configurable:!0}),t}(Bi),ql=function(e,t){return ql=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])},ql(e,t)};function Jl(e,t){ql(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Yl=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -693,7 +693,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Zl=` +}`,Xl=` uniform sampler2D uSampler; varying vec2 vTextureCoord; @@ -714,7 +714,7 @@ void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } } -`,Ql=function(e){Yl(t,e);function t(t){t===void 0&&(t=.5);var n=e.call(this,Xl,Zl)||this;return n.threshold=t,n}return Object.defineProperty(t.prototype,`threshold`,{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),t}(Vi),$l=`uniform sampler2D uSampler; +`,Zl=function(e){Jl(t,e);function t(t){t===void 0&&(t=.5);var n=e.call(this,Yl,Xl)||this;return n.threshold=t,n}return Object.defineProperty(t.prototype,`threshold`,{get:function(){return this.uniforms.threshold},set:function(e){this.uniforms.threshold=e},enumerable:!1,configurable:!0}),t}(Bi),Ql=`uniform sampler2D uSampler; varying vec2 vTextureCoord; uniform sampler2D bloomTexture; @@ -728,7 +728,7 @@ void main() { bloomColor.rgb *= bloomScale; gl_FragColor = color + bloomColor; } -`;(function(e){Yl(t,e);function t(n){var r=e.call(this,Xl,$l)||this;r.bloomScale=1,r.brightness=1,r._resolution=I.FILTER_RESOLUTION,typeof n==`number`&&(n={threshold:n});var i=Object.assign(t.defaults,n);r.bloomScale=i.bloomScale,r.brightness=i.brightness;var a=i.kernels,o=i.blur,s=i.quality,c=i.pixelSize,l=i.resolution;return r._extractFilter=new Ql(i.threshold),r._extractFilter.resolution=l,r._blurFilter=a?new ql(a):new ql(o,s),r.pixelSize=c,r.resolution=l,r}return t.prototype.apply=function(e,t,n,r,i){var a=e.getFilterTexture();this._extractFilter.apply(e,t,a,1,i);var o=e.getFilterTexture();this._blurFilter.apply(e,a,o,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=o,e.applyFilter(this,t,n,r),e.returnFilterTexture(o),e.returnFilterTexture(a)},Object.defineProperty(t.prototype,`resolution`,{get:function(){return this._resolution},set:function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`threshold`,{get:function(){return this._extractFilter.threshold},set:function(e){this._extractFilter.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`kernels`,{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blur`,{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`quality`,{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`pixelSize`,{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),t.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:I.FILTER_RESOLUTION},t})(Vi); +`;(function(e){Jl(t,e);function t(n){var r=e.call(this,Yl,Ql)||this;r.bloomScale=1,r.brightness=1,r._resolution=L.FILTER_RESOLUTION,typeof n==`number`&&(n={threshold:n});var i=Object.assign(t.defaults,n);r.bloomScale=i.bloomScale,r.brightness=i.brightness;var a=i.kernels,o=i.blur,s=i.quality,c=i.pixelSize,l=i.resolution;return r._extractFilter=new Zl(i.threshold),r._extractFilter.resolution=l,r._blurFilter=a?new Kl(a):new Kl(o,s),r.pixelSize=c,r.resolution=l,r}return t.prototype.apply=function(e,t,n,r,i){var a=e.getFilterTexture();this._extractFilter.apply(e,t,a,1,i);var o=e.getFilterTexture();this._blurFilter.apply(e,a,o,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=o,e.applyFilter(this,t,n,r),e.returnFilterTexture(o),e.returnFilterTexture(a)},Object.defineProperty(t.prototype,`resolution`,{get:function(){return this._resolution},set:function(e){this._resolution=e,this._extractFilter&&(this._extractFilter.resolution=e),this._blurFilter&&(this._blurFilter.resolution=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`threshold`,{get:function(){return this._extractFilter.threshold},set:function(e){this._extractFilter.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`kernels`,{get:function(){return this._blurFilter.kernels},set:function(e){this._blurFilter.kernels=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`blur`,{get:function(){return this._blurFilter.blur},set:function(e){this._blurFilter.blur=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`quality`,{get:function(){return this._blurFilter.quality},set:function(e){this._blurFilter.quality=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`pixelSize`,{get:function(){return this._blurFilter.pixelSize},set:function(e){this._blurFilter.pixelSize=e},enumerable:!1,configurable:!0}),t.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:L.FILTER_RESOLUTION},t})(Bi); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -756,7 +756,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var eu=function(e,t){return eu=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])},eu(e,t)};function tu(e,t){eu(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var nu=`attribute vec2 aVertexPosition; +var $l=function(e,t){return $l=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])},$l(e,t)};function eu(e,t){$l(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var tu=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -767,7 +767,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,ru=`varying vec2 vTextureCoord; +}`,nu=`varying vec2 vTextureCoord; uniform vec4 filterArea; uniform float pixelSize; @@ -841,7 +841,7 @@ void main() gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0); } -`;(function(e){tu(t,e);function t(t){t===void 0&&(t=8);var n=e.call(this,nu,ru)||this;return n.size=t,n}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.uniforms.pixelSize},set:function(e){this.uniforms.pixelSize=e},enumerable:!1,configurable:!0}),t})(Vi); +`;(function(e){eu(t,e);function t(t){t===void 0&&(t=8);var n=e.call(this,tu,nu)||this;return n.size=t,n}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.uniforms.pixelSize},set:function(e){this.uniforms.pixelSize=e},enumerable:!1,configurable:!0}),t})(Bi); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -869,7 +869,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var iu=function(e,t){return iu=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])},iu(e,t)};function au(e,t){iu(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ou=`attribute vec2 aVertexPosition; +var ru=function(e,t){return ru=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])},ru(e,t)};function iu(e,t){ru(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var au=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -880,7 +880,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,su=`precision mediump float; +}`,ou=`precision mediump float; varying vec2 vTextureCoord; uniform sampler2D uSampler; @@ -903,7 +903,7 @@ void main(void) { color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0)); gl_FragColor = vec4(color.rgb * color.a, color.a); } -`;(function(e){au(t,e);function t(t){var n=e.call(this,ou,su)||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},t),n.padding=1,n}return t.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(t.prototype,`rotation`,{get:function(){return this._angle/In},set:function(e){this._angle=e*In,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`thickness`,{get:function(){return this._thickness},set:function(e){this._thickness=e,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lightColor`,{get:function(){return on(this.uniforms.lightColor)},set:function(e){rn(e,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lightAlpha`,{get:function(){return this.uniforms.lightAlpha},set:function(e){this.uniforms.lightAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`shadowColor`,{get:function(){return on(this.uniforms.shadowColor)},set:function(e){rn(e,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`shadowAlpha`,{get:function(){return this.uniforms.shadowAlpha},set:function(e){this.uniforms.shadowAlpha=e},enumerable:!1,configurable:!0}),t})(Vi); +`;(function(e){iu(t,e);function t(t){var n=e.call(this,au,ou)||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},t),n.padding=1,n}return t.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(t.prototype,`rotation`,{get:function(){return this._angle/Fn},set:function(e){this._angle=e*Fn,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`thickness`,{get:function(){return this._thickness},set:function(e){this._thickness=e,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lightColor`,{get:function(){return an(this.uniforms.lightColor)},set:function(e){nn(e,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lightAlpha`,{get:function(){return this.uniforms.lightAlpha},set:function(e){this.uniforms.lightAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`shadowColor`,{get:function(){return an(this.uniforms.shadowColor)},set:function(e){nn(e,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`shadowAlpha`,{get:function(){return this.uniforms.shadowAlpha},set:function(e){this.uniforms.shadowAlpha=e},enumerable:!1,configurable:!0}),t})(Bi); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -931,7 +931,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var cu=function(e,t){return cu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},cu(e,t)};function lu(e,t){cu(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var uu=`varying vec2 vTextureCoord; +var su=function(e,t){return su=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},su(e,t)};function cu(e,t){su(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var lu=`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform float uAlpha; @@ -940,7 +940,7 @@ void main(void) { gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha; } -`,du=function(e){lu(t,e);function t(t){t===void 0&&(t=1);var n=e.call(this,Ia,uu,{uAlpha:1})||this;return n.alpha=t,n}return Object.defineProperty(t.prototype,`alpha`,{get:function(){return this.uniforms.uAlpha},set:function(e){this.uniforms.uAlpha=e},enumerable:!1,configurable:!0}),t}(Vi),fu=function(e,t){return fu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},fu(e,t)};function pu(e,t){fu(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var mu=` +`,uu=function(e){cu(t,e);function t(t){t===void 0&&(t=1);var n=e.call(this,Fa,lu,{uAlpha:1})||this;return n.alpha=t,n}return Object.defineProperty(t.prototype,`alpha`,{get:function(){return this.uniforms.uAlpha},set:function(e){this.uniforms.uAlpha=e},enumerable:!1,configurable:!0}),t}(Bi),du=function(e,t){return du=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},du(e,t)};function fu(e,t){du(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var pu=` attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -970,10 +970,10 @@ void main(void) vec2 textureCoord = filterTextureCoord(); %blur% - }`;function hu(e,t){var n=Math.ceil(e/2),r=mu,i=``,a;a=t?`vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);`:`vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);`;for(var o=0;o=n&&(o=e-s-1),c=c.replace(`%value%`,t[o].toString()),i+=c,i+=` -`}return r=r.replace(`%blur%`,i),r=r.replace(`%size%`,e.toString()),r}var yu=function(e){pu(t,e);function t(t,n,r,i,a){n===void 0&&(n=8),r===void 0&&(r=4),i===void 0&&(i=I.FILTER_RESOLUTION),a===void 0&&(a=5);var o=this,s=hu(a,t),c=vu(a);return o=e.call(this,s,c)||this,o.horizontal=t,o.resolution=i,o._quality=0,o.quality=r,o.blur=n,o}return t.prototype.apply=function(e,t,n,r){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/t.width):this.uniforms.strength=1/n.height*(n.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,n,r);else{var i=e.getFilterTexture(),a=e.renderer,o=t,s=i;this.state.blend=!1,e.applyFilter(this,o,s,ut.CLEAR);for(var c=1;c=n&&(o=e-s-1),c=c.replace(`%value%`,t[o].toString()),i+=c,i+=` +`}return r=r.replace(`%blur%`,i),r=r.replace(`%size%`,e.toString()),r}var vu=function(e){fu(t,e);function t(t,n,r,i,a){n===void 0&&(n=8),r===void 0&&(r=4),i===void 0&&(i=L.FILTER_RESOLUTION),a===void 0&&(a=5);var o=this,s=mu(a,t),c=_u(a);return o=e.call(this,s,c)||this,o.horizontal=t,o.resolution=i,o._quality=0,o.quality=r,o.blur=n,o}return t.prototype.apply=function(e,t,n,r){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/t.width):this.uniforms.strength=1/n.height*(n.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,n,r);else{var i=e.getFilterTexture(),a=e.renderer,o=t,s=i;this.state.blend=!1,e.applyFilter(this,o,s,lt.CLEAR);for(var c=1;c0;n--){var r=Math.random()*n>>0,i=e[n];e[n]=e[r],e[r]=i}},t.prototype._randomizeOffsets=function(){for(var e=0;e0?r:0,c=r<0?-r:0;n.fillStyle=`rgba(`+s+`, `+c+`, 0, 1)`,n.fillRect(0,i>>0,e,o+1>>0),i+=o}t.baseTexture.update(),this.uniforms.displacementMap=t},Object.defineProperty(t.prototype,`sizes`,{get:function(){return this._sizes},set:function(e){for(var t=Math.min(this._slices,e.length),n=0;n0;n--){var r=Math.random()*n>>0,i=e[n];e[n]=e[r],e[r]=i}},t.prototype._randomizeOffsets=function(){for(var e=0;e0?r:0,c=r<0?-r:0;n.fillStyle=`rgba(`+s+`, `+c+`, 0, 1)`,n.fillRect(0,i>>0,e,o+1>>0),i+=o}t.baseTexture.update(),this.uniforms.displacementMap=t},Object.defineProperty(t.prototype,`sizes`,{get:function(){return this._sizes},set:function(e){for(var t=Math.min(this._slices,e.length),n=0;n>0)+1},Object.defineProperty(t.prototype,`offset`,{get:function(){return this.uniforms.uOffset},set:function(e){this.uniforms.uOffset=e},enumerable:!1,configurable:!0}),t})(Vi); +`;(function(e){Cd(t,e);function t(t,n,r){t===void 0&&(t=[0,0]),n===void 0&&(n=5),r===void 0&&(r=0);var i=e.call(this,wd,Td)||this;return i.kernelSize=5,i.uniforms.uVelocity=new Float32Array(2),i._velocity=new Bn(i.velocityChanged,i),i.setVelocity(t),i.kernelSize=n,i.offset=r,i}return t.prototype.apply=function(e,t,n,r){var i=this.velocity,a=i.x,o=i.y;this.uniforms.uKernelSize=a!==0||o!==0?this.kernelSize:0,e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,`velocity`,{get:function(){return this._velocity},set:function(e){this.setVelocity(e)},enumerable:!1,configurable:!0}),t.prototype.setVelocity=function(e){if(Array.isArray(e)){var t=e[0],n=e[1];this._velocity.set(t,n)}else this._velocity.copyFrom(e)},t.prototype.velocityChanged=function(){this.uniforms.uVelocity[0]=this._velocity.x,this.uniforms.uVelocity[1]=this._velocity.y,this.padding=(Math.max(Math.abs(this._velocity.x),Math.abs(this._velocity.y))>>0)+1},Object.defineProperty(t.prototype,`offset`,{get:function(){return this.uniforms.uOffset},set:function(e){this.uniforms.uOffset=e},enumerable:!1,configurable:!0}),t})(Bi); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -2183,7 +2183,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var Dd=function(e,t){return Dd=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])},Dd(e,t)};function Od(e,t){Dd(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var kd=`attribute vec2 aVertexPosition; +var Ed=function(e,t){return Ed=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])},Ed(e,t)};function Dd(e,t){Ed(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Od=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2194,7 +2194,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Ad=`varying vec2 vTextureCoord; +}`,kd=`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform float epsilon; @@ -2232,7 +2232,7 @@ void main(void) } } } -`;(function(e){Od(t,e);function t(t,n,r){n===void 0&&(n=.05),r===void 0&&(r=t.length);var i=e.call(this,kd,Ad.replace(/%maxColors%/g,r.toFixed(0)))||this;return i._replacements=[],i._maxColors=0,i.epsilon=n,i._maxColors=r,i.uniforms.originalColors=new Float32Array(r*3),i.uniforms.targetColors=new Float32Array(r*3),i.replacements=t,i}return Object.defineProperty(t.prototype,`replacements`,{get:function(){return this._replacements},set:function(e){var t=this.uniforms.originalColors,n=this.uniforms.targetColors,r=e.length;if(r>this._maxColors)throw Error(`Length of replacements (`+r+`) exceeds the maximum colors length (`+this._maxColors+`)`);t[r*3]=-1;for(var i=0;ithis._maxColors)throw Error(`Length of replacements (`+r+`) exceeds the maximum colors length (`+this._maxColors+`)`);t[r*3]=-1;for(var i=0;i=t||a({x:0,y:0})},disableFocusAt:{type:Boolean,default:!1},xOffset:{},yOffset:{},scale:{default:1}},emits:[`modelLoaded`],setup(e,{expose:t,emit:n}){let r=e,i=n;function a(){let e=Number.parseFloat(String(r.xOffset))||0,t=Number.parseFloat(String(r.yOffset))||0;return String(r.xOffset).endsWith(`%`)&&(e=Number.parseFloat(String(r.xOffset).replace(`%`,``))/100*r.width),String(r.yOffset).endsWith(`%`)&&(t=Number.parseFloat(String(r.yOffset).replace(`%`,``))/100*r.height),{xOffset:e,yOffset:t}}let o=Ie(()=>r.modelSrc),s=Ie(()=>r.modelFile),c=he(s),l=ae(()=>c.value?c.value:o.value?o.value:``),u=ae(()=>a()),d=Ie(()=>r.app),f=Ie(()=>r.paused),p=Ie(()=>r.focusAt),h=Pe(),g=Pe(0),_=Pe(0),v=ae(()=>Math.max(0,Math.min(100,r.mouthOpenSize))),y=Pe(0),b=fe(),x=de(T),S=ae(()=>x.between(`sm`,`md`).value||x.smaller(`sm`).value),C=Df(),E=Fe(new ad({alpha:.2,blur:0,distance:20,rotation:45}));function D(){return h.value.internalModel.coreModel}function O(){if(!h.value)return;let e=2.2;S.value&&(e=2.2);let t=r.height*.95/_.value*e,n=r.width*.95/g.value*e,i=Math.min(t,n);h.value.scale.set(i*r.scale,i*r.scale),h.value.x=r.width/2+u.value.xOffset,h.value.y=r.height+u.value.yOffset}let{modelFile:k,loadingModel:A,currentMotion:ee,availableMotions:j}=w(Ge()),{themeColorsHue:te,themeColorsHueDynamic:ne}=w(We()),M=Pe({group:`Idle`,index:0});async function N(){if(!d.value)return;if(h.value&&(d.value.stage.removeChild(h.value),h.value.destroy(),h.value=void 0),!l.value){console.warn(`No Live2D model source provided.`);return}let e=new xl;await pl.setupLive2DModel(e,l.value,{autoInteract:!1}),h.value=e,d.value.stage.addChild(h.value),g.value=h.value.width,_.value=h.value.height,h.value.anchor.set(.5,.5),O(),h.value.on(`hit`,e=>{h.value&&e.includes(`body`)&&h.value.motion(`tap_body`)});let t=h.value.internalModel,n=t.coreModel,r=t.motionManager;n.setParameterValueById(`ParamMouthOpenY`,v.value),j.value=Object.entries(r.definitions).flatMap(([e,t])=>t?t.map((t,n)=>({motionName:e,motionIndex:n,fileName:t.File})):[]).filter(Boolean),r.groups.idle&&r.motionGroups[r.groups.idle]?.forEach(e=>{e._motionData.curves.forEach(e=>{(e.id===`ParamEyeBallX`||e.id===`ParamEyeBallY`)&&(e.id=`_${e.id}`)})});let a=r.update;r.update=function(e,n){return y.value=n,a?.call(this,e,n),!r.state.currentGroup||r.state.currentGroup===r.groups.idle?(C.update(t,n),t.eyeBlink!=null&&t.eyeBlink.updateParameters(e,(n-y.value)/1e3),!0):!1},r.on(`motionStart`,(e,t)=>{M.value={group:e,index:t}}),k.value&&await Of.default.setItem(`live2dModel`,k.value),i(`modelLoaded`),A.value=!1}async function P(e,t){await h.value?.motion(e,t,Wc.FORCE)}let re=_e(O,100),se=Pe(),ce=Pe(0);function ue(){if(h.value){let e=getComputedStyle(se.value).backgroundColor;E.value.color=Number(m(e).replace(`#`,`0x`)),h.value.filters=[E.value]}}je([()=>r.width,()=>r.height],()=>re()),je(l,()=>N(),{immediate:!0}),je(b,ue,{immediate:!0}),je([h,te],ue),je(u,O),je(()=>r.scale,O);function pe(){ue(),ce.value=requestAnimationFrame(pe)}je(ne,()=>{ne.value?ce.value=requestAnimationFrame(pe):(cancelAnimationFrame(ce.value),ce.value=0)},{immediate:!0}),je(v,e=>D().setParameterValueById(`ParamMouthOpenY`,e)),je(ee,e=>P(e.group,e.index)),je(f,e=>e?d.value?.stop():d.value?.start()),je(p,e=>{h.value&&(r.disableFocusAt||h.value.focus(e.x,e.y))}),ve(A,e=>{e&&N()},{debounce:1e3}),De(()=>ue());function me(){cancelAnimationFrame(ce.value),h.value&&d.value?.stage.removeChild(h.value)}Oe(()=>{me()});function ge(){return j.value}return t({setMotion:P,listMotionGroups:ge}),(e,t)=>(ke(),le(ie,null,[oe(`div`,{ref_key:`dropShadowColorComputer`,ref:se,hidden:``,bg:`primary-400 dark:primary-500`},null,512),Ae(e.$slots,`default`)],64))}}),Af=kf,jf=Re(((exports,t)=>{ +`;(function(e){Sf(t,e);function t(n){var r=this,i=Object.assign(t.defaults,n),a=i.maxKernelSize,o=Cf(i,[`maxKernelSize`]);return r=e.call(this,wf,Tf.replace("${maxKernelSize}",a.toFixed(1)))||this,Object.assign(r,o),r}return Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`strength`,{get:function(){return this.uniforms.uStrength},set:function(e){this.uniforms.uStrength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`innerRadius`,{get:function(){return this.uniforms.uInnerRadius},set:function(e){this.uniforms.uInnerRadius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},t})(Bi);function Ef(){let t=-1,n,r=-1;function i(i,a){(a>=t||a({x:0,y:0})},disableFocusAt:{type:Boolean,default:!1},xOffset:{},yOffset:{},scale:{default:1}},emits:[`modelLoaded`],setup(e,{expose:t,emit:n}){let r=e,i=n;function a(){let e=Number.parseFloat(String(r.xOffset))||0,t=Number.parseFloat(String(r.yOffset))||0;return String(r.xOffset).endsWith(`%`)&&(e=Number.parseFloat(String(r.xOffset).replace(`%`,``))/100*r.width),String(r.yOffset).endsWith(`%`)&&(t=Number.parseFloat(String(r.yOffset).replace(`%`,``))/100*r.height),{xOffset:e,yOffset:t}}let o=Fe(()=>r.modelSrc),s=Fe(()=>r.modelFile),c=me(s),l=ie(()=>c.value?c.value:o.value?o.value:``),u=ie(()=>a()),d=Fe(()=>r.app),f=Fe(()=>r.paused),p=Fe(()=>r.focusAt),h=Ne(),g=Ne(0),_=Ne(0),v=ie(()=>Math.max(0,Math.min(100,r.mouthOpenSize))),y=Ne(0),b=de(),x=ue(le),S=ie(()=>x.between(`sm`,`md`).value||x.smaller(`sm`).value),C=Ef(),T=Pe(new id({alpha:.2,blur:0,distance:20,rotation:45}));function E(){return h.value.internalModel.coreModel}function D(){if(!h.value)return;let e=2.2;S.value&&(e=2.2);let t=r.height*.95/_.value*e,n=r.width*.95/g.value*e,i=Math.min(t,n);h.value.scale.set(i*r.scale,i*r.scale),h.value.x=r.width/2+u.value.xOffset,h.value.y=r.height+u.value.yOffset}let{modelFile:O,loadingModel:k,currentMotion:A,availableMotions:j}=w(We()),{themeColorsHue:M,themeColorsHueDynamic:ee}=w(Ue()),te=Ne({group:`Idle`,index:0});async function N(){if(!d.value)return;if(h.value&&(d.value.stage.removeChild(h.value),h.value.destroy(),h.value=void 0),!l.value){console.warn(`No Live2D model source provided.`);return}let e=new bl;await fl.setupLive2DModel(e,l.value,{autoInteract:!1}),h.value=e,d.value.stage.addChild(h.value),g.value=h.value.width,_.value=h.value.height,h.value.anchor.set(.5,.5),D(),h.value.on(`hit`,e=>{h.value&&e.includes(`body`)&&h.value.motion(`tap_body`)});let t=h.value.internalModel,n=t.coreModel,r=t.motionManager;n.setParameterValueById(`ParamMouthOpenY`,v.value),j.value=Object.entries(r.definitions).flatMap(([e,t])=>t?t.map((t,n)=>({motionName:e,motionIndex:n,fileName:t.File})):[]).filter(Boolean),r.groups.idle&&r.motionGroups[r.groups.idle]?.forEach(e=>{e._motionData.curves.forEach(e=>{(e.id===`ParamEyeBallX`||e.id===`ParamEyeBallY`)&&(e.id=`_${e.id}`)})});let a=r.update;r.update=function(e,n){return y.value=n,a?.call(this,e,n),!r.state.currentGroup||r.state.currentGroup===r.groups.idle?(C.update(t,n),t.eyeBlink!=null&&t.eyeBlink.updateParameters(e,(n-y.value)/1e3),!0):!1},r.on(`motionStart`,(e,t)=>{te.value={group:e,index:t}}),O.value&&await Df.default.setItem(`live2dModel`,O.value),i(`modelLoaded`),k.value=!1}async function P(e,t){await h.value?.motion(e,t,Uc.FORCE)}let F=ge(D,100),ne=Ne(),oe=Ne(0);function se(){if(h.value){let e=getComputedStyle(ne.value).backgroundColor;T.value.color=Number(m(e).replace(`#`,`0x`)),h.value.filters=[T.value]}}Ae([()=>r.width,()=>r.height],()=>F()),Ae(l,()=>N(),{immediate:!0}),Ae(b,se,{immediate:!0}),Ae([h,M],se),Ae(u,D),Ae(()=>r.scale,D);function fe(){se(),oe.value=requestAnimationFrame(fe)}Ae(ee,()=>{ee.value?oe.value=requestAnimationFrame(fe):(cancelAnimationFrame(oe.value),oe.value=0)},{immediate:!0}),Ae(v,e=>E().setParameterValueById(`ParamMouthOpenY`,e)),Ae(A,e=>P(e.group,e.index)),Ae(f,e=>e?d.value?.stop():d.value?.start()),Ae(p,e=>{h.value&&(r.disableFocusAt||h.value.focus(e.x,e.y))}),_e(k,e=>{e&&N()},{debounce:1e3}),Ee(()=>se());function pe(){cancelAnimationFrame(oe.value),h.value&&d.value?.stage.removeChild(h.value)}De(()=>{pe()});function he(){return j.value}return t({setMotion:P,listMotionGroups:he}),(e,t)=>(Oe(),ce(re,null,[ae(`div`,{ref_key:`dropShadowColorComputer`,ref:ne,hidden:``,bg:`primary-400 dark:primary-500`},null,512),ke(e.$slots,`default`)],64))}}),kf=Of,Af=Le(((exports,t)=>{ /*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -3235,13 +3235,13 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : 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 Be==`function`&&Be;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 Be==`function`&&Be,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,ee=0;E&&(A|=16),o===`UNIX`?(ee=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(ee=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 j=``;return j+=` -\0`,j+=r(k,2),j+=m.magic,j+=r(d,2),j+=r(f,2),j+=r(O.crc32,4),j+=r(O.compressedSize,4),j+=r(O.uncompressedSize,4),j+=r(g.length,2),j+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+j+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(ee,2)+j+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,ee=4;function j(e,t){return e.msg=c[t],t}function te(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 N(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,M(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,N(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(N(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(N(e,!0),e.strm.avail_out===0?A:ee):(e.strstart>e.block_start&&(N(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)),M(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)),M(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)),M(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&&M(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(M(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&te(t)<=te(n)&&t!==u)return j(e,-5);if(i.status===666&&e.avail_in!==0)return j(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&&(N(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(N(e,!0),e.strm.avail_out===0?A:ee):e.last_lit&&(N(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&&(N(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(N(e,!0),e.strm.avail_out===0?A:ee):e.last_lit&&(N(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==ee||(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&&(ne(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),M(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)),M(e),0=n.w_size&&(s===0&&(ne(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,M=8+(15&(b>>>=4)),n.wbits===0)n.wbits=M;else if(M>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&&(M=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,M)),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;M=p[g+ E++],n.head&&M&&n.length<65536&&(n.head.name+=String.fromCharCode(M)),M&&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},N=s(0,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,N){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,ee=65535&ie,!((k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=ee;else{if(ee===16){for(re=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}M=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(ee===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++]=M}}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},N=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,N){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},N=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,N){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,ee=65535&ie,!((k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>j)])>>>16&255,ee=65535&ie,!(j+(k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=j,x-=j,n.back+=j}if(b>>>=k,x-=k,n.back+=k,n.length=ee,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,ee=65535&ie,!((k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>j)])>>>16&255,ee=65535&ie,!(j+(k=ie>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=j,x-=j,n.back+=j}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=ee,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]],te[ne+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?j=0:(j&=p-1,j+=p),w++,--M[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*N(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)})})),Mf=He(jf());Tl.zipReader=(e,t)=>Mf.default.loadAsync(e);const Nf=Tl.createSettings;Tl.createSettings=async e=>{let t=Object.keys(e.files);return t.find(e=>Pf(e))?Nf(e):Lf(t)};function Pf(e){return e.endsWith(`model3.json`)}function Ff(e){return e.endsWith(`.moc3`)}function If(e){return e.split(/[\\/]/).pop()}function Lf(e){let t=e.filter(e=>Ff(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=If(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 Dl({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}Tl.readText=(e,t)=>{let n=e.file(t);if(!n)throw Error(`Cannot find file: ${t}`);return n.async(`text`)},Tl.getFilePaths=e=>{let t=[];return e.forEach(e=>t.push(e)),Promise.resolve(t)},Tl.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 Rf=S({__name:`Live2D`,props:{modelSrc:{},modelFile:{},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)=>(ke(),se(_,{relative:``},{default:Me(({width:t,height:n})=>[ue(Ll,{width:t,height:n,resolution:2,"max-h":`100dvh`},{default:Me(({app:r})=>[ue(Af,{"model-src":e.modelSrc,"model-file":e.modelFile,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,[`model-src`,`model-file`,`app`,`mouth-open-size`,`width`,`height`,`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`,`disable-focus-at`])]),_:2},1032,[`width`,`height`])]),_:1}))}}),zf=Rf;function Bf(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 Vf(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 Hf(e){return this instanceof Hf?(this.v=e,this):new Hf(e)}function Uf(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 Hf?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 Wf(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:Hf(e[r](t)),done:!1}:i?i(t):t}:i}}function Gf(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Vf==`function`?Vf(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 Kf=new TextDecoder(`utf-8`),qf=e=>Kf.decode(e),Jf=new TextEncoder,Yf=e=>Jf.encode(e),Xf=e=>typeof e==`number`,Zf=e=>typeof e==`boolean`,Qf=e=>typeof e==`function`,$f=e=>e!=null&&Object(e)===e,ep=e=>$f(e)&&Qf(e.then),tp=e=>$f(e)&&Qf(e[Symbol.iterator]),np=e=>$f(e)&&Qf(e[Symbol.asyncIterator]),rp=e=>$f(e)&&$f(e.schema),ip=e=>$f(e)&&`done`in e&&`value`in e,ap=e=>$f(e)&&Qf(e.stat)&&Xf(e.fd),op=e=>$f(e)&&lp(e.body),sp=e=>`_getDOMStream`in e&&`_getNodeStream`in e,cp=e=>$f(e)&&Qf(e.abort)&&Qf(e.getWriter)&&!sp(e),lp=e=>$f(e)&&Qf(e.cancel)&&Qf(e.getReader)&&!sp(e),up=e=>$f(e)&&Qf(e.end)&&Qf(e.write)&&Zf(e.writable)&&!sp(e),dp=e=>$f(e)&&Qf(e.read)&&Qf(e.pipe)&&Zf(e.readable)&&!sp(e),fp=e=>$f(e)&&Qf(e.clear)&&Qf(e.bytes)&&Qf(e.position)&&Qf(e.setPosition)&&Qf(e.capacity)&&Qf(e.getBufferIdentifier)&&Qf(e.createLong),pp=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function mp(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;++c_p(Int32Array,e),yp=e=>_p(BigInt64Array,e),bp=e=>_p(Uint8Array,e),xp=e=>(e.next(),e);function*Sp(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof pp?n(t):tp(t)?t:n(t);return yield*xp((function*(t){let n=null;do n=t.next(yield _p(e,n));while(!n.done)})(r[Symbol.iterator]())),new e}const Cp=e=>Sp(Uint8Array,e);function wp(e,t){return Uf(this,arguments,function*(){if(ep(t))return yield Hf(yield Hf(yield*Wf(Gf(wp(e,yield Hf(t))))));let n=function(e){return Uf(this,arguments,function*(){yield yield Hf(yield Hf(e))})},r=function(e){return Uf(this,arguments,function*(){yield Hf(yield*Wf(Gf(xp((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 pp?n(t):tp(t)?r(t):np(t)?t:n(t);return yield Hf(yield*Wf(Gf(xp((function(t){return Uf(this,arguments,function*(){let n=null;do n=yield Hf(t.next(yield yield Hf(_p(e,n))));while(!n.done)})})(i[Symbol.asyncIterator]()))))),yield Hf(new e)})}const Tp=e=>wp(Uint8Array,e);function Ep(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*Ap(e){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?gp(r,o)[0]:([i,r,s]=gp(r,o),i)}({cmd:a,size:o}=(yield(()=>null)())||{cmd:`read`,size:0});let l=Cp(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=Tp(e)[Symbol.asyncIterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?yield Hf(l.next()):yield Hf(l.next(o-s)),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield Hf(c()));while(onull)()))||{cmd:`read`,size:0});let l=new Np(e);try{do if({done:t,value:i}=Number.isNaN(o-s)?yield Hf(l.read()):yield Hf(l.read(o-s)),!t&&i.byteLength>0&&(r.push(bp(i)),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield Hf(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 Bf(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 Bf(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=bp(t)),t})}};const Pp=(e,t)=>{let n=e=>r([t,e]),r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]};function Fp(e){return Uf(this,arguments,function*(){let t=[],n=`error`,r=!1,i=null,a,o,s=0,c=[],l;function u(){return a===`peek`?gp(c,o)[0]:([l,c,s]=gp(c,o),l)}if({cmd:a,size:o}=(yield yield Hf((()=>null)()))||{cmd:`read`,size:0},e.isTTY)return yield yield Hf(new Uint8Array),yield Hf(null);try{t[0]=Pp(e,`end`),t[1]=Pp(e,`error`);do{if(t[2]=Pp(e,`readable`),[n,i]=yield Hf(Promise.race(t.map(e=>e[2]))),n===`error`)break;if((r=n===`end`)||(Number.isFinite(o-s)?(l=bp(e.read(o-s)),l.byteLength0&&(c.push(l),s+=l.byteLength)),r||o<=s)do({cmd:a,size:o}=yield yield Hf(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 Ip;(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`})(Ip||={});var Lp;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(Lp||={});var Rp;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(Rp||={});var zp;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(zp||={});var Bp;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})(Bp||={});var Vp;(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`})(Vp||={});const Hp=2,Up=4,Wp=4,Gp=4,Kp=new Int32Array(2),qp=new Float32Array(Kp.buffer),Jp=new Float64Array(Kp.buffer),Yp=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var Xp;(function(e){e[e.UTF8_BYTES=1]=`UTF8_BYTES`,e[e.UTF16_STRING=2]=`UTF16_STRING`})(Xp||={});var Zp=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){qp[0]=t,this.writeInt32(e,Kp[0])}writeFloat64(e,t){Jp[0]=t,this.writeInt32(e,Kp[Yp?0:1]),this.writeInt32(e+4,Kp[Yp?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)*Hp;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,Up+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)}},km=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()+Gp),(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)}},Am;(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`})(Am||={});var jm=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()+Gp),(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):Am.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 lm).__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 um).__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,Am.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}},Mm=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()+Gp),(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):om.Little}fields(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new jm).__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 um).__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,om.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)}},Nm;(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`})(Nm||={});var L;(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`})(L||={});var Pm;(function(e){e[e.OFFSET=0]=`OFFSET`,e[e.DATA=1]=`DATA`,e[e.VALIDITY=2]=`VALIDITY`,e[e.TYPE=3]=`TYPE`})(Pm||={});const Fm=void 0;function Im(e){if(e===null)return`null`;if(e===Fm)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=>Im(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function Lm(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 Rm(e,t){return Lm(e/t)+Lm(e%t)/Lm(t)}const zm=Symbol.for(`isArrowBigNum`);function Bm(e,...t){return t.length===0?Object.setPrototypeOf(_p(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}Bm.prototype[zm]=!0,Bm.prototype.toJSON=function(){return`"${qm(this)}"`},Bm.prototype.valueOf=function(e){return Km(this,e)},Bm.prototype.toString=function(){return qm(this)},Bm.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return Km(this);case`string`:return qm(this);case`default`:return Jm(this)}return qm(this)};function Vm(...e){return Bm.apply(this,e)}function Hm(...e){return Bm.apply(this,e)}function Um(...e){return Bm.apply(this,e)}Object.setPrototypeOf(Vm.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(Hm.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(Um.prototype,Object.create(Uint32Array.prototype)),Object.assign(Vm.prototype,Bm.prototype,{constructor:Vm,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(Hm.prototype,Bm.prototype,{constructor:Hm,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(Um.prototype,Bm.prototype,{constructor:Um,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const Wm=BigInt(4294967296)*BigInt(4294967296),Gm=Wm-BigInt(1);function Km(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 Ym(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`))(R.prototype);var yh=class extends R{constructor(){super(L.Null)}toString(){return`Null`}};Qm=Symbol.toStringTag,yh[Qm]=(e=>e[Symbol.toStringTag]=`Null`)(yh.prototype);var bh=class extends R{constructor(e,t){super(L.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}`}};$m=Symbol.toStringTag,bh[$m]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(bh.prototype);var xh=class extends bh{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},Sh=class extends bh{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},Ch=class extends bh{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},wh=class extends bh{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},Th=class extends bh{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Eh=class extends bh{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},Dh=class extends bh{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},Oh=class extends bh{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(xh.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(Sh.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(Ch.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(wh.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(Th.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(Eh.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Dh.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(Oh.prototype,`ArrayType`,{value:BigUint64Array});var kh=class extends R{constructor(e){super(L.Float),this.precision=e}get ArrayType(){switch(this.precision){case Rp.HALF:return Uint16Array;case Rp.SINGLE:return Float32Array;case Rp.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};eh=Symbol.toStringTag,kh[eh]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(kh.prototype);var Ah=class extends kh{constructor(){super(Rp.HALF)}},jh=class extends kh{constructor(){super(Rp.SINGLE)}},Mh=class extends kh{constructor(){super(Rp.DOUBLE)}};Object.defineProperty(Ah.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(jh.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(Mh.prototype,`ArrayType`,{value:Float64Array});var Nh=class extends R{constructor(){super(L.Binary)}toString(){return`Binary`}};th=Symbol.toStringTag,Nh[th]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(Nh.prototype);var Ph=class extends R{constructor(){super(L.LargeBinary)}toString(){return`LargeBinary`}};nh=Symbol.toStringTag,Ph[nh]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(Ph.prototype);var Fh=class extends R{constructor(){super(L.Utf8)}toString(){return`Utf8`}};rh=Symbol.toStringTag,Fh[rh]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(Fh.prototype);var Ih=class extends R{constructor(){super(L.LargeUtf8)}toString(){return`LargeUtf8`}};ih=Symbol.toStringTag,Ih[ih]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(Ih.prototype);var Lh=class extends R{constructor(){super(L.Bool)}toString(){return`Bool`}};ah=Symbol.toStringTag,Lh[ah]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(Lh.prototype);var Rh=class extends R{constructor(e,t,n=128){super(L.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};oh=Symbol.toStringTag,Rh[oh]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Rh.prototype);var zh=class extends R{constructor(e){super(L.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${zp[this.unit]}>`}get ArrayType(){return this.unit===zp.DAY?Int32Array:BigInt64Array}};sh=Symbol.toStringTag,zh[sh]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(zh.prototype);var Bh=class extends R{constructor(e,t){super(L.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${Bp[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};ch=Symbol.toStringTag,Bh[ch]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(Bh.prototype);var Vh=class extends R{constructor(e,t){super(L.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${Bp[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};lh=Symbol.toStringTag,Vh[lh]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(Vh.prototype);var Hh=class extends R{constructor(e){super(L.Interval),this.unit=e}toString(){return`Interval<${Vp[this.unit]}>`}};uh=Symbol.toStringTag,Hh[uh]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(Hh.prototype);var Uh=class extends R{constructor(e){super(L.Duration),this.unit=e}toString(){return`Duration<${Bp[this.unit]}>`}};dh=Symbol.toStringTag,Uh[dh]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(Uh.prototype);var Wh=class extends R{constructor(e){super(L.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}};fh=Symbol.toStringTag,Wh[fh]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(Wh.prototype);var Gh=class extends R{constructor(e){super(L.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};ph=Symbol.toStringTag,Gh[ph]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(Gh.prototype);var Kh=class extends R{constructor(e,t,n){super(L.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(` | `)}>`}};mh=Symbol.toStringTag,Kh[mh]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(Kh.prototype);var qh=class extends R{constructor(e){super(L.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};hh=Symbol.toStringTag,qh[hh]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(qh.prototype);var Jh=class extends R{constructor(e,t){super(L.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}>`}};gh=Symbol.toStringTag,Jh[gh]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(Jh.prototype);var Yh=class extends R{constructor(e,t=!1){var n,r,i;if(super(L.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(`, `)}}>`}};_h=Symbol.toStringTag,Yh[_h]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(Yh.prototype);const Xh=(e=>()=>++e)(-1);var Zh=class extends R{constructor(e,t,n,r){super(L.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?Xh():Lm(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}>`}};vh=Symbol.toStringTag,Zh[vh]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(Zh.prototype);function Qh(e){let t=e;switch(e.typeId){case L.Decimal:return e.bitWidth/32;case L.Interval:return 1+t.unit;case L.FixedSizeList:return t.listSize;case L.FixedSizeBinary:return t.byteWidth;default:return 1}}var $h=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 eg(this,e,t)}getVisitFnByTypeId(e,t=!0){return tg(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 eg(e,t,n=!0){return typeof t==`number`?tg(e,t,n):typeof t==`string`&&t in L?tg(e,L[t],n):t&&t instanceof R?tg(e,ng(t),n):t?.type&&t.type instanceof R?tg(e,ng(t.type),n):tg(e,L.NONE,n)}function tg(e,t,n=!0){let r=null;switch(t){case L.Null:r=e.visitNull;break;case L.Bool:r=e.visitBool;break;case L.Int:r=e.visitInt;break;case L.Int8:r=e.visitInt8||e.visitInt;break;case L.Int16:r=e.visitInt16||e.visitInt;break;case L.Int32:r=e.visitInt32||e.visitInt;break;case L.Int64:r=e.visitInt64||e.visitInt;break;case L.Uint8:r=e.visitUint8||e.visitInt;break;case L.Uint16:r=e.visitUint16||e.visitInt;break;case L.Uint32:r=e.visitUint32||e.visitInt;break;case L.Uint64:r=e.visitUint64||e.visitInt;break;case L.Float:r=e.visitFloat;break;case L.Float16:r=e.visitFloat16||e.visitFloat;break;case L.Float32:r=e.visitFloat32||e.visitFloat;break;case L.Float64:r=e.visitFloat64||e.visitFloat;break;case L.Utf8:r=e.visitUtf8;break;case L.LargeUtf8:r=e.visitLargeUtf8;break;case L.Binary:r=e.visitBinary;break;case L.LargeBinary:r=e.visitLargeBinary;break;case L.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case L.Date:r=e.visitDate;break;case L.DateDay:r=e.visitDateDay||e.visitDate;break;case L.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case L.Timestamp:r=e.visitTimestamp;break;case L.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case L.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case L.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case L.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case L.Time:r=e.visitTime;break;case L.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case L.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case L.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case L.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case L.Decimal:r=e.visitDecimal;break;case L.List:r=e.visitList;break;case L.Struct:r=e.visitStruct;break;case L.Union:r=e.visitUnion;break;case L.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case L.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case L.Dictionary:r=e.visitDictionary;break;case L.Interval:r=e.visitInterval;break;case L.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case L.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case L.Duration:r=e.visitDuration;break;case L.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case L.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case L.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case L.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case L.FixedSizeList:r=e.visitFixedSizeList;break;case L.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${L[t]}'`)}function ng(e){switch(e.typeId){case L.Null:return L.Null;case L.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?L.Int8:L.Uint8;case 16:return n?L.Int16:L.Uint16;case 32:return n?L.Int32:L.Uint32;case 64:return n?L.Int64:L.Uint64}return L.Int}case L.Float:switch(e.precision){case Rp.HALF:return L.Float16;case Rp.SINGLE:return L.Float32;case Rp.DOUBLE:return L.Float64}return L.Float;case L.Binary:return L.Binary;case L.LargeBinary:return L.LargeBinary;case L.Utf8:return L.Utf8;case L.LargeUtf8:return L.LargeUtf8;case L.Bool:return L.Bool;case L.Decimal:return L.Decimal;case L.Time:switch(e.unit){case Bp.SECOND:return L.TimeSecond;case Bp.MILLISECOND:return L.TimeMillisecond;case Bp.MICROSECOND:return L.TimeMicrosecond;case Bp.NANOSECOND:return L.TimeNanosecond}return L.Time;case L.Timestamp:switch(e.unit){case Bp.SECOND:return L.TimestampSecond;case Bp.MILLISECOND:return L.TimestampMillisecond;case Bp.MICROSECOND:return L.TimestampMicrosecond;case Bp.NANOSECOND:return L.TimestampNanosecond}return L.Timestamp;case L.Date:switch(e.unit){case zp.DAY:return L.DateDay;case zp.MILLISECOND:return L.DateMillisecond}return L.Date;case L.Interval:switch(e.unit){case Vp.DAY_TIME:return L.IntervalDayTime;case Vp.YEAR_MONTH:return L.IntervalYearMonth}return L.Interval;case L.Duration:switch(e.unit){case Bp.SECOND:return L.DurationSecond;case Bp.MILLISECOND:return L.DurationMillisecond;case Bp.MICROSECOND:return L.DurationMicrosecond;case Bp.NANOSECOND:return L.DurationNanosecond}return L.Duration;case L.Map:return L.Map;case L.List:return L.List;case L.Struct:return L.Struct;case L.Union:switch(e.mode){case Lp.Dense:return L.DenseUnion;case Lp.Sparse:return L.SparseUnion}return L.Union;case L.FixedSizeBinary:return L.FixedSizeBinary;case L.FixedSizeList:return L.FixedSizeList;case L.Dictionary:return L.Dictionary}throw Error(`Unrecognized type '${L[e.typeId]}'`)}$h.prototype.visitInt8=null,$h.prototype.visitInt16=null,$h.prototype.visitInt32=null,$h.prototype.visitInt64=null,$h.prototype.visitUint8=null,$h.prototype.visitUint16=null,$h.prototype.visitUint32=null,$h.prototype.visitUint64=null,$h.prototype.visitFloat16=null,$h.prototype.visitFloat32=null,$h.prototype.visitFloat64=null,$h.prototype.visitDateDay=null,$h.prototype.visitDateMillisecond=null,$h.prototype.visitTimestampSecond=null,$h.prototype.visitTimestampMillisecond=null,$h.prototype.visitTimestampMicrosecond=null,$h.prototype.visitTimestampNanosecond=null,$h.prototype.visitTimeSecond=null,$h.prototype.visitTimeMillisecond=null,$h.prototype.visitTimeMicrosecond=null,$h.prototype.visitTimeNanosecond=null,$h.prototype.visitDenseUnion=null,$h.prototype.visitSparseUnion=null,$h.prototype.visitIntervalDayTime=null,$h.prototype.visitIntervalYearMonth=null,$h.prototype.visitDuration=null,$h.prototype.visitDurationSecond=null,$h.prototype.visitDurationMillisecond=null,$h.prototype.visitDurationMicrosecond=null,$h.prototype.visitDurationNanosecond=null;const rg=new Float64Array(1),ig=new Uint32Array(rg.buffer);function ag(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 og(e){if(e!==e)return 32256;rg[0]=e;let t=(ig[1]&2147483648)>>16&65535,n=ig[1]&2146435072,r=0;return n>=1089470464?ig[0]>0?n=31744:(n=(n&2080374784)>>16,r=(ig[1]&1048575)>>10):n<=1056964608?(r=1048576+(ig[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(ig[1]&1048575)+512>>10),t|n|r&65535}var sg=class extends $h{};function cg(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const lg=(e,t,n)=>{e[t]=Math.floor(n/864e5)},ug=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},pg=({values:e},t,n)=>{e[t]=n},mg=({values:e},t,n)=>{e[t]=og(n)},hg=(e,t,n)=>{switch(e.type.precision){case Rp.HALF:return mg(e,t,n);case Rp.SINGLE:case Rp.DOUBLE:return pg(e,t,n)}},gg=({values:e},t,n)=>{lg(e,t,n.valueOf())},_g=({values:e},t,n)=>{e[t]=BigInt(n)},vg=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},yg=({values:e,valueOffsets:t},n,r)=>ug(e,t,n,r),bg=({values:e,valueOffsets:t},n,r)=>ug(e,t,n,Yf(r)),xg=(e,t,n)=>{e.type.unit===zp.DAY?gg(e,t,n):_g(e,t,n)},Sg=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},Cg=({values:e},t,n)=>{e[t]=BigInt(n)},wg=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},Tg=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},Eg=(e,t,n)=>{switch(e.type.unit){case Bp.SECOND:return Sg(e,t,n);case Bp.MILLISECOND:return Cg(e,t,n);case Bp.MICROSECOND:return wg(e,t,n);case Bp.NANOSECOND:return Tg(e,t,n)}},Dg=({values:e},t,n)=>{e[t]=n},Og=({values:e},t,n)=>{e[t]=n},kg=({values:e},t,n)=>{e[t]=n},Ag=({values:e},t,n)=>{e[t]=n},jg=(e,t,n)=>{switch(e.type.unit){case Bp.SECOND:return Dg(e,t,n);case Bp.MILLISECOND:return Og(e,t,n);case Bp.MICROSECOND:return kg(e,t,n);case Bp.NANOSECOND:return Ag(e,t,n)}},Mg=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},Ng=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=$g.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=$g.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},Fg=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),Ig=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),Lg=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),Rg=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),zg=(e,t,n)=>{let r=e.type.children.map(e=>$g.getVisitFn(e.type)),i=n instanceof Map?Lg(t,n):n instanceof Yv?Ig(t,n):Array.isArray(n)?Fg(t,n):Rg(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},Bg=(e,t,n)=>{e.type.mode===Lp.Dense?Vg(e,t,n):Hg(e,t,n)},Vg=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];$g.visit(i,e.valueOffsets[t],n)},Hg=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];$g.visit(i,t,n)},Ug=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},Wg=(e,t,n)=>{e.type.unit===Vp.DAY_TIME?Gg(e,t,n):Kg(e,t,n)},Gg=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},Kg=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},qg=({values:e},t,n)=>{e[t]=n},Jg=({values:e},t,n)=>{e[t]=n},Yg=({values:e},t,n)=>{e[t]=n},Xg=({values:e},t,n)=>{e[t]=n},Zg=(e,t,n)=>{switch(e.type.unit){case Bp.SECOND:return qg(e,t,n);case Bp.MILLISECOND:return Jg(e,t,n);case Bp.MICROSECOND:return Yg(e,t,n);case Bp.NANOSECOND:return Xg(e,t,n)}},Qg=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=$g.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${Im(e)}: ${Im(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new r_(this[e_],this[t_])}},r_=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[e_].type.children.findIndex(e=>e.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[e_].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[e_].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=J_.visit(e[e_].children[n],e[t_]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[e_].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:($g.visit(e[e_].children[r],e[t_],n),Reflect.set(e,t,n))}},z=class extends $h{};function a_(e){return(t,n)=>t.getValid(n)?e(t,n):null}const o_=(e,t)=>864e5*e[t],s_=(e,t)=>null,c_=(e,t,n)=>{if(n+1>=t.length)return null;let r=Lm(t[n]),i=Lm(t[n+1]);return e.subarray(r,i)},l_=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<o_(e,t),d_=({values:e},t)=>Lm(e[t]),f_=({stride:e,values:t},n)=>t[e*n],p_=({stride:e,values:t},n)=>ag(t[e*n]),m_=({values:e},t)=>e[t],h_=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),g_=({values:e,valueOffsets:t},n)=>c_(e,t,n),__=({values:e,valueOffsets:t},n)=>{let r=c_(e,t,n);return r===null?null:qf(r)},v_=({values:e},t)=>e[t],y_=({type:e,values:t},n)=>e.precision===Rp.HALF?ag(t[n]):t[n],b_=(e,t)=>e.type.unit===zp.DAY?u_(e,t):d_(e,t),x_=({values:e},t)=>1e3*Lm(e[t]),S_=({values:e},t)=>Lm(e[t]),C_=({values:e},t)=>Rm(e[t],BigInt(1e3)),w_=({values:e},t)=>Rm(e[t],BigInt(1e6)),T_=(e,t)=>{switch(e.type.unit){case Bp.SECOND:return x_(e,t);case Bp.MILLISECOND:return S_(e,t);case Bp.MICROSECOND:return C_(e,t);case Bp.NANOSECOND:return w_(e,t)}},E_=({values:e},t)=>e[t],D_=({values:e},t)=>e[t],O_=({values:e},t)=>e[t],k_=({values:e},t)=>e[t],A_=(e,t)=>{switch(e.type.unit){case Bp.SECOND:return E_(e,t);case Bp.MILLISECOND:return D_(e,t);case Bp.MICROSECOND:return O_(e,t);case Bp.NANOSECOND:return k_(e,t)}},j_=({values:e,stride:t},n)=>Xm.decimal(e.subarray(t*n,t*(n+1))),M_=(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 Yv([c])},N_=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new $_(o.slice(i,a-i))},P_=(e,t)=>new n_(e,t),F_=(e,t)=>e.type.mode===Lp.Dense?I_(e,t):L_(e,t),I_=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return J_.visit(r,e.valueOffsets[t])},L_=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return J_.visit(r,t)},R_=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},z_=(e,t)=>e.type.unit===Vp.DAY_TIME?B_(e,t):V_(e,t),B_=({values:e},t)=>e.subarray(2*t,2*(t+1)),V_=({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},H_=({values:e},t)=>e[t],U_=({values:e},t)=>e[t],W_=({values:e},t)=>e[t],G_=({values:e},t)=>e[t],K_=(e,t)=>{switch(e.type.unit){case Bp.SECOND:return H_(e,t);case Bp.MILLISECOND:return U_(e,t);case Bp.MICROSECOND:return W_(e,t);case Bp.NANOSECOND:return G_(e,t)}},q_=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new Yv([a])};z.prototype.visitNull=a_(s_),z.prototype.visitBool=a_(l_),z.prototype.visitInt=a_(v_),z.prototype.visitInt8=a_(f_),z.prototype.visitInt16=a_(f_),z.prototype.visitInt32=a_(f_),z.prototype.visitInt64=a_(m_),z.prototype.visitUint8=a_(f_),z.prototype.visitUint16=a_(f_),z.prototype.visitUint32=a_(f_),z.prototype.visitUint64=a_(m_),z.prototype.visitFloat=a_(y_),z.prototype.visitFloat16=a_(p_),z.prototype.visitFloat32=a_(f_),z.prototype.visitFloat64=a_(f_),z.prototype.visitUtf8=a_(__),z.prototype.visitLargeUtf8=a_(__),z.prototype.visitBinary=a_(g_),z.prototype.visitLargeBinary=a_(g_),z.prototype.visitFixedSizeBinary=a_(h_),z.prototype.visitDate=a_(b_),z.prototype.visitDateDay=a_(u_),z.prototype.visitDateMillisecond=a_(d_),z.prototype.visitTimestamp=a_(T_),z.prototype.visitTimestampSecond=a_(x_),z.prototype.visitTimestampMillisecond=a_(S_),z.prototype.visitTimestampMicrosecond=a_(C_),z.prototype.visitTimestampNanosecond=a_(w_),z.prototype.visitTime=a_(A_),z.prototype.visitTimeSecond=a_(E_),z.prototype.visitTimeMillisecond=a_(D_),z.prototype.visitTimeMicrosecond=a_(O_),z.prototype.visitTimeNanosecond=a_(k_),z.prototype.visitDecimal=a_(j_),z.prototype.visitList=a_(M_),z.prototype.visitStruct=a_(P_),z.prototype.visitUnion=a_(F_),z.prototype.visitDenseUnion=a_(I_),z.prototype.visitSparseUnion=a_(L_),z.prototype.visitDictionary=a_(R_),z.prototype.visitInterval=a_(z_),z.prototype.visitIntervalDayTime=a_(B_),z.prototype.visitIntervalYearMonth=a_(V_),z.prototype.visitDuration=a_(K_),z.prototype.visitDurationSecond=a_(H_),z.prototype.visitDurationMillisecond=a_(U_),z.prototype.visitDurationMicrosecond=a_(W_),z.prototype.visitDurationNanosecond=a_(G_),z.prototype.visitFixedSizeList=a_(q_),z.prototype.visitMap=a_(N_);const J_=new z,Y_=Symbol.for(`keys`),X_=Symbol.for(`vals`),Z_=Symbol.for(`kKeysAsStrings`),Q_=Symbol.for(`_kKeysAsStrings`);var $_=class{constructor(e){return this[Y_]=new Yv([e.children[0]]).memoize(),this[X_]=e.children[1],new Proxy(this,new tv)}get[Z_](){return this[Q_]||(this[Q_]=Array.from(this[Y_].toArray(),String))}[Symbol.iterator](){return new ev(this[Y_],this[X_])}get size(){return this[Y_].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[Y_],t=this[X_],n={};for(let r=-1,i=e.length;++r`${Im(e)}: ${Im(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},ev=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),J_.visit(this.vals,e)]})}},tv=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[Z_]}has(e,t){return e[Z_].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[Z_].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[Z_].indexOf(t);if(n!==-1){let r=J_.visit(Reflect.get(e,X_),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[Z_].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:($g.visit(Reflect.get(e,X_),r,n),Reflect.set(e,t,n))}};Object.defineProperties($_.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[Y_]:{writable:!0,enumerable:!1,configurable:!1,value:null},[X_]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Q_]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let nv;function rv(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 iv=(e,t)=>e<0?t+e:e,av=e=>e!==e;function ov(e){let t=typeof e;if(t!==`object`||e===null)return av(e)?av: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?Dp(e,t):!1:e instanceof Map?cv(e):Array.isArray(e)?sv(e):e instanceof Yv?lv(e):uv(e,!0)}function sv(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 fv(e,n);case Map:return mv(e,n,n.keys());case $_:case n_:case Object:case void 0:return mv(e,n,t||Object.keys(n))}return n instanceof Yv?pv(e,n):!1}}function fv(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r>r}function _v(e,t,n){let r=n.byteLength+7&-8;if(e>0||n.byteLength>3):vv(new yv(n,e,t,null,hv)).subarray(0,r)),i}return n}function vv(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 yv=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 bv(e,t,i)+bv(e,r,n)+xv(e,i>>3,r-i>>3)}function xv(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+=Sv(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=Sv(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=Sv(a.getUint8(i)),i+=1;return r}function Sv(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const Cv=-1;var wv=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 R.isSparseUnion(e)||R.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(R.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=Cv&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-bv(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=Qh(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(R.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===Lp.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(_v(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===L.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(_v(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[Pm.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[Pm.TYPE])&&(a[Pm.TYPE]=i.subarray(e,e+t)),(i=a[Pm.OFFSET])&&(a[Pm.OFFSET]=i.subarray(e,e+t+1))||(i=a[Pm.DATA])&&(a[Pm.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};wv.prototype.children=Object.freeze([]);var Tv=class e extends $h{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new wv(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=bp(e.data),i=bp(e.nullBitmap),a=vp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new wv(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=bp(e.data),i=bp(e.nullBitmap),a=yp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new wv(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=bp(e.data),i=bp(e.nullBitmap),a=vp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new wv(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=bp(e.data),i=bp(e.nullBitmap),a=yp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new wv(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length/Qh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length/Qh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length/Qh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length/Qh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length/Qh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=bp(e.nullBitmap),a=vp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new wv(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=bp(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=_p(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(R.isSparseUnion(t))return new wv(t,n,a,o,[void 0,void 0,void 0,i],r);let s=vp(e.valueOffsets);return new wv(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=bp(t.nullBitmap),a=_p(n.indices.ArrayType,t.data),{dictionary:o=new Yv([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new wv(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length/Qh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new wv(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=bp(e.nullBitmap),i=_p(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new wv(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=bp(t.nullBitmap),{length:o=i.length/Qh(n),nullCount:s=t.nullBitmap?-1:0}=t;return new wv(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=bp(t.nullBitmap),o=vp(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new wv(n,r,s,c,[o,void 0,a],[i])}};const Ev=new Tv;function Dv(e){return Ev.visit(e)}var Ov=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 Av(e){return e.reduce((e,t)=>e+t.nullCount,0)}function jv(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function Mv(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 Nv(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function zv(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new yv(n,e.offset+(t||0),e.length,n,hv)){if(!i)return r;++r}return-1}function Bv(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case L.Union:break;case L.Dictionary:break;default:return zv(e,n)}let r=J_.getVisitFn(e),i=ov(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 Ov(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new Wv(a)})}var Wv=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof wv)))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}=qv[o.typeId],r=a[0];this.isValid=e=>Pv(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,Jv[o.typeId]),this._offsets=jv(a);break}this.data=a,this.type=o,this.stride=Qh(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 kv(this.data)}get nullCount(){return Av(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${L[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(iv(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Gv.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(rv(this,t,n,({data:e,_offsets:t},n,r)=>Mv(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case L.Int:case L.Float:case L.Decimal:case L.Time:case L.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 R.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(R.isDictionary(this.type)){let t=new Xv(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new Xv(this)}unmemoize(){if(R.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}};Kv=Symbol.toStringTag,Yv[Kv]=(e=>{e.type=R.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(L).map(e=>L[e]).filter(e=>typeof e==`number`&&e!==L.NONE);for(let n of t){let t=J_.getVisitFnByTypeId(n),r=$g.getVisitFnByTypeId(n),i=Hv.getVisitFnByTypeId(n);qv[n]={get:t,set:r,indexOf:i},Jv[n]=Object.create(e,{isValid:{value:Fv(Pv)},get:{value:Fv(J_.getVisitFnByTypeId(n))},set:{value:Iv($g.getVisitFnByTypeId(n))},indexOf:{value:Lv(Hv.getVisitFnByTypeId(n))}})}return`Vector`})(Yv.prototype);var Xv=class e extends Yv{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 Yv(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},Zv=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()}},Qv=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()+Gp),(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):Ip.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new Mm).__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 Zv).__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 Zv).__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 um).__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,Ip.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)}},$v=class e{constructor(e=[],t,n,r=Ip.V5){this.fields=e||[],this.metadata=t||new Map,n||=ny(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=ty(ty(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:ty(ty(new Map,r[t].metadata),e.metadata)}))&&!1:!0}),o=ny(a,new Map);return new e([...r,...a],i,new Map([...this.dictionaries,...o]))}};$v.prototype.fields=null,$v.prototype.metadata=null,$v.prototype.dictionaries=null;var ey=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)}};ey.prototype.type=null,ey.prototype.name=null,ey.prototype.nullable=null,ey.prototype.metadata=null;function ty(e,t){return new Map([...e||new Map,...t||new Map])}function ny(e,t=new Map){for(let n=-1,r=e.length;++n0&&ny(i.children,t)}return t}var ry=Qp,iy=Zp,ay=class{static decode(e){e=new iy(bp(e));let t=Qv.getRootAsFooter(e),n=$v.decode(t.schema(),new Map,t.version());return new oy(n,t)}static encode(e){let t=new ry,n=$v.encode(t,e.schema);Qv.startRecordBatchesVector(t,e.numRecordBatches);for(let n of[...e.recordBatches()].slice().reverse())sy.encode(t,n);let r=t.endVector();Qv.startDictionariesVector(t,e.numDictionaries);for(let n of[...e.dictionaryBatches()].slice().reverse())sy.encode(t,n);let i=t.endVector();return Qv.startFooter(t),Qv.addSchema(t,n),Qv.addVersion(t,Ip.V5),Qv.addRecordBatches(t,r),Qv.addDictionaries(t,i),Qv.finishFooterBuffer(t,Qv.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=Ip.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 Bf(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(cy);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Op.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Op.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return Bf(this,void 0,void 0,function*(){return yield this.abort(e),cy})}return(e){return Bf(this,void 0,void 0,function*(){return yield this.close(),cy})}read(e){return Bf(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return Bf(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(cy)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(`AsyncQueue is closed`)}},fy=class extends dy{write(e){if((e=bp(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?qf(this.toUint8Array(!0)):this.toUint8Array(!1).then(qf)}toUint8Array(e=!1){return e?gp(this._values)[0]:(()=>Bf(this,void 0,void 0,function*(){var e,t,n,r;let i=[],a=0;try{for(var o=!0,s=Gf(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 gp(i,a)[0]}))()}},py=class{constructor(e){e&&(this.source=new hy(Op.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)}},my=class e{constructor(t){t instanceof e?this.source=t.source:t instanceof fy?this.source=new gy(Op.fromAsyncIterable(t)):dp(t)?this.source=new gy(Op.fromNodeStream(t)):lp(t)?this.source=new gy(Op.fromDOMStream(t)):op(t)?this.source=new gy(Op.fromDOMStream(t.body)):tp(t)?this.source=new gy(Op.fromIterable(t)):(ep(t)||np(t))&&(this.source=new gy(Op.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)}},hy=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)||cy)}return(e){return Object.create(this.source.return&&this.source.return(e)||cy)}},gy=class{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return Bf(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return Bf(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return Bf(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(e){return Bf(this,arguments,void 0,function*(e,t=`read`){return yield this.source.next({cmd:t,size:e})})}throw(e){return Bf(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||cy;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return Bf(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||cy;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},_y=class extends py{constructor(e,t){super(),this.position=0,this.buffer=bp(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),eBf(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return Bf(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 Bf(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`${by(this.buffer[3])} ${by(this.buffer[2])} ${by(this.buffer[1])} ${by(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)}},Oy=class extends Dy{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:vv(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return _p(Uint8Array,_p(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return _p(Uint8Array,_p(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:n}=this;return R.isTimestamp(e)||(R.isInt(e)||R.isTime(e))&&e.bitWidth===64||R.isDuration(e)||R.isDate(e)&&e.unit===zp.MILLISECOND?_p(Uint8Array,Ty.convertArray(n[t])):R.isDecimal(e)?_p(Uint8Array,Ey.convertArray(n[t])):R.isBinary(e)||R.isLargeBinary(e)||R.isFixedSizeBinary(e)?ky(n[t]):R.isBool(e)?vv(n[t]):R.isUtf8(e)||R.isLargeUtf8(e)?Yf(n[t].join(``)):_p(Uint8Array,_p(e.ArrayType,n[t].map(e=>+e)))}};function ky(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 H=class extends $h{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 Ay(e,t){return t instanceof e.constructor}function jy(e,t){return e===t||Ay(e,t)}function My(e,t){return e===t||Ay(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function Ny(e,t){return e===t||Ay(e,t)&&e.precision===t.precision}function Py(e,t){return e===t||Ay(e,t)&&e.byteWidth===t.byteWidth}function Fy(e,t){return e===t||Ay(e,t)&&e.unit===t.unit}function Iy(e,t){return e===t||Ay(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function Ly(e,t){return e===t||Ay(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function Ry(e,t){return e===t||Ay(e,t)&&e.children.length===t.children.length&&Ky.compareManyFields(e.children,t.children)}function zy(e,t){return e===t||Ay(e,t)&&e.children.length===t.children.length&&Ky.compareManyFields(e.children,t.children)}function By(e,t){return e===t||Ay(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&Ky.compareManyFields(e.children,t.children)}function Vy(e,t){return e===t||Ay(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&Ky.visit(e.indices,t.indices)&&Ky.visit(e.dictionary,t.dictionary)}function Hy(e,t){return e===t||Ay(e,t)&&e.unit===t.unit}function Uy(e,t){return e===t||Ay(e,t)&&e.unit===t.unit}function Wy(e,t){return e===t||Ay(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&Ky.compareManyFields(e.children,t.children)}function Gy(e,t){return e===t||Ay(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&Ky.compareManyFields(e.children,t.children)}H.prototype.visitNull=jy,H.prototype.visitBool=jy,H.prototype.visitInt=My,H.prototype.visitInt8=My,H.prototype.visitInt16=My,H.prototype.visitInt32=My,H.prototype.visitInt64=My,H.prototype.visitUint8=My,H.prototype.visitUint16=My,H.prototype.visitUint32=My,H.prototype.visitUint64=My,H.prototype.visitFloat=Ny,H.prototype.visitFloat16=Ny,H.prototype.visitFloat32=Ny,H.prototype.visitFloat64=Ny,H.prototype.visitUtf8=jy,H.prototype.visitLargeUtf8=jy,H.prototype.visitBinary=jy,H.prototype.visitLargeBinary=jy,H.prototype.visitFixedSizeBinary=Py,H.prototype.visitDate=Fy,H.prototype.visitDateDay=Fy,H.prototype.visitDateMillisecond=Fy,H.prototype.visitTimestamp=Iy,H.prototype.visitTimestampSecond=Iy,H.prototype.visitTimestampMillisecond=Iy,H.prototype.visitTimestampMicrosecond=Iy,H.prototype.visitTimestampNanosecond=Iy,H.prototype.visitTime=Ly,H.prototype.visitTimeSecond=Ly,H.prototype.visitTimeMillisecond=Ly,H.prototype.visitTimeMicrosecond=Ly,H.prototype.visitTimeNanosecond=Ly,H.prototype.visitDecimal=jy,H.prototype.visitList=Ry,H.prototype.visitStruct=zy,H.prototype.visitUnion=By,H.prototype.visitDenseUnion=By,H.prototype.visitSparseUnion=By,H.prototype.visitDictionary=Vy,H.prototype.visitInterval=Hy,H.prototype.visitIntervalDayTime=Hy,H.prototype.visitIntervalYearMonth=Hy,H.prototype.visitDuration=Uy,H.prototype.visitDurationSecond=Uy,H.prototype.visitDurationMillisecond=Uy,H.prototype.visitDurationMicrosecond=Uy,H.prototype.visitDurationNanosecond=Uy,H.prototype.visitFixedSizeList=Wy,H.prototype.visitMap=Gy;const Ky=new H;function qy(e,t){return Ky.compareSchemas(e,t)}function Jy(e,t){return Yy(e,t.map(e=>e.data.concat()))}function Yy(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++]=Dv({type:new Gh(n),length:o,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map(t=>new eb(e,t))]}function Xy(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))??Dv({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return n}var Zy,Qy=class e{constructor(...t){var n,r;if(t.length===0)return this.batches=[],this.schema=new $v([]),this._offsets=[0],this;let i,a;t[0]instanceof $v&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(a=t.pop());let o=t=>{if(t){if(t instanceof eb)return[t];if(t instanceof e)return t.batches;if(t instanceof wv){if(t.type instanceof Gh)return[new eb(new $v(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 Yv([t[e]])),r=i??new $v(e.map((e,t)=>new ey(String(e),n[t].type,n[t].nullable))),[,a]=Jy(r,n);return a.length===0?[new eb(t)]:a}}return[]},s=t.flatMap(e=>o(e));if(i=(r=i??(n=s[0])?.schema)??new $v([]),!(i instanceof $v))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);for(let e of s){if(!(e instanceof eb))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);if(!qy(i,e.schema))throw TypeError(`Table and inner RecordBatch schemas must be equivalent.`)}this.schema=i,this.batches=s,this._offsets=a??jv(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=Av(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(iv(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?Gv.visit(new Yv(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 eb(n,e)))}slice(t,n){let r=this.schema;[t,n]=rv({length:this.numRows},t,n);let i=Mv(this.data,this._offsets,t,n);return new e(r,i.map(e=>new eb(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=Dv({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new Yv(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]=Jy(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(...Jy(a,o))}};Zy=Symbol.toStringTag,Qy[Zy]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=Fv(Pv),e.get=Fv(J_.getVisitFn(L.Struct)),e.set=Iv($g.getVisitFn(L.Struct)),e.indexOf=Lv(Hv.getVisitFn(L.Struct)),`Table`))(Qy.prototype);var $y,eb=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof $v)||([,this.data=Dv({nullCount:0,type:new Gh(this.schema.fields),children:this.schema.fields.map(e=>Dv({type:e.type,nullCount:0}))})]=e,!(this.data instanceof wv)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=tb(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]=ey.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new $v(n),o=Dv({type:new Gh(n),length:i,children:r,nullCount:0});[this.schema,this.data]=tb(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||=nb(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 J_.visit(this.data,e)}at(e){return this.get(iv(e,this.numRows))}set(e,t){return $g.visit(this.data,e,t)}indexOf(e,t){return Hv.visit(this.data,e,t)}[Symbol.iterator](){return Gv.visit(new Yv([this.data]))}toArray(){return[...this]}concat(...e){return new Qy(this.schema,[this,...e])}slice(t,n){let[r]=new Yv([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,Dv({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=Dv({type:new Gh(n.fields),length:this.numRows,children:r});return new e(n,i)}};$y=Symbol.toStringTag,eb[$y]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(eb.prototype);function tb(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))??Dv({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),Dv({type:new Gh(i),length:n,children:a})]}function nb(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;++rDv({type:e.type})),n=Dv({type:new Gh(e.fields),nullCount:0,children:t});super(e,n)}},ib=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()+Gp),(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):Ip.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Nm.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 um).__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,Ip.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Nm.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)}},ab=class extends $h{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return wm.startNull(t),wm.endNull(t)}visitInt(e,t){return cm.startInt(t),cm.addBitWidth(t,e.bitWidth),cm.addIsSigned(t,e.isSigned),cm.endInt(t)}visitFloat(e,t){return vm.startFloatingPoint(t),vm.addPrecision(t,e.precision),vm.endFloatingPoint(t)}visitBinary(e,t){return dm.startBinary(t),dm.endBinary(t)}visitLargeBinary(e,t){return bm.startLargeBinary(t),bm.endLargeBinary(t)}visitBool(e,t){return fm.startBool(t),fm.endBool(t)}visitUtf8(e,t){return km.startUtf8(t),km.endUtf8(t)}visitLargeUtf8(e,t){return xm.startLargeUtf8(t),xm.endLargeUtf8(t)}visitDecimal(e,t){return mm.startDecimal(t),mm.addScale(t,e.scale),mm.addPrecision(t,e.precision),mm.addBitWidth(t,e.bitWidth),mm.endDecimal(t)}visitDate(e,t){return pm.startDate(t),pm.addUnit(t,e.unit),pm.endDate(t)}visitTime(e,t){return Em.startTime(t),Em.addUnit(t,e.unit),Em.addBitWidth(t,e.bitWidth),Em.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return Dm.startTimestamp(t),Dm.addUnit(t,e.unit),n!==void 0&&Dm.addTimezone(t,n),Dm.endTimestamp(t)}visitInterval(e,t){return ym.startInterval(t),ym.addUnit(t,e.unit),ym.endInterval(t)}visitDuration(e,t){return hm.startDuration(t),hm.addUnit(t,e.unit),hm.endDuration(t)}visitList(e,t){return Sm.startList(t),Sm.endList(t)}visitStruct(e,t){return Tm.startStruct_(t),Tm.endStruct_(t)}visitUnion(e,t){Om.startTypeIdsVector(t,e.typeIds.length);let n=Om.createTypeIdsVector(t,e.typeIds);return Om.startUnion(t),Om.addMode(t,e.mode),Om.addTypeIds(t,n),Om.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return lm.startDictionaryEncoding(t),lm.addId(t,BigInt(e.id)),lm.addIsOrdered(t,e.isOrdered),n!==void 0&&lm.addIndexType(t,n),lm.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return gm.startFixedSizeBinary(t),gm.addByteWidth(t,e.byteWidth),gm.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return _m.startFixedSizeList(t),_m.addListSize(t,e.listSize),_m.endFixedSizeList(t)}visitMap(e,t){return Cm.startMap(t),Cm.addKeysSorted(t,e.keysSorted),Cm.endMap(t)}};const ob=new ab;function sb(e,t=new Map){return new $v(ub(e,t),gb(e.metadata),t)}function cb(e){return new Sb(e.count,fb(e.columns),pb(e.columns))}function lb(e){return new Cb(cb(e.data),e.id,e.isDelta)}function ub(e,t){return(e.fields||[]).filter(Boolean).map(e=>ey.fromJSON(e,t))}function db(e,t){return(e.children||[]).filter(Boolean).map(e=>ey.fromJSON(e,t))}function fb(e){return(e||[]).reduce((e,t)=>[...e,new Tb(t.count,mb(t.VALIDITY)),...fb(t.children)],[])}function pb(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function hb(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=vb(e,db(e,t)),i=new ey(e.name,o,e.nullable,gb(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?_b(r):new Ch,s=new Zh(t.get(n),r,n,a.isOrdered),i=new ey(e.name,s,e.nullable,gb(e.metadata))):(r=(r=a.indexType)?_b(r):new Ch,t.set(n,o=vb(e,db(e,t))),s=new Zh(o,r,n,a.isOrdered),i=new ey(e.name,s,e.nullable,gb(e.metadata))),i||null}function gb(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function _b(e){return new bh(e.isSigned,e.bitWidth)}function vb(e,t){let n=e.type.name;switch(n){case`NONE`:return new yh;case`null`:return new yh;case`binary`:return new Nh;case`largebinary`:return new Ph;case`utf8`:return new Fh;case`largeutf8`:return new Ih;case`bool`:return new Lh;case`list`:return new Wh((t||[])[0]);case`struct`:return new Gh(t||[]);case`struct_`:return new Gh(t||[])}switch(n){case`int`:{let t=e.type;return new bh(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new kh(Rp[t.precision])}case`decimal`:{let t=e.type;return new Rh(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new zh(zp[t.unit])}case`time`:{let t=e.type;return new Bh(Bp[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new Vh(Bp[t.unit],t.timezone)}case`interval`:{let t=e.type;return new Hh(Vp[t.unit])}case`duration`:{let t=e.type;return new Uh(Bp[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new Kh(Lp[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new qh(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new Jh(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new Yh((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var yb=Qp,bb=Zp,xb=class e{static fromJSON(t,n){let r=new e(0,Ip.V5,n);return r._createHeader=Eb(t,n),r}static decode(t){t=new bb(bp(t));let n=ib.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=Db(n,a),o}static encode(e){let t=new yb,n=-1;return e.isSchema()?n=$v.encode(t,e.header()):e.isRecordBatch()?n=Sb.encode(t,e.header()):e.isDictionaryBatch()&&(n=Cb.encode(t,e.header())),ib.startMessage(t),ib.addVersion(t,Ip.V5),ib.addHeader(t,n),ib.addHeaderType(t,e.headerType),ib.addBodyLength(t,BigInt(e.bodyLength)),ib.finishMessageBuffer(t,ib.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof $v)return new e(0,Ip.V5,Nm.Schema,t);if(t instanceof Sb)return new e(n,Ip.V5,Nm.RecordBatch,t);if(t instanceof Cb)return new e(n,Ip.V5,Nm.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===Nm.Schema}isRecordBatch(){return this.headerType===Nm.RecordBatch}isDictionaryBatch(){return this.headerType===Nm.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=Lm(e)}},Sb=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=Lm(e)}},Cb=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=Lm(t)}},wb=class{constructor(e,t){this.offset=Lm(e),this.length=Lm(t)}},Tb=class{constructor(e,t){this.length=Lm(e),this.nullCount=Lm(t)}};function Eb(e,t){return(()=>{switch(t){case Nm.Schema:return $v.fromJSON(e);case Nm.RecordBatch:return Sb.fromJSON(e);case Nm.DictionaryBatch:return Cb.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${Nm[t]}, type: ${t} }`)})}function Db(e,t){return(()=>{switch(t){case Nm.Schema:return $v.decode(e.header(new Mm),new Map,e.version());case Nm.RecordBatch:return Sb.decode(e.header(new im),e.version());case Nm.DictionaryBatch:return Cb.decode(e.header(new am),e.version())}throw Error(`Unrecognized Message type: { name: ${Nm[t]}, type: ${t} }`)})}ey.encode=Hb,ey.decode=Lb,ey.fromJSON=hb,$v.encode=Vb,$v.decode=Ob,$v.fromJSON=sb,Sb.encode=Ub,Sb.decode=kb,Sb.fromJSON=cb,Cb.encode=Wb,Cb.decode=Ab,Cb.fromJSON=lb,Tb.encode=Gb,Tb.decode=Mb,wb.encode=Kb,wb.decode=jb;function Ob(e,t=new Map,n=Ip.V5){let r=Fb(e,t);return new $v(r,Rb(e),t,n)}function kb(e,t=Ip.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new Sb(e.length(),Nb(e),Pb(e,t))}function Ab(e,t=Ip.V5){return new Cb(Sb.decode(e.data(),t),e.id(),e.isDelta())}function jb(e){return new wb(e.offset(),e.length())}function Mb(e){return new Tb(e.length(),e.nullCount())}function Nb(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++rey.encode(e,t));Mm.startFieldsVector(e,n.length);let r=Mm.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?Mm.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return um.startKeyValue(e),um.addKey(e,r),um.addValue(e,i),um.endKeyValue(e)})):-1;return Mm.startSchema(e),Mm.addFields(e,r),Mm.addEndianness(e,qb?om.Little:om.Big),i!==-1&&Mm.addCustomMetadata(e,i),Mm.endSchema(e)}function Hb(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;R.isDictionary(a)?(o=a.dictionary.typeId,i=ob.visit(a,e),r=ob.visit(a.dictionary,e)):r=ob.visit(a,e);let s=(a.children||[]).map(t=>ey.encode(e,t)),c=jm.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?jm.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return um.startKeyValue(e),um.addKey(e,r),um.addValue(e,i),um.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),jm.startField(e),jm.addType(e,r),jm.addTypeType(e,o),jm.addChildren(e,c),jm.addNullable(e,!!t.nullable),n!==-1&&jm.addName(e,n),i!==-1&&jm.addDictionary(e,i),l!==-1&&jm.addCustomMetadata(e,l),jm.endField(e)}function Ub(e,t){let n=t.nodes||[],r=t.buffers||[];im.startNodesVector(e,n.length);for(let t of n.slice().reverse())Tb.encode(e,t);let i=e.endVector();im.startBuffersVector(e,r.length);for(let t of r.slice().reverse())wb.encode(e,t);let a=e.endVector();return im.startRecordBatch(e),im.addLength(e,BigInt(t.length)),im.addNodes(e,i),im.addBuffers(e,a),im.endRecordBatch(e)}function Wb(e,t){let n=Sb.encode(e,t.data);return am.startDictionaryBatch(e),am.addId(e,BigInt(t.id)),am.addIsDelta(e,t.isDelta),am.addData(e,n),am.endDictionaryBatch(e)}function Gb(e,t){return rm.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function Kb(e,t){return nm.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const qb=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),Jb=e=>`Expected ${Nm[e]} Message in stream, but was null or length 0.`,Yb=e=>`Header pointer of flatbuffer-encoded ${Nm[e]} Message is null or length 0.`,Xb=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,Zb=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var Qb=class{constructor(e){this.source=e instanceof py?e:new py(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?cy: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(Jb(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=bp(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(Jb(e));return t.value}readSchema(){let e=Nm.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(Yb(e));return n}};const tx=4,nx=`ARROW1`,rx=new Uint8Array(6);for(let e=0;e<6;e+=1)rx[e]=nx.codePointAt(e);function ix(e,t=0){for(let n=-1,r=rx.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 Op.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Op.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:rp(t)?Sx(t):ap(t)?Tx(t):ep(t)?(()=>Bf(this,void 0,void 0,function*(){return yield e.from(yield t)}))():op(t)||lp(t)||dp(t)||np(t)?wx(new my(t)):Cx(new py(t))}static readAll(t){return t instanceof e?t.isSync()?bx(t):xx(t):rp(t)||ArrayBuffer.isView(t)||tp(t)||ip(t)?bx(t):xx(t)}},lx=class extends cx{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Uf(this,arguments,function*(){yield Hf(yield*Wf(Gf(this[Symbol.iterator]())))})}},ux=class extends cx{constructor(e){super(e),this._impl=e}readAll(){return Bf(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=Gf(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]()}},dx=class extends lx{constructor(e){super(e),this._impl=e}},fx=class extends ux{constructor(e){super(e),this._impl=e}},px=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=Dv({type:new Gh(this.schema.fields),length:e.length,children:n});return new eb(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 Yv(c)):new Yv(c)).memoize()}_loadVectors(e,t,n){return new Dy(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},mx=class extends px{constructor(e,t){super(t),this._reader=rp(e)?new ex(this._handle=e):new Qb(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=yx(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):cy}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):cy}next(){if(this.closed)return cy;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 rb(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},hx=class extends px{constructor(e,t){super(t),this._reader=new $b(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Bf(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 Bf(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=yx(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Bf(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):cy})}return(e){return Bf(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):cy})}next(){return Bf(this,void 0,void 0,function*(){if(this.closed)return cy;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 rb(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Bf(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},gx=class extends mx{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 _y?e:new _y(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(Nm.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(Nm.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-ox,n=e.readInt32(t),r=e.readAt(t-n,n);return ay.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Bf(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 Bf(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(Nm.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 Bf(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(Nm.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 Bf(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-ox,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return ay.decode(r)})}_readNextMessageAndValidate(e){return Bf(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?ix(t)?new dx(new gx(e.read())):new lx(new mx(e)):new lx(new mx(function*(){}()))}function wx(e){return Bf(this,void 0,void 0,function*(){let t=yield e.peek(ax+7&-8);return t&&t.byteLength>=4?ix(t)?new dx(new gx(yield e.read())):new ux(new hx(e)):new ux(new hx(function(){return Uf(this,arguments,function*(){})}()))})}function Tx(e){return Bf(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new vy(e,t);return t>=sx&&ix(yield n.readAt(0,ax+7&-8))?new fx(new _x(n)):new ux(new hx(n))})}var Ex=class e extends $h{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof eb?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 Yv)return this.visitMany(e.data),this;let{type:t}=e;if(!R.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(R.isUnion(t))this.nodes.push(new Tb(n,0));else{let{nullCount:r}=e;R.isNull(t)||Dx.call(this,r<=0?new Uint8Array:_v(e.offset,n,e.nullBitmap)),this.nodes.push(new Tb(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 Dx(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new wb(this._byteLength,t)),this._byteLength+=t,this}function Ox(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(Dx.call(this,i),n.mode===Lp.Sparse)return Nx.call(this,e);if(n.mode===Lp.Dense){if(e.offset<=0)return Dx.call(this,a),Nx.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 kx(e){let t;return e.nullCount>=e.length?Dx.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?Dx.call(this,_v(e.offset,e.length,t)):Dx.call(this,vv(e.values))}function Ax(e){return Dx.call(this,e.values.subarray(0,e.length*e.stride))}function jx(e){let{length:t,values:n,valueOffsets:r}=e,i=Lm(r[0]),a=Lm(r[t]),o=Math.min(a-i,n.byteLength-i);return Dx.call(this,Ep(-i,t+1,r)),Dx.call(this,n.subarray(i,i+o)),this}function Mx(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return Dx.call(this,Ep(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function Nx(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}Ex.prototype.visitBool=kx,Ex.prototype.visitInt=Ax,Ex.prototype.visitFloat=Ax,Ex.prototype.visitUtf8=jx,Ex.prototype.visitLargeUtf8=jx,Ex.prototype.visitBinary=jx,Ex.prototype.visitLargeBinary=jx,Ex.prototype.visitFixedSizeBinary=Ax,Ex.prototype.visitDate=Ax,Ex.prototype.visitTimestamp=Ax,Ex.prototype.visitTime=Ax,Ex.prototype.visitDecimal=Ax,Ex.prototype.visitList=Mx,Ex.prototype.visitStruct=Nx,Ex.prototype.visitUnion=Ox,Ex.prototype.visitInterval=Ax,Ex.prototype.visitDuration=Ax,Ex.prototype.visitFixedSizeList=Mx,Ex.prototype.visitMap=Mx;var Px=class extends uy{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 fy,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,$f(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 ep(e)?e.then(e=>this.writeAll(e)):np(e)?Rx(this,e):Lx(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 fy?this._sink=e:(this._sink=new fy,e&&cp(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&up(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||!qy(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 Qy&&!(t=e.schema)||e instanceof eb&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!qy(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof eb?e instanceof rb||this._writeRecordBatch(e):e instanceof Qy?this.writeAll(e.batches):tp(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=xb.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===Nm.RecordBatch?this._recordBatchBlocks.push(new sy(o,e.bodyLength,this._position)):e.headerType===Nm.DictionaryBatch&&this._dictionaryBlocks.push(new sy(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=bp(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(xb.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(rx)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=Ex.assemble(e),a=new Sb(e.numRows,n,r),o=xb.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}=Ex.assemble(new Yv([e])),s=new Sb(e.length,i,a),c=new Cb(s,t,n),l=xb.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)):np(t)?Rx(r,t):Lx(r,t)}},Ix=class e extends Px{static writeAll(t){let n=new e;return ep(t)?t.then(e=>n.writeAll(e)):np(t)?Rx(n,t):Lx(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=ay.encode(new ay(e,Ip.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function Lx(e,t){let n=t;t instanceof Qy&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function Rx(e,t){return Bf(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=Gf(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 zx(e,t=`stream`){return(t===`stream`?Fx:Ix).writeAll(e).toUint8Array(!0)}var Bx=Object.create,Vx=Object.defineProperty,Hx=Object.getOwnPropertyDescriptor,Ux=Object.getOwnPropertyNames,Wx=Object.getPrototypeOf,Gx=Object.prototype.hasOwnProperty,Kx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qx=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Ux(t))!Gx.call(e,i)&&i!==n&&Vx(e,i,{get:()=>t[i],enumerable:!(r=Hx(t,i))||r.enumerable});return e},Jx=(e,t,n)=>(n=e==null?{}:Bx(Wx(e)),qx(t||!e||!e.__esModule?Vx(n,`default`,{value:e,enumerable:!0}):n,e)),Yx=Kx((e,t)=>{t.exports=Worker}),Xx=(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))(Xx||{}),Zx=(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))(Zx||{}),Qx=(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))(Qx||{}),$x=(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))($x||{}),eS=(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))(eS||{}),tS=(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))(tS||{}),nS=class{log(e){}},rS=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},iS=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(iS||{}),aS=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=cx.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new Qy(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 oS(this._bindings,this._conn,n),i=await cx.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 sS(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=zx(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)}},oS=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}},sS=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=cx.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new Qy(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new oS(this.bindings,this.connectionId,t),r=await cx.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},cS=(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))(cS||{}),lS=(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))(lS||{}),uS=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 dS(e){switch(e.typeId){case L.Binary:return{sqlType:`binary`};case L.Bool:return{sqlType:`bool`};case L.Date:return{sqlType:`date`};case L.DateDay:return{sqlType:`date32[d]`};case L.DateMillisecond:return{sqlType:`date64[ms]`};case L.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case L.Float:return{sqlType:`float`};case L.Float16:return{sqlType:`float16`};case L.Float32:return{sqlType:`float32`};case L.Float64:return{sqlType:`float64`};case L.Int:return{sqlType:`int32`};case L.Int16:return{sqlType:`int16`};case L.Int32:return{sqlType:`int32`};case L.Int64:return{sqlType:`int64`};case L.Uint16:return{sqlType:`uint16`};case L.Uint32:return{sqlType:`uint32`};case L.Uint64:return{sqlType:`uint64`};case L.Uint8:return{sqlType:`uint8`};case L.IntervalDayTime:return{sqlType:`interval[dt]`};case L.IntervalYearMonth:return{sqlType:`interval[m]`};case L.List:return{sqlType:`list`,valueType:dS(e.valueType)};case L.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case L.Null:return{sqlType:`null`};case L.Utf8:return{sqlType:`utf8`};case L.Struct:return{sqlType:`struct`,fields:e.children.map(e=>fS(e.name,e.type))};case L.Map:{let t=e;return{sqlType:`map`,keyType:dS(t.keyType),valueType:dS(t.valueType)}}case L.Time:return{sqlType:`time[s]`};case L.TimeMicrosecond:return{sqlType:`time[us]`};case L.TimeMillisecond:return{sqlType:`time[ms]`};case L.TimeNanosecond:return{sqlType:`time[ns]`};case L.TimeSecond:return{sqlType:`time[s]`};case L.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case L.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case L.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case L.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case L.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function fS(e,t){let n=dS(t);return n.name=e,n}var pS=new TextEncoder,mS=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 uS(`RESET`,null);return await this.postTask(e)}async ping(){let e=new uS(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new uS(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new uS(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new uS(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new uS(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new uS(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new uS(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new uS(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new uS(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new uS(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new aS(this,e)}async disconnect(e){let t=new uS(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new uS(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new uS(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new uS(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new uS(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new uS(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new uS(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new uS(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new uS(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new uS(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new uS(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new uS(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=pS.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new uS(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new uS(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new uS(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new uS(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new uS(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new uS(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new uS(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new uS(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new uS(`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(fS(t,r))}n.columnsFlat=e,delete n.columns}let r=new uS(`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(fS(t,r))}n.columnsFlat=e,delete n.columns}let r=new uS(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function hS(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}hS();var gS=(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))(gS||{}),_S=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])),vS=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])),yS=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])),bS=()=>(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])),xS={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`}}};xS.name,xS.version;var SS=xS.version.split(`.`);SS[0],SS[1],SS[2];var CS=()=>typeof navigator>`u`,wS=null,TS=null,ES=null,DS=null,OS=null;async function kS(){return wS??=typeof BigInt64Array<`u`,TS??=await vS(),ES??=await bS(),DS??=await yS(),OS??=await _S(),{bigInt64Array:wS,crossOriginIsolated:CS()||globalThis.crossOriginIsolated||!1,wasmExceptions:TS,wasmSIMD:DS,wasmThreads:ES,wasmBulkMemory:OS}}async function AS(e){let t=await kS();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}}Jx(Yx()),Symbol.for(`constructDateFrom`);const jS={},MS={};function NS(e,t){try{let n=jS[e]||=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format,r=n(t).split(`GMT`)[1]||``;return r in MS?MS[r]:FS(r,r.split(`:`))}catch{if(e in MS)return MS[e];let t=e?.match(PS);return t?FS(e,t.slice(1)):NaN}}const PS=/([+-]\d\d):?(\d\d)?/;function FS(e,t){let n=+t[0],r=+(t[1]||0);return MS[e]=n>0?n*60+r:n*60-r}var IS=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(NS(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)),BS(this,NaN),RS(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-NS(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),RS(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const LS=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!LS.test(e))return;let t=e.replace(LS,`$1UTC`);IS.prototype[t]&&(e.startsWith(`get`)?IS.prototype[e]=function(){return this.internal[t]()}:(IS.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),zS(this),+this},IS.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),RS(this),+this}))});function RS(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function zS(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()),BS(e)}function BS(e){let t=NS(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=NS(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=NS(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 IS{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} (${VS(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 VS(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const HS=new TextDecoder(`utf-8`),US=e=>HS.decode(e),WS=new TextEncoder,GS=e=>WS.encode(e),KS=e=>typeof e==`function`,qS=e=>e!=null&&Object(e)===e,JS=e=>qS(e)&&KS(e.then),YS=e=>qS(e)&&KS(e[Symbol.iterator]),XS=e=>qS(e)&&KS(e[Symbol.asyncIterator]),ZS=e=>qS(e)&&`done`in e&&`value`in e,QS=e=>qS(e)&&KS(e.clear)&&KS(e.bytes)&&KS(e.position)&&KS(e.setPosition)&&KS(e.capacity)&&KS(e.getBufferIdentifier)&&KS(e.createLong);var $S={};ze($S,{compareArrayLike:()=>RC,joinUint8Arrays:()=>rC,memcpy:()=>nC,rebaseValueOffsets:()=>LC,toArrayBufferView:()=>iC,toArrayBufferViewAsyncIterator:()=>DC,toArrayBufferViewIterator:()=>_C,toBigInt64Array:()=>cC,toBigUint64Array:()=>fC,toFloat32Array:()=>pC,toFloat32ArrayAsyncIterator:()=>PC,toFloat32ArrayIterator:()=>wC,toFloat64Array:()=>mC,toFloat64ArrayAsyncIterator:()=>FC,toFloat64ArrayIterator:()=>TC,toInt16Array:()=>oC,toInt16ArrayAsyncIterator:()=>kC,toInt16ArrayIterator:()=>yC,toInt32Array:()=>sC,toInt32ArrayAsyncIterator:()=>AC,toInt32ArrayIterator:()=>bC,toInt8Array:()=>aC,toInt8ArrayAsyncIterator:()=>OC,toInt8ArrayIterator:()=>vC,toUint16Array:()=>uC,toUint16ArrayAsyncIterator:()=>MC,toUint16ArrayIterator:()=>SC,toUint32Array:()=>dC,toUint32ArrayAsyncIterator:()=>NC,toUint32ArrayIterator:()=>CC,toUint8Array:()=>lC,toUint8ArrayAsyncIterator:()=>jC,toUint8ArrayIterator:()=>xC,toUint8ClampedArray:()=>hC,toUint8ClampedArrayAsyncIterator:()=>IC,toUint8ClampedArrayIterator:()=>EC});const eC=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function tC(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;++ciC(Int8Array,e),oC=e=>iC(Int16Array,e),sC=e=>iC(Int32Array,e),cC=e=>iC(BigInt64Array,e),lC=e=>iC(Uint8Array,e),uC=e=>iC(Uint16Array,e),dC=e=>iC(Uint32Array,e),fC=e=>iC(BigUint64Array,e),pC=e=>iC(Float32Array,e),mC=e=>iC(Float64Array,e),hC=e=>iC(Uint8ClampedArray,e),gC=e=>(e.next(),e);function*_C(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof eC?n(t):YS(t)?t:n(t);return yield*gC((function*(t){let n=null;do n=t.next(yield iC(e,n));while(!n.done)})(r[Symbol.iterator]())),new e}const vC=e=>_C(Int8Array,e),yC=e=>_C(Int16Array,e),bC=e=>_C(Int32Array,e),xC=e=>_C(Uint8Array,e),SC=e=>_C(Uint16Array,e),CC=e=>_C(Uint32Array,e),wC=e=>_C(Float32Array,e),TC=e=>_C(Float64Array,e),EC=e=>_C(Uint8ClampedArray,e);function DC(e,t){return Uf(this,arguments,function*(){if(JS(t))return yield Hf(yield Hf(yield*Wf(Gf(DC(e,yield Hf(t))))));let n=function(e){return Uf(this,arguments,function*(){yield yield Hf(yield Hf(e))})},r=function(e){return Uf(this,arguments,function*(){yield Hf(yield*Wf(Gf(gC((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 eC?n(t):YS(t)?r(t):XS(t)?t:n(t);return yield Hf(yield*Wf(Gf(gC((function(t){return Uf(this,arguments,function*(){let n=null;do n=yield Hf(t.next(yield yield Hf(iC(e,n))));while(!n.done)})})(i[Symbol.asyncIterator]()))))),yield Hf(new e)})}const OC=e=>DC(Int8Array,e),kC=e=>DC(Int16Array,e),AC=e=>DC(Int32Array,e),jC=e=>DC(Uint8Array,e),MC=e=>DC(Uint16Array,e),NC=e=>DC(Uint32Array,e),PC=e=>DC(Float32Array,e),FC=e=>DC(Float64Array,e),IC=e=>DC(Uint8ClampedArray,e);function LC(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(++nqC});const KC=void 0;function qC(e){if(e===null)return`null`;if(e===KC)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=>qC(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function JC(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 YC(e,t){return JC(e/t)+JC(e%t)/JC(t)}var XC={};ze(XC,{BN:()=>cw,bigNumToBigInt:()=>ow,bigNumToNumber:()=>iw,bigNumToString:()=>aw,isArrowBigNumSymbol:()=>ZC});const ZC=Symbol.for(`isArrowBigNum`);function QC(e,...t){return t.length===0?Object.setPrototypeOf(iC(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}QC.prototype[ZC]=!0,QC.prototype.toJSON=function(){return`"${aw(this)}"`},QC.prototype.valueOf=function(e){return iw(this,e)},QC.prototype.toString=function(){return aw(this)},QC.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return iw(this);case`string`:return aw(this);case`default`:return ow(this)}return aw(this)};function $C(...e){return QC.apply(this,e)}function ew(...e){return QC.apply(this,e)}function tw(...e){return QC.apply(this,e)}Object.setPrototypeOf($C.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(ew.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(tw.prototype,Object.create(Uint32Array.prototype)),Object.assign($C.prototype,QC.prototype,{constructor:$C,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(ew.prototype,QC.prototype,{constructor:ew,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(tw.prototype,QC.prototype,{constructor:tw,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const nw=BigInt(4294967296)*BigInt(4294967296),rw=nw-BigInt(1);function iw(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=JC(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return JC(c)}function aw(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return sw(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return sw(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`))(W.prototype);var jw=class extends W{constructor(){super(U.Null)}toString(){return`Null`}};uw=Symbol.toStringTag,jw[uw]=(e=>e[Symbol.toStringTag]=`Null`)(jw.prototype);var Mw=class extends W{constructor(e,t){super(U.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}`}};dw=Symbol.toStringTag,Mw[dw]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(Mw.prototype);var Nw=class extends Mw{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},Pw=class extends Mw{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},Fw=class extends Mw{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},Iw=class extends Mw{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},Lw=class extends Mw{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Rw=class extends Mw{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},zw=class extends Mw{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},Bw=class extends Mw{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(Nw.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(Pw.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(Fw.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(Iw.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(Lw.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(Rw.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(zw.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(Bw.prototype,`ArrayType`,{value:BigUint64Array});var Vw=class extends W{constructor(e){super(U.Float),this.precision=e}get ArrayType(){switch(this.precision){case BC.HALF:return Uint16Array;case BC.SINGLE:return Float32Array;case BC.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};fw=Symbol.toStringTag,Vw[fw]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(Vw.prototype);var Hw=class extends Vw{constructor(){super(BC.HALF)}},Uw=class extends Vw{constructor(){super(BC.SINGLE)}},Ww=class extends Vw{constructor(){super(BC.DOUBLE)}};Object.defineProperty(Hw.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Uw.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(Ww.prototype,`ArrayType`,{value:Float64Array});var Gw=class extends W{constructor(){super(U.Binary)}toString(){return`Binary`}};pw=Symbol.toStringTag,Gw[pw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(Gw.prototype);var Kw=class extends W{constructor(){super(U.LargeBinary)}toString(){return`LargeBinary`}};mw=Symbol.toStringTag,Kw[mw]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(Kw.prototype);var qw=class extends W{constructor(){super(U.Utf8)}toString(){return`Utf8`}};hw=Symbol.toStringTag,qw[hw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(qw.prototype);var Jw=class extends W{constructor(){super(U.LargeUtf8)}toString(){return`LargeUtf8`}};gw=Symbol.toStringTag,Jw[gw]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(Jw.prototype);var Yw=class extends W{constructor(){super(U.Bool)}toString(){return`Bool`}};_w=Symbol.toStringTag,Yw[_w]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(Yw.prototype);var Xw=class extends W{constructor(e,t,n=128){super(U.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};vw=Symbol.toStringTag,Xw[vw]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Xw.prototype);var Zw=class extends W{constructor(e){super(U.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${VC[this.unit]}>`}get ArrayType(){return this.unit===VC.DAY?Int32Array:BigInt64Array}};yw=Symbol.toStringTag,Zw[yw]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(Zw.prototype);var Qw=class extends W{constructor(e,t){super(U.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${HC[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};bw=Symbol.toStringTag,Qw[bw]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(Qw.prototype);var $w=class extends W{constructor(e,t){super(U.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${HC[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};xw=Symbol.toStringTag,$w[xw]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))($w.prototype);var eT=class extends W{constructor(e){super(U.Interval),this.unit=e}toString(){return`Interval<${UC[this.unit]}>`}};Sw=Symbol.toStringTag,eT[Sw]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(eT.prototype);var tT=class extends W{constructor(e){super(U.Duration),this.unit=e}toString(){return`Duration<${HC[this.unit]}>`}};Cw=Symbol.toStringTag,tT[Cw]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(tT.prototype);var nT=class extends W{constructor(e){super(U.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}};ww=Symbol.toStringTag,nT[ww]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(nT.prototype);var rT=class extends W{constructor(e){super(U.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};Tw=Symbol.toStringTag,rT[Tw]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(rT.prototype);var iT=class extends W{constructor(e,t,n){super(U.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(` | `)}>`}};Ew=Symbol.toStringTag,iT[Ew]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(iT.prototype);var aT=class extends W{constructor(e){super(U.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};Dw=Symbol.toStringTag,aT[Dw]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(aT.prototype);var oT=class extends W{constructor(e,t){super(U.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}>`}};Ow=Symbol.toStringTag,oT[Ow]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(oT.prototype);var sT=class extends W{constructor(e,t=!1){var n,r,i;if(super(U.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(`, `)}}>`}};kw=Symbol.toStringTag,sT[kw]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(sT.prototype);const cT=(e=>()=>++e)(-1);var lT=class extends W{constructor(e,t,n,r){super(U.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?cT():JC(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}>`}};Aw=Symbol.toStringTag,lT[Aw]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(lT.prototype);function uT(e){let t=e;switch(e.typeId){case U.Decimal:return e.bitWidth/32;case U.Interval:return t.unit===UC.MONTH_DAY_NANO?4:1+t.unit;case U.FixedSizeList:return t.listSize;case U.FixedSizeBinary:return t.byteWidth;default:return 1}}var dT=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 fT(this,e,t)}getVisitFnByTypeId(e,t=!0){return pT(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 fT(e,t,n=!0){return typeof t==`number`?pT(e,t,n):typeof t==`string`&&t in U?pT(e,U[t],n):t&&t instanceof W?pT(e,mT(t),n):t?.type&&t.type instanceof W?pT(e,mT(t.type),n):pT(e,U.NONE,n)}function pT(e,t,n=!0){let r=null;switch(t){case U.Null:r=e.visitNull;break;case U.Bool:r=e.visitBool;break;case U.Int:r=e.visitInt;break;case U.Int8:r=e.visitInt8||e.visitInt;break;case U.Int16:r=e.visitInt16||e.visitInt;break;case U.Int32:r=e.visitInt32||e.visitInt;break;case U.Int64:r=e.visitInt64||e.visitInt;break;case U.Uint8:r=e.visitUint8||e.visitInt;break;case U.Uint16:r=e.visitUint16||e.visitInt;break;case U.Uint32:r=e.visitUint32||e.visitInt;break;case U.Uint64:r=e.visitUint64||e.visitInt;break;case U.Float:r=e.visitFloat;break;case U.Float16:r=e.visitFloat16||e.visitFloat;break;case U.Float32:r=e.visitFloat32||e.visitFloat;break;case U.Float64:r=e.visitFloat64||e.visitFloat;break;case U.Utf8:r=e.visitUtf8;break;case U.LargeUtf8:r=e.visitLargeUtf8;break;case U.Binary:r=e.visitBinary;break;case U.LargeBinary:r=e.visitLargeBinary;break;case U.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case U.Date:r=e.visitDate;break;case U.DateDay:r=e.visitDateDay||e.visitDate;break;case U.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case U.Timestamp:r=e.visitTimestamp;break;case U.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case U.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case U.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case U.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case U.Time:r=e.visitTime;break;case U.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case U.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case U.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case U.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case U.Decimal:r=e.visitDecimal;break;case U.List:r=e.visitList;break;case U.Struct:r=e.visitStruct;break;case U.Union:r=e.visitUnion;break;case U.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case U.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case U.Dictionary:r=e.visitDictionary;break;case U.Interval:r=e.visitInterval;break;case U.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case U.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case U.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case U.Duration:r=e.visitDuration;break;case U.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case U.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case U.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case U.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case U.FixedSizeList:r=e.visitFixedSizeList;break;case U.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${U[t]}'`)}function mT(e){switch(e.typeId){case U.Null:return U.Null;case U.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?U.Int8:U.Uint8;case 16:return n?U.Int16:U.Uint16;case 32:return n?U.Int32:U.Uint32;case 64:return n?U.Int64:U.Uint64}return U.Int}case U.Float:switch(e.precision){case BC.HALF:return U.Float16;case BC.SINGLE:return U.Float32;case BC.DOUBLE:return U.Float64}return U.Float;case U.Binary:return U.Binary;case U.LargeBinary:return U.LargeBinary;case U.Utf8:return U.Utf8;case U.LargeUtf8:return U.LargeUtf8;case U.Bool:return U.Bool;case U.Decimal:return U.Decimal;case U.Time:switch(e.unit){case HC.SECOND:return U.TimeSecond;case HC.MILLISECOND:return U.TimeMillisecond;case HC.MICROSECOND:return U.TimeMicrosecond;case HC.NANOSECOND:return U.TimeNanosecond}return U.Time;case U.Timestamp:switch(e.unit){case HC.SECOND:return U.TimestampSecond;case HC.MILLISECOND:return U.TimestampMillisecond;case HC.MICROSECOND:return U.TimestampMicrosecond;case HC.NANOSECOND:return U.TimestampNanosecond}return U.Timestamp;case U.Date:switch(e.unit){case VC.DAY:return U.DateDay;case VC.MILLISECOND:return U.DateMillisecond}return U.Date;case U.Interval:switch(e.unit){case UC.DAY_TIME:return U.IntervalDayTime;case UC.YEAR_MONTH:return U.IntervalYearMonth;case UC.MONTH_DAY_NANO:return U.IntervalMonthDayNano}return U.Interval;case U.Duration:switch(e.unit){case HC.SECOND:return U.DurationSecond;case HC.MILLISECOND:return U.DurationMillisecond;case HC.MICROSECOND:return U.DurationMicrosecond;case HC.NANOSECOND:return U.DurationNanosecond}return U.Duration;case U.Map:return U.Map;case U.List:return U.List;case U.Struct:return U.Struct;case U.Union:switch(e.mode){case zC.Dense:return U.DenseUnion;case zC.Sparse:return U.SparseUnion}return U.Union;case U.FixedSizeBinary:return U.FixedSizeBinary;case U.FixedSizeList:return U.FixedSizeList;case U.Dictionary:return U.Dictionary}throw Error(`Unrecognized type '${U[e.typeId]}'`)}dT.prototype.visitInt8=null,dT.prototype.visitInt16=null,dT.prototype.visitInt32=null,dT.prototype.visitInt64=null,dT.prototype.visitUint8=null,dT.prototype.visitUint16=null,dT.prototype.visitUint32=null,dT.prototype.visitUint64=null,dT.prototype.visitFloat16=null,dT.prototype.visitFloat32=null,dT.prototype.visitFloat64=null,dT.prototype.visitDateDay=null,dT.prototype.visitDateMillisecond=null,dT.prototype.visitTimestampSecond=null,dT.prototype.visitTimestampMillisecond=null,dT.prototype.visitTimestampMicrosecond=null,dT.prototype.visitTimestampNanosecond=null,dT.prototype.visitTimeSecond=null,dT.prototype.visitTimeMillisecond=null,dT.prototype.visitTimeMicrosecond=null,dT.prototype.visitTimeNanosecond=null,dT.prototype.visitDenseUnion=null,dT.prototype.visitSparseUnion=null,dT.prototype.visitIntervalDayTime=null,dT.prototype.visitIntervalYearMonth=null,dT.prototype.visitIntervalMonthDayNano=null,dT.prototype.visitDuration=null,dT.prototype.visitDurationSecond=null,dT.prototype.visitDurationMillisecond=null,dT.prototype.visitDurationMicrosecond=null,dT.prototype.visitDurationNanosecond=null;var hT={};ze(hT,{float64ToUint16:()=>yT,uint16ToFloat64:()=>vT});const gT=new Float64Array(1),_T=new Uint32Array(gT.buffer);function vT(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 yT(e){if(e!==e)return 32256;gT[0]=e;let t=(_T[1]&2147483648)>>16&65535,n=_T[1]&2146435072,r=0;return n>=1089470464?_T[0]>0?n=31744:(n=(n&2080374784)>>16,r=(_T[1]&1048575)>>10):n<=1056964608?(r=1048576+(_T[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(_T[1]&1048575)+512>>10),t|n|r&65535}var G=class extends dT{};function bT(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const xT=(e,t,n)=>{e[t]=Math.floor(n/864e5)},ST=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},TT=({values:e},t,n)=>{e[t]=n},ET=({values:e},t,n)=>{e[t]=yT(n)},DT=(e,t,n)=>{switch(e.type.precision){case BC.HALF:return ET(e,t,n);case BC.SINGLE:case BC.DOUBLE:return TT(e,t,n)}},OT=({values:e},t,n)=>{xT(e,t,n.valueOf())},kT=({values:e},t,n)=>{e[t]=BigInt(n)},AT=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},jT=({values:e,valueOffsets:t},n,r)=>ST(e,t,n,r),MT=({values:e,valueOffsets:t},n,r)=>ST(e,t,n,GS(r)),NT=(e,t,n)=>{e.type.unit===VC.DAY?OT(e,t,n):kT(e,t,n)},PT=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},FT=({values:e},t,n)=>{e[t]=BigInt(n)},IT=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},LT=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},RT=(e,t,n)=>{switch(e.type.unit){case HC.SECOND:return PT(e,t,n);case HC.MILLISECOND:return FT(e,t,n);case HC.MICROSECOND:return IT(e,t,n);case HC.NANOSECOND:return LT(e,t,n)}},zT=({values:e},t,n)=>{e[t]=n},BT=({values:e},t,n)=>{e[t]=n},VT=({values:e},t,n)=>{e[t]=n},HT=({values:e},t,n)=>{e[t]=n},UT=(e,t,n)=>{switch(e.type.unit){case HC.SECOND:return zT(e,t,n);case HC.MILLISECOND:return BT(e,t,n);case HC.MICROSECOND:return VT(e,t,n);case HC.NANOSECOND:return HT(e,t,n)}},WT=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},GT=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=fE.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=fE.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},qT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),JT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),YT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),XT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),ZT=(e,t,n)=>{let r=e.type.children.map(e=>fE.getVisitFn(e.type)),i=n instanceof Map?YT(t,n):n instanceof dO?JT(t,n):Array.isArray(n)?qT(t,n):XT(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},QT=(e,t,n)=>{e.type.mode===zC.Dense?$T(e,t,n):eE(e,t,n)},$T=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];fE.visit(i,e.valueOffsets[t],n)},eE=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];fE.visit(i,t,n)},tE=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},nE=(e,t,n)=>{switch(e.type.unit){case UC.YEAR_MONTH:return iE(e,t,n);case UC.DAY_TIME:return rE(e,t,n);case UC.MONTH_DAY_NANO:return aE(e,t,n)}},rE=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},iE=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},aE=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},oE=({values:e},t,n)=>{e[t]=n},sE=({values:e},t,n)=>{e[t]=n},cE=({values:e},t,n)=>{e[t]=n},lE=({values:e},t,n)=>{e[t]=n},uE=(e,t,n)=>{switch(e.type.unit){case HC.SECOND:return oE(e,t,n);case HC.MILLISECOND:return sE(e,t,n);case HC.MICROSECOND:return cE(e,t,n);case HC.NANOSECOND:return lE(e,t,n)}},dE=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=fE.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${qC(e)}: ${qC(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new gE(this[pE],this[mE])}},gE=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[pE].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[pE].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[pE].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=lD.visit(e[pE].children[n],e[mE]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[pE].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(fE.visit(e[pE].children[r],e[mE],n),Reflect.set(e,t,n))}};const vE=new _E;var K=class extends dT{};function yE(e){return(t,n)=>t.getValid(n)?e(t,n):null}const bE=(e,t)=>864e5*e[t],xE=(e,t)=>null,SE=(e,t,n)=>{if(n+1>=t.length)return null;let r=JC(t[n]),i=JC(t[n+1]);return e.subarray(r,i)},CE=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<bE(e,t),TE=({values:e},t)=>JC(e[t]),EE=({stride:e,values:t},n)=>t[e*n],DE=({stride:e,values:t},n)=>vT(t[e*n]),OE=({values:e},t)=>e[t],kE=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),AE=({values:e,valueOffsets:t},n)=>SE(e,t,n),jE=({values:e,valueOffsets:t},n)=>{let r=SE(e,t,n);return r===null?null:US(r)},ME=({values:e},t)=>e[t],NE=({type:e,values:t},n)=>e.precision===BC.HALF?vT(t[n]):t[n],PE=(e,t)=>e.type.unit===VC.DAY?wE(e,t):TE(e,t),FE=({values:e},t)=>1e3*JC(e[t]),IE=({values:e},t)=>JC(e[t]),LE=({values:e},t)=>YC(e[t],BigInt(1e3)),RE=({values:e},t)=>YC(e[t],BigInt(1e6)),zE=(e,t)=>{switch(e.type.unit){case HC.SECOND:return FE(e,t);case HC.MILLISECOND:return IE(e,t);case HC.MICROSECOND:return LE(e,t);case HC.NANOSECOND:return RE(e,t)}},BE=({values:e},t)=>e[t],VE=({values:e},t)=>e[t],HE=({values:e},t)=>e[t],UE=({values:e},t)=>e[t],WE=(e,t)=>{switch(e.type.unit){case HC.SECOND:return BE(e,t);case HC.MILLISECOND:return VE(e,t);case HC.MICROSECOND:return HE(e,t);case HC.NANOSECOND:return UE(e,t)}},GE=({values:e,stride:t},n)=>cw.decimal(e.subarray(t*n,t*(n+1))),KE=(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 dO([c])},qE=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new mD(o.slice(i,a-i))},JE=(e,t)=>new hE(e,t),YE=(e,t)=>e.type.mode===zC.Dense?XE(e,t):ZE(e,t),XE=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return lD.visit(r,e.valueOffsets[t])},ZE=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return lD.visit(r,t)},QE=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},$E=(e,t)=>e.type.unit===UC.MONTH_DAY_NANO?nD(e,t):e.type.unit===UC.DAY_TIME?eD(e,t):tD(e,t),eD=({values:e},t)=>e.subarray(2*t,2*(t+1)),tD=({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},nD=({values:e},t)=>e.subarray(4*t,4*(t+1)),rD=({values:e},t)=>e[t],iD=({values:e},t)=>e[t],aD=({values:e},t)=>e[t],oD=({values:e},t)=>e[t],sD=(e,t)=>{switch(e.type.unit){case HC.SECOND:return rD(e,t);case HC.MILLISECOND:return iD(e,t);case HC.MICROSECOND:return aD(e,t);case HC.NANOSECOND:return oD(e,t)}},cD=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new dO([a])};K.prototype.visitNull=yE(xE),K.prototype.visitBool=yE(CE),K.prototype.visitInt=yE(ME),K.prototype.visitInt8=yE(EE),K.prototype.visitInt16=yE(EE),K.prototype.visitInt32=yE(EE),K.prototype.visitInt64=yE(OE),K.prototype.visitUint8=yE(EE),K.prototype.visitUint16=yE(EE),K.prototype.visitUint32=yE(EE),K.prototype.visitUint64=yE(OE),K.prototype.visitFloat=yE(NE),K.prototype.visitFloat16=yE(DE),K.prototype.visitFloat32=yE(EE),K.prototype.visitFloat64=yE(EE),K.prototype.visitUtf8=yE(jE),K.prototype.visitLargeUtf8=yE(jE),K.prototype.visitBinary=yE(AE),K.prototype.visitLargeBinary=yE(AE),K.prototype.visitFixedSizeBinary=yE(kE),K.prototype.visitDate=yE(PE),K.prototype.visitDateDay=yE(wE),K.prototype.visitDateMillisecond=yE(TE),K.prototype.visitTimestamp=yE(zE),K.prototype.visitTimestampSecond=yE(FE),K.prototype.visitTimestampMillisecond=yE(IE),K.prototype.visitTimestampMicrosecond=yE(LE),K.prototype.visitTimestampNanosecond=yE(RE),K.prototype.visitTime=yE(WE),K.prototype.visitTimeSecond=yE(BE),K.prototype.visitTimeMillisecond=yE(VE),K.prototype.visitTimeMicrosecond=yE(HE),K.prototype.visitTimeNanosecond=yE(UE),K.prototype.visitDecimal=yE(GE),K.prototype.visitList=yE(KE),K.prototype.visitStruct=yE(JE),K.prototype.visitUnion=yE(YE),K.prototype.visitDenseUnion=yE(XE),K.prototype.visitSparseUnion=yE(ZE),K.prototype.visitDictionary=yE(QE),K.prototype.visitInterval=yE($E),K.prototype.visitIntervalDayTime=yE(eD),K.prototype.visitIntervalYearMonth=yE(tD),K.prototype.visitIntervalMonthDayNano=yE(nD),K.prototype.visitDuration=yE(sD),K.prototype.visitDurationSecond=yE(rD),K.prototype.visitDurationMillisecond=yE(iD),K.prototype.visitDurationMicrosecond=yE(aD),K.prototype.visitDurationNanosecond=yE(oD),K.prototype.visitFixedSizeList=yE(cD),K.prototype.visitMap=yE(qE);const lD=new K,uD=Symbol.for(`keys`),dD=Symbol.for(`vals`),fD=Symbol.for(`kKeysAsStrings`),pD=Symbol.for(`_kKeysAsStrings`);var mD=class{constructor(e){return this[uD]=new dO([e.children[0]]).memoize(),this[dD]=e.children[1],new Proxy(this,new gD)}get[fD](){return this[pD]||(this[pD]=Array.from(this[uD].toArray(),String))}[Symbol.iterator](){return new hD(this[uD],this[dD])}get size(){return this[uD].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[uD],t=this[dD],n={};for(let r=-1,i=e.length;++r`${qC(e)}: ${qC(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},hD=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),lD.visit(this.vals,e)]})}},gD=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[fD]}has(e,t){return e[fD].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[fD].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[fD].indexOf(t);if(n!==-1){let r=lD.visit(Reflect.get(e,dD),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[fD].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(fE.visit(Reflect.get(e,dD),r,n),Reflect.set(e,t,n))}};Object.defineProperties(mD.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[uD]:{writable:!0,enumerable:!1,configurable:!1,value:null},[dD]:{writable:!0,enumerable:!1,configurable:!1,value:null},[pD]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var _D={};ze(_D,{clampRange:()=>yD,createElementComparator:()=>SD,wrapIndex:()=>bD});let vD;function yD(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 bD=(e,t)=>e<0?t+e:e,xD=e=>e!==e;function SD(e){let t=typeof e;if(t!==`object`||e===null)return xD(e)?xD: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?RC(e,t):!1:e instanceof Map?wD(e):Array.isArray(e)?CD(e):e instanceof dO?TD(e):ED(e,!0)}function CD(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 OD(e,n);case Map:return AD(e,n,n.keys());case mD:case hE:case Object:case void 0:return AD(e,n,t||Object.keys(n))}return n instanceof dO?kD(e,n):!1}}function OD(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rLD,getBit:()=>ND,getBool:()=>MD,packBools:()=>ID,popcnt_array:()=>zD,popcnt_bit_range:()=>RD,popcnt_uint32:()=>BD,setBool:()=>PD,truncateBitmap:()=>FD});function MD(e,t,n,r){return(n&1<>r}function PD(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):ID(new LD(n,e,t,null,MD)).subarray(0,r)),i}return n}function ID(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 LD=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 RD(e,t,i)+RD(e,r,n)+zD(e,i>>3,r-i>>3)}function zD(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+=BD(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=BD(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=BD(a.getUint8(i)),i+=1;return r}function BD(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const VD=-1;var HD=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 W.isSparseUnion(e)||W.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(W.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=VD&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-RD(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=uT(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(W.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===zC.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(FD(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===U.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(FD(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[WC.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[WC.TYPE])&&(a[WC.TYPE]=i.subarray(e,e+t)),(i=a[WC.OFFSET])&&(a[WC.OFFSET]=i.subarray(e,e+t+1))||(i=a[WC.DATA])&&(a[WC.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};HD.prototype.children=Object.freeze([]);var UD=class e extends dT{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new HD(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=lC(e.data),i=lC(e.nullBitmap),a=sC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new HD(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=lC(e.data),i=lC(e.nullBitmap),a=cC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new HD(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=lC(e.data),i=lC(e.nullBitmap),a=sC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new HD(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=lC(e.data),i=lC(e.nullBitmap),a=cC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new HD(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=lC(e.nullBitmap),a=sC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new HD(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=lC(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=iC(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(W.isSparseUnion(t))return new HD(t,n,a,o,[void 0,void 0,void 0,i],r);let s=sC(e.valueOffsets);return new HD(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=lC(t.nullBitmap),a=iC(n.indices.ArrayType,t.data),{dictionary:o=new dO([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new HD(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new HD(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new HD(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=lC(t.nullBitmap),{length:o=i.length/uT(n),nullCount:s=t.nullBitmap?-1:0}=t;return new HD(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=lC(t.nullBitmap),o=sC(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new HD(n,r,s,c,[o,void 0,a],[i])}};new UD;var WD=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 KD(e){return e.reduce((e,t)=>e+t.nullCount,0)}function qD(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function JD(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 YD(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function tO(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new LD(n,e.offset+(t||0),e.length,n,MD)){if(!i)return r;++r}return-1}function nO(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case U.Union:break;case U.Dictionary:break;default:return tO(e,n)}let r=lD.getVisitFn(e),i=SD(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 WD(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new oO(a)})}var oO=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof HD)))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}=lO[o.typeId],r=a[0];this.isValid=e=>XD(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,uO[o.typeId]),this._offsets=qD(a);break}this.data=a,this.type=o,this.stride=uT(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 GD(this.data)}get nullCount(){return KD(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${U[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(bD(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return sO.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(yD(this,t,n,({data:e,_offsets:t},n,r)=>JD(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case U.Int:case U.Float:case U.Decimal:case U.Time:case U.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 W.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(W.isDictionary(this.type)){let t=new fO(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new fO(this)}unmemoize(){if(W.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}};cO=Symbol.toStringTag,dO[cO]=(e=>{e.type=W.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(U).map(e=>U[e]).filter(e=>typeof e==`number`&&e!==U.NONE);for(let n of t){let t=lD.getVisitFnByTypeId(n),r=fE.getVisitFnByTypeId(n),i=iO.getVisitFnByTypeId(n);lO[n]={get:t,set:r,indexOf:i},uO[n]=Object.create(e,{isValid:{value:ZD(XD)},get:{value:ZD(lD.getVisitFnByTypeId(n))},set:{value:QD(fE.getVisitFnByTypeId(n))},indexOf:{value:$D(iO.getVisitFnByTypeId(n))}})}return`Vector`})(dO.prototype);var fO=class e extends dO{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 dO(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},pO={};ze(pO,{BaseInt64:()=>vO,Int128:()=>xO,Int64:()=>bO,Uint64:()=>yO});const mO=65536;function hO(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const gO=8,_O=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var vO=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`${hO(this.buffer[3])} ${hO(this.buffer[2])} ${hO(this.buffer[1])} ${hO(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;nCO,toIntervalDayTimeObjects:()=>TO,toIntervalMonthDayNanoInt32Array:()=>wO,toIntervalMonthDayNanoObjects:()=>EO});function CO(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 TO(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 dT{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 DO(e,t){return t instanceof e.constructor}function OO(e,t){return e===t||DO(e,t)}function kO(e,t){return e===t||DO(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function AO(e,t){return e===t||DO(e,t)&&e.precision===t.precision}function jO(e,t){return e===t||DO(e,t)&&e.byteWidth===t.byteWidth}function MO(e,t){return e===t||DO(e,t)&&e.unit===t.unit}function NO(e,t){return e===t||DO(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function PO(e,t){return e===t||DO(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function FO(e,t){return e===t||DO(e,t)&&e.children.length===t.children.length&&UO.compareManyFields(e.children,t.children)}function IO(e,t){return e===t||DO(e,t)&&e.children.length===t.children.length&&UO.compareManyFields(e.children,t.children)}function LO(e,t){return e===t||DO(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&UO.compareManyFields(e.children,t.children)}function RO(e,t){return e===t||DO(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&UO.visit(e.indices,t.indices)&&UO.visit(e.dictionary,t.dictionary)}function zO(e,t){return e===t||DO(e,t)&&e.unit===t.unit}function BO(e,t){return e===t||DO(e,t)&&e.unit===t.unit}function VO(e,t){return e===t||DO(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&UO.compareManyFields(e.children,t.children)}function HO(e,t){return e===t||DO(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&UO.compareManyFields(e.children,t.children)}Y.prototype.visitNull=OO,Y.prototype.visitBool=OO,Y.prototype.visitInt=kO,Y.prototype.visitInt8=kO,Y.prototype.visitInt16=kO,Y.prototype.visitInt32=kO,Y.prototype.visitInt64=kO,Y.prototype.visitUint8=kO,Y.prototype.visitUint16=kO,Y.prototype.visitUint32=kO,Y.prototype.visitUint64=kO,Y.prototype.visitFloat=AO,Y.prototype.visitFloat16=AO,Y.prototype.visitFloat32=AO,Y.prototype.visitFloat64=AO,Y.prototype.visitUtf8=OO,Y.prototype.visitLargeUtf8=OO,Y.prototype.visitBinary=OO,Y.prototype.visitLargeBinary=OO,Y.prototype.visitFixedSizeBinary=jO,Y.prototype.visitDate=MO,Y.prototype.visitDateDay=MO,Y.prototype.visitDateMillisecond=MO,Y.prototype.visitTimestamp=NO,Y.prototype.visitTimestampSecond=NO,Y.prototype.visitTimestampMillisecond=NO,Y.prototype.visitTimestampMicrosecond=NO,Y.prototype.visitTimestampNanosecond=NO,Y.prototype.visitTime=PO,Y.prototype.visitTimeSecond=PO,Y.prototype.visitTimeMillisecond=PO,Y.prototype.visitTimeMicrosecond=PO,Y.prototype.visitTimeNanosecond=PO,Y.prototype.visitDecimal=OO,Y.prototype.visitList=FO,Y.prototype.visitStruct=IO,Y.prototype.visitUnion=LO,Y.prototype.visitDenseUnion=LO,Y.prototype.visitSparseUnion=LO,Y.prototype.visitDictionary=RO,Y.prototype.visitInterval=zO,Y.prototype.visitIntervalDayTime=zO,Y.prototype.visitIntervalYearMonth=zO,Y.prototype.visitIntervalMonthDayNano=zO,Y.prototype.visitDuration=BO,Y.prototype.visitDurationSecond=BO,Y.prototype.visitDurationMillisecond=BO,Y.prototype.visitDurationMicrosecond=BO,Y.prototype.visitDurationNanosecond=BO,Y.prototype.visitFixedSizeList=VO,Y.prototype.visitMap=HO;const UO=new Y;function WO(e,t){return UO.compareSchemas(e,t)}function GO(e,t){return UO.compareFields(e,t)}function KO(e,t){return UO.visit(e,t)}const qO=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XC),pO),jD),hT),$S),_D),GC),SO),{compareSchemas:WO,compareFields:GO,compareTypes:KO}),JO=365.2425,YO=6048e5,XO=864e5,ZO=3600,QO=ZO*24;QO*7;const $O=QO*JO,ek=$O/12;ek*3;const tk=Symbol.for(`constructDateFrom`);function nk(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&tk in e?e[tk](t):e instanceof Date?new e.constructor(t):new Date(t)}function rk(e,t){return nk(t||e,e)}let ik={};function ak(){return ik}function ok(e,t){let n=ak(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=rk(e,t?.in),a=i.getDay(),o=(a=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function lk(e){let t=rk(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 uk(e,...t){let n=nk.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function dk(e,t){let n=rk(e,t?.in);return n.setHours(0,0,0,0),n}function fk(e,t,n){let[r,i]=uk(n?.in,e,t),a=dk(r),o=dk(i),s=+a-lk(a),c=+o-lk(o);return Math.round((s-c)/XO)}function pk(e,t){let n=ck(e,t),r=nk(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sk(r)}function mk(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function hk(e){return!(!mk(e)&&typeof e!=`number`||isNaN(+rk(e)))}function gk(e,t){let n=rk(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _k={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`}},vk=(e,t,n)=>{let r,i=_k[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 yk(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const bk={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},xk={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},Sk={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},Ck={date:yk({formats:bk,defaultWidth:`full`}),time:yk({formats:xk,defaultWidth:`full`}),dateTime:yk({formats:Sk,defaultWidth:`full`})},wk={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Tk=(e,t,n,r)=>wk[e];function Ek(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 Dk={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},Ok={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},kk={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`]},Ak={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`]},jk={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`}},Mk={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`}},Nk=(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`},Pk={ordinalNumber:Nk,era:Ek({values:Dk,defaultWidth:`wide`}),quarter:Ek({values:Ok,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Ek({values:kk,defaultWidth:`wide`}),day:Ek({values:Ak,defaultWidth:`wide`}),dayPeriod:Ek({values:jk,defaultWidth:`wide`,formattingValues:Mk,defaultFormattingWidth:`wide`})};function Fk(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)?Lk(s,e=>e.test(o)):Ik(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 Ik(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Lk(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 zk=/^(\d+)(th|st|nd|rd)?/i,Bk=/\d+/i,Vk={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},Hk={any:[/^b/i,/^(a|c)/i]},Uk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Wk={any:[/1/i,/2/i,/3/i,/4/i]},Gk={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},Kk={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]},qk={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},Jk={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]},Yk={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},Xk={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}},Zk={ordinalNumber:Rk({matchPattern:zk,parsePattern:Bk,valueCallback:e=>parseInt(e,10)}),era:Fk({matchPatterns:Vk,defaultMatchWidth:`wide`,parsePatterns:Hk,defaultParseWidth:`any`}),quarter:Fk({matchPatterns:Uk,defaultMatchWidth:`wide`,parsePatterns:Wk,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:Fk({matchPatterns:Gk,defaultMatchWidth:`wide`,parsePatterns:Kk,defaultParseWidth:`any`}),day:Fk({matchPatterns:qk,defaultMatchWidth:`wide`,parsePatterns:Jk,defaultParseWidth:`any`}),dayPeriod:Fk({matchPatterns:Yk,defaultMatchWidth:`any`,parsePatterns:Xk,defaultParseWidth:`any`})},Qk={code:`en-US`,formatDistance:vk,formatLong:Ck,formatRelative:Tk,localize:Pk,match:Zk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $k(e,t){let n=rk(e,t?.in),r=fk(n,gk(n)),i=r+1;return i}function eA(e,t){let n=rk(e,t?.in),r=sk(n)-+pk(n);return Math.round(r/YO)+1}function tA(e,t){let n=rk(e,t?.in),r=n.getFullYear(),i=ak(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=nk(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=ok(o,t),c=nk(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=ok(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function nA(e,t){let n=ak(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=tA(e,t),a=nk(t?.in||e,0);a.setFullYear(i,0,r),a.setHours(0,0,0,0);let o=ok(a,t);return o}function rA(e,t){let n=rk(e,t?.in),r=ok(n,t)-+nA(n,t);return Math.round(r/YO)+1}function iA(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const aA={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return iA(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):iA(n+1,2)},d(e,t){return iA(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 iA(e.getHours()%12||12,t.length)},H(e,t){return iA(e.getHours(),t.length)},m(e,t){return iA(e.getMinutes(),t.length)},s(e,t){return iA(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return iA(i,t.length)}},oA={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},sA={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 aA.y(e,t)},Y:function(e,t,n,r){let i=tA(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return iA(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):iA(a,t.length)},R:function(e,t){let n=ck(e);return iA(n,t.length)},u:function(e,t){let n=e.getFullYear();return iA(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 iA(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 iA(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 aA.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 iA(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=rA(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):iA(i,t.length)},I:function(e,t,n){let r=eA(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):iA(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):aA.d(e,t)},D:function(e,t,n){let r=$k(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):iA(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 iA(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 iA(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 iA(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?oA.noon:r===0?oA.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?oA.evening:r>=12?oA.afternoon:r>=4?oA.morning:oA.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 aA.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):aA.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):iA(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):iA(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):aA.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):aA.s(e,t)},S:function(e,t){return aA.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return lA(r);case`XXXX`:case`XX`:return uA(r);case`XXXXX`:case`XXX`:default:return uA(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return lA(r);case`xxxx`:case`xx`:return uA(r);case`xxxxx`:case`xxx`:default:return uA(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+cA(r,`:`);case`OOOO`:default:return`GMT`+uA(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+cA(r,`:`);case`zzzz`:default:return`GMT`+uA(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return iA(r,t.length)},T:function(e,t,n){return iA(+e,t.length)}};function cA(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+iA(a,2)}function lA(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+iA(Math.abs(e)/60,2)}return uA(e,t)}function uA(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=iA(Math.trunc(r/60),2),a=iA(r%60,2);return n+i+t+a}const dA=(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`})}},fA=(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`})}},pA=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return dA(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}}`,dA(r,t)).replace(`{{time}}`,fA(i,t))},mA={p:fA,P:pA},hA=/^D+$/,gA=/^Y+$/,_A=[`D`,`DD`,`YY`,`YYYY`];function vA(e){return hA.test(e)}function yA(e){return gA.test(e)}function bA(e,t,n){let r=xA(e,t,n);if(console.warn(r),_A.includes(e))throw RangeError(r)}function xA(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 SA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,CA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wA=/^'([^]*?)'?$/,TA=/''/g,EA=/[a-zA-Z]/;function DA(e,t,n){let r=ak(),i=n?.locale??r.locale??Qk,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=rk(e,n?.in);if(!hk(s))throw RangeError(`Invalid time value`);let c=t.match(CA).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=mA[t];return n(e,i.formatLong)}return e}).join(``).match(SA).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:OA(e)};if(sA[t])return{isToken:!0,value:e};if(t.match(EA))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&&yA(a)||!n?.useAdditionalDayOfYearTokens&&vA(a))&&bA(a,t,String(e));let o=sA[a[0]];return o(s,a,i.localize,l)}).join(``)}function OA(e){let t=e.match(wA);return t?t[1].replace(TA,`'`):e}function kA(e,t){return rk(e*1e3,t?.in)}function AA(e,t){let n=jA(t)?new t(0):nk(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function jA(e){return typeof e==`function`&&e.prototype?.constructor===e}function MA(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 NA(e){return e==null}function PA(e){return e!=null}async function FA(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await C(()=>import(`./__vite-browser-external-D71AMOyU.js`).then(Ve(1)),__vite__mapDeps([0,1,2]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function IA(e){return NA(e)?!1:W.isInt(e.type)&&!HA(e)||LA(e)}function LA(e){return NA(e)?!1:W.isInt(e.type)&&e.type.isSigned===!1}function RA(e){return NA(e)?!1:W.isFloat(e.type)??!1}function zA(e){return NA(e)?!1:W.isDecimal(e.type)}function BA(e){return NA(e)?!1:W.isBool(e.type)}function VA(e){return NA(e)?!1:W.isDuration(e.type)}function HA(e){return NA(e)?!1:W.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function UA(e){return NA(e)?!1:W.isTimestamp(e.type)}function WA(e){return NA(e)?!1:W.isDate(e.type)}function GA(e){return NA(e)?!1:W.isTime(e.type)}function KA(e){return NA(e)?!1:W.isList(e.type)||W.isFixedSizeList(e.type)}function qA(e){return NA(e)?!1:W.isStruct(e.type)||W.isMap(e.type)}function JA(e){return NA(e)?!1:W.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||W.isInterval(e.type)}new Date(1970,0,1);function YA(e,t){let n;if(t===HC.MILLISECOND)n=1e3;else if(t===HC.MICROSECOND)n=1e3*1e3;else if(t===HC.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 XA(e,t){let n=YA(e,t?.type?.unit??HC.SECOND);return kA(n)}function ZA(e,t){let n=XA(e,t);return DA(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function QA(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?DA(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function $A(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 IS(e,r):new IS(e),AA(n,Date)}function ej(e,t){let n=t?.type?.scale||0,r=qO.bigNumToString(new qO.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=MA(r.slice(-n),`0`)||``;return`${i}${a}${o?`.${o}`:``}`}new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function tj(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 nj(e,t){if(W.isInterval(t?.type))return tj(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=ij(i.left,t.type?.children?.[0]),c=ij(i.right,t.type?.children?.[1]);return`${a+s}, ${c+o}`}return String(e)}function rj(e,t){return t?.type instanceof rT?JSON.parse(JSON.stringify(e,(e,t)=>{if(PA(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function ij(e,t){if(NA(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&WA(t))return QA(e);if(typeof e==`bigint`&&GA(t))return ZA(Number(e),t);if(n&&UA(t))return $A(e,t);if(HA(t))throw Error(`Period type is not supported yet`);if(JA(t))return nj(e,t);if(VA(t))throw Error(`Duration type is not supported yet`);return zA(t)?ej(e,t):RA(t)&&Number.isFinite(e)||IA(t)?e:qA(t)||KA(t)?rj(e,t):BA(t)?!!e:String(e)}function aj(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=ij(t[e.name],e)),t));return n}let oj=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function sj(e){let t=ye(e,{logger:!1}),n,r,i=await FA();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await C(async()=>{let{getBundles:e}=await import(`./default-browser-CS6ZmB8h.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await AS(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await C(async()=>{let{getBundles:e}=await import(`./default-node-CUnR0j1U.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]));t.bundles=await e()}r=await AS(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await C(()=>import(`./browser-bqvzIJPy.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new rS:t.logger===!1?new nS:t.logger;let o=new mS(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case oj.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 oj.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:aj(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:aj(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 cj(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 lj(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 uj=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`}},dj=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 fj=Symbol.for(`drizzle:Name`);var pj=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 mj(e,this)}},mj=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[fj],...r,n[0].table[fj],...i];return e??`${a.join(`_`)}_fk`}};function hj(e,...t){return e(...t)}function gj(e,t){return`${e[fj]}_${t.join(`_`)}_unique`}function _j(e,t,n){for(let r=t;rArray.isArray(e)?bj(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var xj=class extends dj{foreignKeyConfigs=[];static[X]=`PgColumnBuilder`;array(e){return new wj(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})=>hj((n,r)=>{let i=new pj(()=>{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 Cj(e,this.config)}},Sj=class extends uj{constructor(e,t){t.uniqueName||=gj(e,[t.name]),super(e,t),this.table=e}static[X]=`PgColumn`},Cj=class extends Sj{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}},wj=class extends xj{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 Tj(e,this.config,t)}},Tj=class e extends Sj{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=yj(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:bj(r)}};const Ej=Symbol.for(`drizzle:isPgEnum`);function Dj(e){return!!e&&typeof e==`function`&&Ej in e&&e[Ej]===!0}var Oj=class{static[X]=`Subquery`;constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},kj=class extends Oj{static[X]=`WithSubquery`},Aj=`0.44.4`;let jj,Mj;const Nj={startActiveSpan(e,t){return jj?(Mj||=jj.trace.getTracer(`drizzle-orm`,Aj),hj((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()}}),jj,Mj)):t()}},Pj=Symbol.for(`drizzle:ViewBaseConfig`),Fj=Symbol.for(`drizzle:Schema`),Ij=Symbol.for(`drizzle:Columns`),Lj=Symbol.for(`drizzle:ExtraConfigColumns`),Rj=Symbol.for(`drizzle:OriginalName`),zj=Symbol.for(`drizzle:BaseName`),Bj=Symbol.for(`drizzle:IsAlias`),Vj=Symbol.for(`drizzle:ExtraConfigBuilder`),Hj=Symbol.for(`drizzle:IsDrizzleTable`);var Q=class{static[X]=`Table`;static Symbol={Name:fj,Schema:Fj,OriginalName:Rj,Columns:Ij,ExtraConfigColumns:Lj,BaseName:zj,IsAlias:Bj,ExtraConfigBuilder:Vj};[fj];[Rj];[Fj];[Ij];[Lj];[zj];[Bj]=!1;[Hj]=!0;[Vj]=void 0;constructor(e,t,n){this[fj]=this[Rj]=e,this[Fj]=t,this[zj]=n}};function Uj(e){return e[fj]}function Wj(e){return`${e[Fj]??`public`}.${e[fj]}`}function Gj(e){return e!=null&&typeof e.getSQL==`function`}function Kj(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 qj=class{static[X]=`StringChunk`;value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new Jj([this])}},Jj=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=Zj;shouldInlineParams=!1;usedTables=[];append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return Nj.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 Kj(t.map(t=>{if(Z(t,qj))return{sql:t.value.join(``),params:[]};if(Z(t,Yj))return{sql:a(t.value),params:[]};if(t===void 0)return{sql:``,params:[]};if(Array.isArray(t)){let e=[new qj(`(`)];for(let[n,r]of t.entries())e.push(r),ne},Qj={mapToDriverValue:e=>e};({...Zj,...Qj});var $j=class{constructor(e,t=Qj){this.value=e,this.encoder=t}static[X]=`Param`;brand;getSQL(){return new Jj([this])}};function $(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new qj(e[0]));for(let[r,i]of t.entries())n.push(i,new qj(e[r+1]));return new Jj(n)}(e=>{function t(){return new Jj([])}e.empty=t;function n(e){return new Jj(e)}e.fromList=n;function r(e){return new Jj([new qj(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 Jj(n)}e.join=i;function a(e){return new Yj(e)}e.identifier=a;function o(e){return new eM(e)}e.placeholder=o;function s(e,t){return new $j(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})(Jj||={});var eM=class{constructor(e){this.name=e}static[X]=`Placeholder`;getSQL(){return new Jj([this])}};function tM(e,t){return e.map(e=>{if(Z(e,eM)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(Z(e,$j)&&Z(e.value,eM)){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 nM=Symbol.for(`drizzle:IsDrizzleView`);var rM=class{static[X]=`View`;[Pj];[nM]=!0;constructor({name:e,schema:t,selectedFields:n,query:r}){this[Pj]={name:e,originalName:e,schema:t,selectedFields:n,query:r,isExisting:!r,isAlias:!1}}getSQL(){return new Jj([this])}};uj.prototype.getSQL=function(){return new Jj([this])},Q.prototype.getSQL=function(){return new Jj([this])},Oj.prototype.getSQL=function(){return new Jj([this])};var iM=class{constructor(e){this.table=e}static[X]=`ColumnAliasProxyHandler`;get(e,t){return t===`table`?this.table:e[t]}},aM=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===Pj)return{...e[Pj],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 iM(new Proxy(e,this)))}),n}let n=e[t];return Z(n,uj)?new Proxy(n,new iM(new Proxy(e,this))):n}};function oM(e,t){return new Proxy(e,new aM(t,!1))}function sM(e,t){return new Proxy(e,new iM(new Proxy(e.table,new aM(t,!1))))}function cM(e,t){return new Jj.Aliased(lM(e.sql,t),e.fieldAlias)}function lM(e,t){return $.join(e.queryChunks.map(e=>Z(e,uj)?sM(e,t):Z(e,Jj)?lM(e,t):Z(e,Jj.Aliased)?cM(e,t):e))}var uM=class extends Error{static[X]=`DrizzleError`;constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},dM=class e extends Error{constructor(t,n,r){super(`Failed query: ${t} +(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 ze==`function`&&ze;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 ze==`function`&&ze,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 P(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 F(e,t){e.pending_buf[e.pending++]=t}function ne(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function re(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 ie(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(ie(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,P(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(P(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(P(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(P(e,!1),e.strm.avail_out),O)}),new se(4,4,8,4,ae),new se(4,5,16,8,ae),new se(4,6,32,32,ae),new se(4,4,16,16,oe),new se(8,16,32,32,oe),new se(8,16,128,128,oe),new se(8,32,128,256,oe),new se(32,128,258,1024,oe),new se(32,258,258,4096,oe)],n.deflateInit=function(e,t){return de(e,t,g,15,8,0)},n.deflateInit2=de,n.deflateReset=ue,n.deflateResetKeep=le,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),F(i,i.gzhead.time>>16&255),F(i,i.gzhead.time>>24&255),F(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),F(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(F(i,255&i.gzhead.extra.length),F(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):(F(i,0),F(i,0),F(i,0),F(i,0),F(i,0),F(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),F(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,ne(i,p),i.strstart!==0&&(ne(i,e.adler>>>16),ne(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));)F(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&&(F(i,255&e.adler),F(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&&(ie(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&&(P(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(P(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(P(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(ie(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&&(P(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(P(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(P(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?(F(i,255&e.adler),F(i,e.adler>>8&255),F(i,e.adler>>16&255),F(i,e.adler>>24&255),F(i,255&e.total_in),F(i,e.total_in>>8&255),F(i,e.total_in>>16&255),F(i,e.total_in>>24&255)):(ne(i,e.adler>>>16),ne(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,ie(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,ie,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&&(ie[0]=255&b,ie[1]=b>>>8&255,n.check=a(n.check,ie,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,ie[2]=b>>>16&255,ie[3]=b>>>24&255,n.check=a(n.check,ie,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&&(ie[0]=255&b,ie[1]=b>>>8&255,n.check=a(n.check,ie,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,ie,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[ae[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,F={bits:n.lenbits},P=s(0,n.lens,0,19,n.lencode,0,n.work,F),n.lenbits=F.bits,P){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&re,!((k=re>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(ne=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(ne=k+3;x>>=k)),b>>>=3,x-=3}else{for(ne=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,F={bits:n.lenbits},P=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,F),n.lenbits=F.bits,P){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,F={bits:n.distbits},P=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,F),n.distbits=F.bits,P){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=(re=n.lencode[b&(1<>>16&255,j=65535&re,!((k=re>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&re,!(M+(k=re>>>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(ne=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(re=n.distcode[b&(1<>>16&255,j=65535&re,!((k=re>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&re,!(M+(k=re>>>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(ne=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=F[ne+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 F(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function ne(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 ae(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]=ie(a[s]++,s))}}function oe(e){var t;for(t=0;t>1;1<=n;n--)le(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],le(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++,le(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?he(e,t,n,r):e.strategy===4||s===o?(ne(e,2+(r?1:0),3),ue(e,T,E)):(ne(e,4+(r?1:0),3),function(e,t,n,r){var i;for(ne(e,t-257,5),ne(e,n-1,5),ne(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*P(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){ne(e,2,3),re(e,_,T),function(e){e.bi_valid===16?(F(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)})})),jf=Ve(Af());wl.zipReader=(e,t)=>jf.default.loadAsync(e);const Mf=wl.createSettings;wl.createSettings=async e=>{let t=Object.keys(e.files);return t.find(e=>Nf(e))?Mf(e):If(t)};function Nf(e){return e.endsWith(`model3.json`)}function Pf(e){return e.endsWith(`.moc3`)}function Ff(e){return e.split(/[\\/]/).pop()}function If(e){let t=e.filter(e=>Pf(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=Ff(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 El({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}wl.readText=(e,t)=>{let n=e.file(t);if(!n)throw Error(`Cannot find file: ${t}`);return n.async(`text`)},wl.getFilePaths=e=>{let t=[];return e.forEach(e=>t.push(e)),Promise.resolve(t)},wl.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 Lf=Te({__name:`Live2D`,props:{modelSrc:{},modelFile:{},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)=>(Oe(),oe(_,{relative:``},{default:je(({width:t,height:n})=>[S(Il,{width:t,height:n,resolution:2,"max-h":`100dvh`},{default:je(({app:r})=>[S(kf,{"model-src":e.modelSrc,"model-file":e.modelFile,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,[`model-src`,`model-file`,`app`,`mouth-open-size`,`width`,`height`,`paused`,`focus-at`,`x-offset`,`y-offset`,`scale`,`disable-focus-at`])]),_:2},1032,[`width`,`height`])]),_:1}))}}),Rf=Lf;function zf(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 Bf(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 Vf(e){return this instanceof Vf?(this.v=e,this):new Vf(e)}function Hf(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 Vf?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 Uf(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:Vf(e[r](t)),done:!1}:i?i(t):t}:i}}function Wf(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Bf==`function`?Bf(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 Gf=new TextDecoder(`utf-8`),Kf=e=>Gf.decode(e),qf=new TextEncoder,Jf=e=>qf.encode(e),Yf=e=>typeof e==`number`,Xf=e=>typeof e==`boolean`,Zf=e=>typeof e==`function`,Qf=e=>e!=null&&Object(e)===e,$f=e=>Qf(e)&&Zf(e.then),ep=e=>Qf(e)&&Zf(e[Symbol.iterator]),tp=e=>Qf(e)&&Zf(e[Symbol.asyncIterator]),np=e=>Qf(e)&&Qf(e.schema),rp=e=>Qf(e)&&`done`in e&&`value`in e,ip=e=>Qf(e)&&Zf(e.stat)&&Yf(e.fd),ap=e=>Qf(e)&&cp(e.body),op=e=>`_getDOMStream`in e&&`_getNodeStream`in e,sp=e=>Qf(e)&&Zf(e.abort)&&Zf(e.getWriter)&&!op(e),cp=e=>Qf(e)&&Zf(e.cancel)&&Zf(e.getReader)&&!op(e),lp=e=>Qf(e)&&Zf(e.end)&&Zf(e.write)&&Xf(e.writable)&&!op(e),up=e=>Qf(e)&&Zf(e.read)&&Zf(e.pipe)&&Xf(e.readable)&&!op(e),dp=e=>Qf(e)&&Zf(e.clear)&&Zf(e.bytes)&&Zf(e.position)&&Zf(e.setPosition)&&Zf(e.capacity)&&Zf(e.getBufferIdentifier)&&Zf(e.createLong),fp=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function pp(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;++cgp(Int32Array,e),vp=e=>gp(BigInt64Array,e),yp=e=>gp(Uint8Array,e),bp=e=>(e.next(),e);function*xp(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof fp?n(t):ep(t)?t:n(t);return yield*bp((function*(t){let n=null;do n=t.next(yield gp(e,n));while(!n.done)})(r[Symbol.iterator]())),new e}const Sp=e=>xp(Uint8Array,e);function Cp(e,t){return Hf(this,arguments,function*(){if($f(t))return yield Vf(yield Vf(yield*Uf(Wf(Cp(e,yield Vf(t))))));let n=function(e){return Hf(this,arguments,function*(){yield yield Vf(yield Vf(e))})},r=function(e){return Hf(this,arguments,function*(){yield Vf(yield*Uf(Wf(bp((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 fp?n(t):ep(t)?r(t):tp(t)?t:n(t);return yield Vf(yield*Uf(Wf(bp((function(t){return Hf(this,arguments,function*(){let n=null;do n=yield Vf(t.next(yield yield Vf(gp(e,n))));while(!n.done)})})(i[Symbol.asyncIterator]()))))),yield Vf(new e)})}const wp=e=>Cp(Uint8Array,e);function Tp(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*kp(e){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?hp(r,o)[0]:([i,r,s]=hp(r,o),i)}({cmd:a,size:o}=(yield(()=>null)())||{cmd:`read`,size:0});let l=Sp(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=wp(e)[Symbol.asyncIterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?yield Vf(l.next()):yield Vf(l.next(o-s)),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield Vf(c()));while(onull)()))||{cmd:`read`,size:0});let l=new Mp(e);try{do if({done:t,value:i}=Number.isNaN(o-s)?yield Vf(l.read()):yield Vf(l.read(o-s)),!t&&i.byteLength>0&&(r.push(yp(i)),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield Vf(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 zf(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 zf(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=yp(t)),t})}};const Np=(e,t)=>{let n=e=>r([t,e]),r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]};function Pp(e){return Hf(this,arguments,function*(){let t=[],n=`error`,r=!1,i=null,a,o,s=0,c=[],l;function u(){return a===`peek`?hp(c,o)[0]:([l,c,s]=hp(c,o),l)}if({cmd:a,size:o}=(yield yield Vf((()=>null)()))||{cmd:`read`,size:0},e.isTTY)return yield yield Vf(new Uint8Array),yield Vf(null);try{t[0]=Np(e,`end`),t[1]=Np(e,`error`);do{if(t[2]=Np(e,`readable`),[n,i]=yield Vf(Promise.race(t.map(e=>e[2]))),n===`error`)break;if((r=n===`end`)||(Number.isFinite(o-s)?(l=yp(e.read(o-s)),l.byteLength0&&(c.push(l),s+=l.byteLength)),r||o<=s)do({cmd:a,size:o}=yield yield Vf(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 Fp;(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`})(Fp||={});var Ip;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(Ip||={});var Lp;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(Lp||={});var Rp;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(Rp||={});var zp;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})(zp||={});var Bp;(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`})(Bp||={});const Vp=2,Hp=4,Up=4,Wp=4,Gp=new Int32Array(2),Kp=new Float32Array(Gp.buffer),qp=new Float64Array(Gp.buffer),Jp=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var Yp;(function(e){e[e.UTF8_BYTES=1]=`UTF8_BYTES`,e[e.UTF16_STRING=2]=`UTF16_STRING`})(Yp||={});var Xp=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){Kp[0]=t,this.writeInt32(e,Gp[0])}writeFloat64(e,t){qp[0]=t,this.writeInt32(e,Gp[Jp?0:1]),this.writeInt32(e+4,Gp[Jp?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)*Vp;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,Hp+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)}},Om=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()+Wp),(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)}},km;(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`})(km||={});var Am=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()+Wp),(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):km.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 cm).__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 lm).__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,km.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}},jm=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()+Wp),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):am.Little}fields(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new Am).__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 lm).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):BigInt(0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,am.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let n=t.length-1;n>=0;n--)e.addInt64(t[n]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){let t=e.endObject();return t}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(t,n,r,i,a){return e.startSchema(t),e.addEndianness(t,n),e.addFields(t,r),e.addCustomMetadata(t,i),e.addFeatures(t,a),e.endSchema(t)}},Mm;(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`})(Mm||={});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 Nm;(function(e){e[e.OFFSET=0]=`OFFSET`,e[e.DATA=1]=`DATA`,e[e.VALIDITY=2]=`VALIDITY`,e[e.TYPE=3]=`TYPE`})(Nm||={});const Pm=void 0;function Fm(e){if(e===null)return`null`;if(e===Pm)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=>Fm(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function Im(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 Lm(e,t){return Im(e/t)+Im(e%t)/Im(t)}const Rm=Symbol.for(`isArrowBigNum`);function zm(e,...t){return t.length===0?Object.setPrototypeOf(gp(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}zm.prototype[Rm]=!0,zm.prototype.toJSON=function(){return`"${Km(this)}"`},zm.prototype.valueOf=function(e){return Gm(this,e)},zm.prototype.toString=function(){return Km(this)},zm.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return Gm(this);case`string`:return Km(this);case`default`:return qm(this)}return Km(this)};function Bm(...e){return zm.apply(this,e)}function Vm(...e){return zm.apply(this,e)}function Hm(...e){return zm.apply(this,e)}Object.setPrototypeOf(Bm.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(Vm.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(Hm.prototype,Object.create(Uint32Array.prototype)),Object.assign(Bm.prototype,zm.prototype,{constructor:Bm,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(Vm.prototype,zm.prototype,{constructor:Vm,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(Hm.prototype,zm.prototype,{constructor:Hm,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const Um=BigInt(4294967296)*BigInt(4294967296),Wm=Um-BigInt(1);function Gm(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 Jm(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 vh=class extends z{constructor(){super(R.Null)}toString(){return`Null`}};Zm=Symbol.toStringTag,vh[Zm]=(e=>e[Symbol.toStringTag]=`Null`)(vh.prototype);var yh=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}`}};Qm=Symbol.toStringTag,yh[Qm]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(yh.prototype);var bh=class extends yh{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},xh=class extends yh{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},Sh=class extends yh{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},Ch=class extends yh{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},wh=class extends yh{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Th=class extends yh{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},Eh=class extends yh{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},Dh=class extends yh{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(bh.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(xh.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(Sh.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(Ch.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(wh.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(Th.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Eh.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(Dh.prototype,`ArrayType`,{value:BigUint64Array});var Oh=class extends z{constructor(e){super(R.Float),this.precision=e}get ArrayType(){switch(this.precision){case Lp.HALF:return Uint16Array;case Lp.SINGLE:return Float32Array;case Lp.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};$m=Symbol.toStringTag,Oh[$m]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(Oh.prototype);var kh=class extends Oh{constructor(){super(Lp.HALF)}},Ah=class extends Oh{constructor(){super(Lp.SINGLE)}},jh=class extends Oh{constructor(){super(Lp.DOUBLE)}};Object.defineProperty(kh.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Ah.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(jh.prototype,`ArrayType`,{value:Float64Array});var Mh=class extends z{constructor(){super(R.Binary)}toString(){return`Binary`}};eh=Symbol.toStringTag,Mh[eh]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(Mh.prototype);var Nh=class extends z{constructor(){super(R.LargeBinary)}toString(){return`LargeBinary`}};th=Symbol.toStringTag,Nh[th]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(Nh.prototype);var Ph=class extends z{constructor(){super(R.Utf8)}toString(){return`Utf8`}};nh=Symbol.toStringTag,Ph[nh]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(Ph.prototype);var Fh=class extends z{constructor(){super(R.LargeUtf8)}toString(){return`LargeUtf8`}};rh=Symbol.toStringTag,Fh[rh]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(Fh.prototype);var Ih=class extends z{constructor(){super(R.Bool)}toString(){return`Bool`}};ih=Symbol.toStringTag,Ih[ih]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(Ih.prototype);var Lh=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}]`}};ah=Symbol.toStringTag,Lh[ah]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Lh.prototype);var Rh=class extends z{constructor(e){super(R.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${Rp[this.unit]}>`}get ArrayType(){return this.unit===Rp.DAY?Int32Array:BigInt64Array}};oh=Symbol.toStringTag,Rh[oh]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(Rh.prototype);var zh=class extends z{constructor(e,t){super(R.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${zp[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};sh=Symbol.toStringTag,zh[sh]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(zh.prototype);var Bh=class extends z{constructor(e,t){super(R.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${zp[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};ch=Symbol.toStringTag,Bh[ch]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(Bh.prototype);var Vh=class extends z{constructor(e){super(R.Interval),this.unit=e}toString(){return`Interval<${Bp[this.unit]}>`}};lh=Symbol.toStringTag,Vh[lh]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(Vh.prototype);var Hh=class extends z{constructor(e){super(R.Duration),this.unit=e}toString(){return`Duration<${zp[this.unit]}>`}};uh=Symbol.toStringTag,Hh[uh]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(Hh.prototype);var Uh=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}};dh=Symbol.toStringTag,Uh[dh]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(Uh.prototype);var Wh=class extends z{constructor(e){super(R.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};fh=Symbol.toStringTag,Wh[fh]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(Wh.prototype);var Gh=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(` | `)}>`}};ph=Symbol.toStringTag,Gh[ph]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(Gh.prototype);var Kh=class extends z{constructor(e){super(R.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};mh=Symbol.toStringTag,Kh[mh]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(Kh.prototype);var qh=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}>`}};hh=Symbol.toStringTag,qh[hh]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(qh.prototype);var Jh=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(`, `)}}>`}};gh=Symbol.toStringTag,Jh[gh]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(Jh.prototype);const Yh=(e=>()=>++e)(-1);var Xh=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?Yh():Im(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}>`}};_h=Symbol.toStringTag,Xh[_h]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(Xh.prototype);function Zh(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 Qh=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 $h(this,e,t)}getVisitFnByTypeId(e,t=!0){return eg(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 $h(e,t,n=!0){return typeof t==`number`?eg(e,t,n):typeof t==`string`&&t in R?eg(e,R[t],n):t&&t instanceof z?eg(e,tg(t),n):t?.type&&t.type instanceof z?eg(e,tg(t.type),n):eg(e,R.NONE,n)}function eg(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 tg(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 Lp.HALF:return R.Float16;case Lp.SINGLE:return R.Float32;case Lp.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 zp.SECOND:return R.TimeSecond;case zp.MILLISECOND:return R.TimeMillisecond;case zp.MICROSECOND:return R.TimeMicrosecond;case zp.NANOSECOND:return R.TimeNanosecond}return R.Time;case R.Timestamp:switch(e.unit){case zp.SECOND:return R.TimestampSecond;case zp.MILLISECOND:return R.TimestampMillisecond;case zp.MICROSECOND:return R.TimestampMicrosecond;case zp.NANOSECOND:return R.TimestampNanosecond}return R.Timestamp;case R.Date:switch(e.unit){case Rp.DAY:return R.DateDay;case Rp.MILLISECOND:return R.DateMillisecond}return R.Date;case R.Interval:switch(e.unit){case Bp.DAY_TIME:return R.IntervalDayTime;case Bp.YEAR_MONTH:return R.IntervalYearMonth}return R.Interval;case R.Duration:switch(e.unit){case zp.SECOND:return R.DurationSecond;case zp.MILLISECOND:return R.DurationMillisecond;case zp.MICROSECOND:return R.DurationMicrosecond;case zp.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 Ip.Dense:return R.DenseUnion;case Ip.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]}'`)}Qh.prototype.visitInt8=null,Qh.prototype.visitInt16=null,Qh.prototype.visitInt32=null,Qh.prototype.visitInt64=null,Qh.prototype.visitUint8=null,Qh.prototype.visitUint16=null,Qh.prototype.visitUint32=null,Qh.prototype.visitUint64=null,Qh.prototype.visitFloat16=null,Qh.prototype.visitFloat32=null,Qh.prototype.visitFloat64=null,Qh.prototype.visitDateDay=null,Qh.prototype.visitDateMillisecond=null,Qh.prototype.visitTimestampSecond=null,Qh.prototype.visitTimestampMillisecond=null,Qh.prototype.visitTimestampMicrosecond=null,Qh.prototype.visitTimestampNanosecond=null,Qh.prototype.visitTimeSecond=null,Qh.prototype.visitTimeMillisecond=null,Qh.prototype.visitTimeMicrosecond=null,Qh.prototype.visitTimeNanosecond=null,Qh.prototype.visitDenseUnion=null,Qh.prototype.visitSparseUnion=null,Qh.prototype.visitIntervalDayTime=null,Qh.prototype.visitIntervalYearMonth=null,Qh.prototype.visitDuration=null,Qh.prototype.visitDurationSecond=null,Qh.prototype.visitDurationMillisecond=null,Qh.prototype.visitDurationMicrosecond=null,Qh.prototype.visitDurationNanosecond=null;const ng=new Float64Array(1),rg=new Uint32Array(ng.buffer);function ig(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 ag(e){if(e!==e)return 32256;ng[0]=e;let t=(rg[1]&2147483648)>>16&65535,n=rg[1]&2146435072,r=0;return n>=1089470464?rg[0]>0?n=31744:(n=(n&2080374784)>>16,r=(rg[1]&1048575)>>10):n<=1056964608?(r=1048576+(rg[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(rg[1]&1048575)+512>>10),t|n|r&65535}var og=class extends Qh{};function sg(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const cg=(e,t,n)=>{e[t]=Math.floor(n/864e5)},lg=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},fg=({values:e},t,n)=>{e[t]=n},pg=({values:e},t,n)=>{e[t]=ag(n)},mg=(e,t,n)=>{switch(e.type.precision){case Lp.HALF:return pg(e,t,n);case Lp.SINGLE:case Lp.DOUBLE:return fg(e,t,n)}},hg=({values:e},t,n)=>{cg(e,t,n.valueOf())},gg=({values:e},t,n)=>{e[t]=BigInt(n)},_g=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},vg=({values:e,valueOffsets:t},n,r)=>lg(e,t,n,r),yg=({values:e,valueOffsets:t},n,r)=>lg(e,t,n,Jf(r)),bg=(e,t,n)=>{e.type.unit===Rp.DAY?hg(e,t,n):gg(e,t,n)},xg=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},Sg=({values:e},t,n)=>{e[t]=BigInt(n)},Cg=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},wg=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},Tg=(e,t,n)=>{switch(e.type.unit){case zp.SECOND:return xg(e,t,n);case zp.MILLISECOND:return Sg(e,t,n);case zp.MICROSECOND:return Cg(e,t,n);case zp.NANOSECOND:return wg(e,t,n)}},Eg=({values:e},t,n)=>{e[t]=n},Dg=({values:e},t,n)=>{e[t]=n},Og=({values:e},t,n)=>{e[t]=n},kg=({values:e},t,n)=>{e[t]=n},Ag=(e,t,n)=>{switch(e.type.unit){case zp.SECOND:return Eg(e,t,n);case zp.MILLISECOND:return Dg(e,t,n);case zp.MICROSECOND:return Og(e,t,n);case zp.NANOSECOND:return kg(e,t,n)}},jg=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},Mg=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=Qg.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=Qg.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},Pg=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),Fg=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),Ig=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),Lg=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),Rg=(e,t,n)=>{let r=e.type.children.map(e=>Qg.getVisitFn(e.type)),i=n instanceof Map?Ig(t,n):n instanceof Jv?Fg(t,n):Array.isArray(n)?Pg(t,n):Lg(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},zg=(e,t,n)=>{e.type.mode===Ip.Dense?Bg(e,t,n):Vg(e,t,n)},Bg=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Qg.visit(i,e.valueOffsets[t],n)},Vg=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Qg.visit(i,t,n)},Hg=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},Ug=(e,t,n)=>{e.type.unit===Bp.DAY_TIME?Wg(e,t,n):Gg(e,t,n)},Wg=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},Gg=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},Kg=({values:e},t,n)=>{e[t]=n},qg=({values:e},t,n)=>{e[t]=n},Jg=({values:e},t,n)=>{e[t]=n},Yg=({values:e},t,n)=>{e[t]=n},Xg=(e,t,n)=>{switch(e.type.unit){case zp.SECOND:return Kg(e,t,n);case zp.MILLISECOND:return qg(e,t,n);case zp.MICROSECOND:return Jg(e,t,n);case zp.NANOSECOND:return Yg(e,t,n)}},Zg=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=Qg.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${Fm(e)}: ${Fm(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new n_(this[$g],this[e_])}},n_=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[$g].type.children.findIndex(e=>e.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[$g].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[$g].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=q_.visit(e[$g].children[n],e[e_]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[$g].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(Qg.visit(e[$g].children[r],e[e_],n),Reflect.set(e,t,n))}},B=class extends Qh{};function i_(e){return(t,n)=>t.getValid(n)?e(t,n):null}const a_=(e,t)=>864e5*e[t],o_=(e,t)=>null,s_=(e,t,n)=>{if(n+1>=t.length)return null;let r=Im(t[n]),i=Im(t[n+1]);return e.subarray(r,i)},c_=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<a_(e,t),u_=({values:e},t)=>Im(e[t]),d_=({stride:e,values:t},n)=>t[e*n],f_=({stride:e,values:t},n)=>ig(t[e*n]),p_=({values:e},t)=>e[t],m_=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),h_=({values:e,valueOffsets:t},n)=>s_(e,t,n),g_=({values:e,valueOffsets:t},n)=>{let r=s_(e,t,n);return r===null?null:Kf(r)},__=({values:e},t)=>e[t],v_=({type:e,values:t},n)=>e.precision===Lp.HALF?ig(t[n]):t[n],y_=(e,t)=>e.type.unit===Rp.DAY?l_(e,t):u_(e,t),b_=({values:e},t)=>1e3*Im(e[t]),x_=({values:e},t)=>Im(e[t]),S_=({values:e},t)=>Lm(e[t],BigInt(1e3)),C_=({values:e},t)=>Lm(e[t],BigInt(1e6)),w_=(e,t)=>{switch(e.type.unit){case zp.SECOND:return b_(e,t);case zp.MILLISECOND:return x_(e,t);case zp.MICROSECOND:return S_(e,t);case zp.NANOSECOND:return C_(e,t)}},T_=({values:e},t)=>e[t],E_=({values:e},t)=>e[t],D_=({values:e},t)=>e[t],O_=({values:e},t)=>e[t],k_=(e,t)=>{switch(e.type.unit){case zp.SECOND:return T_(e,t);case zp.MILLISECOND:return E_(e,t);case zp.MICROSECOND:return D_(e,t);case zp.NANOSECOND:return O_(e,t)}},A_=({values:e,stride:t},n)=>Ym.decimal(e.subarray(t*n,t*(n+1))),j_=(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 Jv([c])},M_=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new Q_(o.slice(i,a-i))},N_=(e,t)=>new t_(e,t),P_=(e,t)=>e.type.mode===Ip.Dense?F_(e,t):I_(e,t),F_=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return q_.visit(r,e.valueOffsets[t])},I_=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return q_.visit(r,t)},L_=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},R_=(e,t)=>e.type.unit===Bp.DAY_TIME?z_(e,t):B_(e,t),z_=({values:e},t)=>e.subarray(2*t,2*(t+1)),B_=({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},V_=({values:e},t)=>e[t],H_=({values:e},t)=>e[t],U_=({values:e},t)=>e[t],W_=({values:e},t)=>e[t],G_=(e,t)=>{switch(e.type.unit){case zp.SECOND:return V_(e,t);case zp.MILLISECOND:return H_(e,t);case zp.MICROSECOND:return U_(e,t);case zp.NANOSECOND:return W_(e,t)}},K_=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new Jv([a])};B.prototype.visitNull=i_(o_),B.prototype.visitBool=i_(c_),B.prototype.visitInt=i_(__),B.prototype.visitInt8=i_(d_),B.prototype.visitInt16=i_(d_),B.prototype.visitInt32=i_(d_),B.prototype.visitInt64=i_(p_),B.prototype.visitUint8=i_(d_),B.prototype.visitUint16=i_(d_),B.prototype.visitUint32=i_(d_),B.prototype.visitUint64=i_(p_),B.prototype.visitFloat=i_(v_),B.prototype.visitFloat16=i_(f_),B.prototype.visitFloat32=i_(d_),B.prototype.visitFloat64=i_(d_),B.prototype.visitUtf8=i_(g_),B.prototype.visitLargeUtf8=i_(g_),B.prototype.visitBinary=i_(h_),B.prototype.visitLargeBinary=i_(h_),B.prototype.visitFixedSizeBinary=i_(m_),B.prototype.visitDate=i_(y_),B.prototype.visitDateDay=i_(l_),B.prototype.visitDateMillisecond=i_(u_),B.prototype.visitTimestamp=i_(w_),B.prototype.visitTimestampSecond=i_(b_),B.prototype.visitTimestampMillisecond=i_(x_),B.prototype.visitTimestampMicrosecond=i_(S_),B.prototype.visitTimestampNanosecond=i_(C_),B.prototype.visitTime=i_(k_),B.prototype.visitTimeSecond=i_(T_),B.prototype.visitTimeMillisecond=i_(E_),B.prototype.visitTimeMicrosecond=i_(D_),B.prototype.visitTimeNanosecond=i_(O_),B.prototype.visitDecimal=i_(A_),B.prototype.visitList=i_(j_),B.prototype.visitStruct=i_(N_),B.prototype.visitUnion=i_(P_),B.prototype.visitDenseUnion=i_(F_),B.prototype.visitSparseUnion=i_(I_),B.prototype.visitDictionary=i_(L_),B.prototype.visitInterval=i_(R_),B.prototype.visitIntervalDayTime=i_(z_),B.prototype.visitIntervalYearMonth=i_(B_),B.prototype.visitDuration=i_(G_),B.prototype.visitDurationSecond=i_(V_),B.prototype.visitDurationMillisecond=i_(H_),B.prototype.visitDurationMicrosecond=i_(U_),B.prototype.visitDurationNanosecond=i_(W_),B.prototype.visitFixedSizeList=i_(K_),B.prototype.visitMap=i_(M_);const q_=new B,J_=Symbol.for(`keys`),Y_=Symbol.for(`vals`),X_=Symbol.for(`kKeysAsStrings`),Z_=Symbol.for(`_kKeysAsStrings`);var Q_=class{constructor(e){return this[J_]=new Jv([e.children[0]]).memoize(),this[Y_]=e.children[1],new Proxy(this,new ev)}get[X_](){return this[Z_]||(this[Z_]=Array.from(this[J_].toArray(),String))}[Symbol.iterator](){return new $_(this[J_],this[Y_])}get size(){return this[J_].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[J_],t=this[Y_],n={};for(let r=-1,i=e.length;++r`${Fm(e)}: ${Fm(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},$_=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),q_.visit(this.vals,e)]})}},ev=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[X_]}has(e,t){return e[X_].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[X_].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[X_].indexOf(t);if(n!==-1){let r=q_.visit(Reflect.get(e,Y_),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[X_].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(Qg.visit(Reflect.get(e,Y_),r,n),Reflect.set(e,t,n))}};Object.defineProperties(Q_.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[J_]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Y_]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Z_]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let tv;function nv(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 rv=(e,t)=>e<0?t+e:e,iv=e=>e!==e;function av(e){let t=typeof e;if(t!==`object`||e===null)return iv(e)?iv: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?Ep(e,t):!1:e instanceof Map?sv(e):Array.isArray(e)?ov(e):e instanceof Jv?cv(e):lv(e,!0)}function ov(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 dv(e,n);case Map:return pv(e,n,n.keys());case Q_:case t_:case Object:case void 0:return pv(e,n,t||Object.keys(n))}return n instanceof Jv?fv(e,n):!1}}function dv(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r>r}function gv(e,t,n){let r=n.byteLength+7&-8;if(e>0||n.byteLength>3):_v(new vv(n,e,t,null,mv)).subarray(0,r)),i}return n}function _v(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 vv=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 yv(e,t,i)+yv(e,r,n)+bv(e,i>>3,r-i>>3)}function bv(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+=xv(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=xv(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=xv(a.getUint8(i)),i+=1;return r}function xv(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const Sv=-1;var Cv=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<=Sv&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-yv(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=Zh(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===Ip.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(gv(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(gv(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[Nm.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[Nm.TYPE])&&(a[Nm.TYPE]=i.subarray(e,e+t)),(i=a[Nm.OFFSET])&&(a[Nm.OFFSET]=i.subarray(e,e+t+1))||(i=a[Nm.DATA])&&(a[Nm.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};Cv.prototype.children=Object.freeze([]);var wv=class e extends Qh{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new Cv(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=yp(e.data),i=yp(e.nullBitmap),a=_p(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new Cv(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=yp(e.data),i=yp(e.nullBitmap),a=vp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new Cv(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=yp(e.data),i=yp(e.nullBitmap),a=_p(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new Cv(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=yp(e.data),i=yp(e.nullBitmap),a=vp(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new Cv(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length/Zh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length/Zh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length/Zh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length/Zh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length/Zh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=yp(e.nullBitmap),a=_p(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new Cv(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=yp(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=gp(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(z.isSparseUnion(t))return new Cv(t,n,a,o,[void 0,void 0,void 0,i],r);let s=_p(e.valueOffsets);return new Cv(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=yp(t.nullBitmap),a=gp(n.indices.ArrayType,t.data),{dictionary:o=new Jv([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new Cv(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length/Zh(t),nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=yp(e.nullBitmap),i=gp(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new Cv(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=yp(t.nullBitmap),{length:o=i.length/Zh(n),nullCount:s=t.nullBitmap?-1:0}=t;return new Cv(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=yp(t.nullBitmap),o=_p(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new Cv(n,r,s,c,[o,void 0,a],[i])}};const Tv=new wv;function Ev(e){return Tv.visit(e)}var Dv=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 kv(e){return e.reduce((e,t)=>e+t.nullCount,0)}function Av(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function jv(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 Mv(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function Rv(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new vv(n,e.offset+(t||0),e.length,n,mv)){if(!i)return r;++r}return-1}function zv(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 Rv(e,n)}let r=q_.getVisitFn(e),i=av(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 Dv(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new Uv(a)})}var Uv=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof Cv)))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}=Kv[o.typeId],r=a[0];this.isValid=e=>Nv(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,qv[o.typeId]),this._offsets=Av(a);break}this.data=a,this.type=o,this.stride=Zh(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 Ov(this.data)}get nullCount(){return kv(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(rv(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Wv.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(nv(this,t,n,({data:e,_offsets:t},n,r)=>jv(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 Yv(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new Yv(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}};Gv=Symbol.toStringTag,Jv[Gv]=(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=q_.getVisitFnByTypeId(n),r=Qg.getVisitFnByTypeId(n),i=Vv.getVisitFnByTypeId(n);Kv[n]={get:t,set:r,indexOf:i},qv[n]=Object.create(e,{isValid:{value:Pv(Nv)},get:{value:Pv(q_.getVisitFnByTypeId(n))},set:{value:Fv(Qg.getVisitFnByTypeId(n))},indexOf:{value:Iv(Vv.getVisitFnByTypeId(n))}})}return`Vector`})(Jv.prototype);var Yv=class e extends Jv{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 Jv(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},Xv=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()}},Zv=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()+Wp),(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):Fp.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new jm).__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 Xv).__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 Xv).__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 lm).__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,Fp.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)}},Qv=class e{constructor(e=[],t,n,r=Fp.V5){this.fields=e||[],this.metadata=t||new Map,n||=ty(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=ey(ey(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:ey(ey(new Map,r[t].metadata),e.metadata)}))&&!1:!0}),o=ty(a,new Map);return new e([...r,...a],i,new Map([...this.dictionaries,...o]))}};Qv.prototype.fields=null,Qv.prototype.metadata=null,Qv.prototype.dictionaries=null;var $v=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)}};$v.prototype.type=null,$v.prototype.name=null,$v.prototype.nullable=null,$v.prototype.metadata=null;function ey(e,t){return new Map([...e||new Map,...t||new Map])}function ty(e,t=new Map){for(let n=-1,r=e.length;++n0&&ty(i.children,t)}return t}var ny=Zp,ry=Xp,iy=class{static decode(e){e=new ry(yp(e));let t=Zv.getRootAsFooter(e),n=Qv.decode(t.schema(),new Map,t.version());return new ay(n,t)}static encode(e){let t=new ny,n=Qv.encode(t,e.schema);Zv.startRecordBatchesVector(t,e.numRecordBatches);for(let n of[...e.recordBatches()].slice().reverse())oy.encode(t,n);let r=t.endVector();Zv.startDictionariesVector(t,e.numDictionaries);for(let n of[...e.dictionaryBatches()].slice().reverse())oy.encode(t,n);let i=t.endVector();return Zv.startFooter(t),Zv.addSchema(t,n),Zv.addVersion(t,Fp.V5),Zv.addRecordBatches(t,r),Zv.addDictionaries(t,i),Zv.finishFooterBuffer(t,Zv.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=Fp.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 zf(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(sy);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Dp.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Dp.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return zf(this,void 0,void 0,function*(){return yield this.abort(e),sy})}return(e){return zf(this,void 0,void 0,function*(){return yield this.close(),sy})}read(e){return zf(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return zf(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(sy)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(`AsyncQueue is closed`)}},dy=class extends uy{write(e){if((e=yp(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Kf(this.toUint8Array(!0)):this.toUint8Array(!1).then(Kf)}toUint8Array(e=!1){return e?hp(this._values)[0]:(()=>zf(this,void 0,void 0,function*(){var e,t,n,r;let i=[],a=0;try{for(var o=!0,s=Wf(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 hp(i,a)[0]}))()}},fy=class{constructor(e){e&&(this.source=new my(Dp.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)}},py=class e{constructor(t){t instanceof e?this.source=t.source:t instanceof dy?this.source=new hy(Dp.fromAsyncIterable(t)):up(t)?this.source=new hy(Dp.fromNodeStream(t)):cp(t)?this.source=new hy(Dp.fromDOMStream(t)):ap(t)?this.source=new hy(Dp.fromDOMStream(t.body)):ep(t)?this.source=new hy(Dp.fromIterable(t)):($f(t)||tp(t))&&(this.source=new hy(Dp.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)}},my=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)||sy)}return(e){return Object.create(this.source.return&&this.source.return(e)||sy)}},hy=class{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return zf(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return zf(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return zf(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(e){return zf(this,arguments,void 0,function*(e,t=`read`){return yield this.source.next({cmd:t,size:e})})}throw(e){return zf(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||sy;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return zf(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||sy;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},gy=class extends fy{constructor(e,t){super(),this.position=0,this.buffer=yp(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),ezf(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return zf(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 zf(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`${yy(this.buffer[3])} ${yy(this.buffer[2])} ${yy(this.buffer[1])} ${yy(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)}},Dy=class extends Ey{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:_v(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return gp(Uint8Array,gp(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return gp(Uint8Array,gp(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===Rp.MILLISECOND?gp(Uint8Array,wy.convertArray(n[t])):z.isDecimal(e)?gp(Uint8Array,Ty.convertArray(n[t])):z.isBinary(e)||z.isLargeBinary(e)||z.isFixedSizeBinary(e)?Oy(n[t]):z.isBool(e)?_v(n[t]):z.isUtf8(e)||z.isLargeUtf8(e)?Jf(n[t].join(``)):gp(Uint8Array,gp(e.ArrayType,n[t].map(e=>+e)))}};function Oy(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 ky=class extends Qh{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 Ay(e,t){return t instanceof e.constructor}function jy(e,t){return e===t||Ay(e,t)}function My(e,t){return e===t||Ay(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function Ny(e,t){return e===t||Ay(e,t)&&e.precision===t.precision}function Py(e,t){return e===t||Ay(e,t)&&e.byteWidth===t.byteWidth}function Fy(e,t){return e===t||Ay(e,t)&&e.unit===t.unit}function Iy(e,t){return e===t||Ay(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function Ly(e,t){return e===t||Ay(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function Ry(e,t){return e===t||Ay(e,t)&&e.children.length===t.children.length&&Ky.compareManyFields(e.children,t.children)}function zy(e,t){return e===t||Ay(e,t)&&e.children.length===t.children.length&&Ky.compareManyFields(e.children,t.children)}function By(e,t){return e===t||Ay(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&Ky.compareManyFields(e.children,t.children)}function Vy(e,t){return e===t||Ay(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&Ky.visit(e.indices,t.indices)&&Ky.visit(e.dictionary,t.dictionary)}function Hy(e,t){return e===t||Ay(e,t)&&e.unit===t.unit}function Uy(e,t){return e===t||Ay(e,t)&&e.unit===t.unit}function Wy(e,t){return e===t||Ay(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&Ky.compareManyFields(e.children,t.children)}function Gy(e,t){return e===t||Ay(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&Ky.compareManyFields(e.children,t.children)}ky.prototype.visitNull=jy,ky.prototype.visitBool=jy,ky.prototype.visitInt=My,ky.prototype.visitInt8=My,ky.prototype.visitInt16=My,ky.prototype.visitInt32=My,ky.prototype.visitInt64=My,ky.prototype.visitUint8=My,ky.prototype.visitUint16=My,ky.prototype.visitUint32=My,ky.prototype.visitUint64=My,ky.prototype.visitFloat=Ny,ky.prototype.visitFloat16=Ny,ky.prototype.visitFloat32=Ny,ky.prototype.visitFloat64=Ny,ky.prototype.visitUtf8=jy,ky.prototype.visitLargeUtf8=jy,ky.prototype.visitBinary=jy,ky.prototype.visitLargeBinary=jy,ky.prototype.visitFixedSizeBinary=Py,ky.prototype.visitDate=Fy,ky.prototype.visitDateDay=Fy,ky.prototype.visitDateMillisecond=Fy,ky.prototype.visitTimestamp=Iy,ky.prototype.visitTimestampSecond=Iy,ky.prototype.visitTimestampMillisecond=Iy,ky.prototype.visitTimestampMicrosecond=Iy,ky.prototype.visitTimestampNanosecond=Iy,ky.prototype.visitTime=Ly,ky.prototype.visitTimeSecond=Ly,ky.prototype.visitTimeMillisecond=Ly,ky.prototype.visitTimeMicrosecond=Ly,ky.prototype.visitTimeNanosecond=Ly,ky.prototype.visitDecimal=jy,ky.prototype.visitList=Ry,ky.prototype.visitStruct=zy,ky.prototype.visitUnion=By,ky.prototype.visitDenseUnion=By,ky.prototype.visitSparseUnion=By,ky.prototype.visitDictionary=Vy,ky.prototype.visitInterval=Hy,ky.prototype.visitIntervalDayTime=Hy,ky.prototype.visitIntervalYearMonth=Hy,ky.prototype.visitDuration=Uy,ky.prototype.visitDurationSecond=Uy,ky.prototype.visitDurationMillisecond=Uy,ky.prototype.visitDurationMicrosecond=Uy,ky.prototype.visitDurationNanosecond=Uy,ky.prototype.visitFixedSizeList=Wy,ky.prototype.visitMap=Gy;const Ky=new ky;function qy(e,t){return Ky.compareSchemas(e,t)}function Jy(e,t){return Yy(e,t.map(e=>e.data.concat()))}function Yy(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++]=Ev({type:new Wh(n),length:o,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map(t=>new eb(e,t))]}function Xy(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))??Ev({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return n}var Zy,Qy=class e{constructor(...t){var n,r;if(t.length===0)return this.batches=[],this.schema=new Qv([]),this._offsets=[0],this;let i,a;t[0]instanceof Qv&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(a=t.pop());let o=t=>{if(t){if(t instanceof eb)return[t];if(t instanceof e)return t.batches;if(t instanceof Cv){if(t.type instanceof Wh)return[new eb(new Qv(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 Jv([t[e]])),r=i??new Qv(e.map((e,t)=>new $v(String(e),n[t].type,n[t].nullable))),[,a]=Jy(r,n);return a.length===0?[new eb(t)]:a}}return[]},s=t.flatMap(e=>o(e));if(i=(r=i??(n=s[0])?.schema)??new Qv([]),!(i instanceof Qv))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);for(let e of s){if(!(e instanceof eb))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);if(!qy(i,e.schema))throw TypeError(`Table and inner RecordBatch schemas must be equivalent.`)}this.schema=i,this.batches=s,this._offsets=a??Av(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=kv(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(rv(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?Wv.visit(new Jv(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 eb(n,e)))}slice(t,n){let r=this.schema;[t,n]=nv({length:this.numRows},t,n);let i=jv(this.data,this._offsets,t,n);return new e(r,i.map(e=>new eb(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=Ev({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new Jv(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]=Jy(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(...Jy(a,o))}};Zy=Symbol.toStringTag,Qy[Zy]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=Pv(Nv),e.get=Pv(q_.getVisitFn(R.Struct)),e.set=Fv(Qg.getVisitFn(R.Struct)),e.indexOf=Iv(Vv.getVisitFn(R.Struct)),`Table`))(Qy.prototype);var $y,eb=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof Qv)||([,this.data=Ev({nullCount:0,type:new Wh(this.schema.fields),children:this.schema.fields.map(e=>Ev({type:e.type,nullCount:0}))})]=e,!(this.data instanceof Cv)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=tb(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]=$v.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new Qv(n),o=Ev({type:new Wh(n),length:i,children:r,nullCount:0});[this.schema,this.data]=tb(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||=nb(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 q_.visit(this.data,e)}at(e){return this.get(rv(e,this.numRows))}set(e,t){return Qg.visit(this.data,e,t)}indexOf(e,t){return Vv.visit(this.data,e,t)}[Symbol.iterator](){return Wv.visit(new Jv([this.data]))}toArray(){return[...this]}concat(...e){return new Qy(this.schema,[this,...e])}slice(t,n){let[r]=new Jv([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,Ev({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=Ev({type:new Wh(n.fields),length:this.numRows,children:r});return new e(n,i)}};$y=Symbol.toStringTag,eb[$y]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(eb.prototype);function tb(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))??Ev({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),Ev({type:new Wh(i),length:n,children:a})]}function nb(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;++rEv({type:e.type})),n=Ev({type:new Wh(e.fields),nullCount:0,children:t});super(e,n)}},ib=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()+Wp),(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):Fp.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Mm.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 lm).__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,Fp.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Mm.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)}},ab=class extends Qh{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return Cm.startNull(t),Cm.endNull(t)}visitInt(e,t){return sm.startInt(t),sm.addBitWidth(t,e.bitWidth),sm.addIsSigned(t,e.isSigned),sm.endInt(t)}visitFloat(e,t){return _m.startFloatingPoint(t),_m.addPrecision(t,e.precision),_m.endFloatingPoint(t)}visitBinary(e,t){return um.startBinary(t),um.endBinary(t)}visitLargeBinary(e,t){return ym.startLargeBinary(t),ym.endLargeBinary(t)}visitBool(e,t){return dm.startBool(t),dm.endBool(t)}visitUtf8(e,t){return Om.startUtf8(t),Om.endUtf8(t)}visitLargeUtf8(e,t){return bm.startLargeUtf8(t),bm.endLargeUtf8(t)}visitDecimal(e,t){return pm.startDecimal(t),pm.addScale(t,e.scale),pm.addPrecision(t,e.precision),pm.addBitWidth(t,e.bitWidth),pm.endDecimal(t)}visitDate(e,t){return fm.startDate(t),fm.addUnit(t,e.unit),fm.endDate(t)}visitTime(e,t){return Tm.startTime(t),Tm.addUnit(t,e.unit),Tm.addBitWidth(t,e.bitWidth),Tm.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return Em.startTimestamp(t),Em.addUnit(t,e.unit),n!==void 0&&Em.addTimezone(t,n),Em.endTimestamp(t)}visitInterval(e,t){return vm.startInterval(t),vm.addUnit(t,e.unit),vm.endInterval(t)}visitDuration(e,t){return mm.startDuration(t),mm.addUnit(t,e.unit),mm.endDuration(t)}visitList(e,t){return xm.startList(t),xm.endList(t)}visitStruct(e,t){return wm.startStruct_(t),wm.endStruct_(t)}visitUnion(e,t){Dm.startTypeIdsVector(t,e.typeIds.length);let n=Dm.createTypeIdsVector(t,e.typeIds);return Dm.startUnion(t),Dm.addMode(t,e.mode),Dm.addTypeIds(t,n),Dm.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return cm.startDictionaryEncoding(t),cm.addId(t,BigInt(e.id)),cm.addIsOrdered(t,e.isOrdered),n!==void 0&&cm.addIndexType(t,n),cm.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return hm.startFixedSizeBinary(t),hm.addByteWidth(t,e.byteWidth),hm.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return gm.startFixedSizeList(t),gm.addListSize(t,e.listSize),gm.endFixedSizeList(t)}visitMap(e,t){return Sm.startMap(t),Sm.addKeysSorted(t,e.keysSorted),Sm.endMap(t)}};const ob=new ab;function sb(e,t=new Map){return new Qv(ub(e,t),gb(e.metadata),t)}function cb(e){return new Sb(e.count,fb(e.columns),pb(e.columns))}function lb(e){return new Cb(cb(e.data),e.id,e.isDelta)}function ub(e,t){return(e.fields||[]).filter(Boolean).map(e=>$v.fromJSON(e,t))}function db(e,t){return(e.children||[]).filter(Boolean).map(e=>$v.fromJSON(e,t))}function fb(e){return(e||[]).reduce((e,t)=>[...e,new Tb(t.count,mb(t.VALIDITY)),...fb(t.children)],[])}function pb(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function hb(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=vb(e,db(e,t)),i=new $v(e.name,o,e.nullable,gb(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?_b(r):new Sh,s=new Xh(t.get(n),r,n,a.isOrdered),i=new $v(e.name,s,e.nullable,gb(e.metadata))):(r=(r=a.indexType)?_b(r):new Sh,t.set(n,o=vb(e,db(e,t))),s=new Xh(o,r,n,a.isOrdered),i=new $v(e.name,s,e.nullable,gb(e.metadata))),i||null}function gb(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function _b(e){return new yh(e.isSigned,e.bitWidth)}function vb(e,t){let n=e.type.name;switch(n){case`NONE`:return new vh;case`null`:return new vh;case`binary`:return new Mh;case`largebinary`:return new Nh;case`utf8`:return new Ph;case`largeutf8`:return new Fh;case`bool`:return new Ih;case`list`:return new Uh((t||[])[0]);case`struct`:return new Wh(t||[]);case`struct_`:return new Wh(t||[])}switch(n){case`int`:{let t=e.type;return new yh(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new Oh(Lp[t.precision])}case`decimal`:{let t=e.type;return new Lh(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new Rh(Rp[t.unit])}case`time`:{let t=e.type;return new zh(zp[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new Bh(zp[t.unit],t.timezone)}case`interval`:{let t=e.type;return new Vh(Bp[t.unit])}case`duration`:{let t=e.type;return new Hh(zp[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new Gh(Ip[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new Kh(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new qh(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new Jh((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var yb=Zp,bb=Xp,xb=class e{static fromJSON(t,n){let r=new e(0,Fp.V5,n);return r._createHeader=Eb(t,n),r}static decode(t){t=new bb(yp(t));let n=ib.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=Db(n,a),o}static encode(e){let t=new yb,n=-1;return e.isSchema()?n=Qv.encode(t,e.header()):e.isRecordBatch()?n=Sb.encode(t,e.header()):e.isDictionaryBatch()&&(n=Cb.encode(t,e.header())),ib.startMessage(t),ib.addVersion(t,Fp.V5),ib.addHeader(t,n),ib.addHeaderType(t,e.headerType),ib.addBodyLength(t,BigInt(e.bodyLength)),ib.finishMessageBuffer(t,ib.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof Qv)return new e(0,Fp.V5,Mm.Schema,t);if(t instanceof Sb)return new e(n,Fp.V5,Mm.RecordBatch,t);if(t instanceof Cb)return new e(n,Fp.V5,Mm.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===Mm.Schema}isRecordBatch(){return this.headerType===Mm.RecordBatch}isDictionaryBatch(){return this.headerType===Mm.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=Im(e)}},Sb=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=Im(e)}},Cb=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=Im(t)}},wb=class{constructor(e,t){this.offset=Im(e),this.length=Im(t)}},Tb=class{constructor(e,t){this.length=Im(e),this.nullCount=Im(t)}};function Eb(e,t){return(()=>{switch(t){case Mm.Schema:return Qv.fromJSON(e);case Mm.RecordBatch:return Sb.fromJSON(e);case Mm.DictionaryBatch:return Cb.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${Mm[t]}, type: ${t} }`)})}function Db(e,t){return(()=>{switch(t){case Mm.Schema:return Qv.decode(e.header(new jm),new Map,e.version());case Mm.RecordBatch:return Sb.decode(e.header(new rm),e.version());case Mm.DictionaryBatch:return Cb.decode(e.header(new im),e.version())}throw Error(`Unrecognized Message type: { name: ${Mm[t]}, type: ${t} }`)})}$v.encode=Hb,$v.decode=Lb,$v.fromJSON=hb,Qv.encode=Vb,Qv.decode=Ob,Qv.fromJSON=sb,Sb.encode=Ub,Sb.decode=kb,Sb.fromJSON=cb,Cb.encode=Wb,Cb.decode=Ab,Cb.fromJSON=lb,Tb.encode=Gb,Tb.decode=Mb,wb.encode=Kb,wb.decode=jb;function Ob(e,t=new Map,n=Fp.V5){let r=Fb(e,t);return new Qv(r,Rb(e),t,n)}function kb(e,t=Fp.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new Sb(e.length(),Nb(e),Pb(e,t))}function Ab(e,t=Fp.V5){return new Cb(Sb.decode(e.data(),t),e.id(),e.isDelta())}function jb(e){return new wb(e.offset(),e.length())}function Mb(e){return new Tb(e.length(),e.nullCount())}function Nb(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++r$v.encode(e,t));jm.startFieldsVector(e,n.length);let r=jm.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?jm.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return lm.startKeyValue(e),lm.addKey(e,r),lm.addValue(e,i),lm.endKeyValue(e)})):-1;return jm.startSchema(e),jm.addFields(e,r),jm.addEndianness(e,qb?am.Little:am.Big),i!==-1&&jm.addCustomMetadata(e,i),jm.endSchema(e)}function Hb(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;z.isDictionary(a)?(o=a.dictionary.typeId,i=ob.visit(a,e),r=ob.visit(a.dictionary,e)):r=ob.visit(a,e);let s=(a.children||[]).map(t=>$v.encode(e,t)),c=Am.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?Am.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return lm.startKeyValue(e),lm.addKey(e,r),lm.addValue(e,i),lm.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),Am.startField(e),Am.addType(e,r),Am.addTypeType(e,o),Am.addChildren(e,c),Am.addNullable(e,!!t.nullable),n!==-1&&Am.addName(e,n),i!==-1&&Am.addDictionary(e,i),l!==-1&&Am.addCustomMetadata(e,l),Am.endField(e)}function Ub(e,t){let n=t.nodes||[],r=t.buffers||[];rm.startNodesVector(e,n.length);for(let t of n.slice().reverse())Tb.encode(e,t);let i=e.endVector();rm.startBuffersVector(e,r.length);for(let t of r.slice().reverse())wb.encode(e,t);let a=e.endVector();return rm.startRecordBatch(e),rm.addLength(e,BigInt(t.length)),rm.addNodes(e,i),rm.addBuffers(e,a),rm.endRecordBatch(e)}function Wb(e,t){let n=Sb.encode(e,t.data);return im.startDictionaryBatch(e),im.addId(e,BigInt(t.id)),im.addIsDelta(e,t.isDelta),im.addData(e,n),im.endDictionaryBatch(e)}function Gb(e,t){return nm.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function Kb(e,t){return tm.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const qb=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),Jb=e=>`Expected ${Mm[e]} Message in stream, but was null or length 0.`,Yb=e=>`Header pointer of flatbuffer-encoded ${Mm[e]} Message is null or length 0.`,Xb=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,Zb=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var Qb=class{constructor(e){this.source=e instanceof fy?e:new fy(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?sy: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(Jb(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=yp(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(Jb(e));return t.value}readSchema(){let e=Mm.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(Yb(e));return n}};const tx=4,nx=`ARROW1`,rx=new Uint8Array(6);for(let e=0;e<6;e+=1)rx[e]=nx.codePointAt(e);function ix(e,t=0){for(let n=-1,r=rx.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 Dp.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Dp.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:np(t)?Sx(t):ip(t)?Tx(t):$f(t)?(()=>zf(this,void 0,void 0,function*(){return yield e.from(yield t)}))():ap(t)||cp(t)||up(t)||tp(t)?wx(new py(t)):Cx(new fy(t))}static readAll(t){return t instanceof e?t.isSync()?bx(t):xx(t):np(t)||ArrayBuffer.isView(t)||ep(t)||rp(t)?bx(t):xx(t)}},lx=class extends cx{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Hf(this,arguments,function*(){yield Vf(yield*Uf(Wf(this[Symbol.iterator]())))})}},ux=class extends cx{constructor(e){super(e),this._impl=e}readAll(){return zf(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=Wf(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]()}},dx=class extends lx{constructor(e){super(e),this._impl=e}},fx=class extends ux{constructor(e){super(e),this._impl=e}},px=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=Ev({type:new Wh(this.schema.fields),length:e.length,children:n});return new eb(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 Jv(c)):new Jv(c)).memoize()}_loadVectors(e,t,n){return new Ey(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},mx=class extends px{constructor(e,t){super(t),this._reader=np(e)?new ex(this._handle=e):new Qb(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=yx(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):sy}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):sy}next(){if(this.closed)return sy;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 rb(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},hx=class extends px{constructor(e,t){super(t),this._reader=new $b(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return zf(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 zf(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=yx(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return zf(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):sy})}return(e){return zf(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):sy})}next(){return zf(this,void 0,void 0,function*(){if(this.closed)return sy;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 rb(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return zf(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},gx=class extends mx{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 gy?e:new gy(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(Mm.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(Mm.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-ox,n=e.readInt32(t),r=e.readAt(t-n,n);return iy.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return zf(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 zf(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(Mm.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 zf(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(Mm.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 zf(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-ox,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return iy.decode(r)})}_readNextMessageAndValidate(e){return zf(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?ix(t)?new dx(new gx(e.read())):new lx(new mx(e)):new lx(new mx(function*(){}()))}function wx(e){return zf(this,void 0,void 0,function*(){let t=yield e.peek(ax+7&-8);return t&&t.byteLength>=4?ix(t)?new dx(new gx(yield e.read())):new ux(new hx(e)):new ux(new hx(function(){return Hf(this,arguments,function*(){})}()))})}function Tx(e){return zf(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new _y(e,t);return t>=sx&&ix(yield n.readAt(0,ax+7&-8))?new fx(new _x(n)):new ux(new hx(n))})}var Ex=class e extends Qh{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof eb?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 Jv)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 Tb(n,0));else{let{nullCount:r}=e;z.isNull(t)||Dx.call(this,r<=0?new Uint8Array:gv(e.offset,n,e.nullBitmap)),this.nodes.push(new Tb(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 Dx(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new wb(this._byteLength,t)),this._byteLength+=t,this}function Ox(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(Dx.call(this,i),n.mode===Ip.Sparse)return Nx.call(this,e);if(n.mode===Ip.Dense){if(e.offset<=0)return Dx.call(this,a),Nx.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 kx(e){let t;return e.nullCount>=e.length?Dx.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?Dx.call(this,gv(e.offset,e.length,t)):Dx.call(this,_v(e.values))}function Ax(e){return Dx.call(this,e.values.subarray(0,e.length*e.stride))}function jx(e){let{length:t,values:n,valueOffsets:r}=e,i=Im(r[0]),a=Im(r[t]),o=Math.min(a-i,n.byteLength-i);return Dx.call(this,Tp(-i,t+1,r)),Dx.call(this,n.subarray(i,i+o)),this}function Mx(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return Dx.call(this,Tp(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function Nx(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}Ex.prototype.visitBool=kx,Ex.prototype.visitInt=Ax,Ex.prototype.visitFloat=Ax,Ex.prototype.visitUtf8=jx,Ex.prototype.visitLargeUtf8=jx,Ex.prototype.visitBinary=jx,Ex.prototype.visitLargeBinary=jx,Ex.prototype.visitFixedSizeBinary=Ax,Ex.prototype.visitDate=Ax,Ex.prototype.visitTimestamp=Ax,Ex.prototype.visitTime=Ax,Ex.prototype.visitDecimal=Ax,Ex.prototype.visitList=Mx,Ex.prototype.visitStruct=Nx,Ex.prototype.visitUnion=Ox,Ex.prototype.visitInterval=Ax,Ex.prototype.visitDuration=Ax,Ex.prototype.visitFixedSizeList=Mx,Ex.prototype.visitMap=Mx;var Px=class extends ly{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 dy,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Qf(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 $f(e)?e.then(e=>this.writeAll(e)):tp(e)?Rx(this,e):Lx(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 dy?this._sink=e:(this._sink=new dy,e&&sp(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&lp(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||!qy(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 Qy&&!(t=e.schema)||e instanceof eb&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!qy(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof eb?e instanceof rb||this._writeRecordBatch(e):e instanceof Qy?this.writeAll(e.batches):ep(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=xb.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===Mm.RecordBatch?this._recordBatchBlocks.push(new oy(o,e.bodyLength,this._position)):e.headerType===Mm.DictionaryBatch&&this._dictionaryBlocks.push(new oy(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=yp(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(xb.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(rx)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=Ex.assemble(e),a=new Sb(e.numRows,n,r),o=xb.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}=Ex.assemble(new Jv([e])),s=new Sb(e.length,i,a),c=new Cb(s,t,n),l=xb.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)):tp(t)?Rx(r,t):Lx(r,t)}},Ix=class e extends Px{static writeAll(t){let n=new e;return $f(t)?t.then(e=>n.writeAll(e)):tp(t)?Rx(n,t):Lx(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=iy.encode(new iy(e,Fp.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function Lx(e,t){let n=t;t instanceof Qy&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function Rx(e,t){return zf(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=Wf(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 zx(e,t=`stream`){return(t===`stream`?Fx:Ix).writeAll(e).toUint8Array(!0)}var Bx=Object.create,Vx=Object.defineProperty,Hx=Object.getOwnPropertyDescriptor,Ux=Object.getOwnPropertyNames,Wx=Object.getPrototypeOf,Gx=Object.prototype.hasOwnProperty,Kx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qx=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Ux(t))!Gx.call(e,i)&&i!==n&&Vx(e,i,{get:()=>t[i],enumerable:!(r=Hx(t,i))||r.enumerable});return e},Jx=(e,t,n)=>(n=e==null?{}:Bx(Wx(e)),qx(t||!e||!e.__esModule?Vx(n,`default`,{value:e,enumerable:!0}):n,e)),Yx=Kx((e,t)=>{t.exports=Worker}),Xx=(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))(Xx||{}),Zx=(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))(Zx||{}),Qx=(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))(Qx||{}),$x=(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))($x||{}),eS=(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))(eS||{}),tS=(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))(tS||{}),nS=class{log(e){}},rS=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},iS=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(iS||{}),aS=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=cx.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new Qy(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 oS(this._bindings,this._conn,n),i=await cx.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 sS(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=zx(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)}},oS=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}},sS=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=cx.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new Qy(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new oS(this.bindings,this.connectionId,t),r=await cx.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},cS=(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))(cS||{}),lS=(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))(lS||{}),uS=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 dS(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:dS(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=>fS(e.name,e.type))};case R.Map:{let t=e;return{sqlType:`map`,keyType:dS(t.keyType),valueType:dS(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 fS(e,t){let n=dS(t);return n.name=e,n}var pS=new TextEncoder,mS=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 uS(`RESET`,null);return await this.postTask(e)}async ping(){let e=new uS(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new uS(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new uS(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new uS(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new uS(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new uS(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new uS(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new uS(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new uS(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new uS(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new aS(this,e)}async disconnect(e){let t=new uS(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new uS(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new uS(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new uS(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new uS(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new uS(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new uS(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new uS(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new uS(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new uS(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new uS(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new uS(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=pS.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new uS(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new uS(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new uS(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new uS(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new uS(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new uS(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new uS(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new uS(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new uS(`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(fS(t,r))}n.columnsFlat=e,delete n.columns}let r=new uS(`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(fS(t,r))}n.columnsFlat=e,delete n.columns}let r=new uS(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function hS(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}hS();var gS=(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))(gS||{}),_S=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])),vS=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])),yS=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])),bS=()=>(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])),xS={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`}}};xS.name,xS.version;var SS=xS.version.split(`.`);SS[0],SS[1],SS[2];var CS=()=>typeof navigator>`u`,wS=null,TS=null,ES=null,DS=null,OS=null;async function kS(){return wS??=typeof BigInt64Array<`u`,TS??=await vS(),ES??=await bS(),DS??=await yS(),OS??=await _S(),{bigInt64Array:wS,crossOriginIsolated:CS()||globalThis.crossOriginIsolated||!1,wasmExceptions:TS,wasmSIMD:DS,wasmThreads:ES,wasmBulkMemory:OS}}async function AS(e){let t=await kS();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}}Jx(Yx()),Symbol.for(`constructDateFrom`);const jS={},MS={};function NS(e,t){try{let n=jS[e]||=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format,r=n(t).split(`GMT`)[1]||``;return r in MS?MS[r]:FS(r,r.split(`:`))}catch{if(e in MS)return MS[e];let t=e?.match(PS);return t?FS(e,t.slice(1)):NaN}}const PS=/([+-]\d\d):?(\d\d)?/;function FS(e,t){let n=+t[0],r=+(t[1]||0);return MS[e]=n>0?n*60+r:n*60-r}var IS=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(NS(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)),BS(this,NaN),RS(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-NS(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),RS(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const LS=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!LS.test(e))return;let t=e.replace(LS,`$1UTC`);IS.prototype[t]&&(e.startsWith(`get`)?IS.prototype[e]=function(){return this.internal[t]()}:(IS.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),zS(this),+this},IS.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),RS(this),+this}))});function RS(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function zS(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()),BS(e)}function BS(e){let t=NS(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=NS(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=NS(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 IS{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} (${VS(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 VS(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const HS=new TextDecoder(`utf-8`),US=e=>HS.decode(e),WS=new TextEncoder,GS=e=>WS.encode(e),KS=e=>typeof e==`function`,qS=e=>e!=null&&Object(e)===e,JS=e=>qS(e)&&KS(e.then),YS=e=>qS(e)&&KS(e[Symbol.iterator]),XS=e=>qS(e)&&KS(e[Symbol.asyncIterator]),ZS=e=>qS(e)&&`done`in e&&`value`in e,QS=e=>qS(e)&&KS(e.clear)&&KS(e.bytes)&&KS(e.position)&&KS(e.setPosition)&&KS(e.capacity)&&KS(e.getBufferIdentifier)&&KS(e.createLong);var $S={};Re($S,{compareArrayLike:()=>RC,joinUint8Arrays:()=>rC,memcpy:()=>nC,rebaseValueOffsets:()=>LC,toArrayBufferView:()=>iC,toArrayBufferViewAsyncIterator:()=>DC,toArrayBufferViewIterator:()=>_C,toBigInt64Array:()=>cC,toBigUint64Array:()=>fC,toFloat32Array:()=>pC,toFloat32ArrayAsyncIterator:()=>PC,toFloat32ArrayIterator:()=>wC,toFloat64Array:()=>mC,toFloat64ArrayAsyncIterator:()=>FC,toFloat64ArrayIterator:()=>TC,toInt16Array:()=>oC,toInt16ArrayAsyncIterator:()=>kC,toInt16ArrayIterator:()=>yC,toInt32Array:()=>sC,toInt32ArrayAsyncIterator:()=>AC,toInt32ArrayIterator:()=>bC,toInt8Array:()=>aC,toInt8ArrayAsyncIterator:()=>OC,toInt8ArrayIterator:()=>vC,toUint16Array:()=>uC,toUint16ArrayAsyncIterator:()=>MC,toUint16ArrayIterator:()=>SC,toUint32Array:()=>dC,toUint32ArrayAsyncIterator:()=>NC,toUint32ArrayIterator:()=>CC,toUint8Array:()=>lC,toUint8ArrayAsyncIterator:()=>jC,toUint8ArrayIterator:()=>xC,toUint8ClampedArray:()=>hC,toUint8ClampedArrayAsyncIterator:()=>IC,toUint8ClampedArrayIterator:()=>EC});const eC=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function tC(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;++ciC(Int8Array,e),oC=e=>iC(Int16Array,e),sC=e=>iC(Int32Array,e),cC=e=>iC(BigInt64Array,e),lC=e=>iC(Uint8Array,e),uC=e=>iC(Uint16Array,e),dC=e=>iC(Uint32Array,e),fC=e=>iC(BigUint64Array,e),pC=e=>iC(Float32Array,e),mC=e=>iC(Float64Array,e),hC=e=>iC(Uint8ClampedArray,e),gC=e=>(e.next(),e);function*_C(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof eC?n(t):YS(t)?t:n(t);return yield*gC((function*(t){let n=null;do n=t.next(yield iC(e,n));while(!n.done)})(r[Symbol.iterator]())),new e}const vC=e=>_C(Int8Array,e),yC=e=>_C(Int16Array,e),bC=e=>_C(Int32Array,e),xC=e=>_C(Uint8Array,e),SC=e=>_C(Uint16Array,e),CC=e=>_C(Uint32Array,e),wC=e=>_C(Float32Array,e),TC=e=>_C(Float64Array,e),EC=e=>_C(Uint8ClampedArray,e);function DC(e,t){return Hf(this,arguments,function*(){if(JS(t))return yield Vf(yield Vf(yield*Uf(Wf(DC(e,yield Vf(t))))));let n=function(e){return Hf(this,arguments,function*(){yield yield Vf(yield Vf(e))})},r=function(e){return Hf(this,arguments,function*(){yield Vf(yield*Uf(Wf(gC((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 eC?n(t):YS(t)?r(t):XS(t)?t:n(t);return yield Vf(yield*Uf(Wf(gC((function(t){return Hf(this,arguments,function*(){let n=null;do n=yield Vf(t.next(yield yield Vf(iC(e,n))));while(!n.done)})})(i[Symbol.asyncIterator]()))))),yield Vf(new e)})}const OC=e=>DC(Int8Array,e),kC=e=>DC(Int16Array,e),AC=e=>DC(Int32Array,e),jC=e=>DC(Uint8Array,e),MC=e=>DC(Uint16Array,e),NC=e=>DC(Uint32Array,e),PC=e=>DC(Float32Array,e),FC=e=>DC(Float64Array,e),IC=e=>DC(Uint8ClampedArray,e);function LC(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(++nqC});const KC=void 0;function qC(e){if(e===null)return`null`;if(e===KC)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=>qC(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function JC(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 YC(e,t){return JC(e/t)+JC(e%t)/JC(t)}var XC={};Re(XC,{BN:()=>cw,bigNumToBigInt:()=>ow,bigNumToNumber:()=>iw,bigNumToString:()=>aw,isArrowBigNumSymbol:()=>ZC});const ZC=Symbol.for(`isArrowBigNum`);function QC(e,...t){return t.length===0?Object.setPrototypeOf(iC(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}QC.prototype[ZC]=!0,QC.prototype.toJSON=function(){return`"${aw(this)}"`},QC.prototype.valueOf=function(e){return iw(this,e)},QC.prototype.toString=function(){return aw(this)},QC.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return iw(this);case`string`:return aw(this);case`default`:return ow(this)}return aw(this)};function $C(...e){return QC.apply(this,e)}function ew(...e){return QC.apply(this,e)}function tw(...e){return QC.apply(this,e)}Object.setPrototypeOf($C.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(ew.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(tw.prototype,Object.create(Uint32Array.prototype)),Object.assign($C.prototype,QC.prototype,{constructor:$C,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(ew.prototype,QC.prototype,{constructor:ew,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(tw.prototype,QC.prototype,{constructor:tw,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const nw=BigInt(4294967296)*BigInt(4294967296),rw=nw-BigInt(1);function iw(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=JC(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return JC(c)}function aw(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return sw(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return sw(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`))(W.prototype);var jw=class extends W{constructor(){super(U.Null)}toString(){return`Null`}};uw=Symbol.toStringTag,jw[uw]=(e=>e[Symbol.toStringTag]=`Null`)(jw.prototype);var Mw=class extends W{constructor(e,t){super(U.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}`}};dw=Symbol.toStringTag,Mw[dw]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(Mw.prototype);var Nw=class extends Mw{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},Pw=class extends Mw{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},Fw=class extends Mw{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},Iw=class extends Mw{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},Lw=class extends Mw{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Rw=class extends Mw{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},zw=class extends Mw{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},Bw=class extends Mw{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(Nw.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(Pw.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(Fw.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(Iw.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(Lw.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(Rw.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(zw.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(Bw.prototype,`ArrayType`,{value:BigUint64Array});var Vw=class extends W{constructor(e){super(U.Float),this.precision=e}get ArrayType(){switch(this.precision){case BC.HALF:return Uint16Array;case BC.SINGLE:return Float32Array;case BC.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};fw=Symbol.toStringTag,Vw[fw]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(Vw.prototype);var Hw=class extends Vw{constructor(){super(BC.HALF)}},Uw=class extends Vw{constructor(){super(BC.SINGLE)}},Ww=class extends Vw{constructor(){super(BC.DOUBLE)}};Object.defineProperty(Hw.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(Uw.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(Ww.prototype,`ArrayType`,{value:Float64Array});var Gw=class extends W{constructor(){super(U.Binary)}toString(){return`Binary`}};pw=Symbol.toStringTag,Gw[pw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(Gw.prototype);var Kw=class extends W{constructor(){super(U.LargeBinary)}toString(){return`LargeBinary`}};mw=Symbol.toStringTag,Kw[mw]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(Kw.prototype);var qw=class extends W{constructor(){super(U.Utf8)}toString(){return`Utf8`}};hw=Symbol.toStringTag,qw[hw]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(qw.prototype);var Jw=class extends W{constructor(){super(U.LargeUtf8)}toString(){return`LargeUtf8`}};gw=Symbol.toStringTag,Jw[gw]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(Jw.prototype);var Yw=class extends W{constructor(){super(U.Bool)}toString(){return`Bool`}};_w=Symbol.toStringTag,Yw[_w]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(Yw.prototype);var Xw=class extends W{constructor(e,t,n=128){super(U.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};vw=Symbol.toStringTag,Xw[vw]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Xw.prototype);var Zw=class extends W{constructor(e){super(U.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${VC[this.unit]}>`}get ArrayType(){return this.unit===VC.DAY?Int32Array:BigInt64Array}};yw=Symbol.toStringTag,Zw[yw]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(Zw.prototype);var Qw=class extends W{constructor(e,t){super(U.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${HC[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};bw=Symbol.toStringTag,Qw[bw]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(Qw.prototype);var $w=class extends W{constructor(e,t){super(U.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${HC[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};xw=Symbol.toStringTag,$w[xw]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))($w.prototype);var eT=class extends W{constructor(e){super(U.Interval),this.unit=e}toString(){return`Interval<${UC[this.unit]}>`}};Sw=Symbol.toStringTag,eT[Sw]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(eT.prototype);var tT=class extends W{constructor(e){super(U.Duration),this.unit=e}toString(){return`Duration<${HC[this.unit]}>`}};Cw=Symbol.toStringTag,tT[Cw]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(tT.prototype);var nT=class extends W{constructor(e){super(U.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}};ww=Symbol.toStringTag,nT[ww]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(nT.prototype);var rT=class extends W{constructor(e){super(U.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};Tw=Symbol.toStringTag,rT[Tw]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(rT.prototype);var iT=class extends W{constructor(e,t,n){super(U.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(` | `)}>`}};Ew=Symbol.toStringTag,iT[Ew]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(iT.prototype);var aT=class extends W{constructor(e){super(U.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};Dw=Symbol.toStringTag,aT[Dw]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(aT.prototype);var oT=class extends W{constructor(e,t){super(U.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}>`}};Ow=Symbol.toStringTag,oT[Ow]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(oT.prototype);var sT=class extends W{constructor(e,t=!1){var n,r,i;if(super(U.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(`, `)}}>`}};kw=Symbol.toStringTag,sT[kw]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(sT.prototype);const cT=(e=>()=>++e)(-1);var lT=class extends W{constructor(e,t,n,r){super(U.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?cT():JC(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}>`}};Aw=Symbol.toStringTag,lT[Aw]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(lT.prototype);function uT(e){let t=e;switch(e.typeId){case U.Decimal:return e.bitWidth/32;case U.Interval:return t.unit===UC.MONTH_DAY_NANO?4:1+t.unit;case U.FixedSizeList:return t.listSize;case U.FixedSizeBinary:return t.byteWidth;default:return 1}}var dT=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 fT(this,e,t)}getVisitFnByTypeId(e,t=!0){return pT(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 fT(e,t,n=!0){return typeof t==`number`?pT(e,t,n):typeof t==`string`&&t in U?pT(e,U[t],n):t&&t instanceof W?pT(e,mT(t),n):t?.type&&t.type instanceof W?pT(e,mT(t.type),n):pT(e,U.NONE,n)}function pT(e,t,n=!0){let r=null;switch(t){case U.Null:r=e.visitNull;break;case U.Bool:r=e.visitBool;break;case U.Int:r=e.visitInt;break;case U.Int8:r=e.visitInt8||e.visitInt;break;case U.Int16:r=e.visitInt16||e.visitInt;break;case U.Int32:r=e.visitInt32||e.visitInt;break;case U.Int64:r=e.visitInt64||e.visitInt;break;case U.Uint8:r=e.visitUint8||e.visitInt;break;case U.Uint16:r=e.visitUint16||e.visitInt;break;case U.Uint32:r=e.visitUint32||e.visitInt;break;case U.Uint64:r=e.visitUint64||e.visitInt;break;case U.Float:r=e.visitFloat;break;case U.Float16:r=e.visitFloat16||e.visitFloat;break;case U.Float32:r=e.visitFloat32||e.visitFloat;break;case U.Float64:r=e.visitFloat64||e.visitFloat;break;case U.Utf8:r=e.visitUtf8;break;case U.LargeUtf8:r=e.visitLargeUtf8;break;case U.Binary:r=e.visitBinary;break;case U.LargeBinary:r=e.visitLargeBinary;break;case U.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case U.Date:r=e.visitDate;break;case U.DateDay:r=e.visitDateDay||e.visitDate;break;case U.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case U.Timestamp:r=e.visitTimestamp;break;case U.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case U.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case U.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case U.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case U.Time:r=e.visitTime;break;case U.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case U.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case U.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case U.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case U.Decimal:r=e.visitDecimal;break;case U.List:r=e.visitList;break;case U.Struct:r=e.visitStruct;break;case U.Union:r=e.visitUnion;break;case U.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case U.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case U.Dictionary:r=e.visitDictionary;break;case U.Interval:r=e.visitInterval;break;case U.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case U.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case U.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case U.Duration:r=e.visitDuration;break;case U.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case U.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case U.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case U.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case U.FixedSizeList:r=e.visitFixedSizeList;break;case U.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${U[t]}'`)}function mT(e){switch(e.typeId){case U.Null:return U.Null;case U.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?U.Int8:U.Uint8;case 16:return n?U.Int16:U.Uint16;case 32:return n?U.Int32:U.Uint32;case 64:return n?U.Int64:U.Uint64}return U.Int}case U.Float:switch(e.precision){case BC.HALF:return U.Float16;case BC.SINGLE:return U.Float32;case BC.DOUBLE:return U.Float64}return U.Float;case U.Binary:return U.Binary;case U.LargeBinary:return U.LargeBinary;case U.Utf8:return U.Utf8;case U.LargeUtf8:return U.LargeUtf8;case U.Bool:return U.Bool;case U.Decimal:return U.Decimal;case U.Time:switch(e.unit){case HC.SECOND:return U.TimeSecond;case HC.MILLISECOND:return U.TimeMillisecond;case HC.MICROSECOND:return U.TimeMicrosecond;case HC.NANOSECOND:return U.TimeNanosecond}return U.Time;case U.Timestamp:switch(e.unit){case HC.SECOND:return U.TimestampSecond;case HC.MILLISECOND:return U.TimestampMillisecond;case HC.MICROSECOND:return U.TimestampMicrosecond;case HC.NANOSECOND:return U.TimestampNanosecond}return U.Timestamp;case U.Date:switch(e.unit){case VC.DAY:return U.DateDay;case VC.MILLISECOND:return U.DateMillisecond}return U.Date;case U.Interval:switch(e.unit){case UC.DAY_TIME:return U.IntervalDayTime;case UC.YEAR_MONTH:return U.IntervalYearMonth;case UC.MONTH_DAY_NANO:return U.IntervalMonthDayNano}return U.Interval;case U.Duration:switch(e.unit){case HC.SECOND:return U.DurationSecond;case HC.MILLISECOND:return U.DurationMillisecond;case HC.MICROSECOND:return U.DurationMicrosecond;case HC.NANOSECOND:return U.DurationNanosecond}return U.Duration;case U.Map:return U.Map;case U.List:return U.List;case U.Struct:return U.Struct;case U.Union:switch(e.mode){case zC.Dense:return U.DenseUnion;case zC.Sparse:return U.SparseUnion}return U.Union;case U.FixedSizeBinary:return U.FixedSizeBinary;case U.FixedSizeList:return U.FixedSizeList;case U.Dictionary:return U.Dictionary}throw Error(`Unrecognized type '${U[e.typeId]}'`)}dT.prototype.visitInt8=null,dT.prototype.visitInt16=null,dT.prototype.visitInt32=null,dT.prototype.visitInt64=null,dT.prototype.visitUint8=null,dT.prototype.visitUint16=null,dT.prototype.visitUint32=null,dT.prototype.visitUint64=null,dT.prototype.visitFloat16=null,dT.prototype.visitFloat32=null,dT.prototype.visitFloat64=null,dT.prototype.visitDateDay=null,dT.prototype.visitDateMillisecond=null,dT.prototype.visitTimestampSecond=null,dT.prototype.visitTimestampMillisecond=null,dT.prototype.visitTimestampMicrosecond=null,dT.prototype.visitTimestampNanosecond=null,dT.prototype.visitTimeSecond=null,dT.prototype.visitTimeMillisecond=null,dT.prototype.visitTimeMicrosecond=null,dT.prototype.visitTimeNanosecond=null,dT.prototype.visitDenseUnion=null,dT.prototype.visitSparseUnion=null,dT.prototype.visitIntervalDayTime=null,dT.prototype.visitIntervalYearMonth=null,dT.prototype.visitIntervalMonthDayNano=null,dT.prototype.visitDuration=null,dT.prototype.visitDurationSecond=null,dT.prototype.visitDurationMillisecond=null,dT.prototype.visitDurationMicrosecond=null,dT.prototype.visitDurationNanosecond=null;var hT={};Re(hT,{float64ToUint16:()=>yT,uint16ToFloat64:()=>vT});const gT=new Float64Array(1),_T=new Uint32Array(gT.buffer);function vT(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 yT(e){if(e!==e)return 32256;gT[0]=e;let t=(_T[1]&2147483648)>>16&65535,n=_T[1]&2146435072,r=0;return n>=1089470464?_T[0]>0?n=31744:(n=(n&2080374784)>>16,r=(_T[1]&1048575)>>10):n<=1056964608?(r=1048576+(_T[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(_T[1]&1048575)+512>>10),t|n|r&65535}var bT=class extends dT{};function xT(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const ST=(e,t,n)=>{e[t]=Math.floor(n/864e5)},CT=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},ET=({values:e},t,n)=>{e[t]=n},DT=({values:e},t,n)=>{e[t]=yT(n)},OT=(e,t,n)=>{switch(e.type.precision){case BC.HALF:return DT(e,t,n);case BC.SINGLE:case BC.DOUBLE:return ET(e,t,n)}},kT=({values:e},t,n)=>{ST(e,t,n.valueOf())},AT=({values:e},t,n)=>{e[t]=BigInt(n)},jT=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},MT=({values:e,valueOffsets:t},n,r)=>CT(e,t,n,r),NT=({values:e,valueOffsets:t},n,r)=>CT(e,t,n,GS(r)),PT=(e,t,n)=>{e.type.unit===VC.DAY?kT(e,t,n):AT(e,t,n)},FT=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},IT=({values:e},t,n)=>{e[t]=BigInt(n)},LT=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},RT=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},zT=(e,t,n)=>{switch(e.type.unit){case HC.SECOND:return FT(e,t,n);case HC.MILLISECOND:return IT(e,t,n);case HC.MICROSECOND:return LT(e,t,n);case HC.NANOSECOND:return RT(e,t,n)}},BT=({values:e},t,n)=>{e[t]=n},VT=({values:e},t,n)=>{e[t]=n},HT=({values:e},t,n)=>{e[t]=n},UT=({values:e},t,n)=>{e[t]=n},WT=(e,t,n)=>{switch(e.type.unit){case HC.SECOND:return BT(e,t,n);case HC.MILLISECOND:return VT(e,t,n);case HC.MICROSECOND:return HT(e,t,n);case HC.NANOSECOND:return UT(e,t,n)}},GT=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},KT=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=pE.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=pE.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},JT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),YT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),XT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),ZT=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),QT=(e,t,n)=>{let r=e.type.children.map(e=>pE.getVisitFn(e.type)),i=n instanceof Map?XT(t,n):n instanceof dO?YT(t,n):Array.isArray(n)?JT(t,n):ZT(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},$T=(e,t,n)=>{e.type.mode===zC.Dense?eE(e,t,n):tE(e,t,n)},eE=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];pE.visit(i,e.valueOffsets[t],n)},tE=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];pE.visit(i,t,n)},nE=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},rE=(e,t,n)=>{switch(e.type.unit){case UC.YEAR_MONTH:return aE(e,t,n);case UC.DAY_TIME:return iE(e,t,n);case UC.MONTH_DAY_NANO:return oE(e,t,n)}},iE=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},aE=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},oE=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},sE=({values:e},t,n)=>{e[t]=n},cE=({values:e},t,n)=>{e[t]=n},lE=({values:e},t,n)=>{e[t]=n},uE=({values:e},t,n)=>{e[t]=n},dE=(e,t,n)=>{switch(e.type.unit){case HC.SECOND:return sE(e,t,n);case HC.MILLISECOND:return cE(e,t,n);case HC.MICROSECOND:return lE(e,t,n);case HC.NANOSECOND:return uE(e,t,n)}},fE=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=pE.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${qC(e)}: ${qC(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new _E(this[mE],this[hE])}},_E=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[mE].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[mE].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[mE].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=uD.visit(e[mE].children[n],e[hE]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[mE].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(pE.visit(e[mE].children[r],e[hE],n),Reflect.set(e,t,n))}};const yE=new vE;var G=class extends dT{};function bE(e){return(t,n)=>t.getValid(n)?e(t,n):null}const xE=(e,t)=>864e5*e[t],SE=(e,t)=>null,CE=(e,t,n)=>{if(n+1>=t.length)return null;let r=JC(t[n]),i=JC(t[n+1]);return e.subarray(r,i)},wE=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<xE(e,t),EE=({values:e},t)=>JC(e[t]),DE=({stride:e,values:t},n)=>t[e*n],OE=({stride:e,values:t},n)=>vT(t[e*n]),kE=({values:e},t)=>e[t],AE=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),jE=({values:e,valueOffsets:t},n)=>CE(e,t,n),ME=({values:e,valueOffsets:t},n)=>{let r=CE(e,t,n);return r===null?null:US(r)},NE=({values:e},t)=>e[t],PE=({type:e,values:t},n)=>e.precision===BC.HALF?vT(t[n]):t[n],FE=(e,t)=>e.type.unit===VC.DAY?TE(e,t):EE(e,t),IE=({values:e},t)=>1e3*JC(e[t]),LE=({values:e},t)=>JC(e[t]),RE=({values:e},t)=>YC(e[t],BigInt(1e3)),zE=({values:e},t)=>YC(e[t],BigInt(1e6)),BE=(e,t)=>{switch(e.type.unit){case HC.SECOND:return IE(e,t);case HC.MILLISECOND:return LE(e,t);case HC.MICROSECOND:return RE(e,t);case HC.NANOSECOND:return zE(e,t)}},VE=({values:e},t)=>e[t],HE=({values:e},t)=>e[t],UE=({values:e},t)=>e[t],WE=({values:e},t)=>e[t],GE=(e,t)=>{switch(e.type.unit){case HC.SECOND:return VE(e,t);case HC.MILLISECOND:return HE(e,t);case HC.MICROSECOND:return UE(e,t);case HC.NANOSECOND:return WE(e,t)}},KE=({values:e,stride:t},n)=>cw.decimal(e.subarray(t*n,t*(n+1))),qE=(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 dO([c])},JE=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new hD(o.slice(i,a-i))},YE=(e,t)=>new gE(e,t),XE=(e,t)=>e.type.mode===zC.Dense?ZE(e,t):QE(e,t),ZE=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return uD.visit(r,e.valueOffsets[t])},QE=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return uD.visit(r,t)},$E=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},eD=(e,t)=>e.type.unit===UC.MONTH_DAY_NANO?rD(e,t):e.type.unit===UC.DAY_TIME?tD(e,t):nD(e,t),tD=({values:e},t)=>e.subarray(2*t,2*(t+1)),nD=({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},rD=({values:e},t)=>e.subarray(4*t,4*(t+1)),iD=({values:e},t)=>e[t],aD=({values:e},t)=>e[t],oD=({values:e},t)=>e[t],sD=({values:e},t)=>e[t],cD=(e,t)=>{switch(e.type.unit){case HC.SECOND:return iD(e,t);case HC.MILLISECOND:return aD(e,t);case HC.MICROSECOND:return oD(e,t);case HC.NANOSECOND:return sD(e,t)}},lD=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new dO([a])};G.prototype.visitNull=bE(SE),G.prototype.visitBool=bE(wE),G.prototype.visitInt=bE(NE),G.prototype.visitInt8=bE(DE),G.prototype.visitInt16=bE(DE),G.prototype.visitInt32=bE(DE),G.prototype.visitInt64=bE(kE),G.prototype.visitUint8=bE(DE),G.prototype.visitUint16=bE(DE),G.prototype.visitUint32=bE(DE),G.prototype.visitUint64=bE(kE),G.prototype.visitFloat=bE(PE),G.prototype.visitFloat16=bE(OE),G.prototype.visitFloat32=bE(DE),G.prototype.visitFloat64=bE(DE),G.prototype.visitUtf8=bE(ME),G.prototype.visitLargeUtf8=bE(ME),G.prototype.visitBinary=bE(jE),G.prototype.visitLargeBinary=bE(jE),G.prototype.visitFixedSizeBinary=bE(AE),G.prototype.visitDate=bE(FE),G.prototype.visitDateDay=bE(TE),G.prototype.visitDateMillisecond=bE(EE),G.prototype.visitTimestamp=bE(BE),G.prototype.visitTimestampSecond=bE(IE),G.prototype.visitTimestampMillisecond=bE(LE),G.prototype.visitTimestampMicrosecond=bE(RE),G.prototype.visitTimestampNanosecond=bE(zE),G.prototype.visitTime=bE(GE),G.prototype.visitTimeSecond=bE(VE),G.prototype.visitTimeMillisecond=bE(HE),G.prototype.visitTimeMicrosecond=bE(UE),G.prototype.visitTimeNanosecond=bE(WE),G.prototype.visitDecimal=bE(KE),G.prototype.visitList=bE(qE),G.prototype.visitStruct=bE(YE),G.prototype.visitUnion=bE(XE),G.prototype.visitDenseUnion=bE(ZE),G.prototype.visitSparseUnion=bE(QE),G.prototype.visitDictionary=bE($E),G.prototype.visitInterval=bE(eD),G.prototype.visitIntervalDayTime=bE(tD),G.prototype.visitIntervalYearMonth=bE(nD),G.prototype.visitIntervalMonthDayNano=bE(rD),G.prototype.visitDuration=bE(cD),G.prototype.visitDurationSecond=bE(iD),G.prototype.visitDurationMillisecond=bE(aD),G.prototype.visitDurationMicrosecond=bE(oD),G.prototype.visitDurationNanosecond=bE(sD),G.prototype.visitFixedSizeList=bE(lD),G.prototype.visitMap=bE(JE);const uD=new G,dD=Symbol.for(`keys`),fD=Symbol.for(`vals`),pD=Symbol.for(`kKeysAsStrings`),mD=Symbol.for(`_kKeysAsStrings`);var hD=class{constructor(e){return this[dD]=new dO([e.children[0]]).memoize(),this[fD]=e.children[1],new Proxy(this,new _D)}get[pD](){return this[mD]||(this[mD]=Array.from(this[dD].toArray(),String))}[Symbol.iterator](){return new gD(this[dD],this[fD])}get size(){return this[dD].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[dD],t=this[fD],n={};for(let r=-1,i=e.length;++r`${qC(e)}: ${qC(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},gD=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),uD.visit(this.vals,e)]})}},_D=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[pD]}has(e,t){return e[pD].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[pD].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[pD].indexOf(t);if(n!==-1){let r=uD.visit(Reflect.get(e,fD),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[pD].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(pE.visit(Reflect.get(e,fD),r,n),Reflect.set(e,t,n))}};Object.defineProperties(hD.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[dD]:{writable:!0,enumerable:!1,configurable:!1,value:null},[fD]:{writable:!0,enumerable:!1,configurable:!1,value:null},[mD]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var vD={};Re(vD,{clampRange:()=>bD,createElementComparator:()=>CD,wrapIndex:()=>xD});let yD;function bD(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 xD=(e,t)=>e<0?t+e:e,SD=e=>e!==e;function CD(e){let t=typeof e;if(t!==`object`||e===null)return SD(e)?SD: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?RC(e,t):!1:e instanceof Map?TD(e):Array.isArray(e)?wD(e):e instanceof dO?ED(e):DD(e,!0)}function wD(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 kD(e,n);case Map:return jD(e,n,n.keys());case hD:case gE:case Object:case void 0:return jD(e,n,t||Object.keys(n))}return n instanceof dO?AD(e,n):!1}}function kD(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rRD,getBit:()=>PD,getBool:()=>ND,packBools:()=>LD,popcnt_array:()=>BD,popcnt_bit_range:()=>zD,popcnt_uint32:()=>VD,setBool:()=>FD,truncateBitmap:()=>ID});function ND(e,t,n,r){return(n&1<>r}function FD(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):LD(new RD(n,e,t,null,ND)).subarray(0,r)),i}return n}function LD(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 RD=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 zD(e,t,i)+zD(e,r,n)+BD(e,i>>3,r-i>>3)}function BD(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+=VD(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=VD(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=VD(a.getUint8(i)),i+=1;return r}function VD(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const HD=-1;var UD=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 W.isSparseUnion(e)||W.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(W.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=HD&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-zD(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=uT(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(W.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===zC.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(ID(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===U.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(ID(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[WC.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[WC.TYPE])&&(a[WC.TYPE]=i.subarray(e,e+t)),(i=a[WC.OFFSET])&&(a[WC.OFFSET]=i.subarray(e,e+t+1))||(i=a[WC.DATA])&&(a[WC.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};UD.prototype.children=Object.freeze([]);var WD=class e extends dT{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new UD(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=lC(e.data),i=lC(e.nullBitmap),a=sC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new UD(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=lC(e.data),i=lC(e.nullBitmap),a=cC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new UD(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=lC(e.data),i=lC(e.nullBitmap),a=sC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new UD(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=lC(e.data),i=lC(e.nullBitmap),a=cC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new UD(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=lC(e.nullBitmap),a=sC(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new UD(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=lC(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=iC(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(W.isSparseUnion(t))return new UD(t,n,a,o,[void 0,void 0,void 0,i],r);let s=sC(e.valueOffsets);return new UD(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=lC(t.nullBitmap),a=iC(n.indices.ArrayType,t.data),{dictionary:o=new dO([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new UD(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length/uT(t),nullCount:o=e.nullBitmap?-1:0}=e;return new UD(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=lC(e.nullBitmap),i=iC(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new UD(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=lC(t.nullBitmap),{length:o=i.length/uT(n),nullCount:s=t.nullBitmap?-1:0}=t;return new UD(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=lC(t.nullBitmap),o=sC(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new UD(n,r,s,c,[o,void 0,a],[i])}};new WD;var GD=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 qD(e){return e.reduce((e,t)=>e+t.nullCount,0)}function JD(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function YD(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 XD(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function nO(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new RD(n,e.offset+(t||0),e.length,n,ND)){if(!i)return r;++r}return-1}function rO(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case U.Union:break;case U.Dictionary:break;default:return nO(e,n)}let r=uD.getVisitFn(e),i=CD(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 GD(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new oO(a)})}var oO=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof UD)))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}=lO[o.typeId],r=a[0];this.isValid=e=>ZD(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,uO[o.typeId]),this._offsets=JD(a);break}this.data=a,this.type=o,this.stride=uT(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 KD(this.data)}get nullCount(){return qD(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${U[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(xD(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return sO.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(bD(this,t,n,({data:e,_offsets:t},n,r)=>YD(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case U.Int:case U.Float:case U.Decimal:case U.Time:case U.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 W.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(W.isDictionary(this.type)){let t=new fO(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new fO(this)}unmemoize(){if(W.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}};cO=Symbol.toStringTag,dO[cO]=(e=>{e.type=W.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(U).map(e=>U[e]).filter(e=>typeof e==`number`&&e!==U.NONE);for(let n of t){let t=uD.getVisitFnByTypeId(n),r=pE.getVisitFnByTypeId(n),i=aO.getVisitFnByTypeId(n);lO[n]={get:t,set:r,indexOf:i},uO[n]=Object.create(e,{isValid:{value:QD(ZD)},get:{value:QD(uD.getVisitFnByTypeId(n))},set:{value:$D(pE.getVisitFnByTypeId(n))},indexOf:{value:eO(aO.getVisitFnByTypeId(n))}})}return`Vector`})(dO.prototype);var fO=class e extends dO{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 dO(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},pO={};Re(pO,{BaseInt64:()=>vO,Int128:()=>xO,Int64:()=>bO,Uint64:()=>yO});const mO=65536;function hO(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const gO=8,_O=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var vO=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`${hO(this.buffer[3])} ${hO(this.buffer[2])} ${hO(this.buffer[1])} ${hO(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;nCO,toIntervalDayTimeObjects:()=>TO,toIntervalMonthDayNanoInt32Array:()=>wO,toIntervalMonthDayNanoObjects:()=>EO});function CO(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 TO(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 dT{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 DO(e,t){return t instanceof e.constructor}function OO(e,t){return e===t||DO(e,t)}function kO(e,t){return e===t||DO(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function AO(e,t){return e===t||DO(e,t)&&e.precision===t.precision}function jO(e,t){return e===t||DO(e,t)&&e.byteWidth===t.byteWidth}function MO(e,t){return e===t||DO(e,t)&&e.unit===t.unit}function NO(e,t){return e===t||DO(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function PO(e,t){return e===t||DO(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function FO(e,t){return e===t||DO(e,t)&&e.children.length===t.children.length&&UO.compareManyFields(e.children,t.children)}function IO(e,t){return e===t||DO(e,t)&&e.children.length===t.children.length&&UO.compareManyFields(e.children,t.children)}function LO(e,t){return e===t||DO(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&UO.compareManyFields(e.children,t.children)}function RO(e,t){return e===t||DO(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&UO.visit(e.indices,t.indices)&&UO.visit(e.dictionary,t.dictionary)}function zO(e,t){return e===t||DO(e,t)&&e.unit===t.unit}function BO(e,t){return e===t||DO(e,t)&&e.unit===t.unit}function VO(e,t){return e===t||DO(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&UO.compareManyFields(e.children,t.children)}function HO(e,t){return e===t||DO(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&UO.compareManyFields(e.children,t.children)}Y.prototype.visitNull=OO,Y.prototype.visitBool=OO,Y.prototype.visitInt=kO,Y.prototype.visitInt8=kO,Y.prototype.visitInt16=kO,Y.prototype.visitInt32=kO,Y.prototype.visitInt64=kO,Y.prototype.visitUint8=kO,Y.prototype.visitUint16=kO,Y.prototype.visitUint32=kO,Y.prototype.visitUint64=kO,Y.prototype.visitFloat=AO,Y.prototype.visitFloat16=AO,Y.prototype.visitFloat32=AO,Y.prototype.visitFloat64=AO,Y.prototype.visitUtf8=OO,Y.prototype.visitLargeUtf8=OO,Y.prototype.visitBinary=OO,Y.prototype.visitLargeBinary=OO,Y.prototype.visitFixedSizeBinary=jO,Y.prototype.visitDate=MO,Y.prototype.visitDateDay=MO,Y.prototype.visitDateMillisecond=MO,Y.prototype.visitTimestamp=NO,Y.prototype.visitTimestampSecond=NO,Y.prototype.visitTimestampMillisecond=NO,Y.prototype.visitTimestampMicrosecond=NO,Y.prototype.visitTimestampNanosecond=NO,Y.prototype.visitTime=PO,Y.prototype.visitTimeSecond=PO,Y.prototype.visitTimeMillisecond=PO,Y.prototype.visitTimeMicrosecond=PO,Y.prototype.visitTimeNanosecond=PO,Y.prototype.visitDecimal=OO,Y.prototype.visitList=FO,Y.prototype.visitStruct=IO,Y.prototype.visitUnion=LO,Y.prototype.visitDenseUnion=LO,Y.prototype.visitSparseUnion=LO,Y.prototype.visitDictionary=RO,Y.prototype.visitInterval=zO,Y.prototype.visitIntervalDayTime=zO,Y.prototype.visitIntervalYearMonth=zO,Y.prototype.visitIntervalMonthDayNano=zO,Y.prototype.visitDuration=BO,Y.prototype.visitDurationSecond=BO,Y.prototype.visitDurationMillisecond=BO,Y.prototype.visitDurationMicrosecond=BO,Y.prototype.visitDurationNanosecond=BO,Y.prototype.visitFixedSizeList=VO,Y.prototype.visitMap=HO;const UO=new Y;function WO(e,t){return UO.compareSchemas(e,t)}function GO(e,t){return UO.compareFields(e,t)}function KO(e,t){return UO.visit(e,t)}const qO=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XC),pO),MD),hT),$S),vD),GC),SO),{compareSchemas:WO,compareFields:GO,compareTypes:KO}),JO=365.2425,YO=6048e5,XO=864e5,ZO=3600,QO=ZO*24;QO*7;const $O=QO*JO,ek=$O/12;ek*3;const tk=Symbol.for(`constructDateFrom`);function nk(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&tk in e?e[tk](t):e instanceof Date?new e.constructor(t):new Date(t)}function rk(e,t){return nk(t||e,e)}let ik={};function ak(){return ik}function ok(e,t){let n=ak(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=rk(e,t?.in),a=i.getDay(),o=(a=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function lk(e){let t=rk(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 uk(e,...t){let n=nk.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function dk(e,t){let n=rk(e,t?.in);return n.setHours(0,0,0,0),n}function fk(e,t,n){let[r,i]=uk(n?.in,e,t),a=dk(r),o=dk(i),s=+a-lk(a),c=+o-lk(o);return Math.round((s-c)/XO)}function pk(e,t){let n=ck(e,t),r=nk(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sk(r)}function mk(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function hk(e){return!(!mk(e)&&typeof e!=`number`||isNaN(+rk(e)))}function gk(e,t){let n=rk(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _k={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`}},vk=(e,t,n)=>{let r,i=_k[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 yk(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const bk={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},xk={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},Sk={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},Ck={date:yk({formats:bk,defaultWidth:`full`}),time:yk({formats:xk,defaultWidth:`full`}),dateTime:yk({formats:Sk,defaultWidth:`full`})},wk={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Tk=(e,t,n,r)=>wk[e];function Ek(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 Dk={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},Ok={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},kk={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`]},Ak={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`]},jk={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`}},Mk={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`}},Nk=(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`},Pk={ordinalNumber:Nk,era:Ek({values:Dk,defaultWidth:`wide`}),quarter:Ek({values:Ok,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Ek({values:kk,defaultWidth:`wide`}),day:Ek({values:Ak,defaultWidth:`wide`}),dayPeriod:Ek({values:jk,defaultWidth:`wide`,formattingValues:Mk,defaultFormattingWidth:`wide`})};function Fk(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)?Lk(s,e=>e.test(o)):Ik(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 Ik(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Lk(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 zk=/^(\d+)(th|st|nd|rd)?/i,Bk=/\d+/i,Vk={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},Hk={any:[/^b/i,/^(a|c)/i]},Uk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Wk={any:[/1/i,/2/i,/3/i,/4/i]},Gk={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},Kk={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]},qk={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},Jk={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]},Yk={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},Xk={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}},Zk={ordinalNumber:Rk({matchPattern:zk,parsePattern:Bk,valueCallback:e=>parseInt(e,10)}),era:Fk({matchPatterns:Vk,defaultMatchWidth:`wide`,parsePatterns:Hk,defaultParseWidth:`any`}),quarter:Fk({matchPatterns:Uk,defaultMatchWidth:`wide`,parsePatterns:Wk,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:Fk({matchPatterns:Gk,defaultMatchWidth:`wide`,parsePatterns:Kk,defaultParseWidth:`any`}),day:Fk({matchPatterns:qk,defaultMatchWidth:`wide`,parsePatterns:Jk,defaultParseWidth:`any`}),dayPeriod:Fk({matchPatterns:Yk,defaultMatchWidth:`any`,parsePatterns:Xk,defaultParseWidth:`any`})},Qk={code:`en-US`,formatDistance:vk,formatLong:Ck,formatRelative:Tk,localize:Pk,match:Zk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $k(e,t){let n=rk(e,t?.in),r=fk(n,gk(n)),i=r+1;return i}function eA(e,t){let n=rk(e,t?.in),r=sk(n)-+pk(n);return Math.round(r/YO)+1}function tA(e,t){let n=rk(e,t?.in),r=n.getFullYear(),i=ak(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=nk(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=ok(o,t),c=nk(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=ok(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function nA(e,t){let n=ak(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=tA(e,t),a=nk(t?.in||e,0);a.setFullYear(i,0,r),a.setHours(0,0,0,0);let o=ok(a,t);return o}function rA(e,t){let n=rk(e,t?.in),r=ok(n,t)-+nA(n,t);return Math.round(r/YO)+1}function iA(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const aA={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return iA(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):iA(n+1,2)},d(e,t){return iA(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 iA(e.getHours()%12||12,t.length)},H(e,t){return iA(e.getHours(),t.length)},m(e,t){return iA(e.getMinutes(),t.length)},s(e,t){return iA(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return iA(i,t.length)}},oA={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},sA={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 aA.y(e,t)},Y:function(e,t,n,r){let i=tA(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return iA(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):iA(a,t.length)},R:function(e,t){let n=ck(e);return iA(n,t.length)},u:function(e,t){let n=e.getFullYear();return iA(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 iA(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 iA(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 aA.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 iA(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=rA(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):iA(i,t.length)},I:function(e,t,n){let r=eA(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):iA(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):aA.d(e,t)},D:function(e,t,n){let r=$k(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):iA(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 iA(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 iA(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 iA(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?oA.noon:r===0?oA.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?oA.evening:r>=12?oA.afternoon:r>=4?oA.morning:oA.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 aA.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):aA.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):iA(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):iA(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):aA.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):aA.s(e,t)},S:function(e,t){return aA.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return lA(r);case`XXXX`:case`XX`:return uA(r);case`XXXXX`:case`XXX`:default:return uA(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return lA(r);case`xxxx`:case`xx`:return uA(r);case`xxxxx`:case`xxx`:default:return uA(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+cA(r,`:`);case`OOOO`:default:return`GMT`+uA(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+cA(r,`:`);case`zzzz`:default:return`GMT`+uA(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return iA(r,t.length)},T:function(e,t,n){return iA(+e,t.length)}};function cA(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+iA(a,2)}function lA(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+iA(Math.abs(e)/60,2)}return uA(e,t)}function uA(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=iA(Math.trunc(r/60),2),a=iA(r%60,2);return n+i+t+a}const dA=(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`})}},fA=(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`})}},pA=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return dA(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}}`,dA(r,t)).replace(`{{time}}`,fA(i,t))},mA={p:fA,P:pA},hA=/^D+$/,gA=/^Y+$/,_A=[`D`,`DD`,`YY`,`YYYY`];function vA(e){return hA.test(e)}function yA(e){return gA.test(e)}function bA(e,t,n){let r=xA(e,t,n);if(console.warn(r),_A.includes(e))throw RangeError(r)}function xA(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 SA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,CA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wA=/^'([^]*?)'?$/,TA=/''/g,EA=/[a-zA-Z]/;function DA(e,t,n){let r=ak(),i=n?.locale??r.locale??Qk,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=rk(e,n?.in);if(!hk(s))throw RangeError(`Invalid time value`);let c=t.match(CA).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=mA[t];return n(e,i.formatLong)}return e}).join(``).match(SA).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:OA(e)};if(sA[t])return{isToken:!0,value:e};if(t.match(EA))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&&yA(a)||!n?.useAdditionalDayOfYearTokens&&vA(a))&&bA(a,t,String(e));let o=sA[a[0]];return o(s,a,i.localize,l)}).join(``)}function OA(e){let t=e.match(wA);return t?t[1].replace(TA,`'`):e}function kA(e,t){return rk(e*1e3,t?.in)}function AA(e,t){let n=jA(t)?new t(0):nk(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function jA(e){return typeof e==`function`&&e.prototype?.constructor===e}function MA(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 NA(e){return e==null}function PA(e){return e!=null}async function FA(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await C(()=>import(`./__vite-browser-external-CLt_IrJn.js`).then(Be(1)),__vite__mapDeps([0,1,2]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function IA(e){return NA(e)?!1:W.isInt(e.type)&&!HA(e)||LA(e)}function LA(e){return NA(e)?!1:W.isInt(e.type)&&e.type.isSigned===!1}function RA(e){return NA(e)?!1:W.isFloat(e.type)??!1}function zA(e){return NA(e)?!1:W.isDecimal(e.type)}function BA(e){return NA(e)?!1:W.isBool(e.type)}function VA(e){return NA(e)?!1:W.isDuration(e.type)}function HA(e){return NA(e)?!1:W.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function UA(e){return NA(e)?!1:W.isTimestamp(e.type)}function WA(e){return NA(e)?!1:W.isDate(e.type)}function GA(e){return NA(e)?!1:W.isTime(e.type)}function KA(e){return NA(e)?!1:W.isList(e.type)||W.isFixedSizeList(e.type)}function qA(e){return NA(e)?!1:W.isStruct(e.type)||W.isMap(e.type)}function JA(e){return NA(e)?!1:W.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||W.isInterval(e.type)}new Date(1970,0,1);function YA(e,t){let n;if(t===HC.MILLISECOND)n=1e3;else if(t===HC.MICROSECOND)n=1e3*1e3;else if(t===HC.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 XA(e,t){let n=YA(e,t?.type?.unit??HC.SECOND);return kA(n)}function ZA(e,t){let n=XA(e,t);return DA(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function QA(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?DA(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function $A(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 IS(e,r):new IS(e),AA(n,Date)}function ej(e,t){let n=t?.type?.scale||0,r=qO.bigNumToString(new qO.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=MA(r.slice(-n),`0`)||``;return`${i}${a}${o?`.${o}`:``}`}new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function tj(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 nj(e,t){if(W.isInterval(t?.type))return tj(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=ij(i.left,t.type?.children?.[0]),c=ij(i.right,t.type?.children?.[1]);return`${a+s}, ${c+o}`}return String(e)}function rj(e,t){return t?.type instanceof rT?JSON.parse(JSON.stringify(e,(e,t)=>{if(PA(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function ij(e,t){if(NA(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&WA(t))return QA(e);if(typeof e==`bigint`&&GA(t))return ZA(Number(e),t);if(n&&UA(t))return $A(e,t);if(HA(t))throw Error(`Period type is not supported yet`);if(JA(t))return nj(e,t);if(VA(t))throw Error(`Duration type is not supported yet`);return zA(t)?ej(e,t):RA(t)&&Number.isFinite(e)||IA(t)?e:qA(t)||KA(t)?rj(e,t):BA(t)?!!e:String(e)}function aj(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=ij(t[e.name],e)),t));return n}let oj=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function sj(e){let t=ve(e,{logger:!1}),n,r,i=await FA();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await C(async()=>{let{getBundles:e}=await import(`./default-browser-CS6ZmB8h.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await AS(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await C(async()=>{let{getBundles:e}=await import(`./default-node-BdKlRQ9_.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]));t.bundles=await e()}r=await AS(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await C(()=>import(`./browser-bqvzIJPy.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new rS:t.logger===!1?new nS:t.logger;let o=new mS(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case oj.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 oj.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:aj(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:aj(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 cj(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 lj(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 uj=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`}},dj=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 fj=Symbol.for(`drizzle:Name`);var pj=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 mj(e,this)}},mj=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[fj],...r,n[0].table[fj],...i];return e??`${a.join(`_`)}_fk`}};function hj(e,...t){return e(...t)}function gj(e,t){return`${e[fj]}_${t.join(`_`)}_unique`}function _j(e,t,n){for(let r=t;rArray.isArray(e)?bj(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var xj=class extends dj{foreignKeyConfigs=[];static[X]=`PgColumnBuilder`;array(e){return new wj(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})=>hj((n,r)=>{let i=new pj(()=>{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 Cj(e,this.config)}},Sj=class extends uj{constructor(e,t){t.uniqueName||=gj(e,[t.name]),super(e,t),this.table=e}static[X]=`PgColumn`},Cj=class extends Sj{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}},wj=class extends xj{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 Tj(e,this.config,t)}},Tj=class e extends Sj{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=yj(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:bj(r)}};const Ej=Symbol.for(`drizzle:isPgEnum`);function Dj(e){return!!e&&typeof e==`function`&&Ej in e&&e[Ej]===!0}var Oj=class{static[X]=`Subquery`;constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},kj=class extends Oj{static[X]=`WithSubquery`},Aj=`0.44.4`;let jj,Mj;const Nj={startActiveSpan(e,t){return jj?(Mj||=jj.trace.getTracer(`drizzle-orm`,Aj),hj((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()}}),jj,Mj)):t()}},Pj=Symbol.for(`drizzle:ViewBaseConfig`),Fj=Symbol.for(`drizzle:Schema`),Ij=Symbol.for(`drizzle:Columns`),Lj=Symbol.for(`drizzle:ExtraConfigColumns`),Rj=Symbol.for(`drizzle:OriginalName`),zj=Symbol.for(`drizzle:BaseName`),Bj=Symbol.for(`drizzle:IsAlias`),Vj=Symbol.for(`drizzle:ExtraConfigBuilder`),Hj=Symbol.for(`drizzle:IsDrizzleTable`);var Q=class{static[X]=`Table`;static Symbol={Name:fj,Schema:Fj,OriginalName:Rj,Columns:Ij,ExtraConfigColumns:Lj,BaseName:zj,IsAlias:Bj,ExtraConfigBuilder:Vj};[fj];[Rj];[Fj];[Ij];[Lj];[zj];[Bj]=!1;[Hj]=!0;[Vj]=void 0;constructor(e,t,n){this[fj]=this[Rj]=e,this[Fj]=t,this[zj]=n}};function Uj(e){return e[fj]}function Wj(e){return`${e[Fj]??`public`}.${e[fj]}`}function Gj(e){return e!=null&&typeof e.getSQL==`function`}function Kj(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 qj=class{static[X]=`StringChunk`;value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new Jj([this])}},Jj=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=Zj;shouldInlineParams=!1;usedTables=[];append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return Nj.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 Kj(t.map(t=>{if(Z(t,qj))return{sql:t.value.join(``),params:[]};if(Z(t,Yj))return{sql:a(t.value),params:[]};if(t===void 0)return{sql:``,params:[]};if(Array.isArray(t)){let e=[new qj(`(`)];for(let[n,r]of t.entries())e.push(r),ne},Qj={mapToDriverValue:e=>e};({...Zj,...Qj});var $j=class{constructor(e,t=Qj){this.value=e,this.encoder=t}static[X]=`Param`;brand;getSQL(){return new Jj([this])}};function $(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new qj(e[0]));for(let[r,i]of t.entries())n.push(i,new qj(e[r+1]));return new Jj(n)}(e=>{function t(){return new Jj([])}e.empty=t;function n(e){return new Jj(e)}e.fromList=n;function r(e){return new Jj([new qj(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 Jj(n)}e.join=i;function a(e){return new Yj(e)}e.identifier=a;function o(e){return new eM(e)}e.placeholder=o;function s(e,t){return new $j(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})(Jj||={});var eM=class{constructor(e){this.name=e}static[X]=`Placeholder`;getSQL(){return new Jj([this])}};function tM(e,t){return e.map(e=>{if(Z(e,eM)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(Z(e,$j)&&Z(e.value,eM)){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 nM=Symbol.for(`drizzle:IsDrizzleView`);var rM=class{static[X]=`View`;[Pj];[nM]=!0;constructor({name:e,schema:t,selectedFields:n,query:r}){this[Pj]={name:e,originalName:e,schema:t,selectedFields:n,query:r,isExisting:!r,isAlias:!1}}getSQL(){return new Jj([this])}};uj.prototype.getSQL=function(){return new Jj([this])},Q.prototype.getSQL=function(){return new Jj([this])},Oj.prototype.getSQL=function(){return new Jj([this])};var iM=class{constructor(e){this.table=e}static[X]=`ColumnAliasProxyHandler`;get(e,t){return t===`table`?this.table:e[t]}},aM=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===Pj)return{...e[Pj],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 iM(new Proxy(e,this)))}),n}let n=e[t];return Z(n,uj)?new Proxy(n,new iM(new Proxy(e,this))):n}};function oM(e,t){return new Proxy(e,new aM(t,!1))}function sM(e,t){return new Proxy(e,new iM(new Proxy(e.table,new aM(t,!1))))}function cM(e,t){return new Jj.Aliased(lM(e.sql,t),e.fieldAlias)}function lM(e,t){return $.join(e.queryChunks.map(e=>Z(e,uj)?sM(e,t):Z(e,Jj)?lM(e,t):Z(e,Jj.Aliased)?cM(e,t):e))}var uM=class extends Error{static[X]=`DrizzleError`;constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},dM=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)}},fM=class extends uM{static[X]=`TransactionRollbackError`;constructor(){super({message:`Rollback`})}},pM=class{static[X]=`ConsoleLogWriter`;write(e){console.log(e)}},mM=class{static[X]=`DefaultLogger`;writer;constructor(e){this.writer=e?.writer??new pM}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}`)}},hM=class{static[X]=`NoopLogger`;logQuery(){}},gM=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 _M(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,uj)||Z(r,Jj)||Z(r,Jj.Aliased)?e.push({path:i,field:r}):Z(r,Q)?e.push(..._M(r[Q.Symbol.Columns],i)):e.push(..._M(r,i)),e},[])}function vM(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 yM(e,t){let n=Object.entries(t).filter(([,e])=>e!==void 0).map(([t,n])=>Z(n,Jj)||Z(n,uj)?[t,n]:[t,new $j(n,e[Q.Symbol.Columns][t])]);if(n.length===0)throw Error(`No values to set`);return Object.fromEntries(n)}function bM(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 xM(e){return e[Q.Symbol.Columns]}function SM(e){return Z(e,Oj)?e._.alias:Z(e,rM)?e[Pj].name:Z(e,Jj)?void 0:e[Q.Symbol.IsAlias]?e[Q.Symbol.Name]:e[Q.Symbol.BaseName]}function CM(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 wM=class extends Sj{static[X]=`PgDate`;getSQLType(){return`date`}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}},TM=class extends Sj{static[X]=`PgDateString`;getSQLType(){return`date`}},EM=class extends Sj{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}},DM=class extends Sj{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}},OM=class extends Sj{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})`}},kM=class extends Sj{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`:``}`}},AM=class extends Sj{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()},jM=class extends Sj{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`:``}`}},MM=class extends Sj{static[X]=`PgUUID`;getSQLType(){return`uuid`}};const NM=Symbol.for(`drizzle:PgInlineForeignKeys`),PM=Symbol.for(`drizzle:EnableRLS`);var FM=class extends Q{static[X]=`PgTable`;static Symbol=Object.assign({},Q.Symbol,{InlineForeignKeys:NM,EnableRLS:PM});[NM]=[];[PM]=!1;[Q.Symbol.ExtraConfigBuilder]=void 0;[Q.Symbol.ExtraConfigColumns]={}},IM=class{static[X]=`PgPrimaryKeyBuilder`;columns;name;constructor(e,t){this.columns=e,this.name=t}build(e){return new LM(e,this.columns,this.name)}},LM=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[FM.Symbol.Name]}_${this.columns.map(e=>e.name).join(`_`)}_pk`}};function RM(e,t){return Xj(t)&&!Gj(e)&&!Z(e,$j)&&!Z(e,eM)&&!Z(e,uj)&&!Z(e,Q)&&!Z(e,rM)?new $j(e,t):e}const zM=(e,t)=>$`${e} = ${RM(t,e)}`,BM=(e,t)=>$`${e} <> ${RM(t,e)}`;function VM(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Jj(t):new Jj([new qj(`(`),$.join(t,new qj(` and `)),new qj(`)`)])}function HM(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Jj(t):new Jj([new qj(`(`),$.join(t,new qj(` or `)),new qj(`)`)])}function UM(e){return $`not ${e}`}const WM=(e,t)=>$`${e} > ${RM(t,e)}`,GM=(e,t)=>$`${e} >= ${RM(t,e)}`,KM=(e,t)=>$`${e} < ${RM(t,e)}`,qM=(e,t)=>$`${e} <= ${RM(t,e)}`;function JM(e,t){return Array.isArray(t)?t.length===0?$`false`:$`${e} in ${t.map(t=>RM(t,e))}`:$`${e} in ${RM(t,e)}`}function YM(e,t){return Array.isArray(t)?t.length===0?$`true`:$`${e} not in ${t.map(t=>RM(t,e))}`:$`${e} not in ${RM(t,e)}`}function XM(e){return $`${e} is null`}function ZM(e){return $`${e} is not null`}function QM(e){return $`exists ${e}`}function $M(e){return $`not exists ${e}`}function eN(e,t,n){return $`${e} between ${RM(t,e)} and ${RM(n,e)}`}function tN(e,t,n){return $`${e} not between ${RM(t,e)} and ${RM(n,e)}`}function nN(e,t){return $`${e} like ${t}`}function rN(e,t){return $`${e} not like ${t}`}function iN(e,t){return $`${e} ilike ${t}`}function aN(e,t){return $`${e} not ilike ${t}`}function oN(e){return $`${e} asc`}function sN(e){return $`${e} desc`}var cN=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},lN=class{constructor(e,t){this.table=e,this.config=t}static[X]=`Relations`},uN=class e extends cN{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}},dN=class e extends cN{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 fN(){return{and:VM,between:eN,eq:zM,exists:QM,gt:WM,gte:GM,ilike:iN,inArray:JM,isNull:XM,isNotNull:ZM,like:nN,lt:KM,lte:qM,ne:BM,not:UM,notBetween:tN,notExists:$M,notLike:rN,notIlike:aN,notInArray:YM,or:HM,sql:$}}function pN(){return{sql:$,asc:oN,desc:sN}}function mN(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=Wj(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,IM)&&i[a].primaryKey.push(...e.columns)}else if(Z(o,lN)){let e=Wj(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 hN(e){return function(t,n){return new uN(e,t,n,n?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)}}function gN(e){return function(t,n){return new dN(e,t,n)}}function _N(e,t,n){if(Z(n,uN)&&n.config)return{fields:n.config.fields,references:n.config.references};let r=t[Wj(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[Wj(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],uN)&&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 vN(e){return{one:hN(e),many:gN(e)}}function yN(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,uN)?l&&yN(e,e[s.relationTableTsKey],l,s.selection,i):l.map(t=>yN(e,e[s.relationTableTsKey],t,s.selection,i))}else{let e=i(n[o]),t=s.field,r;r=Z(t,uj)?t:Z(t,Jj)?t.decoder:t.sql.decoder,a[s.tsKey]=e===null?null:r.mapFromDriverValue(e)}return a}var bN=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===Pj)return{...t[Pj],selectedFields:new Proxy(t[Pj].selectedFields,this)};if(typeof n==`symbol`)return t[n];let r=Z(t,Oj)?t._.selectedFields:Z(t,rM)?t[Pj].selectedFields:t,i=r[n];if(Z(i,Jj.Aliased)){if(this.config.sqlAliasedBehavior===`sql`&&!i.isSelectionField)return i.sql;let e=i.clone();return e.isSelectionField=!0,e}if(Z(i,Jj)){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,uj)?this.config.alias?new Proxy(i,new iM(new Proxy(i.table,new aM(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!=`object`||!i?i:new Proxy(i,new e(this.config))}};function xN(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 SN(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 CN(e){return e}var wN=class{static[X]=`CasingCache`;cache={};cachedTables={};convert;constructor(e){this.convert=e===`snake_case`?xN:e===`camelCase`?SN:CN}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={}}},TN=class extends rM{static[X]=`PgViewBase`},EN=class{static[X]=`PgDialect`;casing;constructor(e){this.casing=new wN(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,Jj.Aliased)&&e.isSelectionField)i.push($.identifier(e.fieldAlias));else if(Z(e,Jj.Aliased)||Z(e,Jj)){let n=Z(e,Jj.Aliased)?e.sql:e;t?i.push(new Jj(n.queryChunks.map(e=>Z(e,Sj)?$.identifier(this.casing.getColumnCasing(e)):e))):i.push(n),Z(e,Jj.Aliased)&&i.push($` as ${$.identifier(e.fieldAlias)}`)}else Z(e,uj)&&(t?i.push($.identifier(this.casing.getColumnCasing(e))):i.push(e));return ro?.some(({alias:t})=>t===(e[Q.Symbol.IsAlias]?Uj(e):e[Q.Symbol.BaseName])))(e.field.table)){let t=Uj(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,Sj))e.push($.identifier(t.name));else if(Z(t,Jj)){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,Jj)?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,$j)&&i.value===void 0)if(t.defaultFn!==void 0){let e=t.defaultFn(),n=Z(e,Jj)?e:$.param(e,t);r.push(n)}else if(!t.default&&t.onUpdateFn!==void 0){let e=t.onUpdateFn(),n=Z(e,Jj)?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:sM(t,o),relationTableTsKey:void 0,isJson:!1,selection:[]}))}else{let r=Object.fromEntries(Object.entries(i.columns).map(([e,t])=>[e,sM(t,o)]));if(a.where){let e=typeof a.where==`function`?a.where(r,fN()):a.where;p=e&&lM(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:cM(t,o)})}for(let{tsKey:e,value:t}of s)l.push({dbKey:Z(t,Jj.Aliased)?t.fieldAlias:i.columns[e].name,tsKey:e,field:Z(t,uj)?sM(t,o):t,relationTableTsKey:void 0,isJson:!1,selection:[]});let _=typeof a.orderBy==`function`?a.orderBy(r,pN()):a.orderBy??[];Array.isArray(_)||(_=[_]),f=_.map(e=>Z(e,uj)?sM(e,o):lM(e,o)),u=a.limit,d=a.offset;for(let{tsKey:r,queryConfig:i,relation:a}of h){let s=_N(t,n,a),c=Wj(a.referencedTable),u=n[c],d=`${o}_${r}`,f=VM(...s.fields.map((e,t)=>zM(sM(s.references[t],d),sM(e,o)))),p=this.buildRelationalQueryWithoutPK({fullSchema:e,schema:t,tableNamesMap:n,table:e[u],tableConfig:t[u],queryConfig:Z(a,uN)?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 Oj(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 uM({message:`No fields selected for table "${i.tsName}" ("${o}")`});let h;if(p=VM(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,Jj.Aliased)?e.sql:e),$`, `)})`;Z(s,dN)&&(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:oM(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=oM(r,o),h=this.buildSelectQuery({table:Z(h,FM)?h:new Oj(h,{},o),fields:{},fieldsFlat:t.map(({field:e})=>({path:[],field:Z(e,uj)?sM(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]})}else h=this.buildSelectQuery({table:oM(r,o),fields:{},fieldsFlat:l.map(({field:e})=>({path:[],field:Z(e,uj)?sM(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]});return{tableTsKey:i.tsName,sql:h,selection:l}}},DN=class{static[X]=`TypedQueryBuilder`;getSelectedFields(){return this._.selectedFields}},ON=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,Oj)?Object.fromEntries(Object.keys(n._.selectedFields).map(e=>[e,n[e]])):Z(n,TN)?n[Pj].selectedFields:Z(n,Jj)?{}:xM(n),new AN({table:n,fields:r,isPartialSelect:t,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}},kN=class extends DN{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=SM(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{};for(let t of BN(e))this.usedTables.add(t)}getUsedTables(){return[...this.usedTables]}createJoin(e,t){return(n,r)=>{let i=this.tableName,a=SM(n);for(let e of BN(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,Jj))){let e=Z(n,Oj)?n._.selectedFields:Z(n,rM)?n[Pj].selectedFields:n[Q.Symbol.Columns];this.config.fields[a]=e}if(typeof r==`function`&&(r=r(new Proxy(this.config.fields,new bN({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(MN()):n;if(!vM(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 bN({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.where=e,this}having(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new bN({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 bN({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 bN({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(...BN(this.config.table)),this.config.joins)for(let e of this.config.joins)t.push(...BN(e.table));return new Proxy(new Oj(this.getSQL(),this.config.fields,e,!1,[...new Set(t)]),new bN({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`}))}getSelectedFields(){return new Proxy(this.config.fields,new bN({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}},AN=class extends kN{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 Nj.startActiveSpan(`drizzle.prepareQuery`,()=>{let n=_M(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=>Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))};bM(AN,[gM]);function jN(e,t){return(n,r,...i)=>{let a=[r,...i].map(n=>({type:e,isAll:t,rightSelect:n}));for(let e of a)if(!vM(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 MN=()=>({union:NN,unionAll:PN,intersect:FN,intersectAll:IN,except:LN,exceptAll:RN}),NN=jN(`union`,!1),PN=jN(`union`,!0),FN=jN(`intersect`,!1),IN=jN(`intersect`,!0),LN=jN(`except`,!1),RN=jN(`except`,!0);var zN=class{static[X]=`PgQueryBuilder`;dialect;dialectConfig;constructor(e){this.dialect=Z(e,EN)?e:void 0,this.dialectConfig=Z(e,EN)?void 0:e}$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(n)),new Proxy(new kj(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new bN({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};with(...e){let t=this;function n(n){return new ON({fields:n??void 0,session:void 0,dialect:t.getDialect(),withList:e})}function r(e){return new ON({fields:e??void 0,session:void 0,dialect:t.getDialect(),distinct:!0})}function i(e,n){return new ON({fields:n??void 0,session:void 0,dialect:t.getDialect(),distinct:{on:e}})}return{select:n,selectDistinct:r,selectDistinctOn:i}}select(e){return new ON({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new ON({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(e,t){return new ON({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:e}})}getDialect(){return this.dialect||=new EN(this.dialectConfig),this.dialect}};function BN(e){return Z(e,FM)?[e[Fj]?`${e[Fj]}.${e[Q.Symbol.BaseName]}`:e[Q.Symbol.BaseName]]:Z(e,Oj)?e._.usedTables??[]:Z(e,Jj)?e.usedTables??[]:[]}var VN=class extends gM{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=_M(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return Nj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`delete`,tables:BN(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new bN({alias:Uj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},HN=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,Jj)?i:new $j(i,n[r])}return t});return new UN(this.table,t,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(e){let t=typeof e==`function`?e(new zN):e;if(!Z(t,Jj)&&!vM(this.table[Ij],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 UN(this.table,t,this.session,this.dialect,this.withList,!0)}},UN=class extends gM{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=_M(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,yM(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 Nj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:BN(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new bN({alias:Uj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},WN=class extends gM{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 Nj.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=>Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))},GN=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 KN(this.table,yM(this.table,e),this.session,this.dialect,this.withList).setToken(this.authToken)}},KN=class extends gM{constructor(e,t,n,r,i){super(),this.session=n,this.dialect=r,this.config={set:t,table:e,withList:i,joins:[]},this.tableName=SM(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{}}static[X]=`PgUpdate`;config;tableName;joinsNotNullableMap;cacheConfig;from(e){let t=e,n=SM(t);return typeof n==`string`&&(this.joinsNotNullableMap[n]=!0),this.config.from=t,this}getTableLikeFields(e){return Z(e,FM)?e[Q.Symbol.Columns]:Z(e,Oj)?e._.selectedFields:e[Pj].selectedFields}createJoin(e){return(t,n)=>{let r=SM(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,Jj)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[Q.Symbol.Columns],new bN({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})),e&&new Proxy(e,new bN({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=SM(this.config.from);if(typeof t==`string`&&this.config.from&&!Z(this.config.from,Jj)){let n=this.getTableLikeFields(this.config.from);e[t]=n}for(let t of this.config.joins){let n=SM(t.table);if(typeof n==`string`&&!Z(t.table,Jj)){let r=this.getTableLikeFields(t.table);e[n]=r}}}return this.config.returningFields=e,this.config.returning=_M(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:BN(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 bN({alias:Uj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},qN=class e extends Jj{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})}},JN=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 YN(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},`many`)}findFirst(e){return new YN(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},`first`)}},YN=class extends gM{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 Nj.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=>yN(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 Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(void 0,this.authToken))}},XN=class extends gM{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}},ZN=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 JN(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 zN(n.dialect))),new Proxy(new kj(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new bN({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};$count(e,t){return new qN({source:e,filters:t,session:this.session})}$cache;with(...e){let t=this;function n(n){return new ON({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e})}function r(n){return new ON({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})}function i(n,r){return new ON({fields:r??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:{on:n}})}function a(n){return new GN(n,t.session,t.dialect,e)}function o(n){return new HN(n,t.session,t.dialect,e)}function s(n){return new VN(n,t.session,t.dialect,e)}return{select:n,selectDistinct:r,selectDistinctOn:i,update:a,insert:o,delete:s}}select(e){return new ON({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new ON({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(e,t){return new ON({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:{on:e}})}update(e){return new GN(e,this.session,this.dialect)}insert(e){return new HN(e,this.session,this.dialect)}delete(e){return new VN(e,this.session,this.dialect)}refreshMaterializedView(e){return new WN(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 XN(()=>r.execute(void 0,this.authToken),t,n,e=>r.mapResult(e,!0))}transaction(e,t){return this.session.transaction(e,t)}},QN=class{static[X]=`Cache`},$N=class extends QN{strategy(){return`all`}static[X]=`NoopCache`;async get(e){}async put(e,t,n,r){}async onMutate(e){}};async function eP(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 tP=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,$N)||this.queryMetadata===void 0)try{return await n()}catch(n){throw new dM(e,t,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await n()}catch(n){throw new dM(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 dM(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new dM(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await eP(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 dM(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await eP(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 dM(e,t,n)}}},nP=class{constructor(e){this.dialect=e}static[X]=`PgSession`;execute(e,t){return Nj.startActiveSpan(`drizzle.operation`,()=>{let n=Nj.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)}},rP=class extends ZN{constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}static[X]=`PgTransaction`;rollback(){throw new fM}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 iP(e){return typeof e==`string`&&/^true$/i.test(e)}function aP(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&&iP(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case oj.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:oj.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&iP(e)&&{accessMode:Xx.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var oP=class extends tP{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=tM(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=tM(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},sP=class e extends nP{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 hM}prepareQuery(e,t,n,r,i){return new oP(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 cj(this.client,async r=>{let i=new e(r,this.dialect,this.schema,this.options),a=new cP(this.dialect,i,this.schema);return n&&await a.setTransaction(n),t(a)})}},cP=class e extends rP{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 lj(this.session.client,``,async n=>{let r=new sP(n,this.dialect,this.schema,this.session.options),i=new e(this.dialect,r,this.schema);return t(i)})}},lP=class extends ZN{static[X]=`DuckDBWasmDatabase`};function uP(e,t={}){let n=new EN({casing:t.casing}),r;t.logger===!0?r=new mM:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=mN(t.schema,vN);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new sP(e,n,i,{logger:r}),o=new lP(n,a,i);return o.$client=e,o}function dP(e,t){let n=aP(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await FA();switch(e){case`browser`:return(await C(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 C(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-TVB6v_2U.js`);return{getImportUrlBundles:e}},__vite__mapDeps([7,6]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await FA();switch(e){case`browser`:return(await C(async()=>{let{getBundles:e}=await import(`./default-browser-CS6ZmB8h.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await C(async()=>{let{getBundles:e}=await import(`./default-node-CUnR0j1U.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return uP(sj({bundles:r,logger:n.logger?new rS:void 0,storage:n.storage}),t)}function fP(...e){if(typeof e[0]==`string`)return dP(e[0],e[1]);if(CM(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return uP(n,r);if(typeof t==`string`)return dP(t,r);if(t===void 0)throw Error(`connection option is required`);return uP(sj({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return uP(e[0],e[1])}(function(e){function t(e){return uP({options:{parsers:{},serializers:{}}},e)}e.mock=t})(fP||={});var pP=S({__name:`DirectionalLightHelper`,props:{directionalLight:{}},setup(e){let t=e,{scene:n}=Ce(),r=Ie(()=>t.directionalLight);return De(async()=>{await ge(r).toBeTruthy(),n.value.add(new Ee(t.directionalLight,1))}),(e,t)=>Ae(e.$slots,`default`)}}),mP=pP;const hP=[`position`,`intensity`],gP=[`position`,`rotation`,`intensity`],_P=[`intensity`];var vP=S({__name:`VRM`,props:{modelSrc:{},modelFile:{}},emits:[`loadModelProgress`,`error`],setup(e,{expose:t,emit:n}){let r=e,i=n,{x:a,y:o}=me(),s=Pe(),{width:c,height:l}=pe(s),{cameraFOV:u,cameraPosition:d,cameraDistance:f,modelOrigin:p,trackingMode:m,lookAtTarget:h,eyeHeight:g,directionalLightPosition:_,directionalLightRotation:v,directionalLightIntensity:y,ambientLightIntensity:b,hemisphereLightPosition:x,hemisphereLightIntensity:S}=w(Ue()),C=Pe(),T=Fe(new O),E=Fe(),D=Fe(),A=!0,ee=Pe(!1),te=Pe(!1),ne=Pe(!1),P=new j,ie=new M;je(u,e=>{T.value&&(T.value.fov=e,T.value.updateProjectionMatrix())}),je(()=>E.value?.controls,e=>{if(e&&T.value){ee.value=!0;let t=()=>{if(A)return;A=!0;let e=T.value.position,t=E.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),A=!1};e.addEventListener(`change`,t),Oe(()=>{e.removeEventListener(`change`,t)})}});function ae(){te.value=!0}je([ee,te],([e,t])=>{if(e&&t&&T.value&&E.value&&E.value.controls){A=!0;try{T.value.aspect=c.value/l.value,T.value.fov=u.value,E.value.setTarget(p.value),T.value.position.set(d.value.x,d.value.y,d.value.z),T.value.updateProjectionMatrix(),E.value.controls.update(),f.value=E.value.controls.getDistance()}finally{A=!1,ne.value=!0}}}),je(f,e=>{if(!A&&T.value&&E.value&&E.value.controls){A=!0;let t=new N,n=E.value.controls.target,r=new N().subVectors(T.value.position,n).normalize();t.copy(n).addScaledVector(r,e),T.value.position.set(t.x,t.y,t.z),E.value.update(),d.value={x:t.x,y:t.y,z:t.z}}A=!1});function de(e){C.value?.lookAtUpdate(e),h.value=e}function fe(e,t){ie.x=e/window.innerWidth*2-1,ie.y=-(t/window.innerHeight)*2+1,P.setFromCamera(ie,T.value);let n=new N;T.value.getWorldDirection(n);let r=new k;r.setFromNormalAndCoplanarPoint(n,T.value.position.clone().add(n.multiplyScalar(1)));let i=new N;P.ray.intersectPlane(r,i),h.value={x:i.x,y:i.y,z:i.z},C.value?.lookAtUpdate(h.value)}return je(d,e=>{!ne.value||!C.value||m.value===`camera`&&de(e)},{deep:!0}),je([a,o],()=>{!ne.value||!C.value||m.value===`mouse`&&fe(a.value,o.value)}),je(m,e=>{!ne.value||!C.value||(e===`camera`?de(d.value):e===`mouse`?fe(a.value,o.value):h.value={x:0,y:g.value,z:-1e3})}),t({setExpression:e=>{C.value?.setExpression(e)}}),(e,t)=>(ke(),le(`div`,{ref_key:`vrmContainerRef`,ref:s,w:`100%`,h:`100%`},[T.value?Ne((ke(),se(Le(xe),{key:0,camera:T.value,antialias:!0,width:Le(c),height:Le(l)},{default:Me(()=>[ue(Le(XP),{ref_key:`controlsRef`,ref:E},null,512),oe(`TresHemisphereLight`,{color:16777215,position:[Le(x).x,Le(x).y,Le(x).z],intensity:Le(S),"cast-shadow":``},null,8,hP),oe(`TresDirectionalLight`,{ref_key:`directionalLightRef`,ref:D,color:16777215,position:[Le(_).x,Le(_).y,Le(_).z],rotation:[Le(v).x,Le(v).y,Le(v).z],intensity:Le(y),"cast-shadow":``},null,8,gP),ue(mP,{"directional-light":D.value},null,8,[`directional-light`]),oe(`TresAmbientLight`,{color:16777215,intensity:Le(b),"cast-shadow":``},null,8,_P),ue(Le(TP),{ref_key:`modelRef`,ref:C,"model-src":r.modelSrc,"model-file":r.modelFile,"idle-animation":`/assets/vrm/animations/idle_loop.vrma`,paused:!1,onLoadModelProgress:t[0]||=e=>i(`loadModelProgress`,e),onModelReady:ae,onError:t[1]||=e=>i(`error`,e)},null,8,[`model-src`,`model-file`]),t[2]||=oe(`TresAxesHelper`,{size:1},null,-1)]),_:1,__:[2]},8,[`camera`,`width`,`height`])),[[re,ne.value]]):ce(``,!0)],512))}}),yP=vP;const bP={relative:``},xP={"h-full":``,"w-full":``};var SP=S({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:{},xOffset:{},yOffset:{},scale:{default:1}},setup(e){let t=Pe(),n=Pe(),{stageView:r,stageViewControlsEnabled:i,live2dDisableFocus:a}=w(We()),{mouthOpenSize:o}=w(g()),{audioContext:s,calculateVolume:c}=h(),{onBeforeMessageComposed:l,onBeforeSend:m,onTokenLiteral:_,onTokenSpecial:S,onStreamEnd:C,onAssistantResponseEnd:T}=qe(),E=Xe(),{modelFile:D,modelUrl:O}=w(Ge()),{modelFile:k,modelUrl:A}=w(Ue()),ee=Pe(),j=Pe(!1),te=Pe(!1),ne=p({handlers:[e=>new Promise(t=>{let n=s.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(s.destination),n.connect(ee.value),j.value=!0,n.start(0),n.onended=()=>{j.value=!1,t()}})]}),M=Je(),{ssmlEnabled:N,activeSpeechProvider:P,activeSpeechModel:re,activeSpeechVoice:ie,pitch:ae}=w(M);async function ue(e){try{if(!P.value){console.warn(`No active speech provider configured`);return}if(!ie.value){console.warn(`No active speech voice configured`);return}let t=await E.getProviderInstance(P.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=E.getProviderConfig(P.value),r=N.value?M.generateSSML(e.data,ie.value,{...n,pitch:ae.value}):e.data,i=await Ye({...t.speech(re.value,n),input:r,voice:ie.value.id}),a=await s.decodeAudioData(i);await ne.add({audioBuffer:a,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let de=p({handlers:[ue]});de.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let fe=f(de),{currentMotion:pe}=w(Ge()),me=p({handlers:[async e=>{if(r.value===`3d`){let t=b[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(pe.value={group:y[e.data]})}]}),he=d(me);he.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let ge=u();ge.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function _e(){requestAnimationFrame(_e),j.value&&(o.value=c(ee.value,`linear`))}function ve(){te.value||(_e(),s.resume(),te.value=!0)}function ye(){ee.value||=s.createAnalyser()}return l(async()=>{ye(),ve()}),m(async()=>{pe.value={group:x}}),_(async e=>{await fe.add(e)}),S(async e=>{await ge.add(e),await he.add(e)}),C(async()=>{await ge.add(v)}),T(async e=>{}),Oe(()=>{te.value=!1}),De(async()=>{t.value=fP({connection:{bundles:Ze()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(e,t)=>(ke(),le(`div`,bP,[oe(`div`,xP,[Le(r)===`2d`?(ke(),se(zf,{key:0,"min-w":`50% u.modelSrc),h=Ie(()=>u.modelFile),g=he(h),_=ae(()=>g.value?g.value:m.value?m.value:``),v=Pe(),y=Pe(),{scene:b}=Ce(),{onBeforeRender:x}=Se(),S=a(),C=Pe(),T=Ue(),{modelOffset:E,modelOrigin:O,modelSize:k,cameraPosition:ee,modelRotationY:j,lookAtTarget:te,eyeHeight:ne,trackingMode:M}=w(T),re=Pe(),ie=o();async function oe(){await ge(p).not.toBeTruthy(),p.value=!0;try{if(!b.value){console.warn(`Scene is not ready, cannot load VRM model.`);return}v.value&&le();try{let e=await n(_.value,{scene:b.value,lookAt:!0,positionOffset:[E.value.x,E.value.y,E.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;re.value=o,ee.value={x:s.x+l.x,y:s.y+l.y,z:s.z+l.z},O.value={x:s.x,y:s.y,z:s.z},k.value={x:c.x,y:c.y,z:c.z};let p=new N(0,0,-1),m=a.lookAt,h=new A;if(m){let e=m.faceFront;h.setFromUnitVectors(e.normalize(),p.normalize()),o.quaternion.premultiply(h),o.updateMatrixWorld(!0)}else console.warn(`No look-at target found in VRM model`);j.value=0;function g(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 N;t.getWorldPosition(n);let r=e.tracks.find(e=>e.name.endsWith(`Hips.position`));if(!(r instanceof P)){console.warn(`No Hips.position track of type VectorKeyframeTrack found in animation.`);return}let i=new N(r.values[0],r.values[1],r.values[2]),o=new N().subVectors(i,n);e.tracks.forEach(e=>{if(e.name.endsWith(`.position`)&&e instanceof P)for(let t=0;t{y.value?.update(e),v.value?.update(e),v.value?.lookAt?.update?.(e),S.update(v.value,e),ie.update(v.value,te,e),C.value?.update(e)}).off}catch(e){d(`error`,e)}}catch(e){console.error(e)}finally{p.value=!1}}je(E,()=>{re.value&&re.value.position.set(E.value.x,E.value.y,E.value.z)},{deep:!0}),je(j,e=>{v.value&&re.value&&(re.value.rotation.y=D.degToRad(e))}),je(_,e=>{e&&oe()});let{pause:se,resume:ce}=Se();je(()=>u.paused,e=>e?se():ce());function le(){f?.(),v.value&&(v.value.scene.removeFromParent(),s.deepDispose(v.value.scene))}return De(async()=>await oe()),Oe(()=>le()),c({setExpression(e){C.value?.setEmotionWithResetAfter(e,1e3)},scene:ae(()=>v.value?.scene),lookAtUpdate(e){ie.instantUpdate(v.value,e)}}),(e,t)=>Ae(e.$slots,`default`)}}),TP=wP;const EP={type:`change`},DP={type:`start`},OP={type:`end`},kP=new ee,AP=new k,jP=Math.cos(70*D.DEG2RAD),MP=new N,NP=2*Math.PI,PP={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},FP=1e-6;var IP=class extends Te{constructor(e,t=null){super(e,t),this.state=PP.NONE,this.target=new N,this.cursor=new N,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:E.ROTATE,MIDDLE:E.DOLLY,RIGHT:E.PAN},this.touches={ONE:ne.ROTATE,TWO:ne.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new N,this._lastQuaternion=new A,this._lastTargetPosition=new N,this._quat=new A().setFromUnitVectors(e.up,new N(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new te,this._sphericalDelta=new te,this._scale=1,this._panOffset=new N,this._rotateStart=new M,this._rotateEnd=new M,this._rotateDelta=new M,this._panStart=new M,this._panEnd=new M,this._panDelta=new M,this._dollyStart=new M,this._dollyEnd=new M,this._dollyDelta=new M,this._dollyDirection=new N,this._mouse=new M,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=RP.bind(this),this._onPointerDown=LP.bind(this),this._onPointerUp=zP.bind(this),this._onContextMenu=KP.bind(this),this._onMouseWheel=HP.bind(this),this._onKeyDown=UP.bind(this),this._onTouchStart=WP.bind(this),this._onTouchMove=GP.bind(this),this._onMouseDown=BP.bind(this),this._onMouseMove=VP.bind(this),this._interceptControlDown=qP.bind(this),this._interceptControlUp=JP.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(EP),this.update(),this.state=PP.NONE}update(e=null){let t=this.object.position;MP.copy(t).sub(this.target),MP.applyQuaternion(this._quat),this._spherical.setFromVector3(MP),this.autoRotate&&this.state===PP.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+=NP:n>Math.PI&&(n-=NP),r<-Math.PI?r+=NP:r>Math.PI&&(r-=NP),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(MP.setFromSpherical(this._spherical),MP.applyQuaternion(this._quatInverse),t.copy(this.target).add(MP),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=MP.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 N(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 N(this._mouse.x,this._mouse.y,0);r.unproject(this.object),this.object.position.sub(r).add(t),this.object.updateMatrixWorld(),e=MP.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):(kP.origin.copy(this.object.position),kP.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(kP.direction))FP||8*(1-this._lastQuaternion.dot(this.object.quaternion))>FP||this._lastTargetPosition.distanceToSquared(this.target)>FP?(this.dispatchEvent(EP),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e===null?NP/60/60*this.autoRotateSpeed:NP/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){MP.setFromMatrixColumn(t,0),MP.multiplyScalar(-e),this._panOffset.add(MP)}_panUp(e,t){this.screenSpacePanning===!0?MP.setFromMatrixColumn(t,1):(MP.setFromMatrixColumn(t,0),MP.crossVectors(this.object.up,MP)),MP.multiplyScalar(e),this._panOffset.add(MP)}_pan(e,t){let n=this.domElement;if(this.object.isPerspectiveCamera){let r=this.object.position;MP.copy(r).sub(this.target);let i=MP.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(NP*this._rotateDelta.x/t.clientHeight),this._rotateUp(NP*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(NP*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(-NP*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(NP*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(-NP*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(NP*this._rotateDelta.x/t.clientHeight),this._rotateUp(NP*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 IP(n.value,r.value.domElement),i.value.enableDamping=!0,i.value.dampingFactor=.5,i.value.mouseButtons={LEFT:E.ROTATE,MIDDLE:E.DOLLY,RIGHT:E.PAN},i.value.touches={ONE:ne.ROTATE,TWO:ne.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)=>Ae(e.$slots,`default`)}}),XP=YP;export{CP as b,yP as c,iA as d,hk as e,rk as f,zf as g,jf as h,Af as i,Ll as j}; \ 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,Jj.Aliased)&&e.isSelectionField)i.push($.identifier(e.fieldAlias));else if(Z(e,Jj.Aliased)||Z(e,Jj)){let n=Z(e,Jj.Aliased)?e.sql:e;t?i.push(new Jj(n.queryChunks.map(e=>Z(e,Sj)?$.identifier(this.casing.getColumnCasing(e)):e))):i.push(n),Z(e,Jj.Aliased)&&i.push($` as ${$.identifier(e.fieldAlias)}`)}else Z(e,uj)&&(t?i.push($.identifier(this.casing.getColumnCasing(e))):i.push(e));return ro?.some(({alias:t})=>t===(e[Q.Symbol.IsAlias]?Uj(e):e[Q.Symbol.BaseName])))(e.field.table)){let t=Uj(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,Sj))e.push($.identifier(t.name));else if(Z(t,Jj)){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,Jj)?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,$j)&&i.value===void 0)if(t.defaultFn!==void 0){let e=t.defaultFn(),n=Z(e,Jj)?e:$.param(e,t);r.push(n)}else if(!t.default&&t.onUpdateFn!==void 0){let e=t.onUpdateFn(),n=Z(e,Jj)?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:sM(t,o),relationTableTsKey:void 0,isJson:!1,selection:[]}))}else{let r=Object.fromEntries(Object.entries(i.columns).map(([e,t])=>[e,sM(t,o)]));if(a.where){let e=typeof a.where==`function`?a.where(r,fN()):a.where;p=e&&lM(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:cM(t,o)})}for(let{tsKey:e,value:t}of s)l.push({dbKey:Z(t,Jj.Aliased)?t.fieldAlias:i.columns[e].name,tsKey:e,field:Z(t,uj)?sM(t,o):t,relationTableTsKey:void 0,isJson:!1,selection:[]});let _=typeof a.orderBy==`function`?a.orderBy(r,pN()):a.orderBy??[];Array.isArray(_)||(_=[_]),f=_.map(e=>Z(e,uj)?sM(e,o):lM(e,o)),u=a.limit,d=a.offset;for(let{tsKey:r,queryConfig:i,relation:a}of h){let s=_N(t,n,a),c=Wj(a.referencedTable),u=n[c],d=`${o}_${r}`,f=VM(...s.fields.map((e,t)=>zM(sM(s.references[t],d),sM(e,o)))),p=this.buildRelationalQueryWithoutPK({fullSchema:e,schema:t,tableNamesMap:n,table:e[u],tableConfig:t[u],queryConfig:Z(a,uN)?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 Oj(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 uM({message:`No fields selected for table "${i.tsName}" ("${o}")`});let h;if(p=VM(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,Jj.Aliased)?e.sql:e),$`, `)})`;Z(s,dN)&&(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:oM(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=oM(r,o),h=this.buildSelectQuery({table:Z(h,FM)?h:new Oj(h,{},o),fields:{},fieldsFlat:t.map(({field:e})=>({path:[],field:Z(e,uj)?sM(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]})}else h=this.buildSelectQuery({table:oM(r,o),fields:{},fieldsFlat:l.map(({field:e})=>({path:[],field:Z(e,uj)?sM(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]});return{tableTsKey:i.tsName,sql:h,selection:l}}},DN=class{static[X]=`TypedQueryBuilder`;getSelectedFields(){return this._.selectedFields}},ON=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,Oj)?Object.fromEntries(Object.keys(n._.selectedFields).map(e=>[e,n[e]])):Z(n,TN)?n[Pj].selectedFields:Z(n,Jj)?{}:xM(n),new AN({table:n,fields:r,isPartialSelect:t,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}},kN=class extends DN{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=SM(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{};for(let t of BN(e))this.usedTables.add(t)}getUsedTables(){return[...this.usedTables]}createJoin(e,t){return(n,r)=>{let i=this.tableName,a=SM(n);for(let e of BN(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,Jj))){let e=Z(n,Oj)?n._.selectedFields:Z(n,rM)?n[Pj].selectedFields:n[Q.Symbol.Columns];this.config.fields[a]=e}if(typeof r==`function`&&(r=r(new Proxy(this.config.fields,new bN({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(MN()):n;if(!vM(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 bN({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.where=e,this}having(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new bN({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 bN({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 bN({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(...BN(this.config.table)),this.config.joins)for(let e of this.config.joins)t.push(...BN(e.table));return new Proxy(new Oj(this.getSQL(),this.config.fields,e,!1,[...new Set(t)]),new bN({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`}))}getSelectedFields(){return new Proxy(this.config.fields,new bN({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}},AN=class extends kN{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 Nj.startActiveSpan(`drizzle.prepareQuery`,()=>{let n=_M(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=>Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))};bM(AN,[gM]);function jN(e,t){return(n,r,...i)=>{let a=[r,...i].map(n=>({type:e,isAll:t,rightSelect:n}));for(let e of a)if(!vM(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 MN=()=>({union:NN,unionAll:PN,intersect:FN,intersectAll:IN,except:LN,exceptAll:RN}),NN=jN(`union`,!1),PN=jN(`union`,!0),FN=jN(`intersect`,!1),IN=jN(`intersect`,!0),LN=jN(`except`,!1),RN=jN(`except`,!0);var zN=class{static[X]=`PgQueryBuilder`;dialect;dialectConfig;constructor(e){this.dialect=Z(e,EN)?e:void 0,this.dialectConfig=Z(e,EN)?void 0:e}$with=(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(n)),new Proxy(new kj(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new bN({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};with(...e){let t=this;function n(n){return new ON({fields:n??void 0,session:void 0,dialect:t.getDialect(),withList:e})}function r(e){return new ON({fields:e??void 0,session:void 0,dialect:t.getDialect(),distinct:!0})}function i(e,n){return new ON({fields:n??void 0,session:void 0,dialect:t.getDialect(),distinct:{on:e}})}return{select:n,selectDistinct:r,selectDistinctOn:i}}select(e){return new ON({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new ON({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(e,t){return new ON({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:e}})}getDialect(){return this.dialect||=new EN(this.dialectConfig),this.dialect}};function BN(e){return Z(e,FM)?[e[Fj]?`${e[Fj]}.${e[Q.Symbol.BaseName]}`:e[Q.Symbol.BaseName]]:Z(e,Oj)?e._.usedTables??[]:Z(e,Jj)?e.usedTables??[]:[]}var VN=class extends gM{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=_M(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return Nj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`delete`,tables:BN(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new bN({alias:Uj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},HN=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,Jj)?i:new $j(i,n[r])}return t});return new UN(this.table,t,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(e){let t=typeof e==`function`?e(new zN):e;if(!Z(t,Jj)&&!vM(this.table[Ij],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 UN(this.table,t,this.session,this.dialect,this.withList,!0)}},UN=class extends gM{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=_M(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,yM(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 Nj.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:BN(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new bN({alias:Uj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},WN=class extends gM{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 Nj.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=>Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))},GN=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 KN(this.table,yM(this.table,e),this.session,this.dialect,this.withList).setToken(this.authToken)}},KN=class extends gM{constructor(e,t,n,r,i){super(),this.session=n,this.dialect=r,this.config={set:t,table:e,withList:i,joins:[]},this.tableName=SM(e),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{}}static[X]=`PgUpdate`;config;tableName;joinsNotNullableMap;cacheConfig;from(e){let t=e,n=SM(t);return typeof n==`string`&&(this.joinsNotNullableMap[n]=!0),this.config.from=t,this}getTableLikeFields(e){return Z(e,FM)?e[Q.Symbol.Columns]:Z(e,Oj)?e._.selectedFields:e[Pj].selectedFields}createJoin(e){return(t,n)=>{let r=SM(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,Jj)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[Q.Symbol.Columns],new bN({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})),e&&new Proxy(e,new bN({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=SM(this.config.from);if(typeof t==`string`&&this.config.from&&!Z(this.config.from,Jj)){let n=this.getTableLikeFields(this.config.from);e[t]=n}for(let t of this.config.joins){let n=SM(t.table);if(typeof n==`string`&&!Z(t.table,Jj)){let r=this.getTableLikeFields(t.table);e[n]=r}}}return this.config.returningFields=e,this.config.returning=_M(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:BN(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 bN({alias:Uj(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},qN=class e extends Jj{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})}},JN=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 YN(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},`many`)}findFirst(e){return new YN(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},`first`)}},YN=class extends gM{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 Nj.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=>yN(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 Nj.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(void 0,this.authToken))}},XN=class extends gM{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}},ZN=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 JN(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 zN(n.dialect))),new Proxy(new kj(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new bN({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}};$count(e,t){return new qN({source:e,filters:t,session:this.session})}$cache;with(...e){let t=this;function n(n){return new ON({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e})}function r(n){return new ON({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})}function i(n,r){return new ON({fields:r??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:{on:n}})}function a(n){return new GN(n,t.session,t.dialect,e)}function o(n){return new HN(n,t.session,t.dialect,e)}function s(n){return new VN(n,t.session,t.dialect,e)}return{select:n,selectDistinct:r,selectDistinctOn:i,update:a,insert:o,delete:s}}select(e){return new ON({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new ON({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(e,t){return new ON({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:{on:e}})}update(e){return new GN(e,this.session,this.dialect)}insert(e){return new HN(e,this.session,this.dialect)}delete(e){return new VN(e,this.session,this.dialect)}refreshMaterializedView(e){return new WN(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 XN(()=>r.execute(void 0,this.authToken),t,n,e=>r.mapResult(e,!0))}transaction(e,t){return this.session.transaction(e,t)}},QN=class{static[X]=`Cache`},$N=class extends QN{strategy(){return`all`}static[X]=`NoopCache`;async get(e){}async put(e,t,n,r){}async onMutate(e){}};async function eP(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 tP=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,$N)||this.queryMetadata===void 0)try{return await n()}catch(n){throw new dM(e,t,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await n()}catch(n){throw new dM(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 dM(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new dM(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await eP(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 dM(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await eP(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 dM(e,t,n)}}},nP=class{constructor(e){this.dialect=e}static[X]=`PgSession`;execute(e,t){return Nj.startActiveSpan(`drizzle.operation`,()=>{let n=Nj.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)}},rP=class extends ZN{constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}static[X]=`PgTransaction`;rollback(){throw new fM}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 iP(e){return typeof e==`string`&&/^true$/i.test(e)}function aP(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&&iP(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case oj.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:oj.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&iP(e)&&{accessMode:Xx.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var oP=class extends tP{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=tM(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=tM(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},sP=class e extends nP{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 hM}prepareQuery(e,t,n,r,i){return new oP(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 cj(this.client,async r=>{let i=new e(r,this.dialect,this.schema,this.options),a=new cP(this.dialect,i,this.schema);return n&&await a.setTransaction(n),t(a)})}},cP=class e extends rP{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 lj(this.session.client,``,async n=>{let r=new sP(n,this.dialect,this.schema,this.session.options),i=new e(this.dialect,r,this.schema);return t(i)})}},lP=class extends ZN{static[X]=`DuckDBWasmDatabase`};function uP(e,t={}){let n=new EN({casing:t.casing}),r;t.logger===!0?r=new mM:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=mN(t.schema,vN);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new sP(e,n,i,{logger:r}),o=new lP(n,a,i);return o.$client=e,o}function dP(e,t){let n=aP(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await FA();switch(e){case`browser`:return(await C(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 C(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-TVB6v_2U.js`);return{getImportUrlBundles:e}},__vite__mapDeps([7,6]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await FA();switch(e){case`browser`:return(await C(async()=>{let{getBundles:e}=await import(`./default-browser-CS6ZmB8h.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await C(async()=>{let{getBundles:e}=await import(`./default-node-BdKlRQ9_.js`);return{getBundles:e}},__vite__mapDeps([3,1,2]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return uP(sj({bundles:r,logger:n.logger?new rS:void 0,storage:n.storage}),t)}function fP(...e){if(typeof e[0]==`string`)return dP(e[0],e[1]);if(CM(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return uP(n,r);if(typeof t==`string`)return dP(t,r);if(t===void 0)throw Error(`connection option is required`);return uP(sj({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return uP(e[0],e[1])}(function(e){function t(e){return uP({options:{parsers:{},serializers:{}}},e)}e.mock=t})(fP||={});var pP=Te({__name:`DirectionalLightHelper`,props:{directionalLight:{}},setup(e){let t=e,{scene:n}=Se(),r=Fe(()=>t.directionalLight);return Ee(async()=>{await he(r).toBeTruthy(),n.value.add(new T(t.directionalLight,1))}),(e,t)=>ke(e.$slots,`default`)}}),mP=pP;const hP=[`position`,`intensity`],gP=[`position`,`rotation`,`intensity`],_P=[`intensity`];var vP=Te({__name:`VRM`,props:{modelSrc:{},modelFile:{}},emits:[`loadModelProgress`,`error`],setup(e,{expose:t,emit:n}){let r=e,i=n,{x:a,y:o}=pe(),s=Ne(),{width:c,height:l}=fe(s),{cameraFOV:u,cameraPosition:d,cameraDistance:f,modelOrigin:p,trackingMode:m,lookAtTarget:h,eyeHeight:g,directionalLightPosition:_,directionalLightRotation:v,directionalLightIntensity:y,ambientLightIntensity:b,hemisphereLightPosition:x,hemisphereLightIntensity:C}=w(He()),T=Ne(),E=Pe(new O),D=Pe(),A=Pe(),j=!0,ee=Ne(!1),te=Ne(!1),F=Ne(!1),re=new M,ie=new N;Ae(u,e=>{E.value&&(E.value.fov=e,E.value.updateProjectionMatrix())}),Ae(()=>D.value?.controls,e=>{if(e&&E.value){ee.value=!0;let t=()=>{if(j)return;j=!0;let e=E.value.position,t=D.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),j=!1};e.addEventListener(`change`,t),De(()=>{e.removeEventListener(`change`,t)})}});function le(){te.value=!0}Ae([ee,te],([e,t])=>{if(e&&t&&E.value&&D.value&&D.value.controls){j=!0;try{E.value.aspect=c.value/l.value,E.value.fov=u.value,D.value.setTarget(p.value),E.value.position.set(d.value.x,d.value.y,d.value.z),E.value.updateProjectionMatrix(),D.value.controls.update(),f.value=D.value.controls.getDistance()}finally{j=!1,F.value=!0}}}),Ae(f,e=>{if(!j&&E.value&&D.value&&D.value.controls){j=!0;let t=new P,n=D.value.controls.target,r=new P().subVectors(E.value.position,n).normalize();t.copy(n).addScaledVector(r,e),E.value.position.set(t.x,t.y,t.z),D.value.update(),d.value={x:t.x,y:t.y,z:t.z}}j=!1});function ue(e){T.value?.lookAtUpdate(e),h.value=e}function de(e,t){ie.x=e/window.innerWidth*2-1,ie.y=-(t/window.innerHeight)*2+1,re.setFromCamera(ie,E.value);let n=new P;E.value.getWorldDirection(n);let r=new k;r.setFromNormalAndCoplanarPoint(n,E.value.position.clone().add(n.multiplyScalar(1)));let i=new P;re.ray.intersectPlane(r,i),h.value={x:i.x,y:i.y,z:i.z},T.value?.lookAtUpdate(h.value)}return Ae(d,e=>{!F.value||!T.value||m.value===`camera`&&ue(e)},{deep:!0}),Ae([a,o],()=>{!F.value||!T.value||m.value===`mouse`&&de(a.value,o.value)}),Ae(m,e=>{!F.value||!T.value||(e===`camera`?ue(d.value):e===`mouse`?de(a.value,o.value):h.value={x:0,y:g.value,z:-1e3})}),t({setExpression:e=>{T.value?.setExpression(e)}}),(e,t)=>(Oe(),ce(`div`,{ref_key:`vrmContainerRef`,ref:s,w:`100%`,h:`100%`},[E.value?Me((Oe(),oe(Ie(be),{key:0,camera:E.value,antialias:!0,width:Ie(c),height:Ie(l)},{default:je(()=>[S(Ie(XP),{ref_key:`controlsRef`,ref:D},null,512),ae(`TresHemisphereLight`,{color:16777215,position:[Ie(x).x,Ie(x).y,Ie(x).z],intensity:Ie(C),"cast-shadow":``},null,8,hP),ae(`TresDirectionalLight`,{ref_key:`directionalLightRef`,ref:A,color:16777215,position:[Ie(_).x,Ie(_).y,Ie(_).z],rotation:[Ie(v).x,Ie(v).y,Ie(v).z],intensity:Ie(y),"cast-shadow":``},null,8,gP),S(mP,{"directional-light":A.value},null,8,[`directional-light`]),ae(`TresAmbientLight`,{color:16777215,intensity:Ie(b),"cast-shadow":``},null,8,_P),S(Ie(TP),{ref_key:`modelRef`,ref:T,"model-src":r.modelSrc,"model-file":r.modelFile,"idle-animation":`/assets/vrm/animations/idle_loop.vrma`,paused:!1,onLoadModelProgress:t[0]||=e=>i(`loadModelProgress`,e),onModelReady:le,onError:t[1]||=e=>i(`error`,e)},null,8,[`model-src`,`model-file`]),t[2]||=ae(`TresAxesHelper`,{size:1},null,-1)]),_:1,__:[2]},8,[`camera`,`width`,`height`])),[[ne,F.value]]):se(``,!0)],512))}}),yP=vP;const bP={relative:``},xP={"h-full":``,"w-full":``};var SP=Te({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:{},xOffset:{},yOffset:{},scale:{default:1}},setup(e){let t=Ne(),n=Ne(),{stageView:r,stageViewControlsEnabled:i,live2dDisableFocus:a}=w(Ue()),{mouthOpenSize:o}=w(g()),{audioContext:s,calculateVolume:c}=h(),{onBeforeMessageComposed:l,onBeforeSend:m,onTokenLiteral:_,onTokenSpecial:S,onStreamEnd:C,onAssistantResponseEnd:T}=Ke(),E=Ye(),{modelFile:D,modelUrl:O}=w(We()),{modelFile:k,modelUrl:A}=w(He()),j=Ne(),M=Ne(!1),ee=Ne(!1),te=p({handlers:[e=>new Promise(t=>{let n=s.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(s.destination),n.connect(j.value),M.value=!0,n.start(0),n.onended=()=>{M.value=!1,t()}})]}),N=qe(),{ssmlEnabled:P,activeSpeechProvider:F,activeSpeechModel:ne,activeSpeechVoice:re,pitch:ie}=w(N);async function le(e){try{if(!F.value){console.warn(`No active speech provider configured`);return}if(!re.value){console.warn(`No active speech voice configured`);return}let t=await E.getProviderInstance(F.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=E.getProviderConfig(F.value),r=P.value?N.generateSSML(e.data,re.value,{...n,pitch:ie.value}):e.data,i=await Je({...t.speech(ne.value,n),input:r,voice:re.value.id}),a=await s.decodeAudioData(i);await te.add({audioBuffer:a,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let ue=p({handlers:[le]});ue.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let de=f(ue),{currentMotion:fe}=w(We()),pe=p({handlers:[async e=>{if(r.value===`3d`){let t=b[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(fe.value={group:y[e.data]})}]}),me=d(pe);me.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let he=u();he.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function ge(){requestAnimationFrame(ge),M.value&&(o.value=c(j.value,`linear`))}function _e(){ee.value||(ge(),s.resume(),ee.value=!0)}function ve(){j.value||=s.createAnalyser()}return l(async()=>{ve(),_e()}),m(async()=>{fe.value={group:x}}),_(async e=>{await de.add(e)}),S(async e=>{await he.add(e),await me.add(e)}),C(async()=>{await he.add(v)}),T(async e=>{}),De(()=>{ee.value=!1}),Ee(async()=>{t.value=fP({connection:{bundles:Xe()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(e,t)=>(Oe(),ce(`div`,bP,[ae(`div`,xP,[Ie(r)===`2d`?(Oe(),oe(Rf,{key:0,"min-w":`50% u.modelSrc),h=Fe(()=>u.modelFile),g=me(h),_=ie(()=>g.value?g.value:m.value?m.value:``),v=Ne(),y=Ne(),{scene:b}=Se(),{onBeforeRender:x}=xe(),S=a(),C=Ne(),T=He(),{modelOffset:E,modelOrigin:O,modelSize:k,cameraPosition:j,modelRotationY:M,lookAtTarget:ee,eyeHeight:te,trackingMode:N}=w(T),ne=Ne(),re=o();async function ae(){await he(p).not.toBeTruthy(),p.value=!0;try{if(!b.value){console.warn(`Scene is not ready, cannot load VRM model.`);return}v.value&&ce();try{let e=await n(_.value,{scene:b.value,lookAt:!0,positionOffset:[E.value.x,E.value.y,E.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;ne.value=o,j.value={x:s.x+l.x,y:s.y+l.y,z:s.z+l.z},O.value={x:s.x,y:s.y,z:s.z},k.value={x:c.x,y:c.y,z:c.z};let p=new P(0,0,-1),m=a.lookAt,h=new A;if(m){let e=m.faceFront;h.setFromUnitVectors(e.normalize(),p.normalize()),o.quaternion.premultiply(h),o.updateMatrixWorld(!0)}else console.warn(`No look-at target found in VRM model`);M.value=0;function g(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 P;t.getWorldPosition(n);let r=e.tracks.find(e=>e.name.endsWith(`Hips.position`));if(!(r instanceof F)){console.warn(`No Hips.position track of type VectorKeyframeTrack found in animation.`);return}let i=new P(r.values[0],r.values[1],r.values[2]),o=new P().subVectors(i,n);e.tracks.forEach(e=>{if(e.name.endsWith(`.position`)&&e instanceof F)for(let t=0;t{y.value?.update(e),v.value?.update(e),v.value?.lookAt?.update?.(e),S.update(v.value,e),re.update(v.value,ee,e),C.value?.update(e)}).off}catch(e){d(`error`,e)}}catch(e){console.error(e)}finally{p.value=!1}}Ae(E,()=>{ne.value&&ne.value.position.set(E.value.x,E.value.y,E.value.z)},{deep:!0}),Ae(M,e=>{v.value&&ne.value&&(ne.value.rotation.y=D.degToRad(e))}),Ae(_,e=>{e&&ae()});let{pause:oe,resume:se}=xe();Ae(()=>u.paused,e=>e?oe():se());function ce(){f?.(),v.value&&(v.value.scene.removeFromParent(),s.deepDispose(v.value.scene))}return Ee(async()=>await ae()),De(()=>ce()),c({setExpression(e){C.value?.setEmotionWithResetAfter(e,1e3)},scene:ie(()=>v.value?.scene),lookAtUpdate(e){re.instantUpdate(v.value,e)}}),(e,t)=>ke(e.$slots,`default`)}}),TP=wP;const EP={type:`change`},DP={type:`start`},OP={type:`end`},kP=new j,AP=new k,jP=Math.cos(70*D.DEG2RAD),MP=new P,NP=2*Math.PI,PP={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},FP=1e-6;var IP=class extends we{constructor(e,t=null){super(e,t),this.state=PP.NONE,this.target=new P,this.cursor=new P,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:E.ROTATE,MIDDLE:E.DOLLY,RIGHT:E.PAN},this.touches={ONE:te.ROTATE,TWO:te.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new P,this._lastQuaternion=new A,this._lastTargetPosition=new P,this._quat=new A().setFromUnitVectors(e.up,new P(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new ee,this._sphericalDelta=new ee,this._scale=1,this._panOffset=new P,this._rotateStart=new N,this._rotateEnd=new N,this._rotateDelta=new N,this._panStart=new N,this._panEnd=new N,this._panDelta=new N,this._dollyStart=new N,this._dollyEnd=new N,this._dollyDelta=new N,this._dollyDirection=new P,this._mouse=new N,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=RP.bind(this),this._onPointerDown=LP.bind(this),this._onPointerUp=zP.bind(this),this._onContextMenu=KP.bind(this),this._onMouseWheel=HP.bind(this),this._onKeyDown=UP.bind(this),this._onTouchStart=WP.bind(this),this._onTouchMove=GP.bind(this),this._onMouseDown=BP.bind(this),this._onMouseMove=VP.bind(this),this._interceptControlDown=qP.bind(this),this._interceptControlUp=JP.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(EP),this.update(),this.state=PP.NONE}update(e=null){let t=this.object.position;MP.copy(t).sub(this.target),MP.applyQuaternion(this._quat),this._spherical.setFromVector3(MP),this.autoRotate&&this.state===PP.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+=NP:n>Math.PI&&(n-=NP),r<-Math.PI?r+=NP:r>Math.PI&&(r-=NP),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(MP.setFromSpherical(this._spherical),MP.applyQuaternion(this._quatInverse),t.copy(this.target).add(MP),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=MP.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 P(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 P(this._mouse.x,this._mouse.y,0);r.unproject(this.object),this.object.position.sub(r).add(t),this.object.updateMatrixWorld(),e=MP.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):(kP.origin.copy(this.object.position),kP.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(kP.direction))FP||8*(1-this._lastQuaternion.dot(this.object.quaternion))>FP||this._lastTargetPosition.distanceToSquared(this.target)>FP?(this.dispatchEvent(EP),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e===null?NP/60/60*this.autoRotateSpeed:NP/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){MP.setFromMatrixColumn(t,0),MP.multiplyScalar(-e),this._panOffset.add(MP)}_panUp(e,t){this.screenSpacePanning===!0?MP.setFromMatrixColumn(t,1):(MP.setFromMatrixColumn(t,0),MP.crossVectors(this.object.up,MP)),MP.multiplyScalar(e),this._panOffset.add(MP)}_pan(e,t){let n=this.domElement;if(this.object.isPerspectiveCamera){let r=this.object.position;MP.copy(r).sub(this.target);let i=MP.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(NP*this._rotateDelta.x/t.clientHeight),this._rotateUp(NP*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(NP*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(-NP*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(NP*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(-NP*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(NP*this._rotateDelta.x/t.clientHeight),this._rotateUp(NP*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 IP(n.value,r.value.domElement),i.value.enableDamping=!0,i.value.dampingFactor=.5,i.value.mouseButtons={LEFT:E.ROTATE,MIDDLE:E.DOLLY,RIGHT:E.PAN},i.value.touches={ONE:te.ROTATE,TWO:te.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)=>ke(e.$slots,`default`)}}),XP=YP;export{CP as b,yP as c,iA as d,hk as e,rk as f,Rf as g,Af as h,kf as i,Il as j}; \ No newline at end of file diff --git a/assets/Textarea-Q_8nrbKN.js b/assets/Textarea-rGc1yvjC.js similarity index 66% rename from assets/Textarea-Q_8nrbKN.js rename to assets/Textarea-rGc1yvjC.js index ea32c37c81b65856358162dabeff7e4f8027dee0..03962f37c72754257343b2812e2b3184850b327e 100644 --- a/assets/Textarea-Q_8nrbKN.js +++ b/assets/Textarea-rGc1yvjC.js @@ -1 +1 @@ -import{b as e}from"./Basic-BfTEEIor.js";import{d$ as t,dW as n,e7 as r,ec as i}from"./index-B9WIljdS.js";var a=t({__name:`Textarea`,props:{modelValue:{default:``},modelModifiers:{}},emits:[`update:modelValue`],setup(t){let a=i(t,`modelValue`);return(t,i)=>(r(),n(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-BgQfJAar.js";import{dX as t,e0 as n,e8 as r,ed as i}from"./index-BIGBQG2E.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_-B1JTxHeH.js b/assets/_...all_-B1JTxHeH.js new file mode 100644 index 0000000000000000000000000000000000000000..611517248ca7bb346b5ca1997e2bd3a789e2ef1b --- /dev/null +++ b/assets/_...all_-B1JTxHeH.js @@ -0,0 +1 @@ +import{cj as e,d$ as t,d7 as n,dW as r,dZ as i,d_ as a,e0 as o,e8 as s,eg as c,en as l}from"./index-BIGBQG2E.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=n();return(n,o)=>(s(),i(`div`,u,[o[2]||=r(`div`,{"text-3xl":``},` Where are we? `,-1),r(`div`,null,[t(l(e),{onClick:o[0]||=e=>l(d).go(-1)},{default:c(()=>o[1]||=[a(` Go Back `,-1)]),_:1,__:[1]})])]))}}),f=d;export{f as default}; \ No newline at end of file diff --git a/assets/_...all_-C6f1CqAg.js b/assets/_...all_-C6f1CqAg.js deleted file mode 100644 index b7d2da76b2befd2623fa05a2b6e5eccbb052b7a2..0000000000000000000000000000000000000000 --- a/assets/_...all_-C6f1CqAg.js +++ /dev/null @@ -1 +0,0 @@ -import{cj as e,d$ as t,d6 as n,dV as r,dY as i,dZ as a,d_ as o,e7 as s,ef as c,em as l}from"./index-B9WIljdS.js";const u={"h-full":``,"w-full":``,flex:``,"flex-col":``,"items-center":``,"justify-center":``,"gap-4":``};var d=t({__name:`[...all]`,setup(t){let d=n();return(t,n)=>(s(),i(`div`,u,[n[2]||=r(`div`,{"text-3xl":``},` Where are we? `,-1),r(`div`,null,[o(l(e),{onClick:n[0]||=e=>l(d).go(-1)},{default:c(()=>n[1]||=[a(` Go Back `,-1)]),_:1,__:[1]})])]))}}),f=d;export{f as default}; \ No newline at end of file diff --git a/assets/__vite-browser-external-CLt_IrJn.js b/assets/__vite-browser-external-CLt_IrJn.js new file mode 100644 index 0000000000000000000000000000000000000000..ee8754c88e037157253235ddd30f8d15ca38f296 --- /dev/null +++ b/assets/__vite-browser-external-CLt_IrJn.js @@ -0,0 +1 @@ +import{es as e}from"./index-BIGBQG2E.js";var t=e(((exports,t)=>{t.exports={}}));export default t(); \ No newline at end of file diff --git a/assets/__vite-browser-external-D71AMOyU.js b/assets/__vite-browser-external-D71AMOyU.js deleted file mode 100644 index 85af3e98d5f67e7ec584fcd5d4445c1835dd5e47..0000000000000000000000000000000000000000 --- a/assets/__vite-browser-external-D71AMOyU.js +++ /dev/null @@ -1 +0,0 @@ -import{er as e}from"./index-B9WIljdS.js";var t=e(((exports,t)=>{t.exports={}}));export default t(); \ No newline at end of file diff --git a/assets/airi-card-CwVG5sxe.js b/assets/airi-card-CwVG5sxe.js deleted file mode 100644 index d3d730367702ac88e286bc7b1085dc23d0a99148..0000000000000000000000000000000000000000 --- a/assets/airi-card-CwVG5sxe.js +++ /dev/null @@ -1 +0,0 @@ -import{b as e}from"./DeleteCardDialog-DXxjLYbx.js";import"./DialogTitle-4J3ZFQI8.js";import{b as t}from"./InputFile-CXpzJde3.js";import{A as n,cI as r,cn as ee,d$ as i,d8 as a,dP as o,dS as s,dU as c,dV as l,dW as u,dX as d,dY as f,dZ as p,d_ as m,e7 as h,e8 as g,eb as _,ee as v,ef as y,eg as b,ei as x,em as S,en as C,eq as w,u as T}from"./index-B9WIljdS.js";import{b as E}from"./route-block-gWR0cCIm.js";import{b as D}from"./CardCreate-CutGwari.js";import{b as O}from"./CardCreationDialog-BYY8X8ME.js";import{b as te}from"./CardDetailDialog-CcoHJxL0.js";import{b as ne}from"./CardListItem-BJ53NvW9.js";const re={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ie={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},ae={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},oe=[`placeholder`],k={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},A={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},j={key:0,flex:``,"flex-col":``,"items-center":``},M={"font-medium":``,text:`neutral-600 dark:neutral-300`},N={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},P={key:1,flex:``,"flex-col":``,"items-center":``},F={"font-medium":``,text:`primary-600 dark:primary-300`},I={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`},L={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var R=i({__name:`index`,setup(i){let{t:E}=n(),R=T(),{addCard:z,removeCard:B}=R,{cards:V,activeCardId:H}=a(R),U=x(``),W=x(!1),G=x(!1),K=x(``),q=x(`nameAsc`),J=x([]);v(J,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);U.value=z(n),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=c(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),se=c(()=>{if(!K.value)return Y.value;let e=K.value.toLowerCase();return Y.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),X=c(()=>{let e=[...se.value];return q.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):q.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):q.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),Z=x(!1),Q=x(null);function ce(){Q.value&&(B(Q.value),Q.value=null,Z.value=!1)}function le(e){Q.value=e,Z.value=!0}function ue(e){U.value=e,W.value=!0}function de(){G.value=!0}function fe(e){H.value=e}function pe(e){let t=V.value.get(e);return t?.version||`1.0.0`}function $(e,t){let n=V.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(n,i)=>{let a=_(`motion`);return h(),f(s,null,[l(`div`,re,[l(`div`,ie,[l(`div`,ae,[i[7]||=l(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[l(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),b(l(`input`,{"onUpdate:modelValue":i[0]||=e=>K.value=e,type:`search`,class:`w-full rounded-xl p-2.5 pl-10 text-sm outline-none`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,bg:`white dark:neutral-900`,placeholder:S(E)(`settings.pages.card.search`)},null,8,oe),[[o,K.value]])]),l(`div`,k,[l(`div`,A,w(S(E)(`settings.pages.card.sort_by`))+`: `,1),m(S(r),{modelValue:q.value,"onUpdate:modelValue":i[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:S(E)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:S(E)(`settings.pages.card.name_desc`)},{value:`recent`,label:S(E)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),l(`div`,{class:C([`mt-4`,{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":S(V).size>0}])},[m(S(t),{modelValue:J.value,"onUpdate:modelValue":i[2]||=e=>J.value=e,accept:`*.json`},{default:y(({isDragging:e})=>[e?(h(),f(`div`,P,[i[9]||=l(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),l(`p`,F,w(S(E)(`settings.pages.card.drop_here`)),1)])):(h(),f(`div`,j,[i[8]||=l(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),l(`p`,M,w(S(E)(`settings.pages.card.upload`)),1),l(`p`,N,w(S(E)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),m(D,{onClick:de}),S(V).size>0?(h(!0),f(s,{key:0},g(X.value,e=>(h(),u(ne,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===S(H),"is-selected":e.id===U.value&&W.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)):d(``,!0),S(V).size===0?(h(),f(`div`,I,[i[10]||=l(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),l(`p`,null,w(S(E)(`settings.pages.card.no_cards`)),1)])):d(``,!0),K.value&&X.value.length===0?(h(),u(S(ee),{key:2,type:`warning`},{title:y(()=>[p(w(S(E)(`settings.pages.card.no_results`)),1)]),content:y(()=>[p(w(S(E)(`settings.pages.card.try_different_search`)),1)]),_:1})):d(``,!0)],2)]),m(e,{modelValue:Z.value,"onUpdate:modelValue":i[3]||=e=>Z.value=e,"card-name":Q.value?S(R).getCard(Q.value)?.name:``,onConfirm:ce,onCancel:i[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),m(te,{modelValue:W.value,"onUpdate:modelValue":i[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),m(O,{modelValue:G.value,"onUpdate:modelValue":i[6]||=e=>G.value=e},null,8,[`modelValue`]),b((h(),f(`div`,L,i[11]||=[l(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[a]])],64)}}});typeof E==`function`&&E(R);var z=R;export{z as default}; \ No newline at end of file diff --git a/assets/airi-card-Deid7cRS.js b/assets/airi-card-Deid7cRS.js new file mode 100644 index 0000000000000000000000000000000000000000..5fb7f09a3e46959c6eefecdce7a6102c099f962f --- /dev/null +++ b/assets/airi-card-Deid7cRS.js @@ -0,0 +1 @@ +import{b as e}from"./DeleteCardDialog-C5wCNpwE.js";import"./DialogTitle-icfnGx6M.js";import{b as t}from"./InputFile-BcSJOVRJ.js";import{A as n,cJ as r,cn as i,d$ as a,d9 as o,dQ as s,dT as c,dV as l,dW as u,dX as d,dY as f,dZ as p,d_ as m,e0 as h,e8 as g,e9 as _,ec as v,ef as y,eg as b,eh as x,ej as S,en as C,eo as w,er as T,u as E}from"./index-BIGBQG2E.js";import{b as D}from"./route-block-gWR0cCIm.js";import{b as O}from"./CardCreate-DfNbL4BD.js";import{b as ee}from"./CardCreationDialog-CUhrihgO.js";import{b as te}from"./CardDetailDialog-dVpnsyGs.js";import{b as ne}from"./CardListItem-jWaHBlBm.js";const re={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ie={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},ae={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},oe=[`placeholder`],k={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},A={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},j={key:0,flex:``,"flex-col":``,"items-center":``},M={"font-medium":``,text:`neutral-600 dark:neutral-300`},N={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},P={key:1,flex:``,"flex-col":``,"items-center":``},F={"font-medium":``,text:`primary-600 dark:primary-300`},I={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`},L={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var R=h({__name:`index`,setup(h){let{t:D}=n(),R=E(),{addCard:z,removeCard:B}=R,{cards:V,activeCardId:H}=o(R),U=S(``),W=S(!1),G=S(!1),K=S(``),q=S(`nameAsc`),J=S([]);y(J,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);U.value=z(n),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=l(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),se=l(()=>{if(!K.value)return Y.value;let e=K.value.toLowerCase();return Y.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),X=l(()=>{let e=[...se.value];return q.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):q.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):q.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),Z=S(!1),Q=S(null);function ce(){Q.value&&(B(Q.value),Q.value=null,Z.value=!1)}function le(e){Q.value=e,Z.value=!0}function ue(e){U.value=e,W.value=!0}function de(){G.value=!0}function fe(e){H.value=e}function pe(e){let t=V.value.get(e);return t?.version||`1.0.0`}function $(e,t){let n=V.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(n,o)=>{let l=v(`motion`);return g(),p(c,null,[u(`div`,re,[u(`div`,ie,[u(`div`,ae,[o[7]||=u(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[u(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),x(u(`input`,{"onUpdate:modelValue":o[0]||=e=>K.value=e,type:`search`,class:`w-full rounded-xl p-2.5 pl-10 text-sm outline-none`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,bg:`white dark:neutral-900`,placeholder:C(D)(`settings.pages.card.search`)},null,8,oe),[[s,K.value]])]),u(`div`,k,[u(`div`,A,T(C(D)(`settings.pages.card.sort_by`))+`: `,1),a(C(r),{modelValue:q.value,"onUpdate:modelValue":o[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:C(D)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:C(D)(`settings.pages.card.name_desc`)},{value:`recent`,label:C(D)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),u(`div`,{class:w([`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))]":C(V).size>0}])},[a(C(t),{modelValue:J.value,"onUpdate:modelValue":o[2]||=e=>J.value=e,accept:`*.json`},{default:b(({isDragging:e})=>[e?(g(),p(`div`,P,[o[9]||=u(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),u(`p`,F,T(C(D)(`settings.pages.card.drop_here`)),1)])):(g(),p(`div`,j,[o[8]||=u(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),u(`p`,M,T(C(D)(`settings.pages.card.upload`)),1),u(`p`,N,T(C(D)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),a(O,{onClick:de}),C(V).size>0?(g(!0),p(c,{key:0},_(X.value,e=>(g(),d(ne,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===C(H),"is-selected":e.id===U.value&&W.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)):f(``,!0),C(V).size===0?(g(),p(`div`,I,[o[10]||=u(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),u(`p`,null,T(C(D)(`settings.pages.card.no_cards`)),1)])):f(``,!0),K.value&&X.value.length===0?(g(),d(C(i),{key:2,type:`warning`},{title:b(()=>[m(T(C(D)(`settings.pages.card.no_results`)),1)]),content:b(()=>[m(T(C(D)(`settings.pages.card.try_different_search`)),1)]),_:1})):f(``,!0)],2)]),a(e,{modelValue:Z.value,"onUpdate:modelValue":o[3]||=e=>Z.value=e,"card-name":Q.value?C(R).getCard(Q.value)?.name:``,onConfirm:ce,onCancel:o[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),a(te,{modelValue:W.value,"onUpdate:modelValue":o[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),a(ee,{modelValue:G.value,"onUpdate:modelValue":o[6]||=e=>G.value=e},null,8,[`modelValue`]),x((g(),p(`div`,L,o[11]||=[u(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[l]])],64)}}});typeof D==`function`&&D(R);var z=R;export{z as default}; \ No newline at end of file diff --git a/assets/alibaba-cloud-model-studio-CDh_4wmt.js b/assets/alibaba-cloud-model-studio-7ap18Fo0.js similarity index 71% rename from assets/alibaba-cloud-model-studio-CDh_4wmt.js rename to assets/alibaba-cloud-model-studio-7ap18Fo0.js index bbbda1cf3f730e6e43297df257dd75ededcd9be3..a8b10bd78ee565307c51e212e643e12015a7daf5 100644 --- a/assets/alibaba-cloud-model-studio-CDh_4wmt.js +++ b/assets/alibaba-cloud-model-studio-7ap18Fo0.js @@ -1 +1 @@ -import{A as e,cN as t,d$ as n,d8 as r,dU as i,dV as a,dW as o,d_ as s,e as c,e5 as l,e7 as u,ee as d,ef as f,ei as p,em as m,f as h,v as g,y as _}from"./index-B9WIljdS.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=n({__name:`alibaba-cloud-model-studio`,setup(n){let v={speed:1},S=p(0),C=p(1),w=p(0),T=g(),E=_(),{providers:D}=r(E),{t:O}=e(),k=i(()=>!!D.value[b]?.apiKey),A=i(()=>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 l(async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)}),d(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),d(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),d(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),d(D,async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,n)=>(u(),o(m(c),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":f(()=>[a(`div`,y,[s(m(t),{modelValue:S.value,"onUpdate:modelValue":n[0]||=e=>S.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:m(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`]),s(m(t),{modelValue:C.value,"onUpdate:modelValue":n[1]||=e=>C.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),s(m(t),{modelValue:w.value,"onUpdate:modelValue":n[2]||=e=>w.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:m(O)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:f(()=>[s(m(h),{"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{A as e,cO as t,d$ as n,d9 as r,dV as i,dW as a,dX as o,e as s,e0 as c,e6 as l,e8 as u,ef as d,eg as f,ej as p,en as m,f as h,v as g,y as _}from"./index-BIGBQG2E.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=c({__name:`alibaba-cloud-model-studio`,setup(c){let v={speed:1},S=p(0),C=p(1),w=p(0),T=g(),E=_(),{providers:D}=r(E),{t:O}=e(),k=i(()=>!!D.value[b]?.apiKey),A=i(()=>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 l(async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)}),d(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),d(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),d(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),d(D,async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,r)=>(u(),o(m(s),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":f(()=>[a(`div`,y,[n(m(t),{modelValue:S.value,"onUpdate:modelValue":r[0]||=e=>S.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:m(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`]),n(m(t),{modelValue:C.value,"onUpdate:modelValue":r[1]||=e=>C.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:m(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),n(m(t),{modelValue:w.value,"onUpdate:modelValue":r[2]||=e=>w.value=e,label:m(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:m(O)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:f(()=>[n(m(h),{"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-CM4lGj4P.js b/assets/anthropic-5AYt9HNX.js similarity index 67% rename from assets/anthropic-CM4lGj4P.js rename to assets/anthropic-5AYt9HNX.js index faacbb43f3c40f3a66afde1dcaf67d2eba06669f..2d0e2bf99972bd2427adbebc3f80c2d35f9fb5d5 100644 --- a/assets/anthropic-CM4lGj4P.js +++ b/assets/anthropic-5AYt9HNX.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dV as a,dW as o,dZ as s,d_ as c,e5 as l,e7 as u,ee as d,ef as f,em as p,eq as m,g as h,h as g,i as _,j as v,k as y,l as b,y as x}from"./index-B9WIljdS.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=t({__name:`anthropic`,setup(t){let{t:S}=e(),D=n(),O=x(),{providers:k}=r(O),A=i(()=>O.getProviderMetadata(E)),j=i({get:()=>k.value[E]?.apiKey||``,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=i({get:()=>k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});l(()=>{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/`}),d([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)=>(u(),o(p(h),{"provider-name":A.value?.localizedName||`Anthropic | Claude`,"provider-icon":A.value?.icon,"on-back":()=>p(D).back()},{default:f(()=>[a(`div`,C,[a(`h2`,w,m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),a(`p`,null,[s(m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),a(`a`,T,m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),s(`, `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),t[2]||=a(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),s(` `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),a(`p`,null,[s(m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),t[3]||=a(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),s(` `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),c(p(g),null,{default:f(()=>[c(p(_),{title:p(S)(`settings.pages.providers.common.section.basic.title`),description:p(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:f(()=>[c(p(y),{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`]),c(p(b),{title:p(S)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[c(p(v),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dW as a,dX as o,d_ as s,e0 as c,e6 as l,e8 as u,ef as d,eg as f,en as p,er as m,g as h,h as g,i as _,j as v,k as y,l as b,y as x}from"./index-BIGBQG2E.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=c({__name:`anthropic`,setup(c){let{t:S}=e(),D=n(),O=x(),{providers:k}=r(O),A=i(()=>O.getProviderMetadata(E)),j=i({get:()=>k.value[E]?.apiKey||``,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=i({get:()=>k.value[E]?.baseUrl||`https://api.anthropic.com/v1/`,set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});l(()=>{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/`}),d([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,n)=>(u(),o(p(h),{"provider-name":A.value?.localizedName||`Anthropic | Claude`,"provider-icon":A.value?.icon,"on-back":()=>p(D).back()},{default:f(()=>[a(`div`,C,[a(`h2`,w,m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),a(`p`,null,[s(m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),a(`a`,T,m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),s(`, `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),n[2]||=a(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),s(` `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),a(`p`,null,[s(m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),n[3]||=a(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),s(` `+m(p(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),t(p(g),null,{default:f(()=>[t(p(_),{title:p(S)(`settings.pages.providers.common.section.basic.title`),description:p(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:f(()=>[t(p(y),{modelValue:j.value,"onUpdate:modelValue":n[0]||=e=>j.value=e,"provider-name":A.value?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(p(b),{title:p(S)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[t(p(v),{modelValue:M.value,"onUpdate:modelValue":n[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-CK7NAy2u.js b/assets/appearance-CgbkXuYz.js similarity index 62% rename from assets/appearance-CK7NAy2u.js rename to assets/appearance-CgbkXuYz.js index f0a603cfc19f1582cc1aa853fed7270fb97fc4a4..65bb1bc1849d6969e0a4285eb6221f81557f7712 100644 --- a/assets/appearance-CK7NAy2u.js +++ b/assets/appearance-CgbkXuYz.js @@ -1 +1 @@ -import{A as e,cp as t,d$ as n,dS as r,dU as i,dV as a,dW as o,dY as s,e7 as c,e8 as l,eb as u,eg as d,em as f,ep as p}from"./index-B9WIljdS.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=n({__name:`index`,setup(n){let{t:m}=e(),y=i(()=>[{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(e,n)=>{let i=u(`motion`);return c(),s(`div`,h,[n[0]||=a(`div`,null,null,-1),a(`div`,g,[(c(!0),s(r,null,l(y.value,(e,n)=>d((c(),o(f(t),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:p({transitionDelay:`${n*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[i]])),128))]),d((c(),s(`div`,_,[d(a(`div`,v,null,512),[[i]])])),[[i]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file +import{A as e,cp as t,dT as n,dV as r,dW as i,dX as a,dZ as o,e0 as s,e8 as c,e9 as l,ec as u,eh as d,en as f,eq as p}from"./index-BIGBQG2E.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=s({__name:`index`,setup(s){let{t:m}=e(),y=r(()=>[{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(e,r)=>{let s=u(`motion`);return c(),o(`div`,h,[r[0]||=i(`div`,null,null,-1),i(`div`,g,[(c(!0),o(n,null,l(y.value,(e,n)=>d((c(),a(f(t),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:p({transitionDelay:`${n*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[s]])),128))]),d((c(),o(`div`,_,[d(i(`div`,v,null,512),[[s]])])),[[s]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file diff --git a/assets/audio-C3Vjld8K.js b/assets/audio-C3Vjld8K.js new file mode 100644 index 0000000000000000000000000000000000000000..42a985051891ea8a2fc8a93e6cd20b031f026d5d --- /dev/null +++ b/assets/audio-C3Vjld8K.js @@ -0,0 +1 @@ +import{dW as e,dZ as t,e0 as n,e8 as r,ej as i}from"./index-BIGBQG2E.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-D_gw8_qs.js b/assets/audio-D_gw8_qs.js deleted file mode 100644 index 03509a78b8542b0e47aae1160f4ae5cb944af7cd..0000000000000000000000000000000000000000 --- a/assets/audio-D_gw8_qs.js +++ /dev/null @@ -1 +0,0 @@ -import{d$ as e,dV as t,dY as n,e7 as r,ei as i}from"./index-B9WIljdS.js";var a=e({__name:`audio`,setup(e){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(e,i)=>(r(),n(`div`,null,[t(`div`,null,[t(`div`,{ref_key:`containerRef`,ref:a},null,512),t(`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-Fhs1ZD1c.js b/assets/audio-record-DgRdKFoy.js similarity index 67% rename from assets/audio-record-Fhs1ZD1c.js rename to assets/audio-record-DgRdKFoy.js index af6a5ab678edcecad01392433438ad146f4384c9..990026572b8033f09c36f823dc34553ddc9c4fe2 100644 --- a/assets/audio-record-Fhs1ZD1c.js +++ b/assets/audio-record-DgRdKFoy.js @@ -1 +1 @@ -import{cI as e,cj as t,d$ as n,dS as r,dU as i,dV as a,dW as o,dY as s,dZ as c,d_ as l,dd as u,dm as d,dp as f,e1 as p,e3 as m,e5 as h,e6 as g,e7 as _,e8 as v,e9 as y,ee as b,ef as x,eh as S,ei as C,el as w,em as T,eq as E}from"./index-B9WIljdS.js";var D=n({__name:`Option`,props:{value:{},label:{},active:{type:Boolean}},setup(e){let t=e,n=p(`selectOption`),r=p(`hide`);return(e,i)=>(_(),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:i[0]||=()=>{T(n)(t.value),T(r)()}}),[y(e.$slots,`default`,{},()=>[c(E(t.label),1)])],16))}}),O=D;function k(){let e=u({constraints:{audio:!0},requestPermissions:!1}),t=C(e.audioInputs.value[0]?.deviceId||``),n=C(),r=i(()=>e.audioInputs.value),a=C({audio:!0}),o=d({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 f(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=n({__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{cJ as e,cj as t,d$ as n,dT as r,dV as i,dW as a,dX as o,dZ as s,d_ as c,de as l,dn as u,dq as d,e0 as f,e2 as p,e4 as m,e6 as h,e7 as g,e8 as _,e9 as v,ea as y,ef as b,eg as x,ei as S,ej as C,em as w,en as T,er as E}from"./index-BIGBQG2E.js";var D=f({__name:`Option`,props:{value:{},label:{},active:{type:Boolean}},setup(e){let t=e,n=p(`selectOption`),r=p(`hide`);return(e,i)=>(_(),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:i[0]||=()=>{T(n)(t.value),T(r)()}}),[y(e.$slots,`default`,{},()=>[c(E(t.label),1)])],16))}}),O=D;function k(){let e=l({constraints:{audio:!0},requestPermissions:!1}),t=C(e.audioInputs.value[0]?.deviceId||``),n=C(),r=i(()=>e.audioInputs.value),a=C({audio:!0}),o=u({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 d(){o.stop()}return{selectedAudioInputId:t,selectedAudioInput:n,audioInputs:r,start:c,stop:d,request:s,media:o}}function A(e,t=()=>Promise.resolve()){let n=C(),r=w(e);async function i(){if(await t(),await d(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=f({__name:`audio-record`,setup(i){let{audioInputs:l,selectedAudioInputId:u,start:d,stop:f,media:p,request:m}=k(),{startRecord:y,stopRecord:b}=A(p.stream,d);return h(()=>m()),g(()=>f()),(i,f)=>(_(),s(`div`,null,[n(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(l).find(t=>t.deviceId===e)?.label:`Select Audio Input`),1)]),options:x(({hide:e})=>[(_(!0),s(r,null,v(T(l),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,[n(T(t),{onClick:T(y)},{default:x(()=>f[2]||=[c(` Start Recording `,-1)]),_:1,__:[2]},8,[`onClick`]),n(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-BzOe3syr.js b/assets/azure-ai-foundry-C31WIx9s.js similarity index 64% rename from assets/azure-ai-foundry-BzOe3syr.js rename to assets/azure-ai-foundry-C31WIx9s.js index d3b945123b236dd6043fff4a57c2b11605dd74fc..afbdd9094875866eb83990265e7ae98c1378a49f 100644 --- a/assets/azure-ai-foundry-BzOe3syr.js +++ b/assets/azure-ai-foundry-C31WIx9s.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,k as h,l as g,m as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`azure-ai-foundry`;var x=t({__name:`azure-ai-foundry`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.resourceName||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].resourceName=e}}),D=i({get:()=>C.value[b]?.apiVersion||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiVersion=e}}),O=i({get:()=>C.value[b]?.modelId||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].modelId=e}});s(()=>{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||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName||`Azure OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":k},{default:u(()=>[o(d(h),{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`]),o(d(_),{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`]),o(d(_),{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`]),o(d(g),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(_),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,k as h,l as g,m as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`azure-ai-foundry`;var x=o({__name:`azure-ai-foundry`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.resourceName||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].resourceName=e}}),D=i({get:()=>C.value[b]?.apiVersion||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiVersion=e}}),O=i({get:()=>C.value[b]?.modelId||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].modelId=e}});s(()=>{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||``}),l([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,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName||`Azure OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":k},{default:u(()=>[t(d(h),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`Azure OpenAI`,placeholder:`...`,required:``},null,8,[`modelValue`,`provider-name`]),t(d(_),{modelValue:E.value,"onUpdate:modelValue":n[1]||=e=>E.value=e,label:`Resouce name`,placeholder:`...`,description:`Prefix used in https://.services.ai.azure.com`,required:``},null,8,[`modelValue`]),t(d(_),{modelValue:O.value,"onUpdate:modelValue":n[2]||=e=>O.value=e,label:`Model id`,placeholder:`...`,description:`Model ID on Azure AI Foundry`,required:``},null,8,[`modelValue`])]),_:1},8,[`title`,`description`]),t(d(g),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(_),{modelValue:D.value,"onUpdate:modelValue":n[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-XDN7GK5x.js b/assets/background-gradient-blending-jSovSmMB.js similarity index 99% rename from assets/background-gradient-blending-XDN7GK5x.js rename to assets/background-gradient-blending-jSovSmMB.js index 024f4387f3b40b0662446daafd18065d40b86a15..1bdb01c1d5cb5f784068248895be3e3c757dd4f4 100644 --- a/assets/background-gradient-blending-XDN7GK5x.js +++ b/assets/background-gradient-blending-jSovSmMB.js @@ -1,5 +1,5 @@ -import{d as e}from"./theme-color-DKGyNM2w.js";import{cB as t,cO as n,d$ as r,dS as i,dU as a,dV as o,dY as s,dZ as c,d_ as l,dn as u,e2 as d,e4 as f,e5 as p,e6 as m,e7 as h,e8 as g,e9 as _,ec as v,ed as y,ee as b,ef as x,ei as S,em as C,en as w,ep as T,eq as E}from"./index-B9WIljdS.js";import{b as ee}from"./browser-bFm1l1qg.js";const D=[`accept`,`multiple`];var te=r({__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 a(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(),s(`label`,{relative:``,"cursor-pointer":``,onDragover:c[0]||=e=>r.value=!0,onDragleave:c[1]||=e=>r.value=!1},[o(`input`,{type:`file`,accept:e.accept,multiple:e.multiple,class:`absolute inset-0 h-full w-full opacity-0`,onChange:a},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-BIFWobsZ.js";import{cH as t,cP as n,d$ as r,dT as i,dV as a,dW as o,dZ as s,d_ as c,do as l,e0 as u,e3 as d,e5 as f,e6 as p,e7 as m,e8 as h,e9 as g,ea as _,ed as v,ee as y,ef as b,eg as x,ej as S,en as C,eo as w,eq as T,er as E}from"./index-BIGBQG2E.js";import{b as ee}from"./browser-bFm1l1qg.js";const D=[`accept`,`multiple`];var te=u({__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=l(r,150);function a(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(),s(`label`,{relative:``,"cursor-pointer":``,onDragover:c[0]||=e=>r.value=!0,onDragleave:c[1]||=e=>r.value=!1},[o(`input`,{type:`file`,accept:e.accept,multiple:e.multiple,class:`absolute inset-0 h-full w-full opacity-0`,onChange:a},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+` - .`+dl+ll+fl)},ml=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement(`style`);r.textContent=t,e.appendChild(r)}},hl=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):`about:blank`},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement(`a`),e._origin=e.getOrigin(t.location.href)},e._origin=`about:blank`,e}(),gl=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(Cl(e)||bl(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return A(this,void 0,void 0,function(){var t,n,r,i,a=this;return j(this,function(o){switch(o.label){case 0:return t=hl.isSameOrigin(e),n=!xl(e)&&this._options.useCORS===!0&&q.SUPPORT_CORS_IMAGES&&!t,r=!xl(e)&&!t&&!Cl(e)&&typeof this._options.proxy==`string`&&q.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!xl(e)&&!Cl(e)&&!r&&!n?[2]:(i=e,r?[4,this.proxy(i)]:[3,2]);case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug(`Added image `+e.substring(0,256)),[4,new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(Sl(i)||n)&&(r.crossOrigin=`anonymous`),r.src=i,r.complete===!0&&setTimeout(function(){return e(r)},500),a._options.imageTimeout>0&&setTimeout(function(){return t(`Timed out (`+a._options.imageTimeout+`ms) loading image`)},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(e){return this._cache[e]!==void 0},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw Error(`No proxy defined`);var r=e.substring(0,256);return new Promise(function(i,a){var o=q.SUPPORT_RESPONSE_TYPE?`blob`:`text`,s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o===`text`)i(s.response);else{var e=new FileReader;e.addEventListener(`load`,function(){return i(e.result)},!1),e.addEventListener(`error`,function(e){return a(e)},!1),e.readAsDataURL(s.response)}else a(`Failed to proxy resource `+r+` with status code `+s.status)},s.onerror=a;var c=n.indexOf(`?`)>-1?`&`:`?`;if(s.open(`GET`,``+n+c+`url=`+encodeURIComponent(e)+`&responseType=`+o),o!==`text`&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a(`Timed out (`+l+`ms) proxying `+r)}}s.send()})},e}(),_l=/^data:image\/svg\+xml/i,vl=/^data:image\/.*;base64,/i,yl=/^data:image\/.*/i,bl=function(e){return q.SUPPORT_SVG_DRAWING||!wl(e)},xl=function(e){return yl.test(e)},Sl=function(e){return vl.test(e)},Cl=function(e){return e.substr(0,4)===`blob`},wl=function(e){return e.substr(-3).toLowerCase()===`svg`||_l.test(e)},Y=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),Tl=function(e,t,n){return new Y(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},El=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=Tl(this.start,this.startControl,t),i=Tl(this.startControl,this.endControl,t),a=Tl(this.endControl,this.end,t),o=Tl(r,i,t),s=Tl(i,a,t),c=Tl(o,s,t);return n?new e(this.start,r,o,c):new e(c,s,a,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),X=function(e){return e.type===1},Dl=function(){function e(e){var t=e.styles,n=e.bounds,r=Wr(t.borderTopLeftRadius,n.width,n.height),i=r[0],a=r[1],o=Wr(t.borderTopRightRadius,n.width,n.height),s=o[0],c=o[1],l=Wr(t.borderBottomRightRadius,n.width,n.height),u=l[0],d=l[1],f=Wr(t.borderBottomLeftRadius,n.width,n.height),p=f[0],m=f[1],h=[];h.push((i+s)/n.width),h.push((p+u)/n.width),h.push((a+m)/n.height),h.push((c+d)/n.height);var g=Math.max.apply(Math,h);g>1&&(i/=g,a/=g,s/=g,c/=g,u/=g,d/=g,p/=g,m/=g);var _=n.width-s,v=n.height-d,y=n.width-u,b=n.height-m,x=t.borderTopWidth,S=t.borderRightWidth,C=t.borderBottomWidth,w=t.borderLeftWidth,T=V(t.paddingTop,e.bounds.width),E=V(t.paddingRight,e.bounds.width),ee=V(t.paddingBottom,e.bounds.width),D=V(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?Q(n.left+w/3,n.top+x/3,i-w/3,a-x/3,Z.TOP_LEFT):new Y(n.left+w/3,n.top+x/3),this.topRightBorderDoubleOuterBox=i>0||a>0?Q(n.left+_,n.top+x/3,s-S/3,c-x/3,Z.TOP_RIGHT):new Y(n.left+n.width-S/3,n.top+x/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?Q(n.left+y,n.top+v,u-S/3,d-C/3,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S/3,n.top+n.height-C/3),this.bottomLeftBorderDoubleOuterBox=p>0||m>0?Q(n.left+w/3,n.top+b,p-w/3,m-C/3,Z.BOTTOM_LEFT):new Y(n.left+w/3,n.top+n.height-C/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?Q(n.left+w*2/3,n.top+x*2/3,i-w*2/3,a-x*2/3,Z.TOP_LEFT):new Y(n.left+w*2/3,n.top+x*2/3),this.topRightBorderDoubleInnerBox=i>0||a>0?Q(n.left+_,n.top+x*2/3,s-S*2/3,c-x*2/3,Z.TOP_RIGHT):new Y(n.left+n.width-S*2/3,n.top+x*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?Q(n.left+y,n.top+v,u-S*2/3,d-C*2/3,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S*2/3,n.top+n.height-C*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||m>0?Q(n.left+w*2/3,n.top+b,p-w*2/3,m-C*2/3,Z.BOTTOM_LEFT):new Y(n.left+w*2/3,n.top+n.height-C*2/3),this.topLeftBorderStroke=i>0||a>0?Q(n.left+w/2,n.top+x/2,i-w/2,a-x/2,Z.TOP_LEFT):new Y(n.left+w/2,n.top+x/2),this.topRightBorderStroke=i>0||a>0?Q(n.left+_,n.top+x/2,s-S/2,c-x/2,Z.TOP_RIGHT):new Y(n.left+n.width-S/2,n.top+x/2),this.bottomRightBorderStroke=u>0||d>0?Q(n.left+y,n.top+v,u-S/2,d-C/2,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S/2,n.top+n.height-C/2),this.bottomLeftBorderStroke=p>0||m>0?Q(n.left+w/2,n.top+b,p-w/2,m-C/2,Z.BOTTOM_LEFT):new Y(n.left+w/2,n.top+n.height-C/2),this.topLeftBorderBox=i>0||a>0?Q(n.left,n.top,i,a,Z.TOP_LEFT):new Y(n.left,n.top),this.topRightBorderBox=s>0||c>0?Q(n.left+_,n.top,s,c,Z.TOP_RIGHT):new Y(n.left+n.width,n.top),this.bottomRightBorderBox=u>0||d>0?Q(n.left+y,n.top+v,u,d,Z.BOTTOM_RIGHT):new Y(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=p>0||m>0?Q(n.left,n.top+b,p,m,Z.BOTTOM_LEFT):new Y(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||a>0?Q(n.left+w,n.top+x,Math.max(0,i-w),Math.max(0,a-x),Z.TOP_LEFT):new Y(n.left+w,n.top+x),this.topRightPaddingBox=s>0||c>0?Q(n.left+Math.min(_,n.width-S),n.top+x,_>n.width+S?0:Math.max(0,s-S),Math.max(0,c-x),Z.TOP_RIGHT):new Y(n.left+n.width-S,n.top+x),this.bottomRightPaddingBox=u>0||d>0?Q(n.left+Math.min(y,n.width-w),n.top+Math.min(v,n.height-C),Math.max(0,u-S),Math.max(0,d-C),Z.BOTTOM_RIGHT):new Y(n.left+n.width-S,n.top+n.height-C),this.bottomLeftPaddingBox=p>0||m>0?Q(n.left+w,n.top+Math.min(b,n.height-C),Math.max(0,p-w),Math.max(0,m-C),Z.BOTTOM_LEFT):new Y(n.left+w,n.top+n.height-C),this.topLeftContentBox=i>0||a>0?Q(n.left+w+D,n.top+x+T,Math.max(0,i-(w+D)),Math.max(0,a-(x+T)),Z.TOP_LEFT):new Y(n.left+w+D,n.top+x+T),this.topRightContentBox=s>0||c>0?Q(n.left+Math.min(_,n.width+w+D),n.top+x+T,_>n.width+w+D?0:s-w+D,c-(x+T),Z.TOP_RIGHT):new Y(n.left+n.width-(S+E),n.top+x+T),this.bottomRightContentBox=u>0||d>0?Q(n.left+Math.min(y,n.width-(w+D)),n.top+Math.min(v,n.height+x+T),Math.max(0,u-(S+E)),d-(C+ee),Z.BOTTOM_RIGHT):new Y(n.left+n.width-(S+E),n.top+n.height-(C+ee)),this.bottomLeftContentBox=p>0||m>0?Q(n.left+w+D,n.top+b,Math.max(0,p-(w+D)),m-(C+ee),Z.BOTTOM_LEFT):new Y(n.left+w+D,n.top+n.height-(C+ee))}return e}(),Z;(function(e){e[e.TOP_LEFT=0]=`TOP_LEFT`,e[e.TOP_RIGHT=1]=`TOP_RIGHT`,e[e.BOTTOM_RIGHT=2]=`BOTTOM_RIGHT`,e[e.BOTTOM_LEFT=3]=`BOTTOM_LEFT`})(Z||={});var Q=function(e,t,n,r,i){var a=4*((Math.sqrt(2)-1)/3),o=n*a,s=r*a,c=e+n,l=t+r;switch(i){case Z.TOP_LEFT:return new El(new Y(e,l),new Y(e,l-s),new Y(c-o,t),new Y(c,t));case Z.TOP_RIGHT:return new El(new Y(e,t),new Y(e+o,t),new Y(c,l-s),new Y(c,l));case Z.BOTTOM_RIGHT:return new El(new Y(c,t),new Y(c,t+s),new Y(e+o,l),new Y(e,l));case Z.BOTTOM_LEFT:default:return new El(new Y(c,l),new Y(c-o,l),new Y(e,t+s),new Y(e,t))}},Ol=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},kl=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},Al=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},jl=function(){function e(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return e}(),Ml=function(){function e(e,t){this.path=e,this.target=t,this.type=1}return e}(),Nl=function(){function e(e){this.opacity=e,this.type=2,this.target=6}return e}(),Pl=function(e){return e.type===0},Fl=function(e){return e.type===1},Il=function(e){return e.type===2},Ll=function(e,t){return e.length===t.length?e.some(function(e,n){return e===t[n]}):!1},Rl=function(e,t,n,r,i){return e.map(function(e,a){switch(a){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e})},zl=function(){function e(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Bl=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Dl(this.container),this.container.styles.opacity<1&&this.effects.push(new Nl(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new jl(n,r,i))}if(this.container.styles.overflowX!==0){var a=Ol(this.curves),o=Al(this.curves);Ll(a,o)?this.effects.push(new Ml(a,6)):(this.effects.push(new Ml(a,2)),this.effects.push(new Ml(o,4)))}}return e.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(e){return!Fl(e)});if(t||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,i),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var a=Ol(n.curves),o=Al(n.curves);Ll(a,o)||r.unshift(new Ml(o,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(t){return G(t.target,e)})},e}(),Vl=function(e,t,n,r){e.container.elements.forEach(function(i){var a=G(i.flags,4),o=G(i.flags,2),s=new Bl(i,e);G(i.styles.display,2048)&&r.push(s);var c=G(i.flags,8)?[]:r;if(a||o){var l=a||i.styles.isPositioned()?n:t,u=new zl(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var d=i.styles.zIndex.order;if(d<0){var f=0;l.negativeZIndex.some(function(e,t){return d>e.element.container.styles.zIndex.order?(f=t,!1):f>0}),l.negativeZIndex.splice(f,0,u)}else if(d>0){var p=0;l.positiveZIndex.some(function(e,t){return d>=e.element.container.styles.zIndex.order?(p=t+1,!1):p>0}),l.positiveZIndex.splice(p,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Vl(s,u,a?u:n,c)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),Vl(s,t,n,c);G(i.flags,8)&&Hl(i,c)})},Hl=function(e,t){for(var n=e instanceof qs?e.start:1,r=e instanceof qs?e.reversed:!1,i=0;i0&&e.intrinsicHeight>0){var r=Xl(e),i=Al(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return A(this,void 0,void 0,function(){var n,r,i,a,o,s,c,c,l,u,d,f,p,m,h,g,_,v,y,c,b,p,g;return j(this,function(x){switch(x.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,a=0,o=n.textNodes,x.label=1;case 1:return a0&&d>0&&(f=r.ctx.createPattern(b,`repeat`),r.renderRepeat(s,f,c,l))):Ai(n)&&(C=$l(e,t,[null,null,null]),s=C[0],w=C[1],T=C[2],u=C[3],d=C[4],E=n.position.length===0?[Hr]:n.position,c=V(E[0],u),l=V(E[E.length-1],d),ee=hi(n,c,l,u,d),D=ee[0],te=ee[1],D>0&&te>0&&(ne=r.ctx.createRadialGradient(w+c,T+l,0,w+c,T+l,D),di(n.stops,D*2).forEach(function(e){return ne.addColorStop(e.stop,U(e.color))}),r.path(s),r.ctx.fillStyle=ne,D===te?r.ctx.fill():(O=e.bounds.left+.5*e.bounds.width,k=e.bounds.top+.5*e.bounds.height,re=te/D,A=1/re,r.ctx.save(),r.ctx.translate(O,k),r.ctx.transform(1,0,0,re,0,0),r.ctx.translate(-O,-k),r.ctx.fillRect(w,A*(T-k)+k,u,d*A),r.ctx.restore()))),j.label=6;case 6:return t--,[2]}})},r=this,i=0,a=e.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return i0?c.style===2?[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return c.style===3?[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,3)]:[3,7];case 6:return u.sent(),[3,11];case 7:return c.style===4?[4,this.renderDoubleBorder(c.color,c.width,a,e.curves)]:[3,9];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,e.curves)];case 10:u.sent(),u.label=11;case 11:a++,u.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,t,n,r,i){return A(this,void 0,void 0,function(){var a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,y,b;return j(this,function(x){return this.ctx.save(),a=ql(r,n),o=Wl(r,n),i===2&&(this.path(o),this.ctx.clip()),X(o[0])?(s=o[0].start.x,c=o[0].start.y):(s=o[0].x,c=o[0].y),X(o[1])?(l=o[1].end.x,u=o[1].end.y):(l=o[1].x,u=o[1].y),d=n===0||n===2?Math.abs(s-l):Math.abs(c-u),this.ctx.beginPath(),i===3?this.formatPath(a):this.formatPath(o.slice(0,2)),f=t<3?t*3:t*2,p=t<3?t*2:t,i===3&&(f=t,p=t),m=!0,d<=f*2?m=!1:d<=f*2+p?(h=d/(2*f+p),f*=h,p*=h):(g=Math.floor((d+p)/(f+p)),_=(d-g*f)/(g-1),v=(d-(g+1)*f)/g,p=v<=0||Math.abs(p-_)D.value.length===0?[wu]:D.value.map(e=>{let t=URL.createObjectURL(e);return v.value.push(()=>URL.revokeObjectURL(t)),t})),O=S(`vibrant`),k=y(`imageRef`),re=y(`canvas`),{updateThemeColor:A}=e(()=>d.value),j=a(()=>O.value===`vibrant`?d.value:O.value===`html2canvas`?_.value:``);async function ie(){if(te.value.length!==0)try{r.value=!0;let e=new ee(te.value[0]),t=await e.getPalette(),n=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`);u.value=n,d.value=t.Vibrant?.hex||t.DarkVibrant?.hex||n[0],await A()}catch(e){console.error(`Color extraction failed:`,e)}finally{r.value=!1}}async function M(){if(k.value)try{r.value=!0;let e=await Cu(k.value,{allowTaint:!0,useCORS:!0,backgroundColor:null,scale:.5,height:100,width:k.value.offsetWidth,logging:!1});if(re.value){let t=re.value.getContext(`2d`);t&&(re.value.width=e.width,re.value.height=e.height,t.drawImage(e,0,0))}let n=e.getContext(`2d`);if(n){let r=n.getImageData(0,0,e.width,20),i=[];for(let e=0;e0&&i.push({mode:`rgb`,r:t,g:n,b:a})}if(i.length>0){let e=t(i);_.value=`rgb(${e.r}, ${e.g}, ${e.b})`}}}catch(e){console.error(`Canvas capture failed:`,e)}finally{r.value=!1}}return p(async()=>{await f(),await ie(),await M()}),b(te,async()=>{await f(),await ie(),await M()}),m(()=>{v.value.forEach(e=>e())}),(e,t)=>(h(),s(`div`,Tu,[o(`div`,Eu,[o(`div`,{class:`pointer-events-none left-0 right-0 top-0 z-10 flex items-center justify-center backdrop-blur-md`,style:T({background:j.value})},t[3]||=[o(`div`,{class:`py-4 text-center text-sm text-white font-medium`},` Top Area `,-1)],4),o(`div`,{class:`transparent-gradient-overlay absolute inset-0 h-[calc((1lh+1rem+1rem)*2)] w-full`,style:T({background:j.value})},null,4),o(`img`,{ref_key:`imageRef`,ref:k,src:te.value[0],class:`h-full max-h-[calc(100dvh-28rem)] w-full object-cover`},null,8,Du),o(`div`,Ou,[l(C(ne),{modelValue:D.value,"onUpdate:modelValue":t[0]||=e=>D.value=e},{default:x(()=>t[4]||=[o(`div`,{class:`rounded-xl bg-black bg-opacity-30 px-5 py-4 text-white backdrop-blur-sm`},` Replace Image `,-1)]),_:1,__:[4]},8,[`modelValue`])])]),o(`div`,ku,[o(`div`,Au,[o(`div`,ju,[o(`h3`,Mu,[t[5]||=o(`span`,null,`Node Vibrant`,-1),o(`button`,{"border-2":``,"border-neutral-300":``,"rounded-xl":``,"border-solid":``,"px-3":``,"py-1":``,"text-sm":``,"font-normal":``,"dark:border-neutral-700":``,class:w([O.value===`vibrant`?`bg-neutral-100 dark:bg-neutral-700`:``]),onClick:t[1]||=e=>O.value=`vibrant`},E(O.value===`vibrant`?`Activated`:`Active`),3)]),o(`div`,Nu,[(h(!0),s(i,null,g(u.value,e=>(h(),s(`div`,{key:e,class:`h-12 w-12 cursor-pointer border-2 border-gray-300 rounded rounded-xl transition-transform duration-200 ease-in-out hover:scale-110 dark:border-gray-900`,style:T({backgroundColor:e}),title:e},null,12,Pu))),128))]),o(`p`,Fu,[t[6]||=c(` Color: `,-1),o(`span`,{style:T({color:d.value})},E(d.value),5)])]),o(`div`,Iu,[o(`h3`,Lu,[t[7]||=o(`span`,null,`html2canvas Top sampling`,-1),o(`button`,{"border-2":``,"border-neutral-300":``,"rounded-xl":``,"border-solid":``,"px-3":``,"py-1":``,"text-sm":``,"font-normal":``,"dark:border-neutral-700":``,class:w([O.value===`html2canvas`?`bg-neutral-100 dark:bg-neutral-700`:``]),onClick:t[2]||=e=>O.value=`html2canvas`},E(O.value===`html2canvas`?`Activated`:`Active`),3)]),o(`div`,Ru,[o(`div`,{class:`color-swatch h-12 w-12 border-2 border-gray-300 rounded rounded-xl dark:border-gray-900`,style:T({backgroundColor:_.value}),title:_.value},null,12,zu)]),o(`p`,Bu,[t[8]||=c(` Color: `,-1),o(`span`,{style:T({color:_.value})},E(_.value),5)])])]),o(`div`,Vu,[t[9]||=o(`h3`,{class:`mb-1 text-lg`},` Captured Canvas (Debug) `,-1),o(`canvas`,Hu,null,512)])])]))}}),Wu=n(Uu,[[`__scopeId`,`data-v-e6e8453f`]]);export{Wu as default}; \ No newline at end of file + .`+dl+ll+fl)},ml=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement(`style`);r.textContent=t,e.appendChild(r)}},hl=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):`about:blank`},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement(`a`),e._origin=e.getOrigin(t.location.href)},e._origin=`about:blank`,e}(),gl=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(Cl(e)||bl(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return A(this,void 0,void 0,function(){var t,n,r,i,a=this;return j(this,function(o){switch(o.label){case 0:return t=hl.isSameOrigin(e),n=!xl(e)&&this._options.useCORS===!0&&q.SUPPORT_CORS_IMAGES&&!t,r=!xl(e)&&!t&&!Cl(e)&&typeof this._options.proxy==`string`&&q.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!xl(e)&&!Cl(e)&&!r&&!n?[2]:(i=e,r?[4,this.proxy(i)]:[3,2]);case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug(`Added image `+e.substring(0,256)),[4,new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(Sl(i)||n)&&(r.crossOrigin=`anonymous`),r.src=i,r.complete===!0&&setTimeout(function(){return e(r)},500),a._options.imageTimeout>0&&setTimeout(function(){return t(`Timed out (`+a._options.imageTimeout+`ms) loading image`)},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(e){return this._cache[e]!==void 0},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw Error(`No proxy defined`);var r=e.substring(0,256);return new Promise(function(i,a){var o=q.SUPPORT_RESPONSE_TYPE?`blob`:`text`,s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o===`text`)i(s.response);else{var e=new FileReader;e.addEventListener(`load`,function(){return i(e.result)},!1),e.addEventListener(`error`,function(e){return a(e)},!1),e.readAsDataURL(s.response)}else a(`Failed to proxy resource `+r+` with status code `+s.status)},s.onerror=a;var c=n.indexOf(`?`)>-1?`&`:`?`;if(s.open(`GET`,``+n+c+`url=`+encodeURIComponent(e)+`&responseType=`+o),o!==`text`&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a(`Timed out (`+l+`ms) proxying `+r)}}s.send()})},e}(),_l=/^data:image\/svg\+xml/i,vl=/^data:image\/.*;base64,/i,yl=/^data:image\/.*/i,bl=function(e){return q.SUPPORT_SVG_DRAWING||!wl(e)},xl=function(e){return yl.test(e)},Sl=function(e){return vl.test(e)},Cl=function(e){return e.substr(0,4)===`blob`},wl=function(e){return e.substr(-3).toLowerCase()===`svg`||_l.test(e)},Y=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),Tl=function(e,t,n){return new Y(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},El=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=Tl(this.start,this.startControl,t),i=Tl(this.startControl,this.endControl,t),a=Tl(this.endControl,this.end,t),o=Tl(r,i,t),s=Tl(i,a,t),c=Tl(o,s,t);return n?new e(this.start,r,o,c):new e(c,s,a,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),X=function(e){return e.type===1},Dl=function(){function e(e){var t=e.styles,n=e.bounds,r=Wr(t.borderTopLeftRadius,n.width,n.height),i=r[0],a=r[1],o=Wr(t.borderTopRightRadius,n.width,n.height),s=o[0],c=o[1],l=Wr(t.borderBottomRightRadius,n.width,n.height),u=l[0],d=l[1],f=Wr(t.borderBottomLeftRadius,n.width,n.height),p=f[0],m=f[1],h=[];h.push((i+s)/n.width),h.push((p+u)/n.width),h.push((a+m)/n.height),h.push((c+d)/n.height);var g=Math.max.apply(Math,h);g>1&&(i/=g,a/=g,s/=g,c/=g,u/=g,d/=g,p/=g,m/=g);var _=n.width-s,v=n.height-d,y=n.width-u,b=n.height-m,x=t.borderTopWidth,S=t.borderRightWidth,C=t.borderBottomWidth,w=t.borderLeftWidth,T=V(t.paddingTop,e.bounds.width),E=V(t.paddingRight,e.bounds.width),ee=V(t.paddingBottom,e.bounds.width),D=V(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?Q(n.left+w/3,n.top+x/3,i-w/3,a-x/3,Z.TOP_LEFT):new Y(n.left+w/3,n.top+x/3),this.topRightBorderDoubleOuterBox=i>0||a>0?Q(n.left+_,n.top+x/3,s-S/3,c-x/3,Z.TOP_RIGHT):new Y(n.left+n.width-S/3,n.top+x/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?Q(n.left+y,n.top+v,u-S/3,d-C/3,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S/3,n.top+n.height-C/3),this.bottomLeftBorderDoubleOuterBox=p>0||m>0?Q(n.left+w/3,n.top+b,p-w/3,m-C/3,Z.BOTTOM_LEFT):new Y(n.left+w/3,n.top+n.height-C/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?Q(n.left+w*2/3,n.top+x*2/3,i-w*2/3,a-x*2/3,Z.TOP_LEFT):new Y(n.left+w*2/3,n.top+x*2/3),this.topRightBorderDoubleInnerBox=i>0||a>0?Q(n.left+_,n.top+x*2/3,s-S*2/3,c-x*2/3,Z.TOP_RIGHT):new Y(n.left+n.width-S*2/3,n.top+x*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?Q(n.left+y,n.top+v,u-S*2/3,d-C*2/3,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S*2/3,n.top+n.height-C*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||m>0?Q(n.left+w*2/3,n.top+b,p-w*2/3,m-C*2/3,Z.BOTTOM_LEFT):new Y(n.left+w*2/3,n.top+n.height-C*2/3),this.topLeftBorderStroke=i>0||a>0?Q(n.left+w/2,n.top+x/2,i-w/2,a-x/2,Z.TOP_LEFT):new Y(n.left+w/2,n.top+x/2),this.topRightBorderStroke=i>0||a>0?Q(n.left+_,n.top+x/2,s-S/2,c-x/2,Z.TOP_RIGHT):new Y(n.left+n.width-S/2,n.top+x/2),this.bottomRightBorderStroke=u>0||d>0?Q(n.left+y,n.top+v,u-S/2,d-C/2,Z.BOTTOM_RIGHT):new Y(n.left+n.width-S/2,n.top+n.height-C/2),this.bottomLeftBorderStroke=p>0||m>0?Q(n.left+w/2,n.top+b,p-w/2,m-C/2,Z.BOTTOM_LEFT):new Y(n.left+w/2,n.top+n.height-C/2),this.topLeftBorderBox=i>0||a>0?Q(n.left,n.top,i,a,Z.TOP_LEFT):new Y(n.left,n.top),this.topRightBorderBox=s>0||c>0?Q(n.left+_,n.top,s,c,Z.TOP_RIGHT):new Y(n.left+n.width,n.top),this.bottomRightBorderBox=u>0||d>0?Q(n.left+y,n.top+v,u,d,Z.BOTTOM_RIGHT):new Y(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=p>0||m>0?Q(n.left,n.top+b,p,m,Z.BOTTOM_LEFT):new Y(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||a>0?Q(n.left+w,n.top+x,Math.max(0,i-w),Math.max(0,a-x),Z.TOP_LEFT):new Y(n.left+w,n.top+x),this.topRightPaddingBox=s>0||c>0?Q(n.left+Math.min(_,n.width-S),n.top+x,_>n.width+S?0:Math.max(0,s-S),Math.max(0,c-x),Z.TOP_RIGHT):new Y(n.left+n.width-S,n.top+x),this.bottomRightPaddingBox=u>0||d>0?Q(n.left+Math.min(y,n.width-w),n.top+Math.min(v,n.height-C),Math.max(0,u-S),Math.max(0,d-C),Z.BOTTOM_RIGHT):new Y(n.left+n.width-S,n.top+n.height-C),this.bottomLeftPaddingBox=p>0||m>0?Q(n.left+w,n.top+Math.min(b,n.height-C),Math.max(0,p-w),Math.max(0,m-C),Z.BOTTOM_LEFT):new Y(n.left+w,n.top+n.height-C),this.topLeftContentBox=i>0||a>0?Q(n.left+w+D,n.top+x+T,Math.max(0,i-(w+D)),Math.max(0,a-(x+T)),Z.TOP_LEFT):new Y(n.left+w+D,n.top+x+T),this.topRightContentBox=s>0||c>0?Q(n.left+Math.min(_,n.width+w+D),n.top+x+T,_>n.width+w+D?0:s-w+D,c-(x+T),Z.TOP_RIGHT):new Y(n.left+n.width-(S+E),n.top+x+T),this.bottomRightContentBox=u>0||d>0?Q(n.left+Math.min(y,n.width-(w+D)),n.top+Math.min(v,n.height+x+T),Math.max(0,u-(S+E)),d-(C+ee),Z.BOTTOM_RIGHT):new Y(n.left+n.width-(S+E),n.top+n.height-(C+ee)),this.bottomLeftContentBox=p>0||m>0?Q(n.left+w+D,n.top+b,Math.max(0,p-(w+D)),m-(C+ee),Z.BOTTOM_LEFT):new Y(n.left+w+D,n.top+n.height-(C+ee))}return e}(),Z;(function(e){e[e.TOP_LEFT=0]=`TOP_LEFT`,e[e.TOP_RIGHT=1]=`TOP_RIGHT`,e[e.BOTTOM_RIGHT=2]=`BOTTOM_RIGHT`,e[e.BOTTOM_LEFT=3]=`BOTTOM_LEFT`})(Z||={});var Q=function(e,t,n,r,i){var a=4*((Math.sqrt(2)-1)/3),o=n*a,s=r*a,c=e+n,l=t+r;switch(i){case Z.TOP_LEFT:return new El(new Y(e,l),new Y(e,l-s),new Y(c-o,t),new Y(c,t));case Z.TOP_RIGHT:return new El(new Y(e,t),new Y(e+o,t),new Y(c,l-s),new Y(c,l));case Z.BOTTOM_RIGHT:return new El(new Y(c,t),new Y(c,t+s),new Y(e+o,l),new Y(e,l));case Z.BOTTOM_LEFT:default:return new El(new Y(c,l),new Y(c-o,l),new Y(e,t+s),new Y(e,t))}},Ol=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},kl=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},Al=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},jl=function(){function e(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return e}(),Ml=function(){function e(e,t){this.path=e,this.target=t,this.type=1}return e}(),Nl=function(){function e(e){this.opacity=e,this.type=2,this.target=6}return e}(),Pl=function(e){return e.type===0},Fl=function(e){return e.type===1},Il=function(e){return e.type===2},Ll=function(e,t){return e.length===t.length?e.some(function(e,n){return e===t[n]}):!1},Rl=function(e,t,n,r,i){return e.map(function(e,a){switch(a){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e})},zl=function(){function e(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Bl=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Dl(this.container),this.container.styles.opacity<1&&this.effects.push(new Nl(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new jl(n,r,i))}if(this.container.styles.overflowX!==0){var a=Ol(this.curves),o=Al(this.curves);Ll(a,o)?this.effects.push(new Ml(a,6)):(this.effects.push(new Ml(a,2)),this.effects.push(new Ml(o,4)))}}return e.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(e){return!Fl(e)});if(t||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,i),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var a=Ol(n.curves),o=Al(n.curves);Ll(a,o)||r.unshift(new Ml(o,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(t){return G(t.target,e)})},e}(),Vl=function(e,t,n,r){e.container.elements.forEach(function(i){var a=G(i.flags,4),o=G(i.flags,2),s=new Bl(i,e);G(i.styles.display,2048)&&r.push(s);var c=G(i.flags,8)?[]:r;if(a||o){var l=a||i.styles.isPositioned()?n:t,u=new zl(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var d=i.styles.zIndex.order;if(d<0){var f=0;l.negativeZIndex.some(function(e,t){return d>e.element.container.styles.zIndex.order?(f=t,!1):f>0}),l.negativeZIndex.splice(f,0,u)}else if(d>0){var p=0;l.positiveZIndex.some(function(e,t){return d>=e.element.container.styles.zIndex.order?(p=t+1,!1):p>0}),l.positiveZIndex.splice(p,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Vl(s,u,a?u:n,c)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),Vl(s,t,n,c);G(i.flags,8)&&Hl(i,c)})},Hl=function(e,t){for(var n=e instanceof qs?e.start:1,r=e instanceof qs?e.reversed:!1,i=0;i0&&e.intrinsicHeight>0){var r=Xl(e),i=Al(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return A(this,void 0,void 0,function(){var n,r,i,a,o,s,c,c,l,u,d,f,p,m,h,g,_,v,y,c,b,p,g;return j(this,function(x){switch(x.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,a=0,o=n.textNodes,x.label=1;case 1:return a0&&d>0&&(f=r.ctx.createPattern(b,`repeat`),r.renderRepeat(s,f,c,l))):Ai(n)&&(C=$l(e,t,[null,null,null]),s=C[0],w=C[1],T=C[2],u=C[3],d=C[4],E=n.position.length===0?[Hr]:n.position,c=V(E[0],u),l=V(E[E.length-1],d),ee=hi(n,c,l,u,d),D=ee[0],te=ee[1],D>0&&te>0&&(ne=r.ctx.createRadialGradient(w+c,T+l,0,w+c,T+l,D),di(n.stops,D*2).forEach(function(e){return ne.addColorStop(e.stop,U(e.color))}),r.path(s),r.ctx.fillStyle=ne,D===te?r.ctx.fill():(O=e.bounds.left+.5*e.bounds.width,k=e.bounds.top+.5*e.bounds.height,re=te/D,A=1/re,r.ctx.save(),r.ctx.translate(O,k),r.ctx.transform(1,0,0,re,0,0),r.ctx.translate(-O,-k),r.ctx.fillRect(w,A*(T-k)+k,u,d*A),r.ctx.restore()))),j.label=6;case 6:return t--,[2]}})},r=this,i=0,a=e.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return i0?c.style===2?[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return c.style===3?[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,3)]:[3,7];case 6:return u.sent(),[3,11];case 7:return c.style===4?[4,this.renderDoubleBorder(c.color,c.width,a,e.curves)]:[3,9];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,e.curves)];case 10:u.sent(),u.label=11;case 11:a++,u.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,t,n,r,i){return A(this,void 0,void 0,function(){var a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,y,b;return j(this,function(x){return this.ctx.save(),a=ql(r,n),o=Wl(r,n),i===2&&(this.path(o),this.ctx.clip()),X(o[0])?(s=o[0].start.x,c=o[0].start.y):(s=o[0].x,c=o[0].y),X(o[1])?(l=o[1].end.x,u=o[1].end.y):(l=o[1].x,u=o[1].y),d=n===0||n===2?Math.abs(s-l):Math.abs(c-u),this.ctx.beginPath(),i===3?this.formatPath(a):this.formatPath(o.slice(0,2)),f=t<3?t*3:t*2,p=t<3?t*2:t,i===3&&(f=t,p=t),m=!0,d<=f*2?m=!1:d<=f*2+p?(h=d/(2*f+p),f*=h,p*=h):(g=Math.floor((d+p)/(f+p)),_=(d-g*f)/(g-1),v=(d-(g+1)*f)/g,p=v<=0||Math.abs(p-_)D.value.length===0?[wu]:D.value.map(e=>{let t=URL.createObjectURL(e);return v.value.push(()=>URL.revokeObjectURL(t)),t})),O=S(`vibrant`),k=y(`imageRef`),re=y(`canvas`),{updateThemeColor:A}=e(()=>d.value),j=a(()=>O.value===`vibrant`?d.value:O.value===`html2canvas`?_.value:``);async function ie(){if(te.value.length!==0)try{l.value=!0;let e=new ee(te.value[0]),t=await e.getPalette(),n=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`);u.value=n,d.value=t.Vibrant?.hex||t.DarkVibrant?.hex||n[0],await A()}catch(e){console.error(`Color extraction failed:`,e)}finally{l.value=!1}}async function M(){if(k.value)try{l.value=!0;let e=await Cu(k.value,{allowTaint:!0,useCORS:!0,backgroundColor:null,scale:.5,height:100,width:k.value.offsetWidth,logging:!1});if(re.value){let t=re.value.getContext(`2d`);t&&(re.value.width=e.width,re.value.height=e.height,t.drawImage(e,0,0))}let n=e.getContext(`2d`);if(n){let r=n.getImageData(0,0,e.width,20),i=[];for(let e=0;e0&&i.push({mode:`rgb`,r:t,g:n,b:a})}if(i.length>0){let e=t(i);_.value=`rgb(${e.r}, ${e.g}, ${e.b})`}}}catch(e){console.error(`Canvas capture failed:`,e)}finally{l.value=!1}}return p(async()=>{await f(),await ie(),await M()}),b(te,async()=>{await f(),await ie(),await M()}),m(()=>{v.value.forEach(e=>e())}),(e,t)=>(h(),s(`div`,Tu,[o(`div`,Eu,[o(`div`,{class:`pointer-events-none left-0 right-0 top-0 z-10 flex items-center justify-center backdrop-blur-md`,style:T({background:j.value})},t[3]||=[o(`div`,{class:`py-4 text-center text-sm text-white font-medium`},` Top Area `,-1)],4),o(`div`,{class:`transparent-gradient-overlay absolute inset-0 h-[calc((1lh+1rem+1rem)*2)] w-full`,style:T({background:j.value})},null,4),o(`img`,{ref_key:`imageRef`,ref:k,src:te.value[0],class:`h-full max-h-[calc(100dvh-28rem)] w-full object-cover`},null,8,Du),o(`div`,Ou,[r(C(ne),{modelValue:D.value,"onUpdate:modelValue":t[0]||=e=>D.value=e},{default:x(()=>t[4]||=[o(`div`,{class:`rounded-xl bg-black bg-opacity-30 px-5 py-4 text-white backdrop-blur-sm`},` Replace Image `,-1)]),_:1,__:[4]},8,[`modelValue`])])]),o(`div`,ku,[o(`div`,Au,[o(`div`,ju,[o(`h3`,Mu,[t[5]||=o(`span`,null,`Node Vibrant`,-1),o(`button`,{"border-2":``,"border-neutral-300":``,"rounded-xl":``,"border-solid":``,"px-3":``,"py-1":``,"text-sm":``,"font-normal":``,"dark:border-neutral-700":``,class:w([O.value===`vibrant`?`bg-neutral-100 dark:bg-neutral-700`:``]),onClick:t[1]||=e=>O.value=`vibrant`},E(O.value===`vibrant`?`Activated`:`Active`),3)]),o(`div`,Nu,[(h(!0),s(i,null,g(u.value,e=>(h(),s(`div`,{key:e,class:`h-12 w-12 cursor-pointer border-2 border-gray-300 rounded rounded-xl transition-transform duration-200 ease-in-out hover:scale-110 dark:border-gray-900`,style:T({backgroundColor:e}),title:e},null,12,Pu))),128))]),o(`p`,Fu,[t[6]||=c(` Color: `,-1),o(`span`,{style:T({color:d.value})},E(d.value),5)])]),o(`div`,Iu,[o(`h3`,Lu,[t[7]||=o(`span`,null,`html2canvas Top sampling`,-1),o(`button`,{"border-2":``,"border-neutral-300":``,"rounded-xl":``,"border-solid":``,"px-3":``,"py-1":``,"text-sm":``,"font-normal":``,"dark:border-neutral-700":``,class:w([O.value===`html2canvas`?`bg-neutral-100 dark:bg-neutral-700`:``]),onClick:t[2]||=e=>O.value=`html2canvas`},E(O.value===`html2canvas`?`Activated`:`Active`),3)]),o(`div`,Ru,[o(`div`,{class:`color-swatch h-12 w-12 border-2 border-gray-300 rounded rounded-xl dark:border-gray-900`,style:T({backgroundColor:_.value}),title:_.value},null,12,zu)]),o(`p`,Bu,[t[8]||=c(` Color: `,-1),o(`span`,{style:T({color:_.value})},E(_.value),5)])])]),o(`div`,Vu,[t[9]||=o(`h3`,{class:`mb-1 text-lg`},` Captured Canvas (Debug) `,-1),o(`canvas`,Hu,null,512)])])]))}}),Wu=n(Uu,[[`__scopeId`,`data-v-e6e8453f`]]);export{Wu as default}; \ No newline at end of file diff --git a/assets/background-remove-BPFawsw0.js b/assets/background-remove-DTJN32z8.js similarity index 85% rename from assets/background-remove-BPFawsw0.js rename to assets/background-remove-DTJN32z8.js index 11fc0d3408dd11f5e2cd8fe5821a272b0639a21a..7fe2a931ccb9e061ef4ec3f424abcc8d827ba5ae 100644 --- a/assets/background-remove-BPFawsw0.js +++ b/assets/background-remove-DTJN32z8.js @@ -1 +1 @@ -import{b as e}from"./InputFile-CXpzJde3.js";import{d$ as t,dS as n,dU as r,dV as i,dX as a,dY as o,d_ as s,e5 as c,e7 as l,e8 as u,ei as d,em as f,ep as p,eq as m,z as h}from"./index-B9WIljdS.js";import{b as g,c as _,d as v,f as y}from"./transformers.web-BogxzGZV.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=t({__name:`background-remove`,setup(t){let N=d(),P=d(),F=d(),I=d(),L=d(!1),R=d(0),z=d(),B=d(),V=d([]),H=r(()=>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(t,r)=>(l(),o(`div`,b,[i(`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),i(`div`,S,[i(`div`,C,[(l(!0),o(n,null,u(H.value,(e,t)=>(l(),o(`img`,{key:t,src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,w))),128))]),i(`div`,T,[L.value?(l(),o(`div`,E,[i(`div`,D,m(R.value)+`% `,1),i(`div`,O,[i(`div`,{bg:`emerald-500`,"h-full":``,style:p({width:`${R.value}%`}),"transition-all":``,"duration-200":``},null,4)])])):a(``,!0),(l(!0),o(n,null,u(z.value,(e,t)=>(l(),o(`div`,{key:t,relative:``,class:`group`,"h-full":``,"w-full":``},[i(`img`,{src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,k),i(`div`,A,[i(`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)},r[1]||=[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[i(`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(),o(`div`,M,[i(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,onClick:G},r[2]||=[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[i(`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)])])):a(``,!0)])]),s(f(e),{modelValue:V.value,"onUpdate:modelValue":r[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-BcSJOVRJ.js";import{d$ as t,dT as n,dV as r,dW as i,dY as a,dZ as o,e0 as s,e6 as c,e8 as l,e9 as u,ej as d,en as f,eq as p,er as m,z as h}from"./index-BIGBQG2E.js";import{b as g,c as _,d as v,f as y}from"./transformers.web-BgaDiHAD.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=r(()=>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(r,s)=>(l(),o(`div`,b,[i(`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),i(`div`,S,[i(`div`,C,[(l(!0),o(n,null,u(H.value,(e,t)=>(l(),o(`img`,{key:t,src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,w))),128))]),i(`div`,T,[L.value?(l(),o(`div`,E,[i(`div`,D,m(R.value)+`% `,1),i(`div`,O,[i(`div`,{bg:`emerald-500`,"h-full":``,style:p({width:`${R.value}%`}),"transition-all":``,"duration-200":``},null,4)])])):a(``,!0),(l(!0),o(n,null,u(z.value,(e,t)=>(l(),o(`div`,{key:t,relative:``,class:`group`,"h-full":``,"w-full":``},[i(`img`,{src:e,"h-full":``,"w-full":``,"object-cover":``},null,8,k),i(`div`,A,[i(`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]||=[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[i(`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(),o(`div`,M,[i(`button`,{bg:`emerald-500 hover:emerald-600`,"rounded-full":``,"p-2":``,"text-white":``,onClick:G},s[2]||=[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[i(`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)])])):a(``,!0)])]),t(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-C0i2b9Lw.js b/assets/chat-DVKZmgmM.js similarity index 86% rename from assets/chat-C0i2b9Lw.js rename to assets/chat-DVKZmgmM.js index 199afdf09884bef811a238a09d1461b4cd35a78b..e5c594540cc1303e8564ca7c8b675893214a61d9 100644 --- a/assets/chat-C0i2b9Lw.js +++ b/assets/chat-DVKZmgmM.js @@ -1,3 +1,3 @@ -import{bS as e,d$ as t,dP as n,dS as r,dV as i,dX as a,dY as o,dg as s,e7 as c,e8 as l,eg as u,eh as d,ei as f,ek as p,em as m,eq as h}from"./index-B9WIljdS.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{bS as e,dQ as t,dT as n,dW as r,dY as i,dZ as a,dh as o,e0 as s,e8 as c,e9 as l,eh as u,ei as d,ej as f,el as p,en as m,er as h}from"./index-BIGBQG2E.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=t({__name:`chat`,setup(t){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,t)=>(c(),o(`div`,V,[i(`div`,H,[i(`div`,U,[t[7]||=i(`div`,null,[i(`span`,{"text-neutral-500":``,"dark:text-neutral-400":``},`LLM`)],-1),i(`div`,W,[i(`label`,G,[t[4]||=i(`span`,{"text-nowrap":``},` Base URL `,-1),u(i(`input`,{"onUpdate:modelValue":t[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),[[n,m(g)]])]),i(`label`,K,[t[5]||=i(`span`,{"text-nowrap":``},` API Key `,-1),u(i(`input`,{"onUpdate:modelValue":t[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),[[n,m(_)]])]),i(`label`,q,[t[6]||=i(`span`,{"text-nowrap":``},` Model `,-1),u(i(`input`,{"onUpdate:modelValue":t[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),[[n,m(v)]])])])]),i(`div`,null,[u(i(`textarea`,{"onUpdate:modelValue":t[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),[[n,y.value]])]),i(`button`,{"rounded-lg":``,bg:`blue-100 dark:blue-900`,"px-4":``,"py-2":``,onClick:k},` Send `),i(`div`,null,[(c(!0),o(r,null,l(b.value,(e,t)=>(c(),o(`div`,{key:t},[e.role===`user`?(c(),o(`div`,J,[i(`span`,null,h(e.content),1)])):a(``,!0),e.role===`assistant`?(c(),o(`div`,Y,[i(`span`,null,h(e.content),1)])):a(``,!0)]))),128))])])]))}}),Z=X;export{Z as default}; \ No newline at end of file +`).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=s({__name:`chat`,setup(s){let g=o(`settings/llm/baseUrl`,`https://openrouter.ai/api/v1/`),_=o(`settings/llm/apiKey`,``),v=o(`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-CQCSOdn6.js b/assets/cloudflare-workers-ai-DQ5b742r.js similarity index 65% rename from assets/cloudflare-workers-ai-CQCSOdn6.js rename to assets/cloudflare-workers-ai-DQ5b742r.js index 00c62ee4af79eba726292afb623323ca0b190057..74278fd900034a59401dec74168b6203e071b70e 100644 --- a/assets/cloudflare-workers-ai-CQCSOdn6.js +++ b/assets/cloudflare-workers-ai-DQ5b742r.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,k as h,m as g,y as _}from"./index-B9WIljdS.js";import{b as v}from"./route-block-gWR0cCIm.js";const y=`cloudflare-workers-ai`;var b=t({__name:`cloudflare-workers-ai`,setup(t){let{t:v}=e(),b=n(),x=_(),{providers:S}=r(x),C=i(()=>x.getProviderMetadata(y)),w=i({get:()=>S.value[y]?.apiKey||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=i({get:()=>S.value[y]?.accountId||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});s(()=>{x.initializeProvider(y),w.value=S.value[y]?.apiKey||``,T.value=S.value[y]?.accountId||``}),l([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)=>(c(),a(d(f),{"provider-name":C.value?.localizedName,"provider-icon-color":C.value?.iconColor,"on-back":()=>d(b).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(v)(`settings.pages.providers.common.section.basic.title`),description:d(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:u(()=>[o(d(h),{modelValue:w.value,"onUpdate:modelValue":t[0]||=e=>w.value=e,"provider-name":C.value?.localizedName,placeholder:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),o(d(g),{modelValue:T.value,"onUpdate:modelValue":t[1]||=e=>T.value=e,label:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:d(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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,k as h,m as g,y as _}from"./index-BIGBQG2E.js";import{b as v}from"./route-block-gWR0cCIm.js";const y=`cloudflare-workers-ai`;var b=o({__name:`cloudflare-workers-ai`,setup(o){let{t:v}=e(),b=n(),x=_(),{providers:S}=r(x),C=i(()=>x.getProviderMetadata(y)),w=i({get:()=>S.value[y]?.apiKey||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=i({get:()=>S.value[y]?.accountId||``,set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});s(()=>{x.initializeProvider(y),w.value=S.value[y]?.apiKey||``,T.value=S.value[y]?.accountId||``}),l([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){S.value[y]={...C.value?.defaultOptions}}return(e,n)=>(c(),a(d(f),{"provider-name":C.value?.localizedName,"provider-icon-color":C.value?.iconColor,"on-back":()=>d(b).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(v)(`settings.pages.providers.common.section.basic.title`),description:d(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:u(()=>[t(d(h),{modelValue:w.value,"onUpdate:modelValue":n[0]||=e=>w.value=e,"provider-name":C.value?.localizedName,placeholder:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[1]||=e=>T.value=e,label:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:d(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:d(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-DsJzj-Kq.js b/assets/color-scheme-Cg53Mdi1.js similarity index 83% rename from assets/color-scheme-DsJzj-Kq.js rename to assets/color-scheme-Cg53Mdi1.js index 44174958c8fb8feb70bd553d697e42eab4a983b5..7166b084bc9295d90875e91d07e1ca02198e0848 100644 --- a/assets/color-scheme-DsJzj-Kq.js +++ b/assets/color-scheme-Cg53Mdi1.js @@ -1 +1 @@ -import{A as e,b as t,cK as n,cO as r,cq as i,d$ as a,dN as o,dS as s,dV as c,dW as l,dY as u,dZ as d,d_ as f,e7 as p,e8 as m,eb as h,ef as g,eg as _,em as v,eq as y,o as b}from"./index-B9WIljdS.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=a({__name:`color-scheme`,setup(r){let a=b(),{t:x}=e();return(e,r)=>{let b=h(`motion`);return p(),u(s,null,[_((p(),l(v(i),{"mb-2":``,title:v(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:g(()=>[_((p(),u(`div`,C,[c(`span`,w,y(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),c(`label`,T,[_(c(`input`,{"onUpdate:modelValue":r[0]||=e=>v(a).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[o,v(a).themeColorsHueDynamic]]),r[2]||=c(`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),d(` `+y(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[b]]),_(f(v(n),{modelValue:v(a).themeColorsHue,"onUpdate:modelValue":r[1]||=e=>v(a).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:300,disabled:v(a).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[b]]),_((p(),u(`div`,E,[r[4]||=c(`span`,{"bg-primary-50":``},`50`,-1),r[5]||=c(`span`,{"bg-primary-100":``},`100`,-1),r[6]||=c(`span`,{"bg-primary-200":``},`200`,-1),r[7]||=c(`span`,{"bg-primary-300":``},`300`,-1),r[8]||=c(`span`,{"bg-primary-400":``},`400`,-1),r[9]||=c(`span`,{"bg-primary-500":``},`500`,-1),_((p(),u(`div`,D,r[3]||=[c(`span`,{"bg-primary-600":``},`600`,-1),c(`span`,{"bg-primary-700":``},`700`,-1),c(`span`,{"bg-primary-800":``},`800`,-1),c(`span`,{"bg-primary-900":``},`900`,-1),c(`span`,{"bg-primary-950":``},`950`,-1)])),[[b]])])),[[b]]),_((p(),u(`div`,O,r[10]||=[c(`span`,{bg:`primary-500/5`},`500/5`,-1),c(`span`,{bg:`primary-500/10`},`500/10`,-1),c(`span`,{bg:`primary-500/20`},`500/20`,-1),c(`span`,{bg:`primary-500/30`},`500/30`,-1),c(`span`,{bg:`primary-500/40`},`500/40`,-1),c(`span`,{bg:`primary-500/50`},`500/50`,-1),c(`span`,{bg:`primary-500/60`},`500/60`,-1),c(`span`,{bg:`primary-500/70`},`500/70`,-1),c(`span`,{bg:`primary-500/80`},`500/80`,-1),c(`span`,{bg:`primary-500/90`},`500/90`,-1),c(`span`,{bg:`primary-500`},`500`,-1)])),[[b]])]),_:1},8,[`title`])),[[b]]),_((p(),l(v(i),{"mb-2":``,title:v(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:g(()=>[(p(!0),u(s,null,m(e.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:n,description:r,colors:i},a)=>_((p(),u(`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`},[c(`div`,null,[c(`span`,A,y(e.$rt(n)),1),c(`div`,j,y(e.$rt(r)),1)]),f(v(t),{colors:i.map((t,n)=>({hex:v(S)[a][n],name:e.$rt(t)}))},null,8,[`colors`])],8,k)),[[b]])),128))]),_:1},8,[`title`])),[[b]]),_((p(),u(`div`,M,r[11]||=[c(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[b]])],64)}}});typeof x==`function`&&x(N);var P=r(N,[[`__scopeId`,`data-v-659ad349`]]);export{P as default}; \ No newline at end of file +import{A as e,b as t,cL as n,cP as r,cq as i,d$ as a,dO as o,dT as s,dW as c,dX as l,dZ as u,d_ as d,e0 as f,e8 as p,e9 as m,ec as h,eg as g,eh as _,en as v,er as y,o as b}from"./index-BIGBQG2E.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=f({__name:`color-scheme`,setup(r){let f=b(),{t:x}=e();return(e,r)=>{let b=h(`motion`);return p(),u(s,null,[_((p(),l(v(i),{"mb-2":``,title:v(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:g(()=>[_((p(),u(`div`,C,[c(`span`,w,y(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),c(`label`,T,[_(c(`input`,{"onUpdate:modelValue":r[0]||=e=>v(f).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[o,v(f).themeColorsHueDynamic]]),r[2]||=c(`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),d(` `+y(e.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[b]]),_(a(v(n),{modelValue:v(f).themeColorsHue,"onUpdate:modelValue":r[1]||=e=>v(f).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:300,disabled:v(f).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[b]]),_((p(),u(`div`,E,[r[4]||=c(`span`,{"bg-primary-50":``},`50`,-1),r[5]||=c(`span`,{"bg-primary-100":``},`100`,-1),r[6]||=c(`span`,{"bg-primary-200":``},`200`,-1),r[7]||=c(`span`,{"bg-primary-300":``},`300`,-1),r[8]||=c(`span`,{"bg-primary-400":``},`400`,-1),r[9]||=c(`span`,{"bg-primary-500":``},`500`,-1),_((p(),u(`div`,D,r[3]||=[c(`span`,{"bg-primary-600":``},`600`,-1),c(`span`,{"bg-primary-700":``},`700`,-1),c(`span`,{"bg-primary-800":``},`800`,-1),c(`span`,{"bg-primary-900":``},`900`,-1),c(`span`,{"bg-primary-950":``},`950`,-1)])),[[b]])])),[[b]]),_((p(),u(`div`,O,r[10]||=[c(`span`,{bg:`primary-500/5`},`500/5`,-1),c(`span`,{bg:`primary-500/10`},`500/10`,-1),c(`span`,{bg:`primary-500/20`},`500/20`,-1),c(`span`,{bg:`primary-500/30`},`500/30`,-1),c(`span`,{bg:`primary-500/40`},`500/40`,-1),c(`span`,{bg:`primary-500/50`},`500/50`,-1),c(`span`,{bg:`primary-500/60`},`500/60`,-1),c(`span`,{bg:`primary-500/70`},`500/70`,-1),c(`span`,{bg:`primary-500/80`},`500/80`,-1),c(`span`,{bg:`primary-500/90`},`500/90`,-1),c(`span`,{bg:`primary-500`},`500`,-1)])),[[b]])]),_:1},8,[`title`])),[[b]]),_((p(),l(v(i),{"mb-2":``,title:v(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:g(()=>[(p(!0),u(s,null,m(e.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:n,description:r,colors:i},o)=>_((p(),u(`div`,{key:o,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+o*10,delay:550+o*50,transition:`all ease-in-out duration-250`},[c(`div`,null,[c(`span`,A,y(e.$rt(n)),1),c(`div`,j,y(e.$rt(r)),1)]),a(v(t),{colors:i.map((t,n)=>({hex:v(S)[o][n],name:e.$rt(t)}))},null,8,[`colors`])],8,k)),[[b]])),128))]),_:1},8,[`title`])),[[b]]),_((p(),u(`div`,M,r[11]||=[c(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[b]])],64)}}});typeof x==`function`&&x(N);var P=r(N,[[`__scopeId`,`data-v-659ad349`]]);export{P as default}; \ No newline at end of file diff --git a/assets/consciousness-C1mosjsj.js b/assets/consciousness-BuF1Ojbx.js similarity index 51% rename from assets/consciousness-C1mosjsj.js rename to assets/consciousness-BuF1Ojbx.js index 2988209426f382a931395b014f67b3f77ab06bc4..5f17303e68434d4a3c338e96274a69007ae8fbcb 100644 --- a/assets/consciousness-C1mosjsj.js +++ b/assets/consciousness-BuF1Ojbx.js @@ -1 +1 @@ -import{A as e,ci as t,cl as n,cm as ee,cn as te,d$ as r,d3 as ne,d8 as i,dP as re,dS as a,dV as o,dW as s,dX as c,dY as l,dZ as u,d_ as ie,e5 as ae,e7 as d,e8 as f,eb as p,ef as m,eg as h,eh as g,em as _,eq as v,x as oe,y as se}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={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`},ce={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`},I={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=r({__name:`consciousness`,setup(r){let y=se(),U=oe(),{configuredChatProvidersMetadata:W}=i(y),{activeProvider:G,activeModel:K,customModelName:le,modelSearchQuery:q,supportsModelListing:J,providerModels:Y,isLoadingActiveProviderModels:X,activeProviderModelError:Z}=i(U),{t:Q}=e();ae(async()=>{await U.loadModelsForProvider(G.value)});function $(e){le.value=e}return(e,r)=>{let i=p(`motion`);return d(),l(a,null,[o(`div`,b,[o(`div`,null,[o(`div`,x,[o(`div`,null,[o(`h2`,S,v(_(Q)(`settings.pages.providers.title`)),1),o(`div`,C,[o(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),o(`div`,w,[_(W).length>0?(d(),l(`fieldset`,T,[(d(!0),l(a,null,f(_(W),e=>(d(),s(_(n),{id:e.id,key:e.id,modelValue:_(G),"onUpdate:modelValue":r[0]||=e=>g(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))])):(d(),l(`div`,E,[ie(_(ne),{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:m(()=>r[4]||=[o(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),o(`div`,{class:`flex flex-col`},[o(`span`,{class:`font-medium`},`No Providers Configured`),o(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),o(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),_(G)&&_(J)?(d(),l(`div`,D,[o(`div`,O,[o(`div`,null,[o(`h2`,k,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),o(`div`,A,[o(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),_(X)?(d(),l(`div`,j,[r[5]||=o(`div`,{class:`mr-2 animate-spin`},[o(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),o(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):_(Z)?(d(),s(_(t),{key:1,title:_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:_(Z)},null,8,[`title`,`error`])):_(Y).length===0&&!_(X)?(d(),s(_(te),{key:2,type:`warning`},{title:m(()=>[u(v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:m(()=>[u(v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):_(Y).length>0?(d(),s(_(ee),{key:3,modelValue:_(K),"onUpdate:modelValue":r[1]||=e=>g(K)?K.value=e:null,"search-query":_(q),"onUpdate:searchQuery":r[2]||=e=>g(q)?q.value=e:null,items:_(Y).sort((e,t)=>e.id===_(K)?-1:t.id===_(K)?1:0),searchable:!0,"search-placeholder":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:_(q)}),"search-results-text":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":_(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`])):c(``,!0)])])):_(G)&&!_(J)?(d(),l(`div`,M,[o(`div`,N,[o(`div`,null,[o(`h2`,P,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),o(`div`,F,[o(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),o(`div`,ce,[r[6]||=o(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),o(`div`,I,[o(`span`,L,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),o(`span`,R,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),o(`div`,z,[o(`label`,B,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),h(o(`input`,{"onUpdate:modelValue":r[3]||=e=>g(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:_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,V),[[re,_(K)]])])])])):c(``,!0)]),h((d(),l(`div`,H,r[7]||=[o(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[i]])],64)}}});typeof y==`function`&&y(U);var W=U;export{W as default}; \ No newline at end of file +import{A as e,ci as t,cl as ee,cm as te,cn as n,d$ as ne,d4 as re,d9 as r,dQ as ie,dT as i,dW as a,dX as o,dY as s,dZ as c,d_ as l,e0 as u,e6 as ae,e8 as d,e9 as f,ec as p,eg as m,eh as h,ei as g,en as _,er as v,x as oe,y as se}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={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`},ce={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`},I={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=u({__name:`consciousness`,setup(u){let y=se(),U=oe(),{configuredChatProvidersMetadata:W}=r(y),{activeProvider:G,activeModel:K,customModelName:le,modelSearchQuery:q,supportsModelListing:J,providerModels:Y,isLoadingActiveProviderModels:X,activeProviderModelError:Z}=r(U),{t:Q}=e();ae(async()=>{await U.loadModelsForProvider(G.value)});function $(e){le.value=e}return(e,r)=>{let u=p(`motion`);return d(),c(i,null,[a(`div`,b,[a(`div`,null,[a(`div`,x,[a(`div`,null,[a(`h2`,S,v(_(Q)(`settings.pages.providers.title`)),1),a(`div`,C,[a(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),a(`div`,w,[_(W).length>0?(d(),c(`fieldset`,T,[(d(!0),c(i,null,f(_(W),e=>(d(),o(_(ee),{id:e.id,key:e.id,modelValue:_(G),"onUpdate:modelValue":r[0]||=e=>g(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))])):(d(),c(`div`,E,[ne(_(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:m(()=>r[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]})]))])])]),_(G)&&_(J)?(d(),c(`div`,D,[a(`div`,O,[a(`div`,null,[a(`h2`,k,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),a(`div`,A,[a(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),_(X)?(d(),c(`div`,j,[r[5]||=a(`div`,{class:`mr-2 animate-spin`},[a(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),a(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):_(Z)?(d(),o(_(t),{key:1,title:_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:_(Z)},null,8,[`title`,`error`])):_(Y).length===0&&!_(X)?(d(),o(_(n),{key:2,type:`warning`},{title:m(()=>[l(v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:m(()=>[l(v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):_(Y).length>0?(d(),o(_(te),{key:3,modelValue:_(K),"onUpdate:modelValue":r[1]||=e=>g(K)?K.value=e:null,"search-query":_(q),"onUpdate:searchQuery":r[2]||=e=>g(q)?q.value=e:null,items:_(Y).sort((e,t)=>e.id===_(K)?-1:t.id===_(K)?1:0),searchable:!0,"search-placeholder":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:_(q)}),"search-results-text":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":_(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)])])):_(G)&&!_(J)?(d(),c(`div`,M,[a(`div`,N,[a(`div`,null,[a(`h2`,P,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),a(`div`,F,[a(`span`,null,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),a(`div`,ce,[r[6]||=a(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),a(`div`,I,[a(`span`,L,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),a(`span`,R,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),a(`div`,z,[a(`label`,B,v(_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),h(a(`input`,{"onUpdate:modelValue":r[3]||=e=>g(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:_(Q)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,V),[[ie,_(K)]])])])])):s(``,!0)]),h((d(),c(`div`,H,r[7]||=[a(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof y==`function`&&y(U);var W=U;export{W as default}; \ No newline at end of file diff --git a/assets/core-DcnIWNLR.js b/assets/core-DLp7fhGT.js similarity index 98% rename from assets/core-DcnIWNLR.js rename to assets/core-DLp7fhGT.js index af33709cd2a0dae747f280aae2fb0a123639d2a4..2168a4303ccd849c7bccdd44f46271dd53821e58 100644 --- a/assets/core-DcnIWNLR.js +++ b/assets/core-DLp7fhGT.js @@ -1 +1 @@ -import{$ as ee,B as te,C as e,D as t,E as n,F as r,G as i,H as a,I as o,J as s,K as c,L as l,M as u,N as d,O as f,P as p,Q as m,R as h,S as g,T as _,U as v,V as y,W as b,X as x,Y as S,Z as C,_ as w,a$ as T,a1 as E,a2 as D,a3 as O,a4 as k,a5 as A,a6 as j,a7 as M,a8 as N,a9 as P,aA as F,aB as I,aC as L,aD as R,aE as z,aF as B,aG as V,aH as H,aI as U,aJ as W,aK as G,aL as K,aM as q,aN as J,aO as Y,aP as X,aQ as Z,aR as Q,aS as ne,aT as re,aU as ie,aV as ae,aW as oe,aX as se,aY as ce,aZ as le,a_ as ue,aa as de,ab as fe,ac as pe,ad as me,ae as he,af as ge,ag as _e,ah as ve,ai as ye,aj as be,ak as xe,al as Se,am as $,an as Ce,ao as we,ap as Te,aq as Ee,ar as De,as as Oe,at as ke,au as Ae,av as je,aw as Me,ax as Ne,ay as Pe,az as Fe,b0 as Ie,b1 as Le,b2 as Re,b3 as ze,b4 as Be,b5 as Ve,b6 as He,b7 as Ue,b8 as We,b9 as Ge,bA as Ke,bB as qe,bC as Je,bD as Ye,bE as Xe,bF as Ze,bG as Qe,bH as $e,bI as et,bJ as tt,bK as nt,bL as rt,bM as it,bN as at,bO as ot,bP 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-B9WIljdS.js";export{Pe as $ZodArray,it as $ZodAsyncError,Fe as $ZodBase64,F as $ZodBase64URL,I as $ZodBoolean,L as $ZodCIDRv4,R as $ZodCIDRv6,z as $ZodCUID,B as $ZodCUID2,V as $ZodCatch,yt as $ZodCheck,bt as $ZodCheckEndsWith,xt as $ZodCheckGreaterThan,St as $ZodCheckIncludes,Ct as $ZodCheckLengthEquals,wt as $ZodCheckLessThan,Tt as $ZodCheckLowerCase,Et as $ZodCheckMaxLength,Dt as $ZodCheckMinLength,Ot as $ZodCheckMultipleOf,kt as $ZodCheckNumberFormat,At as $ZodCheckOverwrite,jt as $ZodCheckRegex,Mt as $ZodCheckStartsWith,Nt as $ZodCheckStringFormat,Ke 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,T as $ZodNumber,Ie 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,ct as $ZodULID,lt as $ZodURL,ut as $ZodUUID,dt as $ZodUnion,ft as $ZodUnknown,pt as $ZodXID,at as $constructor,vt 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,ee as _jwt,E 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,de 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,mt as isValidBase64,ht as isValidBase64URL,gt as isValidJWT,Ne as registry,Ze as safeParse,Qe as safeParseAsync,e as toJSONSchema,_t as version}; \ No newline at end of file +import{$ as ee,B as te,C as e,D as t,E as n,F as r,G as i,H as a,I as o,J as s,K as c,L as l,M as u,N as d,O as f,P as p,Q as m,R as h,S as g,T as _,U as v,V as y,W as b,X as x,Y as S,Z as C,_ as w,a$ as T,a1 as E,a2 as D,a3 as O,a4 as k,a5 as A,a6 as j,a7 as M,a8 as N,a9 as P,aA as F,aB as I,aC as L,aD as R,aE as z,aF as B,aG as V,aH as H,aI as U,aJ as W,aK as G,aL as K,aM as q,aN as J,aO as Y,aP as X,aQ as Z,aR as Q,aS as ne,aT as re,aU as ie,aV as ae,aW as oe,aX as se,aY as ce,aZ as le,a_ as ue,aa as de,ab as fe,ac as pe,ad as me,ae as he,af as ge,ag as _e,ah as ve,ai as ye,aj as be,ak as xe,al as Se,am as $,an as Ce,ao as we,ap as Te,aq as Ee,ar as De,as as Oe,at as ke,au as Ae,av as je,aw as Me,ax as Ne,ay as Pe,az as Fe,b0 as Ie,b1 as Le,b2 as Re,b3 as ze,b4 as Be,b5 as Ve,b6 as He,b7 as Ue,b8 as We,b9 as Ge,bA as Ke,bB as qe,bC as Je,bD as Ye,bE as Xe,bF as Ze,bG as Qe,bH as $e,bI as et,bJ as tt,bK as nt,bL as rt,bM as it,bN as at,bO as ot,bP 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-BIGBQG2E.js";export{Pe as $ZodArray,it as $ZodAsyncError,Fe as $ZodBase64,F as $ZodBase64URL,I as $ZodBoolean,L as $ZodCIDRv4,R as $ZodCIDRv6,z as $ZodCUID,B as $ZodCUID2,V as $ZodCatch,yt as $ZodCheck,bt as $ZodCheckEndsWith,xt as $ZodCheckGreaterThan,St as $ZodCheckIncludes,Ct as $ZodCheckLengthEquals,wt as $ZodCheckLessThan,Tt as $ZodCheckLowerCase,Et as $ZodCheckMaxLength,Dt as $ZodCheckMinLength,Ot as $ZodCheckMultipleOf,kt as $ZodCheckNumberFormat,At as $ZodCheckOverwrite,jt as $ZodCheckRegex,Mt as $ZodCheckStartsWith,Nt as $ZodCheckStringFormat,Ke 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,T as $ZodNumber,Ie 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,ct as $ZodULID,lt as $ZodURL,ut as $ZodUUID,dt as $ZodUnion,ft as $ZodUnknown,pt as $ZodXID,at as $constructor,vt 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,ee as _jwt,E 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,de 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,mt as isValidBase64,ht as isValidBase64URL,gt as isValidJWT,Ne as registry,Ze as safeParse,Qe as safeParseAsync,e as toJSONSchema,_t as version}; \ No newline at end of file diff --git a/assets/deepseek-BUQnh-tD.js b/assets/deepseek-ByVQlTAc.js similarity index 55% rename from assets/deepseek-BUQnh-tD.js rename to assets/deepseek-ByVQlTAc.js index f2d0d95e42170c2fdefd92e7872e5d38c79579dc..8a50a9d0ab138fa506795158d1c584ddbbd564f8 100644 --- a/assets/deepseek-BUQnh-tD.js +++ b/assets/deepseek-ByVQlTAc.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`deepseek`;var x=t({__name:`deepseek`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`deepseek`;var x=o({__name:`deepseek`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-CTBzNlUY.js b/assets/default-CTBzNlUY.js deleted file mode 100644 index 3d62871a3bed2f58fb378f2ba85b5df3f620ef58..0000000000000000000000000000000000000000 --- a/assets/default-CTBzNlUY.js +++ /dev/null @@ -1 +0,0 @@ -import{d$ as e,d4 as t,dV as n,dY as r,d_ as i,e7 as a,em as o}from"./index-B9WIljdS.js";import{b as s}from"./HeaderLink-Dp-qWbnF.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=e({__name:`default`,setup(e){return(e,d)=>(a(),r(`div`,c,[n(`div`,l,[i(s)]),n(`div`,u,[i(o(t))])]))}}),f=d;export{f as default}; \ No newline at end of file diff --git a/assets/default-UaFS1yzN.js b/assets/default-UaFS1yzN.js new file mode 100644 index 0000000000000000000000000000000000000000..70fa2958f1e7a58b07c3bdd476184c4991063532 --- /dev/null +++ b/assets/default-UaFS1yzN.js @@ -0,0 +1 @@ +import{d$ as e,d5 as t,dW as n,dZ as r,e0 as i,e8 as a,en as o}from"./index-BIGBQG2E.js";import{b as s}from"./HeaderLink-q8Ont_Aw.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(),r(`div`,c,[n(`div`,l,[e(s)]),n(`div`,u,[e(o(t))])]))}}),f=d;export{f as default}; \ No newline at end of file diff --git a/assets/default-node-CUnR0j1U.js b/assets/default-node-BdKlRQ9_.js similarity index 64% rename from assets/default-node-CUnR0j1U.js rename to assets/default-node-BdKlRQ9_.js index ef129d6214cee7e4dbd725827779184353aa5ead..decdbf6c4f5de9ec1f36d341ab060448ccae8304 100644 --- a/assets/default-node-CUnR0j1U.js +++ b/assets/default-node-BdKlRQ9_.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-D71AMOyU.js","assets/index-B9WIljdS.js","assets/index-CdrV4-fw.css"])))=>i.map(i=>d[i]); -import{d7 as e,eu as t}from"./index-B9WIljdS.js";async function n(){let{createRequire:n}=await e(async()=>{let{createRequire:e}=await import(`./__vite-browser-external-D71AMOyU.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-D71AMOyU.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-CLt_IrJn.js","assets/index-BIGBQG2E.js","assets/index-9HJVUVbL.css"])))=>i.map(i=>d[i]); +import{d8 as e,ev as t}from"./index-BIGBQG2E.js";async function n(){let{createRequire:n}=await e(async()=>{let{createRequire:e}=await import(`./__vite-browser-external-CLt_IrJn.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-CLt_IrJn.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-ClnSqQ-z.js b/assets/delays-DsBi38hN.js similarity index 68% rename from assets/delays-ClnSqQ-z.js rename to assets/delays-DsBi38hN.js index dd988ab3fdbc482a1be9d4ecdfa6a132bb820c12..620e47d9c1b4b6b1a41bfe77b68b77448de1a4a2 100644 --- a/assets/delays-ClnSqQ-z.js +++ b/assets/delays-DsBi38hN.js @@ -1 +1 @@ -import"./Basic-BfTEEIor.js";import{b as e}from"./Textarea-Q_8nrbKN.js";import{c2 as t,cu as n,d$ as r,dS as i,dV as a,dY as o,d_ as s,e7 as c,e8 as l,ei as u,em as d,eq as f}from"./index-B9WIljdS.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=r({__name:`delays`,setup(r){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(),o(`div`,p,[a(`div`,m,[s(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`]),a(`button`,h,f(S.value?`Processing...`:`Send`),1)]),a(`div`,g,[a(`div`,_,[n[1]||=a(`h3`,{"font-normal":``},` Emotion Message `,-1),(c(!0),o(i,null,l(b.value,e=>(c(),o(`div`,{key:e},[a(`div`,null,f(e),1)]))),128))]),a(`div`,v,[n[2]||=a(`h3`,{"font-normal":``},` Delays `,-1),(c(!0),o(i,null,l(x.value,e=>(c(),o(`div`,{key:e},[a(`div`,null,f(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file +import"./Basic-BgQfJAar.js";import{b as e}from"./Textarea-rGc1yvjC.js";import{c2 as t,cu as n,d$ as r,dT as i,dW as a,dZ as o,e0 as s,e8 as c,e9 as l,ej as u,en as d,er as f}from"./index-BIGBQG2E.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(),o(`div`,p,[a(`div`,m,[r(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`]),a(`button`,h,f(S.value?`Processing...`:`Send`),1)]),a(`div`,g,[a(`div`,_,[n[1]||=a(`h3`,{"font-normal":``},` Emotion Message `,-1),(c(!0),o(i,null,l(b.value,e=>(c(),o(`div`,{key:e},[a(`div`,null,f(e),1)]))),128))]),a(`div`,v,[n[2]||=a(`h3`,{"font-normal":``},` Delays `,-1),(c(!0),o(i,null,l(x.value,e=>(c(),o(`div`,{key:e},[a(`div`,null,f(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/developer-BNL2hIKB.js b/assets/developer-BNL2hIKB.js deleted file mode 100644 index d0d413090b0ec1838a398a4c65d5fecb253f801a..0000000000000000000000000000000000000000 --- a/assets/developer-BNL2hIKB.js +++ /dev/null @@ -1 +0,0 @@ -import{d$ as e,dM as t,dN as n,dS as r,dV as i,dX as a,dY as o,dZ as s,d_ as c,e2 as l,e7 as u,eb as d,ec as f,ef as p,eg as m,em as h,en as g,eq as _,o as v}from"./index-B9WIljdS.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=e({__name:`CheckBar`,props:l({text:{},iconOn:{},iconOff:{},description:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let r=f(e,`modelValue`);return(e,l)=>(u(),o(`label`,b,[m(i(`input`,{"onUpdate:modelValue":l[0]||=e=>r.value=e,"aria-checked":r.value,type:`checkbox`,hidden:``},null,8,x),[[n,r.value]]),i(`div`,null,[s(_(e.$t(e.text))+` `,1),e.description?(u(),o(`div`,S,_(e.$t(e.description)),1)):a(``,!0)]),c(t,{name:`slide-away`,mode:`out-in`},{default:p(()=>[r.value?(u(),o(`div`,{key:0,class:g(e.iconOn),transition:`all ease-in-out duration-250`},null,2)):(u(),o(`div`,{key:1,class:g(e.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=e({__name:`developer`,setup(e){let t=v();return(e,n)=>{let a=d(`motion`);return u(),o(r,null,[m(c(w,{modelValue:h(t).disableTransitions,"onUpdate:modelValue":n[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`]),[[a]]),m(c(w,{modelValue:h(t).usePageSpecificTransitions,"onUpdate:modelValue":n[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`]),[[a]]),m((u(),o(`div`,T,n[2]||=[i(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[a]])],64)}}});typeof y==`function`&&y(E);var D=E;export{D as default}; \ No newline at end of file diff --git a/assets/developer-DGJJ6tta.js b/assets/developer-DGJJ6tta.js new file mode 100644 index 0000000000000000000000000000000000000000..9bb603acc6ba8441bf3fe66405db236e5b497da5 --- /dev/null +++ b/assets/developer-DGJJ6tta.js @@ -0,0 +1 @@ +import{d$ as e,dN as t,dO as n,dT as r,dW as i,dY as a,dZ as o,d_ as s,e0 as c,e3 as l,e8 as u,ec as d,ed as f,eg as p,eh as m,en as h,eo as g,er as _,o as v}from"./index-BIGBQG2E.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(r){let c=f(r,`modelValue`);return(r,l)=>(u(),o(`label`,b,[m(i(`input`,{"onUpdate:modelValue":l[0]||=e=>c.value=e,"aria-checked":c.value,type:`checkbox`,hidden:``},null,8,x),[[n,c.value]]),i(`div`,null,[s(_(r.$t(r.text))+` `,1),r.description?(u(),o(`div`,S,_(r.$t(r.description)),1)):a(``,!0)]),e(t,{name:`slide-away`,mode:`out-in`},{default:p(()=>[c.value?(u(),o(`div`,{key:0,class:g(r.iconOn),transition:`all ease-in-out duration-250`},null,2)):(u(),o(`div`,{key:1,class:g(r.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(t){let n=v();return(t,a)=>{let s=d(`motion`);return u(),o(r,null,[m(e(w,{modelValue:h(n).disableTransitions,"onUpdate:modelValue":a[0]||=e=>h(n).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`]),[[s]]),m(e(w,{modelValue:h(n).usePageSpecificTransitions,"onUpdate:modelValue":a[1]||=e=>h(n).usePageSpecificTransitions=e,disabled:h(n).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`]),[[s]]),m((u(),o(`div`,T,a[2]||=[i(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[s]])],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-BmRGzHbw.js b/assets/effect--zg3C1LQ-gF-vx9Va.js similarity index 72% rename from assets/effect--zg3C1LQ-BmRGzHbw.js rename to assets/effect--zg3C1LQ-gF-vx9Va.js index faa579ca66953306daa30e8cdcadeafba54ab680..f640d9aa66ac379e8ca62d9ba2ee38b0b63c5ba1 100644 --- a/assets/effect--zg3C1LQ-BmRGzHbw.js +++ b/assets/effect--zg3C1LQ-gF-vx9Va.js @@ -1 +1 @@ -import{bR as e,d7 as t}from"./index-B9WIljdS.js";const n=async()=>{let{JSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_effect_xsschema-snGRN6_r.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{bR as e,d8 as t}from"./index-BIGBQG2E.js";const n=async()=>{let{JSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_effect_xsschema-snGRN6_r.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/elevenlabs-X1PaqUDW.js b/assets/elevenlabs-W4waKSIH.js similarity index 69% rename from assets/elevenlabs-X1PaqUDW.js rename to assets/elevenlabs-W4waKSIH.js index 21b8624178476360122b74fe740e4129bf117269..3587a54d22e421c4ed2815a1737a84d48cba5e57 100644 --- a/assets/elevenlabs-X1PaqUDW.js +++ b/assets/elevenlabs-W4waKSIH.js @@ -1 +1 @@ -import{A as e,cN as t,cS as n,d$ as r,d8 as i,dU as a,dV as o,dW as s,d_ as c,e as l,e5 as u,e7 as d,ee as f,ef as p,ei as m,em as h,f as g,v as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=r({__name:`elevenlabs`,setup(r){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=m(0),w=m(1),T=m(0),E=m(0),D=m(.5),O=m(.75),k=m(!1),A=_(),j=v(),{providers:M}=i(j),{t:N}=e(),P=a(()=>!!M.value[x]?.apiKey),F=a(()=>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 u(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)}),f(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),f(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),f(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),f(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),f(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),f(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),f(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),f(M,async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,r)=>(d(),s(h(l),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":p(()=>[o(`div`,b,[c(h(t),{modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:h(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`]),c(h(t),{modelValue:w.value,"onUpdate:modelValue":r[1]||=e=>w.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),c(h(t),{modelValue:T.value,"onUpdate:modelValue":r[2]||=e=>T.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:h(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`]),c(h(t),{modelValue:E.value,"onUpdate:modelValue":r[3]||=e=>E.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),c(h(t),{modelValue:D.value,"onUpdate:modelValue":r[4]||=e=>D.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),c(h(t),{modelValue:O.value,"onUpdate:modelValue":r[5]||=e=>O.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),c(h(n),{modelValue:k.value,"onUpdate:modelValue":r[6]||=e=>k.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:p(()=>[c(h(g),{"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{A as e,cO as t,cT as n,d$ as r,d9 as i,dV as a,dW as o,dX as s,e as c,e0 as l,e6 as u,e8 as d,ef as f,eg as p,ej as m,en as h,f as g,v as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=l({__name:`elevenlabs`,setup(l){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=m(0),w=m(1),T=m(0),E=m(0),D=m(.5),O=m(.75),k=m(!1),A=_(),j=v(),{providers:M}=i(j),{t:N}=e(),P=a(()=>!!M.value[x]?.apiKey),F=a(()=>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 u(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)}),f(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),f(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),f(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),f(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),f(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),f(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),f(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),f(M,async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(d(),s(h(c),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":p(()=>[o(`div`,b,[r(h(t),{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:h(N)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(h(t),{modelValue:w.value,"onUpdate:modelValue":i[1]||=e=>w.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(h(t),{modelValue:T.value,"onUpdate:modelValue":i[2]||=e=>T.value=e,label:h(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:h(N)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(h(t),{modelValue:E.value,"onUpdate:modelValue":i[3]||=e=>E.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(h(t),{modelValue:D.value,"onUpdate:modelValue":i[4]||=e=>D.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(h(t),{modelValue:O.value,"onUpdate:modelValue":i[5]||=e=>O.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(h(n),{modelValue:k.value,"onUpdate:modelValue":i[6]||=e=>k.value=e,label:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:h(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:p(()=>[r(h(g),{"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-UjFoSlJC.js b/assets/emotions-yTSpRcgw.js similarity index 68% rename from assets/emotions-UjFoSlJC.js rename to assets/emotions-yTSpRcgw.js index 6faae22e415e8be465bc34673d4a18b291c93434..abb2f63d5c4a57173a4b5e1e3fd4a61001fad2e8 100644 --- a/assets/emotions-UjFoSlJC.js +++ b/assets/emotions-yTSpRcgw.js @@ -1 +1 @@ -import"./Basic-BfTEEIor.js";import{b as e}from"./Textarea-Q_8nrbKN.js";import{c3 as t,c5 as n,cu as r,d$ as i,dS as a,dV as o,dY as s,d_ as c,e7 as l,e8 as u,ei as d,em as f,eq as p}from"./index-B9WIljdS.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},y={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var b=i({__name:`emotions`,setup(i){let b=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(),s(`div`,m,[o(`div`,h,[c(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`]),o(`button`,g,p(C.value?`Processing...`:`Send`),1)]),o(`div`,_,[o(`div`,v,[n[1]||=o(`h3`,{"font-normal":``},` Messages `,-1),(l(!0),s(a,null,u(x.value,e=>(l(),s(`div`,{key:e},[o(`div`,null,p(e),1)]))),128))]),o(`div`,y,[n[2]||=o(`h3`,{"font-normal":``},` Emotions `,-1),(l(!0),s(a,null,u(S.value,e=>(l(),s(`div`,{key:e},[o(`div`,null,p(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file +import"./Basic-BgQfJAar.js";import{b as e}from"./Textarea-rGc1yvjC.js";import{c3 as t,c5 as n,cu as r,d$ as i,dT as a,dW as o,dZ as s,e0 as c,e8 as l,e9 as u,ej as d,en as f,er as p}from"./index-BIGBQG2E.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(),s(`div`,m,[o(`div`,h,[i(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`]),o(`button`,g,p(C.value?`Processing...`:`Send`),1)]),o(`div`,_,[o(`div`,v,[n[1]||=o(`h3`,{"font-normal":``},` Messages `,-1),(l(!0),s(a,null,u(x.value,e=>(l(),s(`div`,{key:e},[o(`div`,null,p(e),1)]))),128))]),o(`div`,y,[n[2]||=o(`h3`,{"font-normal":``},` Emotions `,-1),(l(!0),s(a,null,u(S.value,e=>(l(),s(`div`,{key:e},[o(`div`,null,p(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file diff --git a/assets/featherless-ai-Spcctzbu.js b/assets/featherless-ai-DibRGwb-.js similarity index 55% rename from assets/featherless-ai-Spcctzbu.js rename to assets/featherless-ai-DibRGwb-.js index 6176ac1030228438acaafcf4719b362c1f345a8e..da79222749410dfdbbe4d375da6e0a5501b6266b 100644 --- a/assets/featherless-ai-Spcctzbu.js +++ b/assets/featherless-ai-DibRGwb-.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`featherless-ai`;var x=t({__name:`featherless-ai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`featherless-ai`;var x=o({__name:`featherless-ai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-DAxYSZzI.js b/assets/filter-message-Cm2-SMhJ.js similarity index 66% rename from assets/filter-message-DAxYSZzI.js rename to assets/filter-message-Cm2-SMhJ.js index c94ce91fb44c39bc33b173ab8bd05a5c55e78ebc..829a80cb36cd4bded46197fde86eee033922caa5 100644 --- a/assets/filter-message-DAxYSZzI.js +++ b/assets/filter-message-Cm2-SMhJ.js @@ -1 +1 @@ -import"./Basic-BfTEEIor.js";import{b as e}from"./Textarea-Q_8nrbKN.js";import{ca as t,d$ as n,dV as r,dY as i,d_ as a,e7 as o,ei as s,em as c,eq as l}from"./index-B9WIljdS.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=n({__name:`filter-message`,setup(n){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,n)=>(o(),i(`div`,u,[r(`div`,d,[a(c(e),{modelValue:m.value,"onUpdate:modelValue":n[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`]),r(`button`,f,l(h.value?`Processing...`:`Send`),1)]),r(`div`,p,[n[1]||=r(`h3`,{"font-normal":``},` Streaming Message `,-1),r(`div`,null,l(g.value.content),1)])]))}}),h=m;export{h as default}; \ No newline at end of file +import"./Basic-BgQfJAar.js";import{b as e}from"./Textarea-rGc1yvjC.js";import{ca as t,d$ as n,dW as r,dZ as i,e0 as a,e8 as o,ej as s,en as c,er as l}from"./index-BIGBQG2E.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(),i(`div`,u,[r(`div`,d,[n(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`]),r(`button`,f,l(h.value?`Processing...`:`Send`),1)]),r(`div`,p,[a[1]||=r(`h3`,{"font-normal":``},` Streaming Message `,-1),r(`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-734fhxoo.js b/assets/fireworks-ai-LsH2mj56.js similarity index 55% rename from assets/fireworks-ai-734fhxoo.js rename to assets/fireworks-ai-LsH2mj56.js index e7153a21edfb2008feeb4a1829bbfc6d28b63a06..a85906b88773761aec8fbc45cc786aeb3179c6e4 100644 --- a/assets/fireworks-ai-734fhxoo.js +++ b/assets/fireworks-ai-LsH2mj56.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`fireworks-ai`;var x=t({__name:`fireworks-ai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`fireworks-ai`;var x=o({__name:`fireworks-ai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-CpymSjFJ.js b/assets/general-BwshJ41f.js similarity index 55% rename from assets/general-CpymSjFJ.js rename to assets/general-BwshJ41f.js index 0a28fb067eea00d008911f76f7cb7a34423edde9..451f01569c0be92c228b4fa1e1a24ef312706987 100644 --- a/assets/general-CpymSjFJ.js +++ b/assets/general-BwshJ41f.js @@ -1 +1 @@ -import{A as e,cM as t,cS as n,d$ as r,dU as i,dV as a,dY as o,d_ as s,dc as c,e7 as l,eb as u,eg as d,eh as f,em as p,o as m}from"./index-B9WIljdS.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=r({__name:`general`,setup(r){let h=m(),{t:v,messages:y}=e(),b=c(),x=i(()=>Object.keys(y.value).map(e=>({label:v(`settings.language.options.${e}`),value:e})));return(e,r)=>{let i=u(`motion`);return l(),o(`div`,g,[d(s(p(n),{modelValue:p(b),"onUpdate:modelValue":r[0]||=e=>f(b)?b.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:100,label:p(v)(`settings.theme.title`),description:p(v)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[i]]),d(s(p(t),{modelValue:p(h).language,"onUpdate:modelValue":r[1]||=e=>p(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:p(v)(`settings.language.title`),description:p(v)(`settings.language.description`),options:x.value},null,8,[`modelValue`,`label`,`description`,`options`]),[[i]]),d((l(),o(`div`,_,r[2]||=[a(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[i]])])}}});typeof h==`function`&&h(v);var y=v;export{y as default}; \ No newline at end of file +import{A as e,cN as t,cT as n,d$ as r,dV as i,dW as a,dZ as o,dd as s,e0 as c,e8 as l,ec as u,eh as d,ei as f,en as p,o as m}from"./index-BIGBQG2E.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=c({__name:`general`,setup(c){let h=m(),{t:v,messages:y}=e(),b=s(),x=i(()=>Object.keys(y.value).map(e=>({label:v(`settings.language.options.${e}`),value:e})));return(e,i)=>{let s=u(`motion`);return l(),o(`div`,g,[d(r(p(n),{modelValue:p(b),"onUpdate:modelValue":i[0]||=e=>f(b)?b.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:100,label:p(v)(`settings.theme.title`),description:p(v)(`settings.theme.description`)},null,8,[`modelValue`,`label`,`description`]),[[s]]),d(r(p(t),{modelValue:p(h).language,"onUpdate:modelValue":i[1]||=e=>p(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:p(v)(`settings.language.title`),description:p(v)(`settings.language.description`),options:x.value},null,8,[`modelValue`,`label`,`description`,`options`]),[[s]]),d((l(),o(`div`,_,i[2]||=[a(`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-D2vggVou.js b/assets/gesture-circle-D2vggVou.js deleted file mode 100644 index f4f9bbef35825cc18bd3293bc5daffdcd6e20112..0000000000000000000000000000000000000000 --- a/assets/gesture-circle-D2vggVou.js +++ /dev/null @@ -1 +0,0 @@ -import{d$ as e,dU as t,dV as n,dY as r,de as i,dj as a,dk as o,dn as s,do as c,e7 as l,ee as u,ei as d,em as f,eq as p}from"./index-B9WIljdS.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=e({__name:`gesture-circle`,setup(e){let m=d(),v=d(),y=d(),b=d(),{x,y:S}=a({target:y}),C=i(v,{immediate:!0,windowResize:!0}),w=t(()=>({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,t)=>(l(),r(`div`,{ref_key:`containerRef`,ref:m,h:`[calc(100dvh-40px)]`},[n(`div`,h,[n(`div`,g,[t[0]||=n(`div`,{text:`neutral-400 dark:neutral-600`},` pointThrottled: `,-1),n(`div`,null,p(f(T)),1),t[1]||=n(`div`,{text:`neutral-400 dark:neutral-600`},` pointDebounced: `,-1),n(`div`,null,p(f(E)),1),t[2]||=n(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoint: `,-1),n(`div`,null,p(D.value),1),t[3]||=n(`div`,{text:`neutral-400 dark:neutral-600`},` distance: `,-1),n(`div`,null,p(O.value),1),t[4]||=n(`div`,{text:`neutral-400 dark:neutral-600`},` count: `,-1),n(`div`,null,p(k.value),1),t[5]||=n(`div`,{text:`neutral-400 dark:neutral-600`},` show: `,-1),n(`div`,null,p(A.value),1),t[6]||=n(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoints: `,-1),n(`div`,null,p(j.value),1),t[7]||=n(`div`,{text:`neutral-400 dark:neutral-600`},` isCircle: `,-1),n(`div`,null,p(M.value),1)]),n(`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/gesture-circle-pkJOWcgA.js b/assets/gesture-circle-pkJOWcgA.js new file mode 100644 index 0000000000000000000000000000000000000000..fde65cd5045052daac5ed0c9d2455598e520d05b --- /dev/null +++ b/assets/gesture-circle-pkJOWcgA.js @@ -0,0 +1 @@ +import{dV as e,dW as t,dZ as n,df as r,dk as i,dl as a,do as o,dp as s,e0 as c,e8 as l,ef as u,ej as d,en as f,er as p}from"./index-BIGBQG2E.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=c({__name:`gesture-circle`,setup(c){let m=d(),v=d(),y=d(),b=d(),{x,y:S}=i({target:y}),C=r(v,{immediate:!0,windowResize:!0}),w=e(()=>({x:x.value,y:S.value}));a(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=s(w,50),E=o(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-C7FbKjL1.js b/assets/google-generative-ai--KpWfIV-.js similarity index 68% rename from assets/google-generative-ai-C7FbKjL1.js rename to assets/google-generative-ai--KpWfIV-.js index b5b0f57a185b160624f2f11db24ce2a8924b7799..4b39b40145585ef78261c8ee4e28e0298e9d859a 100644 --- a/assets/google-generative-ai-C7FbKjL1.js +++ b/assets/google-generative-ai--KpWfIV-.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`google-generative-ai`;var x=t({__name:`google-generative-ai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{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/`}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName||`Google | Gemini`,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`google-generative-ai`;var x=o({__name:`google-generative-ai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{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/`}),l([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,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName||`Google | Gemini`,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`Google`,placeholder:`GEMINI_API_KEY`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-_QhzfMHP.js b/assets/hearing-BaAcNIp6.js similarity index 61% rename from assets/hearing-_QhzfMHP.js rename to assets/hearing-BaAcNIp6.js index 3d2efaacb8121a5f0fbb6b147f51d24b936c8db0..465a9ffbaab694e41986bcd373918ee1a3425692 100644 --- a/assets/hearing-_QhzfMHP.js +++ b/assets/hearing-BaAcNIp6.js @@ -1 +1 @@ -import{A as e,c8 as t,cC as n,cD as r,cE as i,cM as a,cN as o,cS as s,cc as c,ci as l,cj as ee,cl as te,cm as ne,cn as re,ct as ie,d$ as ae,d8 as u,dS as oe,dU as se,dV as d,dW as f,dX as p,dY as m,dZ as h,d_ as g,e5 as ce,e6 as le,e7 as _,e8 as v,ea as ue,ee as y,ef as b,eh as x,ei as S,em as C,en as de,eq as w,p as fe,t as pe,y as me}from"./index-B9WIljdS.js";import{b as T,e as E}from"./transformers.web-BogxzGZV.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=ae({__name:`hearing`,setup(ae){let{t:T}=e(),E=pe(),{activeTranscriptionProvider:D,activeTranscriptionModel:O,providerModels:k,activeProviderModelError:A,isLoadingActiveProviderModels:nt,supportsModelListing:rt,transcriptionModelSearchQuery:j,activeCustomModelName:it}=u(E),at=me(),{configuredTranscriptionProvidersMetadata:M}=u(at),{stopStream:ot,startStream:st}=fe(),{audioInputs:ct,selectedAudioInput:N,stream:P}=u(fe()),{startRecord:lt,stopRecord:ut,onStopRecord:dt}=t(P),{startAnalyzer:ft,stopAnalyzer:pt,onAnalyzerUpdate:mt,volumeLevel:ht}=he(),{audioContext:F}=u(c()),I=S(``),L=S(``),R=S(!1),z=S(!1),B=S(),V=S(),H=S(!1),U=S(25),W=S(50),G=S(),K=S(!1),q=S(!1),J=S(!0),Y=S(0),X=S(.5),Z=S([]),gt=S([]),_t=S([]),vt=se(()=>gt.value.map(e=>{let t=URL.createObjectURL(e);return _t.value.push(()=>URL.revokeObjectURL(t)),t})),Q=S([]);async function yt(){if(!(K.value||q.value)){q.value=!0,L.value=``;try{let e=await ve({sampleRate:16e3,speechThreshold:X.value,exitThreshold:X.value*.3,minSilenceDurationMs:400});e.on(`speech-start`,()=>{H.value=!0,lt()}),e.on(`speech-end`,()=>{H.value=!1,ut()}),e.on(`debug`,({data:e})=>{e?.probability!==void 0&&(Y.value=e.probability,Z.value.push(e.probability),Z.value.length>tt&&Z.value.shift())}),e.on(`status`,({type:e,message:t})=>{e===`error`&&(L.value=t)});let t=new _e(e,{minChunkSize:512,audioContextOptions:{sampleRate:16e3,latencyHint:`interactive`}});await t.initialize(ge),G.value=t,K.value=!0}catch(e){L.value=e instanceof Error?e.message:String(e),console.error(`Failed to load VAD model:`,e)}finally{q.value=!1}}}async function bt(){try{if(!N.value){console.warn(`No audio input device selected`);return}if(await $(),await st(),!P.value){console.warn(`No audio stream available`);return}dt(async e=>{if(e)try{if(e&&e.size>0){gt.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`));Q.value.push(r.text)}}catch(e){I.value=e instanceof Error?e.message:String(e),console.error(`Error generating transcription:`,I.value)}});let e=F.value.createMediaStreamSource(P.value),t=ft(F.value);mt(e=>{(!J.value||!K.value)&&(H.value=e>U.value)}),B.value=F.value.createGain(),B.value.gain.value=z.value?W.value/100:0,t&&e.connect(t),z.value&&(e.connect(B.value),B.value.connect(F.value.destination)),J.value&&(await yt(),G.value&&await G.value.start(P.value))}catch(e){console.error(`Error setting up audio monitoring:`,e),L.value=e instanceof Error?e.message:String(e)}}async function $(){V.value&&(cancelAnimationFrame(V.value),V.value=void 0),G.value&&await G.value.stop(),P.value&&ot(),pt(),B.value=void 0,H.value=!1,Y.value=0,Z.value=[]}async function xt(){!F.value||!B.value||(z.value?(B.value.gain.value=W.value/100,B.value.connect(F.value.destination)):(B.value.gain.value=0,B.value.disconnect()))}y(N,async()=>{R.value&&await bt()}),y(z,xt),y(W,()=>{B.value&&z.value&&(B.value.gain.value=W.value/100)}),y(X,()=>{G.value&&K.value});async function St(){R.value?(await $(),R.value=!1):(await bt(),R.value=!0)}let Ct=se(()=>{if(!J.value||!K.value)return H.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=Y.value,t=X.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 ce(async()=>{await E.loadModelsForProvider(D.value)}),le(()=>{$(),G.value&&G.value.dispose(),_t.value.forEach(e=>e())}),(e,t)=>{let c=ue(`RouterLink`);return _(),m(`div`,ye,[d(`div`,be,[d(`div`,xe,[d(`div`,null,[g(C(a),{modelValue:C(N),"onUpdate:modelValue":t[0]||=e=>x(N)?N.value=e:null,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:C(ct).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(M).length>0?(_(),m(`fieldset`,Ee,[(_(!0),m(oe,null,v(C(M),e=>(_(),f(C(te),{id:e.id,key:e.id,modelValue:C(D),"onUpdate:modelValue":t[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(c,{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(()=>t[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,[t[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(l),{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(re),{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(ne),{key:3,modelValue:C(O),"onUpdate:modelValue":t[2]||=e=>x(O)?O.value=e:null,"search-query":C(j),"onUpdate:searchQuery":t[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(r)),d(`div`,null,w(C(T)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),I.value?(_(),f(C(l),{key:0,title:`Error occurred`,error:I.value,"mb-4":``},null,8,[`error`])):p(``,!0),g(C(ee),{class:`mb-4`,"w-full":``,onClick:St},{default:b(()=>[h(w(R.value?`Stop Monitoring`:`Start Monitoring`),1)]),_:1}),d(`div`,null,[(_(!0),m(oe,null,v(vt.value,(e,t)=>(_(),m(`div`,{key:t,class:`mb-2`},[d(`audio`,{src:e,controls:``,class:`w-full`},null,8,Le),Q.value[t]?(_(),m(`div`,Re,w(Q.value[t]),1)):p(``,!0)]))),128))]),d(`div`,ze,[d(`div`,Be,[d(`div`,Ve,[g(C(i),{level:C(ht),label:`Input Level`},null,8,[`level`]),J.value&&K.value?(_(),f(C(n),{key:0,value:Y.value,threshold:X.value,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`])):p(``,!0),J.value&&K.value?(_(),m(`div`,He,[g(C(o),{modelValue:X.value,"onUpdate:modelValue":t[4]||=e=>X.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(o),{modelValue:U.value,"onUpdate:modelValue":t[5]||=e=>U.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:de([`h-4 w-4 rounded-full transition-all duration-200`,Ct.value])},null,2),d(`span`,Ge,w(H.value?`Speaking Detected`:`Silence`),1),d(`span`,Ke,w(J.value&&K.value?`Model Based`:`Volume Based`),1)]),d(`div`,qe,[g(C(s),{modelValue:J.value,"onUpdate:modelValue":t[6]||=e=>J.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),J.value?(_(),m(`div`,Je,[q.value?(_(),m(`div`,Ye,t[11]||=[d(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),d(`span`,{class:`text-sm`},`Loading...`,-1)])):L.value?(_(),f(C(l),{key:1,title:`Inference error`,error:L.value},null,8,[`error`])):K.value?(_(),m(`div`,Xe,[t[12]||=d(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),t[13]||=d(`span`,{class:`text-sm`},`Activated`,-1),d(`span`,Ze,` Probability: `+w((Y.value*100).toFixed(1))+`% `,1)])):p(``,!0)])):p(``,!0)]),J.value&&K.value?(_(),f(C(ie),{key:3,history:Z.value,"current-value":Y.value,threshold:X.value,"is-active":H.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)]),R.value?(_(),m(`div`,Qe,[g(C(s),{modelValue:z.value,"onUpdate:modelValue":t[7]||=e=>z.value=e,label:`Monitor Audio (Listen)`,description:`Enable audio playback monitoring (like OBS). Be careful of feedback!`},null,8,[`modelValue`]),z.value?(_(),m(`div`,$e,[g(C(o),{modelValue:W.value,"onUpdate:modelValue":t[8]||=e=>W.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),z.value?(_(),m(`div`,et,t[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{A as e,c8 as t,cA as n,cB as r,cC as i,cN as a,cO as o,cT as s,cc as c,ci as l,cj as ee,cl as te,cm as ne,cn as re,ct as ie,d$ as u,d9 as d,dT as ae,dV as oe,dW as f,dX as p,dY as m,dZ as h,d_ as g,e0 as se,e6 as ce,e7 as le,e8 as _,e9 as v,eb as ue,ef as y,eg as b,ei as x,ej as S,en as C,eo as de,er as w,p as fe,t as pe,y as me}from"./index-BIGBQG2E.js";import{b as T,e as E}from"./transformers.web-BgaDiHAD.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=se({__name:`hearing`,setup(se){let{t:T}=e(),E=pe(),{activeTranscriptionProvider:D,activeTranscriptionModel:O,providerModels:k,activeProviderModelError:A,isLoadingActiveProviderModels:nt,supportsModelListing:rt,transcriptionModelSearchQuery:j,activeCustomModelName:it}=d(E),M=me(),{configuredTranscriptionProvidersMetadata:at}=d(M),{stopStream:ot,startStream:st}=fe(),{audioInputs:ct,selectedAudioInput:N,stream:P}=d(fe()),{startRecord:lt,stopRecord:ut,onStopRecord:dt}=t(P),{startAnalyzer:ft,stopAnalyzer:pt,onAnalyzerUpdate:mt,volumeLevel:ht}=he(),{audioContext:F}=d(c()),I=S(``),L=S(``),R=S(!1),z=S(!1),B=S(),V=S(),H=S(!1),U=S(25),W=S(50),G=S(),K=S(!1),q=S(!1),J=S(!0),Y=S(0),X=S(.5),Z=S([]),gt=S([]),_t=S([]),vt=oe(()=>gt.value.map(e=>{let t=URL.createObjectURL(e);return _t.value.push(()=>URL.revokeObjectURL(t)),t})),Q=S([]);async function yt(){if(!(K.value||q.value)){q.value=!0,L.value=``;try{let e=await ve({sampleRate:16e3,speechThreshold:X.value,exitThreshold:X.value*.3,minSilenceDurationMs:400});e.on(`speech-start`,()=>{H.value=!0,lt()}),e.on(`speech-end`,()=>{H.value=!1,ut()}),e.on(`debug`,({data:e})=>{e?.probability!==void 0&&(Y.value=e.probability,Z.value.push(e.probability),Z.value.length>tt&&Z.value.shift())}),e.on(`status`,({type:e,message:t})=>{e===`error`&&(L.value=t)});let t=new _e(e,{minChunkSize:512,audioContextOptions:{sampleRate:16e3,latencyHint:`interactive`}});await t.initialize(ge),G.value=t,K.value=!0}catch(e){L.value=e instanceof Error?e.message:String(e),console.error(`Failed to load VAD model:`,e)}finally{q.value=!1}}}async function bt(){try{if(!N.value){console.warn(`No audio input device selected`);return}if(await $(),await st(),!P.value){console.warn(`No audio stream available`);return}dt(async e=>{if(e)try{if(e&&e.size>0){gt.value.push(e);let t=await M.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`));Q.value.push(r.text)}}catch(e){I.value=e instanceof Error?e.message:String(e),console.error(`Error generating transcription:`,I.value)}});let e=F.value.createMediaStreamSource(P.value),t=ft(F.value);mt(e=>{(!J.value||!K.value)&&(H.value=e>U.value)}),B.value=F.value.createGain(),B.value.gain.value=z.value?W.value/100:0,t&&e.connect(t),z.value&&(e.connect(B.value),B.value.connect(F.value.destination)),J.value&&(await yt(),G.value&&await G.value.start(P.value))}catch(e){console.error(`Error setting up audio monitoring:`,e),L.value=e instanceof Error?e.message:String(e)}}async function $(){V.value&&(cancelAnimationFrame(V.value),V.value=void 0),G.value&&await G.value.stop(),P.value&&ot(),pt(),B.value=void 0,H.value=!1,Y.value=0,Z.value=[]}async function xt(){!F.value||!B.value||(z.value?(B.value.gain.value=W.value/100,B.value.connect(F.value.destination)):(B.value.gain.value=0,B.value.disconnect()))}y(N,async()=>{R.value&&await bt()}),y(z,xt),y(W,()=>{B.value&&z.value&&(B.value.gain.value=W.value/100)}),y(X,()=>{G.value&&K.value});async function St(){R.value?(await $(),R.value=!1):(await bt(),R.value=!0)}let Ct=oe(()=>{if(!J.value||!K.value)return H.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=Y.value,t=X.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 ce(async()=>{await E.loadModelsForProvider(D.value)}),le(()=>{$(),G.value&&G.value.dispose(),_t.value.forEach(e=>e())}),(e,t)=>{let c=ue(`RouterLink`);return _(),h(`div`,ye,[f(`div`,be,[f(`div`,xe,[f(`div`,null,[u(C(a),{modelValue:C(N),"onUpdate:modelValue":t[0]||=e=>x(N)?N.value=e:null,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:C(ct).map(e=>({label:e.label||e.deviceId,value:e.deviceId})),placeholder:`Select an audio input device`,layout:`vertical`},null,8,[`modelValue`,`options`])]),f(`div`,Se,[f(`div`,null,[f(`h2`,Ce,w(C(T)(`settings.pages.providers.title`)),1),f(`div`,we,[f(`span`,null,w(C(T)(`settings.pages.modules.hearing.sections.section.provider-model-selection.description`)),1)])]),f(`div`,Te,[C(at).length>0?(_(),h(`fieldset`,Ee,[(_(!0),h(ae,null,v(C(at),e=>(_(),p(C(te),{id:e.id,key:e.id,modelValue:C(D),"onUpdate:modelValue":t[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))])):(_(),h(`div`,De,[u(c,{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(()=>t[9]||=[f(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),f(`div`,{class:`flex flex-col`},[f(`span`,{class:`font-medium`},`No Providers Configured`),f(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your Transcription providers`)],-1),f(`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)?(_(),h(`div`,Oe,[f(`div`,ke,[f(`div`,null,[f(`h2`,Ae,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),f(`div`,je,[f(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),C(nt)?(_(),h(`div`,Me,[t[10]||=f(`div`,{class:`mr-2 animate-spin`},[f(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),f(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):C(A)?(_(),p(C(l),{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)?(_(),p(C(re),{key:2,type:`warning`},{title:b(()=>[g(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:b(()=>[g(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):C(k).length>0?(_(),p(C(ne),{key:3,modelValue:C(O),"onUpdate:modelValue":t[2]||=e=>x(O)?O.value=e:null,"search-query":C(j),"onUpdate:searchQuery":t[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`])):m(``,!0)])])):m(``,!0)])]),f(`div`,Ne,[f(`div`,Pe,[f(`h2`,Fe,[f(`div`,Ie,[u(C(r)),f(`div`,null,w(C(T)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),I.value?(_(),p(C(l),{key:0,title:`Error occurred`,error:I.value,"mb-4":``},null,8,[`error`])):m(``,!0),u(C(ee),{class:`mb-4`,"w-full":``,onClick:St},{default:b(()=>[g(w(R.value?`Stop Monitoring`:`Start Monitoring`),1)]),_:1}),f(`div`,null,[(_(!0),h(ae,null,v(vt.value,(e,t)=>(_(),h(`div`,{key:t,class:`mb-2`},[f(`audio`,{src:e,controls:``,class:`w-full`},null,8,Le),Q.value[t]?(_(),h(`div`,Re,w(Q.value[t]),1)):m(``,!0)]))),128))]),f(`div`,ze,[f(`div`,Be,[f(`div`,Ve,[u(C(i),{level:C(ht),label:`Input Level`},null,8,[`level`]),J.value&&K.value?(_(),p(C(n),{key:0,value:Y.value,threshold:X.value,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`])):m(``,!0),J.value&&K.value?(_(),h(`div`,He,[u(C(o),{modelValue:X.value,"onUpdate:modelValue":t[4]||=e=>X.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`])])):(_(),h(`div`,Ue,[u(C(o),{modelValue:U.value,"onUpdate:modelValue":t[5]||=e=>U.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`])])),f(`div`,We,[f(`div`,{class:de([`h-4 w-4 rounded-full transition-all duration-200`,Ct.value])},null,2),f(`span`,Ge,w(H.value?`Speaking Detected`:`Silence`),1),f(`span`,Ke,w(J.value&&K.value?`Model Based`:`Volume Based`),1)]),f(`div`,qe,[u(C(s),{modelValue:J.value,"onUpdate:modelValue":t[6]||=e=>J.value=e,label:`Model Based`,description:`Use AI models for more accurate speech detection`},null,8,[`modelValue`]),J.value?(_(),h(`div`,Je,[q.value?(_(),h(`div`,Ye,t[11]||=[f(`div`,{class:`animate-spin text-sm`,"i-solar:spinner-line-duotone":``},null,-1),f(`span`,{class:`text-sm`},`Loading...`,-1)])):L.value?(_(),p(C(l),{key:1,title:`Inference error`,error:L.value},null,8,[`error`])):K.value?(_(),h(`div`,Xe,[t[12]||=f(`div`,{class:`text-sm`,"i-solar:check-circle-bold-duotone":``},null,-1),t[13]||=f(`span`,{class:`text-sm`},`Activated`,-1),f(`span`,Ze,` Probability: `+w((Y.value*100).toFixed(1))+`% `,1)])):m(``,!0)])):m(``,!0)]),J.value&&K.value?(_(),p(C(ie),{key:3,history:Z.value,"current-value":Y.value,threshold:X.value,"is-active":H.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`])):m(``,!0)]),R.value?(_(),h(`div`,Qe,[u(C(s),{modelValue:z.value,"onUpdate:modelValue":t[7]||=e=>z.value=e,label:`Monitor Audio (Listen)`,description:`Enable audio playback monitoring (like OBS). Be careful of feedback!`},null,8,[`modelValue`]),z.value?(_(),h(`div`,$e,[u(C(o),{modelValue:W.value,"onUpdate:modelValue":t[8]||=e=>W.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`])])):m(``,!0)])):m(``,!0),z.value?(_(),h(`div`,et,t[14]||=[f(`div`,{class:`flex items-center gap-2 text-amber-700 dark:text-amber-300`},[f(`div`,{class:`text-sm`,"i-solar:warning-circle-bold-duotone":``}),f(`span`,{class:`text-sm font-medium`},`Audio feedback warning`)],-1),f(`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)])):m(``,!0)])])])])])}}});typeof D==`function`&&D(k);var A=k;export{A as default}; \ No newline at end of file diff --git a/assets/home-4Khdv6MH.js b/assets/home-4Khdv6MH.js deleted file mode 100644 index 1a37374c80eee97c50b6cf554a2fce90b21b353b..0000000000000000000000000000000000000000 --- a/assets/home-4Khdv6MH.js +++ /dev/null @@ -1 +0,0 @@ -import{d$ as e,d4 as t,dV as n,dY as r,d_ as i,e7 as a,em as o}from"./index-B9WIljdS.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=e({__name:`home`,setup(e){return(e,l)=>(a(),r(`div`,s,[n(`div`,c,[i(o(t))])]))}}),u=l;export{u as default}; \ No newline at end of file diff --git a/assets/home-C2jtrSIW.js b/assets/home-C2jtrSIW.js new file mode 100644 index 0000000000000000000000000000000000000000..3d81b9ce42b34e61f455bd73523b9e8b7e7e9e2c --- /dev/null +++ b/assets/home-C2jtrSIW.js @@ -0,0 +1 @@ +import{d$ as e,d5 as t,dW as n,dZ as r,e0 as i,e8 as a,en as o}from"./index-BIGBQG2E.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(),r(`div`,s,[n(`div`,c,[e(o(t))])]))}}),u=l;export{u as default}; \ No newline at end of file diff --git a/assets/icon-animation-BVIg_nVx.js b/assets/icon-animation-zitz9bVj.js similarity index 64% rename from assets/icon-animation-BVIg_nVx.js rename to assets/icon-animation-zitz9bVj.js index 253e411b628c83c859d23123a9565f9565382e1e..827f9990a6d083ec4625cf2377044979003c5d05 100644 --- a/assets/icon-animation-BVIg_nVx.js +++ b/assets/icon-animation-zitz9bVj.js @@ -1 +1 @@ -import{dU as e,e5 as t,e6 as n,ei as r,o as i}from"./index-B9WIljdS.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{dV as e,e6 as t,e7 as n,ej as r,o as i}from"./index-BIGBQG2E.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-Cr6BK5qs.js b/assets/image-Cr6BK5qs.js deleted file mode 100644 index 48dad5e32f97b1d8a6c872a4d5713d5cb17b0be0..0000000000000000000000000000000000000000 --- a/assets/image-Cr6BK5qs.js +++ /dev/null @@ -1,2 +0,0 @@ -import{cO as e,d$ as t,dV as n,dX as r,dY as i,db as a,e7 as o,ei as s,em as c,eq as l}from"./index-B9WIljdS.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=t({__name:`image`,setup(e){let t=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 n=e.target,r=n.files?.[0];if(r){t.value=r;let e=await g(r);m.value=e}}return(e,t)=>(o(),i(`div`,null,[n(`label`,u,[n(`input`,{type:`file`,accept:`image/*`,hidden:``,onChange:_},null,32),t[1]||=n(`span`,null,`Upload Image`,-1)]),m.value?(o(),i(`div`,d,[n(`img`,{src:m.value,alt:`Uploaded Image`,"w-100":``},null,8,f),n(`pre`,p,` `+l(m.value)+` - `,1),n(`button`,{bg:`primary-500`,text:`white`,"mt-4":``,"rounded-lg":``,"px-4":``,"py-2":``,onClick:t[0]||=()=>c(h)()},` Copy Data URL `)])):r(``,!0)]))}}),h=e(m,[[`__scopeId`,`data-v-7edd53e6`]]);export{h as default}; \ No newline at end of file diff --git a/assets/image-Di3k1Znc.js b/assets/image-Di3k1Znc.js new file mode 100644 index 0000000000000000000000000000000000000000..c7c87d2e9f33d15815a70bac42ef1fcd380664a5 --- /dev/null +++ b/assets/image-Di3k1Znc.js @@ -0,0 +1,2 @@ +import{cP as e,dW as t,dY as n,dZ as r,dc as i,e0 as a,e8 as o,ej as s,en as c,er as l}from"./index-BIGBQG2E.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=a({__name:`image`,setup(e){let a=s(),m=s(``),{copy:h}=i({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){a.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-9HJVUVbL.css b/assets/index-9HJVUVbL.css new file mode 100644 index 0000000000000000000000000000000000000000..c779bae7c581239b0acd5de0ee9d2a6d9078e95c --- /dev/null +++ b/assets/index-9HJVUVbL.css @@ -0,0 +1 @@ +.form_input-range[data-v-3a236ac7]{--height:2em;min-height:var(--height);appearance:none;--thumb-width:4px;--thumb-height:var(--height);--thumb-box-shadow:0 0 0px #e6e6e6;--thumb-border:none;--thumb-border-radius:999px;--thumb-background:oklch(80% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-hover:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-active:oklch(70% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--track-height:calc(var(--height) - var(--track-value-padding)*2);--track-box-shadow:none;--track-border:solid 2px #eee;--track-border-radius:6px;--track-background:#eee9;--track-background-hover:#eee9;--track-background-active:#eee9;--track-value-background:#fff;--track-value-background-hover:#fff;--track-value-background-active:#fff;--track-value-padding:2px;background:0 0;border-radius:4px;transition:background-color .2s}.dark .form_input-range[data-v-3a236ac7]{--thumb-background:oklch(70% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-hover:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-active:oklch(80% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--track-border:solid 2px #2c2c2c;--track-background:#2c2c2cb3;--track-background-hover:#2c2c2cb3;--track-background-active:#2c2c2cb3;--track-value-background:#a4a4a4;--track-value-background-hover:#a4a4a4;--track-value-background-active:#a4a4a4}.form_input-range.slider-progress[data-v-3a236ac7]{--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min))/var(--range));--sx:calc(.5*0em + var(--ratio)*(100% - 0em))}.form_input-range[data-v-3a236ac7]:focus{outline:none}.form_input-range[data-v-3a236ac7]::-webkit-slider-thumb{appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:calc(var(--track-height)*.5 - var(--thumb-height)*.5 - 2px);margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-3a236ac7]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:var(--track-box-shadow);cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out;position:relative}.form_input-range[data-v-3a236ac7]::-webkit-slider-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width)*1.6);transform:scaleY(1.2)}.form_input-range[data-v-3a236ac7]:hover::-webkit-slider-runnable-track{background:var(--track-background-hover)}.form_input-range[data-v-3a236ac7]::-webkit-slider-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-3a236ac7]:active::-webkit-slider-runnable-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-3a236ac7]::-webkit-slider-runnable-track{margin-right:calc(0 - var(--track-value-padding));background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-3a236ac7]:hover::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover))0/var(--sx)100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-3a236ac7]:active::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active))0/var(--sx)100% no-repeat,var(--track-background-active)}.form_input-range[data-v-3a236ac7]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding));border:none;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-3a236ac7]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding)*2)}.form_input-range[data-v-3a236ac7]::-moz-range-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width)*1.6);transform:scaleY(1.2)}.form_input-range[data-v-3a236ac7]:hover::-moz-range-track{background:var(--track-background-hover)}.form_input-range[data-v-3a236ac7]::-moz-range-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-3a236ac7]:active::-moz-range-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-3a236ac7]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-3a236ac7]:hover::-moz-range-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover))0/var(--sx)100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-3a236ac7]:active::-moz-range-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active))0/var(--sx)100% no-repeat,var(--track-background-active)}.form_input-range[data-v-3a236ac7]::-ms-fill-upper{background:0 0;border-color:#0000}.form_input-range[data-v-3a236ac7]::-ms-fill-lower{background:0 0;border-color:#0000}.form_input-range[data-v-3a236ac7]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));box-sizing:border-box;cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-3a236ac7]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-3a236ac7]::-ms-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width)*1.6);transform:scaleY(1.2)}.form_input-range[data-v-3a236ac7]:hover::-ms-track{background:var(--track-background-hover)}.form_input-range[data-v-3a236ac7]::-ms-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-3a236ac7]:active::-ms-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-3a236ac7]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius)0 0 var(--track-border-radius);background:var(--track-value-background);margin:0;margin-left:calc(var(--track-value-padding));margin-right:calc(0 - var(--track-value-padding));border:none;border-right-width:0}.form_input-range.slider-progress[data-v-3a236ac7]:hover::-ms-fill-lower{background:var(--track-value-background-hover)}.form_input-range.slider-progress[data-v-3a236ac7]:active::-ms-fill-lower{background:var(--track-value-background-active)}.color-hue-range[data-v-3d01d2fa]{appearance:none;background:linear-gradient(90deg,#ffb2cb,#ffba76,#bedf0d,#00efd2,#90d7ff,#d8bfff,#ffb2cb);background:linear-gradient(90deg,lab(80.0841% 65.3995 .860357),lab(81.7178% 42.879 86.4545),lab(84.2289% -27.648 80.2367),lab(85.1086% -71.1664 -.472653),lab(82.2823% -19.2763 -62.1951),lab(79.7314% 41.9269 -62.2558),lab(80.0841% 65.3994 .860381));border-radius:.5rem;height:2.5rem}.color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(115 115 115/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity));background-color:rgb(38 38 38/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb:hover{width:.5rem;height:3.25rem}.dark .color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(255 255 255/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity));background-color:rgb(212 212 212/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark .color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb:hover{width:.5rem;height:3.25rem}.color-hue-range[data-v-3d01d2fa]::-moz-range-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(115 115 115/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity));background-color:rgb(38 38 38/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.color-hue-range[data-v-3d01d2fa]::-moz-range-thumb:hover{width:.5rem;height:3.25rem}.dark .color-hue-range[data-v-3d01d2fa]::-moz-range-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(255 255 255/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity));background-color:rgb(212 212 212/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark .color-hue-range[data-v-3d01d2fa]::-moz-range-thumb:hover{width:.5rem;height:3.25rem}.form_input-round-range[data-v-ac8cc218]{--height:2em;min-height:var(--height);appearance:none;--thumb-width:var(--height);--thumb-height:var(--height);--thumb-box-shadow:none;--thumb-border:none;--thumb-border-radius:0px;--thumb-background:transparent;--track-height:calc(var(--height) - var(--track-value-padding)*2);--track-box-shadow:0 0 12px -2px #00000038;--track-border:none;--track-border-radius:10px;--track-background:#0006;--track-value-background:#fff;--track-value-padding:0px;background:0 0;border-radius:4px;transition:background-color .2s}[data-direction=vertical].form_input-round-range[data-v-ac8cc218]{transform:rotate(180deg)}.dark .form_input-round-range[data-v-ac8cc218]{--thumb-background:#eee;--track-border:none;--track-background:#636363b3;--track-box-shadow:0 0 12px -2px #00000038;--track-value-background:#eee}.form_input-round-range.slider-progress[data-v-ac8cc218]{--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min))/var(--range));--sx:calc(.5*0em + var(--ratio)*(100% - 0em))}.form_input-round-range[data-v-ac8cc218]:focus{outline:none}.form_input-round-range[data-v-ac8cc218]::-webkit-slider-thumb{appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}[data-direction=vertical][data-v-ac8cc218]::-webkit-slider-thumb{cursor:ns-resize}.form_input-round-range[data-v-ac8cc218]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);box-shadow:var(--track-box-shadow);cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out;position:relative;overflow:hidden}[data-direction=vertical][data-v-ac8cc218]::-webkit-slider-runnable-track{cursor:ns-resize}.form_input-round-range.slider-progress[data-v-ac8cc218]::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}[data-direction=vertical].form_input-round-range.slider-progress[data-v-ac8cc218]::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background)var(--sx),var(--track-background)var(--sx))no-repeat}.form_input-round-range[data-v-ac8cc218]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding));border:none;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}[data-direction=vertical][data-v-ac8cc218]::-moz-range-thumb{cursor:ns-resize}.form_input-round-range[data-v-ac8cc218]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding)*2);overflow:hidden}[data-direction=vertical][data-v-ac8cc218]::-moz-range-track{cursor:ns-resize}.form_input-round-range.slider-progress[data-v-ac8cc218]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}[data-direction=vertical].form_input-round-range.slider-progress[data-v-ac8cc218]::-moz-range-track{background:linear-gradient(var(--track-value-background)var(--sx),var(--track-background)var(--sx))no-repeat}.form_input-round-range[data-v-ac8cc218]::-ms-fill-upper{background:0 0;border-color:#0000}.form_input-round-range[data-v-ac8cc218]::-ms-fill-lower{background:0 0;border-color:#0000}.form_input-round-range[data-v-ac8cc218]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);box-sizing:border-box;cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}[data-direction=vertical][data-v-ac8cc218]::-ms-thumb{cursor:ns-resize}.form_input-round-range[data-v-ac8cc218]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize;overflow:hidden}[data-direction=vertical][data-v-ac8cc218]::-ms-track{cursor:ns-resize}.form_input-round-range.slider-progress[data-v-ac8cc218]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius)0 0 var(--track-border-radius);background:var(--track-value-background);border:none;border-right-width:0;margin:0}:is(.hue-slider,.alpha-slider)::-webkit-slider-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(115 115 115/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity));background-color:rgb(38 38 38/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:is(.hue-slider,.alpha-slider)::-webkit-slider-thumb:hover{width:.5rem;height:3.25rem}.dark :is(.hue-slider,.alpha-slider)::-webkit-slider-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(255 255 255/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity));background-color:rgb(212 212 212/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark :is(.hue-slider,.alpha-slider)::-webkit-slider-thumb:hover{width:.5rem;height:3.25rem}:is(.hue-slider,.alpha-slider)::-moz-range-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(115 115 115/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity));background-color:rgb(38 38 38/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:is(.hue-slider,.alpha-slider)::-moz-range-thumb:hover{width:.5rem;height:3.25rem}.dark :is(.hue-slider,.alpha-slider)::-moz-range-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(255 255 255/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity));background-color:rgb(212 212 212/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark :is(.hue-slider,.alpha-slider)::-moz-range-thumb:hover{width:.5rem;height:3.25rem}.range-slider[data-v-c1b3c1a7]{--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min))/var(--range));--progress:calc(var(--ratio)*100%);--progress-color:#cccccc87;--track-color:#f5f5f5bf;transition:all .2s ease-in-out}.range-slider[data-v-c1b3c1a7]:hover{--progress-color:#5f5f5f87}.dark .range-slider[data-v-c1b3c1a7]{--progress-color:#979797cc;--track-color:#171717}.range-slider[data-v-c1b3c1a7]::-webkit-slider-runnable-track{background:linear-gradient(to right,var(--progress-color)0%,var(--progress-color)var(--progress),var(--track-color)var(--progress),var(--track-color)100%);cursor:col-resize;border-radius:6px;height:100%;transition:all .2s ease-in-out}.range-slider[data-v-c1b3c1a7]::-webkit-slider-thumb{appearance:none;cursor:col-resize;background:0 0;border:none;width:2px;height:100%;transition:all .2s}.range-slider[data-v-c1b3c1a7]::-webkit-slider-thumb:hover{background:#fff0;width:6px}.range-slider[data-v-c1b3c1a7]::-moz-range-track{background:linear-gradient(to right,#c6c6c6 0%,#c6c6c6 var(--progress),#ececec var(--progress),#ececec 100%);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);cursor:col-resize;border:none;border-radius:6px;height:100%}.dark .range-slider[data-v-c1b3c1a7]::-moz-range-track{background:linear-gradient(to right,#979797cc 0%,#979797cc var(--progress),#171717 var(--progress),#171717 100%)}.range-slider[data-v-c1b3c1a7]::-moz-range-thumb{cursor:col-resize;background:0 0;border:none;border-radius:0;width:2px;height:100%;transition:all .2s}.range-slider[data-v-c1b3c1a7]::-moz-range-thumb:hover{background:#fff0;width:6px}.range-slider[data-v-c1b3c1a7]:disabled{opacity:.5;pointer-events:none}.volumed[data-v-d8ce56aa]{transform-style:preserve-3d;width:fit-content;height:fit-content}.test-dummy-flat[data-v-28f8c660]{display:inline-block;position:relative}.test-dummy-flat .marker[data-v-28f8c660]{background:conic-gradient(#ffeb3b 0deg 90deg,#000 90deg 180deg,#ffeb3b 180deg 270deg,#000 270deg 360deg);border-radius:50%;position:absolute;inset:0;box-shadow:0 4px 12px #b9b9b933}.dark .test-dummy-flat .marker[data-v-28f8c660]{box-shadow:0 4px 12px #0003}.fade-enter-active[data-v-6b4f300d],.fade-leave-active[data-v-6b4f300d]{transition:opacity .2s}.fade-enter-from[data-v-6b4f300d],.fade-leave-to[data-v-6b4f300d]{opacity:0}.fade-enter-to[data-v-6b4f300d],.fade-leave-from[data-v-6b4f300d]{opacity:1}.menu-icon-item[data-v-d08788bb]{position:relative;overflow:hidden}.menu-icon-item[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:-1;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 30%,#0000 50%);mask-image:linear-gradient(120deg,#fff 30%,#0000 50%)}.dark .menu-icon-item[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-item[data-v-d08788bb]:hover:before,.menu-icon-item._hover[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .menu-icon-item[data-v-d08788bb]:hover:before,.dark .menu-icon-item._hover[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-item[data-v-d08788bb]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.6;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-item[data-v-d08788bb]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-item[data-v-d08788bb]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.25}.dark .menu-icon-item[data-v-d08788bb]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-item-icon[data-v-d08788bb]{opacity:.5}.menu-icon-item:hover .menu-icon-item-title[data-v-d08788bb],.menu-icon-item._hover .menu-icon-item-title[data-v-d08788bb]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-item:hover .menu-icon-item-description[data-v-d08788bb],.menu-icon-item._hover .menu-icon-item-description[data-v-d08788bb]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-item:hover .menu-icon-item-icon[data-v-d08788bb],.menu-icon-item._hover .menu-icon-item-icon[data-v-d08788bb]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-item:hover .menu-icon-item-title[data-v-d08788bb],.dark .menu-icon-item._hover .menu-icon-item-title[data-v-d08788bb]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-item:hover .menu-icon-item-description[data-v-d08788bb],.dark .menu-icon-item._hover .menu-icon-item-description[data-v-d08788bb]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-item:hover .menu-icon-item-icon[data-v-d08788bb],.dark .menu-icon-item._hover .menu-icon-item-icon[data-v-d08788bb]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item[data-v-93a9757f]{position:relative;overflow:hidden}.menu-icon-status-item[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .menu-icon-status-item[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-status-item[data-v-93a9757f]:hover:before,.menu-icon-status-item._hover[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:50%}.dark .menu-icon-status-item[data-v-93a9757f]:hover:before,.dark .menu-icon-status-item._hover[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-status-item-link[data-v-93a9757f]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-status-item-link[data-v-93a9757f]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-status-item-link[data-v-93a9757f]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.4}.dark .menu-icon-status-item-link[data-v-93a9757f]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-status-item-icon-color[data-v-93a9757f]{opacity:.5}.menu-icon-status-item:hover .menu-icon-status-item-title[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-title[data-v-93a9757f]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item:hover .menu-icon-status-item-description[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-description[data-v-93a9757f]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-93a9757f],.menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-93a9757f]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-status-item:hover .menu-icon-status-item-title[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-title[data-v-93a9757f]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-status-item:hover .menu-icon-status-item-description[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-description[data-v-93a9757f]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-93a9757f],.dark .menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-93a9757f]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.form_radio-card-detail[data-v-fb6236db]{position:relative;overflow:hidden}.form_radio-card-detail[data-v-fb6236db]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-detail[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-detail[data-v-fb6236db]:hover:before,.form_radio-card-detail._hover[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-detail[data-v-fb6236db]:hover:before,.dark .form_radio-card-detail._hover[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-detail-active[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-detail-active[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-e9feb562]::-webkit-search-cancel-button{display:none}.form_radio-card-simple[data-v-880ce73f]{position:relative;overflow:hidden}.form_radio-card-simple[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-simple[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-simple[data-v-880ce73f]:hover:before,.form_radio-card-simple._hover[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-simple[data-v-880ce73f]:hover:before,.dark .form_radio-card-simple._hover[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-simple-active[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-simple-active[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_voice-card[data-v-fd4023c4]{flex-direction:column;display:flex;position:relative;overflow:hidden}.form_voice-card[data-v-fd4023c4]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_voice-card[data-v-fd4023c4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_voice-card[data-v-fd4023c4]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_voice-card[data-v-fd4023c4]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-43a4b028]::-webkit-search-cancel-button{display:none}.voice-card[data-v-43a4b028]{flex-direction:column;display:flex;position:relative;overflow:hidden}.voice-card[data-v-43a4b028]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .voice-card[data-v-43a4b028]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.voice-card[data-v-43a4b028]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .voice-card[data-v-43a4b028]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.skeleton[data-v-fa4a54cc]{transition:all .2s ease-in-out;position:relative}.skeleton-pulse[data-v-fa4a54cc]{animation:2s ease-in-out .5s infinite skeleton-pulse-fa4a54cc}@keyframes skeleton-pulse-fa4a54cc{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.skeleton-wave[data-v-fa4a54cc]:after{content:"";border-radius:inherit;background:linear-gradient(90deg,#0000,#fff,#0000);animation:2s ease-in-out infinite skeleton-wave-fa4a54cc;position:absolute;inset:0;transform:translate(-100%)}.dark .skeleton-wave[data-v-fa4a54cc]:after{background:linear-gradient(90deg,#0000,#ffffff1a,#0000)}@keyframes skeleton-wave-fa4a54cc{0%{opacity:0;transform:translate(-100%)}60%{opacity:1;transform:translate(100%)}to{opacity:0;transform:translate(100%)}}.card-hover-effect[data-v-24a7a9d5]{transform-style:preserve-3d;transform-origin:50%;will-change:transform;transition:transform .3s cubic-bezier(.23,1,.32,1)}.card-hover-effect[data-v-24a7a9d5]:before,.card-hover-effect[data-v-24a7a9d5]:after{content:"";pointer-events:none;background-repeat:no-repeat;transition:all .33s;position:absolute;inset:0}.card-hover-effect[data-v-24a7a9d5]:before{background-position:var(--card-position-x)var(--card-position-y);background-size:300% 300%;background-image:linear-gradient(115deg,transparent 0%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))25%,transparent 47%,transparent 53%,rgba(var(--color-primary-600),calc(.3*var(--effect-intensity)))75%,transparent 100%);opacity:calc(.5*var(--effect-intensity));filter:brightness(.5)contrast();z-index:1;mix-blend-mode:color-dodge}.card-hover-effect[data-v-24a7a9d5]:after{background-position:var(--sparkle-position-x)var(--sparkle-position-y);background-size:160%;background-image:linear-gradient(125deg,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))15%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))30%,rgba(var(--color-primary-300),calc(.2*var(--effect-intensity)))40%,rgba(var(--color-primary-200),calc(.1*var(--effect-intensity)))60%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))70%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))85%);background-blend-mode:overlay;opacity:calc(var(--sparkle-opacity)*var(--effect-intensity));filter:brightness()contrast();z-index:2;mix-blend-mode:color-dodge}.card-hover-effect[data-v-24a7a9d5]:hover:before{opacity:calc(.88*var(--effect-intensity));filter:brightness(.66)contrast(1.33)}.card-hover-effect[data-v-24a7a9d5]:hover:after{opacity:var(--effect-intensity);filter:brightness(1.1)contrast(1.2)}.slide-next-enter-active[data-v-181bca39],.slide-next-leave-active[data-v-181bca39]{transition:transform .2s ease-in-out,opacity .2s ease-in-out}.slide-next-enter-from[data-v-181bca39]{opacity:0;transform:translate(100%)}.slide-next-enter-to[data-v-181bca39],.slide-next-leave-from[data-v-181bca39]{opacity:1;transform:translate(0)}.slide-next-leave-to[data-v-181bca39]{opacity:0;transform:translate(-100%)}.slide-prev-enter-active[data-v-181bca39],.slide-prev-leave-active[data-v-181bca39]{transition:transform .2s ease-in-out,opacity .2s ease-in-out}.slide-prev-enter-from[data-v-181bca39]{opacity:0;transform:translate(-100%)}.slide-prev-enter-to[data-v-181bca39],.slide-prev-leave-from[data-v-181bca39]{opacity:1;transform:translate(0)}.slide-prev-leave-to[data-v-181bca39]{opacity:0;transform:translate(100%)}[data-sonner-toast=""] [data-content=""]{width:100%}.stage-transition-3[data-v-17464329]{--delay:0s;--sharpness:40%;position:fixed;inset:0;overflow:hidden}.stage-transition-3[data-v-17464329]:before,.stage-transition-3[data-v-17464329]:after{content:"";animation:1s cubic-bezier(.87,.05,.02,.97) both arrowIn-17464329,1s cubic-bezier(.87,.05,.02,.97) forwards arrowOut-17464329;position:absolute;inset:0}.stage-transition-3[data-v-17464329]:before{background-color:var(--stage-transition-3-overlay-color-2);animation-delay:calc(0s + var(--delay,0s)),calc(1.4s + var(--delay,0s))}.stage-transition-3[data-v-17464329]:after{background-color:var(--stage-transition-3-overlay-color-1);animation-delay:calc(.2s + var(--delay,0s)),calc(1.2s + var(--delay,0s))}@keyframes arrowIn-17464329{0%{clip-path:polygon(calc(var(--sharpness)*-1)0,calc(var(--sharpness)*-1)0,0 50%,calc(var(--sharpness)*-1)100%,calc(var(--sharpness)*-1)100%,0 50%)}to{clip-path:polygon(calc(var(--sharpness)*-1)0,100% 0,calc(100% + var(--sharpness))50%,100% 100%,calc(var(--sharpness)*-1)100%,0 50%)}}@keyframes arrowOut-17464329{0%{clip-path:polygon(calc(var(--sharpness)*-1)0,100% 0,calc(100% + var(--sharpness))50%,100% 100%,calc(var(--sharpness)*-1)100%,0 50%)}to{clip-path:polygon(100% 0,100% 0,calc(100% + var(--sharpness))50%,100% 100%,100% 100%,calc(100% + var(--sharpness))50%)}}.circle-expansion-transition[data-v-4624be9e]{pointer-events:none;width:150vmax;height:150vmax;position:fixed;top:calc(50% - 75vmax);left:calc(50% - 75vmax)}.circle-expansion-transition div[data-v-4624be9e]{border-radius:50%;width:100%;height:100%;position:absolute;top:0;left:0;transform:scale(0)}.circle-expansion-transition div[data-v-4624be9e]:first-child{background-color:var(--circle-expansion-color-1);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + 0s)forwards}.circle-expansion-transition div[data-v-4624be9e]:nth-child(2){background-color:var(--circle-expansion-color-2);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + .15s)forwards}.circle-expansion-transition div[data-v-4624be9e]:nth-child(3){background-color:var(--circle-expansion-color-3);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + .3s)forwards}.circle-expansion-transition div[data-v-4624be9e]:nth-child(4){background-color:var(--circle-expansion-color-4);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + .45s)forwards}@keyframes circleExpand-4624be9e{0%{transform:scale(0)}to{transform:scale(1)}}.fantasy-fall-transition[data-v-826171f5]{position:fixed;inset:0;overflow:hidden}.fantasy-fall-up[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-bottom-left-radius:var(--fantasy-fall-radius-sm);border-bottom-right-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-up var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translateY(-100%)}.fantasy-fall-down[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-top-left-radius:var(--fantasy-fall-radius-sm);border-top-right-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-down var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translateY(100%)}.fantasy-fall-left[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-top-right-radius:var(--fantasy-fall-radius-sm);border-bottom-right-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-left var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translate(-100%)}.fantasy-fall-right[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-top-left-radius:var(--fantasy-fall-radius-sm);border-bottom-left-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-right var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translate(100%)}@media (min-width:768px){.fantasy-fall-up[data-v-826171f5]:before{border-bottom-left-radius:var(--fantasy-fall-radius-md);border-bottom-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-down[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-md);border-top-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-left[data-v-826171f5]:before{border-top-right-radius:var(--fantasy-fall-radius-md);border-bottom-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-right[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-md);border-bottom-left-radius:var(--fantasy-fall-radius-md)}}@media (min-width:1024px){.fantasy-fall-up[data-v-826171f5]:before{border-bottom-left-radius:var(--fantasy-fall-radius-lg);border-bottom-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-down[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-lg);border-top-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-left[data-v-826171f5]:before{border-top-right-radius:var(--fantasy-fall-radius-lg);border-bottom-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-right[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-lg);border-bottom-left-radius:var(--fantasy-fall-radius-lg)}}@keyframes fantasy-fall-up{0%{transform:translateY(-100%)}50%{transform:translateY(0%)}to{border-bottom-right-radius:0%;border-bottom-left-radius:0%;transform:translateY(0%)}}@keyframes fantasy-fall-down{0%{transform:translateY(100%)}50%{transform:translateY(0%)}to{border-top-left-radius:0%;border-top-right-radius:0%;transform:translateY(0%)}}@keyframes fantasy-fall-left{0%{transform:translate(-100%)}50%{transform:translate(0%)}to{border-top-right-radius:0%;border-bottom-right-radius:0%;transform:translate(0%)}}@keyframes fantasy-fall-right{0%{transform:translate(100%)}50%{transform:translate(0%)}to{border-top-left-radius:0%;border-bottom-left-radius:0%;transform:translate(0%)}}.stage-transition-4[data-v-4221f976]{--delay:0s;grid-template-rows:repeat(5,1fr);display:grid;position:fixed;inset:0;overflow:hidden}.stage-transition-4__block[data-v-4221f976]{width:100%;height:100%;position:relative}.stage-transition-4__block[data-v-4221f976]:before,.stage-transition-4__block[data-v-4221f976]:after{content:"";animation:.8s cubic-bezier(.87,.05,.02,.97) both slideIn-4221f976,.8s cubic-bezier(.87,.05,.02,.97) forwards slideOut-4221f976;position:absolute;inset:0}.stage-transition-4__block[data-v-4221f976]:before{background-color:var(--stage-transition-4-overlay-color-2);animation-delay:calc(0s + var(--d,0s) + var(--delay,0s)),calc(1.6s + var(--d,0s) + var(--delay,0s))}.stage-transition-4__block[data-v-4221f976]:after{background-color:var(--stage-transition-4-overlay-color-1);animation-delay:calc(.3s + var(--d,0s) + var(--delay,0s)),calc(1.3s + var(--d,0s) + var(--delay,0s))}.stage-transition-4__block[data-v-4221f976]:first-child{--d:.1s}.stage-transition-4__block[data-v-4221f976]:nth-child(2){--d:.3s}.stage-transition-4__block[data-v-4221f976]:nth-child(3){--d:0s}.stage-transition-4__block[data-v-4221f976]:nth-child(4){--d:.4s}.stage-transition-4__block[data-v-4221f976]:nth-child(5){--d:.2s}@keyframes slideIn-4221f976{0%{transform:translate(-101%)}to{transform:translate(0)}}@keyframes slideOut-4221f976{0%{transform:translate(0)}to{transform:translate(101%)}}.stage-transition-1[data-v-81c0af14]{--delay:0s;position:fixed;inset:0;overflow:hidden}.stage-transition-1[data-v-81c0af14]:before,.stage-transition-1[data-v-81c0af14]:after{content:"";animation:1s cubic-bezier(.87,.05,.02,.97) both slideIn-81c0af14,1s cubic-bezier(.87,.05,.02,.97) forwards slideOut-81c0af14;position:absolute;inset:0}.stage-transition-1[data-v-81c0af14]:before{background-color:var(--stage-transition-1-overlay-color-2);animation-delay:calc(0s + var(--delay,0s)),calc(1.4s + var(--delay,0s))}.stage-transition-1[data-v-81c0af14]:after{background-color:var(--stage-transition-1-overlay-color-1);animation-delay:calc(.2s + var(--delay,0s)),calc(1.2s + var(--delay,0s))}@keyframes slideIn-81c0af14{0%{transform:translate(-101%)}to{transform:translate(0)}}@keyframes slideOut-81c0af14{0%{transform:translate(0)}to{transform:translate(101%)}}.stage-transition-2[data-v-9e8b66c8]{--delay:0s;--skew-x:100%;position:fixed;inset:0;overflow:hidden}.stage-transition-2[data-v-9e8b66c8]:before,.stage-transition-2[data-v-9e8b66c8]:after{content:"";animation:1s cubic-bezier(.87,.05,.02,.97) both maskIn-9e8b66c8,1s cubic-bezier(.87,.05,.02,.97) forwards maskOut-9e8b66c8;position:absolute;inset:0}.stage-transition-2[data-v-9e8b66c8]:before{background-color:var(--stage-transition-2-overlay-color-2);animation-delay:calc(0s + var(--delay,0s)),calc(1.4s + var(--delay,0s))}.stage-transition-2[data-v-9e8b66c8]:after{background-color:var(--stage-transition-2-overlay-color-1);animation-delay:calc(.2s + var(--delay,0s)),calc(1.2s + var(--delay,0s))}@keyframes maskIn-9e8b66c8{0%{clip-path:polygon(0 0,0 0,calc(var(--skew-x,0)*-1)100%,calc(var(--skew-x,0)*-1)100%)}to{clip-path:polygon(0 0,calc(100% + var(--skew-x,0))0,100% 100%,calc(var(--skew-x,0)*-1)100%)}}@keyframes maskOut-9e8b66c8{0%{clip-path:polygon(0 0,calc(100% + var(--skew-x,0))0,100% 100%,calc(var(--skew-x,0)*-1)100%)}to{clip-path:polygon(calc(100% + var(--skew-x,0))0,calc(100% + var(--skew-x,0))0,100% 100%,100% 100%)}}.rectangle-rotate-transition[data-v-45ea2f7f]{position:fixed;inset:0;overflow:hidden}.rectangle[data-v-45ea2f7f]{width:100%;height:100%;position:absolute}.rectangle div[data-v-45ea2f7f]{width:100vmax;height:100vmax;position:absolute;transform:scale(0)}.rectangle-rotate-1 div[data-v-45ea2f7f]{background-color:var(--rectangle-rotate-1-color);animation:expand-rotate-45ea2f7f var(--rectangle-rotate-duration)ease calc(var(--rectangle-rotate-delay) + 0s)forwards;top:-50vmax;left:-50vmax}.rectangle-rotate-2 div[data-v-45ea2f7f]{background-color:var(--rectangle-rotate-2-color);animation:expand-rotate-45ea2f7f var(--rectangle-rotate-duration)ease calc(var(--rectangle-rotate-delay) + var(--rectangle-rotate-stagger))forwards;bottom:-50vmax;right:-50vmax}.rectangle-rotate-3 div[data-v-45ea2f7f]{background-color:var(--rectangle-rotate-3-color);animation:expand-rotate-45ea2f7f var(--rectangle-rotate-duration)ease calc(var(--rectangle-rotate-delay) + calc(var(--rectangle-rotate-stagger)*2))forwards;top:calc(50% - 50vmax);left:calc(50% - 50vmax)}@keyframes expand-rotate-45ea2f7f{0%{transform:scale(0)rotate(0)}to{transform:scale(1)rotate(var(--rectangle-rotate-rotation))}}html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%,-35%)}html[dir=rtl],[data-sonner-toaster][dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%,-35%)}[data-sonner-toaster]{width:var(--width);--gray1:#fcfcfc;--gray2:#f8f8f8;--gray3:#f3f3f3;--gray4:#ededed;--gray5:#e8e8e8;--gray6:#e2e2e2;--gray7:#dbdbdb;--gray8:#c7c7c7;--gray9:#8f8f8f;--gray10:#858585;--gray11:#6f6f6f;--gray12:#171717;--border-radius:8px;box-sizing:border-box;z-index:999999999;outline:none;margin:0;padding:0;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;list-style:none;transition:transform .4s;position:fixed}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift)*var(--gap));z-index:var(--z-index);opacity:0;transform:var(--y);touch-action:none;box-sizing:border-box;overflow-wrap:anywhere;outline:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;position:absolute}[data-sonner-toast][data-styled=true]{background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);width:var(--width);align-items:center;gap:6px;padding:16px;font-size:13px;display:flex;box-shadow:0 4px 12px #0000001a}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{--y:translateY(-100%);--lift:1;--lift-amount:calc(1*var(--gap));top:0}[data-sonner-toast][data-y-position=bottom]{--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift)*var(--gap));bottom:0}[data-sonner-toast][data-styled=true] [data-description]{color:#3f3f3f;font-weight:400;line-height:1.4}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{color:inherit;font-weight:500;line-height:1.5}[data-sonner-toast][data-styled=true] [data-icon]{width:16px;height:16px;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end);flex-shrink:0;justify-content:flex-start;align-items:center;display:flex;position:relative}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform-origin:50%;animation:.3s forwards sonner-fade-in;transform:scale(.8)}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{flex-direction:column;gap:2px;display:flex}[data-sonner-toast][data-styled=true] [data-button]{height:24px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);cursor:pointer;border:none;border-radius:4px;outline:none;flex-shrink:0;align-items:center;padding-left:8px;padding-right:8px;font-size:12px;font-weight:500;transition:opacity .4s,box-shadow .2s;display:flex}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:#00000014}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:#ffffff4d}[data-sonner-toast][data-styled=true] [data-close-button]{left:var(--toast-close-button-start);right:var(--toast-close-button-end);width:20px;height:20px;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);cursor:pointer;z-index:1;border-radius:50%;justify-content:center;align-items:center;padding:0;transition:opacity .1s,background .2s,border-color .2s;display:flex;position:absolute;top:0}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";z-index:-1;height:100%;position:absolute;left:-100%;right:-100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3)translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3)translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]:after{content:"";height:calc(var(--gap) + 1px);width:100%;position:absolute;bottom:100%;left:0}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before)*.05 + 1;--y:translateY(calc(var(--lift-amount)*var(--toasts-before)))scale(calc(-1*var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift)*var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift)*-100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift)*var(--offset) + var(--lift)*-100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y)translateY(var(--swipe-amount-y,0px))translateX(var(--swipe-amount-x,0px));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y)translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y)translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y)translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y)translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y)translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y)translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y)translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y)translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%;position:fixed}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left)*-1)}[data-sonner-toaster] [data-sonner-toast]{width:calc(100% - var(--mobile-offset-left)*2);left:0;right:0}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:calc(var(--mobile-offset-bottom) + max(env(safe-area-inset-bottom),0px))}[data-sonner-toaster][data-y-position=top]{top:calc(var(--mobile-offset-top) + max(env(safe-area-inset-top),0px))}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:#ecfdf3;--success-border:#bffcd9;--success-text:#008a2e;--info-bg:#f0f8ff;--info-border:#dde7fd;--info-text:#0973dc;--warning-bg:#fffcf0;--warning-border:#fbeeb1;--warning-text:#dc7609;--error-bg:#fff0f0;--error-border:#ffe0e1;--error-text:#e60000}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:#333;--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:#1f1f1f;--normal-border:#333;--normal-border-hover:#404040;--normal-text:var(--gray1);--success-bg:#001f0f;--success-border:#003d1c;--success-text:#59f3a6;--info-bg:#000d1f;--info-border:#19233e;--info-text:#5896f3;--warning-bg:#1d1f00;--warning-border:#2e2e00;--warning-text:#f3cf58;--error-bg:#2d0607;--error-border:#4d0408;--error-text:#ff9ea1}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);z-index:10;position:absolute;inset:0}.sonner-loading-wrapper[data-visible=false]{transform-origin:50%;animation:.2s forwards sonner-fade-out}.sonner-spinner{height:var(--size);width:var(--size);position:relative;top:50%;left:50%}.sonner-loading-bar{background:var(--gray11);border-radius:6px;width:24%;height:8%;animation:1.2s linear infinite sonner-spin;position:absolute;top:-3.9%;left:-10%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg)translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg)translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg)translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg)translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg)translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg)translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg)translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg)translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg)translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg)translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg)translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg)translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{transform-origin:50%;transition:opacity .2s,transform .2s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8)translate(-50%,-50%)}@property --chromatic-hue{syntax:"";inherits:true;initial-value:0}@keyframes hue-anim{0%{--chromatic-hue:0}to{--chromatic-hue:360}}.dynamic-hue{animation:10s linear infinite hue-anim}@font-face{font-family:cjkfonts AllSeto;font-style:normal;font-display:swap;src:url(/assets/cjkFonts_allseto_v1.11-ByBdljxl.ttf)format("truetype")}@font-face{font-family:Xiaolai SC;font-style:normal;font-display:swap;src:url(/assets/XiaolaiSC-Regular-SNWuh554.ttf)format("truetype")}*,:before,:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before,:after{--un-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.slide-away-enter-active,.slide-away-leave-active{transition:transform .3s ease-in-out,opacity .3s ease-in-out}.slide-away-enter,.slide-away-leave-to{opacity:0;transform:translateY(-10px)}.slide-away-enter-from,.slide-away-leave{opacity:0;transform:translateY(10px)}.fade-slide-out-r-to-l-enter-active,.fade-slide-out-r-to-l-leave-active{transition:opacity .2s ease-in-out,transform .2s ease-in-out}.fade-slide-out-r-to-l-enter-from,.fade-slide-out-r-to-l-leave-to{opacity:0;transform:translate(10px)}.fade-slide-out-r-to-l-enter-to,.fade-slide-out-r-to-l-leave-from{opacity:1;transform:translate(0)}.fade-slide-out-l-to-r-enter-active,.fade-slide-out-l-to-r-leave-active{transition:opacity .2s ease-in-out,transform .2s ease-in-out}.fade-slide-out-l-to-r-enter-from,.fade-slide-out-l-to-r-leave-to{opacity:0;transform:translate(-10px)}.fade-slide-out-l-to-r-enter-to,.fade-slide-out-l-to-r-leave-from{opacity:1;transform:translate(0)}.fade-enter-active,.fade-leave-active{transition:opacity .2s ease-in-out}.fade-enter-from,.fade-leave-to{opacity:0}.fade-enter-to,.fade-leave-from{opacity:1}:root{--bg-color-light:#fff;--bg-color-dark:#121212;--bg-color:var(--bg-color-light)}*{touch-action:manipulation}html,body,#app{overscroll-behavior:none;height:100%;margin:0;padding:0}html{background:var(--bg-color);transition:all .3s ease-in-out}html.dark{--bg-color:var(--bg-color-dark);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}#nprogress{pointer-events:none}#nprogress .bar{background:color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))70%,#636363);opacity:.75;z-index:1031;width:100%;height:2px;position:fixed;top:0;left:0}@supports (color:lab(0% 0 0)){#nprogress .bar{background:color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))70%,lab(42% 0 0))}}.dark #nprogress .bar{background:`color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))90%,#dedede)`}@supports (color:lab(0% 0 0)){.dark #nprogress .bar{background:`color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))90%,lab(88.4% 0 0))`}}@media (display-mode:standalone){#nprogress,#nprogress .bar{display:none}}@font-face{font-family:DM Sans;font-style:normal;font-display:swap;font-weight:100 1000;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-sans:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Sans;font-style:normal;font-display:swap;font-weight:100 1000;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-sans:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Serif Display;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-serif-display@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Serif Display;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-serif-display@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-300-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-400-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-500-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-300-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-400-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-500-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-800-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-ext-800-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/greek-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+1F??}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/kayah-li-wght-normal.woff2)format("woff2-variations");unicode-range:U+200C-200D,U+2010,U+25CC,U+A900-A92F}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Gugi;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/gugi@latest/korean-400-normal.woff2)format("woff2")}@font-face{font-family:Gugi;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/gugi@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Urbanist;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/urbanist:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Urbanist;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/urbanist:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-100-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-300-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-400-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-500-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-700-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-800-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-900-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-100-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-300-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-400-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-500-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-700-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-800-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-900-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-100-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-300-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-400-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-500-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-700-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-800-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-900-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-100-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-300-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-400-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-500-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-700-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-800-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-900-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-100-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-300-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-400-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-500-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-700-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-800-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-900-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-100-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-300-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-400-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-500-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-700-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-800-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-900-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-100-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-700-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-800-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-900-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-100-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-700-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-800-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-900-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-100-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-300-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-400-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-500-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-700-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-800-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-900-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}*,:before,:after,::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:root{--chromatic-hue:220.44;--chromatic-chroma:calc(.18 + (cos(var(--chromatic-hue)*3.14159/180)*.04));--chromatic-chroma-50:calc(var(--chromatic-chroma)*.3);--chromatic-chroma-100:calc(var(--chromatic-chroma)*.5);--chromatic-chroma-200:calc(var(--chromatic-chroma)*.6);--chromatic-chroma-300:calc(var(--chromatic-chroma)*.75);--chromatic-chroma-400:calc(var(--chromatic-chroma)*.85);--chromatic-chroma-500:var(--chromatic-chroma);--chromatic-chroma-600:calc(var(--chromatic-chroma)*1.15);--chromatic-chroma-700:calc(var(--chromatic-chroma)*1.1);--chromatic-chroma-800:calc(var(--chromatic-chroma)*.85);--chromatic-chroma-900:calc(var(--chromatic-chroma)*.7);--chromatic-chroma-950:calc(var(--chromatic-chroma)*.5)}.i-eos-icons\:three-dots-loading,[i-eos-icons\:three-dots-loading=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='18' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.67' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.33' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='0' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:alibabacloud{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M14.752 4.64h5.274C22.242 4.64 24 6.475 24 8.691V15.8a3.947 3.947 0 01-3.974 3.975h-5.274l1.299-1.835 3.822-1.222c.688-.23 1.146-.918 1.146-1.605v-5.81c0-.687-.458-1.375-1.146-1.605L16.05 6.475l-1.3-1.835zM2.98 15.111c0 .688.46 1.376 1.147 1.606l3.822 1.146 1.3 1.835H3.974A3.947 3.947 0 010 15.723V8.69c0-2.216 1.758-4.05 3.975-4.05h5.273L7.95 6.474 4.127 7.697c-.688.23-1.146.918-1.146 1.606v5.808z'/%3E%3Cpath d='M16.051 11.213H8.025v1.835h8.026v-1.835z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:anthropic{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:bilibiliindex{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M11.995 0c2.204-.001 3.701 2.07 4.497 3.874.374.849.672 1.728.892 2.638a.09.09 0 00.066.066c.885.209 1.728.486 2.529.83 1.17.504 2.236 1.17 3.076 2.13.195.224.386.52.574.89.78 1.539.27 3.194-.905 4.35-1.412 1.39-3.384 2.137-5.264 2.608a.058.058 0 00-.044.047c-.036.227-.184.734-.443 1.522-.71 2.16-2.34 5.044-4.966 5.045-2.625.001-4.258-2.88-4.97-5.04-.26-.788-.408-1.295-.446-1.522a.059.059 0 00-.043-.047c-1.88-.468-3.853-1.214-5.267-2.602-1.177-1.155-1.688-2.81-.909-4.35.188-.37.378-.666.573-.89.839-.962 1.905-1.628 3.074-2.133a15.26 15.26 0 012.529-.833.087.087 0 00.065-.066c.22-.91.516-1.79.89-2.639C8.296 2.072 9.791.001 11.994 0zm5.915 8.994l.176 1.29a.068.068 0 00.026.043c.415.318.687.68.815 1.083a1.996 1.996 0 01-1.846 2.596 2.001 2.001 0 01-2.058-2.282c.075-.52.359-.977.852-1.369a.052.052 0 00.02-.047c-.102-.978-.311-1.911-.559-2.993-.3-1.31-.727-2.529-1.45-3.705a3.868 3.868 0 00-.506-.665c-.48-.494-.997-.897-1.696-.728-.476.116-1.069.654-1.34 1.043a10.085 10.085 0 00-1.399 2.938.02.02 0 00.022.016l1.588-.074a.07.07 0 00.046-.02c.638-.632 1.57-.76 2.337-.308.318.187.569.478.754.873.456.977-.123 2.14-1.06 2.482-.879.321-1.8-.006-2.294-.809a.068.068 0 00-.061-.032 23.52 23.52 0 00-2.412.209c-.676.094-1.403.296-2.014.5-.692.228-1.347.52-1.965.876-.885.51-2.189 1.567-1.536 2.725.119.211.233.373.343.487.89.92 2 1.415 3.3 1.852a.022.022 0 00.029-.023l-.157-1.145a.068.068 0 00-.033-.05 2.08 2.08 0 01-.848-.96c-.415-.925-.03-1.983.792-2.49a2.004 2.004 0 012.415.239c.345.315.623.855.642 1.356.026.697-.253 1.239-.782 1.703a.057.057 0 00-.02.05c.165 1.255.485 2.545.787 3.705.262 1.004.69 2.098 1.296 3.041.315.49.697.92 1.135 1.189.526.323 1.05.312 1.57-.033.666-.442 1.045-1.034 1.47-1.822a9.514 9.514 0 00.77-1.89.017.017 0 00-.018-.014l-1.336.063a.06.06 0 00-.05.033 1.822 1.822 0 01-1.279 1.008 1.85 1.85 0 01-1.878-.665c-.558-.723-.557-1.598-.003-2.32a1.78 1.78 0 011.063-.668c.6-.133 1.164.016 1.693.447a.076.076 0 00.051.017c.83-.027 1.64-.098 2.431-.213.62-.09 1.364-.288 1.908-.442a11.537 11.537 0 002.236-.9c.732-.386 1.634-1.033 1.89-1.847.4-1.269-1.44-2.406-2.352-2.802-.637-.277-1.13-.467-1.479-.57a.02.02 0 00-.019.003.02.02 0 00-.006.009.022.022 0 000 .01z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:cloudflare{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437'/%3E%3Cpath d='M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:deepseek{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:featherless-ai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' width='1em' height='1em' %3E%3Cg fill='currentColor'%3E%3Cpath d='M40.0866 4.68482C38.2902 3.5825 35.863 3 33.0672 3C28.7842 3 24.0653 4.35865 19.8276 6.72206L19.7979 6.71083C19.7979 6.71083 19.7937 6.73344 19.7914 6.74423C18.5086 7.4617 17.2656 8.2629 16.0981 9.15731C9.22112 14.4248 7.29519 20.6748 8.92004 24.0156C7.14142 27.0728 6.0457 30.2332 6 33.9767C9.41949 27.421 11.4719 22.108 22.6146 13.1637C19.4309 13.8501 13.9281 17.1057 10.2271 22.0459C9.87793 19.156 12.1477 14.4895 17.2033 10.6174C17.8435 10.127 18.5092 9.66864 19.1886 9.23374C18.6577 10.8934 18.8269 10.4806 17.7254 12.8076C19.3543 11.2566 20.4268 10.2995 22.035 7.64145C24.123 6.60964 26.2948 5.83844 28.4482 5.37235C28.0919 6.56071 27.4137 8.57466 26.4955 10.1669C26.4955 10.1669 28.8258 9.66435 30.7518 9.77788C29.6995 10.9459 28.7527 12.2094 27.7926 13.5012C26.4777 15.2696 25.1184 17.0983 23.3778 18.8005C23.1683 19.0054 22.968 19.1912 22.7649 19.383C20.0902 19.1254 18.3235 20.1315 16.6683 21.9089C17.9737 21.2966 19.7273 20.7924 20.8266 21.0959C18.8008 22.7579 15.6106 24.9488 12.9893 24.7684C12.4922 25.5295 12.4608 25.5528 11.9144 26.4722C16.1664 27.537 21.507 23.1905 24.6498 20.1161C26.4926 18.3131 27.8964 16.4257 29.2534 14.6012C32.0481 10.8427 34.4616 7.5974 39.8153 6.3624L42 5.85877L40.0866 4.68482Z' class='logo-mark'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:fireworks{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:gemini{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:huggingface{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.781 3.277c2.997 1.704 4.844 4.851 4.844 8.258 0 .995-.155 1.955-.443 2.857a1.332 1.332 0 011.125.4 1.41 1.41 0 01.2 1.723c.204.165.352.385.428.632l.017.062c.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.255.57-.893 1.018-2.128 1.5l-.202.078-.131.048c-.478.173-.89.295-1.061.345l-.086.024c-.89.243-1.808.375-2.732.394-1.32 0-2.3-.36-2.923-1.067a9.852 9.852 0 01-3.18.018C9.778 21.647 8.802 22 7.494 22a11.249 11.249 0 01-2.541-.343l-.221-.06-.273-.08a16.574 16.574 0 01-1.175-.405c-1.237-.483-1.875-.93-2.13-1.501-.186-.4-.151-.867.093-1.236a1.42 1.42 0 01-.2-1.166c.069-.273.226-.516.447-.694a1.41 1.41 0 01.2-1.722c.233-.248.557-.391.917-.407l.078-.001a9.385 9.385 0 01-.44-2.85c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0zM4.188 14.758c.125.687 2.357 2.35 2.14 2.707-.19.315-.796-.239-.948-.386l-.041-.04-.168-.147c-.561-.479-2.304-1.9-2.74-1.432-.43.46.119.859 1.055 1.42l.784.467.136.083c1.045.643 1.12.84.95 1.113-.188.295-3.07-2.1-3.34-1.083-.27 1.011 2.942 1.304 2.744 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725l.16.04.175.042c1.227.284 3.565.65 4.435-.604.673-.973.64-1.709-.248-2.61l-.057-.057c-.945-.928-1.495-2.288-1.495-2.288l-.017-.058-.025-.072c-.082-.22-.284-.639-.63-.584-.46.073-.798 1.21.12 1.933l.05.038c.977.721-.195 1.21-.573.534l-.058-.104-.143-.25c-.463-.799-1.282-2.111-1.739-2.397-.532-.332-.907-.148-.782.541zm14.842-.541c-.533.335-1.563 2.074-1.94 2.751a.613.613 0 01-.687.302.436.436 0 01-.176-.098.303.303 0 01-.049-.06l-.014-.028-.008-.02-.007-.019-.003-.013-.003-.017a.289.289 0 01-.004-.048c0-.12.071-.266.25-.427.026-.024.054-.047.084-.07l.047-.036c.022-.016.043-.032.063-.049.883-.71.573-1.81.131-1.917l-.031-.006-.056-.004a.368.368 0 00-.062.006l-.028.005-.042.014-.039.017-.028.015-.028.019-.036.027-.023.02c-.173.158-.273.428-.31.542l-.016.054s-.53 1.309-1.439 2.234l-.054.054c-.365.358-.596.69-.702 1.018-.143.437-.066.868.21 1.353.055.097.117.195.187.296.882 1.275 3.282.876 4.494.59l.286-.07.25-.074c.276-.084.736-.233 1.2-.42l.188-.077.065-.028.064-.028.124-.056.081-.038c.529-.252.964-.543.994-.827l.001-.036a.299.299 0 00-.037-.139c-.094-.176-.271-.212-.491-.168l-.045.01c-.044.01-.09.024-.136.04l-.097.035-.054.022c-.559.23-1.238.705-1.607.745h.006a.452.452 0 01-.05.003h-.024l-.024-.003-.023-.005c-.068-.016-.116-.06-.14-.142a.22.22 0 01-.005-.1c.062-.345.958-.595 1.713-.91l.066-.028c.528-.224.97-.483.985-.832v-.04a.47.47 0 00-.016-.098c-.048-.18-.175-.251-.36-.251-.785 0-2.55 1.36-2.92 1.36-.025 0-.048-.007-.058-.024a.6.6 0 01-.046-.088c-.1-.238.068-.462 1.06-1.066l.209-.126c.538-.32 1.01-.588 1.341-.831.29-.212.475-.406.503-.6l.003-.028c.008-.113-.038-.227-.147-.344a.266.266 0 00-.07-.054l-.034-.015-.013-.005a.403.403 0 00-.13-.02c-.162 0-.369.07-.595.18-.637.313-1.431.952-1.826 1.285l-.249.215-.033.033c-.08.078-.288.27-.493.386l-.071.037-.041.019a.535.535 0 01-.122.036h.005a.346.346 0 01-.031.003l.01-.001-.013.001c-.079.005-.145-.021-.19-.095a.113.113 0 01-.014-.065c.027-.465 2.034-1.991 2.152-2.642l.009-.048c.1-.65-.271-.817-.791-.493zM11.938 2.984c-4.798 0-8.688 3.829-8.688 8.55 0 .692.083 1.364.24 2.008l.008-.009c.252-.298.612-.46 1.017-.46.355.008.699.117.993.312.22.14.465.384.715.694.261-.372.69-.598 1.15-.605.852 0 1.367.728 1.562 1.383l.047.105.06.127c.192.396.595 1.139 1.143 1.68 1.06 1.04 1.324 2.115.8 3.266a8.865 8.865 0 002.024-.014c-.505-1.12-.26-2.17.74-3.186l.066-.066c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694a1.87 1.87 0 01.99-.312c.357 0 .682.126.925.36.14-.61.215-1.245.215-1.898 0-4.722-3.89-8.55-8.687-8.55zm1.857 8.926l.439-.212c.553-.264.89-.383.89.152 0 1.093-.771 3.208-3.155 3.262h-.184c-2.325-.052-3.116-2.06-3.156-3.175l-.001-.087c0-1.107 1.452.586 3.25.586.716 0 1.379-.272 1.917-.526zm4.017-3.143c.45 0 .813.358.813.8 0 .441-.364.8-.813.8a.806.806 0 01-.812-.8c0-.442.364-.8.812-.8zm-11.624 0c.448 0 .812.358.812.8 0 .441-.364.8-.812.8a.806.806 0 01-.813-.8c0-.442.364-.8.813-.8zm7.79-.841c.32-.384.846-.54 1.33-.394.483.146.83.564.878 1.06.048.495-.212.97-.659 1.203-.322.168-.447-.477-.767-.585l.002-.003c-.287-.098-.772.362-.925.079a1.215 1.215 0 01.14-1.36zm-4.323 0c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003c-.108.036-.194.134-.273.24l-.118.165c-.11.15-.22.262-.377.18a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:microsoft{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M11.49 2H2v9.492h9.492V2h-.002z'/%3E%3Cpath d='M22 2h-9.492v9.492H22V2z'/%3E%3Cpath d='M11.49 12.508H2V22h9.492v-9.492h-.002z'/%3E%3Cpath d='M22 12.508h-9.492V22H22v-9.492z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:mistral{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:moonshot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:novita{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M9.167 4.17v5.665L0 19.003h9.167v-5.666l5.666 5.666H24L9.167 4.17z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:ollama{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:openai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:openrouter{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:perplexity{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:player2{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M19.956 10.178C19.8934 10.7544 19.724 11.6784 19.1182 12.5274C18.3667 13.5817 17.3528 13.8824 16.9558 13.9746C16.6911 14.0049 16.3026 14.045 15.8323 14.0789C14.1804 14.2045 13.0525 14.1565 11.7041 14.131C10.81 14.1143 9.54304 14.1034 7.98548 14.131C7.97564 16.7493 7.96551 19.368 7.95508 21.987L5 22V15.8717C5.00358 14.6542 5.00983 12.9193 5.03397 10.7643C6.47441 10.7684 14.6905 10.7205 15.6696 10.7721C15.8672 10.7841 16.3621 10.8039 16.6764 10.4458C16.8842 10.2113 16.9696 9.83348 16.9763 9.26802C16.9835 8.82659 16.9902 8.38204 16.9763 7.94322C16.9459 6.90454 16.608 6.51472 15.7103 6.51107C12.8124 6.5069 9.91142 6.43915 7.01356 6.51107C6.60048 6.51888 5.90083 6.53087 5.02056 6.50325V3C5.43007 3.00782 6.13285 3.02397 7.00686 3.01563C11.1399 2.98436 12.7292 3.01199 15.5328 3.01563C18.3591 3.0198 19.994 4.94393 19.994 8.26009C19.9913 8.90059 20.0253 9.54944 19.956 10.178Z'/%3E%3Cpath d='M20 19H11V22H20V19Z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:together{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M17.385 11.23a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm0 10.77a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm-10.77 0a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23z' opacity='.2'/%3E%3Ccircle cx='6.615' cy='6.615' r='4.615'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:vllm{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M0 4.973h9.324V23L0 4.973z'/%3E%3Cpath d='M13.986 4.351L22.378 0l-6.216 23H9.324l4.662-18.649z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:volcengine{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.29 5.36L3.148 21.737a.215.215 0 00.203.261h8.29a.214.214 0 00.215-.261L7.7 5.359a.214.214 0 00-.41 0z' fill-opacity='.5'/%3E%3Cpath clip-rule='evenodd' d='M4.553 16.18l-1.406 5.558a.214.214 0 00.203.261h2.42-4.551a.214.214 0 01-.214-.26l2.275-8.961a.214.214 0 01.409 0l.864 3.402z'/%3E%3Cpath d='M14.44.15a.214.214 0 00-.41 0L8.366 21.739a.214.214 0 00.214.261H19.9a.214.214 0 00.215-.261L14.44.151z' fill-opacity='.5'/%3E%3Cpath clip-rule='evenodd' d='M16.694 22h3.207a.215.215 0 00.214-.262l-1.839-6.993 1.164-4.592a.214.214 0 01.411 0l2.951 11.586a.214.214 0 01-.214.261h-5.894z'/%3E%3Cpath d='M10.278 7.741L6.685 21.736a.214.214 0 00.214.264h7.17a.216.216 0 00.214-.166.216.216 0 000-.098L10.687 7.742a.214.214 0 00-.409 0z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:xai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:ghost,[i-lucide\:ghost=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 10h.01M15 10h.01M12 2a8 8 0 0 0-8 8v12l3-3l2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:mic,[i-lucide\:mic=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 19v3m7-12v2a7 7 0 0 1-14 0v-2'/%3E%3Crect width='6' height='13' x='9' y='2' rx='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:music,[i-lucide\:music=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:discord{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:elevenlabs{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.604 0v24h4.931V0zm9.86 0v24h4.933V0z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:github,[i-simple-icons\:github=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:javascript{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M0 0h24v24H0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873c-.736-.345-1.554-.585-1.797-1.14c-.091-.33-.105-.51-.046-.705c.15-.646.915-.84 1.515-.66c.39.12.75.42.976.9c1.034-.676 1.034-.676 1.755-1.125c-.27-.42-.404-.601-.586-.78c-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005c-1.14 1.291-.811 3.541.569 4.471c1.365 1.02 3.361 1.244 3.616 2.205c.24 1.17-.87 1.545-1.966 1.41c-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109c1.74 1.756 6.09 1.666 6.871-1.004c.029-.09.24-.705.074-1.65zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805c0 1.232.063 2.363-.138 2.711c-.33.689-1.18.601-1.566.48c-.396-.196-.597-.466-.83-.855c-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517c.855.51 2.004.675 3.207.405c.783-.226 1.458-.691 1.811-1.411c.51-.93.402-2.07.397-3.346c.012-2.054 0-4.109 0-6.179z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:x{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584l-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar-check-circle-line-duotone,.i-solar\:check-circle-line-duotone,[i-solar-check-circle-line-duotone=""],[i-solar\:check-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m8.5 12.5l2 2l5-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:add-circle-line-duotone,[i-solar\:add-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:add-square-line-duotone,[i-solar\:add-square-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-down-linear,[i-solar\:alt-arrow-down-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19 9l-7 6l-7-6'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-left-line-duotone,[i-solar\:alt-arrow-left-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 5l-6 7l6 7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-right-outline,[i-solar\:alt-arrow-right-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M8.512 4.43a.75.75 0 0 1 1.057.082l6 7a.75.75 0 0 1 0 .976l-6 7a.75.75 0 0 1-1.138-.976L14.012 12L8.431 5.488a.75.75 0 0 1 .08-1.057' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:armchair-2-bold-duotone,[i-solar\:armchair-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.533 18H6.75v2a.75.75 0 1 1-1.5 0v-2.324c-.829-.362-1.49-1.005-1.808-1.817l-.039-.102L2.1 12.264C1.685 11.15 2.613 10 3.927 10c.81 0 1.534.453 1.81 1.134l1.098 2.706c.1.246.15.37.222.47a1.2 1.2 0 0 0 .74.463c.13.027.277.027.57.027h6.98c.569 0 .853 0 1.091-.098q.196-.082.349-.219c.184-.166.281-.405.475-.883l1.001-2.466c.276-.68 1-1.134 1.81-1.134c1.314 0 2.242 1.15 1.827 2.264l-1.12 3c-.195.524-.292.785-.421 1.008a3.43 3.43 0 0 1-1.609 1.404V20a.75.75 0 1 1-1.5 0v-2.005c-.187.005-.415.005-.717.005'/%3E%3Cpath fill='currentColor' d='M13.236 3.5h-2.472c-1.1 0-1.976 0-2.66.088c-.706.09-1.285.28-1.746.72c-.464.441-.669 1.003-.765 1.685c-.093.658-.093 1.495-.093 2.54v2.195q.147.186.237.406l1.098 2.706c.1.246.15.37.222.47a1.2 1.2 0 0 0 .74.463c.13.027.277.027.57.027h6.98c.569 0 .853 0 1.091-.098q.196-.082.349-.219c.184-.166.281-.405.475-.883l1.001-2.466q.09-.221.237-.406V8.533c0-1.045 0-1.882-.093-2.54c-.096-.682-.301-1.244-.765-1.686c-.46-.438-1.04-.629-1.745-.72c-.685-.087-1.56-.087-2.661-.087' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:arrow-right-line-duotone,[i-solar\:arrow-right-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Cpath fill='currentColor' d='M4 11.25a.75.75 0 0 0 0 1.5zm0 1.5h16v-1.5H4z' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m14 6l6 6l-6 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:arrow-up-outline,[i-solar\:arrow-up-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.47 3.47a.75.75 0 0 1 1.06 0l6 6a.75.75 0 1 1-1.06 1.06l-4.72-4.72V20a.75.75 0 0 1-1.5 0V5.81l-4.72 4.72a.75.75 0 1 1-1.06-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:book-bookmark-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 20.028V18H8v2.028c0 .277 0 .416.095.472s.224-.006.484-.13l1.242-.593c.088-.042.132-.063.179-.063s.091.02.179.063l1.242.593c.26.124.39.186.484.13c.095-.056.095-.195.095-.472' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8 18h-.574c-1.084 0-1.462.006-1.753.068c-.513.11-.96.347-1.285.667c-.11.108-.164.161-.291.505s-.107.489-.066.78l.022.15c.11.653.31.998.616 1.244c.307.246.737.407 1.55.494c.837.09 1.946.092 3.536.092h4.43c1.59 0 2.7-.001 3.536-.092c.813-.087 1.243-.248 1.55-.494s.506-.591.616-1.243c.091-.548.11-1.241.113-2.171h-8v2.028c0 .277 0 .416-.095.472s-.224-.006-.484-.13l-1.242-.593c-.088-.042-.132-.063-.179-.063s-.091.02-.179.063l-1.242.593c-.26.124-.39.186-.484.13C8 20.444 8 20.305 8 20.028z'/%3E%3Cpath fill='currentColor' d='M4.727 2.733c.306-.308.734-.508 1.544-.618C7.105 2.002 8.209 2 9.793 2h4.414c1.584 0 2.688.002 3.522.115c.81.11 1.238.31 1.544.618c.305.308.504.74.613 1.557c.112.84.114 1.955.114 3.552V18H7.426c-1.084 0-1.462.006-1.753.068c-.513.11-.96.347-1.285.667c-.11.108-.164.161-.291.505A1.3 1.3 0 0 0 4 19.7V7.842c0-1.597.002-2.711.114-3.552c.109-.816.308-1.249.613-1.557' opacity='.5'/%3E%3Cpath fill='currentColor' d='M7.25 7A.75.75 0 0 1 8 6.25h8a.75.75 0 0 1 0 1.5H8A.75.75 0 0 1 7.25 7M8 9.75a.75.75 0 0 0 0 1.5h5a.75.75 0 0 0 0-1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:bookmark-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M21 11.098v4.993c0 3.096 0 4.645-.734 5.321c-.35.323-.792.526-1.263.58c-.987.113-2.14-.907-4.445-2.946c-1.02-.901-1.529-1.352-2.118-1.47a2.2 2.2 0 0 0-.88 0c-.59.118-1.099.569-2.118 1.47c-2.305 2.039-3.458 3.059-4.445 2.945a2.24 2.24 0 0 1-1.263-.579C3 20.736 3 19.188 3 16.091v-4.994C3 6.81 3 4.666 4.318 3.333S7.758 2 12 2s6.364 0 7.682 1.332S21 6.81 21 11.098' opacity='.5'/%3E%3Cpath fill='currentColor' d='M9 5.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:box-minimalistic-bold-duotone,[i-solar\:box-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8.422 20.618C10.178 21.54 11.056 22 12 22V12L2.638 7.073l-.04.067C2 8.154 2 9.417 2 11.942v.117c0 2.524 0 3.787.597 4.801c.598 1.015 1.674 1.58 3.825 2.709z'/%3E%3Cpath fill='currentColor' d='m17.577 4.432l-2-1.05C13.822 2.461 12.944 2 12 2c-.945 0-1.822.46-3.578 1.382l-2 1.05C4.318 5.536 3.242 6.1 2.638 7.072L12 12l9.362-4.927c-.606-.973-1.68-1.537-3.785-2.641' opacity='.7'/%3E%3Cpath fill='currentColor' d='m21.403 7.14l-.041-.067L12 12v10c.944 0 1.822-.46 3.578-1.382l2-1.05c2.151-1.129 3.227-1.693 3.825-2.708c.597-1.014.597-2.277.597-4.8v-.117c0-2.525 0-3.788-.597-4.802' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:card-search-broken,[i-solar\:card-search-broken=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' d='M14 4c3.771 0 5.657 0 6.828 1.172S22 8.229 22 12v1M10 4C6.229 4 4.343 4 3.172 5.172S2 8.229 2 12s0 5.657 1.172 6.828S6.229 20 10 20h3m-3-4H6'/%3E%3Ccircle cx='18' cy='17' r='3'/%3E%3Cpath stroke-linecap='round' d='m20.5 19.5l1 1M2 10h5m15 0H11'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:chat-round-line-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12c0 1.6.376 3.112 1.043 4.453c.178.356.237.763.134 1.148l-.595 2.226a1.3 1.3 0 0 0 1.591 1.592l2.226-.596a1.63 1.63 0 0 1 1.149.133A9.96 9.96 0 0 0 12 22' opacity='.5'/%3E%3Cpath fill='currentColor' d='M7.825 12.85a.825.825 0 0 0 0 1.65h6.05a.825.825 0 0 0 0-1.65zm0-3.85a.825.825 0 0 0 0 1.65h8.8a.825.825 0 0 0 0-1.65z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:chat-square-like-bold-duotone,[i-solar\:chat-square-like-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m13.629 20.472l-.542.916c-.483.816-1.69.816-2.174 0l-.542-.916c-.42-.71-.63-1.066-.968-1.262c-.338-.197-.763-.204-1.613-.219c-1.256-.021-2.043-.098-2.703-.372a5 5 0 0 1-2.706-2.706C2 14.995 2 13.83 2 11.5v-1c0-3.273 0-4.91.737-6.112a5 5 0 0 1 1.65-1.651C5.59 2 7.228 2 10.5 2h3c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C22 5.59 22 7.228 22 10.5v1c0 2.33 0 3.495-.38 4.413a5 5 0 0 1-2.707 2.706c-.66.274-1.447.35-2.703.372c-.85.015-1.275.022-1.613.219c-.338.196-.548.551-.968 1.262' opacity='.5'/%3E%3Cpath fill='currentColor' d='M10.99 14.308c-1.327-.978-3.49-2.84-3.49-4.593c0-2.677 2.475-3.677 4.5-1.609c2.025-2.068 4.5-1.068 4.5 1.609c0 1.752-2.163 3.615-3.49 4.593c-.454.335-.681.502-1.01.502s-.556-.167-1.01-.502'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:check-circle-bold-duotone,[i-solar\:check-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M16.03 8.97a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:close-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.97 8.97a.75.75 0 0 1 1.06 0L12 10.94l1.97-1.97a.75.75 0 1 1 1.06 1.06L13.06 12l1.97 1.97a.75.75 0 0 1-1.06 1.06L12 13.06l-1.97 1.97a.75.75 0 0 1-1.06-1.06L10.94 12l-1.97-1.97a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:close-circle-line-duotone,[i-solar\:close-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='m14.5 9.5l-5 5m0-5l5 5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:code-bold-duotone,[i-solar\:code-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.443 7.328a.75.75 0 0 1 1.059-.056l1.737 1.564c.737.663 1.347 1.212 1.767 1.71c.44.525.754 1.088.754 1.784c0 .695-.313 1.258-.754 1.782c-.42.499-1.03 1.049-1.767 1.711l-1.737 1.564a.75.75 0 1 1-1.004-1.115l1.697-1.527c.788-.709 1.319-1.19 1.663-1.598c.33-.393.402-.622.402-.817c0-.196-.072-.425-.402-.818c-.344-.409-.875-.889-1.663-1.598l-1.697-1.527a.75.75 0 0 1-.056-1.06m-8.94 1.06a.75.75 0 0 0-1.004-1.115L4.761 8.836c-.737.663-1.347 1.212-1.767 1.71c-.44.525-.754 1.088-.754 1.784c0 .695.313 1.258.754 1.782c.42.499 1.03 1.049 1.767 1.711l1.737 1.564a.75.75 0 1 0 1.004-1.115l-1.697-1.527c-.788-.709-1.319-1.19-1.663-1.598c-.33-.393-.402-.622-.402-.817c0-.196.072-.425.402-.818c.344-.409.875-.889 1.663-1.598z'/%3E%3Cpath fill='currentColor' d='M14.182 4.276a.75.75 0 0 1 .53.918l-3.974 14.83a.75.75 0 1 1-1.449-.389l3.974-14.83a.75.75 0 0 1 .919-.53' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:danger-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12s4.477 10 10 10s10-4.477 10-10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 6.25a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0V7a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:danger-triangle-bold-duotone,[i-solar\:danger-triangle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 3c-2.31 0-3.77 2.587-6.688 7.762l-.364.644c-2.425 4.3-3.638 6.45-2.542 8.022S6.214 21 11.636 21h.728c5.422 0 8.134 0 9.23-1.572s-.117-3.722-2.542-8.022l-.364-.645C15.77 5.587 14.311 3 12 3' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 7.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V8a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:document-add-outline,[i-solar\:document-add-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.944 1.25h2.112c1.838 0 3.294 0 4.433.153c1.172.158 2.121.49 2.87 1.238a.75.75 0 0 1-1.06 1.06c-.424-.422-1.004-.676-2.01-.811c-1.027-.138-2.382-.14-4.289-.14h-2c-1.907 0-3.261.002-4.29.14c-1.005.135-1.585.389-2.008.812S4.025 4.705 3.89 5.71c-.138 1.029-.14 2.383-.14 4.29v4c0 1.907.002 3.262.14 4.29c.135 1.005.389 1.585.812 2.008s1.003.677 2.009.812c1.028.138 2.382.14 4.289.14h2c1.907 0 3.262-.002 4.29-.14c1.005-.135 1.585-.389 2.008-.812c.696-.696.907-1.777.943-4.309a.75.75 0 0 1 1.5.022c-.035 2.427-.192 4.158-1.382 5.348c-.749.748-1.698 1.08-2.87 1.238c-1.14.153-2.595.153-4.433.153h-2.112c-1.838 0-3.294 0-4.433-.153c-1.172-.158-2.121-.49-2.87-1.238c-.748-.749-1.08-1.698-1.238-2.87c-.153-1.14-.153-2.595-.153-4.433V9.944c0-1.838 0-3.294.153-4.433c.158-1.172.49-2.121 1.238-2.87c.749-.748 1.698-1.08 2.87-1.238c1.14-.153 2.595-.153 4.433-.153m7.17 5.796a2.716 2.716 0 1 1 3.84 3.84L17.2 15.643a7 7 0 0 1-.63.587q-.346.27-.744.46c-.224.107-.46.185-.806.3l-2.084.695a1.28 1.28 0 0 1-1.62-1.62l.681-2.04l.014-.043c.116-.347.194-.582.301-.806a4 4 0 0 1 .46-.744c.153-.196.328-.371.587-.63l.031-.031zm2.78 1.06a1.216 1.216 0 0 0-1.72 0l-.182.182l.034.107c.094.27.273.63.611.968a2.55 2.55 0 0 0 1.075.645l.182-.182a1.216 1.216 0 0 0 0-1.72m-1.328 3.048a4 4 0 0 1-.99-.73a4 4 0 0 1-.73-.99L14.45 12.83c-.301.301-.407.409-.496.523q-.17.218-.289.467c-.062.131-.111.274-.246.678l-.4 1.2l.283.283l1.2-.4c.404-.135.547-.184.678-.246q.248-.12.467-.289c.114-.089.222-.195.523-.496zM7.25 9A.75.75 0 0 1 8 8.25h6.5a.75.75 0 0 1 0 1.5H8A.75.75 0 0 1 7.25 9m0 4a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5H8a.75.75 0 0 1-.75-.75m0 4a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5H8a.75.75 0 0 1-.75-.75' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:document-text-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M3 10c0-3.771 0-5.657 1.172-6.828S7.229 2 11 2h2c3.771 0 5.657 0 6.828 1.172S21 6.229 21 10v4c0 3.771 0 5.657-1.172 6.828S16.771 22 13 22h-2c-3.771 0-5.657 0-6.828-1.172S3 17.771 3 14z'/%3E%3Cpath stroke-linecap='round' d='M8 12h8M8 8h8m-8 8h5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:earth-outline,[i-solar\:earth-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.578 5.343a9.25 9.25 0 0 0 6.803 15.9c-.206-.912-.234-2.138.393-3.319c.652-1.229 2.002-1.762 2.995-2.006a9.2 9.2 0 0 1 1.898-.254h.043c1.673-.018 2.426-.562 2.826-1.08c.342-.444.47-.887.602-1.336l.05-.172A9.22 9.22 0 0 0 18.6 5.519l-.027.1c-.163.594-.425 1.202-.711 1.636c-.256.388-.752.78-1.164 1.076a10 10 0 0 1-.902.56c-.228.132-.433.25-.63.38c-.432.286-.766.593-.991 1.056a.67.67 0 0 0-.035.49c.075.272.126.578.126.889c.002.649-.328 1.176-.753 1.518a2.4 2.4 0 0 1-1.521.526c-2.455-.027-3.965-2.02-4.164-4.236c-.08-.881-.466-1.773-.954-2.552a8.8 8.8 0 0 0-1.296-1.62m1.167-.956a10.5 10.5 0 0 1 1.4 1.779c.558.89 1.069 2.012 1.177 3.214c.15 1.68 1.213 2.854 2.686 2.87a.9.9 0 0 0 .563-.194c.146-.117.196-.24.195-.346c0-.156-.026-.328-.072-.495a2.16 2.16 0 0 1 .131-1.542c.385-.794.956-1.285 1.514-1.653c.239-.158.487-.3.71-.43l.09-.05c.255-.148.48-.28.683-.427c.431-.31.704-.557.787-.684c.183-.276.388-.734.518-1.207c.103-.374.131-.662.122-.84A9.2 9.2 0 0 0 12 2.75a9.2 9.2 0 0 0-5.255 1.637M22.68 13.24q.07-.61.071-1.24c0-5.937-4.813-10.75-10.75-10.75S1.25 6.063 1.25 12S6.063 22.75 12 22.75c5.46 0 9.97-4.071 10.659-9.344a3 3 0 0 1 .048-.156zm-2.774 3.567c-.596.218-1.314.348-2.179.357h-.031l-.09.003a7.7 7.7 0 0 0-1.477.208c-.902.221-1.693.62-2.029 1.252c-.456.859-.39 1.793-.22 2.432a9.26 9.26 0 0 0 6.026-4.252' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:emoji-funny-square-bold-duotone,[i-solar\:emoji-funny-square-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M6.504 21.52c1.633.943 3.706.387 7.853-.724s6.22-1.666 7.163-3.3s.387-3.706-.724-7.853s-1.666-6.22-3.3-7.163s-3.706-.388-7.853.724c-4.147 1.11-6.22 1.666-7.163 3.3s-.388 3.706.724 7.853c1.11 4.147 1.666 6.22 3.3 7.163' opacity='.5'/%3E%3Cpath fill='currentColor' d='M14.898 11.224c.533-.143.792-.908.578-1.708s-.821-1.333-1.355-1.19c-.533.143-.792.907-.577 1.708c.214.8.82 1.333 1.354 1.19m-5.796 1.553c.534-.143.792-.908.578-1.708s-.82-1.333-1.354-1.19s-.792.907-.578 1.708s.82 1.333 1.354 1.19m-.917 2.974a.75.75 0 0 1 .91-.545c1.13.283 2.428.287 3.746-.066c1.318-.354 2.44-1.006 3.278-1.816a.75.75 0 1 1 1.043 1.078a8.4 8.4 0 0 1-1.15.928l.159.322a1.5 1.5 0 1 1-2.693 1.322l-.196-.4l-.053.014c-1.555.417-3.112.42-4.499.073a.75.75 0 0 1-.545-.91'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:eye-closed-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.919 6.605a1 1 0 0 0-1.838.79l.002.003l.003.007l.01.021l.032.072q.04.09.12.25c.105.21.262.506.47.857c.41.687 1.027 1.6 1.872 2.52l-.797.797a1 1 0 1 0 1.414 1.414l.84-.84c.565.455 1.197.885 1.897 1.256l-.782 1.202a1 1 0 0 0 1.676 1.091l.985-1.514c.677.208 1.402.355 2.177.425V16.5a1 1 0 0 0 1 1V13c-2.748 0-4.819-1.199-6.304-2.59l-.024-.022a12 12 0 0 1-.564-.569a13.4 13.4 0 0 1-1.67-2.237a12 12 0 0 1-.516-.968zm-1.838.79L2 7c-.92.394-.919.395-.919.395' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M15.22 12.398A8.7 8.7 0 0 1 12 13v4.5a1 1 0 0 0 1-1v-1.544c.772-.07 1.497-.217 2.176-.425l.986 1.515a1 1 0 0 0 1.676-1.091l-.782-1.203c.701-.37 1.332-.8 1.897-1.256l.84.84a1 1 0 1 0 1.414-1.414l-.797-.798a15.4 15.4 0 0 0 2.302-3.296a10 10 0 0 0 .19-.395l.011-.026l.004-.008l.002-.005a1 1 0 1 0-1.838-.788l-.005.011a5 5 0 0 1-.146.302a13 13 0 0 1-2.614 3.48c-.841.79-1.87 1.517-3.095 2' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:eye-scan-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14 2.75c1.907 0 3.262.002 4.29.14c1.005.135 1.585.389 2.008.812c.487.487.7.865.817 1.538c.132.759.135 1.84.135 3.76a.75.75 0 0 0 1.5 0v-.096c0-1.8 0-3.018-.158-3.922c-.175-1.005-.549-1.656-1.233-2.34c-.749-.75-1.698-1.081-2.87-1.239c-1.14-.153-2.595-.153-4.433-.153H14a.75.75 0 0 0 0 1.5M2 14.25a.75.75 0 0 1 .75.75c0 1.92.003 3.001.135 3.76c.118.673.33 1.051.817 1.538c.423.423 1.003.677 2.009.812c1.028.138 2.382.14 4.289.14a.75.75 0 0 1 0 1.5h-.056c-1.838 0-3.294 0-4.433-.153c-1.172-.158-2.121-.49-2.87-1.238c-.684-.685-1.058-1.336-1.233-2.341c-.158-.904-.158-2.123-.158-3.922V15a.75.75 0 0 1 .75-.75m20 0a.75.75 0 0 1 .75.75v.096c0 1.8 0 3.018-.158 3.922c-.175 1.005-.549 1.656-1.233 2.34c-.749.75-1.698 1.081-2.87 1.239c-1.14.153-2.595.153-4.433.153H14a.75.75 0 0 1 0-1.5c1.907 0 3.262-.002 4.29-.14c1.005-.135 1.585-.389 2.008-.812c.487-.487.7-.865.817-1.538c.132-.759.135-1.84.135-3.76a.75.75 0 0 1 .75-.75m-12.056-13H10a.75.75 0 0 1 0 1.5c-1.907 0-3.261.002-4.29.14c-1.005.135-1.585.389-2.008.812c-.487.487-.7.865-.817 1.538c-.132.759-.135 1.84-.135 3.76a.75.75 0 1 1-1.5 0v-.096c0-1.8 0-3.018.158-3.922c.175-1.005.549-1.656 1.233-2.34c.749-.75 1.698-1.081 2.87-1.239c1.14-.153 2.595-.153 4.433-.153' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 10.75a1.25 1.25 0 1 0 0 2.5a1.25 1.25 0 0 0 0-2.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.892 14.06C5.297 13.37 5 13.025 5 12s.297-1.37.892-2.06C7.08 8.562 9.072 7 12 7s4.92 1.562 6.108 2.94c.595.69.892 1.035.892 2.06s-.297 1.37-.892 2.06C16.92 15.438 14.928 17 12 17s-4.92-1.562-6.108-2.94M9.25 12a2.75 2.75 0 1 1 5.5 0a2.75 2.75 0 0 1-5.5 0' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:face-scan-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.801 2.57a.71.71 0 0 1-.555.838a8.78 8.78 0 0 0-6.838 6.838a.71.71 0 1 1-1.394-.283a10.2 10.2 0 0 1 7.949-7.949a.71.71 0 0 1 .838.556M2.57 13.199a.71.71 0 0 1 .838.555a8.78 8.78 0 0 0 6.838 6.838a.71.71 0 1 1-.283 1.394a10.2 10.2 0 0 1-7.948-7.949a.71.71 0 0 1 .555-.838M13.199 2.57a.71.71 0 0 1 .838-.556a10.2 10.2 0 0 1 7.949 7.949a.711.711 0 0 1-1.394.283a8.78 8.78 0 0 0-6.838-6.838a.71.71 0 0 1-.555-.838m8.231 10.629a.71.71 0 0 1 .556.838a10.2 10.2 0 0 1-7.949 7.949a.711.711 0 0 1-.283-1.394a8.78 8.78 0 0 0 6.838-6.838a.71.71 0 0 1 .838-.555' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M12 19.583a7.583 7.583 0 1 0 0-15.166a7.583 7.583 0 0 0 0 15.166' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.94 14.539a.71.71 0 0 1 .995-.148c.59.437 1.3.69 2.065.69a3.45 3.45 0 0 0 2.065-.69a.71.71 0 1 1 .847 1.142a4.87 4.87 0 0 1-2.912.97a4.87 4.87 0 0 1-2.911-.97a.71.71 0 0 1-.148-.994m5.547-2.895c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244m-4.976 0c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:face-scan-circle-outline,[i-solar\:face-scan-circle-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 10.5c0 .829-.448 1.5-1 1.5c-.553 0-1-.671-1-1.5c0-.828.447-1.5 1-1.5s1 .672 1 1.5m-6 0c0 .829-.448 1.5-1 1.5s-1-.671-1-1.5C8 9.672 8.448 9 9 9s1 .672 1 1.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M13.265 2.051a.75.75 0 0 1 .884-.586a10.76 10.76 0 0 1 8.386 8.386a.75.75 0 0 1-1.47.298a9.26 9.26 0 0 0-7.214-7.214a.75.75 0 0 1-.586-.884m-2.53 0a.75.75 0 0 1-.586.884a9.26 9.26 0 0 0-7.214 7.215a.75.75 0 0 1-1.47-.299A10.76 10.76 0 0 1 9.85 1.465a.75.75 0 0 1 .884.586M2.051 13.265a.75.75 0 0 1 .884.586a9.26 9.26 0 0 0 7.214 7.214a.75.75 0 1 1-.298 1.47a10.76 10.76 0 0 1-8.386-8.385a.75.75 0 0 1 .586-.885m19.898 0a.75.75 0 0 1 .586.885a10.76 10.76 0 0 1-8.386 8.385a.75.75 0 0 1-.298-1.47a9.26 9.26 0 0 0 7.214-7.214a.75.75 0 0 1 .884-.586M8.397 15.554a.75.75 0 0 1 1.05-.156c.728.54 1.607.852 2.553.852s1.825-.312 2.553-.852a.75.75 0 1 1 .893 1.205A5.77 5.77 0 0 1 12 17.75a5.77 5.77 0 0 1-3.447-1.147a.75.75 0 0 1-.156-1.05' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:filters-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18 8A6 6 0 1 1 6 8a6 6 0 0 1 12 0'/%3E%3Cpath fill='currentColor' d='M13.58 13.79a6 6 0 0 1-7.16-3.58a6 6 0 1 0 7.16 3.58' opacity='.7'/%3E%3Cpath fill='currentColor' d='M13.58 13.79c.271.684.42 1.43.42 2.21a6 6 0 0 1-2 4.472a6 6 0 1 0 5.58-10.262a6.01 6.01 0 0 1-4 3.58' opacity='.4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:forward-linear,[i-solar\:forward-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19.5 12l-5-5m5 5l-5 5m5-5h-10c-1.667 0-5 1-5 5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:ghost-bold-duotone,[i-solar\:ghost-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 19.206V12c0-5.523-4.477-10-10-10S2 6.477 2 12v7.206a1.727 1.727 0 0 0 2.5 1.544a2.89 2.89 0 0 1 2.896.18a2.89 2.89 0 0 0 3.208 0l.353-.234a1.88 1.88 0 0 1 2.086 0l.353.235a2.89 2.89 0 0 0 3.208 0a2.89 2.89 0 0 1 2.897-.18A1.727 1.727 0 0 0 22 19.206' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15 12c.552 0 1-.672 1-1.5S15.552 9 15 9s-1 .672-1 1.5s.448 1.5 1 1.5m-5-1.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5S8.448 9 9 9s1 .672 1 1.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:home-smile-outline,[i-solar\:home-smile-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M9.447 15.398a.75.75 0 1 0-.894 1.204A5.77 5.77 0 0 0 12 17.75a5.77 5.77 0 0 0 3.447-1.148a.75.75 0 1 0-.894-1.204A4.27 4.27 0 0 1 12 16.25a4.27 4.27 0 0 1-2.553-.852'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 1.25c-.708 0-1.351.203-2.05.542c-.674.328-1.454.812-2.427 1.416L5.456 4.491c-.92.572-1.659 1.03-2.227 1.465c-.589.45-1.041.91-1.368 1.507c-.326.595-.472 1.229-.543 1.978c-.068.725-.068 1.613-.068 2.726v1.613c0 1.904 0 3.407.153 4.582c.156 1.205.486 2.178 1.23 2.947c.747.773 1.697 1.119 2.875 1.282c1.14.159 2.598.159 4.434.159h4.116c1.836 0 3.294 0 4.434-.159c1.177-.163 2.128-.509 2.876-1.282c.743-.769 1.073-1.742 1.23-2.947c.152-1.175.152-2.678.152-4.582v-1.613c0-1.113 0-2-.068-2.726c-.07-.75-.217-1.383-.543-1.978c-.327-.597-.78-1.056-1.368-1.507c-.568-.436-1.306-.893-2.227-1.465l-2.067-1.283c-.973-.604-1.753-1.088-2.428-1.416c-.697-.34-1.34-.542-2.049-.542M8.28 4.504c1.015-.63 1.73-1.072 2.327-1.363c.581-.283.993-.391 1.393-.391s.812.108 1.393.391c.598.29 1.312.733 2.327 1.363l2 1.241c.961.597 1.636 1.016 2.14 1.402c.489.375.77.684.963 1.036c.193.353.306.766.365 1.398c.061.648.062 1.465.062 2.623v1.521c0 1.97-.002 3.376-.14 4.443c-.136 1.048-.393 1.656-.82 2.099c-.425.439-1.003.7-2.004.839c-1.026.142-2.379.144-4.286.144h-4c-1.908 0-3.26-.002-4.286-.144c-1.001-.14-1.579-.4-2.003-.84c-.428-.442-.685-1.05-.82-2.098c-.14-1.067-.141-2.472-.141-4.443v-1.521c0-1.158 0-1.975.062-2.623c.059-.632.172-1.045.365-1.398c.193-.352.474-.661.964-1.036c.503-.386 1.178-.805 2.139-1.402z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:info-circle-line-duotone,[i-solar\:info-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='M12 17v-6'/%3E%3Ccircle cx='1' cy='1' r='1' fill='currentColor' transform='matrix(1 0 0 -1 11 9)'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:info-circle-outline,[i-solar\:info-circle-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 17.75a.75.75 0 0 0 .75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75M12 7a1 1 0 1 1 0 2a1 1 0 0 1 0-2'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M1.25 12C1.25 6.063 6.063 1.25 12 1.25S22.75 6.063 22.75 12S17.937 22.75 12 22.75S1.25 17.937 1.25 12M12 2.75a9.25 9.25 0 1 0 0 18.5a9.25 9.25 0 0 0 0-18.5' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:layers-bold-duotone,[i-solar\:layers-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.979 9.685C2.993 8.891 2 8.494 2 8s.993-.89 2.979-1.685l2.808-1.123C9.773 4.397 10.767 4 12 4s2.227.397 4.213 1.192l2.808 1.123C21.007 7.109 22 7.506 22 8s-.993.89-2.979 1.685l-2.808 1.124C14.227 11.603 13.233 12 12 12s-2.227-.397-4.213-1.191z'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 8c0 .494.993.89 2.979 1.685l2.808 1.124C9.773 11.603 10.767 12 12 12s2.227-.397 4.213-1.191l2.808-1.124C21.007 8.891 22 8.494 22 8s-.993-.89-2.979-1.685l-2.808-1.123C14.227 4.397 13.233 4 12 4s-2.227.397-4.213 1.192L4.98 6.315C2.993 7.109 2 7.506 2 8' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m5.766 10l-.787.315C2.993 11.109 2 11.507 2 12s.993.89 2.979 1.685l2.808 1.124C9.773 15.603 10.767 16 12 16s2.227-.397 4.213-1.191l2.808-1.124C21.007 12.891 22 12.493 22 12s-.993-.89-2.979-1.685L18.234 10l-2.021.809C14.227 11.603 13.233 12 12 12s-2.227-.397-4.213-1.191z' opacity='.7'/%3E%3Cpath fill='currentColor' d='m5.766 14l-.787.315C2.993 15.109 2 15.507 2 16s.993.89 2.979 1.685l2.808 1.124C9.773 19.603 10.767 20 12 20s2.227-.397 4.213-1.192l2.808-1.123C21.007 16.891 22 16.494 22 16c0-.493-.993-.89-2.979-1.685L18.234 14l-2.021.809C14.227 15.603 13.233 16 12 16s-2.227-.397-4.213-1.191z' opacity='.4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:leaf-bold-duotone,[i-solar\:leaf-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 22c-4.418 0-8-3.646-8-8.143c0-4.462 2.553-9.67 6.537-11.531A3.45 3.45 0 0 1 12 2z' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M13.463 2.326A3.45 3.45 0 0 0 12 2v7l4.432-4.432c-.863-.947-1.86-1.724-2.97-2.242' opacity='.3'/%3E%3Cpath fill='currentColor' d='M12 9v5.5l6.614-6.614c-.572-1.22-1.308-2.357-2.182-3.318z' opacity='.4'/%3E%3Cpath fill='currentColor' d='m12 19.5l7.811-7.811a15 15 0 0 0-1.197-3.803L12 14.5z' opacity='.6'/%3E%3Cpath fill='currentColor' d='M19.811 11.689L12 19.5V22c4.418 0 8-3.646 8-8.143c0-.71-.064-1.438-.189-2.168' opacity='.7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magic-stick-2-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.714 2.127c-.836-.43-1.922.263-4.095 1.65l-.562.36c-.618.394-.927.591-1.273.648c-.347.056-.692-.034-1.382-.215l-.628-.164C6.345 3.769 5.13 3.45 4.436 4.13s-.412 1.908.157 4.363l.147.635c.161.697.242 1.046.177 1.393c-.066.346-.27.65-.68 1.26l-.372.555c-1.439 2.145-2.158 3.217-1.753 4.067c.406.85 1.668.915 4.192 1.045l.654.033c.717.037 1.076.056 1.382.213c.306.158.524.436.962.994l.398.507c1.539 1.962 2.309 2.943 3.255 2.788c.945-.154 1.441-1.342 2.433-3.717l.257-.614c.282-.675.422-1.012.677-1.261c.255-.25.595-.382 1.274-.647l.618-.24c2.39-.933 3.586-1.4 3.765-2.345s-.777-1.744-2.688-3.342l-.495-.413c-.543-.454-.815-.68-.963-.992s-.158-.672-.175-1.393l-.016-.657c-.062-2.538-.093-3.806-.928-4.236'/%3E%3Cpath fill='currentColor' d='M15.93 16.991c.127-.268.239-.45.392-.6c.172-.167.382-.282.71-.42l4.498 4.499a.75.75 0 0 1-1.06 1.06z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magic-stick-3-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51c.012-.014.555.503.568.49l4-4c.013-.013-.504-.556-.49-.568L7.922 3.845a2.883 2.883 0 0 0-4.077 0m1.288 11.462a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19.967 9.13a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273z' opacity='.2'/%3E%3Cpath fill='currentColor' d='M16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274z' opacity='.7'/%3E%3Cpath fill='currentColor' d='M10.568 6.49c-.012.014-.555-.503-.568-.49l-4 4c-.013.013.504.556.49.568l9.588 9.587a2.883 2.883 0 1 0 4.078-4.077z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magnifer-line-duotone,[i-solar\:magnifer-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cdefs%3E%3Cmask id='solarMagniferLineDuotone0'%3E%3Cg fill='none' stroke-width='1.5'%3E%3Ccircle cx='11.5' cy='11.5' r='9.5' stroke='gray'/%3E%3Cpath stroke='%23fff' stroke-linecap='round' d='M18.5 18.5L22 22'/%3E%3C/g%3E%3C/mask%3E%3C/defs%3E%3Cpath fill='currentColor' d='M0 0h24v24H0z' mask='url(%23solarMagniferLineDuotone0)'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:microphone-3-bold-duotone,[i-solar\:microphone-3-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M4 9a.75.75 0 0 1 .75.75v1a7.25 7.25 0 1 0 14.5 0v-1a.75.75 0 0 1 1.5 0v1a8.75 8.75 0 0 1-8 8.718v2.282a.75.75 0 0 1-1.5 0v-2.282a8.75 8.75 0 0 1-8-8.718v-1A.75.75 0 0 1 4 9' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 2a5.75 5.75 0 0 0-5.75 5.75v3a5.75 5.75 0 0 0 11.5 0v-3A5.75 5.75 0 0 0 12 2m2 9.5a.75.75 0 0 0 0-1.5h-4a.75.75 0 0 0 0 1.5zm-.25-3.75a.75.75 0 0 1-.75.75h-2A.75.75 0 0 1 11 7h2a.75.75 0 0 1 .75.75' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M14 11.5a.75.75 0 0 0 0-1.5h-4a.75.75 0 0 0 0 1.5zm-1-3A.75.75 0 0 0 13 7h-2a.75.75 0 0 0 0 1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:minus-circle-line-duotone,[i-solar\:minus-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12H9'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:moon-outline,[i-solar\:moon-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.017 2.802a9.25 9.25 0 1 0 10.181 10.181A7.25 7.25 0 1 1 11.017 2.802M1.25 12C1.25 6.063 6.063 1.25 12 1.25c.717 0 1.075.571 1.137 1.026c.059.438-.103.995-.606 1.299a5.75 5.75 0 1 0 7.894 7.894c.304-.503.861-.665 1.299-.606c.455.062 1.026.42 1.026 1.137c0 5.937-4.813 10.75-10.75 10.75S1.25 17.937 1.25 12' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:notes-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='m20.312 12.647l.517-1.932c.604-2.255.907-3.382.68-4.358a4 4 0 0 0-1.162-2.011c-.731-.685-1.859-.987-4.114-1.591c-2.255-.605-3.383-.907-4.358-.68a4 4 0 0 0-2.011 1.162c-.587.626-.893 1.543-1.348 3.209l-.244.905l-.517 1.932c-.605 2.255-.907 3.382-.68 4.358a4 4 0 0 0 1.162 2.011c.731.685 1.859.987 4.114 1.592c2.032.544 3.149.843 4.064.73q.15-.019.294-.052a4 4 0 0 0 2.011-1.16c.685-.732.987-1.86 1.592-4.115Z'/%3E%3Cpath d='M16.415 17.974a4 4 0 0 1-1.068 1.678c-.731.685-1.859.987-4.114 1.591s-3.383.907-4.358.679a4 4 0 0 1-2.011-1.161c-.685-.731-.988-1.859-1.592-4.114l-.517-1.932c-.605-2.255-.907-3.383-.68-4.358a4 4 0 0 1 1.162-2.011c.731-.685 1.859-.987 4.114-1.592q.638-.172 1.165-.309'/%3E%3Cpath stroke-linecap='round' d='m11.777 10l4.83 1.294M11 12.898l2.898.776'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:pallete-2-bold-duotone,[i-solar\:pallete-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10.847 21.934C5.867 21.362 2 17.133 2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.157-3.283 4.733-6.086 4.37c-1.618-.209-3.075-.397-3.652.518c-.395.626.032 1.406.555 1.929a1.673 1.673 0 0 1 0 2.366c-.523.523-1.235.836-1.97.751' opacity='.5'/%3E%3Cpath fill='currentColor' d='M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0M6.5 13a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m11 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m-3-4.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:pause-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.076 8.617C8 8.801 8 9.034 8 9.5v5c0 .466 0 .699.076.883a1 1 0 0 0 .541.54c.184.077.417.077.883.077s.699 0 .883-.076a1 1 0 0 0 .54-.541c.077-.184.077-.417.077-.883v-5c0-.466 0-.699-.076-.883a1 1 0 0 0-.541-.54C10.199 8 9.966 8 9.5 8s-.699 0-.883.076a1 1 0 0 0-.54.541m4.999 0C13 8.801 13 9.034 13 9.5v5c0 .466 0 .699.076.883a1 1 0 0 0 .541.54c.184.077.417.077.883.077s.699 0 .883-.076a1 1 0 0 0 .54-.541c.077-.184.077-.417.077-.883v-5c0-.466 0-.699-.076-.883a1 1 0 0 0-.541-.54C15.199 8 14.966 8 14.5 8s-.699 0-.883.076a1 1 0 0 0-.54.541'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:people-nearby-bold-duotone,[i-solar\:people-nearby-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19.717 20.362C21.143 19.585 22 18.587 22 17.5c0-1.152-.963-2.204-2.546-3C17.623 13.58 14.962 13 12 13s-5.623.58-7.454 1.5C2.963 15.296 2 16.348 2 17.5s.963 2.204 2.546 3C6.377 21.42 9.038 22 12 22c3.107 0 5.882-.637 7.717-1.638' opacity='.6'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M9.25 4a2.75 2.75 0 1 1 5.5 0a2.75 2.75 0 0 1-5.5 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m8.223 11.574l-2.175-.725a1.532 1.532 0 0 1 .805-2.952l1.898.407l.21.044a15 15 0 0 0 6.288-.044l1.897-.407a1.532 1.532 0 0 1 .806 2.952l-2.175.725c-.263.088-.394.132-.493.193a1 1 0 0 0-.466.986c.016.115.066.244.165.503l1.247 3.242a1.473 1.473 0 0 1-2.654 1.26L12 15l-1.576 2.757a1.473 1.473 0 0 1-2.654-1.26l1.247-3.241c.1-.259.149-.388.165-.503a1 1 0 0 0-.466-.986c-.099-.061-.23-.105-.493-.193'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:play-circle-bold-duotone,[i-solar\:play-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='m15.414 13.059l-4.72 2.787C9.934 16.294 9 15.71 9 14.786V9.214c0-.924.934-1.507 1.694-1.059l4.72 2.787c.781.462.781 1.656 0 2.118'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:play-circle-broken{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M13.888 9.935C14.963 10.812 15.5 11.25 15.5 12s-.537 1.188-1.612 2.065c-.297.242-.591.47-.862.66c-.237.167-.506.339-.784.508c-1.073.652-1.609.978-2.09.617c-.48-.36-.524-1.116-.612-2.628c-.024-.427-.04-.846-.04-1.222s.016-.795.04-1.222c.088-1.512.132-2.267.612-2.628c.481-.361 1.018-.035 2.09.617c.278.169.547.341.784.508c.27.19.565.418.862.66Z'/%3E%3Cpath stroke-linecap='round' d='M7 3.338A9.95 9.95 0 0 1 12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12c0-1.821.487-3.53 1.338-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:refresh-bold-duotone,[i-solar\:refresh-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12.079 2.25c-4.794 0-8.734 3.663-9.118 8.333H2a.75.75 0 0 0-.528 1.283l1.68 1.666a.75.75 0 0 0 1.056 0l1.68-1.666a.75.75 0 0 0-.528-1.283h-.893c.38-3.831 3.638-6.833 7.612-6.833a7.66 7.66 0 0 1 6.537 3.643a.75.75 0 1 0 1.277-.786A9.16 9.16 0 0 0 12.08 2.25'/%3E%3Cpath fill='currentColor' d='M20.841 10.467a.75.75 0 0 0-1.054 0L18.1 12.133a.75.75 0 0 0 .527 1.284h.899c-.381 3.83-3.651 6.833-7.644 6.833a7.7 7.7 0 0 1-6.565-3.644a.75.75 0 1 0-1.276.788a9.2 9.2 0 0 0 7.84 4.356c4.809 0 8.766-3.66 9.151-8.333H22a.75.75 0 0 0 .527-1.284z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:round-double-alt-arrow-right-bold-duotone,[i-solar\:round-double-alt-arrow-right-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12' opacity='.5'/%3E%3Cpath fill='currentColor' d='M9.03 15.53a.75.75 0 0 1-1.06-1.06L10.44 12L7.97 9.53a.75.75 0 0 1 1.06-1.06l3 3a.75.75 0 0 1 0 1.06z'/%3E%3Cpath fill='currentColor' d='M13.03 15.53a.75.75 0 1 1-1.06-1.06L14.44 12l-2.47-2.47a.75.75 0 0 1 1.06-1.06l3 3a.75.75 0 0 1 0 1.06z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:running-2-line-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='18.5' cy='4.5' r='2.5' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='m9 17l-1 1.2c-.738.886-1.107 1.328-1.61 1.564S5.31 20 4.157 20H3'/%3E%3Cpath fill='currentColor' d='M13.65 22a.75.75 0 0 0 1.5 0zm-1.085-5.754l.453-.598zm1.184 1.015l.587-.466zm.557 1.12l.727-.186zm-.802-6.826a.75.75 0 0 0-1.009-1.11zm-2.652 1.61l.703.26zm.07 1.555l-.677.323zm2.728 5.219v2.06h1.5v-2.06zm-1.538-3.095c.663.502.887.679 1.05.884l1.174-.934c-.308-.387-.717-.69-1.319-1.146zm3.038 3.095c0-.755.006-1.264-.117-1.744l-1.453.373c.065.254.07.538.07 1.37zm-1.988-2.211c.197.247.339.534.417.84l1.454-.373a3.75 3.75 0 0 0-.697-1.4zm-.667-7.283c-.42.381-.945.836-1.354 1.224c-.21.198-.41.398-.573.586c-.149.172-.327.4-.42.649l1.407.521c-.007.021.014-.035.146-.187c.116-.134.276-.295.471-.48c.4-.38.865-.778 1.332-1.203zm.523 5.203c-.488-.37-.818-.62-1.056-.832c-.233-.208-.32-.33-.363-.418l-1.354.645c.167.35.423.63.72.894c.292.26.679.552 1.147.907zm-2.87-2.744a2.75 2.75 0 0 0 .097 2.139l1.354-.645a1.25 1.25 0 0 1-.044-.973z' opacity='.5'/%3E%3Cpath fill='currentColor' d='m5.436 8.82l-.37-.652zm-1.807.164a.75.75 0 1 0 .742 1.304zm9.778-1.627l-.286.693zm-2.96-.715l-.055-.748zM21 12.75a.75.75 0 1 0 0-1.5zm-5.232-3.213l-.67.335zM5.065 8.168l-1.436.816l.742 1.304l1.435-.816zm8.627-1.505c-1.344-.553-2.08-.857-3.3-.769l.11 1.496c.823-.06 1.255.099 2.62.66zm-7.886 2.81c2.502-1.422 3.552-2 4.695-2.083l-.109-1.496c-1.56.114-2.949.923-5.327 2.274zm13.949 3.276H21v-1.5h-1.245zm-4.658-2.878a5.21 5.21 0 0 0 4.658 2.878v-1.5A3.71 3.71 0 0 1 16.439 9.2zm1.342-.67a5.33 5.33 0 0 0-2.747-2.538l-.57 1.387c.86.354 1.564 1 1.975 1.821z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:scale-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12' opacity='.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M16.656 2.75a.75.75 0 0 1 0-1.5H22a.75.75 0 0 1 .75.75v5.344a.75.75 0 0 1-1.5 0V3.81l-7.44 7.439H16a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1-.75-.75V8a.75.75 0 0 1 1.5 0v2.19l7.44-7.44z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-bold-duotone,[i-solar\:settings-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M14.279 2.152C13.909 2 13.439 2 12.5 2s-1.408 0-1.779.152a2 2 0 0 0-1.09 1.083c-.094.223-.13.484-.145.863a1.62 1.62 0 0 1-.796 1.353a1.64 1.64 0 0 1-1.579.008c-.338-.178-.583-.276-.825-.308a2.03 2.03 0 0 0-1.49.396c-.318.242-.553.646-1.022 1.453c-.47.807-.704 1.21-.757 1.605c-.07.526.074 1.058.4 1.479c.148.192.357.353.68.555c.477.297.783.803.783 1.361s-.306 1.064-.782 1.36c-.324.203-.533.364-.682.556a2 2 0 0 0-.399 1.479c.053.394.287.798.757 1.605s.704 1.21 1.022 1.453c.424.323.96.465 1.49.396c.242-.032.487-.13.825-.308a1.64 1.64 0 0 1 1.58.008c.486.28.774.795.795 1.353c.015.38.051.64.145.863c.204.49.596.88 1.09 1.083c.37.152.84.152 1.779.152s1.409 0 1.779-.152a2 2 0 0 0 1.09-1.083c.094-.223.13-.483.145-.863c.02-.558.309-1.074.796-1.353a1.64 1.64 0 0 1 1.579-.008c.338.178.583.276.825.308c.53.07 1.066-.073 1.49-.396c.318-.242.553-.646 1.022-1.453c.47-.807.704-1.21.757-1.605a2 2 0 0 0-.4-1.479c-.148-.192-.357-.353-.68-.555c-.477-.297-.783-.803-.783-1.361s.306-1.064.782-1.36c.324-.203.533-.364.682-.556a2 2 0 0 0 .399-1.479c-.053-.394-.287-.798-.757-1.605s-.704-1.21-1.022-1.453a2.03 2.03 0 0 0-1.49-.396c-.242.032-.487.13-.825.308a1.64 1.64 0 0 1-1.58-.008a1.62 1.62 0 0 1-.795-1.353c-.015-.38-.051-.64-.145-.863a2 2 0 0 0-1.09-1.083' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15.523 12c0 1.657-1.354 3-3.023 3s-3.023-1.343-3.023-3S10.83 9 12.5 9s3.023 1.343 3.023 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-minimalistic-bold-duotone,[i-solar\:settings-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.428 2c-1.114 0-2.129.6-4.157 1.802l-.686.406C5.555 5.41 4.542 6.011 3.985 7c-.557.99-.557 2.19-.557 4.594v.812c0 2.403 0 3.605.557 4.594s1.57 1.59 3.6 2.791l.686.407C10.299 21.399 11.314 22 12.428 22s2.128-.6 4.157-1.802l.686-.407c2.028-1.2 3.043-1.802 3.6-2.791c.557-.99.557-2.19.557-4.594v-.812c0-2.403 0-3.605-.557-4.594s-1.572-1.59-3.6-2.792l-.686-.406C14.555 2.601 13.542 2 12.428 2' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.428 8.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-outline,[i-solar\:settings-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor' fill-rule='evenodd' clip-rule='evenodd'%3E%3Cpath d='M12 8.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5M9.75 12a2.25 2.25 0 1 1 4.5 0a2.25 2.25 0 0 1-4.5 0'/%3E%3Cpath d='M11.975 1.25c-.445 0-.816 0-1.12.02a2.8 2.8 0 0 0-.907.19a2.75 2.75 0 0 0-1.489 1.488c-.145.35-.184.72-.2 1.122a.87.87 0 0 1-.415.731a.87.87 0 0 1-.841-.005c-.356-.188-.696-.339-1.072-.389a2.75 2.75 0 0 0-2.033.545a2.8 2.8 0 0 0-.617.691c-.17.254-.356.575-.578.96l-.025.044c-.223.385-.408.706-.542.98c-.14.286-.25.568-.29.88a2.75 2.75 0 0 0 .544 2.033c.231.301.532.52.872.734a.87.87 0 0 1 .426.726a.87.87 0 0 1-.426.726c-.34.214-.64.433-.872.734a2.75 2.75 0 0 0-.545 2.033c.041.312.15.594.29.88c.135.274.32.595.543.98l.025.044c.222.385.408.706.578.96c.177.263.367.5.617.69a2.75 2.75 0 0 0 2.033.546c.376-.05.716-.2 1.072-.389a.87.87 0 0 1 .84-.005a.86.86 0 0 1 .417.731c.015.402.054.772.2 1.122a2.75 2.75 0 0 0 1.488 1.489c.29.12.59.167.907.188c.304.021.675.021 1.12.021h.05c.445 0 .816 0 1.12-.02c.318-.022.617-.069.907-.19a2.75 2.75 0 0 0 1.489-1.488c.145-.35.184-.72.2-1.122a.87.87 0 0 1 .415-.732a.87.87 0 0 1 .841.006c.356.188.696.339 1.072.388a2.75 2.75 0 0 0 2.033-.544c.25-.192.44-.428.617-.691c.17-.254.356-.575.578-.96l.025-.044c.223-.385.408-.706.542-.98c.14-.286.25-.569.29-.88a2.75 2.75 0 0 0-.544-2.033c-.231-.301-.532-.52-.872-.734a.87.87 0 0 1-.426-.726c0-.278.152-.554.426-.726c.34-.214.64-.433.872-.734a2.75 2.75 0 0 0 .545-2.033a2.8 2.8 0 0 0-.29-.88a18 18 0 0 0-.543-.98l-.025-.044a18 18 0 0 0-.578-.96a2.8 2.8 0 0 0-.617-.69a2.75 2.75 0 0 0-2.033-.546c-.376.05-.716.2-1.072.389a.87.87 0 0 1-.84.005a.87.87 0 0 1-.417-.731c-.015-.402-.054-.772-.2-1.122a2.75 2.75 0 0 0-1.488-1.489c-.29-.12-.59-.167-.907-.188c-.304-.021-.675-.021-1.12-.021zm-1.453 1.595c.077-.032.194-.061.435-.078c.247-.017.567-.017 1.043-.017s.796 0 1.043.017c.241.017.358.046.435.078c.307.127.55.37.677.677c.04.096.073.247.086.604c.03.792.439 1.555 1.165 1.974s1.591.392 2.292.022c.316-.167.463-.214.567-.227a1.25 1.25 0 0 1 .924.247c.066.051.15.138.285.338c.139.206.299.483.537.895s.397.69.506.912c.107.217.14.333.15.416a1.25 1.25 0 0 1-.247.924c-.064.083-.178.187-.48.377c-.672.422-1.128 1.158-1.128 1.996s.456 1.574 1.128 1.996c.302.19.416.294.48.377c.202.263.29.595.247.924c-.01.083-.044.2-.15.416c-.109.223-.268.5-.506.912s-.399.689-.537.895c-.135.2-.219.287-.285.338a1.25 1.25 0 0 1-.924.247c-.104-.013-.25-.06-.567-.227c-.7-.37-1.566-.398-2.292.021s-1.135 1.183-1.165 1.975c-.013.357-.046.508-.086.604a1.25 1.25 0 0 1-.677.677c-.077.032-.194.061-.435.078c-.247.017-.567.017-1.043.017s-.796 0-1.043-.017c-.241-.017-.358-.046-.435-.078a1.25 1.25 0 0 1-.677-.677c-.04-.096-.073-.247-.086-.604c-.03-.792-.439-1.555-1.165-1.974s-1.591-.392-2.292-.022c-.316.167-.463.214-.567.227a1.25 1.25 0 0 1-.924-.247c-.066-.051-.15-.138-.285-.338a17 17 0 0 1-.537-.895c-.238-.412-.397-.69-.506-.912c-.107-.217-.14-.333-.15-.416a1.25 1.25 0 0 1 .247-.924c.064-.083.178-.187.48-.377c.672-.422 1.128-1.158 1.128-1.996s-.456-1.574-1.128-1.996c-.302-.19-.416-.294-.48-.377a1.25 1.25 0 0 1-.247-.924c.01-.083.044-.2.15-.416c.109-.223.268-.5.506-.912s.399-.689.537-.895c.135-.2.219-.287.285-.338a1.25 1.25 0 0 1 .924-.247c.104.013.25.06.567.227c.7.37 1.566.398 2.292-.022c.726-.419 1.135-1.182 1.165-1.974c.013-.357.046-.508.086-.604c.127-.307.37-.55.677-.677'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:stop-circle-bold-duotone,[i-solar\:stop-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.586 8.586C8 9.172 8 10.114 8 12s0 2.828.586 3.414S10.114 16 12 16s2.828 0 3.414-.586S16 13.886 16 12s0-2.828-.586-3.414S13.886 8 12 8s-2.828 0-3.414.586'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:sun-2-outline,[i-solar\:sun-2-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 1.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75M3.669 3.716a.75.75 0 0 1 1.06-.047L6.95 5.7a.75.75 0 1 1-1.012 1.107L3.716 4.776a.75.75 0 0 1-.047-1.06m16.662 0a.75.75 0 0 1-.047 1.06l-2.222 2.031A.75.75 0 0 1 17.05 5.7l2.222-2.031a.75.75 0 0 1 1.06.047M12 7.75a4.25 4.25 0 1 0 0 8.5a4.25 4.25 0 0 0 0-8.5M6.25 12a5.75 5.75 0 1 1 11.5 0a5.75 5.75 0 0 1-11.5 0m-5 0a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5H2a.75.75 0 0 1-.75-.75m18 0a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1-.75-.75m-2.224 5.025a.75.75 0 0 1 1.06 0l2.222 2.223a.75.75 0 0 1-1.06 1.06l-2.222-2.222a.75.75 0 0 1 0-1.06m-10.051 0a.75.75 0 0 1 0 1.061l-2.223 2.222a.75.75 0 0 1-1.06-1.06l2.222-2.223a.75.75 0 0 1 1.06 0M12 19.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:trash-bin-trash-linear,[i-solar\:trash-bin-trash-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' d='M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.196.81-4.856.81h-.774c-2.66 0-3.991 0-4.856-.81c-.865-.809-.954-2.136-1.13-4.79l-.46-6.9M9.5 11l.5 5m4.5-5l-.5 5'/%3E%3Cpath d='M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:tuning-outline,[i-solar\:tuning-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.959 9.75a.75.75 0 0 1-.75-.75V2a.75.75 0 0 1 1.5 0v7a.75.75 0 0 1-.75.75'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7 5.75a3.75 3.75 0 1 1 0 7.5a3.75 3.75 0 0 1 0-7.5M9.25 9.5a2.25 2.25 0 1 0-4.5 0a2.25 2.25 0 0 0 4.5 0M17 18.25a3.75 3.75 0 1 0 0-7.5a3.75 3.75 0 0 0 0 7.5m2.25-3.75a2.25 2.25 0 1 1-4.5 0a2.25 2.25 0 0 1 4.5 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M6.209 15a.75.75 0 0 1 1.5 0v7a.75.75 0 0 1-1.5 0zm10.75 7.75a.75.75 0 0 1-.75-.75v-2a.75.75 0 0 1 1.5 0v2a.75.75 0 0 1-.75.75M6.209 2a.75.75 0 0 1 1.5 0v2a.75.75 0 0 1-1.5 0z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:tuning-square-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z'/%3E%3Ccircle cx='8' cy='10' r='2'/%3E%3Ccircle cx='2' cy='2' r='2' transform='matrix(1 0 0 -1 14 16)'/%3E%3Cpath stroke-linecap='round' d='M8 14v5m8-9V5M8 5v1m8 13v-1'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:undo-left-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7.53 3.47a.75.75 0 0 1 0 1.06L5.06 7l2.47 2.47a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m5.06 7l.75-.75h9.226c.904 0 1.633 0 2.222.053c.606.055 1.136.172 1.617.45a3.75 3.75 0 0 1 1.372 1.372c.278.481.395 1.011.45 1.617c.053.589.053 1.318.053 2.222v.072c0 .904 0 1.633-.053 2.222c-.055.606-.172 1.136-.45 1.617a3.75 3.75 0 0 1-1.372 1.373c-.481.277-1.011.394-1.617.449c-.589.053-1.318.053-2.222.053H8a.75.75 0 0 1 0-1.5h7c.948 0 1.61 0 2.122-.047c.502-.046.788-.13 1.003-.254a2.25 2.25 0 0 0 .823-.824c.125-.215.21-.5.255-1.003c.046-.512.047-1.174.047-2.122s0-1.61-.047-2.122c-.046-.503-.13-.788-.255-1.003a2.25 2.25 0 0 0-.823-.824c-.215-.124-.5-.208-1.003-.254c-.512-.046-1.174-.047-2.122-.047H5.81z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:upload-minimalistic-bold,[i-solar\:upload-minimalistic-bold=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12.554 2.494a.75.75 0 0 0-1.107 0l-4 4.375A.75.75 0 0 0 8.553 7.88l2.696-2.95V16a.75.75 0 0 0 1.5 0V4.932l2.697 2.95a.75.75 0 1 0 1.107-1.013z'/%3E%3Cpath fill='currentColor' d='M3.75 15a.75.75 0 0 0-1.5 0v.055c0 1.367 0 2.47.117 3.337c.12.9.38 1.658.981 2.26c.602.602 1.36.86 2.26.982c.867.116 1.97.116 3.337.116h6.11c1.367 0 2.47 0 3.337-.116c.9-.122 1.658-.38 2.26-.982s.86-1.36.982-2.26c.116-.867.116-1.97.116-3.337V15a.75.75 0 0 0-1.5 0c0 1.435-.002 2.436-.103 3.192c-.099.734-.28 1.122-.556 1.399c-.277.277-.665.457-1.4.556c-.755.101-1.756.103-3.191.103H9c-1.435 0-2.437-.002-3.192-.103c-.734-.099-1.122-.28-1.399-.556c-.277-.277-.457-.665-.556-1.4c-.101-.755-.103-1.756-.103-3.191'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:upload-square-line-duotone,[i-solar\:upload-square-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 17v-7m0 0l3 3m-3-3l-3 3'/%3E%3Cpath stroke-linecap='round' d='M16 7H8'/%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:user-rounded-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='6' r='4'/%3E%3Cellipse cx='12' cy='17' rx='7' ry='4'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:user-speak-rounded-bold-duotone,[i-solar\:user-speak-rounded-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='10' cy='6.75' r='4' fill='currentColor'/%3E%3Cellipse cx='10' cy='17.75' fill='currentColor' opacity='.5' rx='7' ry='4'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M18.357 2.364a.75.75 0 0 1 1.029-.257L19 2.75l.386-.643h.001l.002.002l.004.002l.01.006l.113.076c.07.049.166.12.277.212c.222.185.512.462.802.838c.582.758 1.155 1.914 1.155 3.507s-.573 2.75-1.155 3.507c-.29.376-.58.653-.802.838a4 4 0 0 1-.363.27l-.028.018l-.01.006l-.003.002l-.002.001s-.001.001-.387-.642l.386.643a.75.75 0 0 1-.776-1.283l.005-.004l.041-.027q.06-.042.177-.136c.152-.128.362-.326.573-.6c.417-.542.844-1.386.844-2.593s-.427-2.05-.844-2.593a3.8 3.8 0 0 0-.573-.6a3 3 0 0 0-.218-.163l-.005-.003a.75.75 0 0 1-.253-1.027' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M16.33 4.415a.75.75 0 0 1 1.006-.336L17 4.75l.336-.67h.001l.002.001l.004.002l.008.004l.022.012a2 2 0 0 1 .233.153c.136.102.31.254.48.467c.349.436.664 1.099.664 2.031s-.316 1.595-.664 2.031a2.7 2.7 0 0 1-.654.586l-.06.034l-.02.012l-.01.004l-.003.002l-.002.001l-.33-.657l.329.658a.75.75 0 0 1-.685-1.335l.003-.001l.052-.036c.052-.04.13-.106.209-.205c.15-.189.335-.526.335-1.094s-.184-.905-.335-1.094a1.2 1.2 0 0 0-.261-.24l-.003-.002a.75.75 0 0 1-.322-1' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners\:3-dots-fade{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='4' cy='12' r='3' fill='currentColor'%3E%3Canimate id='svgSpinners3DotsFade0' fill='freeze' attributeName='opacity' begin='0;svgSpinners3DotsFade1.end-0.25s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3' fill='currentColor' opacity='.4'%3E%3Canimate fill='freeze' attributeName='opacity' begin='svgSpinners3DotsFade0.begin+0.15s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3' fill='currentColor' opacity='.3'%3E%3Canimate id='svgSpinners3DotsFade1' fill='freeze' attributeName='opacity' begin='svgSpinners3DotsFade0.begin+0.3s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners\:ring-resize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg stroke='currentColor'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-linecap='round' stroke-width='3'%3E%3Canimate attributeName='stroke-dasharray' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0 150;42 150;42 150;42 150'/%3E%3Canimate attributeName='stroke-dashoffset' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0;-16;-59;-59'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' dur='2s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-vscode-icons\:file-type-minecraft{background:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='%2352a535' d='M30 2H2v28h28z'/%3E%3Cpath fill='%2386d562' d='M24.4 13.2h-5.6v.47h5.6zm-5.6 8.4h-5.6v.47h5.6zm2.8 2.8h-2.8v.47h2.8zm-8.4 0h-2.8v.47h2.8zm0-11.2H7.6v.47h5.6z'/%3E%3Cpath d='M24.4 13.2V7.6h-5.6v5.6h-5.6V16h-2.8v8.4h2.8v-2.8h5.6v2.8h2.8V16h-2.8v-2.8zM13.2 7.6H7.6v5.6h5.6z'/%3E%3Cpath fill='%232a641c' d='M24.4 7.6h-5.6v.47h5.6zm-5.6 5.6h-5.6v.47h5.6zm-5.6-5.6H7.6v.47h5.6zm0 8.4h-2.8v.47h2.8zm8.4 0h-2.8v.47h2.8z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat;width:1.2em;height:1.2em}.prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-headings);font-weight:600;line-height:1.25}.prose :where(a):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links);font-weight:500;text-decoration:underline}.prose :where(a code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links)}.prose :where(p,ul,ol,pre):not(:where(.not-prose,.not-prose *)){margin:1em 0;line-height:1.75}.prose :where(blockquote):not(:where(.not-prose,.not-prose *)){border-left:.25em solid var(--un-prose-borders);margin:1em 0;padding-left:1em;font-style:italic}.prose :where(h1):not(:where(.not-prose,.not-prose *)){margin:1rem 0;font-size:2.25em}.prose :where(h2):not(:where(.not-prose,.not-prose *)){margin:1.75em 0 .5em;font-size:1.75em}.prose :where(h3):not(:where(.not-prose,.not-prose *)){margin:1.5em 0 .5em;font-size:1.375em}.prose :where(h4):not(:where(.not-prose,.not-prose *)){margin:1em 0;font-size:1.125em}.prose :where(img,video):not(:where(.not-prose,.not-prose *)){max-width:100%}.prose :where(figure,picture):not(:where(.not-prose,.not-prose *)){margin:1em 0}.prose :where(figcaption):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-captions);font-size:.875em}.prose :where(code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;font-weight:600}.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):before,.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):after{content:"`"}.prose :where(pre):not(:where(.not-prose,.not-prose *)){border-radius:.375rem;padding:1.25rem 1.5rem;overflow-x:auto}.prose :where(pre,code):not(:where(.not-prose,.not-prose *)){white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:4;-webkit-hyphens:none;hyphens:none;background:0 0}.prose :where(pre code):not(:where(.not-prose,.not-prose *)){font-weight:inherit}.prose :where(ol,ul):not(:where(.not-prose,.not-prose *)){padding-left:1.25em}.prose :where(ol):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ol[type=A]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ul):not(:where(.not-prose,.not-prose *)){list-style-type:disc}.prose :where(ol>li):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(ul>li):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(summary):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(hr):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-hr);margin:2em 0}.prose :where(table):not(:where(.not-prose,.not-prose *)){border-collapse:collapse;margin:1em 0;display:block;overflow-x:auto}.prose :where(tr):not(:where(.not-prose,.not-prose *)):nth-child(2n){background:var(--un-prose-bg-soft)}.prose :where(td,th):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-borders);padding:.625em 1em}.prose :where(abbr):not(:where(.not-prose,.not-prose *)){cursor:help}.prose :where(kbd):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);border:1px solid;border-radius:.25rem;padding:.25rem .5rem;font-size:.875em}.prose :where(details):not(:where(.not-prose,.not-prose *)){background:var(--un-prose-bg-soft);margin:1em 0;padding:1.25rem 1.5rem}.prose :where(summary):not(:where(.not-prose,.not-prose *)){cursor:pointer;font-weight:600}.prose{color:var(--un-prose-body);max-width:65ch}.container,[container=""]{width:100%}.scrollbar-none,[scrollbar-none=""]{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}[scrollbar-none=""]::-webkit-scrollbar{display:none}@media (min-width:640px){.container,[container=""]{max-width:640px}}@media (min-width:768px){.container,[container=""]{max-width:768px}}@media (min-width:1024px){.container,[container=""]{max-width:1024px}}@media (min-width:1280px){.container,[container=""]{max-width:1280px}}@media (min-width:1536px){.container,[container=""]{max-width:1536px}}.\[input\:checked\~\&\]{input:checked~&}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.data-\[disabled\]\:pointer-events-none[data-disabled],.pointer-events-none,[pointer-events-none=""]{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.absolute,[absolute=""]{position:absolute}.fixed,[fixed=""]{position:fixed}.relative,[relative=""]{position:relative}.sticky,[sticky=""]{position:sticky}.before-position-absolute:before,[before~=absolute]:before,.after\:absolute:after,[after~=absolute]:after{position:absolute}.inset-0,[inset-0=""],[before~=inset-0]:before,[after~=inset-0]:after{inset:0}.inset-x-0,[inset-x-0=""]{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0,[bottom-0=""]{bottom:0}.bottom-2{bottom:.5rem}.left-0,[left-0=""]{left:0}.left-1\/2{left:50%}.left-10,[left-10=""]{left:2.5rem}.left-2{left:.5rem}.right--10,[right--10=""]{right:-2.5rem}.right--15,[right--15=""]{right:-3.75rem}.right--5,[right--5=""]{right:-1.25rem}.right-0,[right-0=""]{right:0}.right-2,[right-2=""]{right:.5rem}.right-4,[right-4=""]{right:1rem}.top--20,[top--20=""]{top:-5rem}.top-\[-32px\]{top:-32px}.top-0,[top-0=""],[top~="0"]{top:0}.top-1\/2,[top~="50%"]{top:50%}.top-2,[top-2=""]{top:.5rem}[top~="[65dvh]"]{top:65dvh}[top~="[calc(100dvh-12rem)]"]{top:calc(100dvh - 12rem)}[top~="[calc(100dvh-15rem)]"]{top:calc(100dvh - 15rem)}.before\:left-3:before{left:.75rem}.before\:right-0:before{right:0}.before\:top-50\%:before{top:50%}.after\:left-\[2px\]:after{left:2px}.after\:top-\[2px\]:after{top:2px}.line-clamp-1,[line-clamp-1=""]{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3,[line-clamp-3=""]{-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.z--1,[z--1=""]{z-index:-1}.z--2{z-index:-2}.z-\[9999\]{z-index:9999}.z-0{z-index:0}.z-1,[z-1=""]{z-index:1}.z-10,[z-10=""]{z-index:10}.z-100,[z-100=""]{z-index:100}.z-1000{z-index:1000}.z-15,[z-15=""]{z-index:15}.z-2,[z-2=""]{z-index:2}.z-3,[z-3=""]{z-index:3}.z-4,[z-4=""]{z-index:4}.z-5,[z-5=""]{z-index:5}.z-99,[z-99=""]{z-index:99}[before~=z-0]:before{z-index:0}[after~=z--2]:after{z-index:-2}.\[\&\>div\]\:grid>div,.grid,[grid=""],[grid~=\~]{display:grid}.col-span-1,.grid-col-span-1,[grid-col-span-1=""]{grid-column:span 1/span 1}.col-span-2,.grid-col-span-2,[grid-col-span-2=""]{grid-column:span 2/span 2}.col-span-full{grid-column:1/-1}.grid-col-span-3{grid-column:span 3/span 3}.row-span-1{grid-row:span 1/span 1}.row-span-2{grid-row:span 2/span 2}.col-start-3{grid-column-start:3}.col-start-4{grid-column-start:4}.col-start-5{grid-column-start:5}.auto-cols-\[350px\]{grid-auto-columns:350px}.auto-cols-auto{grid-auto-columns:auto}.grid-auto-rows-\[minmax\(min-content\,max-content\)\]{grid-auto-rows:minmax(min-content,max-content)}.grid-auto-flow-dense{grid-auto-flow:dense}.grid-flow-col{grid-auto-flow:column}.grid-flow-row{grid-auto-flow:row}.\[\&\>div\]\:grid-cols-\[4fr_2fr\]>div{grid-template-columns:4fr 2fr}.cols-\[150px_1fr\],[grid~="cols-[150px_1fr]"]{grid-template-columns:150px 1fr}.cols-\[70px_1fr\],[grid~="cols-[70px_1fr]"]{grid-template-columns:70px 1fr}.grid-cols-\[repeat\(auto-fill\,minmax\(280px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.cols-1,.grid-cols-1,[grid~=cols-1]{grid-template-columns:repeat(1,minmax(0,1fr))}.cols-5,[grid~=cols-5]{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-2,[grid-cols-2=""]{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}[grid-cols-3~=placeholder\:]::placeholder{grid-template-columns:repeat(3,minmax(0,1fr))}.m-0,[m0=""]{margin:0}.\[\&\:\:-webkit-inner-spin-button\]\:m-0::-webkit-inner-spin-button{margin:0}.m-\[5px\]{margin:5px}.m-1{margin:.25rem}.m-auto{margin:auto}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-5,[mx-5=""]{margin-left:1.25rem;margin-right:1.25rem}.mx-auto,[mx-auto=""]{margin-left:auto;margin-right:auto}.my,.my-4{margin-top:1rem;margin-bottom:1rem}.my-0,[my-0=""]{margin-top:0;margin-bottom:0}.my-10,[my-10=""]{margin-top:2.5rem;margin-bottom:2.5rem}.my-5,[my-5=""]{margin-top:1.25rem;margin-bottom:1.25rem}.my-auto,[my-auto=""]{margin-top:auto;margin-bottom:auto}[m~=y-1]{margin-top:.25rem;margin-bottom:.25rem}.-mb-px{margin-bottom:-1px}.mb-0{margin-bottom:0}.mb-1,[mb-1=""]{margin-bottom:.25rem}.mb-14,[mb-14=""]{margin-bottom:3.5rem}.mb-2,[mb-2=""]{margin-bottom:.5rem}.mb-3,[mb-3=""]{margin-bottom:.75rem}.mb-4,[mb-4=""]{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml{margin-left:1rem}.ml-0\.5,[ml-0\.5=""]{margin-left:.125rem}.ml-1,[ml-1=""]{margin-left:.25rem}.ml-auto{margin-left:auto}.mr{margin-right:1rem}.mr-0\!{margin-right:0!important}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-auto{margin-right:auto}.ms{margin-inline-start:1rem}.mt-0\.5{margin-top:.125rem}.mt-1,[mt-1=""]{margin-top:.25rem}.mt-2,[mt-2=""]{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4,[mt-4=""]{margin-top:1rem}.mt-auto{margin-top:auto}[ml~="12"]{margin-left:3rem}[mr~="12"]{margin-right:3rem}[box~=border]{box-sizing:border-box}.inline,[inline=""]{display:inline}.block,[block=""]{display:block}.inline-block,[inline-block=""]{display:inline-block}.contents{display:contents}.aspect-square,[aspect-square=""]{aspect-ratio:1}.size-16,[size-16=""]{width:4rem;height:4rem}.size-2{width:.5rem;height:.5rem}.size-20,[size-20=""]{width:5rem;height:5rem}.size-24,[size-24=""],[size~="24"]{width:6rem;height:6rem}.size-3,[size-3=""]{width:.75rem;height:.75rem}.size-4,[size-4=""]{width:1rem;height:1rem}.size-5,[size-5=""]{width:1.25rem;height:1.25rem}.size-6,[size-6=""],[size~="6"]{width:1.5rem;height:1.5rem}.size-60,[size-60=""]{width:15rem;height:15rem}.size-8,[size-8=""]{width:2rem;height:2rem}[size~="1"]{width:.25rem;height:.25rem}[size~=sm]{width:24rem;height:24rem}.h-\[1px\]{height:1px}.h-\[calc\(\(1lh\+1rem\+1rem\)\*2\)\]{height:calc(2lh + 4rem)}.h-\[calc\(100\%-40px\)\]{height:calc(100% - 40px)}.h-0\.5,[h-0\.5=""]{height:.125rem}.h-0\.5lh{height:.5lh}.h-1\.5,[h-1\.5=""]{height:.375rem}.h-10{height:2.5rem}.h-100dvh,[h-100dvh=""],[h~="100dvh"]{height:100dvh}.h-12{height:3rem}.h-14,[h-14=""]{height:3.5rem}.h-15{height:3.75rem}.h-16{height:4rem}.h-1lh{height:1lh}.h-2,.h2,[h-2=""]{height:.5rem}.h-24,[h-24=""]{height:6rem}.h-30,[h-30=""]{height:7.5rem}.h-4,[h-4=""]{height:1rem}.h-48,[h-48=""]{height:12rem}.h-5,[h-5=""],[h~="5"]{height:1.25rem}.h-6{height:1.5rem}.h-60,[h-60=""]{height:15rem}.h-7,[h-7=""]{height:1.75rem}.h-8,[h-8=""]{height:2rem}.h-auto,[h-auto=""],[h~=auto]{height:auto}.h-fit,[h-fit=""]{height:fit-content}.h-full,[h-full=""],[h~="100%"]{height:100%}.h1{height:.25rem}.h3{height:.75rem}.max-h-\[10lh\],[max-h~="[10lh]"]{max-height:10lh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[96\%\]{max-height:96%}.max-h-\[calc\(100dvh-100px-56px\)\]{max-height:calc(100dvh - 156px)}.max-h-\[calc\(100dvh-17rem\)\]{max-height:calc(100dvh - 17rem)}.max-h-\[calc\(100dvh-28rem\)\]{max-height:calc(100dvh - 28rem)}.max-h-\[calc\(100dvh-7lh\)\]{max-height:calc(100dvh - 7lh)}.max-h-100dvh,[max-h-100dvh=""],[max-h~="100dvh"]{max-height:100dvh}.max-h-50dvh{max-height:50dvh}.max-h-60,[max-h-60=""]{max-height:15rem}.max-h-full{max-height:100%}.max-h-none,[max-h-none=""]{max-height:none}.max-w-100dvw,[max-w-100dvw=""]{max-width:100dvw}.max-w-2xl{max-width:42rem}.max-w-4lh,[max-w-4lh=""]{max-width:4lh}.max-w-6xl{max-width:72rem}.max-w-full,[max-w-full=""]{max-width:100%}.max-w-md{max-width:28rem}.min-h-\[120px\],.min-h-120px,[min-h-120px=""]{min-height:120px}.min-h-\[1lh\]{min-height:1lh}.min-h-16,[min-h-16=""]{min-height:4rem}.min-h-40px,[min-h-40px=""]{min-height:40px}.min-h-5,[min-h-5=""]{min-height:1.25rem}.min-h-70dvh,[min-h-70dvh=""]{min-height:70dvh}.min-w-\[150px\]{min-width:150px}.min-w-\[160px\]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-0,[min-w-0=""]{min-width:0}.min-w-12,[min-w-12=""]{min-width:3rem}.min-w-2,[min-w-2=""]{min-width:.5rem}.min-w-20,[min-w-20=""]{min-width:5rem}.min-w-20px{min-width:20px}.min-w-50,[min-w-50=""]{min-width:12.5rem}.w-\[25px\]{width:25px}.w-\[92dvw\]{width:92dvw}.w-\[92vw\]{width:92vw}.w-0\!{width:0!important}.w-1,[w-1=""]{width:.25rem}.w-1\.5,[w-1\.5=""]{width:.375rem}.w-1\/2,[w~="[50%]"]{width:50%}.w-10\%{width:10%}.w-100,[w-100=""]{width:25rem}.w-100\%,.w-full,[w-full=""],[w~="100%"],[w~=full]{width:100%}.w-100vw,[w-100vw=""]{width:100vw}.w-11{width:2.75rem}.w-12{width:3rem}.w-15{width:3.75rem}.w-16{width:4rem}.w-1lh{width:1lh}.w-2,[w-2=""]{width:.5rem}.w-25\%{width:25%}.w-30,[w-30=""]{width:7.5rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-5,[w-5=""]{width:1.25rem}.w-8,[w-8=""]{width:2rem}.w-90\%{width:90%}.w-95\%{width:95%}.w-auto,[w-auto=""]{width:auto}.w-fit,[w-fit=""]{width:fit-content}[h~="[calc(100%-56px)]"]{height:calc(100% - 56px)}[h~="[calc(100dvh-40px)]"]{height:calc(100dvh - 40px)}[h~="[calc(1lh+4px+4px)]"]{height:calc(1lh + 8px)}[h~="0"]{height:0}[h~="100"]{height:25rem}[h~="300"]{height:75rem}[h~="50%"]{height:50%}[h~="85dvh"]{height:85dvh}[h~=unset]{height:unset}[max-h~="[300px]"]{max-height:300px}[max-h~="[4.5rem]"]{max-height:4.5rem}[max-h~="[85vh]"]{max-height:85vh}[max-h~="100"]{max-height:25rem}[max-h~="35dvh"]{max-height:35dvh}[max-h~="50"]{max-height:12.5rem}[max-w~="[calc(100%-3.5rem)]"]{max-width:calc(100% - 3.5rem)}[max-w~="500px"]{max-width:500px}[min-h~="[100px]"]{min-height:100px}[min-h~="[calc(1lh+4px+4px)]"]{min-height:calc(1lh + 8px)}[min-h~="100"]{min-height:25rem}[min-h~="120"]{min-height:30rem}[min-w~="1/2"],[min-w~="50%"]{min-width:50%}[min-w~="30%"]{min-width:30%}[w~="[calc(1lh+4px+4px)]"]{width:calc(1lh + 8px)}[w~="100dvw"]{width:100dvw}[w~="12.5"]{width:3.125rem}[w~="70%"]{width:70%}.hover\:h-13:hover{height:3.25rem}.hover\:w-2:hover{width:.5rem}[hover\:h-13=""]:hover{height:3.25rem}[hover\:w-2=""]:hover{width:.5rem}.before\:h-\[calc\(100\%-2rem\)\]:before{height:calc(100% - 2rem)}.before\:w-1:before{width:.25rem}[before~=h-full]:before{height:100%}[before~=w-25\%]:before{width:25%}.after\:h-5:after{height:1.25rem}.after\:w-5:after{width:1.25rem}[after~=h-full]:after{height:100%}[after~=w-full]:after{width:100%}.flex,[flex=""],[flex~=\~]{display:flex}.inline-flex,[inline-flex=""],[inline-flex~=\~]{display:inline-flex}.flex-1,[flex-1=""],[flex~="1"]{flex:1}.flex-shrink-0,.shrink-0,[flex-shrink-0=""],[shrink-0=""]{flex-shrink:0}.flex-row,[flex-row=""],[flex~=row]{flex-direction:row}[flex~=row-reverse]{flex-direction:row-reverse}.flex-col,[flex-col=""],[flex~=col]{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap,[flex-wrap=""]{flex-wrap:wrap}.origin-left,[origin-left=""]{transform-origin:0}[perspective~="800"]{perspective:800px}.-translate-x-1\/2,.translate-x-\[-50\%\]{--un-translate-x:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.-translate-y-1\/2,[translate-y~="[-50%]"]{--un-translate-y:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[0\.25lh\]{--un-translate-y:.25lh;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[50\%\]{--un-translate-y:50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-1,[translate-y-1=""]{--un-translate-y:.25rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-2,[translate-y-2=""]{--un-translate-y:.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-4,[translate-y-4=""]{--un-translate-y:1rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-x~="0.5"]{--un-translate-x:.125rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-x~="data-[state=checked]:full"][data-state=checked]{--un-translate-x:100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[-100%]"]{--un-translate-y:-100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[-80%]"]{--un-translate-y:-80%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[2px]"]{--un-translate-y:2px;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.peer:checked~.peer-checked\:after\:translate-x-full:after{--un-translate-x:100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.\[\&_\.card-cover_img\]\:hover\:translate-y-2:hover .card-cover img,[hover\:translate-y-2=""]:hover{--un-translate-y:.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.before\:translate-y--50\%:before{--un-translate-y:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.rotate-180{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:180deg;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-100{--un-scale-x:1;--un-scale-y:1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-120{--un-scale-x:1.2;--un-scale-y:1.2;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-125{--un-scale-x:1.25;--un-scale-y:1.25;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.\[\&_\.card-cover_img\]\:hover\:scale-102:hover .card-cover img{--un-scale-x:1.02;--un-scale-y:1.02;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.hover\:scale-110:hover{--un-scale-x:1.1;--un-scale-y:1.1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[hover~=scale-100]:hover{--un-scale-x:1;--un-scale-y:1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.active\:scale-95:active{--un-scale-x:.95;--un-scale-y:.95;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.transform-scale-x--100,[transform-scale-x--100=""]{--un-scale-x:-1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.preserve-3d{transform-style:preserve-3d}.transform,[transform=""]{transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes slideDownAndFade{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}@keyframes slideLeftAndFade{0%{opacity:0;transform:translate(2px)}to{opacity:1;transform:translate(0)}}@keyframes slideRightAndFade{0%{opacity:0;transform:translate(-2px)}to{opacity:1;transform:translate(0)}}@keyframes slideUpAndFade{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-pulse,[animate-pulse=""]{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}.animate-spin{animation:1s linear infinite spin}.data-\[side\=bottom\]\:animate-slideUpAndFade[data-side=bottom]{animation:.4s cubic-bezier(.16,1,.3,1) slideUpAndFade}.data-\[side\=left\]\:animate-slideRightAndFade[data-side=left]{animation:.4s cubic-bezier(.16,1,.3,1) slideRightAndFade}.data-\[side\=right\]\:animate-slideLeftAndFade[data-side=right]{animation:.4s cubic-bezier(.16,1,.3,1) slideLeftAndFade}.data-\[side\=top\]\:animate-slideDownAndFade[data-side=top]{animation:.4s cubic-bezier(.16,1,.3,1) slideDownAndFade}.cursor-pointer,[cursor-pointer=""],[cursor~=pointer]{cursor:pointer}.cursor-crosshair{cursor:crosshair}.cursor-not-allowed,.disabled\:cursor-not-allowed:disabled,[cursor~=disabled\:not-allowed]:disabled,[disabled\:cursor-not-allowed=""]:disabled{cursor:not-allowed}.cursor-col-resize,[cursor-col-resize=""]{cursor:col-resize}.select-none,[select-none=""]{-webkit-user-select:none;user-select:none}.resize-none,[resize-none=""]{resize:none}.appearance-none,[appearance-none=""]{appearance:none}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.items-start,[flex~=items-start],[items-start=""]{align-items:flex-start}.items-end,[items-end=""]{align-items:flex-end}.items-center,[flex~=items-center],[items-center=""]{align-items:center}.self-start,[self-start=""]{align-self:flex-start}.self-end,[self-end=""]{align-self:flex-end}.justify-start{justify-content:flex-start}.justify-end,[justify-end=""]{justify-content:flex-end}.justify-center,[flex~=justify-center],[justify-center=""]{justify-content:center}.justify-between,[justify-between=""]{justify-content:space-between}.justify-self-end,[justify-self-end=""]{justify-self:end}.gap-\[5px\]{gap:5px}.gap-0\.5,[gap-0\.5=""]{gap:.125rem}.gap-1,[flex~=gap-1],[gap-1=""],[gap~="1"],[grid~=gap-1]{gap:.25rem}.gap-1\.5,[gap-1\.5=""]{gap:.375rem}.gap-2,[flex~=gap-2],[gap-2=""]{gap:.5rem}.gap-3,[flex~=gap-3],[gap-3=""]{gap:.75rem}.gap-4,[flex~=gap-4],[gap-4=""],[grid~=gap-4]{gap:1rem}.gap-5,[gap-5=""]{gap:1.25rem}.gap-6,[flex~=gap-6]{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2,[flex~=gap-x-2]{column-gap:.5rem}.gap-y-0,[flex~=gap-y-0]{row-gap:0}.space-x-1>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.25rem*calc(1 - var(--un-space-x-reverse)));margin-right:calc(.25rem*var(--un-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.25rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.25rem*var(--un-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.5rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.5rem*var(--un-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.75rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.75rem*var(--un-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1rem*var(--un-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1.5rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1.5rem*var(--un-space-y-reverse))}.of-hidden,.overflow-hidden,[of-hidden=""],[overflow-hidden=""],[overflow~=hidden]{overflow:hidden}.overflow-auto,[overflow-auto=""]{overflow:auto}.overflow-scroll,[overflow-scroll=""]{overflow:scroll}.of-x-scroll,[of-x-scroll=""]{overflow-x:scroll}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto,[overflow-y-auto=""]{overflow-y:auto}.overflow-y-scroll,[overflow-y-scroll=""]{overflow-y:scroll}.scroll-smooth,[scroll-smooth=""]{scroll-behavior:smooth}.truncate,[truncate=""]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-ellipsis,[text-ellipsis=""]{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line,[whitespace-pre-line=""]{white-space:pre-line}.whitespace-pre-wrap,[whitespace-pre-wrap=""]{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.b,.border,[b=""],[b~=\~],[border=""],[border~=\~],[border~="1"]{border-width:1px}.border-2,[border-2=""],[border~="2"],[border~="2px"]{border-width:2px}[b~="0"]{border-width:0}[b~="100"]{border-width:100px}[border~="4"]{border-width:4px}[b~=placeholder\:]::placeholder{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.\[\&\:checked\+div\]\:border-primary-500:checked+div,.border-primary-500{--un-border-opacity:1;border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.b-green{--un-border-opacity:1;border-color:rgb(74 222 128/var(--un-border-opacity))}.b-orange{--un-border-opacity:1;border-color:rgb(251 146 60/var(--un-border-opacity))}.b-purple{--un-border-opacity:1;border-color:rgb(192 132 252/var(--un-border-opacity))}.b-red{--un-border-opacity:1;border-color:rgb(248 113 113/var(--un-border-opacity))}.border-amber-200{--un-border-opacity:1;border-color:rgb(253 230 138/var(--un-border-opacity))}.border-gray-300{--un-border-opacity:1;border-color:rgb(209 213 219/var(--un-border-opacity))}.border-neutral-100,[border~=neutral-100]{--un-border-opacity:1;border-color:rgb(245 245 245/var(--un-border-opacity))}.border-neutral-100\/60,[border~=neutral-100\/60]{border-color:#f5f5f599}.border-neutral-200,.dark [border~=dark\:neutral-200],[border-neutral-200=""],[border~=neutral-200]{--un-border-opacity:1;border-color:rgb(229 229 229/var(--un-border-opacity))}.border-neutral-300,[border-neutral-300=""],[border~="data-[state=unchecked]:neutral-300"][data-state=unchecked],[border~=neutral-300]{--un-border-opacity:1;border-color:rgb(212 212 212/var(--un-border-opacity))}.border-neutral-300\/30{border-color:#d4d4d44d}.border-neutral-400{--un-border-opacity:1;border-color:rgb(163 163 163/var(--un-border-opacity))}.border-neutral-500{--un-border-opacity:1;border-color:rgb(115 115 115/var(--un-border-opacity))}.border-primary-100{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))80%,oklch(100% 0 360/var(--un-border-opacity)))}.border-primary-200,[border~="data-[state=checked]:primary-200"][data-state=checked],[border~=primary-200]{--un-border-opacity:1;border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-primary-400,.dark .dark\:\[\&\:checked\+div\]\:border-primary-400:checked+div,.dark .dark\:border-primary-400{--un-border-opacity:1;border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-primary-500\/5{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.05)}.border-red-200{--un-border-opacity:1;border-color:rgb(254 202 202/var(--un-border-opacity))}.border-red-200\/30{border-color:#fecaca4d}.border-white,.dark [border~=dark\:white]{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}.dark .dark\:border-amber-800{--un-border-opacity:1;border-color:rgb(146 64 14/var(--un-border-opacity))}.dark .dark\:border-amber-800\/30{border-color:#92400e4d}.dark .dark\:border-gray-900{--un-border-opacity:1;border-color:rgb(17 24 39/var(--un-border-opacity))}.dark .dark\:border-neutral-600,.dark [border~=dark\:neutral-600]{--un-border-opacity:1;border-color:rgb(82 82 82/var(--un-border-opacity))}.dark .dark\:border-neutral-700,.dark [border~=dark\:neutral-700],.dark [dark\:border-neutral-700=""]{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.dark .dark\:border-neutral-700\/30,.dark [border~="dark:neutral-700/30"]{border-color:#4040404d}.dark .dark\:border-neutral-800,.dark [border~=dark\:neutral-800],.dark [dark\:border-neutral-800=""],[border~=neutral-800]{--un-border-opacity:1;border-color:rgb(38 38 38/var(--un-border-opacity))}.dark .dark\:border-neutral-800\/25,.dark [border~="dark:neutral-800/25"]{border-color:#26262640}.dark .dark\:border-neutral-800\/30,.dark [border~="dark:neutral-800/30"]{border-color:#2626264d}.dark .dark\:border-neutral-900,.dark [border~=dark\:neutral-900]{--un-border-opacity:1;border-color:rgb(23 23 23/var(--un-border-opacity))}.dark .dark\:border-primary-600{--un-border-opacity:1;border-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-800,.dark [border~=dark\:primary-800]{--un-border-opacity:1;border-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-900{--un-border-opacity:1;border-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-900\/40{border-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.4)}.dark .dark\:border-red-800\/30{border-color:#991b1b4d}.dark .dark\:border-red-900\/30{border-color:#7f1d1d4d}.dark [border~="dark:cyan-500/50"]{border-color:#06b6d480}.dark [border~="dark:neutral-700/60"]{border-color:#40404099}.dark [border~="dark:primary-400/20"]{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)}.dark [border~="dark:primary-500/50"]{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.5)}.dark [border~="dark:violet-500/50"]{border-color:#8b5cf680}[border~=black]{--un-border-opacity:1;border-color:rgb(0 0 0/var(--un-border-opacity))}[border~=cyan-200\/50]{border-color:#a5f3fc80}[border~=neutral-200\/50]{border-color:#e5e5e580}[border~=neutral-200\/60]{border-color:#e5e5e599}[border~=primary-200\/20]{border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}[border~=primary-200\/50]{border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}[border~=primary-300]{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}[border~=violet-200\/50]{border-color:#ddd6fe80}.peer:checked~.peer-checked\:after\:border-white:after{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}[border~=focus-within\:neutral-800]:focus-within{--un-border-opacity:1;border-color:rgb(38 38 38/var(--un-border-opacity))}.dark .dark\:hover\:border-primary-400\/30:hover{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:hover\:border-primary-700:hover{--un-border-opacity:1;border-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark [border~="dark:hover:primary-400/30"]:hover{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.hover\:border-primary-300:hover{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.hover\:border-primary-500\/30:hover,[border~="hover:primary-500/30"]:hover{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:focus\:border-neutral-600:focus{--un-border-opacity:1;border-color:rgb(82 82 82/var(--un-border-opacity))}.dark .dark\:focus\:border-primary-400\/50:focus{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}.dark [border~="dark:focus:neutral-700"]:focus{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.dark [border~="dark:focus:primary-400/50"]:focus{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}.focus\:border-neutral-300:focus{--un-border-opacity:1;border-color:rgb(212 212 212/var(--un-border-opacity))}.focus\:border-primary-300:focus{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}[border~=focus\:neutral-200]:focus{--un-border-opacity:1;border-color:rgb(229 229 229/var(--un-border-opacity))}[border~=focus\:primary-100]:focus{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))80%,oklch(100% 0 360/var(--un-border-opacity)))}[border~=focus\:primary-300]:focus{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark [dark\:border-neutral-700~=placeholder\:]::placeholder{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.rounded,[rounded=""]{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full,[rounded-full=""]{border-radius:9999px}.rounded-lg,[b~=rounded-lg],[rounded-lg=""],[rounded~=lg]{border-radius:.5rem}.rounded-md,[rounded-md=""]{border-radius:.375rem}.rounded-sm,[rounded-sm=""]{border-radius:.125rem}.rounded-xl,[rounded-xl=""]{border-radius:.75rem}[rounded~="[1lh]"]{border-radius:1lh}.before\:rounded-full:before,.after\:rounded-full:after{border-radius:9999px}.rounded-l-xl,[rounded-l-xl=""]{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl,[rounded-r-xl=""]{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-t-xl,[rounded-t-xl=""]{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border-solid,[border-solid=""],[border~=solid]{border-style:solid}[b~=dashed],[border~=dashed]{border-style:dashed}.\!bg-transparent{background-color:#0000!important}.bg-amber-50{--un-bg-opacity:1;background-color:rgb(255 251 235/var(--un-bg-opacity))}.bg-black,[bg~=black]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.bg-black\/50,[bg~=black\/50]{background-color:#00000080}.bg-blue-100\/50{background-color:#dbeafe80}.bg-blue-50,[bg-blue-50=""]{--un-bg-opacity:1;background-color:rgb(239 246 255/var(--un-bg-opacity))}.bg-green-100\/50{background-color:#dcfce780}.bg-green-50,[bg-green-50=""]{--un-bg-opacity:1;background-color:rgb(240 253 244/var(--un-bg-opacity))}.bg-green-500,[bg-green-500=""],[bg~=green-500]{--un-bg-opacity:1;background-color:rgb(34 197 94/var(--un-bg-opacity))}.bg-lime-50\/60{background-color:#f7fee799}.bg-neutral-100,.data-\[highlighted\]\:bg-neutral-100[data-highlighted],[bg~=neutral-100]{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.bg-neutral-100\/55{background-color:#f5f5f58c}.bg-neutral-200,[bg-neutral-200=""],[bg~=neutral-200]{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}.bg-neutral-200\/45{background-color:#e5e5e573}.bg-neutral-300,.dark [bg~=dark\:neutral-300],[bg~="data-[state=unchecked]:neutral-300"][data-state=unchecked]{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.bg-neutral-400,[bg~=neutral-400]{--un-bg-opacity:1;background-color:rgb(163 163 163/var(--un-bg-opacity))}.bg-neutral-50,[bg-neutral-50=""],[bg~=neutral-50]{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.bg-neutral-50\/70,[bg~=neutral-50\/70]{background-color:#fafafab3}.bg-neutral-600,.dark .dark\:bg-neutral-600{--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity))}.bg-neutral-800,.dark .dark\:bg-neutral-800,.dark .dark\:data-\[highlighted\]\:bg-neutral-800[data-highlighted],.dark [bg~="dark:data-[state=unchecked]:neutral-800"][data-state=unchecked],.dark [bg~=dark\:neutral-800],.dark [dark\:bg-neutral-800=""]{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.bg-orange-50\/70{background-color:#fff7edb3}.bg-primary{--un-bg-opacity:1;background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-100,[bg-primary-100=""],[bg~=primary-100]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))80%,oklch(100% 0 360/var(--un-bg-opacity)))}.bg-primary-100\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.1)80%,#ffffff1a)}@supports (color:lab(0% 0 0)){.bg-primary-100\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.1)80%,lab(100% 0 0/.1))}}.bg-primary-100\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/1)80%,#fff)}@supports (color:lab(0% 0 0)){.bg-primary-100\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/1)80%,lab(100% 0 0))}}.bg-primary-100\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.2)80%,#fff3)}@supports (color:lab(0% 0 0)){.bg-primary-100\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.2)80%,lab(100% 0 0/.2))}}.bg-primary-100\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.3)80%,#ffffff4d)}@supports (color:lab(0% 0 0)){.bg-primary-100\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.3)80%,lab(100% 0 0/.3))}}.bg-primary-100\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.4)80%,#fff6)}@supports (color:lab(0% 0 0)){.bg-primary-100\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.4)80%,lab(100% 0 0/.4))}}.bg-primary-100\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.05)80%,#ffffff0d)}@supports (color:lab(0% 0 0)){.bg-primary-100\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.05)80%,lab(100% 0 0/.05))}}.bg-primary-100\/50{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.5)80%,#ffffff80)}@supports (color:lab(0% 0 0)){.bg-primary-100\/50{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.5)80%,lab(100% 0 0/.5))}}.bg-primary-100\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.6)80%,#fff9)}@supports (color:lab(0% 0 0)){.bg-primary-100\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.6)80%,lab(100% 0 0/.6))}}.bg-primary-100\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.7)80%,#ffffffb3)}@supports (color:lab(0% 0 0)){.bg-primary-100\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.7)80%,lab(100% 0 0/.7))}}.bg-primary-100\/80{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.8)80%,#fffc)}@supports (color:lab(0% 0 0)){.bg-primary-100\/80{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.8)80%,lab(100% 0 0/.8))}}.bg-primary-100\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.9)80%,#ffffffe6)}@supports (color:lab(0% 0 0)){.bg-primary-100\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.9)80%,lab(100% 0 0/.9))}}.bg-primary-200,[bg-primary-200=""]{--un-bg-opacity:1;background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-200\/10{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-200\/100{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-200\/20,[bg~=primary-200\/20]{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-200\/30{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-200\/40{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-200\/5{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-200\/50{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-200\/60{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-200\/70{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-200\/80{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-200\/90{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-300,[bg-primary-300=""]{--un-bg-opacity:1;background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-300\/10{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-300\/100{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-300\/20{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-300\/30{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-300\/40{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-300\/5{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-300\/50,.dark .dark\:bg-primary-300\/50{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-300\/60{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-300\/70{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-300\/80{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-300\/90{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-400,.dark .dark\:bg-primary-400,.dark [bg~=dark\:primary-400],[bg-primary-400=""],[bg~="data-[state=checked]:primary-400"][data-state=checked],[bg~=primary-400]{--un-bg-opacity:1;background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-400\/10{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-400\/100{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-400\/20,.dark [bg~="dark:primary-400/20"]{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-400\/30{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-400\/40{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-400\/5{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-400\/50{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-400\/60{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-400\/70{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-400\/80,.dark [bg~="data-[state=checked]:dark:primary-400/80"][data-state=checked]{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-400\/90{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-50,[bg-primary-50=""],[bg~=primary-50]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))30%,oklch(100% 0 360/var(--un-bg-opacity)))}.bg-primary-50\/10,.dark .dark\:bg-primary-50\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.1)30%,#ffffff1a)}@supports (color:lab(0% 0 0)){.bg-primary-50\/10,.dark .dark\:bg-primary-50\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.1)30%,lab(100% 0 0/.1))}}.bg-primary-50\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/1)30%,#fff)}@supports (color:lab(0% 0 0)){.bg-primary-50\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/1)30%,lab(100% 0 0))}}.bg-primary-50\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.2)30%,#fff3)}@supports (color:lab(0% 0 0)){.bg-primary-50\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.2)30%,lab(100% 0 0/.2))}}.bg-primary-50\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.3)30%,#ffffff4d)}@supports (color:lab(0% 0 0)){.bg-primary-50\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.3)30%,lab(100% 0 0/.3))}}.bg-primary-50\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.4)30%,#fff6)}@supports (color:lab(0% 0 0)){.bg-primary-50\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.4)30%,lab(100% 0 0/.4))}}.bg-primary-50\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.05)30%,#ffffff0d)}@supports (color:lab(0% 0 0)){.bg-primary-50\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.05)30%,lab(100% 0 0/.05))}}.bg-primary-50\/50,[bg~=primary-50\/50]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.5)30%,#ffffff80)}@supports (color:lab(0% 0 0)){.bg-primary-50\/50,[bg~=primary-50\/50]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.5)30%,lab(100% 0 0/.5))}}.bg-primary-50\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.6)30%,#fff9)}@supports (color:lab(0% 0 0)){.bg-primary-50\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.6)30%,lab(100% 0 0/.6))}}.bg-primary-50\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.7)30%,#ffffffb3)}@supports (color:lab(0% 0 0)){.bg-primary-50\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.7)30%,lab(100% 0 0/.7))}}.bg-primary-50\/80,[bg~=primary-50\/80]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.8)30%,#fffc)}@supports (color:lab(0% 0 0)){.bg-primary-50\/80,[bg~=primary-50\/80]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.8)30%,lab(100% 0 0/.8))}}.bg-primary-50\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.9)30%,#ffffffe6)}@supports (color:lab(0% 0 0)){.bg-primary-50\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.9)30%,lab(100% 0 0/.9))}}.bg-primary-500,.dark [bg~=dark\:primary-500],[bg-primary-500=""],[bg~=primary-500],.peer:checked~.peer-checked\:bg-primary-500{--un-bg-opacity:1;background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-500\/10,[bg~=primary-500\/10]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-500\/100{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-500\/15{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.15)}.bg-primary-500\/20,[bg~=primary-500\/20]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-500\/30,[bg~=primary-500\/30]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-500\/40,[bg~=primary-500\/40]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-500\/5,[bg~=primary-500\/5]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-500\/50,[bg~=primary-500\/50]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-500\/60,[bg~=primary-500\/60]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-500\/70,[bg~=primary-500\/70]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-500\/80,[bg~=primary-500\/80]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-500\/90,[bg~=primary-500\/90]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-600,.dark .dark\:bg-primary-600,[bg-primary-600=""]{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-600\/10{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-600\/100{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-600\/20{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-600\/30{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-600\/40{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-600\/5{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-600\/50{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-600\/60{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-600\/70{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-600\/80{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-600\/90{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-700,.dark .dark\:bg-primary-700,.dark [dark\:bg-primary-700=""],[bg-primary-700=""]{--un-bg-opacity:1;background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-700\/10{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-700\/100{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-700\/20{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-700\/30,.dark .dark\:bg-primary-700\/30{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-700\/40{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-700\/5{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-700\/50{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-700\/60{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-700\/70{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-700\/80{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-700\/90{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-800,.dark [bg~=dark\:primary-800],[bg-primary-800=""]{--un-bg-opacity:1;background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-800\/10{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-800\/100{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-800\/20{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-800\/30{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-800\/40{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-800\/5{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-800\/50{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-800\/60{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-800\/70{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-800\/80{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-800\/90{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-900,.dark .dark\:bg-primary-900,[bg-primary-900=""]{--un-bg-opacity:1;background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-900\/10,.dark .dark\:bg-primary-900\/10{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-900\/100{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-900\/20,.dark .dark\:bg-primary-900\/20{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-900\/30,.dark .dark\:bg-primary-900\/30{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-900\/40,.dark .dark\:bg-primary-900\/40,.dark [bg~="dark:primary-900/40"]{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-900\/5,.dark .dark\:bg-primary-900\/5{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-900\/50{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-900\/60{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-900\/70{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-900\/80{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-900\/90{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-950,[bg-primary-950=""]{--un-bg-opacity:1;background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-950\/10{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-950\/100{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-950\/20{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-950\/30{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-950\/40{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-950\/5{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-950\/50{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-950\/60{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-950\/70,.dark [bg~="dark:primary-950/70"]{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-950\/80{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-950\/90{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary\/10{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary\/100{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/1)}.bg-primary\/20{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary\/30{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary\/40{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary\/5{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary\/50{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary\/60{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary\/70{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary\/80{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary\/90{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.9)}.bg-red-100\/50{background-color:#fee2e280}.bg-red-50,[bg-red-50=""]{--un-bg-opacity:1;background-color:rgb(254 242 242/var(--un-bg-opacity))}.bg-red-500{--un-bg-opacity:1;background-color:rgb(239 68 68/var(--un-bg-opacity))}.bg-red-500\/15{background-color:#ef444426}.bg-red900,.dark [dark\:bg-red-900=""]{--un-bg-opacity:1;background-color:rgb(127 29 29/var(--un-bg-opacity))}.bg-transparent,.dark [bg~=dark\:transparent],[bg-transparent=""],[bg~=transparent]{background-color:#0000}.bg-violet-50\/60{background-color:#f5f3ff99}.bg-white,.dark [bg~=dark\:white],[bg-white=""],[bg~=white]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.bg-white\/60,[bg~=white\/60]{background-color:#fff9}.bg-white\/80{background-color:#fffc}.bg-white\/90,[bg~=white\/90]{background-color:#ffffffe6}.bg-yellow-500{--un-bg-opacity:1;background-color:rgb(234 179 8/var(--un-bg-opacity))}.dark .dark\:bg-amber-900\/20{background-color:#78350f33}.dark .dark\:bg-black\/30,.dark [bg~="dark:black/30"]{background-color:#0000004d}.dark .dark\:bg-black\/40{background-color:#0006}.dark .dark\:bg-black\/75{background-color:#000000bf}.dark .dark\:bg-blue-900\/30{background-color:#1e3a8a4d}.dark .dark\:bg-blue-900\/50{background-color:#1e3a8a80}.dark .dark\:bg-green-900\/30{background-color:#14532d4d}.dark .dark\:bg-green-900\/50{background-color:#14532d80}.dark .dark\:bg-lime-50\/10{background-color:#f7fee71a}.dark .dark\:bg-lime-900\/10{background-color:#3653141a}.dark .dark\:bg-neutral-500\/70{background-color:#737373b3}.dark .dark\:bg-neutral-700,.dark [bg~=dark\:neutral-700],.dark [dark\:bg-neutral-700=""],[bg~=neutral-700]{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark .dark\:bg-neutral-700\/50{background-color:#40404080}.dark .dark\:bg-neutral-700\/60{background-color:#40404099}.dark .dark\:bg-neutral-800\/50,.dark [bg~="dark:neutral-800/50"]{background-color:#26262680}.dark .dark\:bg-neutral-800\/70,.dark [bg~="dark:neutral-800/70"]{background-color:#262626b3}.dark .dark\:bg-neutral-900,.dark [bg~=dark\:neutral-900]{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}.dark .dark\:bg-neutral-900\/20{background-color:#17171733}.dark .dark\:bg-neutral-900\/95{background-color:#171717f2}.dark .dark\:bg-orange-50\/10{background-color:#fff7ed1a}.dark .dark\:bg-orange-900\/10{background-color:#7c2d121a}.dark .dark\:bg-primary-800\/25{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.25)}.dark .dark\:bg-red-700\/30{background-color:#b91c1c4d}.dark .dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark .dark\:bg-red-900\/30{background-color:#7f1d1d4d}.dark .dark\:bg-red-900\/50{background-color:#7f1d1d80}.dark .dark\:bg-violet-50\/10{background-color:#f5f3ff1a}.dark .dark\:bg-violet-900\/10{background-color:#4c1d951a}.dark [bg~="dark:[rgba(0,0,0,0.3)]"]{--un-bg-opacity:.3;background-color:rgba(0,0,0,var(--un-bg-opacity))}.dark [bg~="dark:black/10"]{background-color:#0000001a}.dark [bg~=dark\:blue-900],.dark [dark\:bg-blue-900=""]{--un-bg-opacity:1;background-color:rgb(30 58 138/var(--un-bg-opacity))}.dark [bg~=dark\:green-600]{--un-bg-opacity:1;background-color:rgb(22 163 74/var(--un-bg-opacity))}.dark [bg~="dark:neutral-100/80"],[bg~=neutral-100\/80]{background-color:#f5f5f5cc}.dark [bg~=dark\:neutral-500]{--un-bg-opacity:1;background-color:rgb(115 115 115/var(--un-bg-opacity))}.dark [bg~="dark:neutral-900/50"]{background-color:#17171780}.dark [bg~="dark:neutral-900/70"]{background-color:#171717b3}.dark [bg~="dark:neutral-900/90"]{background-color:#171717e6}.dark [bg~=dark\:neutral-950]{--un-bg-opacity:1;background-color:rgb(10 10 10/var(--un-bg-opacity))}.dark [bg~="dark:neutral-950/80"]{background-color:#0a0a0acc}.dark [bg~="dark:orange-900/20"]{background-color:#7c2d1233}.dark [bg~=dark\:violet-800]{--un-bg-opacity:1;background-color:rgb(91 33 182/var(--un-bg-opacity))}.dark [dark\:bg-green-900=""]{--un-bg-opacity:1;background-color:rgb(20 83 45/var(--un-bg-opacity))}[bg~=\$bg-color]{background-color:var(--bg-color)}[bg~=black\/0]{background-color:#0000}[bg~=black\/4]{background-color:#0000000a}[bg~=blue-100]{--un-bg-opacity:1;background-color:rgb(219 234 254/var(--un-bg-opacity))}[bg~=emerald-500]{--un-bg-opacity:1;background-color:rgb(16 185 129/var(--un-bg-opacity))}[bg~=gray-200\/30]{background-color:#e5e7eb4d}[bg~=inherit]{background-color:inherit }[bg~=neutral-100\/50]{background-color:#f5f5f580}[bg~=neutral-200\/50]{background-color:#e5e5e580}[bg~=neutral-50\/50]{background-color:#fafafa80}[bg~=orange-50]{--un-bg-opacity:1;background-color:rgb(255 247 237/var(--un-bg-opacity))}[bg~=violet-100]{--un-bg-opacity:1;background-color:rgb(237 233 254/var(--un-bg-opacity))}[bg~=white\/70]{background-color:#ffffffb3}.dark .dark\:hover\:bg-black\/40:hover{background-color:#0006}.dark .dark\:hover\:bg-neutral-600:hover{--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-700:hover{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-700\/80:hover{background-color:#404040cc}.dark .dark\:hover\:bg-neutral-800:hover{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.dark .dark\:hover\:bg-primary-700\/40:hover{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.4)}.dark .dark\:hover\:bg-red-700\/40:hover{background-color:#b91c1c66}.dark .hover\:dark\:bg-neutral-800\/50:hover{background-color:#26262680}.dark [bg~="dark:hover:neutral-800"]:hover{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.dark [bg~="dark:hover:white/30"]:hover{background-color:#ffffff4d}.dark [hover~="dark:bg-black/40"]:hover{background-color:#0006}.dark [hover~=dark\:bg-neutral-700]:hover{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark [hover~="dark:bg-neutral-700/50"]:hover{background-color:#40404080}.group:hover [bg~="group-hover:black/20"]{background-color:#0003}.hover\:bg-neutral-100:hover{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.hover\:bg-neutral-300:hover{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.hover\:bg-neutral-400:hover{--un-bg-opacity:1;background-color:rgb(163 163 163/var(--un-bg-opacity))}.hover\:bg-neutral-400\/20:hover{background-color:#a3a3a333}.hover\:bg-neutral-50:hover{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.hover\:bg-neutral-50\/50:hover{background-color:#fafafa80}.hover\:bg-neutral-800:hover{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.hover\:bg-primary-500\/20:hover{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)}.hover\:bg-primary-600:hover{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-white\/80:hover{background-color:#fffc}[bg~=hover\:emerald-600]:hover{--un-bg-opacity:1;background-color:rgb(5 150 105/var(--un-bg-opacity))}[bg~=hover\:neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}[bg~=hover\:neutral-50]:hover{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}[hover\:bg-neutral-300=""]:hover{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}[hover\:bg-primary-600=""]:hover{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}[hover~=bg-neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}[hover~=bg-white\/80]:hover{background-color:#fffc}.dark [bg~="dark:focus:neutral-900"]:focus{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}[bg~=focus\:neutral-50]:focus{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.active\:bg-neutral-400\/30:active{background-color:#a3a3a34d}.active\:bg-neutral-50\/90:active{background-color:#fafafae6}.active\:bg-primary-500\/30:active{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.active\:bg-red-500\/30:active{background-color:#ef44444d}.dark .active\:dark\:bg-neutral-800\/90:active{background-color:#262626e6}.dark .dark\:active\:bg-neutral-700\/60:active{background-color:#40404099}.dark .dark\:active\:bg-primary-700\/30:active{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:active\:bg-red-700\/30:active{background-color:#b91c1c4d}.dark [bg~="dark:active:neutral-50"]:active{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.dark [bg~="dark:active:neutral-700"]:active{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}[bg~=active\:neutral-300]:active{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}[bg~=active\:neutral-950]:active{--un-bg-opacity:1;background-color:rgb(10 10 10/var(--un-bg-opacity))}.dark .dark\:disabled\:bg-neutral-900:disabled{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}.disabled\:bg-neutral-100:disabled{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.before\:bg-lime-200:before{--un-bg-opacity:1;background-color:rgb(217 249 157/var(--un-bg-opacity))}.before\:bg-orange-200:before{--un-bg-opacity:1;background-color:rgb(254 215 170/var(--un-bg-opacity))}.before\:bg-primary-200:before{--un-bg-opacity:1;background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.before\:bg-violet-200:before{--un-bg-opacity:1;background-color:rgb(221 214 254/var(--un-bg-opacity))}.dark .before\:dark\:bg-lime-900:before{--un-bg-opacity:1;background-color:rgb(54 83 20/var(--un-bg-opacity))}.dark .before\:dark\:bg-orange-900:before{--un-bg-opacity:1;background-color:rgb(124 45 18/var(--un-bg-opacity))}.dark .before\:dark\:bg-primary-900:before{--un-bg-opacity:1;background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.dark .before\:dark\:bg-violet-900:before{--un-bg-opacity:1;background-color:rgb(76 29 149/var(--un-bg-opacity))}.after\:bg-white:after{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.bg-opacity-30{--un-bg-opacity:.3}.dark .dark\:from-neutral-800,.dark [dark\:from-neutral-800=""]{--un-gradient-from-position:0%;--un-gradient-from:rgb(38 38 38/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#26262600 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:from-primary-400\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:from-primary-400\/20{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-neutral-50,[from-neutral-50=""]{--un-gradient-from-position:0%;--un-gradient-from:rgb(250 250 250/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#fafafa00 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500\/20,.before\:from-primary-500\/20:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .before\:dark\:from-primary-400\/20:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark [before~="dark:from-primary-400/0"]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark [hover~="before:dark:from-primary-400/20"]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}[before~=from-primary-500\/0]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}[hover~="before:from-primary-500/20"]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:via-primary-400\/10{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.via-primary-500\/10,.before\:via-primary-500\/10:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.dark .before\:dark\:via-primary-400\/10:before,.dark [hover~="before:dark:via-primary-400/10"]:hover:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}[hover~="before:via-primary-500/10"]:hover:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.dark .dark\:to-neutral-900{--un-gradient-to-position:100%;--un-gradient-to:rgb(23 23 23/var(--un-to-opacity,1))var(--un-gradient-to-position)}.dark .dark\:to-primary-400\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.dark .dark\:to-transparent,.to-transparent{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.to-neutral-100,[to-neutral-100=""]{--un-gradient-to-position:100%;--un-gradient-to:rgb(245 245 245/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-primary-400{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-primary-500\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.before\:to-transparent:before,.dark .before\:dark\:to-transparent:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.dark [before~="dark:to-primary-400/0"]:before{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.dark [hover~="before:dark:to-transparent"]:hover:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}[before~=to-primary-500\/0]:before{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}[hover~=before\:to-transparent]:hover:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.bg-gradient-to-b,[bg-gradient-to-b=""]{--un-gradient-shape:to bottom in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.bg-gradient-to-r,.before\:bg-gradient-to-r:before,[before~=bg-gradient-to-r]:before,[hover~=before\:bg-gradient-to-r]:hover:before{--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.dark .dark\:fill-neutral-800,.dark [dark\:fill-neutral-800=""]{--un-fill-opacity:1;fill:rgb(38 38 38/var(--un-fill-opacity))}.fill-white,[fill-white=""]{--un-fill-opacity:1;fill:rgb(255 255 255/var(--un-fill-opacity))}[stroke-width~="0.5"]{stroke-width:.5px}[stroke-width~="1.5"]{stroke-width:1.5px}[stroke-width~="2"]{stroke-width:2px}[stroke~="163"]{stroke-width:163px}[stroke~="175"]{stroke-width:175px}.object-cover,[object-cover=""]{object-fit:cover}.object-contain,[object-contain=""]{object-fit:contain}.p-\[2px\]{padding:2px}.p-1,[p-1=""],[p~="1"]{padding:.25rem}.p-1\.5,[p-1\.5=""]{padding:.375rem}.p-2,[p-2=""],[p~="2"]{padding:.5rem}.p-2\.5{padding:.625rem}.p-3,[p-3=""]{padding:.75rem}.p-4,[p-4=""]{padding:1rem}.p-5,[p-5=""]{padding:1.25rem}.p-6{padding:1.5rem}.p-8,[p-8=""]{padding:2rem}.px,.px-4,[px-4=""],[px=""]{padding-left:1rem;padding-right:1rem}.px-\[25px\]{padding-left:25px;padding-right:25px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5,[px~="1.5"]{padding-left:.375rem;padding-right:.375rem}.px-2,.px2,[px-2=""],[px~="2"],[px2=""]{padding-left:.5rem;padding-right:.5rem}.px-3,[px-3=""]{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py,.py-4,[py-4=""],[py~="4"]{padding-top:1rem;padding-bottom:1rem}.py-\.5,.py-0\.5,[py-\.5=""],[py-0\.5=""],[py~="0.5"]{padding-top:.125rem;padding-bottom:.125rem}.py-0{padding-top:0;padding-bottom:0}.py-1,.py1,[py-1=""],[py1=""]{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5,[py-1\.5=""]{padding-top:.375rem;padding-bottom:.375rem}.py-2,[py-2=""]{padding-top:.5rem;padding-bottom:.5rem}.py-3,[py-3=""]{padding-top:.75rem;padding-bottom:.75rem}[py~="2.5"]{padding-top:.625rem;padding-bottom:.625rem}.pb-0{padding-bottom:0}.pb-12,[pb-12=""]{padding-bottom:3rem}.pb-2,[pb-2=""]{padding-bottom:.5rem}.pb-3,[pb-3=""]{padding-bottom:.75rem}.pb-4,[pb-4=""]{padding-bottom:1rem}.pb-6,[pb-6=""]{padding-bottom:1.5rem}.pl,.pl-4,[pl-4=""]{padding-left:1rem}.pl-\[1\.5rem\]{padding-left:1.5rem}.pl-10{padding-left:2.5rem}.pl-3,[pl-3=""]{padding-left:.75rem}.pl-5,[pl-5=""]{padding-left:1.25rem}.pr-\[0\.5rem\]{padding-right:.5rem}.pr-\[20px\]{padding-right:20px}.pr-1,[pr-1=""]{padding-right:.25rem}.pr-3,[pr-3=""]{padding-right:.75rem}.pr-4,[pr-4=""]{padding-right:1rem}.pt,.pt-4,[pt-4=""]{padding-top:1rem}.pt-0{padding-top:0}.pt-1,[pt-1=""]{padding-top:.25rem}.pt-10,[pt-10=""]{padding-top:2.5rem}.pt-14,[pt-14=""]{padding-top:3.5rem}.pt-2,[pt-2=""]{padding-top:.5rem}.pt-3{padding-top:.75rem}[pl~="6.5"]{padding-left:1.625rem}.text-center,[text-center=""],[text~=center]{text-align:center}.text-left,[text-left=""]{text-align:left}.text-right,[text-right=""]{text-align:right}.text-wrap,[text-wrap=""]{text-wrap:wrap}.text-nowrap,[text-nowrap=""]{text-wrap:nowrap}[align~=start],[v~=start]{vertical-align:top}.text-\[10px\],[text~="[10px]"]{font-size:10px}.text-2xl,[text-2xl=""]{font-size:1.5rem;line-height:2rem}.text-3xl,[text-3xl=""]{font-size:1.875rem;line-height:2.25rem}.text-5xl,[text-5xl=""]{font-size:3rem;line-height:1}.text-6xl,[text-6xl=""]{font-size:3.75rem;line-height:1}.text-base,[text-base=""],[text~=base]{font-size:1rem;line-height:1.5rem}.text-lg,[text-lg=""],[text~=lg]{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""],[text~=sm]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""],[text~=xs]{font-size:.75rem;line-height:1rem}[text~="[12px]"]{font-size:12px}[text~="4xl"]{font-size:2.25rem;line-height:2.5rem}[text~="60"]{font-size:15rem}[default-text~="2"]:default{font-size:.5rem}.dark .dark\:data-\[disabled\]\:text-neutral-600[data-disabled],.dark .dark\:text-neutral-600,.dark [text~=dark\:neutral-600],.text-neutral-600,[text~=neutral-600]{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}.dark .dark\:text-amber-300{--un-text-opacity:1;color:rgb(252 211 77/var(--un-text-opacity))}.dark .dark\:text-amber-400{--un-text-opacity:1;color:rgb(251 191 36/var(--un-text-opacity))}.dark .dark\:text-blue-300{--un-text-opacity:1;color:rgb(147 197 253/var(--un-text-opacity))}.dark .dark\:text-green-300{--un-text-opacity:1;color:rgb(134 239 172/var(--un-text-opacity))}.dark .dark\:text-green-400,.text-green{--un-text-opacity:1;color:rgb(74 222 128/var(--un-text-opacity))}.dark .dark\:text-lime-400{--un-text-opacity:1;color:rgb(163 230 53/var(--un-text-opacity))}.dark .dark\:text-neutral-100,.dark [text~=dark\:neutral-100],[text~=neutral-100]{--un-text-opacity:1;color:rgb(245 245 245/var(--un-text-opacity))}.dark .dark\:text-neutral-200,.dark [dark\:text-neutral-200=""],.data-\[placeholder\]\:text-neutral-200[data-placeholder]{--un-text-opacity:1;color:rgb(229 229 229/var(--un-text-opacity))}.dark .dark\:text-neutral-300,.dark [dark\:text-neutral-300=""],.dark [text~=dark\:neutral-300],[text~=neutral-300]{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark .dark\:text-neutral-300\/80{color:#d4d4d4cc}.dark .dark\:text-neutral-400,.dark [dark\:text-neutral-400=""],.dark [text~=dark\:neutral-400],.data-\[disabled\]\:text-neutral-400[data-disabled],.text-neutral-400,[text-neutral-400=""],[text~=neutral-400]{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}.dark .dark\:text-neutral-500,.dark [text~=dark\:neutral-500],.text-neutral-500,[text-neutral-500=""],[text~=neutral-500]{--un-text-opacity:1;color:rgb(115 115 115/var(--un-text-opacity))}.dark .dark\:text-neutral-600\/20,.dark [text~="dark:neutral-600/20"]{color:#52525233}.dark .dark\:text-orange-400,.text-orange{--un-text-opacity:1;color:rgb(251 146 60/var(--un-text-opacity))}.dark .dark\:color-primary-100,.dark .dark\:text-primary-100,.dark [dark\:color-primary-100=""]{--un-text-opacity:1;color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))80%,oklch(100% 0 360/var(--un-text-opacity)))}.dark .dark\:text-primary-300,.dark [text~=dark\:primary-300],.text-primary-300{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-300\/80{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.color-primary-400,.dark .dark\:text-primary-400,.dark [text~=dark\:primary-400],.text-primary-400,[color-primary-400=""],[text~=primary-400]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-600,.text-primary-600,[text~=primary-600]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-red-100{--un-text-opacity:1;color:rgb(254 226 226/var(--un-text-opacity))}.dark .dark\:text-red-300{--un-text-opacity:1;color:rgb(252 165 165/var(--un-text-opacity))}.dark .dark\:text-red-400,.text-red{--un-text-opacity:1;color:rgb(248 113 113/var(--un-text-opacity))}.dark .dark\:text-slate-100{--un-text-opacity:1;color:rgb(241 245 249/var(--un-text-opacity))}.dark .dark\:text-violet-400{--un-text-opacity:1;color:rgb(167 139 250/var(--un-text-opacity))}.dark .dark\:text-white,.text-white,[text-white=""],[text~=white]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}.dark [text~="dark:cyan-600/90"]{color:#0891b2e6}.dark [text~=dark\:gray-200]{--un-text-opacity:1;color:rgb(229 231 235/var(--un-text-opacity))}.dark [text~="dark:neutral-100/65"]{color:#f5f5f5a6}.dark [text~="dark:neutral-600/50"]{color:#52525280}.dark [text~=dark\:neutral-900]{--un-text-opacity:1;color:rgb(23 23 23/var(--un-text-opacity))}.dark [text~=dark\:orange-500],.text-orange-500{--un-text-opacity:1;color:rgb(249 115 22/var(--un-text-opacity))}.dark [text~="dark:pink-300/90"]{color:#f9a8d4e6}.dark [text~="dark:primary-300/50"]{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}.dark [text~="dark:primary-600/90"]{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.9)}.dark [text~="dark:violet-600/90"]{color:#7c3aede6}.text-amber-500{--un-text-opacity:1;color:rgb(245 158 11/var(--un-text-opacity))}.text-amber-600{--un-text-opacity:1;color:rgb(217 119 6/var(--un-text-opacity))}.text-amber-700{--un-text-opacity:1;color:rgb(180 83 9/var(--un-text-opacity))}.text-black,[text-black=""]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.text-blue-500,[text-blue-500=""]{--un-text-opacity:1;color:rgb(59 130 246/var(--un-text-opacity))}.text-blue-700,[text-blue-700=""]{--un-text-opacity:1;color:rgb(29 78 216/var(--un-text-opacity))}.text-green-500,[text-green-500=""]{--un-text-opacity:1;color:rgb(34 197 94/var(--un-text-opacity))}.text-green-600{--un-text-opacity:1;color:rgb(22 163 74/var(--un-text-opacity))}.text-green-700,[text-green-700=""]{--un-text-opacity:1;color:rgb(21 128 61/var(--un-text-opacity))}.text-lime-500{--un-text-opacity:1;color:rgb(132 204 22/var(--un-text-opacity))}.text-neutral-200\/50,[text~=neutral-200\/50]{color:#e5e5e580}.text-neutral-400\/50,[text~=neutral-400\/50]{color:#a3a3a380}.text-neutral-500\/50,[text~=neutral-500\/50]{color:#73737380}.text-neutral-700,[text-neutral-700=""]{--un-text-opacity:1;color:rgb(64 64 64/var(--un-text-opacity))}.text-neutral-700\/80{color:#404040cc}.text-neutral-800{--un-text-opacity:1;color:rgb(38 38 38/var(--un-text-opacity))}.text-neutral-950{--un-text-opacity:1;color:rgb(10 10 10/var(--un-text-opacity))}.text-primary-500,[text~=primary-500]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-600\/80{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}.text-primary-700{--un-text-opacity:1;color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-800{--un-text-opacity:1;color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-950{--un-text-opacity:1;color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-purple{--un-text-opacity:1;color:rgb(192 132 252/var(--un-text-opacity))}.text-red-500,[text-red-500=""]{--un-text-opacity:1;color:rgb(239 68 68/var(--un-text-opacity))}.text-red-700,[text-red-700=""]{--un-text-opacity:1;color:rgb(185 28 28/var(--un-text-opacity))}.text-red-950{--un-text-opacity:1;color:rgb(69 10 10/var(--un-text-opacity))}.text-slate-700{--un-text-opacity:1;color:rgb(51 65 85/var(--un-text-opacity))}.text-transparent{color:#0000}.text-violet-500,[text-violet-500=""]{--un-text-opacity:1;color:rgb(139 92 246/var(--un-text-opacity))}[text~=cyan-400\/90]{color:#22d3eee6}[text~=gray-700]{--un-text-opacity:1;color:rgb(55 65 81/var(--un-text-opacity))}[text~=orange-700]{--un-text-opacity:1;color:rgb(194 65 12/var(--un-text-opacity))}[text~=pink-400]{--un-text-opacity:1;color:rgb(244 114 182/var(--un-text-opacity))}[text~=primary-400\/90]{color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.9)}[text~=violet-400\/90]{color:#a78bfae6}.dark .dark\:hover\:text-neutral-300:hover{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark [hover~="dark:text-primary-300/80"]:hover{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.dark [text~="dark:hover:neutral-200"]:hover{--un-text-opacity:1;color:rgb(229 229 229/var(--un-text-opacity))}.dark [text~="dark:hover:neutral-800"]:hover{--un-text-opacity:1;color:rgb(38 38 38/var(--un-text-opacity))}.dark [text~="dark:hover:primary-500"]:hover{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.hover\:text-neutral-700:hover{--un-text-opacity:1;color:rgb(64 64 64/var(--un-text-opacity))}[hover~=text-primary-600\/80]:hover{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}[text~=hover\:neutral-600]:hover{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}[text~=hover\:primary-600]:hover{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="dark:disabled:neutral-600"]:disabled{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}[text~=disabled\:neutral-400]:disabled,.dark [text~="placeholder:dark:hover:neutral-400"]:hover::placeholder{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="placeholder:dark:neutral-300"]::placeholder{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark [text~="placeholder:dark:primary-300/50"]::placeholder{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}[text~="placeholder:hover:neutral-500"]:hover::placeholder{--un-text-opacity:1;color:rgb(115 115 115/var(--un-text-opacity))}[text~="placeholder:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}[text~=placeholder\:neutral-400]::placeholder{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}[text~=placeholder\:primary-400]::placeholder{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.font-bold,[font-bold=""]{font-weight:700}.font-medium,[font-medium=""]{font-weight:500}.font-normal,[font-normal=""]{font-weight:400}.font-semibold,[font-semibold=""]{font-weight:600}.leading-\[25px\]{line-height:25px}.leading-10,.lh-10{line-height:2.5rem}.leading-none,[leading~="[1]"]{line-height:1}[leading~="[0.75]"]{line-height:.75}.font-cute,[font-cute=""]{font-family:Sniglet,Kiwi Maru,xiaolai,DM Sans Variant,DM Sans,ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-jura,[font-jura=""]{font-family:Jura}.font-mono,[font-mono=""]{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-quicksand,[font-quicksand=""]{font-family:Quicksand}.font-sans,[font-sans=""]{font-family:DM Sans,DM Sans Variant,ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-sans-rounded,[font-sans-rounded=""]{font-family:Comfortaa Variable,Comfortaa,DM Sans,ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-italic,.italic,[font-italic=""]{font-style:italic}.decoration-underline,.underline,[decoration-underline=""],[underline=""]{text-decoration-line:underline}.decoration-dotted,[decoration-dotted=""]{text-decoration-style:dotted}.decoration-dashed,[decoration-dashed=""]{text-decoration-style:dashed}.tab{tab-size:4}.text-stroke-1,[text-stroke-1=""]{-webkit-text-stroke-width:1px}.text-shadow{--un-text-shadow:0 0 1px var(--un-text-shadow-color,#0003),0 0 1px var(--un-text-shadow-color,#0100051a);text-shadow:var(--un-text-shadow)}.write-vertical-left,[write-vertical-left=""]{writing-mode:vertical-lr}.\[\&\:checked\+div_\.radio-dot\]\:opacity-100:checked+div .radio-dot,.opacity-100,.group:hover .group-hover\:opacity-100,.group:hover [group-hover\:opacity-100=""]{opacity:1}.op-0,.opacity-0,[op-0=""],[opacity-0=""]{opacity:0}.op50,.opacity-50,[op50=""]{opacity:.5}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-95,[opacity-95=""]{opacity:.95}.\[\&_\.round-range-tooltip\]\:hover\:opacity-100:hover .round-range-tooltip,[hover~=opacity-100]:hover{opacity:1}.disabled\:opacity-50:disabled,[disabled\:opacity-50=""]:disabled{opacity:.5}.before\:opacity-100:before{opacity:1}[before~=opacity-0]:before{opacity:0}[hover~=before\:opacity-100]:hover:before{opacity:1}.mix-blend-screen,[mix-blend-screen=""]{mix-blend-mode:screen}.dark .dark\:shadow-lg,.shadow-lg,[shadow-lg=""]{--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark [shadow~=dark\:none]{--un-shadow:0 0 var(--un-shadow-color,#0000);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow{--un-shadow:var(--un-shadow-inset)0 1px 3px 0 var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 1px 2px -1px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-green-500\/50{--un-shadow-color:#22c55e80 }.shadow-md,[shadow-md=""],[shadow~=md]{--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-sm,[shadow-sm=""],[shadow~=sm]{--un-shadow:var(--un-shadow-inset)0 1px 2px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-xl,[shadow-xl=""]{--un-shadow:var(--un-shadow-inset)0 20px 25px -5px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-yellow-500\/30{--un-shadow-color:#eab3084d }[shadow~=cyan-200\/20]{--un-shadow-color:#a5f3fc33 }[shadow~=cyan-200\/50]{--un-shadow-color:#a5f3fc80 }[shadow~=primary-200\/20]{--un-shadow-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}[shadow~=primary-200\/50]{--un-shadow-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}[shadow~=violet-200\/20]{--un-shadow-color:#ddd6fe33 }[shadow~=violet-200\/50]{--un-shadow-color:#ddd6fe80 }.focus-within\:shadow-neutral-800:focus-within{--un-shadow-opacity:1;--un-shadow-color:rgb(38 38 38/var(--un-shadow-opacity))}[shadow~="focus-within:[0_0_0_1px]"]:focus-within{--un-shadow:0 0 0 1px var(--un-shadow-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark [hover~=dark\:shadow-lg]:hover{--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[hover~=shadow-md]:hover{--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.focus\:shadow-\[0_0_0_2px\]:focus{--un-shadow:0 0 0 2px var(--un-shadow-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.focus\:shadow-black:focus{--un-shadow-opacity:1;--un-shadow-color:rgb(0 0 0/var(--un-shadow-opacity))}.outline{outline-style:solid}.data-\[highlighted\]\:outline-none[data-highlighted],.outline-none,[outline-none=""],[outline~=focus-within\:none]:focus-within,.focus\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.ring-2,.focus\:ring-2:focus{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset)0 0 0 var(--un-ring-offset-width)var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset)0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width))var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark .dark\:ring-neutral-600\/30{--un-ring-color:#5252524d }.dark .dark\:ring-neutral-600\/60{--un-ring-color:#52525299 }.ring-neutral-300\/30{--un-ring-color:#d4d4d44d }.dark .dark\:focus\:ring-neutral-600\/30:focus{--un-ring-color:#5252524d }.dark .dark\:focus\:ring-neutral-600\/60:focus{--un-ring-color:#52525299 }.dark .dark\:focus\:ring-primary-600\/30:focus{--un-ring-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:focus\:ring-red-600\/30:focus{--un-ring-color:#dc26264d }.dark .dark\:focus\:ring-red-600\/60:focus{--un-ring-color:#dc262699 }.focus\:ring-neutral-300\/30:focus{--un-ring-color:#d4d4d44d }.focus\:ring-primary-300\/60:focus{--un-ring-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.6)}.focus\:ring-red-300\/30:focus{--un-ring-color:#fca5a54d }.backdrop-blur-lg{--un-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-md,[backdrop-blur-md=""]{--un-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-sm,[backdrop-blur-sm=""]{--un-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-xl,[backdrop-blur-xl=""]{--un-backdrop-blur:blur(24px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.blur{--un-blur:blur(8px);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.drop-shadow{--un-drop-shadow:drop-shadow(0 1px 2px var(--un-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--un-drop-shadow-color,#0000000f));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.drop-shadow-sm,[drop-shadow-sm=""]{--un-drop-shadow:drop-shadow(0 1px 1px var(--un-drop-shadow-color,#0000000d));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~=none],.dark [drop-shadow~="dark:hover:none"]:hover{--un-drop-shadow:drop-shadow(0 0 var(--un-drop-shadow-color,#0000));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~="hover:[0px_4px_4px_rgba(220,220,220,0.4)]"]:hover{--un-drop-shadow:drop-shadow(0px 4px 4px #dcdcdc66);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~="active:[0px_0px_0px_rgba(220,220,220,0.25)]"]:active{--un-drop-shadow:drop-shadow(0px 0px 0px #dcdcdc40);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.\[\&_\.provider-icon\]\:grayscale-100 .provider-icon,.grayscale-100,[grayscale-100=""]{--un-grayscale:grayscale(1);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.\[\&_\.provider-icon\]\:hover\:grayscale-0:hover .provider-icon{--un-grayscale:grayscale(0);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.filter{filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\[width\,margin\]{transition-property:width,margin;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-100,[transition~="100"]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.1s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all,[transition-all=""],[transition~=all]{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors,[transition-colors=""],[transition~=colors]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors\,transform\,width\,height{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity,[transition-opacity=""]{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform,[transition~=transform]{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=border]{transition-property:border;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=colors\,transform]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=width]{transition-property:width;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=placeholder\:all]::placeholder,[before~=transition-all]:before,.after\:transition-all:after,[after~=transition-all]:after{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,[duration-150=""]{transition-duration:.15s}.duration-200,[duration-200=""],[transition~=duration-200]{transition-duration:.2s}.duration-250,[duration-250=""],[duration~="250"],[transition~=duration-250]{transition-duration:.25s}.duration-300,[transition~=duration-300]{transition-duration:.3s}.duration-400,[transition~=duration-400]{transition-duration:.4s}.duration-500,[duration-500=""],[duration~="500"],[transition~=duration-500]{transition-duration:.5s}.duration-75{transition-duration:75ms}[duration~="10"]{transition-duration:10ms}[duration~="1000"]{transition-duration:1s}.placeholder\:duration-250::placeholder,[placeholder\:duration-250=""]::placeholder,[transition~=placeholder\:duration-250]::placeholder{transition-duration:.25s}[before~=duration-400]:before,[after~=duration-400]:after{transition-duration:.4s}[delay~="10"]{transition-delay:10ms}[delay~="100"]{transition-delay:.1s}[delay~="11"]{transition-delay:11ms}[delay~="19"]{transition-delay:19ms}[delay~="2"]{transition-delay:2ms}[delay~="20"]{transition-delay:20ms}[delay~="200"]{transition-delay:.2s}[delay~="3"]{transition-delay:3ms}[delay~="4"]{transition-delay:4ms}[delay~="5"]{transition-delay:5ms}[delay~="50"]{transition-delay:50ms}[delay~="6"]{transition-delay:6ms}[delay~="7"]{transition-delay:7ms}[delay~="8"]{transition-delay:8ms}[delay~="9"]{transition-delay:9ms}.ease,.ease-in-out,[ease-in-out=""],[transition~=ease-in-out]{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear,[ease-linear=""]{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:ease-in-out::placeholder,[transition~=placeholder\:ease-in-out]::placeholder,[before~=ease-in-out]:before,[after~=ease-in-out]:after{transition-timing-function:cubic-bezier(.4,0,.2,1)}.will-change-background-color,[will-change-background-color=""]{will-change:background-color}.will-change-color,[will-change-color=""]{will-change:color}.will-change-transform,[will-change-transform=""]{will-change:transform}.will-change-width,[will-change-width=""]{will-change:width}.before\:content-\[\'\'\]:before,.after\:content-\[\'\'\]:after,.content-empty,[before~=content-empty]:before,[after~=content-empty]:after{content:""}.placeholder-stone-400::placeholder{--un-placeholder-opacity:1;color:rgb(168 162 158/var(--un-placeholder-opacity))}.hidden,[hidden=""]{display:none}.bg-dotted-\[neutral-200\/60\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.6}.bg-dotted-\[neutral-200\/80\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8}.dark .dark\:bg-dotted-\[neutral-700\/25\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.25}.dark .dark\:bg-dotted-\[neutral-700\/40\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.4}.dark .dark\:hover\:bg-dotted-\[primary-200\/20\]:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.hover\:bg-dotted-\[primary-300\/50\]:hover,.after\:bg-dotted-\[primary-300\/50\]:after{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .dark\:after\:bg-dotted-\[primary-200\/20\]:after,.dark [hover~="dark:after:bg-dotted-[primary-200/20]"]:hover:after{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}[after~="bg-dotted-[neutral-200/80]"]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8}[hover~="after:bg-dotted-[primary-300/50]"]:hover:after{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.transition-colors-none,.placeholder\:transition-colors-none::placeholder{transition-property:color,background-color,border-color,text-color;transition-duration:0s}@media (max-width:1023.9px){[min-w~="i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-UaFS1yzN.js","assets/HeaderLink-q8Ont_Aw.js","assets/HeaderLink-4n3ShASi.css","assets/settings-BB0AtFTc.js","assets/theme-color-BIFWobsZ.js","assets/pages-m4rd-W8R.js","assets/AnimatedWave-Cojz6rq7.js","assets/Scenes-D3-lazzf.js","assets/import-url-browser-D0zVIqhu.js","assets/duckdb-mvp-P5KShsBk.js","assets/Basic-BgQfJAar.js","assets/AnimatedWave-CW4ij04Q.css","assets/route-block-gWR0cCIm.js","assets/background-gradient-blending-jSovSmMB.js","assets/browser-bFm1l1qg.js","assets/background-gradient-blending-6ss5Fg2-.css","assets/background-remove-DTJN32z8.js","assets/transformers.web-BgaDiHAD.js","assets/InputFile-BcSJOVRJ.js","assets/gesture-circle-pkJOWcgA.js","assets/image-Di3k1Znc.js","assets/image-BhuwcwI9.css","assets/polaroid-jY86CfCa.js","assets/vibrant-LAlhuqlD.js","assets/settings-B1QJpBHt.js","assets/IconAnimation-D-qvmNIz.js","assets/airi-card-Deid7cRS.js","assets/CardCreate-DfNbL4BD.js","assets/CardCreationDialog-CUhrihgO.js","assets/DialogTitle-icfnGx6M.js","assets/CardCreationDialog-UIvAa4Bx.css","assets/CardDetailDialog-dVpnsyGs.js","assets/DeleteCardDialog-C5wCNpwE.js","assets/CardListItem-jWaHBlBm.js","assets/CardCreate-DswUjQ7w.js","assets/CardCreationDialog-CYhEzkFt.js","assets/CardDetailDialog-B3nu2JGI.js","assets/CardListItem-1GFj18SB.js","assets/DeleteCardDialog-Dyob2QXx.js","assets/appearance-CgbkXuYz.js","assets/color-scheme-Cg53Mdi1.js","assets/color-scheme-r2m6hu6X.css","assets/developer-DGJJ6tta.js","assets/general-BwshJ41f.js","assets/memory-CNpnR5Ql.js","assets/models-BkGZGThV.js","assets/icon-animation-zitz9bVj.js","assets/modules-BE14UNWX.js","assets/consciousness-BuF1Ojbx.js","assets/hearing-BaAcNIp6.js","assets/memory-long-term-DaVuCOPk.js","assets/memory-short-term-A4xwu6aD.js","assets/speech-Abc_vh4w.js","assets/Textarea-rGc1yvjC.js","assets/providers-C2VzTNwI.js","assets/alibaba-cloud-model-studio-7ap18Fo0.js","assets/anthropic-5AYt9HNX.js","assets/azure-ai-foundry-C31WIx9s.js","assets/cloudflare-workers-ai-DQ5b742r.js","assets/deepseek-ByVQlTAc.js","assets/elevenlabs-W4waKSIH.js","assets/featherless-ai-DibRGwb-.js","assets/fireworks-ai-LsH2mj56.js","assets/google-generative-ai--KpWfIV-.js","assets/index-tts-vllm-CZN3SzPx.js","assets/microsoft-speech-DxOqJ-JQ.js","assets/mistral-ai-DHDVQ-H_.js","assets/moonshot-ai-DUyvYdYh.js","assets/novita-ai-D-caW35N.js","assets/ollama-4wbi0n-k.js","assets/openai-BDPnuQYk.js","assets/openai-audio-speech-DDIxYC90.js","assets/openai-audio-transcription-CbLHW9aC.js","assets/openrouter-ai-Bp9JI8pa.js","assets/player2--doz6X0m.js","assets/player2-speech-Cf4MI4jv.js","assets/together-ai-CsX6JpBs.js","assets/volcengine-Ghd4CBxy.js","assets/xai-n-qIhfM0.js","assets/scene-CRPN8LGX.js","assets/stage-C6gN8EAr.js","assets/filter-message-Cm2-SMhJ.js","assets/delays-DsBi38hN.js","assets/emotions-yTSpRcgw.js","assets/messages-DQjPeAXc.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 @@ -6,16 +6,16 @@ var __create=Object.create,__defProp$1=Object.defineProperty,__getOwnPropDesc=Ob * @license MIT **/ /*! #__NO_SIDE_EFFECTS__ */ -function makeMap(str){let map=Object.create(null);for(let key$2 of str.split(`,`))map[key$2]=1;return val=>val in map}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=key$2=>key$2.charCodeAt(0)===111&&key$2.charCodeAt(1)===110&&(key$2.charCodeAt(2)>122||key$2.charCodeAt(2)<97),isModelListener=key$2=>key$2.startsWith(`onUpdate:`),extend$2=Object.assign,remove$2=(arr,el)=>{let i=arr.indexOf(el);i>-1&&arr.splice(i,1)},hasOwnProperty$3=Object.prototype.hasOwnProperty,hasOwn$4=(val,key$2)=>hasOwnProperty$3.call(val,key$2),isArray$5=Array.isArray,isMap=val=>toTypeString$1(val)===`[object Map]`,isSet=val=>toTypeString$1(val)===`[object Set]`,isDate$1=val=>toTypeString$1(val)===`[object Date]`,isRegExp$1=val=>toTypeString$1(val)===`[object RegExp]`,isFunction$1=val=>typeof val==`function`,isString$2=val=>typeof val==`string`,isSymbol$1=val=>typeof val==`symbol`,isObject$6=val=>typeof val==`object`&&!!val,isPromise$1=val=>(isObject$6(val)||isFunction$1(val))&&isFunction$1(val.then)&&isFunction$1(val.catch),objectToString$1=Object.prototype.toString,toTypeString$1=value$1=>objectToString$1.call(value$1),toRawType=value$1=>toTypeString$1(value$1).slice(8,-1),isPlainObject$7=val=>toTypeString$1(val)===`[object Object]`,isIntegerKey=key$2=>isString$2(key$2)&&key$2!==`NaN`&&key$2[0]!==`-`&&``+parseInt(key$2,10)===key$2,isReservedProp=makeMap(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),isBuiltInDirective=makeMap(`bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo`),cacheStringFunction$2=fn$5=>{let cache$1=Object.create(null);return str=>{let hit=cache$1[str];return hit||(cache$1[str]=fn$5(str))}},camelizeRE$2=/-(\w)/g,camelize=cacheStringFunction$2(str=>str.replace(camelizeRE$2,(_$1,c$3)=>c$3?c$3.toUpperCase():``)),hyphenateRE$2=/\B([A-Z])/g,hyphenate$2=cacheStringFunction$2(str=>str.replace(hyphenateRE$2,`-$1`).toLowerCase()),capitalize$1=cacheStringFunction$2(str=>str.charAt(0).toUpperCase()+str.slice(1)),toHandlerKey=cacheStringFunction$2(str=>{let s=str?`on${capitalize$1(str)}`:``;return s}),hasChanged=(value$1,oldValue)=>!Object.is(value$1,oldValue),invokeArrayFns=(fns,...arg)=>{for(let i=0;i{Object.defineProperty(obj,key$2,{configurable:!0,enumerable:!1,writable,value:value$1})},looseToNumber=val=>{let n=parseFloat(val);return isNaN(n)?val:n},toNumber=val=>{let n=isString$2(val)?Number(val):NaN;return isNaN(n)?val:n};let _globalThis$1;const getGlobalThis$1=()=>_globalThis$1||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{},identRE=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/,PatchFlags={TEXT:1,1:`TEXT`,CLASS:2,2:`CLASS`,STYLE:4,4:`STYLE`,PROPS:8,8:`PROPS`,FULL_PROPS:16,16:`FULL_PROPS`,NEED_HYDRATION:32,32:`NEED_HYDRATION`,STABLE_FRAGMENT:64,64:`STABLE_FRAGMENT`,KEYED_FRAGMENT:128,128:`KEYED_FRAGMENT`,UNKEYED_FRAGMENT:256,256:`UNKEYED_FRAGMENT`,NEED_PATCH:512,512:`NEED_PATCH`,DYNAMIC_SLOTS:1024,1024:`DYNAMIC_SLOTS`,DEV_ROOT_FRAGMENT:2048,2048:`DEV_ROOT_FRAGMENT`,CACHED:-1,"-1":`CACHED`,BAIL:-2,"-2":`BAIL`},PatchFlagNames={1:`TEXT`,2:`CLASS`,4:`STYLE`,8:`PROPS`,16:`FULL_PROPS`,32:`NEED_HYDRATION`,64:`STABLE_FRAGMENT`,128:`KEYED_FRAGMENT`,256:`UNKEYED_FRAGMENT`,512:`NEED_PATCH`,1024:`DYNAMIC_SLOTS`,2048:`DEV_ROOT_FRAGMENT`,[-1]:`CACHED`,[-2]:`BAIL`},ShapeFlags={ELEMENT:1,1:`ELEMENT`,FUNCTIONAL_COMPONENT:2,2:`FUNCTIONAL_COMPONENT`,STATEFUL_COMPONENT:4,4:`STATEFUL_COMPONENT`,TEXT_CHILDREN:8,8:`TEXT_CHILDREN`,ARRAY_CHILDREN:16,16:`ARRAY_CHILDREN`,SLOTS_CHILDREN:32,32:`SLOTS_CHILDREN`,TELEPORT:64,64:`TELEPORT`,SUSPENSE:128,128:`SUSPENSE`,COMPONENT_SHOULD_KEEP_ALIVE:256,256:`COMPONENT_SHOULD_KEEP_ALIVE`,COMPONENT_KEPT_ALIVE:512,512:`COMPONENT_KEPT_ALIVE`,COMPONENT:6,6:`COMPONENT`},SlotFlags={STABLE:1,1:`STABLE`,DYNAMIC:2,2:`DYNAMIC`,FORWARDED:3,3:`FORWARDED`},slotFlagsText={1:`STABLE`,2:`DYNAMIC`,3:`FORWARDED`},GLOBALS_ALLOWED=`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`,isGloballyAllowed=makeMap(GLOBALS_ALLOWED),isGloballyWhitelisted=isGloballyAllowed,range=2;function normalizeStyle(value$1){if(isArray$5(value$1)){let res={};for(let i=0;i{if(item){let tmp$1=item.split(propertyDelimiterRE);tmp$1.length>1&&(ret[tmp$1[0].trim()]=tmp$1[1].trim())}}),ret}function normalizeClass(value$1){let res=``;if(isString$2(value$1))res=value$1;else if(isArray$5(value$1))for(let i=0;ilooseEqual(item,val))}const isRef$1=val=>!!(val&&val.__v_isRef===!0),toDisplayString=val=>isString$2(val)?val:val==null?``:isArray$5(val)||isObject$6(val)&&(val.toString===objectToString$1||!isFunction$1(val.toString))?isRef$1(val)?toDisplayString(val.value):JSON.stringify(val,replacer,2):String(val),replacer=(_key,val)=>isRef$1(val)?replacer(_key,val.value):isMap(val)?{[`Map(${val.size})`]:[...val.entries()].reduce((entries,[key$2,val2],i)=>(entries[stringifySymbol(key$2,i)+` =>`]=val2,entries),{})}:isSet(val)?{[`Set(${val.size})`]:[...val.values()].map(v=>stringifySymbol(v))}:isSymbol$1(val)?stringifySymbol(val):isObject$6(val)&&!isArray$5(val)&&!isPlainObject$7(val)?String(val):val,stringifySymbol=(v,i=``)=>{var _a$2;return isSymbol$1(v)?`Symbol(${(_a$2=v.description)??i})`:v};function normalizeCssVarValue(value$1){return value$1==null?`initial`:typeof value$1==`string`?value$1===``?` `:value$1:(typeof value$1!=`number`||Number.isFinite(value$1),String(value$1))}let activeEffectScope;var EffectScope=class{constructor(detached=!1){this.detached=detached,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!detached&&activeEffectScope&&(this.index=(activeEffectScope.scopes||=[]).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let i,l;if(this.scopes)for(i=0,l=this.scopes.length;i0&&--this._on===0&&(activeEffectScope=this.prevScope,this.prevScope=void 0)}stop(fromParent){if(this._active){this._active=!1;let i,l;for(i=0,l=this.effects.length;i0)return;if(batchedComputed){let e$4=batchedComputed;for(batchedComputed=void 0;e$4;){let next=e$4.next;e$4.next=void 0,e$4.flags&=-9,e$4=next}}let error;for(;batchedSub;){let e$4=batchedSub;for(batchedSub=void 0;e$4;){let next=e$4.next;if(e$4.next=void 0,e$4.flags&=-9,e$4.flags&1)try{e$4.trigger()}catch(err){error||=err}e$4=next}}if(error)throw error}function prepareDeps(sub){for(let link$1=sub.deps;link$1;link$1=link$1.nextDep)link$1.version=-1,link$1.prevActiveLink=link$1.dep.activeLink,link$1.dep.activeLink=link$1}function cleanupDeps(sub){let head$1,tail=sub.depsTail,link$1=tail;for(;link$1;){let prev=link$1.prevDep;link$1.version===-1?(link$1===tail&&(tail=prev),removeSub(link$1),removeDep(link$1)):head$1=link$1,link$1.dep.activeLink=link$1.prevActiveLink,link$1.prevActiveLink=void 0,link$1=prev}sub.deps=head$1,sub.depsTail=tail}function isDirty(sub){for(let link$1=sub.deps;link$1;link$1=link$1.nextDep)if(link$1.dep.version!==link$1.version||link$1.dep.computed&&(refreshComputed(link$1.dep.computed)||link$1.dep.version!==link$1.version))return!0;return!!sub._dirty}function refreshComputed(computed$2){if(computed$2.flags&4&&!(computed$2.flags&16)||(computed$2.flags&=-17,computed$2.globalVersion===globalVersion)||(computed$2.globalVersion=globalVersion,!computed$2.isSSR&&computed$2.flags&128&&(!computed$2.deps&&!computed$2._dirty||!isDirty(computed$2))))return;computed$2.flags|=2;let dep=computed$2.dep,prevSub=activeSub,prevShouldTrack=shouldTrack;activeSub=computed$2,shouldTrack=!0;try{prepareDeps(computed$2);let value$1=computed$2.fn(computed$2._value);(dep.version===0||hasChanged(value$1,computed$2._value))&&(computed$2.flags|=128,computed$2._value=value$1,dep.version++)}catch(err){throw dep.version++,err}finally{activeSub=prevSub,shouldTrack=prevShouldTrack,cleanupDeps(computed$2),computed$2.flags&=-3}}function removeSub(link$1,soft=!1){let{dep,prevSub,nextSub}=link$1;if(prevSub&&(prevSub.nextSub=nextSub,link$1.prevSub=void 0),nextSub&&(nextSub.prevSub=prevSub,link$1.nextSub=void 0),dep.subs===link$1&&(dep.subs=prevSub,!prevSub&&dep.computed)){dep.computed.flags&=-5;for(let l=dep.computed.deps;l;l=l.nextDep)removeSub(l,!0)}!soft&&!--dep.sc&&dep.map&&dep.map.delete(dep.key)}function removeDep(link$1){let{prevDep,nextDep}=link$1;prevDep&&(prevDep.nextDep=nextDep,link$1.prevDep=void 0),nextDep&&(nextDep.prevDep=prevDep,link$1.nextDep=void 0)}function effect(fn$5,options$1){fn$5.effect instanceof ReactiveEffect&&(fn$5=fn$5.effect.fn);let e$4=new ReactiveEffect(fn$5);options$1&&extend$2(e$4,options$1);try{e$4.run()}catch(err){throw e$4.stop(),err}let runner=e$4.run.bind(e$4);return runner.effect=e$4,runner}function stop(runner){runner.effect.stop()}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){let last=trackStack.pop();shouldTrack=last===void 0?!0:last}function cleanupEffect(e$4){let{cleanup}=e$4;if(e$4.cleanup=void 0,cleanup){let prevSub=activeSub;activeSub=void 0;try{cleanup()}finally{activeSub=prevSub}}}let globalVersion=0;var Link=class{constructor(sub,dep){this.sub=sub,this.dep=dep,this.version=dep.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Dep=class{constructor(computed$2){this.computed=computed$2,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(debugInfo){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let link$1=this.activeLink;if(link$1===void 0||link$1.sub!==activeSub)link$1=this.activeLink=new Link(activeSub,this),activeSub.deps?(link$1.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=link$1,activeSub.depsTail=link$1):activeSub.deps=activeSub.depsTail=link$1,addSub(link$1);else if(link$1.version===-1&&(link$1.version=this.version,link$1.nextDep)){let next=link$1.nextDep;next.prevDep=link$1.prevDep,link$1.prevDep&&(link$1.prevDep.nextDep=next),link$1.prevDep=activeSub.depsTail,link$1.nextDep=void 0,activeSub.depsTail.nextDep=link$1,activeSub.depsTail=link$1,activeSub.deps===link$1&&(activeSub.deps=next)}return link$1}trigger(debugInfo){this.version++,globalVersion++,this.notify(debugInfo)}notify(debugInfo){startBatch();try{for(let link$1=this.subs;link$1;link$1=link$1.prevSub)link$1.sub.notify()&&link$1.sub.dep.notify()}finally{endBatch()}}};function addSub(link$1){if(link$1.dep.sc++,link$1.sub.flags&4){let computed$2=link$1.dep.computed;if(computed$2&&!link$1.dep.subs){computed$2.flags|=20;for(let l=computed$2.deps;l;l=l.nextDep)addSub(l)}let currentTail=link$1.dep.subs;currentTail!==link$1&&(link$1.prevSub=currentTail,currentTail&&(currentTail.nextSub=link$1)),link$1.dep.subs=link$1}}const targetMap=new WeakMap,ITERATE_KEY=Symbol(``),MAP_KEY_ITERATE_KEY=Symbol(``),ARRAY_ITERATE_KEY=Symbol(``);function track(target$1,type,key$2){if(shouldTrack&&activeSub){let depsMap=targetMap.get(target$1);depsMap||targetMap.set(target$1,depsMap=new Map);let dep=depsMap.get(key$2);dep||(depsMap.set(key$2,dep=new Dep),dep.map=depsMap,dep.key=key$2),dep.track()}}function trigger(target$1,type,key$2,newValue,oldValue,oldTarget){let depsMap=targetMap.get(target$1);if(!depsMap){globalVersion++;return}let run=dep=>{dep&&dep.trigger()};if(startBatch(),type===`clear`)depsMap.forEach(run);else{let targetIsArray=isArray$5(target$1),isArrayIndex=targetIsArray&&isIntegerKey(key$2);if(targetIsArray&&key$2===`length`){let newLength=Number(newValue);depsMap.forEach((dep,key2)=>{(key2===`length`||key2===ARRAY_ITERATE_KEY||!isSymbol$1(key2)&&key2>=newLength)&&run(dep)})}else switch((key$2!==void 0||depsMap.has(void 0))&&run(depsMap.get(key$2)),isArrayIndex&&run(depsMap.get(ARRAY_ITERATE_KEY)),type){case`add`:targetIsArray?isArrayIndex&&run(depsMap.get(`length`)):(run(depsMap.get(ITERATE_KEY)),isMap(target$1)&&run(depsMap.get(MAP_KEY_ITERATE_KEY)));break;case`delete`:targetIsArray||(run(depsMap.get(ITERATE_KEY)),isMap(target$1)&&run(depsMap.get(MAP_KEY_ITERATE_KEY)));break;case`set`:isMap(target$1)&&run(depsMap.get(ITERATE_KEY));break}}endBatch()}function getDepFromReactive(object$1,key$2){let depMap=targetMap.get(object$1);return depMap&&depMap.get(key$2)}function reactiveReadArray(array$1){let raw$3=toRaw(array$1);return raw$3===array$1?raw$3:(track(raw$3,`iterate`,ARRAY_ITERATE_KEY),isShallow(array$1)?raw$3:raw$3.map(toReactive))}function shallowReadArray(arr){return track(arr=toRaw(arr),`iterate`,ARRAY_ITERATE_KEY),arr}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator(this,Symbol.iterator,toReactive)},concat(...args){return reactiveReadArray(this).concat(...args.map(x$1=>isArray$5(x$1)?reactiveReadArray(x$1):x$1))},entries(){return iterator(this,`entries`,value$1=>(value$1[1]=toReactive(value$1[1]),value$1))},every(fn$5,thisArg){return apply$1(this,`every`,fn$5,thisArg,void 0,arguments)},filter(fn$5,thisArg){return apply$1(this,`filter`,fn$5,thisArg,v=>v.map(toReactive),arguments)},find(fn$5,thisArg){return apply$1(this,`find`,fn$5,thisArg,toReactive,arguments)},findIndex(fn$5,thisArg){return apply$1(this,`findIndex`,fn$5,thisArg,void 0,arguments)},findLast(fn$5,thisArg){return apply$1(this,`findLast`,fn$5,thisArg,toReactive,arguments)},findLastIndex(fn$5,thisArg){return apply$1(this,`findLastIndex`,fn$5,thisArg,void 0,arguments)},forEach(fn$5,thisArg){return apply$1(this,`forEach`,fn$5,thisArg,void 0,arguments)},includes(...args){return searchProxy(this,`includes`,args)},indexOf(...args){return searchProxy(this,`indexOf`,args)},join(separator){return reactiveReadArray(this).join(separator)},lastIndexOf(...args){return searchProxy(this,`lastIndexOf`,args)},map(fn$5,thisArg){return apply$1(this,`map`,fn$5,thisArg,void 0,arguments)},pop(){return noTracking(this,`pop`)},push(...args){return noTracking(this,`push`,args)},reduce(fn$5,...args){return reduce(this,`reduce`,fn$5,args)},reduceRight(fn$5,...args){return reduce(this,`reduceRight`,fn$5,args)},shift(){return noTracking(this,`shift`)},some(fn$5,thisArg){return apply$1(this,`some`,fn$5,thisArg,void 0,arguments)},splice(...args){return noTracking(this,`splice`,args)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(comparer){return reactiveReadArray(this).toSorted(comparer)},toSpliced(...args){return reactiveReadArray(this).toSpliced(...args)},unshift(...args){return noTracking(this,`unshift`,args)},values(){return iterator(this,`values`,toReactive)}};function iterator(self$1,method,wrapValue){let arr=shallowReadArray(self$1),iter=arr[method]();return arr!==self$1&&!isShallow(self$1)&&(iter._next=iter.next,iter.next=()=>{let result=iter._next();return result.value&&=wrapValue(result.value),result}),iter}const arrayProto=Array.prototype;function apply$1(self$1,method,fn$5,thisArg,wrappedRetFn,args){let arr=shallowReadArray(self$1),needsWrap=arr!==self$1&&!isShallow(self$1),methodFn=arr[method];if(methodFn!==arrayProto[method]){let result2=methodFn.apply(self$1,args);return needsWrap?toReactive(result2):result2}let wrappedFn=fn$5;arr!==self$1&&(needsWrap?wrappedFn=function(item,index$1){return fn$5.call(this,toReactive(item),index$1,self$1)}:fn$5.length>2&&(wrappedFn=function(item,index$1){return fn$5.call(this,item,index$1,self$1)}));let result=methodFn.call(arr,wrappedFn,thisArg);return needsWrap&&wrappedRetFn?wrappedRetFn(result):result}function reduce(self$1,method,fn$5,args){let arr=shallowReadArray(self$1),wrappedFn=fn$5;return arr!==self$1&&(isShallow(self$1)?fn$5.length>3&&(wrappedFn=function(acc,item,index$1){return fn$5.call(this,acc,item,index$1,self$1)}):wrappedFn=function(acc,item,index$1){return fn$5.call(this,acc,toReactive(item),index$1,self$1)}),arr[method](wrappedFn,...args)}function searchProxy(self$1,method,args){let arr=toRaw(self$1);track(arr,`iterate`,ARRAY_ITERATE_KEY);let res=arr[method](...args);return(res===-1||res===!1)&&isProxy(args[0])?(args[0]=toRaw(args[0]),arr[method](...args)):res}function noTracking(self$1,method,args=[]){pauseTracking(),startBatch();let res=toRaw(self$1)[method].apply(self$1,args);return endBatch(),resetTracking(),res}const isNonTrackableKeys=makeMap(`__proto__,__v_isRef,__isVue`),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(key$2=>key$2!==`arguments`&&key$2!==`caller`).map(key$2=>Symbol[key$2]).filter(isSymbol$1));function hasOwnProperty$2(key$2){isSymbol$1(key$2)||(key$2=String(key$2));let obj=toRaw(this);return track(obj,`has`,key$2),obj.hasOwnProperty(key$2)}var BaseReactiveHandler=class{constructor(_isReadonly=!1,_isShallow=!1){this._isReadonly=_isReadonly,this._isShallow=_isShallow}get(target$1,key$2,receiver){if(key$2===`__v_skip`)return target$1.__v_skip;let isReadonly2=this._isReadonly,isShallow2=this._isShallow;if(key$2===`__v_isReactive`)return!isReadonly2;if(key$2===`__v_isReadonly`)return isReadonly2;if(key$2===`__v_isShallow`)return isShallow2;if(key$2===`__v_raw`)return receiver===(isReadonly2?isShallow2?shallowReadonlyMap:readonlyMap:isShallow2?shallowReactiveMap:reactiveMap).get(target$1)||Object.getPrototypeOf(target$1)===Object.getPrototypeOf(receiver)?target$1:void 0;let targetIsArray=isArray$5(target$1);if(!isReadonly2){let fn$5;if(targetIsArray&&(fn$5=arrayInstrumentations[key$2]))return fn$5;if(key$2===`hasOwnProperty`)return hasOwnProperty$2}let res=Reflect.get(target$1,key$2,isRef(target$1)?target$1:receiver);return(isSymbol$1(key$2)?builtInSymbols.has(key$2):isNonTrackableKeys(key$2))?res:(isReadonly2||track(target$1,`get`,key$2),isShallow2?res:isRef(res)?targetIsArray&&isIntegerKey(key$2)?res:res.value:isObject$6(res)?isReadonly2?readonly$1(res):reactive(res):res)}},MutableReactiveHandler=class extends BaseReactiveHandler{constructor(isShallow2=!1){super(!1,isShallow2)}set(target$1,key$2,value$1,receiver){let oldValue=target$1[key$2];if(!this._isShallow){let isOldValueReadonly=isReadonly(oldValue);if(!isShallow(value$1)&&!isReadonly(value$1)&&(oldValue=toRaw(oldValue),value$1=toRaw(value$1)),!isArray$5(target$1)&&isRef(oldValue)&&!isRef(value$1))return isOldValueReadonly?!1:(oldValue.value=value$1,!0)}let hadKey=isArray$5(target$1)&&isIntegerKey(key$2)?Number(key$2)value$1,getProto=v=>Reflect.getPrototypeOf(v);function createIterableMethod(method,isReadonly2,isShallow2){return function(...args){let target$1=this.__v_raw,rawTarget=toRaw(target$1),targetIsMap=isMap(rawTarget),isPair=method===`entries`||method===Symbol.iterator&&targetIsMap,isKeyOnly=method===`keys`&&targetIsMap,innerIterator=target$1[method](...args),wrap$3=isShallow2?toShallow:isReadonly2?toReadonly:toReactive;return!isReadonly2&&track(rawTarget,`iterate`,isKeyOnly?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){let{value:value$1,done}=innerIterator.next();return done?{value:value$1,done}:{value:isPair?[wrap$3(value$1[0]),wrap$3(value$1[1])]:wrap$3(value$1),done}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(type){return function(...args){return type===`delete`?!1:type===`clear`?void 0:this}}function createInstrumentations(readonly$2,shallow){let instrumentations={get(key$2){let target$1=this.__v_raw,rawTarget=toRaw(target$1),rawKey=toRaw(key$2);readonly$2||(hasChanged(key$2,rawKey)&&track(rawTarget,`get`,key$2),track(rawTarget,`get`,rawKey));let{has}=getProto(rawTarget),wrap$3=shallow?toShallow:readonly$2?toReadonly:toReactive;if(has.call(rawTarget,key$2))return wrap$3(target$1.get(key$2));if(has.call(rawTarget,rawKey))return wrap$3(target$1.get(rawKey));target$1!==rawTarget&&target$1.get(key$2)},get size(){let target$1=this.__v_raw;return!readonly$2&&track(toRaw(target$1),`iterate`,ITERATE_KEY),Reflect.get(target$1,`size`,target$1)},has(key$2){let target$1=this.__v_raw,rawTarget=toRaw(target$1),rawKey=toRaw(key$2);return readonly$2||(hasChanged(key$2,rawKey)&&track(rawTarget,`has`,key$2),track(rawTarget,`has`,rawKey)),key$2===rawKey?target$1.has(key$2):target$1.has(key$2)||target$1.has(rawKey)},forEach(callback,thisArg){let observed=this,target$1=observed.__v_raw,rawTarget=toRaw(target$1),wrap$3=shallow?toShallow:readonly$2?toReadonly:toReactive;return!readonly$2&&track(rawTarget,`iterate`,ITERATE_KEY),target$1.forEach((value$1,key$2)=>callback.call(thisArg,wrap$3(value$1),wrap$3(key$2),observed))}};extend$2(instrumentations,readonly$2?{add:createReadonlyMethod(`add`),set:createReadonlyMethod(`set`),delete:createReadonlyMethod(`delete`),clear:createReadonlyMethod(`clear`)}:{add(value$1){!shallow&&!isShallow(value$1)&&!isReadonly(value$1)&&(value$1=toRaw(value$1));let target$1=toRaw(this),proto=getProto(target$1),hadKey=proto.has.call(target$1,value$1);return hadKey||(target$1.add(value$1),trigger(target$1,`add`,value$1,value$1)),this},set(key$2,value$1){!shallow&&!isShallow(value$1)&&!isReadonly(value$1)&&(value$1=toRaw(value$1));let target$1=toRaw(this),{has,get}=getProto(target$1),hadKey=has.call(target$1,key$2);hadKey||(key$2=toRaw(key$2),hadKey=has.call(target$1,key$2));let oldValue=get.call(target$1,key$2);return target$1.set(key$2,value$1),hadKey?hasChanged(value$1,oldValue)&&trigger(target$1,`set`,key$2,value$1,oldValue):trigger(target$1,`add`,key$2,value$1),this},delete(key$2){let target$1=toRaw(this),{has,get}=getProto(target$1),hadKey=has.call(target$1,key$2);hadKey||(key$2=toRaw(key$2),hadKey=has.call(target$1,key$2));let oldValue=get?get.call(target$1,key$2):void 0,result=target$1.delete(key$2);return hadKey&&trigger(target$1,`delete`,key$2,void 0,oldValue),result},clear(){let target$1=toRaw(this),hadItems=target$1.size!==0,oldTarget,result=target$1.clear();return hadItems&&trigger(target$1,`clear`,void 0,void 0,oldTarget),result}});let iteratorMethods=[`keys`,`values`,`entries`,Symbol.iterator];return iteratorMethods.forEach(method=>{instrumentations[method]=createIterableMethod(method,readonly$2,shallow)}),instrumentations}function createInstrumentationGetter(isReadonly2,shallow){let instrumentations=createInstrumentations(isReadonly2,shallow);return(target$1,key$2,receiver)=>key$2===`__v_isReactive`?!isReadonly2:key$2===`__v_isReadonly`?isReadonly2:key$2===`__v_raw`?target$1:Reflect.get(hasOwn$4(instrumentations,key$2)&&key$2 in target$1?instrumentations:target$1,key$2,receiver)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(rawType){switch(rawType){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function getTargetType(value$1){return value$1.__v_skip||!Object.isExtensible(value$1)?0:targetTypeMap(toRawType(value$1))}function reactive(target$1){return isReadonly(target$1)?target$1:createReactiveObject(target$1,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(target$1){return createReactiveObject(target$1,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly$1(target$1){return createReactiveObject(target$1,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(target$1){return createReactiveObject(target$1,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(target$1,isReadonly2,baseHandlers,collectionHandlers,proxyMap){if(!isObject$6(target$1)||target$1.__v_raw&&!(isReadonly2&&target$1.__v_isReactive))return target$1;let targetType=getTargetType(target$1);if(targetType===0)return target$1;let existingProxy=proxyMap.get(target$1);if(existingProxy)return existingProxy;let proxy=new Proxy(target$1,targetType===2?collectionHandlers:baseHandlers);return proxyMap.set(target$1,proxy),proxy}function isReactive(value$1){return isReadonly(value$1)?isReactive(value$1.__v_raw):!!(value$1&&value$1.__v_isReactive)}function isReadonly(value$1){return!!(value$1&&value$1.__v_isReadonly)}function isShallow(value$1){return!!(value$1&&value$1.__v_isShallow)}function isProxy(value$1){return value$1?!!value$1.__v_raw:!1}function toRaw(observed){let raw$3=observed&&observed.__v_raw;return raw$3?toRaw(raw$3):observed}function markRaw(value$1){return!hasOwn$4(value$1,`__v_skip`)&&Object.isExtensible(value$1)&&def(value$1,`__v_skip`,!0),value$1}const toReactive=value$1=>isObject$6(value$1)?reactive(value$1):value$1,toReadonly=value$1=>isObject$6(value$1)?readonly$1(value$1):value$1;function isRef(r$1){return r$1?r$1.__v_isRef===!0:!1}function ref(value$1){return createRef$2(value$1,!1)}function shallowRef(value$1){return createRef$2(value$1,!0)}function createRef$2(rawValue,shallow){return isRef(rawValue)?rawValue:new RefImpl(rawValue,shallow)}var RefImpl=class{constructor(value$1,isShallow2){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=isShallow2?value$1:toRaw(value$1),this._value=isShallow2?value$1:toReactive(value$1),this.__v_isShallow=isShallow2}get value(){return this.dep.track(),this._value}set value(newValue){let oldValue=this._rawValue,useDirectValue=this.__v_isShallow||isShallow(newValue)||isReadonly(newValue);newValue=useDirectValue?newValue:toRaw(newValue),hasChanged(newValue,oldValue)&&(this._rawValue=newValue,this._value=useDirectValue?newValue:toReactive(newValue),this.dep.trigger())}};function triggerRef(ref2){ref2.dep&&ref2.dep.trigger()}function unref(ref2){return isRef(ref2)?ref2.value:ref2}function toValue$1(source){return isFunction$1(source)?source():unref(source)}const shallowUnwrapHandlers={get:(target$1,key$2,receiver)=>key$2===`__v_raw`?target$1:unref(Reflect.get(target$1,key$2,receiver)),set:(target$1,key$2,value$1,receiver)=>{let oldValue=target$1[key$2];return isRef(oldValue)&&!isRef(value$1)?(oldValue.value=value$1,!0):Reflect.set(target$1,key$2,value$1,receiver)}};function proxyRefs(objectWithRefs){return isReactive(objectWithRefs)?objectWithRefs:new Proxy(objectWithRefs,shallowUnwrapHandlers)}var CustomRefImpl=class{constructor(factory){this.__v_isRef=!0,this._value=void 0;let dep=this.dep=new Dep,{get,set}=factory(dep.track.bind(dep),dep.trigger.bind(dep));this._get=get,this._set=set}get value(){return this._value=this._get()}set value(newVal){this._set(newVal)}};function customRef(factory){return new CustomRefImpl(factory)}function toRefs(object$1){let ret=isArray$5(object$1)?Array(object$1.length):{};for(let key$2 in object$1)ret[key$2]=propertyToRef(object$1,key$2);return ret}var ObjectRefImpl=class{constructor(_object,_key,_defaultValue){this._object=_object,this._key=_key,this._defaultValue=_defaultValue,this.__v_isRef=!0,this._value=void 0}get value(){let val=this._object[this._key];return this._value=val===void 0?this._defaultValue:val}set value(newVal){this._object[this._key]=newVal}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}},GetterRefImpl=class{constructor(_getter){this._getter=_getter,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function toRef(source,key$2,defaultValue){return isRef(source)?source:isFunction$1(source)?new GetterRefImpl(source):isObject$6(source)&&arguments.length>1?propertyToRef(source,key$2,defaultValue):ref(source)}function propertyToRef(source,key$2,defaultValue){let val=source[key$2];return isRef(val)?val:new ObjectRefImpl(source,key$2,defaultValue)}var ComputedRefImpl=class{constructor(fn$5,setter,isSSR){this.fn=fn$5,this.setter=setter,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!setter,this.isSSR=isSSR}notify(){if(this.flags|=16,!(this.flags&8)&&activeSub!==this)return batch(this,!0),!0}get value(){let link$1=this.dep.track();return refreshComputed(this),link$1&&(link$1.version=this.dep.version),this._value}set value(newValue){this.setter&&this.setter(newValue)}};function computed$1(getterOrOptions,debugOptions,isSSR=!1){let getter,setter;isFunction$1(getterOrOptions)?getter=getterOrOptions:(getter=getterOrOptions.get,setter=getterOrOptions.set);let cRef=new ComputedRefImpl(getter,setter,isSSR);return cRef}const TrackOpTypes={GET:`get`,HAS:`has`,ITERATE:`iterate`},TriggerOpTypes={SET:`set`,ADD:`add`,DELETE:`delete`,CLEAR:`clear`},ReactiveFlags={SKIP:`__v_skip`,IS_REACTIVE:`__v_isReactive`,IS_READONLY:`__v_isReadonly`,IS_SHALLOW:`__v_isShallow`,RAW:`__v_raw`,IS_REF:`__v_isRef`},WatchErrorCodes={WATCH_GETTER:2,2:`WATCH_GETTER`,WATCH_CALLBACK:3,3:`WATCH_CALLBACK`,WATCH_CLEANUP:4,4:`WATCH_CLEANUP`},INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function getCurrentWatcher(){return activeWatcher}function onWatcherCleanup(cleanupFn,failSilently=!1,owner=activeWatcher){if(owner){let cleanups=cleanupMap.get(owner);cleanups||cleanupMap.set(owner,cleanups=[]),cleanups.push(cleanupFn)}}function watch$1(source,cb$1,options$1=EMPTY_OBJ){let{immediate,deep,once,scheduler,augmentJob,call}=options$1,reactiveGetter=source2=>deep?source2:isShallow(source2)||deep===!1||deep===0?traverse(source2,1):traverse(source2),effect$1,getter,cleanup,boundCleanup,forceTrigger=!1,isMultiSource=!1;if(isRef(source)?(getter=()=>source.value,forceTrigger=isShallow(source)):isReactive(source)?(getter=()=>reactiveGetter(source),forceTrigger=!0):isArray$5(source)?(isMultiSource=!0,forceTrigger=source.some(s=>isReactive(s)||isShallow(s)),getter=()=>source.map(s=>{if(isRef(s))return s.value;if(isReactive(s))return reactiveGetter(s);if(isFunction$1(s))return call?call(s,2):s()})):getter=isFunction$1(source)?cb$1?call?()=>call(source,2):source:()=>{if(cleanup){pauseTracking();try{cleanup()}finally{resetTracking()}}let currentEffect=activeWatcher;activeWatcher=effect$1;try{return call?call(source,3,[boundCleanup]):source(boundCleanup)}finally{activeWatcher=currentEffect}}:NOOP,cb$1&&deep){let baseGetter=getter,depth=deep===!0?1/0:deep;getter=()=>traverse(baseGetter(),depth)}let scope$1=getCurrentScope(),watchHandle=()=>{effect$1.stop(),scope$1&&scope$1.active&&remove$2(scope$1.effects,effect$1)};if(once&&cb$1){let _cb=cb$1;cb$1=(...args)=>{_cb(...args),watchHandle()}}let oldValue=isMultiSource?Array(source.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE,job=immediateFirstRun=>{if(!(!(effect$1.flags&1)||!effect$1.dirty&&!immediateFirstRun))if(cb$1){let newValue=effect$1.run();if(deep||forceTrigger||(isMultiSource?newValue.some((v,i)=>hasChanged(v,oldValue[i])):hasChanged(newValue,oldValue))){cleanup&&cleanup();let currentWatcher=activeWatcher;activeWatcher=effect$1;try{let args=[newValue,oldValue===INITIAL_WATCHER_VALUE?void 0:isMultiSource&&oldValue[0]===INITIAL_WATCHER_VALUE?[]:oldValue,boundCleanup];oldValue=newValue,call?call(cb$1,3,args):cb$1(...args)}finally{activeWatcher=currentWatcher}}}else effect$1.run()};return augmentJob&&augmentJob(job),effect$1=new ReactiveEffect(getter),effect$1.scheduler=scheduler?()=>scheduler(job,!1):job,boundCleanup=fn$5=>onWatcherCleanup(fn$5,!1,effect$1),cleanup=effect$1.onStop=()=>{let cleanups=cleanupMap.get(effect$1);if(cleanups){if(call)call(cleanups,4);else for(let cleanup2 of cleanups)cleanup2();cleanupMap.delete(effect$1)}},cb$1?immediate?job(!0):oldValue=effect$1.run():scheduler?scheduler(job.bind(null,!0),!0):effect$1.run(),watchHandle.pause=effect$1.pause.bind(effect$1),watchHandle.resume=effect$1.resume.bind(effect$1),watchHandle.stop=watchHandle,watchHandle}function traverse(value$1,depth=1/0,seen$1){if(depth<=0||!isObject$6(value$1)||value$1.__v_skip||(seen$1||=new Set,seen$1.has(value$1)))return value$1;if(seen$1.add(value$1),depth--,isRef(value$1))traverse(value$1.value,depth,seen$1);else if(isArray$5(value$1))for(let i=0;i{traverse(v,depth,seen$1)});else if(isPlainObject$7(value$1)){for(let key$2 in value$1)traverse(value$1[key$2],depth,seen$1);for(let key$2 of Object.getOwnPropertySymbols(value$1))Object.prototype.propertyIsEnumerable.call(value$1,key$2)&&traverse(value$1[key$2],depth,seen$1)}return value$1}const stack=[];function pushWarningContext(vnode){stack.push(vnode)}function popWarningContext(){stack.pop()}function assertNumber(val,type){}const ErrorCodes={SETUP_FUNCTION:0,0:`SETUP_FUNCTION`,RENDER_FUNCTION:1,1:`RENDER_FUNCTION`,NATIVE_EVENT_HANDLER:5,5:`NATIVE_EVENT_HANDLER`,COMPONENT_EVENT_HANDLER:6,6:`COMPONENT_EVENT_HANDLER`,VNODE_HOOK:7,7:`VNODE_HOOK`,DIRECTIVE_HOOK:8,8:`DIRECTIVE_HOOK`,TRANSITION_HOOK:9,9:`TRANSITION_HOOK`,APP_ERROR_HANDLER:10,10:`APP_ERROR_HANDLER`,APP_WARN_HANDLER:11,11:`APP_WARN_HANDLER`,FUNCTION_REF:12,12:`FUNCTION_REF`,ASYNC_COMPONENT_LOADER:13,13:`ASYNC_COMPONENT_LOADER`,SCHEDULER:14,14:`SCHEDULER`,COMPONENT_UPDATE:15,15:`COMPONENT_UPDATE`,APP_UNMOUNT_CLEANUP:16,16:`APP_UNMOUNT_CLEANUP`},ErrorTypeStrings$1={sp:`serverPrefetch hook`,bc:`beforeCreate hook`,c:`created hook`,bm:`beforeMount hook`,m:`mounted hook`,bu:`beforeUpdate hook`,u:`updated`,bum:`beforeUnmount hook`,um:`unmounted hook`,a:`activated hook`,da:`deactivated hook`,ec:`errorCaptured hook`,rtc:`renderTracked hook`,rtg:`renderTriggered hook`,0:`setup function`,1:`render function`,2:`watcher getter`,3:`watcher callback`,4:`watcher cleanup function`,5:`native event handler`,6:`component event handler`,7:`vnode hook`,8:`directive hook`,9:`transition hook`,10:`app errorHandler`,11:`app warnHandler`,12:`ref function`,13:`async component loader`,14:`scheduler flush`,15:`component update`,16:`app unmount cleanup function`};function callWithErrorHandling(fn$5,instance,type,args){try{return args?fn$5(...args):fn$5()}catch(err){handleError(err,instance,type)}}function callWithAsyncErrorHandling(fn$5,instance,type,args){if(isFunction$1(fn$5)){let res=callWithErrorHandling(fn$5,instance,type,args);return res&&isPromise$1(res)&&res.catch(err=>{handleError(err,instance,type)}),res}if(isArray$5(fn$5)){let values=[];for(let i=0;i>>1,middleJob=queue[middle],middleJobId=getId(middleJob);middleJobId=getId(lastJob)?queue.push(job):queue.splice(findInsertionIndex$1(jobId),0,job),job.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||=resolvedPromise.then(flushJobs)}function queuePostFlushCb(cb$1){isArray$5(cb$1)?pendingPostFlushCbs.push(...cb$1):activePostFlushCbs&&cb$1.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,cb$1):cb$1.flags&1||(pendingPostFlushCbs.push(cb$1),cb$1.flags|=1),queueFlush()}function flushPreFlushCbs(instance,seen$1,i=flushIndex+1){for(;igetId(a$1)-getId(b$1));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...deduped);return}for(activePostFlushCbs=deduped,postFlushIndex=0;postFlushIndexjob.id==null?job.flags&2?-1:1/0:job.id;function flushJobs(seen$1){try{for(flushIndex=0;flushIndexdevtools$1.emit(event,...args)),buffer=[];else if(typeof window<`u`&&window.HTMLElement&&!(_b=(_a$2=window.navigator)?.userAgent)?.includes(`jsdom`)){let replay=target$1.__VUE_DEVTOOLS_HOOK_REPLAY__=target$1.__VUE_DEVTOOLS_HOOK_REPLAY__||[];replay.push(newHook=>{setDevtoolsHook$1(newHook,target$1)}),setTimeout(()=>{devtools$1||(target$1.__VUE_DEVTOOLS_HOOK_REPLAY__=null,devtoolsNotInstalled=!0,buffer=[])},3e3)}else devtoolsNotInstalled=!0,buffer=[]}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(instance){let prev=currentRenderingInstance;return currentRenderingInstance=instance,currentScopeId=instance&&instance.type.__scopeId||null,prev}function pushScopeId(id){currentScopeId=id}function popScopeId(){currentScopeId=null}const withScopeId=_id$4=>withCtx;function withCtx(fn$5,ctx=currentRenderingInstance,isNonScopedSlot){if(!ctx||fn$5._n)return fn$5;let renderFnWithContext=(...args)=>{renderFnWithContext._d&&setBlockTracking(-1);let prevInstance=setCurrentRenderingInstance(ctx),res;try{res=fn$5(...args)}finally{setCurrentRenderingInstance(prevInstance),renderFnWithContext._d&&setBlockTracking(1)}return res};return renderFnWithContext._n=!0,renderFnWithContext._c=!0,renderFnWithContext._d=!0,renderFnWithContext}function withDirectives(vnode,directives){if(currentRenderingInstance===null)return vnode;let instance=getComponentPublicInstance(currentRenderingInstance),bindings=vnode.dirs||=[];for(let i=0;itype.__isTeleport,isTeleportDisabled=props=>props&&(props.disabled||props.disabled===``),isTeleportDeferred=props=>props&&(props.defer||props.defer===``),isTargetSVG=target$1=>typeof SVGElement<`u`&&target$1 instanceof SVGElement,isTargetMathML=target$1=>typeof MathMLElement==`function`&&target$1 instanceof MathMLElement,resolveTarget=(props,select)=>{let targetSelector=props&&props.to;if(isString$2(targetSelector)){if(!select)return null;{let target$1=select(targetSelector);return target$1}}else return targetSelector},TeleportImpl={name:`Teleport`,__isTeleport:!0,process(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,internals){let{mc:mountChildren,pc:patchChildren,pbc:patchBlockChildren,o:{insert,querySelector,createText,createComment}}=internals,disabled=isTeleportDisabled(n2.props),{shapeFlag,children,dynamicChildren}=n2;if(n1==null){let placeholder=n2.el=createText(``),mainAnchor=n2.anchor=createText(``);insert(placeholder,container,anchor),insert(mainAnchor,container,anchor);let mount=(container2,anchor2)=>{shapeFlag&16&&(parentComponent&&parentComponent.isCE&&(parentComponent.ce._teleportTarget=container2),mountChildren(children,container2,anchor2,parentComponent,parentSuspense,namespace,slotScopeIds,optimized))},mountToTarget=()=>{let target$1=n2.target=resolveTarget(n2.props,querySelector),targetAnchor=prepareAnchor(target$1,n2,createText,insert);target$1&&(namespace!==`svg`&&isTargetSVG(target$1)?namespace=`svg`:namespace!==`mathml`&&isTargetMathML(target$1)&&(namespace=`mathml`),disabled||(mount(target$1,targetAnchor),updateCssVars(n2,!1)))};disabled&&(mount(container,mainAnchor),updateCssVars(n2,!0)),isTeleportDeferred(n2.props)?(n2.el.__isMounted=!1,queuePostRenderEffect(()=>{mountToTarget(),delete n2.el.__isMounted},parentSuspense)):mountToTarget()}else{if(isTeleportDeferred(n2.props)&&n1.el.__isMounted===!1){queuePostRenderEffect(()=>{TeleportImpl.process(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,internals)},parentSuspense);return}n2.el=n1.el,n2.targetStart=n1.targetStart;let mainAnchor=n2.anchor=n1.anchor,target$1=n2.target=n1.target,targetAnchor=n2.targetAnchor=n1.targetAnchor,wasDisabled=isTeleportDisabled(n1.props),currentContainer=wasDisabled?container:target$1,currentAnchor=wasDisabled?mainAnchor:targetAnchor;if(namespace===`svg`||isTargetSVG(target$1)?namespace=`svg`:(namespace===`mathml`||isTargetMathML(target$1))&&(namespace=`mathml`),dynamicChildren?(patchBlockChildren(n1.dynamicChildren,dynamicChildren,currentContainer,parentComponent,parentSuspense,namespace,slotScopeIds),traverseStaticChildren(n1,n2,!0)):optimized||patchChildren(n1,n2,currentContainer,currentAnchor,parentComponent,parentSuspense,namespace,slotScopeIds,!1),disabled)wasDisabled?n2.props&&n1.props&&n2.props.to!==n1.props.to&&(n2.props.to=n1.props.to):moveTeleport(n2,container,mainAnchor,internals,1);else if((n2.props&&n2.props.to)!==(n1.props&&n1.props.to)){let nextTarget=n2.target=resolveTarget(n2.props,querySelector);nextTarget&&moveTeleport(n2,nextTarget,null,internals,0)}else wasDisabled&&moveTeleport(n2,target$1,targetAnchor,internals,1);updateCssVars(n2,disabled)}},remove(vnode,parentComponent,parentSuspense,{um:unmount,o:{remove:hostRemove}},doRemove){let{shapeFlag,children,anchor,targetStart,targetAnchor,target:target$1,props}=vnode;if(target$1&&(hostRemove(targetStart),hostRemove(targetAnchor)),doRemove&&hostRemove(anchor),shapeFlag&16){let shouldRemove=doRemove||!isTeleportDisabled(props);for(let i=0;i{state.isMounted=!0}),onBeforeUnmount(()=>{state.isUnmounting=!0}),state}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},recursiveGetSubtree=instance=>{let subTree=instance.subTree;return subTree.component?recursiveGetSubtree(subTree.component):subTree},BaseTransitionImpl={name:`BaseTransition`,props:BaseTransitionPropsValidators,setup(props,{slots}){let instance=getCurrentInstance(),state=useTransitionState();return()=>{let children=slots.default&&getTransitionRawChildren(slots.default(),!0);if(!children||!children.length)return;let child=findNonCommentChild(children),rawProps=toRaw(props),{mode}=rawProps;if(state.isLeaving)return emptyPlaceholder(child);let innerChild=getInnerChild$1(child);if(!innerChild)return emptyPlaceholder(child);let enterHooks=resolveTransitionHooks(innerChild,rawProps,state,instance,hooks=>enterHooks=hooks);innerChild.type!==Comment&&setTransitionHooks(innerChild,enterHooks);let oldInnerChild=instance.subTree&&getInnerChild$1(instance.subTree);if(oldInnerChild&&oldInnerChild.type!==Comment&&!isSameVNodeType(innerChild,oldInnerChild)&&recursiveGetSubtree(instance).type!==Comment){let leavingHooks=resolveTransitionHooks(oldInnerChild,rawProps,state,instance);if(setTransitionHooks(oldInnerChild,leavingHooks),mode===`out-in`&&innerChild.type!==Comment)return state.isLeaving=!0,leavingHooks.afterLeave=()=>{state.isLeaving=!1,!(instance.job.flags&8)&&instance.update(),delete leavingHooks.afterLeave,oldInnerChild=void 0},emptyPlaceholder(child);mode===`in-out`&&innerChild.type!==Comment?leavingHooks.delayLeave=(el,earlyRemove,delayedLeave)=>{let leavingVNodesCache=getLeavingNodesForType(state,oldInnerChild);leavingVNodesCache[String(oldInnerChild.key)]=oldInnerChild,el[leaveCbKey]=()=>{earlyRemove(),el[leaveCbKey]=void 0,delete enterHooks.delayedLeave,oldInnerChild=void 0},enterHooks.delayedLeave=()=>{delayedLeave(),delete enterHooks.delayedLeave,oldInnerChild=void 0}}:oldInnerChild=void 0}else oldInnerChild&&=void 0;return child}}};function findNonCommentChild(children){let child=children[0];if(children.length>1){let hasFound=!1;for(let c$3 of children)if(c$3.type!==Comment){child=c$3,hasFound=!0;break}}return child}const BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(state,vnode){let{leavingVNodes}=state,leavingVNodesCache=leavingVNodes.get(vnode.type);return leavingVNodesCache||(leavingVNodesCache=Object.create(null),leavingVNodes.set(vnode.type,leavingVNodesCache)),leavingVNodesCache}function resolveTransitionHooks(vnode,props,state,instance,postClone){let{appear,mode,persisted=!1,onBeforeEnter,onEnter,onAfterEnter,onEnterCancelled,onBeforeLeave,onLeave,onAfterLeave,onLeaveCancelled,onBeforeAppear,onAppear,onAfterAppear,onAppearCancelled}=props,key$2=String(vnode.key),leavingVNodesCache=getLeavingNodesForType(state,vnode),callHook$2=(hook,args)=>{hook&&callWithAsyncErrorHandling(hook,instance,9,args)},callAsyncHook=(hook,args)=>{let done=args[1];callHook$2(hook,args),isArray$5(hook)?hook.every(hook2=>hook2.length<=1)&&done():hook.length<=1&&done()},hooks={mode,persisted,beforeEnter(el){let hook=onBeforeEnter;if(!state.isMounted)if(appear)hook=onBeforeAppear||onBeforeEnter;else return;el[leaveCbKey]&&el[leaveCbKey](!0);let leavingVNode=leavingVNodesCache[key$2];leavingVNode&&isSameVNodeType(vnode,leavingVNode)&&leavingVNode.el[leaveCbKey]&&leavingVNode.el[leaveCbKey](),callHook$2(hook,[el])},enter(el){let hook=onEnter,afterHook=onAfterEnter,cancelHook=onEnterCancelled;if(!state.isMounted)if(appear)hook=onAppear||onEnter,afterHook=onAfterAppear||onAfterEnter,cancelHook=onAppearCancelled||onEnterCancelled;else return;let called=!1,done=el[enterCbKey$1]=cancelled=>{called||(called=!0,callHook$2(cancelled?cancelHook:afterHook,[el]),hooks.delayedLeave&&hooks.delayedLeave(),el[enterCbKey$1]=void 0)};hook?callAsyncHook(hook,[el,done]):done()},leave(el,remove$3){let key2=String(vnode.key);if(el[enterCbKey$1]&&el[enterCbKey$1](!0),state.isUnmounting)return remove$3();callHook$2(onBeforeLeave,[el]);let called=!1,done=el[leaveCbKey]=cancelled=>{called||(called=!0,remove$3(),callHook$2(cancelled?onLeaveCancelled:onAfterLeave,[el]),el[leaveCbKey]=void 0,leavingVNodesCache[key2]===vnode&&delete leavingVNodesCache[key2])};leavingVNodesCache[key2]=vnode,onLeave?callAsyncHook(onLeave,[el,done]):done()},clone(vnode2){let hooks2=resolveTransitionHooks(vnode2,props,state,instance,postClone);return postClone&&postClone(hooks2),hooks2}};return hooks}function emptyPlaceholder(vnode){if(isKeepAlive(vnode))return vnode=cloneVNode(vnode),vnode.children=null,vnode}function getInnerChild$1(vnode){if(!isKeepAlive(vnode))return isTeleport(vnode.type)&&vnode.children?findNonCommentChild(vnode.children):vnode;if(vnode.component)return vnode.component.subTree;let{shapeFlag,children}=vnode;if(children){if(shapeFlag&16)return children[0];if(shapeFlag&32&&isFunction$1(children.default))return children.default()}}function setTransitionHooks(vnode,hooks){vnode.shapeFlag&6&&vnode.component?(vnode.transition=hooks,setTransitionHooks(vnode.component.subTree,hooks)):vnode.shapeFlag&128?(vnode.ssContent.transition=hooks.clone(vnode.ssContent),vnode.ssFallback.transition=hooks.clone(vnode.ssFallback)):vnode.transition=hooks}function getTransitionRawChildren(children,keepComment=!1,parentKey){let ret=[],keyedFragmentCount=0;for(let i=0;i1)for(let i=0;ival in map}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=key$2=>key$2.charCodeAt(0)===111&&key$2.charCodeAt(1)===110&&(key$2.charCodeAt(2)>122||key$2.charCodeAt(2)<97),isModelListener=key$2=>key$2.startsWith(`onUpdate:`),extend$2=Object.assign,remove$2=(arr,el)=>{let i=arr.indexOf(el);i>-1&&arr.splice(i,1)},hasOwnProperty$3=Object.prototype.hasOwnProperty,hasOwn$4=(val,key$2)=>hasOwnProperty$3.call(val,key$2),isArray$5=Array.isArray,isMap=val=>toTypeString$1(val)===`[object Map]`,isSet=val=>toTypeString$1(val)===`[object Set]`,isDate$1=val=>toTypeString$1(val)===`[object Date]`,isRegExp$1=val=>toTypeString$1(val)===`[object RegExp]`,isFunction$1=val=>typeof val==`function`,isString$2=val=>typeof val==`string`,isSymbol$1=val=>typeof val==`symbol`,isObject$6=val=>typeof val==`object`&&!!val,isPromise$1=val=>(isObject$6(val)||isFunction$1(val))&&isFunction$1(val.then)&&isFunction$1(val.catch),objectToString$1=Object.prototype.toString,toTypeString$1=value$1=>objectToString$1.call(value$1),toRawType=value$1=>toTypeString$1(value$1).slice(8,-1),isPlainObject$7=val=>toTypeString$1(val)===`[object Object]`,isIntegerKey=key$2=>isString$2(key$2)&&key$2!==`NaN`&&key$2[0]!==`-`&&``+parseInt(key$2,10)===key$2,isReservedProp=makeMap(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),isBuiltInDirective=makeMap(`bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo`),cacheStringFunction$2=fn$5=>{let cache$1=Object.create(null);return str=>{let hit=cache$1[str];return hit||(cache$1[str]=fn$5(str))}},camelizeRE$2=/-(\w)/g,camelize=cacheStringFunction$2(str=>str.replace(camelizeRE$2,(_$1,c$3)=>c$3?c$3.toUpperCase():``)),hyphenateRE$2=/\B([A-Z])/g,hyphenate$2=cacheStringFunction$2(str=>str.replace(hyphenateRE$2,`-$1`).toLowerCase()),capitalize$1=cacheStringFunction$2(str=>str.charAt(0).toUpperCase()+str.slice(1)),toHandlerKey=cacheStringFunction$2(str=>{let s=str?`on${capitalize$1(str)}`:``;return s}),hasChanged=(value$1,oldValue)=>!Object.is(value$1,oldValue),invokeArrayFns=(fns,...arg)=>{for(let i=0;i{Object.defineProperty(obj,key$2,{configurable:!0,enumerable:!1,writable,value:value$1})},looseToNumber=val=>{let n=parseFloat(val);return isNaN(n)?val:n},toNumber=val=>{let n=isString$2(val)?Number(val):NaN;return isNaN(n)?val:n};let _globalThis$1;const getGlobalThis$1=()=>_globalThis$1||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{},identRE=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/,PatchFlags={TEXT:1,1:`TEXT`,CLASS:2,2:`CLASS`,STYLE:4,4:`STYLE`,PROPS:8,8:`PROPS`,FULL_PROPS:16,16:`FULL_PROPS`,NEED_HYDRATION:32,32:`NEED_HYDRATION`,STABLE_FRAGMENT:64,64:`STABLE_FRAGMENT`,KEYED_FRAGMENT:128,128:`KEYED_FRAGMENT`,UNKEYED_FRAGMENT:256,256:`UNKEYED_FRAGMENT`,NEED_PATCH:512,512:`NEED_PATCH`,DYNAMIC_SLOTS:1024,1024:`DYNAMIC_SLOTS`,DEV_ROOT_FRAGMENT:2048,2048:`DEV_ROOT_FRAGMENT`,CACHED:-1,"-1":`CACHED`,BAIL:-2,"-2":`BAIL`},PatchFlagNames={1:`TEXT`,2:`CLASS`,4:`STYLE`,8:`PROPS`,16:`FULL_PROPS`,32:`NEED_HYDRATION`,64:`STABLE_FRAGMENT`,128:`KEYED_FRAGMENT`,256:`UNKEYED_FRAGMENT`,512:`NEED_PATCH`,1024:`DYNAMIC_SLOTS`,2048:`DEV_ROOT_FRAGMENT`,[-1]:`CACHED`,[-2]:`BAIL`},ShapeFlags={ELEMENT:1,1:`ELEMENT`,FUNCTIONAL_COMPONENT:2,2:`FUNCTIONAL_COMPONENT`,STATEFUL_COMPONENT:4,4:`STATEFUL_COMPONENT`,TEXT_CHILDREN:8,8:`TEXT_CHILDREN`,ARRAY_CHILDREN:16,16:`ARRAY_CHILDREN`,SLOTS_CHILDREN:32,32:`SLOTS_CHILDREN`,TELEPORT:64,64:`TELEPORT`,SUSPENSE:128,128:`SUSPENSE`,COMPONENT_SHOULD_KEEP_ALIVE:256,256:`COMPONENT_SHOULD_KEEP_ALIVE`,COMPONENT_KEPT_ALIVE:512,512:`COMPONENT_KEPT_ALIVE`,COMPONENT:6,6:`COMPONENT`},SlotFlags={STABLE:1,1:`STABLE`,DYNAMIC:2,2:`DYNAMIC`,FORWARDED:3,3:`FORWARDED`},slotFlagsText={1:`STABLE`,2:`DYNAMIC`,3:`FORWARDED`},GLOBALS_ALLOWED=`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`,isGloballyAllowed=makeMap(GLOBALS_ALLOWED),isGloballyWhitelisted=isGloballyAllowed,range=2;function normalizeStyle(value$1){if(isArray$5(value$1)){let res={};for(let i=0;i{if(item){let tmp$1=item.split(propertyDelimiterRE);tmp$1.length>1&&(ret[tmp$1[0].trim()]=tmp$1[1].trim())}}),ret}function normalizeClass(value$1){let res=``;if(isString$2(value$1))res=value$1;else if(isArray$5(value$1))for(let i=0;ilooseEqual(item,val))}const isRef$1=val=>!!(val&&val.__v_isRef===!0),toDisplayString=val=>isString$2(val)?val:val==null?``:isArray$5(val)||isObject$6(val)&&(val.toString===objectToString$1||!isFunction$1(val.toString))?isRef$1(val)?toDisplayString(val.value):JSON.stringify(val,replacer,2):String(val),replacer=(_key,val)=>isRef$1(val)?replacer(_key,val.value):isMap(val)?{[`Map(${val.size})`]:[...val.entries()].reduce((entries,[key$2,val2],i)=>(entries[stringifySymbol(key$2,i)+` =>`]=val2,entries),{})}:isSet(val)?{[`Set(${val.size})`]:[...val.values()].map(v=>stringifySymbol(v))}:isSymbol$1(val)?stringifySymbol(val):isObject$6(val)&&!isArray$5(val)&&!isPlainObject$7(val)?String(val):val,stringifySymbol=(v,i=``)=>{var _a$2;return isSymbol$1(v)?`Symbol(${(_a$2=v.description)??i})`:v};function normalizeCssVarValue(value$1){return value$1==null?`initial`:typeof value$1==`string`?value$1===``?` `:value$1:(typeof value$1!=`number`||Number.isFinite(value$1),String(value$1))}let activeEffectScope;var EffectScope=class{constructor(detached=!1){this.detached=detached,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!detached&&activeEffectScope&&(this.index=(activeEffectScope.scopes||=[]).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let i,l;if(this.scopes)for(i=0,l=this.scopes.length;i0&&--this._on===0&&(activeEffectScope=this.prevScope,this.prevScope=void 0)}stop(fromParent){if(this._active){this._active=!1;let i,l;for(i=0,l=this.effects.length;i0)return;if(batchedComputed){let e$4=batchedComputed;for(batchedComputed=void 0;e$4;){let next=e$4.next;e$4.next=void 0,e$4.flags&=-9,e$4=next}}let error;for(;batchedSub;){let e$4=batchedSub;for(batchedSub=void 0;e$4;){let next=e$4.next;if(e$4.next=void 0,e$4.flags&=-9,e$4.flags&1)try{e$4.trigger()}catch(err){error||=err}e$4=next}}if(error)throw error}function prepareDeps(sub){for(let link$1=sub.deps;link$1;link$1=link$1.nextDep)link$1.version=-1,link$1.prevActiveLink=link$1.dep.activeLink,link$1.dep.activeLink=link$1}function cleanupDeps(sub){let head$1,tail=sub.depsTail,link$1=tail;for(;link$1;){let prev=link$1.prevDep;link$1.version===-1?(link$1===tail&&(tail=prev),removeSub(link$1),removeDep(link$1)):head$1=link$1,link$1.dep.activeLink=link$1.prevActiveLink,link$1.prevActiveLink=void 0,link$1=prev}sub.deps=head$1,sub.depsTail=tail}function isDirty(sub){for(let link$1=sub.deps;link$1;link$1=link$1.nextDep)if(link$1.dep.version!==link$1.version||link$1.dep.computed&&(refreshComputed(link$1.dep.computed)||link$1.dep.version!==link$1.version))return!0;return!!sub._dirty}function refreshComputed(computed$2){if(computed$2.flags&4&&!(computed$2.flags&16)||(computed$2.flags&=-17,computed$2.globalVersion===globalVersion)||(computed$2.globalVersion=globalVersion,!computed$2.isSSR&&computed$2.flags&128&&(!computed$2.deps&&!computed$2._dirty||!isDirty(computed$2))))return;computed$2.flags|=2;let dep=computed$2.dep,prevSub=activeSub,prevShouldTrack=shouldTrack;activeSub=computed$2,shouldTrack=!0;try{prepareDeps(computed$2);let value$1=computed$2.fn(computed$2._value);(dep.version===0||hasChanged(value$1,computed$2._value))&&(computed$2.flags|=128,computed$2._value=value$1,dep.version++)}catch(err){throw dep.version++,err}finally{activeSub=prevSub,shouldTrack=prevShouldTrack,cleanupDeps(computed$2),computed$2.flags&=-3}}function removeSub(link$1,soft=!1){let{dep,prevSub,nextSub}=link$1;if(prevSub&&(prevSub.nextSub=nextSub,link$1.prevSub=void 0),nextSub&&(nextSub.prevSub=prevSub,link$1.nextSub=void 0),dep.subs===link$1&&(dep.subs=prevSub,!prevSub&&dep.computed)){dep.computed.flags&=-5;for(let l=dep.computed.deps;l;l=l.nextDep)removeSub(l,!0)}!soft&&!--dep.sc&&dep.map&&dep.map.delete(dep.key)}function removeDep(link$1){let{prevDep,nextDep}=link$1;prevDep&&(prevDep.nextDep=nextDep,link$1.prevDep=void 0),nextDep&&(nextDep.prevDep=prevDep,link$1.nextDep=void 0)}function effect(fn$5,options$1){fn$5.effect instanceof ReactiveEffect&&(fn$5=fn$5.effect.fn);let e$4=new ReactiveEffect(fn$5);options$1&&extend$2(e$4,options$1);try{e$4.run()}catch(err){throw e$4.stop(),err}let runner=e$4.run.bind(e$4);return runner.effect=e$4,runner}function stop(runner){runner.effect.stop()}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){let last=trackStack.pop();shouldTrack=last===void 0?!0:last}function cleanupEffect(e$4){let{cleanup}=e$4;if(e$4.cleanup=void 0,cleanup){let prevSub=activeSub;activeSub=void 0;try{cleanup()}finally{activeSub=prevSub}}}let globalVersion=0;var Link=class{constructor(sub,dep){this.sub=sub,this.dep=dep,this.version=dep.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Dep=class{constructor(computed$2){this.computed=computed$2,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(debugInfo){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let link$1=this.activeLink;if(link$1===void 0||link$1.sub!==activeSub)link$1=this.activeLink=new Link(activeSub,this),activeSub.deps?(link$1.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=link$1,activeSub.depsTail=link$1):activeSub.deps=activeSub.depsTail=link$1,addSub(link$1);else if(link$1.version===-1&&(link$1.version=this.version,link$1.nextDep)){let next=link$1.nextDep;next.prevDep=link$1.prevDep,link$1.prevDep&&(link$1.prevDep.nextDep=next),link$1.prevDep=activeSub.depsTail,link$1.nextDep=void 0,activeSub.depsTail.nextDep=link$1,activeSub.depsTail=link$1,activeSub.deps===link$1&&(activeSub.deps=next)}return link$1}trigger(debugInfo){this.version++,globalVersion++,this.notify(debugInfo)}notify(debugInfo){startBatch();try{for(let link$1=this.subs;link$1;link$1=link$1.prevSub)link$1.sub.notify()&&link$1.sub.dep.notify()}finally{endBatch()}}};function addSub(link$1){if(link$1.dep.sc++,link$1.sub.flags&4){let computed$2=link$1.dep.computed;if(computed$2&&!link$1.dep.subs){computed$2.flags|=20;for(let l=computed$2.deps;l;l=l.nextDep)addSub(l)}let currentTail=link$1.dep.subs;currentTail!==link$1&&(link$1.prevSub=currentTail,currentTail&&(currentTail.nextSub=link$1)),link$1.dep.subs=link$1}}const targetMap=new WeakMap,ITERATE_KEY=Symbol(``),MAP_KEY_ITERATE_KEY=Symbol(``),ARRAY_ITERATE_KEY=Symbol(``);function track(target$1,type,key$2){if(shouldTrack&&activeSub){let depsMap=targetMap.get(target$1);depsMap||targetMap.set(target$1,depsMap=new Map);let dep=depsMap.get(key$2);dep||(depsMap.set(key$2,dep=new Dep),dep.map=depsMap,dep.key=key$2),dep.track()}}function trigger(target$1,type,key$2,newValue,oldValue,oldTarget){let depsMap=targetMap.get(target$1);if(!depsMap){globalVersion++;return}let run=dep=>{dep&&dep.trigger()};if(startBatch(),type===`clear`)depsMap.forEach(run);else{let targetIsArray=isArray$5(target$1),isArrayIndex=targetIsArray&&isIntegerKey(key$2);if(targetIsArray&&key$2===`length`){let newLength=Number(newValue);depsMap.forEach((dep,key2)=>{(key2===`length`||key2===ARRAY_ITERATE_KEY||!isSymbol$1(key2)&&key2>=newLength)&&run(dep)})}else switch((key$2!==void 0||depsMap.has(void 0))&&run(depsMap.get(key$2)),isArrayIndex&&run(depsMap.get(ARRAY_ITERATE_KEY)),type){case`add`:targetIsArray?isArrayIndex&&run(depsMap.get(`length`)):(run(depsMap.get(ITERATE_KEY)),isMap(target$1)&&run(depsMap.get(MAP_KEY_ITERATE_KEY)));break;case`delete`:targetIsArray||(run(depsMap.get(ITERATE_KEY)),isMap(target$1)&&run(depsMap.get(MAP_KEY_ITERATE_KEY)));break;case`set`:isMap(target$1)&&run(depsMap.get(ITERATE_KEY));break}}endBatch()}function getDepFromReactive(object$1,key$2){let depMap=targetMap.get(object$1);return depMap&&depMap.get(key$2)}function reactiveReadArray(array$1){let raw$3=toRaw(array$1);return raw$3===array$1?raw$3:(track(raw$3,`iterate`,ARRAY_ITERATE_KEY),isShallow(array$1)?raw$3:raw$3.map(toReactive$1))}function shallowReadArray(arr){return track(arr=toRaw(arr),`iterate`,ARRAY_ITERATE_KEY),arr}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator(this,Symbol.iterator,toReactive$1)},concat(...args){return reactiveReadArray(this).concat(...args.map(x$1=>isArray$5(x$1)?reactiveReadArray(x$1):x$1))},entries(){return iterator(this,`entries`,value$1=>(value$1[1]=toReactive$1(value$1[1]),value$1))},every(fn$5,thisArg){return apply$1(this,`every`,fn$5,thisArg,void 0,arguments)},filter(fn$5,thisArg){return apply$1(this,`filter`,fn$5,thisArg,v=>v.map(toReactive$1),arguments)},find(fn$5,thisArg){return apply$1(this,`find`,fn$5,thisArg,toReactive$1,arguments)},findIndex(fn$5,thisArg){return apply$1(this,`findIndex`,fn$5,thisArg,void 0,arguments)},findLast(fn$5,thisArg){return apply$1(this,`findLast`,fn$5,thisArg,toReactive$1,arguments)},findLastIndex(fn$5,thisArg){return apply$1(this,`findLastIndex`,fn$5,thisArg,void 0,arguments)},forEach(fn$5,thisArg){return apply$1(this,`forEach`,fn$5,thisArg,void 0,arguments)},includes(...args){return searchProxy(this,`includes`,args)},indexOf(...args){return searchProxy(this,`indexOf`,args)},join(separator){return reactiveReadArray(this).join(separator)},lastIndexOf(...args){return searchProxy(this,`lastIndexOf`,args)},map(fn$5,thisArg){return apply$1(this,`map`,fn$5,thisArg,void 0,arguments)},pop(){return noTracking(this,`pop`)},push(...args){return noTracking(this,`push`,args)},reduce(fn$5,...args){return reduce(this,`reduce`,fn$5,args)},reduceRight(fn$5,...args){return reduce(this,`reduceRight`,fn$5,args)},shift(){return noTracking(this,`shift`)},some(fn$5,thisArg){return apply$1(this,`some`,fn$5,thisArg,void 0,arguments)},splice(...args){return noTracking(this,`splice`,args)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(comparer){return reactiveReadArray(this).toSorted(comparer)},toSpliced(...args){return reactiveReadArray(this).toSpliced(...args)},unshift(...args){return noTracking(this,`unshift`,args)},values(){return iterator(this,`values`,toReactive$1)}};function iterator(self$1,method,wrapValue){let arr=shallowReadArray(self$1),iter=arr[method]();return arr!==self$1&&!isShallow(self$1)&&(iter._next=iter.next,iter.next=()=>{let result=iter._next();return result.value&&=wrapValue(result.value),result}),iter}const arrayProto=Array.prototype;function apply$1(self$1,method,fn$5,thisArg,wrappedRetFn,args){let arr=shallowReadArray(self$1),needsWrap=arr!==self$1&&!isShallow(self$1),methodFn=arr[method];if(methodFn!==arrayProto[method]){let result2=methodFn.apply(self$1,args);return needsWrap?toReactive$1(result2):result2}let wrappedFn=fn$5;arr!==self$1&&(needsWrap?wrappedFn=function(item,index$1){return fn$5.call(this,toReactive$1(item),index$1,self$1)}:fn$5.length>2&&(wrappedFn=function(item,index$1){return fn$5.call(this,item,index$1,self$1)}));let result=methodFn.call(arr,wrappedFn,thisArg);return needsWrap&&wrappedRetFn?wrappedRetFn(result):result}function reduce(self$1,method,fn$5,args){let arr=shallowReadArray(self$1),wrappedFn=fn$5;return arr!==self$1&&(isShallow(self$1)?fn$5.length>3&&(wrappedFn=function(acc,item,index$1){return fn$5.call(this,acc,item,index$1,self$1)}):wrappedFn=function(acc,item,index$1){return fn$5.call(this,acc,toReactive$1(item),index$1,self$1)}),arr[method](wrappedFn,...args)}function searchProxy(self$1,method,args){let arr=toRaw(self$1);track(arr,`iterate`,ARRAY_ITERATE_KEY);let res=arr[method](...args);return(res===-1||res===!1)&&isProxy(args[0])?(args[0]=toRaw(args[0]),arr[method](...args)):res}function noTracking(self$1,method,args=[]){pauseTracking(),startBatch();let res=toRaw(self$1)[method].apply(self$1,args);return endBatch(),resetTracking(),res}const isNonTrackableKeys=makeMap(`__proto__,__v_isRef,__isVue`),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(key$2=>key$2!==`arguments`&&key$2!==`caller`).map(key$2=>Symbol[key$2]).filter(isSymbol$1));function hasOwnProperty$2(key$2){isSymbol$1(key$2)||(key$2=String(key$2));let obj=toRaw(this);return track(obj,`has`,key$2),obj.hasOwnProperty(key$2)}var BaseReactiveHandler=class{constructor(_isReadonly=!1,_isShallow=!1){this._isReadonly=_isReadonly,this._isShallow=_isShallow}get(target$1,key$2,receiver){if(key$2===`__v_skip`)return target$1.__v_skip;let isReadonly2=this._isReadonly,isShallow2=this._isShallow;if(key$2===`__v_isReactive`)return!isReadonly2;if(key$2===`__v_isReadonly`)return isReadonly2;if(key$2===`__v_isShallow`)return isShallow2;if(key$2===`__v_raw`)return receiver===(isReadonly2?isShallow2?shallowReadonlyMap:readonlyMap:isShallow2?shallowReactiveMap:reactiveMap).get(target$1)||Object.getPrototypeOf(target$1)===Object.getPrototypeOf(receiver)?target$1:void 0;let targetIsArray=isArray$5(target$1);if(!isReadonly2){let fn$5;if(targetIsArray&&(fn$5=arrayInstrumentations[key$2]))return fn$5;if(key$2===`hasOwnProperty`)return hasOwnProperty$2}let res=Reflect.get(target$1,key$2,isRef(target$1)?target$1:receiver);return(isSymbol$1(key$2)?builtInSymbols.has(key$2):isNonTrackableKeys(key$2))?res:(isReadonly2||track(target$1,`get`,key$2),isShallow2?res:isRef(res)?targetIsArray&&isIntegerKey(key$2)?res:res.value:isObject$6(res)?isReadonly2?readonly$1(res):reactive(res):res)}},MutableReactiveHandler=class extends BaseReactiveHandler{constructor(isShallow2=!1){super(!1,isShallow2)}set(target$1,key$2,value$1,receiver){let oldValue=target$1[key$2];if(!this._isShallow){let isOldValueReadonly=isReadonly(oldValue);if(!isShallow(value$1)&&!isReadonly(value$1)&&(oldValue=toRaw(oldValue),value$1=toRaw(value$1)),!isArray$5(target$1)&&isRef(oldValue)&&!isRef(value$1))return isOldValueReadonly?!1:(oldValue.value=value$1,!0)}let hadKey=isArray$5(target$1)&&isIntegerKey(key$2)?Number(key$2)value$1,getProto=v=>Reflect.getPrototypeOf(v);function createIterableMethod(method,isReadonly2,isShallow2){return function(...args){let target$1=this.__v_raw,rawTarget=toRaw(target$1),targetIsMap=isMap(rawTarget),isPair=method===`entries`||method===Symbol.iterator&&targetIsMap,isKeyOnly=method===`keys`&&targetIsMap,innerIterator=target$1[method](...args),wrap$3=isShallow2?toShallow:isReadonly2?toReadonly:toReactive$1;return!isReadonly2&&track(rawTarget,`iterate`,isKeyOnly?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){let{value:value$1,done}=innerIterator.next();return done?{value:value$1,done}:{value:isPair?[wrap$3(value$1[0]),wrap$3(value$1[1])]:wrap$3(value$1),done}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(type){return function(...args){return type===`delete`?!1:type===`clear`?void 0:this}}function createInstrumentations(readonly$2,shallow){let instrumentations={get(key$2){let target$1=this.__v_raw,rawTarget=toRaw(target$1),rawKey=toRaw(key$2);readonly$2||(hasChanged(key$2,rawKey)&&track(rawTarget,`get`,key$2),track(rawTarget,`get`,rawKey));let{has}=getProto(rawTarget),wrap$3=shallow?toShallow:readonly$2?toReadonly:toReactive$1;if(has.call(rawTarget,key$2))return wrap$3(target$1.get(key$2));if(has.call(rawTarget,rawKey))return wrap$3(target$1.get(rawKey));target$1!==rawTarget&&target$1.get(key$2)},get size(){let target$1=this.__v_raw;return!readonly$2&&track(toRaw(target$1),`iterate`,ITERATE_KEY),Reflect.get(target$1,`size`,target$1)},has(key$2){let target$1=this.__v_raw,rawTarget=toRaw(target$1),rawKey=toRaw(key$2);return readonly$2||(hasChanged(key$2,rawKey)&&track(rawTarget,`has`,key$2),track(rawTarget,`has`,rawKey)),key$2===rawKey?target$1.has(key$2):target$1.has(key$2)||target$1.has(rawKey)},forEach(callback,thisArg){let observed=this,target$1=observed.__v_raw,rawTarget=toRaw(target$1),wrap$3=shallow?toShallow:readonly$2?toReadonly:toReactive$1;return!readonly$2&&track(rawTarget,`iterate`,ITERATE_KEY),target$1.forEach((value$1,key$2)=>callback.call(thisArg,wrap$3(value$1),wrap$3(key$2),observed))}};extend$2(instrumentations,readonly$2?{add:createReadonlyMethod(`add`),set:createReadonlyMethod(`set`),delete:createReadonlyMethod(`delete`),clear:createReadonlyMethod(`clear`)}:{add(value$1){!shallow&&!isShallow(value$1)&&!isReadonly(value$1)&&(value$1=toRaw(value$1));let target$1=toRaw(this),proto=getProto(target$1),hadKey=proto.has.call(target$1,value$1);return hadKey||(target$1.add(value$1),trigger(target$1,`add`,value$1,value$1)),this},set(key$2,value$1){!shallow&&!isShallow(value$1)&&!isReadonly(value$1)&&(value$1=toRaw(value$1));let target$1=toRaw(this),{has,get}=getProto(target$1),hadKey=has.call(target$1,key$2);hadKey||(key$2=toRaw(key$2),hadKey=has.call(target$1,key$2));let oldValue=get.call(target$1,key$2);return target$1.set(key$2,value$1),hadKey?hasChanged(value$1,oldValue)&&trigger(target$1,`set`,key$2,value$1,oldValue):trigger(target$1,`add`,key$2,value$1),this},delete(key$2){let target$1=toRaw(this),{has,get}=getProto(target$1),hadKey=has.call(target$1,key$2);hadKey||(key$2=toRaw(key$2),hadKey=has.call(target$1,key$2));let oldValue=get?get.call(target$1,key$2):void 0,result=target$1.delete(key$2);return hadKey&&trigger(target$1,`delete`,key$2,void 0,oldValue),result},clear(){let target$1=toRaw(this),hadItems=target$1.size!==0,oldTarget,result=target$1.clear();return hadItems&&trigger(target$1,`clear`,void 0,void 0,oldTarget),result}});let iteratorMethods=[`keys`,`values`,`entries`,Symbol.iterator];return iteratorMethods.forEach(method=>{instrumentations[method]=createIterableMethod(method,readonly$2,shallow)}),instrumentations}function createInstrumentationGetter(isReadonly2,shallow){let instrumentations=createInstrumentations(isReadonly2,shallow);return(target$1,key$2,receiver)=>key$2===`__v_isReactive`?!isReadonly2:key$2===`__v_isReadonly`?isReadonly2:key$2===`__v_raw`?target$1:Reflect.get(hasOwn$4(instrumentations,key$2)&&key$2 in target$1?instrumentations:target$1,key$2,receiver)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(rawType){switch(rawType){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function getTargetType(value$1){return value$1.__v_skip||!Object.isExtensible(value$1)?0:targetTypeMap(toRawType(value$1))}function reactive(target$1){return isReadonly(target$1)?target$1:createReactiveObject(target$1,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(target$1){return createReactiveObject(target$1,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly$1(target$1){return createReactiveObject(target$1,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(target$1){return createReactiveObject(target$1,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(target$1,isReadonly2,baseHandlers,collectionHandlers,proxyMap){if(!isObject$6(target$1)||target$1.__v_raw&&!(isReadonly2&&target$1.__v_isReactive))return target$1;let targetType=getTargetType(target$1);if(targetType===0)return target$1;let existingProxy=proxyMap.get(target$1);if(existingProxy)return existingProxy;let proxy=new Proxy(target$1,targetType===2?collectionHandlers:baseHandlers);return proxyMap.set(target$1,proxy),proxy}function isReactive(value$1){return isReadonly(value$1)?isReactive(value$1.__v_raw):!!(value$1&&value$1.__v_isReactive)}function isReadonly(value$1){return!!(value$1&&value$1.__v_isReadonly)}function isShallow(value$1){return!!(value$1&&value$1.__v_isShallow)}function isProxy(value$1){return value$1?!!value$1.__v_raw:!1}function toRaw(observed){let raw$3=observed&&observed.__v_raw;return raw$3?toRaw(raw$3):observed}function markRaw(value$1){return!hasOwn$4(value$1,`__v_skip`)&&Object.isExtensible(value$1)&&def(value$1,`__v_skip`,!0),value$1}const toReactive$1=value$1=>isObject$6(value$1)?reactive(value$1):value$1,toReadonly=value$1=>isObject$6(value$1)?readonly$1(value$1):value$1;function isRef(r$1){return r$1?r$1.__v_isRef===!0:!1}function ref(value$1){return createRef$2(value$1,!1)}function shallowRef(value$1){return createRef$2(value$1,!0)}function createRef$2(rawValue,shallow){return isRef(rawValue)?rawValue:new RefImpl(rawValue,shallow)}var RefImpl=class{constructor(value$1,isShallow2){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=isShallow2?value$1:toRaw(value$1),this._value=isShallow2?value$1:toReactive$1(value$1),this.__v_isShallow=isShallow2}get value(){return this.dep.track(),this._value}set value(newValue){let oldValue=this._rawValue,useDirectValue=this.__v_isShallow||isShallow(newValue)||isReadonly(newValue);newValue=useDirectValue?newValue:toRaw(newValue),hasChanged(newValue,oldValue)&&(this._rawValue=newValue,this._value=useDirectValue?newValue:toReactive$1(newValue),this.dep.trigger())}};function triggerRef(ref2){ref2.dep&&ref2.dep.trigger()}function unref(ref2){return isRef(ref2)?ref2.value:ref2}function toValue$1(source){return isFunction$1(source)?source():unref(source)}const shallowUnwrapHandlers={get:(target$1,key$2,receiver)=>key$2===`__v_raw`?target$1:unref(Reflect.get(target$1,key$2,receiver)),set:(target$1,key$2,value$1,receiver)=>{let oldValue=target$1[key$2];return isRef(oldValue)&&!isRef(value$1)?(oldValue.value=value$1,!0):Reflect.set(target$1,key$2,value$1,receiver)}};function proxyRefs(objectWithRefs){return isReactive(objectWithRefs)?objectWithRefs:new Proxy(objectWithRefs,shallowUnwrapHandlers)}var CustomRefImpl=class{constructor(factory){this.__v_isRef=!0,this._value=void 0;let dep=this.dep=new Dep,{get,set}=factory(dep.track.bind(dep),dep.trigger.bind(dep));this._get=get,this._set=set}get value(){return this._value=this._get()}set value(newVal){this._set(newVal)}};function customRef(factory){return new CustomRefImpl(factory)}function toRefs(object$1){let ret=isArray$5(object$1)?Array(object$1.length):{};for(let key$2 in object$1)ret[key$2]=propertyToRef(object$1,key$2);return ret}var ObjectRefImpl=class{constructor(_object,_key,_defaultValue){this._object=_object,this._key=_key,this._defaultValue=_defaultValue,this.__v_isRef=!0,this._value=void 0}get value(){let val=this._object[this._key];return this._value=val===void 0?this._defaultValue:val}set value(newVal){this._object[this._key]=newVal}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}},GetterRefImpl=class{constructor(_getter){this._getter=_getter,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function toRef(source,key$2,defaultValue){return isRef(source)?source:isFunction$1(source)?new GetterRefImpl(source):isObject$6(source)&&arguments.length>1?propertyToRef(source,key$2,defaultValue):ref(source)}function propertyToRef(source,key$2,defaultValue){let val=source[key$2];return isRef(val)?val:new ObjectRefImpl(source,key$2,defaultValue)}var ComputedRefImpl=class{constructor(fn$5,setter,isSSR){this.fn=fn$5,this.setter=setter,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!setter,this.isSSR=isSSR}notify(){if(this.flags|=16,!(this.flags&8)&&activeSub!==this)return batch(this,!0),!0}get value(){let link$1=this.dep.track();return refreshComputed(this),link$1&&(link$1.version=this.dep.version),this._value}set value(newValue){this.setter&&this.setter(newValue)}};function computed$1(getterOrOptions,debugOptions,isSSR=!1){let getter,setter;isFunction$1(getterOrOptions)?getter=getterOrOptions:(getter=getterOrOptions.get,setter=getterOrOptions.set);let cRef=new ComputedRefImpl(getter,setter,isSSR);return cRef}const TrackOpTypes={GET:`get`,HAS:`has`,ITERATE:`iterate`},TriggerOpTypes={SET:`set`,ADD:`add`,DELETE:`delete`,CLEAR:`clear`},ReactiveFlags={SKIP:`__v_skip`,IS_REACTIVE:`__v_isReactive`,IS_READONLY:`__v_isReadonly`,IS_SHALLOW:`__v_isShallow`,RAW:`__v_raw`,IS_REF:`__v_isRef`},WatchErrorCodes={WATCH_GETTER:2,2:`WATCH_GETTER`,WATCH_CALLBACK:3,3:`WATCH_CALLBACK`,WATCH_CLEANUP:4,4:`WATCH_CLEANUP`},INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function getCurrentWatcher(){return activeWatcher}function onWatcherCleanup(cleanupFn,failSilently=!1,owner=activeWatcher){if(owner){let cleanups=cleanupMap.get(owner);cleanups||cleanupMap.set(owner,cleanups=[]),cleanups.push(cleanupFn)}}function watch$1(source,cb$1,options$1=EMPTY_OBJ){let{immediate,deep,once,scheduler,augmentJob,call}=options$1,reactiveGetter=source2=>deep?source2:isShallow(source2)||deep===!1||deep===0?traverse(source2,1):traverse(source2),effect$1,getter,cleanup,boundCleanup,forceTrigger=!1,isMultiSource=!1;if(isRef(source)?(getter=()=>source.value,forceTrigger=isShallow(source)):isReactive(source)?(getter=()=>reactiveGetter(source),forceTrigger=!0):isArray$5(source)?(isMultiSource=!0,forceTrigger=source.some(s=>isReactive(s)||isShallow(s)),getter=()=>source.map(s=>{if(isRef(s))return s.value;if(isReactive(s))return reactiveGetter(s);if(isFunction$1(s))return call?call(s,2):s()})):getter=isFunction$1(source)?cb$1?call?()=>call(source,2):source:()=>{if(cleanup){pauseTracking();try{cleanup()}finally{resetTracking()}}let currentEffect=activeWatcher;activeWatcher=effect$1;try{return call?call(source,3,[boundCleanup]):source(boundCleanup)}finally{activeWatcher=currentEffect}}:NOOP,cb$1&&deep){let baseGetter=getter,depth=deep===!0?1/0:deep;getter=()=>traverse(baseGetter(),depth)}let scope$1=getCurrentScope(),watchHandle=()=>{effect$1.stop(),scope$1&&scope$1.active&&remove$2(scope$1.effects,effect$1)};if(once&&cb$1){let _cb=cb$1;cb$1=(...args)=>{_cb(...args),watchHandle()}}let oldValue=isMultiSource?Array(source.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE,job=immediateFirstRun=>{if(!(!(effect$1.flags&1)||!effect$1.dirty&&!immediateFirstRun))if(cb$1){let newValue=effect$1.run();if(deep||forceTrigger||(isMultiSource?newValue.some((v,i)=>hasChanged(v,oldValue[i])):hasChanged(newValue,oldValue))){cleanup&&cleanup();let currentWatcher=activeWatcher;activeWatcher=effect$1;try{let args=[newValue,oldValue===INITIAL_WATCHER_VALUE?void 0:isMultiSource&&oldValue[0]===INITIAL_WATCHER_VALUE?[]:oldValue,boundCleanup];oldValue=newValue,call?call(cb$1,3,args):cb$1(...args)}finally{activeWatcher=currentWatcher}}}else effect$1.run()};return augmentJob&&augmentJob(job),effect$1=new ReactiveEffect(getter),effect$1.scheduler=scheduler?()=>scheduler(job,!1):job,boundCleanup=fn$5=>onWatcherCleanup(fn$5,!1,effect$1),cleanup=effect$1.onStop=()=>{let cleanups=cleanupMap.get(effect$1);if(cleanups){if(call)call(cleanups,4);else for(let cleanup2 of cleanups)cleanup2();cleanupMap.delete(effect$1)}},cb$1?immediate?job(!0):oldValue=effect$1.run():scheduler?scheduler(job.bind(null,!0),!0):effect$1.run(),watchHandle.pause=effect$1.pause.bind(effect$1),watchHandle.resume=effect$1.resume.bind(effect$1),watchHandle.stop=watchHandle,watchHandle}function traverse(value$1,depth=1/0,seen$1){if(depth<=0||!isObject$6(value$1)||value$1.__v_skip||(seen$1||=new Set,seen$1.has(value$1)))return value$1;if(seen$1.add(value$1),depth--,isRef(value$1))traverse(value$1.value,depth,seen$1);else if(isArray$5(value$1))for(let i=0;i{traverse(v,depth,seen$1)});else if(isPlainObject$7(value$1)){for(let key$2 in value$1)traverse(value$1[key$2],depth,seen$1);for(let key$2 of Object.getOwnPropertySymbols(value$1))Object.prototype.propertyIsEnumerable.call(value$1,key$2)&&traverse(value$1[key$2],depth,seen$1)}return value$1}const stack=[];function pushWarningContext(vnode){stack.push(vnode)}function popWarningContext(){stack.pop()}function assertNumber(val,type){}const ErrorCodes={SETUP_FUNCTION:0,0:`SETUP_FUNCTION`,RENDER_FUNCTION:1,1:`RENDER_FUNCTION`,NATIVE_EVENT_HANDLER:5,5:`NATIVE_EVENT_HANDLER`,COMPONENT_EVENT_HANDLER:6,6:`COMPONENT_EVENT_HANDLER`,VNODE_HOOK:7,7:`VNODE_HOOK`,DIRECTIVE_HOOK:8,8:`DIRECTIVE_HOOK`,TRANSITION_HOOK:9,9:`TRANSITION_HOOK`,APP_ERROR_HANDLER:10,10:`APP_ERROR_HANDLER`,APP_WARN_HANDLER:11,11:`APP_WARN_HANDLER`,FUNCTION_REF:12,12:`FUNCTION_REF`,ASYNC_COMPONENT_LOADER:13,13:`ASYNC_COMPONENT_LOADER`,SCHEDULER:14,14:`SCHEDULER`,COMPONENT_UPDATE:15,15:`COMPONENT_UPDATE`,APP_UNMOUNT_CLEANUP:16,16:`APP_UNMOUNT_CLEANUP`},ErrorTypeStrings$1={sp:`serverPrefetch hook`,bc:`beforeCreate hook`,c:`created hook`,bm:`beforeMount hook`,m:`mounted hook`,bu:`beforeUpdate hook`,u:`updated`,bum:`beforeUnmount hook`,um:`unmounted hook`,a:`activated hook`,da:`deactivated hook`,ec:`errorCaptured hook`,rtc:`renderTracked hook`,rtg:`renderTriggered hook`,0:`setup function`,1:`render function`,2:`watcher getter`,3:`watcher callback`,4:`watcher cleanup function`,5:`native event handler`,6:`component event handler`,7:`vnode hook`,8:`directive hook`,9:`transition hook`,10:`app errorHandler`,11:`app warnHandler`,12:`ref function`,13:`async component loader`,14:`scheduler flush`,15:`component update`,16:`app unmount cleanup function`};function callWithErrorHandling(fn$5,instance,type,args){try{return args?fn$5(...args):fn$5()}catch(err){handleError(err,instance,type)}}function callWithAsyncErrorHandling(fn$5,instance,type,args){if(isFunction$1(fn$5)){let res=callWithErrorHandling(fn$5,instance,type,args);return res&&isPromise$1(res)&&res.catch(err=>{handleError(err,instance,type)}),res}if(isArray$5(fn$5)){let values=[];for(let i=0;i>>1,middleJob=queue[middle],middleJobId=getId(middleJob);middleJobId=getId(lastJob)?queue.push(job):queue.splice(findInsertionIndex$1(jobId),0,job),job.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||=resolvedPromise.then(flushJobs)}function queuePostFlushCb(cb$1){isArray$5(cb$1)?pendingPostFlushCbs.push(...cb$1):activePostFlushCbs&&cb$1.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,cb$1):cb$1.flags&1||(pendingPostFlushCbs.push(cb$1),cb$1.flags|=1),queueFlush()}function flushPreFlushCbs(instance,seen$1,i=flushIndex+1){for(;igetId(a$1)-getId(b$1));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...deduped);return}for(activePostFlushCbs=deduped,postFlushIndex=0;postFlushIndexjob.id==null?job.flags&2?-1:1/0:job.id;function flushJobs(seen$1){try{for(flushIndex=0;flushIndexdevtools$1.emit(event,...args)),buffer=[];else if(typeof window<`u`&&window.HTMLElement&&!(_b=(_a$2=window.navigator)?.userAgent)?.includes(`jsdom`)){let replay=target$1.__VUE_DEVTOOLS_HOOK_REPLAY__=target$1.__VUE_DEVTOOLS_HOOK_REPLAY__||[];replay.push(newHook=>{setDevtoolsHook$1(newHook,target$1)}),setTimeout(()=>{devtools$1||(target$1.__VUE_DEVTOOLS_HOOK_REPLAY__=null,devtoolsNotInstalled=!0,buffer=[])},3e3)}else devtoolsNotInstalled=!0,buffer=[]}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(instance){let prev=currentRenderingInstance;return currentRenderingInstance=instance,currentScopeId=instance&&instance.type.__scopeId||null,prev}function pushScopeId(id){currentScopeId=id}function popScopeId(){currentScopeId=null}const withScopeId=_id$4=>withCtx;function withCtx(fn$5,ctx=currentRenderingInstance,isNonScopedSlot){if(!ctx||fn$5._n)return fn$5;let renderFnWithContext=(...args)=>{renderFnWithContext._d&&setBlockTracking(-1);let prevInstance=setCurrentRenderingInstance(ctx),res;try{res=fn$5(...args)}finally{setCurrentRenderingInstance(prevInstance),renderFnWithContext._d&&setBlockTracking(1)}return res};return renderFnWithContext._n=!0,renderFnWithContext._c=!0,renderFnWithContext._d=!0,renderFnWithContext}function withDirectives(vnode,directives){if(currentRenderingInstance===null)return vnode;let instance=getComponentPublicInstance(currentRenderingInstance),bindings=vnode.dirs||=[];for(let i=0;itype.__isTeleport,isTeleportDisabled=props=>props&&(props.disabled||props.disabled===``),isTeleportDeferred=props=>props&&(props.defer||props.defer===``),isTargetSVG=target$1=>typeof SVGElement<`u`&&target$1 instanceof SVGElement,isTargetMathML=target$1=>typeof MathMLElement==`function`&&target$1 instanceof MathMLElement,resolveTarget=(props,select)=>{let targetSelector=props&&props.to;if(isString$2(targetSelector)){if(!select)return null;{let target$1=select(targetSelector);return target$1}}else return targetSelector},TeleportImpl={name:`Teleport`,__isTeleport:!0,process(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,internals){let{mc:mountChildren,pc:patchChildren,pbc:patchBlockChildren,o:{insert,querySelector,createText,createComment}}=internals,disabled=isTeleportDisabled(n2.props),{shapeFlag,children,dynamicChildren}=n2;if(n1==null){let placeholder=n2.el=createText(``),mainAnchor=n2.anchor=createText(``);insert(placeholder,container,anchor),insert(mainAnchor,container,anchor);let mount=(container2,anchor2)=>{shapeFlag&16&&(parentComponent&&parentComponent.isCE&&(parentComponent.ce._teleportTarget=container2),mountChildren(children,container2,anchor2,parentComponent,parentSuspense,namespace,slotScopeIds,optimized))},mountToTarget=()=>{let target$1=n2.target=resolveTarget(n2.props,querySelector),targetAnchor=prepareAnchor(target$1,n2,createText,insert);target$1&&(namespace!==`svg`&&isTargetSVG(target$1)?namespace=`svg`:namespace!==`mathml`&&isTargetMathML(target$1)&&(namespace=`mathml`),disabled||(mount(target$1,targetAnchor),updateCssVars(n2,!1)))};disabled&&(mount(container,mainAnchor),updateCssVars(n2,!0)),isTeleportDeferred(n2.props)?(n2.el.__isMounted=!1,queuePostRenderEffect(()=>{mountToTarget(),delete n2.el.__isMounted},parentSuspense)):mountToTarget()}else{if(isTeleportDeferred(n2.props)&&n1.el.__isMounted===!1){queuePostRenderEffect(()=>{TeleportImpl.process(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,internals)},parentSuspense);return}n2.el=n1.el,n2.targetStart=n1.targetStart;let mainAnchor=n2.anchor=n1.anchor,target$1=n2.target=n1.target,targetAnchor=n2.targetAnchor=n1.targetAnchor,wasDisabled=isTeleportDisabled(n1.props),currentContainer=wasDisabled?container:target$1,currentAnchor=wasDisabled?mainAnchor:targetAnchor;if(namespace===`svg`||isTargetSVG(target$1)?namespace=`svg`:(namespace===`mathml`||isTargetMathML(target$1))&&(namespace=`mathml`),dynamicChildren?(patchBlockChildren(n1.dynamicChildren,dynamicChildren,currentContainer,parentComponent,parentSuspense,namespace,slotScopeIds),traverseStaticChildren(n1,n2,!0)):optimized||patchChildren(n1,n2,currentContainer,currentAnchor,parentComponent,parentSuspense,namespace,slotScopeIds,!1),disabled)wasDisabled?n2.props&&n1.props&&n2.props.to!==n1.props.to&&(n2.props.to=n1.props.to):moveTeleport(n2,container,mainAnchor,internals,1);else if((n2.props&&n2.props.to)!==(n1.props&&n1.props.to)){let nextTarget=n2.target=resolveTarget(n2.props,querySelector);nextTarget&&moveTeleport(n2,nextTarget,null,internals,0)}else wasDisabled&&moveTeleport(n2,target$1,targetAnchor,internals,1);updateCssVars(n2,disabled)}},remove(vnode,parentComponent,parentSuspense,{um:unmount,o:{remove:hostRemove}},doRemove){let{shapeFlag,children,anchor,targetStart,targetAnchor,target:target$1,props}=vnode;if(target$1&&(hostRemove(targetStart),hostRemove(targetAnchor)),doRemove&&hostRemove(anchor),shapeFlag&16){let shouldRemove=doRemove||!isTeleportDisabled(props);for(let i=0;i{state.isMounted=!0}),onBeforeUnmount(()=>{state.isUnmounting=!0}),state}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},recursiveGetSubtree=instance=>{let subTree=instance.subTree;return subTree.component?recursiveGetSubtree(subTree.component):subTree},BaseTransitionImpl={name:`BaseTransition`,props:BaseTransitionPropsValidators,setup(props,{slots}){let instance=getCurrentInstance(),state=useTransitionState();return()=>{let children=slots.default&&getTransitionRawChildren(slots.default(),!0);if(!children||!children.length)return;let child=findNonCommentChild(children),rawProps=toRaw(props),{mode}=rawProps;if(state.isLeaving)return emptyPlaceholder(child);let innerChild=getInnerChild$1(child);if(!innerChild)return emptyPlaceholder(child);let enterHooks=resolveTransitionHooks(innerChild,rawProps,state,instance,hooks=>enterHooks=hooks);innerChild.type!==Comment&&setTransitionHooks(innerChild,enterHooks);let oldInnerChild=instance.subTree&&getInnerChild$1(instance.subTree);if(oldInnerChild&&oldInnerChild.type!==Comment&&!isSameVNodeType(innerChild,oldInnerChild)&&recursiveGetSubtree(instance).type!==Comment){let leavingHooks=resolveTransitionHooks(oldInnerChild,rawProps,state,instance);if(setTransitionHooks(oldInnerChild,leavingHooks),mode===`out-in`&&innerChild.type!==Comment)return state.isLeaving=!0,leavingHooks.afterLeave=()=>{state.isLeaving=!1,!(instance.job.flags&8)&&instance.update(),delete leavingHooks.afterLeave,oldInnerChild=void 0},emptyPlaceholder(child);mode===`in-out`&&innerChild.type!==Comment?leavingHooks.delayLeave=(el,earlyRemove,delayedLeave)=>{let leavingVNodesCache=getLeavingNodesForType(state,oldInnerChild);leavingVNodesCache[String(oldInnerChild.key)]=oldInnerChild,el[leaveCbKey]=()=>{earlyRemove(),el[leaveCbKey]=void 0,delete enterHooks.delayedLeave,oldInnerChild=void 0},enterHooks.delayedLeave=()=>{delayedLeave(),delete enterHooks.delayedLeave,oldInnerChild=void 0}}:oldInnerChild=void 0}else oldInnerChild&&=void 0;return child}}};function findNonCommentChild(children){let child=children[0];if(children.length>1){let hasFound=!1;for(let c$3 of children)if(c$3.type!==Comment){child=c$3,hasFound=!0;break}}return child}const BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(state,vnode){let{leavingVNodes}=state,leavingVNodesCache=leavingVNodes.get(vnode.type);return leavingVNodesCache||(leavingVNodesCache=Object.create(null),leavingVNodes.set(vnode.type,leavingVNodesCache)),leavingVNodesCache}function resolveTransitionHooks(vnode,props,state,instance,postClone){let{appear,mode,persisted=!1,onBeforeEnter,onEnter,onAfterEnter,onEnterCancelled,onBeforeLeave,onLeave,onAfterLeave,onLeaveCancelled,onBeforeAppear,onAppear,onAfterAppear,onAppearCancelled}=props,key$2=String(vnode.key),leavingVNodesCache=getLeavingNodesForType(state,vnode),callHook$2=(hook,args)=>{hook&&callWithAsyncErrorHandling(hook,instance,9,args)},callAsyncHook=(hook,args)=>{let done=args[1];callHook$2(hook,args),isArray$5(hook)?hook.every(hook2=>hook2.length<=1)&&done():hook.length<=1&&done()},hooks={mode,persisted,beforeEnter(el){let hook=onBeforeEnter;if(!state.isMounted)if(appear)hook=onBeforeAppear||onBeforeEnter;else return;el[leaveCbKey]&&el[leaveCbKey](!0);let leavingVNode=leavingVNodesCache[key$2];leavingVNode&&isSameVNodeType(vnode,leavingVNode)&&leavingVNode.el[leaveCbKey]&&leavingVNode.el[leaveCbKey](),callHook$2(hook,[el])},enter(el){let hook=onEnter,afterHook=onAfterEnter,cancelHook=onEnterCancelled;if(!state.isMounted)if(appear)hook=onAppear||onEnter,afterHook=onAfterAppear||onAfterEnter,cancelHook=onAppearCancelled||onEnterCancelled;else return;let called=!1,done=el[enterCbKey$1]=cancelled=>{called||(called=!0,callHook$2(cancelled?cancelHook:afterHook,[el]),hooks.delayedLeave&&hooks.delayedLeave(),el[enterCbKey$1]=void 0)};hook?callAsyncHook(hook,[el,done]):done()},leave(el,remove$3){let key2=String(vnode.key);if(el[enterCbKey$1]&&el[enterCbKey$1](!0),state.isUnmounting)return remove$3();callHook$2(onBeforeLeave,[el]);let called=!1,done=el[leaveCbKey]=cancelled=>{called||(called=!0,remove$3(),callHook$2(cancelled?onLeaveCancelled:onAfterLeave,[el]),el[leaveCbKey]=void 0,leavingVNodesCache[key2]===vnode&&delete leavingVNodesCache[key2])};leavingVNodesCache[key2]=vnode,onLeave?callAsyncHook(onLeave,[el,done]):done()},clone(vnode2){let hooks2=resolveTransitionHooks(vnode2,props,state,instance,postClone);return postClone&&postClone(hooks2),hooks2}};return hooks}function emptyPlaceholder(vnode){if(isKeepAlive(vnode))return vnode=cloneVNode(vnode),vnode.children=null,vnode}function getInnerChild$1(vnode){if(!isKeepAlive(vnode))return isTeleport(vnode.type)&&vnode.children?findNonCommentChild(vnode.children):vnode;if(vnode.component)return vnode.component.subTree;let{shapeFlag,children}=vnode;if(children){if(shapeFlag&16)return children[0];if(shapeFlag&32&&isFunction$1(children.default))return children.default()}}function setTransitionHooks(vnode,hooks){vnode.shapeFlag&6&&vnode.component?(vnode.transition=hooks,setTransitionHooks(vnode.component.subTree,hooks)):vnode.shapeFlag&128?(vnode.ssContent.transition=hooks.clone(vnode.ssContent),vnode.ssFallback.transition=hooks.clone(vnode.ssFallback)):vnode.transition=hooks}function getTransitionRawChildren(children,keepComment=!1,parentKey){let ret=[],keyedFragmentCount=0;for(let i=0;i1)for(let i=0;iextend$2({name:options$1.name},extraOptions,{setup:options$1}))():options$1}function useId$1(){let i=getCurrentInstance();return i?(i.appContext.config.idPrefix||`v`)+`-`+i.ids[0]+ i.ids[1]++:``}function markAsyncBoundary(instance){instance.ids=[instance.ids[0]+ instance.ids[2]+++`-`,0,0]}function useTemplateRef(key$2){let i=getCurrentInstance(),r$1=shallowRef(null);if(i){let refs=i.refs===EMPTY_OBJ?i.refs={}:i.refs;Object.defineProperty(refs,key$2,{enumerable:!0,get:()=>r$1.value,set:val=>r$1.value=val})}let ret=r$1;return ret}function setRef(rawRef,oldRawRef,parentSuspense,vnode,isUnmount=!1){if(isArray$5(rawRef)){rawRef.forEach((r$1,i)=>setRef(r$1,oldRawRef&&(isArray$5(oldRawRef)?oldRawRef[i]:oldRawRef),parentSuspense,vnode,isUnmount));return}if(isAsyncWrapper(vnode)&&!isUnmount){vnode.shapeFlag&512&&vnode.type.__asyncResolved&&vnode.component.subTree.component&&setRef(rawRef,oldRawRef,parentSuspense,vnode.component.subTree);return}let refValue=vnode.shapeFlag&4?getComponentPublicInstance(vnode.component):vnode.el,value$1=isUnmount?null:refValue,{i:owner,r:ref$1}=rawRef,oldRef=oldRawRef&&oldRawRef.r,refs=owner.refs===EMPTY_OBJ?owner.refs={}:owner.refs,setupState=owner.setupState,rawSetupState=toRaw(setupState),canSetSetupRef=setupState===EMPTY_OBJ?()=>!1:key$2=>hasOwn$4(rawSetupState,key$2);if(oldRef!=null&&oldRef!==ref$1&&(isString$2(oldRef)?(refs[oldRef]=null,canSetSetupRef(oldRef)&&(setupState[oldRef]=null)):isRef(oldRef)&&(oldRef.value=null)),isFunction$1(ref$1))callWithErrorHandling(ref$1,owner,12,[value$1,refs]);else{let _isString=isString$2(ref$1),_isRef=isRef(ref$1);if(_isString||_isRef){let doSet=()=>{if(rawRef.f){let existing=_isString?canSetSetupRef(ref$1)?setupState[ref$1]:refs[ref$1]:ref$1.value;isUnmount?isArray$5(existing)&&remove$2(existing,refValue):isArray$5(existing)?existing.includes(refValue)||existing.push(refValue):_isString?(refs[ref$1]=[refValue],canSetSetupRef(ref$1)&&(setupState[ref$1]=refs[ref$1])):(ref$1.value=[refValue],rawRef.k&&(refs[rawRef.k]=ref$1.value))}else _isString?(refs[ref$1]=value$1,canSetSetupRef(ref$1)&&(setupState[ref$1]=value$1)):_isRef&&(ref$1.value=value$1,rawRef.k&&(refs[rawRef.k]=value$1))};value$1?(doSet.id=-1,queuePostRenderEffect(doSet,parentSuspense)):doSet()}}}let hasLoggedMismatchError=!1;const logMismatchError=()=>{hasLoggedMismatchError||(console.error(`Hydration completed but contains mismatches.`),hasLoggedMismatchError=!0)},isSVGContainer=container=>container.namespaceURI.includes(`svg`)&&container.tagName!==`foreignObject`,isMathMLContainer=container=>container.namespaceURI.includes(`MathML`),getContainerType=container=>container.nodeType===1?isSVGContainer(container)?`svg`:isMathMLContainer(container)?`mathml`:void 0:void 0,isComment=node$1=>node$1.nodeType===8;function createHydrationFunctions(rendererInternals){let{mt:mountComponent,p:patch$1,o:{patchProp:patchProp$1,createText,nextSibling,parentNode,remove:remove$3,insert,createComment}}=rendererInternals,hydrate$1=(vnode,container)=>{if(!container.hasChildNodes()){patch$1(null,vnode,container),flushPostFlushCbs(),container._vnode=vnode;return}hydrateNode(container.firstChild,vnode,null,null,null),flushPostFlushCbs(),container._vnode=vnode},hydrateNode=(node$1,vnode,parentComponent,parentSuspense,slotScopeIds,optimized=!1)=>{optimized||=!!vnode.dynamicChildren;let isFragmentStart=isComment(node$1)&&node$1.data===`[`,onMismatch=()=>handleMismatch(node$1,vnode,parentComponent,parentSuspense,slotScopeIds,isFragmentStart),{type,ref:ref$1,shapeFlag,patchFlag}=vnode,domType=node$1.nodeType;vnode.el=node$1,patchFlag===-2&&(optimized=!1,vnode.dynamicChildren=null);let nextNode=null;switch(type){case Text:domType===3?(node$1.data!==vnode.children&&(logMismatchError(),node$1.data=vnode.children),nextNode=nextSibling(node$1)):vnode.children===``?(insert(vnode.el=createText(``),parentNode(node$1),node$1),nextNode=node$1):nextNode=onMismatch();break;case Comment:isTemplateNode(node$1)?(nextNode=nextSibling(node$1),replaceNode(vnode.el=node$1.content.firstChild,node$1,parentComponent)):nextNode=domType!==8||isFragmentStart?onMismatch():nextSibling(node$1);break;case Static:if(isFragmentStart&&(node$1=nextSibling(node$1),domType=node$1.nodeType),domType===1||domType===3){nextNode=node$1;let needToAdoptContent=!vnode.children.length;for(let i=0;i{optimized||=!!vnode.dynamicChildren;let{type,props,patchFlag,shapeFlag,dirs,transition}=vnode,forcePatch=type===`input`||type===`option`;if(forcePatch||patchFlag!==-1){dirs&&invokeDirectiveHook(vnode,null,parentComponent,`created`);let needCallTransitionHooks=!1;if(isTemplateNode(el)){needCallTransitionHooks=needTransition(null,transition)&&parentComponent&&parentComponent.vnode.props&&parentComponent.vnode.props.appear;let content$2=el.content.firstChild;if(needCallTransitionHooks){let cls=content$2.getAttribute(`class`);cls&&(content$2.$cls=cls),transition.beforeEnter(content$2)}replaceNode(content$2,el,parentComponent),vnode.el=el=content$2}if(shapeFlag&16&&!(props&&(props.innerHTML||props.textContent))){let next=hydrateChildren(el.firstChild,vnode,el,parentComponent,parentSuspense,slotScopeIds,optimized);for(;next;){isMismatchAllowed(el,1)||logMismatchError();let cur=next;next=next.nextSibling,remove$3(cur)}}else if(shapeFlag&8){let clientText=vnode.children;clientText[0]===` `&&(el.tagName===`PRE`||el.tagName===`TEXTAREA`)&&(clientText=clientText.slice(1)),el.textContent!==clientText&&(isMismatchAllowed(el,0)||logMismatchError(),el.textContent=vnode.children)}if(props){if(forcePatch||!optimized||patchFlag&48){let isCustomElement=el.tagName.includes(`-`);for(let key$2 in props)(forcePatch&&(key$2.endsWith(`value`)||key$2===`indeterminate`)||isOn(key$2)&&!isReservedProp(key$2)||key$2[0]===`.`||isCustomElement)&&patchProp$1(el,key$2,null,props[key$2],void 0,parentComponent)}else if(props.onClick)patchProp$1(el,`onClick`,null,props.onClick,void 0,parentComponent);else if(patchFlag&4&&isReactive(props.style))for(let key$2 in props.style)props.style[key$2]}let vnodeHooks;(vnodeHooks=props&&props.onVnodeBeforeMount)&&invokeVNodeHook(vnodeHooks,parentComponent,vnode),dirs&&invokeDirectiveHook(vnode,null,parentComponent,`beforeMount`),((vnodeHooks=props&&props.onVnodeMounted)||dirs||needCallTransitionHooks)&&queueEffectWithSuspense(()=>{vnodeHooks&&invokeVNodeHook(vnodeHooks,parentComponent,vnode),needCallTransitionHooks&&transition.enter(el),dirs&&invokeDirectiveHook(vnode,null,parentComponent,`mounted`)},parentSuspense)}return el.nextSibling},hydrateChildren=(node$1,parentVNode,container,parentComponent,parentSuspense,slotScopeIds,optimized)=>{optimized||=!!parentVNode.dynamicChildren;let children=parentVNode.children,l=children.length;for(let i=0;i{let{slotScopeIds:fragmentSlotScopeIds}=vnode;fragmentSlotScopeIds&&(slotScopeIds=slotScopeIds?slotScopeIds.concat(fragmentSlotScopeIds):fragmentSlotScopeIds);let container=parentNode(node$1),next=hydrateChildren(nextSibling(node$1),vnode,container,parentComponent,parentSuspense,slotScopeIds,optimized);return next&&isComment(next)&&next.data===`]`?nextSibling(vnode.anchor=next):(logMismatchError(),insert(vnode.anchor=createComment(`]`),container,next),next)},handleMismatch=(node$1,vnode,parentComponent,parentSuspense,slotScopeIds,isFragment)=>{if(isMismatchAllowed(node$1.parentElement,1)||logMismatchError(),vnode.el=null,isFragment){let end=locateClosingAnchor(node$1);for(;;){let next2=nextSibling(node$1);if(next2&&next2!==end)remove$3(next2);else break}}let next=nextSibling(node$1),container=parentNode(node$1);return remove$3(node$1),patch$1(null,vnode,container,next,parentComponent,parentSuspense,getContainerType(container),slotScopeIds),parentComponent&&(parentComponent.vnode.el=vnode.el,updateHOCHostEl(parentComponent,vnode.el)),next},locateClosingAnchor=(node$1,open$1=`[`,close=`]`)=>{let match=0;for(;node$1;)if(node$1=nextSibling(node$1),node$1&&isComment(node$1)&&(node$1.data===open$1&&match++,node$1.data===close)){if(match===0)return nextSibling(node$1);match--}return node$1},replaceNode=(newNode,oldNode,parentComponent)=>{let parentNode2=oldNode.parentNode;parentNode2&&parentNode2.replaceChild(newNode,oldNode);let parent=parentComponent;for(;parent;)parent.vnode.el===oldNode&&(parent.vnode.el=parent.subTree.el=newNode),parent=parent.parent},isTemplateNode=node$1=>node$1.nodeType===1&&node$1.tagName===`TEMPLATE`;return[hydrate$1,hydrateNode]}const allowMismatchAttr=`data-allow-mismatch`,MismatchTypeString={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function isMismatchAllowed(el,allowedType){if(allowedType===0||allowedType===1)for(;el&&!el.hasAttribute(allowMismatchAttr);)el=el.parentElement;let allowedAttr=el&&el.getAttribute(allowMismatchAttr);if(allowedAttr==null)return!1;if(allowedAttr===``)return!0;{let list$2=allowedAttr.split(`,`);return allowedType===0&&list$2.includes(`children`)?!0:list$2.includes(MismatchTypeString[allowedType])}}const requestIdleCallback$1=getGlobalThis$1().requestIdleCallback||(cb$1=>setTimeout(cb$1,1)),cancelIdleCallback=getGlobalThis$1().cancelIdleCallback||(id=>clearTimeout(id)),hydrateOnIdle=(timeout=1e4)=>hydrate$1=>{let id=requestIdleCallback$1(hydrate$1,{timeout});return()=>cancelIdleCallback(id)};function elementIsVisibleInViewport(el){let{top,left,bottom,right}=el.getBoundingClientRect(),{innerHeight,innerWidth}=window;return(top>0&&top0&&bottom0&&left0&&right(hydrate$1,forEach$1)=>{let ob=new IntersectionObserver(entries=>{for(let e$4 of entries){if(!e$4.isIntersecting)continue;ob.disconnect(),hydrate$1();break}},opts);return forEach$1(el=>{if(el instanceof Element){if(elementIsVisibleInViewport(el))return hydrate$1(),ob.disconnect(),!1;ob.observe(el)}}),()=>ob.disconnect()},hydrateOnMediaQuery=query=>hydrate$1=>{if(query){let mql=matchMedia(query);if(mql.matches)hydrate$1();else return mql.addEventListener(`change`,hydrate$1,{once:!0}),()=>mql.removeEventListener(`change`,hydrate$1)}},hydrateOnInteraction=(interactions=[])=>(hydrate$1,forEach$1)=>{isString$2(interactions)&&(interactions=[interactions]);let hasHydrated=!1,doHydrate=e$4=>{hasHydrated||(hasHydrated=!0,teardown(),hydrate$1(),e$4.target.dispatchEvent(new e$4.constructor(e$4.type,e$4)))},teardown=()=>{forEach$1(el=>{for(let i of interactions)el.removeEventListener(i,doHydrate)})};return forEach$1(el=>{for(let i of interactions)el.addEventListener(i,doHydrate,{once:!0})}),teardown};function forEachElement(node$1,cb$1){if(isComment(node$1)&&node$1.data===`[`){let depth=1,next=node$1.nextSibling;for(;next;){if(next.nodeType===1){let result=cb$1(next);if(result===!1)break}else if(isComment(next))if(next.data===`]`){if(--depth===0)break}else next.data===`[`&&depth++;next=next.nextSibling}}else cb$1(node$1)}const isAsyncWrapper=i=>!!i.type.__asyncLoader; /*! #__NO_SIDE_EFFECTS__ */ -function defineAsyncComponent(source){isFunction$1(source)&&(source={loader:source});let{loader:loader$1,loadingComponent,errorComponent,delay=200,hydrate:hydrateStrategy,timeout,suspensible=!0,onError:userOnError}=source,pendingRequest=null,resolvedComp,retries=0,retry=()=>(retries++,pendingRequest=null,load()),load=()=>{let thisRequest;return pendingRequest||(thisRequest=pendingRequest=loader$1().catch(err=>{if(err=err instanceof Error?err:Error(String(err)),userOnError)return new Promise((resolve$1,reject)=>{let userRetry=()=>resolve$1(retry()),userFail=()=>reject(err);userOnError(err,userRetry,userFail,retries+1)});throw err}).then(comp=>thisRequest!==pendingRequest&&pendingRequest?pendingRequest:(comp&&(comp.__esModule||comp[Symbol.toStringTag]===`Module`)&&(comp=comp.default),resolvedComp=comp,comp)))};return defineComponent({name:`AsyncComponentWrapper`,__asyncLoader:load,__asyncHydrate(el,instance,hydrate$1){let patched=!1;(instance.bu||=[]).push(()=>patched=!0);let performHydrate=()=>{patched||hydrate$1()},doHydrate=hydrateStrategy?()=>{let teardown=hydrateStrategy(performHydrate,cb$1=>forEachElement(el,cb$1));teardown&&(instance.bum||=[]).push(teardown)}:performHydrate;resolvedComp?doHydrate():load().then(()=>!instance.isUnmounted&&doHydrate())},get __asyncResolved(){return resolvedComp},setup(){let instance=currentInstance;if(markAsyncBoundary(instance),resolvedComp)return()=>createInnerComp(resolvedComp,instance);let onError=err=>{pendingRequest=null,handleError(err,instance,13,!errorComponent)};if(suspensible&&instance.suspense||isInSSRComponentSetup)return load().then(comp=>()=>createInnerComp(comp,instance)).catch(err=>(onError(err),()=>errorComponent?createVNode(errorComponent,{error:err}):null));let loaded=ref(!1),error=ref(),delayed=ref(!!delay);return delay&&setTimeout(()=>{delayed.value=!1},delay),timeout!=null&&setTimeout(()=>{if(!loaded.value&&!error.value){let err=Error(`Async component timed out after ${timeout}ms.`);onError(err),error.value=err}},timeout),load().then(()=>{loaded.value=!0,instance.parent&&isKeepAlive(instance.parent.vnode)&&instance.parent.update()}).catch(err=>{onError(err),error.value=err}),()=>{if(loaded.value&&resolvedComp)return createInnerComp(resolvedComp,instance);if(error.value&&errorComponent)return createVNode(errorComponent,{error:error.value});if(loadingComponent&&!delayed.value)return createVNode(loadingComponent)}}})}function createInnerComp(comp,parent){let{ref:ref2,props,children,ce:ce$1}=parent.vnode,vnode=createVNode(comp,props,children);return vnode.ref=ref2,vnode.ce=ce$1,delete parent.vnode.ce,vnode}const isKeepAlive=vnode=>vnode.type.__isKeepAlive,KeepAliveImpl={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(props,{slots}){let instance=getCurrentInstance(),sharedContext=instance.ctx;if(!sharedContext.renderer)return()=>{let children=slots.default&&slots.default();return children&&children.length===1?children[0]:children};let cache$1=new Map,keys$3=new Set,current=null,parentSuspense=instance.suspense,{renderer:{p:patch$1,m:move,um:_unmount,o:{createElement}}}=sharedContext,storageContainer=createElement(`div`);sharedContext.activate=(vnode,container,anchor,namespace,optimized)=>{let instance2=vnode.component;move(vnode,container,anchor,0,parentSuspense),patch$1(instance2.vnode,vnode,container,anchor,instance2,parentSuspense,namespace,vnode.slotScopeIds,optimized),queuePostRenderEffect(()=>{instance2.isDeactivated=!1,instance2.a&&invokeArrayFns(instance2.a);let vnodeHook=vnode.props&&vnode.props.onVnodeMounted;vnodeHook&&invokeVNodeHook(vnodeHook,instance2.parent,vnode)},parentSuspense)},sharedContext.deactivate=vnode=>{let instance2=vnode.component;invalidateMount(instance2.m),invalidateMount(instance2.a),move(vnode,storageContainer,null,1,parentSuspense),queuePostRenderEffect(()=>{instance2.da&&invokeArrayFns(instance2.da);let vnodeHook=vnode.props&&vnode.props.onVnodeUnmounted;vnodeHook&&invokeVNodeHook(vnodeHook,instance2.parent,vnode),instance2.isDeactivated=!0},parentSuspense)};function unmount(vnode){resetShapeFlag(vnode),_unmount(vnode,instance,parentSuspense,!0)}function pruneCache(filter$1){cache$1.forEach((vnode,key$2)=>{let name$2=getComponentName(vnode.type);name$2&&!filter$1(name$2)&&pruneCacheEntry(key$2)})}function pruneCacheEntry(key$2){let cached$1=cache$1.get(key$2);cached$1&&(!current||!isSameVNodeType(cached$1,current))?unmount(cached$1):current&&resetShapeFlag(current),cache$1.delete(key$2),keys$3.delete(key$2)}watch(()=>[props.include,props.exclude],([include,exclude])=>{include&&pruneCache(name$2=>matches(include,name$2)),exclude&&pruneCache(name$2=>!matches(exclude,name$2))},{flush:`post`,deep:!0});let pendingCacheKey=null,cacheSubtree=()=>{pendingCacheKey!=null&&(isSuspense(instance.subTree.type)?queuePostRenderEffect(()=>{cache$1.set(pendingCacheKey,getInnerChild(instance.subTree))},instance.subTree.suspense):cache$1.set(pendingCacheKey,getInnerChild(instance.subTree)))};return onMounted(cacheSubtree),onUpdated(cacheSubtree),onBeforeUnmount(()=>{cache$1.forEach(cached$1=>{let{subTree,suspense}=instance,vnode=getInnerChild(subTree);if(cached$1.type===vnode.type&&cached$1.key===vnode.key){resetShapeFlag(vnode);let da=vnode.component.da;da&&queuePostRenderEffect(da,suspense);return}unmount(cached$1)})}),()=>{if(pendingCacheKey=null,!slots.default)return current=null;let children=slots.default(),rawVNode=children[0];if(children.length>1)return current=null,children;if(!isVNode(rawVNode)||!(rawVNode.shapeFlag&4)&&!(rawVNode.shapeFlag&128))return current=null,rawVNode;let vnode=getInnerChild(rawVNode);if(vnode.type===Comment)return current=null,vnode;let comp=vnode.type,name$2=getComponentName(isAsyncWrapper(vnode)?vnode.type.__asyncResolved||{}:comp),{include,exclude,max:max$1}=props;if(include&&(!name$2||!matches(include,name$2))||exclude&&name$2&&matches(exclude,name$2))return vnode.shapeFlag&=-257,current=vnode,rawVNode;let key$2=vnode.key==null?comp:vnode.key,cachedVNode=cache$1.get(key$2);return vnode.el&&(vnode=cloneVNode(vnode),rawVNode.shapeFlag&128&&(rawVNode.ssContent=vnode)),pendingCacheKey=key$2,cachedVNode?(vnode.el=cachedVNode.el,vnode.component=cachedVNode.component,vnode.transition&&setTransitionHooks(vnode,vnode.transition),vnode.shapeFlag|=512,keys$3.delete(key$2),keys$3.add(key$2)):(keys$3.add(key$2),max$1&&keys$3.size>parseInt(max$1,10)&&pruneCacheEntry(keys$3.values().next().value)),vnode.shapeFlag|=256,current=vnode,isSuspense(rawVNode.type)?rawVNode:vnode}}},KeepAlive=KeepAliveImpl;function matches(pattern,name$2){return isArray$5(pattern)?pattern.some(p$4=>matches(p$4,name$2)):isString$2(pattern)?pattern.split(`,`).includes(name$2):isRegExp$1(pattern)?(pattern.lastIndex=0,pattern.test(name$2)):!1}function onActivated(hook,target$1){registerKeepAliveHook(hook,`a`,target$1)}function onDeactivated(hook,target$1){registerKeepAliveHook(hook,`da`,target$1)}function registerKeepAliveHook(hook,type,target$1=currentInstance){let wrappedHook=hook.__wdc||=()=>{let current=target$1;for(;current;){if(current.isDeactivated)return;current=current.parent}return hook()};if(injectHook(type,wrappedHook,target$1),target$1){let current=target$1.parent;for(;current&¤t.parent;)isKeepAlive(current.parent.vnode)&&injectToKeepAliveRoot(wrappedHook,type,target$1,current),current=current.parent}}function injectToKeepAliveRoot(hook,type,target$1,keepAliveRoot){let injected=injectHook(type,hook,keepAliveRoot,!0);onUnmounted(()=>{remove$2(keepAliveRoot[type],injected)},target$1)}function resetShapeFlag(vnode){vnode.shapeFlag&=-257,vnode.shapeFlag&=-513}function getInnerChild(vnode){return vnode.shapeFlag&128?vnode.ssContent:vnode}function injectHook(type,hook,target$1=currentInstance,prepend=!1){if(target$1){let hooks=target$1[type]||(target$1[type]=[]),wrappedHook=hook.__weh||=(...args)=>{pauseTracking();let reset=setCurrentInstance(target$1),res=callWithAsyncErrorHandling(hook,target$1,type,args);return reset(),resetTracking(),res};return prepend?hooks.unshift(wrappedHook):hooks.push(wrappedHook),wrappedHook}}const createHook=lifecycle=>(hook,target$1=currentInstance)=>{(!isInSSRComponentSetup||lifecycle===`sp`)&&injectHook(lifecycle,(...args)=>hook(...args),target$1)},onBeforeMount=createHook(`bm`),onMounted=createHook(`m`),onBeforeUpdate=createHook(`bu`),onUpdated=createHook(`u`),onBeforeUnmount=createHook(`bum`),onUnmounted=createHook(`um`),onServerPrefetch=createHook(`sp`),onRenderTriggered=createHook(`rtg`),onRenderTracked=createHook(`rtc`);function onErrorCaptured(hook,target$1=currentInstance){injectHook(`ec`,hook,target$1)}const COMPONENTS=`components`,DIRECTIVES=`directives`;function resolveComponent(name$2,maybeSelfReference){return resolveAsset(COMPONENTS,name$2,!0,maybeSelfReference)||name$2}const NULL_DYNAMIC_COMPONENT=Symbol.for(`v-ndc`);function resolveDynamicComponent(component){return isString$2(component)?resolveAsset(COMPONENTS,component,!1)||component:component||NULL_DYNAMIC_COMPONENT}function resolveDirective(name$2){return resolveAsset(DIRECTIVES,name$2)}function resolveAsset(type,name$2,warnMissing=!0,maybeSelfReference=!1){let instance=currentRenderingInstance||currentInstance;if(instance){let Component=instance.type;if(type===COMPONENTS){let selfName=getComponentName(Component,!1);if(selfName&&(selfName===name$2||selfName===camelize(name$2)||selfName===capitalize$1(camelize(name$2))))return Component}let res=resolve(instance[type]||Component[type],name$2)||resolve(instance.appContext[type],name$2);return!res&&maybeSelfReference?Component:res}}function resolve(registry$1,name$2){return registry$1&&(registry$1[name$2]||registry$1[camelize(name$2)]||registry$1[capitalize$1(camelize(name$2))])}function renderList(source,renderItem,cache$1,index$1){let ret,cached$1=cache$1&&cache$1[index$1],sourceIsArray=isArray$5(source);if(sourceIsArray||isString$2(source)){let sourceIsReactiveArray=sourceIsArray&&isReactive(source),needsWrap=!1,isReadonlySource=!1;sourceIsReactiveArray&&(needsWrap=!isShallow(source),isReadonlySource=isReadonly(source),source=shallowReadArray(source)),ret=Array(source.length);for(let i=0,l=source.length;irenderItem(item,i,void 0,cached$1&&cached$1[i]));else{let keys$3=Object.keys(source);ret=Array(keys$3.length);for(let i=0,l=keys$3.length;i{let res=slot.fn(...args);return res&&(res.key=slot.key),res}:slot.fn)}return slots}function renderSlot(slots,name$2,props={},fallback,noSlotted){if(currentRenderingInstance.ce||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.ce)return name$2!==`default`&&(props.name=name$2),openBlock(),createBlock(Fragment,null,[createVNode(`slot`,props,fallback&&fallback())],64);let slot=slots[name$2];slot&&slot._c&&(slot._d=!1),openBlock();let validSlotContent=slot&&ensureValidVNode(slot(props)),slotKey=props.key||validSlotContent&&validSlotContent.key,rendered=createBlock(Fragment,{key:(slotKey&&!isSymbol$1(slotKey)?slotKey:`_${name$2}`)+(!validSlotContent&&fallback?`_fb`:``)},validSlotContent||(fallback?fallback():[]),validSlotContent&&slots._===1?64:-2);return!noSlotted&&rendered.scopeId&&(rendered.slotScopeIds=[rendered.scopeId+`-s`]),slot&&slot._c&&(slot._d=!0),rendered}function ensureValidVNode(vnodes){return vnodes.some(child=>isVNode(child)?!(child.type===Comment||child.type===Fragment&&!ensureValidVNode(child.children)):!0)?vnodes:null}function toHandlers(obj,preserveCaseIfNecessary){let ret={};for(let key$2 in obj)ret[preserveCaseIfNecessary&&/[A-Z]/.test(key$2)?`on:${key$2}`:toHandlerKey(key$2)]=obj[key$2];return ret}const getPublicInstance=i=>i?isStatefulComponent(i)?getComponentPublicInstance(i):getPublicInstance(i.parent):null,publicPropertiesMap=extend$2(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>getPublicInstance(i.parent),$root:i=>getPublicInstance(i.root),$host:i=>i.ce,$emit:i=>i.emit,$options:i=>resolveMergedOptions(i),$forceUpdate:i=>i.f||=()=>{queueJob(i.update)},$nextTick:i=>i.n||=nextTick.bind(i.proxy),$watch:i=>instanceWatch.bind(i)}),isReservedPrefix=key$2=>key$2===`_`||key$2===`$`,hasSetupBinding=(state,key$2)=>state!==EMPTY_OBJ&&!state.__isScriptSetup&&hasOwn$4(state,key$2),PublicInstanceProxyHandlers={get({_:instance},key$2){if(key$2===`__v_skip`)return!0;let{ctx,setupState,data:data$12,props,accessCache,type,appContext}=instance,normalizedProps;if(key$2[0]!==`$`){let n=accessCache[key$2];if(n!==void 0)switch(n){case 1:return setupState[key$2];case 2:return data$12[key$2];case 4:return ctx[key$2];case 3:return props[key$2]}else if(hasSetupBinding(setupState,key$2))return accessCache[key$2]=1,setupState[key$2];else if(data$12!==EMPTY_OBJ&&hasOwn$4(data$12,key$2))return accessCache[key$2]=2,data$12[key$2];else if((normalizedProps=instance.propsOptions[0])&&hasOwn$4(normalizedProps,key$2))return accessCache[key$2]=3,props[key$2];else if(ctx!==EMPTY_OBJ&&hasOwn$4(ctx,key$2))return accessCache[key$2]=4,ctx[key$2];else shouldCacheAccess&&(accessCache[key$2]=0)}let publicGetter=publicPropertiesMap[key$2],cssModule,globalProperties;if(publicGetter)return key$2===`$attrs`&&track(instance.attrs,`get`,``),publicGetter(instance);if((cssModule=type.__cssModules)&&(cssModule=cssModule[key$2]))return cssModule;if(ctx!==EMPTY_OBJ&&hasOwn$4(ctx,key$2))return accessCache[key$2]=4,ctx[key$2];if(globalProperties=appContext.config.globalProperties,hasOwn$4(globalProperties,key$2))return globalProperties[key$2]},set({_:instance},key$2,value$1){let{data:data$12,setupState,ctx}=instance;return hasSetupBinding(setupState,key$2)?(setupState[key$2]=value$1,!0):data$12!==EMPTY_OBJ&&hasOwn$4(data$12,key$2)?(data$12[key$2]=value$1,!0):hasOwn$4(instance.props,key$2)||key$2[0]===`$`&&key$2.slice(1)in instance?!1:(ctx[key$2]=value$1,!0)},has({_:{data:data$12,setupState,accessCache,ctx,appContext,propsOptions}},key$2){let normalizedProps;return!!accessCache[key$2]||data$12!==EMPTY_OBJ&&hasOwn$4(data$12,key$2)||hasSetupBinding(setupState,key$2)||(normalizedProps=propsOptions[0])&&hasOwn$4(normalizedProps,key$2)||hasOwn$4(ctx,key$2)||hasOwn$4(publicPropertiesMap,key$2)||hasOwn$4(appContext.config.globalProperties,key$2)},defineProperty(target$1,key$2,descriptor){return descriptor.get==null?hasOwn$4(descriptor,`value`)&&this.set(target$1,key$2,descriptor.value,null):target$1._.accessCache[key$2]=0,Reflect.defineProperty(target$1,key$2,descriptor)}},RuntimeCompiledPublicInstanceProxyHandlers=extend$2({},PublicInstanceProxyHandlers,{get(target$1,key$2){if(key$2!==Symbol.unscopables)return PublicInstanceProxyHandlers.get(target$1,key$2,target$1)},has(_$1,key$2){let has=key$2[0]!==`_`&&!isGloballyAllowed(key$2);return has}});function defineProps(){return null}function defineEmits(){return null}function defineExpose(exposed){}function defineOptions(options$1){}function defineSlots(){return null}function defineModel(){}function withDefaults(props,defaults$1){return null}function useSlots(){return getContext(`useSlots`).slots}function useAttrs(){return getContext(`useAttrs`).attrs}function getContext(calledFunctionName){let i=getCurrentInstance();return i.setupContext||=createSetupContext(i)}function normalizePropsOrEmits(props){return isArray$5(props)?props.reduce((normalized,p$4)=>(normalized[p$4]=null,normalized),{}):props}function mergeDefaults(raw$3,defaults$1){let props=normalizePropsOrEmits(raw$3);for(let key$2 in defaults$1){if(key$2.startsWith(`__skip`))continue;let opt=props[key$2];opt?isArray$5(opt)||isFunction$1(opt)?opt=props[key$2]={type:opt,default:defaults$1[key$2]}:opt.default=defaults$1[key$2]:opt===null&&(opt=props[key$2]={default:defaults$1[key$2]}),opt&&defaults$1[`__skip_${key$2}`]&&(opt.skipFactory=!0)}return props}function mergeModels(a$1,b$1){return!a$1||!b$1?a$1||b$1:isArray$5(a$1)&&isArray$5(b$1)?a$1.concat(b$1):extend$2({},normalizePropsOrEmits(a$1),normalizePropsOrEmits(b$1))}function createPropsRestProxy(props,excludedKeys){let ret={};for(let key$2 in props)excludedKeys.includes(key$2)||Object.defineProperty(ret,key$2,{enumerable:!0,get:()=>props[key$2]});return ret}function withAsyncContext(getAwaitable){let ctx=getCurrentInstance(),awaitable=getAwaitable();return unsetCurrentInstance(),isPromise$1(awaitable)&&(awaitable=awaitable.catch(e$4=>{throw setCurrentInstance(ctx),e$4})),[awaitable,()=>setCurrentInstance(ctx)]}let shouldCacheAccess=!0;function applyOptions(instance){let options$1=resolveMergedOptions(instance),publicThis=instance.proxy,ctx=instance.ctx;shouldCacheAccess=!1,options$1.beforeCreate&&callHook$1(options$1.beforeCreate,instance,`bc`);let{data:dataOptions,computed:computedOptions,methods,watch:watchOptions,provide:provideOptions,inject:injectOptions,created,beforeMount,mounted,beforeUpdate,updated,activated,deactivated,beforeDestroy,beforeUnmount,destroyed,unmounted,render:render$2,renderTracked,renderTriggered,errorCaptured,serverPrefetch,expose,inheritAttrs,components,directives,filters}=options$1,checkDuplicateProperties=null;if(injectOptions&&resolveInjections(injectOptions,ctx,checkDuplicateProperties),methods)for(let key$2 in methods){let methodHandler=methods[key$2];isFunction$1(methodHandler)&&(ctx[key$2]=methodHandler.bind(publicThis))}if(dataOptions){let data$12=dataOptions.call(publicThis,publicThis);isObject$6(data$12)&&(instance.data=reactive(data$12))}if(shouldCacheAccess=!0,computedOptions)for(let key$2 in computedOptions){let opt=computedOptions[key$2],get=isFunction$1(opt)?opt.bind(publicThis,publicThis):isFunction$1(opt.get)?opt.get.bind(publicThis,publicThis):NOOP,set=!isFunction$1(opt)&&isFunction$1(opt.set)?opt.set.bind(publicThis):NOOP,c$3=computed({get,set});Object.defineProperty(ctx,key$2,{enumerable:!0,configurable:!0,get:()=>c$3.value,set:v=>c$3.value=v})}if(watchOptions)for(let key$2 in watchOptions)createWatcher(watchOptions[key$2],ctx,publicThis,key$2);if(provideOptions){let provides=isFunction$1(provideOptions)?provideOptions.call(publicThis):provideOptions;Reflect.ownKeys(provides).forEach(key$2=>{provide(key$2,provides[key$2])})}created&&callHook$1(created,instance,`c`);function registerLifecycleHook(register,hook){isArray$5(hook)?hook.forEach(_hook=>register(_hook.bind(publicThis))):hook&®ister(hook.bind(publicThis))}if(registerLifecycleHook(onBeforeMount,beforeMount),registerLifecycleHook(onMounted,mounted),registerLifecycleHook(onBeforeUpdate,beforeUpdate),registerLifecycleHook(onUpdated,updated),registerLifecycleHook(onActivated,activated),registerLifecycleHook(onDeactivated,deactivated),registerLifecycleHook(onErrorCaptured,errorCaptured),registerLifecycleHook(onRenderTracked,renderTracked),registerLifecycleHook(onRenderTriggered,renderTriggered),registerLifecycleHook(onBeforeUnmount,beforeUnmount),registerLifecycleHook(onUnmounted,unmounted),registerLifecycleHook(onServerPrefetch,serverPrefetch),isArray$5(expose))if(expose.length){let exposed=instance.exposed||={};expose.forEach(key$2=>{Object.defineProperty(exposed,key$2,{get:()=>publicThis[key$2],set:val=>publicThis[key$2]=val,enumerable:!0})})}else instance.exposed||={};render$2&&instance.render===NOOP&&(instance.render=render$2),inheritAttrs!=null&&(instance.inheritAttrs=inheritAttrs),components&&(instance.components=components),directives&&(instance.directives=directives),serverPrefetch&&markAsyncBoundary(instance)}function resolveInjections(injectOptions,ctx,checkDuplicateProperties=NOOP){for(let key$2 in isArray$5(injectOptions)&&(injectOptions=normalizeInject(injectOptions)),injectOptions){let opt=injectOptions[key$2],injected;injected=isObject$6(opt)?`default`in opt?inject(opt.from||key$2,opt.default,!0):inject(opt.from||key$2):inject(opt),isRef(injected)?Object.defineProperty(ctx,key$2,{enumerable:!0,configurable:!0,get:()=>injected.value,set:v=>injected.value=v}):ctx[key$2]=injected}}function callHook$1(hook,instance,type){callWithAsyncErrorHandling(isArray$5(hook)?hook.map(h$1=>h$1.bind(instance.proxy)):hook.bind(instance.proxy),instance,type)}function createWatcher(raw$3,ctx,publicThis,key$2){let getter=key$2.includes(`.`)?createPathGetter(publicThis,key$2):()=>publicThis[key$2];if(isString$2(raw$3)){let handler=ctx[raw$3];isFunction$1(handler)&&watch(getter,handler)}else if(isFunction$1(raw$3))watch(getter,raw$3.bind(publicThis));else if(isObject$6(raw$3))if(isArray$5(raw$3))raw$3.forEach(r$1=>createWatcher(r$1,ctx,publicThis,key$2));else{let handler=isFunction$1(raw$3.handler)?raw$3.handler.bind(publicThis):ctx[raw$3.handler];isFunction$1(handler)&&watch(getter,handler,raw$3)}}function resolveMergedOptions(instance){let base=instance.type,{mixins,extends:extendsOptions}=base,{mixins:globalMixins,optionsCache:cache$1,config:{optionMergeStrategies}}=instance.appContext,cached$1=cache$1.get(base),resolved;return cached$1?resolved=cached$1:!globalMixins.length&&!mixins&&!extendsOptions?resolved=base:(resolved={},globalMixins.length&&globalMixins.forEach(m=>mergeOptions$1(resolved,m,optionMergeStrategies,!0)),mergeOptions$1(resolved,base,optionMergeStrategies)),isObject$6(base)&&cache$1.set(base,resolved),resolved}function mergeOptions$1(to$1,from,strats,asMixin=!1){let{mixins,extends:extendsOptions}=from;for(let key$2 in extendsOptions&&mergeOptions$1(to$1,extendsOptions,strats,!0),mixins&&mixins.forEach(m=>mergeOptions$1(to$1,m,strats,!0)),from)if(!(asMixin&&key$2===`expose`)){let strat=internalOptionMergeStrats[key$2]||strats&&strats[key$2];to$1[key$2]=strat?strat(to$1[key$2],from[key$2]):from[key$2]}return to$1}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(to$1,from){return from?to$1?function(){return extend$2(isFunction$1(to$1)?to$1.call(this,this):to$1,isFunction$1(from)?from.call(this,this):from)}:from:to$1}function mergeInject(to$1,from){return mergeObjectOptions(normalizeInject(to$1),normalizeInject(from))}function normalizeInject(raw$3){if(isArray$5(raw$3)){let res={};for(let i=0;i1)return treatDefaultAsFactory&&isFunction$1(defaultValue)?defaultValue.call(instance&&instance.proxy):defaultValue}}function hasInjectionContext(){return!!(getCurrentInstance()||currentApp)}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=obj=>Object.getPrototypeOf(obj)===internalObjectProto;function initProps(instance,rawProps,isStateful,isSSR=!1){let props={},attrs=createInternalObject();for(let key$2 in instance.propsDefaults=Object.create(null),setFullProps(instance,rawProps,props,attrs),instance.propsOptions[0])key$2 in props||(props[key$2]=void 0);isStateful?instance.props=isSSR?props:shallowReactive(props):instance.type.props?instance.props=props:instance.props=attrs,instance.attrs=attrs}function updateProps(instance,rawProps,rawPrevProps,optimized){let{props,attrs,vnode:{patchFlag}}=instance,rawCurrentProps=toRaw(props),[options$1]=instance.propsOptions,hasAttrsChanged=!1;if((optimized||patchFlag>0)&&!(patchFlag&16)){if(patchFlag&8){let propsToUpdate=instance.vnode.dynamicProps;for(let i=0;i{hasExtends=!0;let[props,keys$3]=normalizePropsOptions(raw2,appContext,!0);extend$2(normalized,props),keys$3&&needCastKeys.push(...keys$3)};!asMixin&&appContext.mixins.length&&appContext.mixins.forEach(extendProps),comp.extends&&extendProps(comp.extends),comp.mixins&&comp.mixins.forEach(extendProps)}if(!raw$3&&!hasExtends)return isObject$6(comp)&&cache$1.set(comp,EMPTY_ARR),EMPTY_ARR;if(isArray$5(raw$3))for(let i=0;ikey$2===`_`||key$2===`__`||key$2===`_ctx`||key$2===`$stable`,normalizeSlotValue=value$1=>isArray$5(value$1)?value$1.map(normalizeVNode):[normalizeVNode(value$1)],normalizeSlot$1=(key$2,rawSlot,ctx)=>{if(rawSlot._n)return rawSlot;let normalized=withCtx((...args)=>normalizeSlotValue(rawSlot(...args)),ctx);return normalized._c=!1,normalized},normalizeObjectSlots=(rawSlots,slots,instance)=>{let ctx=rawSlots._ctx;for(let key$2 in rawSlots){if(isInternalKey(key$2))continue;let value$1=rawSlots[key$2];if(isFunction$1(value$1))slots[key$2]=normalizeSlot$1(key$2,value$1,ctx);else if(value$1!=null){let normalized=normalizeSlotValue(value$1);slots[key$2]=()=>normalized}}},normalizeVNodeSlots=(instance,children)=>{let normalized=normalizeSlotValue(children);instance.slots.default=()=>normalized},assignSlots=(slots,children,optimized)=>{for(let key$2 in children)(optimized||!isInternalKey(key$2))&&(slots[key$2]=children[key$2])},initSlots=(instance,children,optimized)=>{let slots=instance.slots=createInternalObject();if(instance.vnode.shapeFlag&32){let cacheIndexes=children.__;cacheIndexes&&def(slots,`__`,cacheIndexes,!0);let type=children._;type?(assignSlots(slots,children,optimized),optimized&&def(slots,`_`,type,!0)):normalizeObjectSlots(children,slots)}else children&&normalizeVNodeSlots(instance,children)},updateSlots=(instance,children,optimized)=>{let{vnode,slots}=instance,needDeletionCheck=!0,deletionComparisonTarget=EMPTY_OBJ;if(vnode.shapeFlag&32){let type=children._;type?optimized&&type===1?needDeletionCheck=!1:assignSlots(slots,children,optimized):(needDeletionCheck=!children.$stable,normalizeObjectSlots(children,slots)),deletionComparisonTarget=children}else children&&(normalizeVNodeSlots(instance,children),deletionComparisonTarget={default:1});if(needDeletionCheck)for(let key$2 in slots)!isInternalKey(key$2)&&deletionComparisonTarget[key$2]==null&&delete slots[key$2]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(options$1){return baseCreateRenderer(options$1)}function createHydrationRenderer(options$1){return baseCreateRenderer(options$1,createHydrationFunctions)}function baseCreateRenderer(options$1,createHydrationFns){let target$1=getGlobalThis$1();target$1.__VUE__=!0;let{insert:hostInsert,remove:hostRemove,patchProp:hostPatchProp,createElement:hostCreateElement,createText:hostCreateText,createComment:hostCreateComment,setText:hostSetText,setElementText:hostSetElementText,parentNode:hostParentNode,nextSibling:hostNextSibling,setScopeId:hostSetScopeId=NOOP,insertStaticContent:hostInsertStaticContent}=options$1,patch$1=(n1,n2,container,anchor=null,parentComponent=null,parentSuspense=null,namespace=void 0,slotScopeIds=null,optimized=!!n2.dynamicChildren)=>{if(n1===n2)return;n1&&!isSameVNodeType(n1,n2)&&(anchor=getNextHostNode(n1),unmount(n1,parentComponent,parentSuspense,!0),n1=null),n2.patchFlag===-2&&(optimized=!1,n2.dynamicChildren=null);let{type,ref:ref$1,shapeFlag}=n2;switch(type){case Text:processText(n1,n2,container,anchor);break;case Comment:processCommentNode(n1,n2,container,anchor);break;case Static:n1??mountStaticNode(n2,container,anchor,namespace);break;case Fragment:processFragment(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);break;default:shapeFlag&1?processElement(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized):shapeFlag&6?processComponent(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized):(shapeFlag&64||shapeFlag&128)&&type.process(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,internals)}ref$1!=null&&parentComponent?setRef(ref$1,n1&&n1.ref,parentSuspense,n2||n1,!n2):ref$1==null&&n1&&n1.ref!=null&&setRef(n1.ref,null,parentSuspense,n1,!0)},processText=(n1,n2,container,anchor)=>{if(n1==null)hostInsert(n2.el=hostCreateText(n2.children),container,anchor);else{let el=n2.el=n1.el;n2.children!==n1.children&&hostSetText(el,n2.children)}},processCommentNode=(n1,n2,container,anchor)=>{n1==null?hostInsert(n2.el=hostCreateComment(n2.children||``),container,anchor):n2.el=n1.el},mountStaticNode=(n2,container,anchor,namespace)=>{[n2.el,n2.anchor]=hostInsertStaticContent(n2.children,container,anchor,namespace,n2.el,n2.anchor)},moveStaticNode=({el,anchor},container,nextSibling)=>{let next;for(;el&&el!==anchor;)next=hostNextSibling(el),hostInsert(el,container,nextSibling),el=next;hostInsert(anchor,container,nextSibling)},removeStaticNode=({el,anchor})=>{let next;for(;el&&el!==anchor;)next=hostNextSibling(el),hostRemove(el),el=next;hostRemove(anchor)},processElement=(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{n2.type===`svg`?namespace=`svg`:n2.type===`math`&&(namespace=`mathml`),n1==null?mountElement(n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized):patchElement(n1,n2,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)},mountElement=(vnode,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{let el,vnodeHook,{props,shapeFlag,transition,dirs}=vnode;if(el=vnode.el=hostCreateElement(vnode.type,namespace,props&&props.is,props),shapeFlag&8?hostSetElementText(el,vnode.children):shapeFlag&16&&mountChildren(vnode.children,el,null,parentComponent,parentSuspense,resolveChildrenNamespace(vnode,namespace),slotScopeIds,optimized),dirs&&invokeDirectiveHook(vnode,null,parentComponent,`created`),setScopeId(el,vnode,vnode.scopeId,slotScopeIds,parentComponent),props){for(let key$2 in props)key$2!==`value`&&!isReservedProp(key$2)&&hostPatchProp(el,key$2,null,props[key$2],namespace,parentComponent);`value`in props&&hostPatchProp(el,`value`,null,props.value,namespace),(vnodeHook=props.onVnodeBeforeMount)&&invokeVNodeHook(vnodeHook,parentComponent,vnode)}dirs&&invokeDirectiveHook(vnode,null,parentComponent,`beforeMount`);let needCallTransitionHooks=needTransition(parentSuspense,transition);needCallTransitionHooks&&transition.beforeEnter(el),hostInsert(el,container,anchor),((vnodeHook=props&&props.onVnodeMounted)||needCallTransitionHooks||dirs)&&queuePostRenderEffect(()=>{vnodeHook&&invokeVNodeHook(vnodeHook,parentComponent,vnode),needCallTransitionHooks&&transition.enter(el),dirs&&invokeDirectiveHook(vnode,null,parentComponent,`mounted`)},parentSuspense)},setScopeId=(el,vnode,scopeId,slotScopeIds,parentComponent)=>{if(scopeId&&hostSetScopeId(el,scopeId),slotScopeIds)for(let i=0;i{for(let i=start;i{let el=n2.el=n1.el,{patchFlag,dynamicChildren,dirs}=n2;patchFlag|=n1.patchFlag&16;let oldProps=n1.props||EMPTY_OBJ,newProps=n2.props||EMPTY_OBJ,vnodeHook;if(parentComponent&&toggleRecurse(parentComponent,!1),(vnodeHook=newProps.onVnodeBeforeUpdate)&&invokeVNodeHook(vnodeHook,parentComponent,n2,n1),dirs&&invokeDirectiveHook(n2,n1,parentComponent,`beforeUpdate`),parentComponent&&toggleRecurse(parentComponent,!0),(oldProps.innerHTML&&newProps.innerHTML==null||oldProps.textContent&&newProps.textContent==null)&&hostSetElementText(el,``),dynamicChildren?patchBlockChildren(n1.dynamicChildren,dynamicChildren,el,parentComponent,parentSuspense,resolveChildrenNamespace(n2,namespace),slotScopeIds):optimized||patchChildren(n1,n2,el,null,parentComponent,parentSuspense,resolveChildrenNamespace(n2,namespace),slotScopeIds,!1),patchFlag>0){if(patchFlag&16)patchProps(el,oldProps,newProps,parentComponent,namespace);else if(patchFlag&2&&oldProps.class!==newProps.class&&hostPatchProp(el,`class`,null,newProps.class,namespace),patchFlag&4&&hostPatchProp(el,`style`,oldProps.style,newProps.style,namespace),patchFlag&8){let propsToUpdate=n2.dynamicProps;for(let i=0;i{vnodeHook&&invokeVNodeHook(vnodeHook,parentComponent,n2,n1),dirs&&invokeDirectiveHook(n2,n1,parentComponent,`updated`)},parentSuspense)},patchBlockChildren=(oldChildren,newChildren,fallbackContainer,parentComponent,parentSuspense,namespace,slotScopeIds)=>{for(let i=0;i{if(oldProps!==newProps){if(oldProps!==EMPTY_OBJ)for(let key$2 in oldProps)!isReservedProp(key$2)&&!(key$2 in newProps)&&hostPatchProp(el,key$2,oldProps[key$2],null,namespace,parentComponent);for(let key$2 in newProps){if(isReservedProp(key$2))continue;let next=newProps[key$2],prev=oldProps[key$2];next!==prev&&key$2!==`value`&&hostPatchProp(el,key$2,prev,next,namespace,parentComponent)}`value`in newProps&&hostPatchProp(el,`value`,oldProps.value,newProps.value,namespace)}},processFragment=(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{let fragmentStartAnchor=n2.el=n1?n1.el:hostCreateText(``),fragmentEndAnchor=n2.anchor=n1?n1.anchor:hostCreateText(``),{patchFlag,dynamicChildren,slotScopeIds:fragmentSlotScopeIds}=n2;fragmentSlotScopeIds&&(slotScopeIds=slotScopeIds?slotScopeIds.concat(fragmentSlotScopeIds):fragmentSlotScopeIds),n1==null?(hostInsert(fragmentStartAnchor,container,anchor),hostInsert(fragmentEndAnchor,container,anchor),mountChildren(n2.children||[],container,fragmentEndAnchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)):patchFlag>0&&patchFlag&64&&dynamicChildren&&n1.dynamicChildren?(patchBlockChildren(n1.dynamicChildren,dynamicChildren,container,parentComponent,parentSuspense,namespace,slotScopeIds),(n2.key!=null||parentComponent&&n2===parentComponent.subTree)&&traverseStaticChildren(n1,n2,!0)):patchChildren(n1,n2,container,fragmentEndAnchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)},processComponent=(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{n2.slotScopeIds=slotScopeIds,n1==null?n2.shapeFlag&512?parentComponent.ctx.activate(n2,container,anchor,namespace,optimized):mountComponent(n2,container,anchor,parentComponent,parentSuspense,namespace,optimized):updateComponent(n1,n2,optimized)},mountComponent=(initialVNode,container,anchor,parentComponent,parentSuspense,namespace,optimized)=>{let instance=initialVNode.component=createComponentInstance(initialVNode,parentComponent,parentSuspense);if(isKeepAlive(initialVNode)&&(instance.ctx.renderer=internals),setupComponent(instance,!1,optimized),instance.asyncDep){if(parentSuspense&&parentSuspense.registerDep(instance,setupRenderEffect,optimized),!initialVNode.el){let placeholder=instance.subTree=createVNode(Comment);processCommentNode(null,placeholder,container,anchor),initialVNode.placeholder=placeholder.el}}else setupRenderEffect(instance,initialVNode,container,anchor,parentSuspense,namespace,optimized)},updateComponent=(n1,n2,optimized)=>{let instance=n2.component=n1.component;if(shouldUpdateComponent(n1,n2,optimized))if(instance.asyncDep&&!instance.asyncResolved){updateComponentPreRender(instance,n2,optimized);return}else instance.next=n2,instance.update();else n2.el=n1.el,instance.vnode=n2},setupRenderEffect=(instance,initialVNode,container,anchor,parentSuspense,namespace,optimized)=>{let componentUpdateFn=()=>{if(instance.isMounted){let{next,bu,u,parent,vnode}=instance;{let nonHydratedAsyncRoot=locateNonHydratedAsyncRoot(instance);if(nonHydratedAsyncRoot){next&&(next.el=vnode.el,updateComponentPreRender(instance,next,optimized)),nonHydratedAsyncRoot.asyncDep.then(()=>{instance.isUnmounted||componentUpdateFn()});return}}let originNext=next,vnodeHook;toggleRecurse(instance,!1),next?(next.el=vnode.el,updateComponentPreRender(instance,next,optimized)):next=vnode,bu&&invokeArrayFns(bu),(vnodeHook=next.props&&next.props.onVnodeBeforeUpdate)&&invokeVNodeHook(vnodeHook,parent,next,vnode),toggleRecurse(instance,!0);let nextTree=renderComponentRoot(instance),prevTree=instance.subTree;instance.subTree=nextTree,patch$1(prevTree,nextTree,hostParentNode(prevTree.el),getNextHostNode(prevTree),instance,parentSuspense,namespace),next.el=nextTree.el,originNext===null&&updateHOCHostEl(instance,nextTree.el),u&&queuePostRenderEffect(u,parentSuspense),(vnodeHook=next.props&&next.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(vnodeHook,parent,next,vnode),parentSuspense)}else{let vnodeHook,{el,props}=initialVNode,{bm,m,parent,root:root$3,type}=instance,isAsyncWrapperVNode=isAsyncWrapper(initialVNode);if(toggleRecurse(instance,!1),bm&&invokeArrayFns(bm),!isAsyncWrapperVNode&&(vnodeHook=props&&props.onVnodeBeforeMount)&&invokeVNodeHook(vnodeHook,parent,initialVNode),toggleRecurse(instance,!0),el&&hydrateNode){let hydrateSubTree=()=>{instance.subTree=renderComponentRoot(instance),hydrateNode(el,instance.subTree,instance,parentSuspense,null)};isAsyncWrapperVNode&&type.__asyncHydrate?type.__asyncHydrate(el,instance,hydrateSubTree):hydrateSubTree()}else{root$3.ce&&root$3.ce._def.shadowRoot!==!1&&root$3.ce._injectChildStyle(type);let subTree=instance.subTree=renderComponentRoot(instance);patch$1(null,subTree,container,anchor,instance,parentSuspense,namespace),initialVNode.el=subTree.el}if(m&&queuePostRenderEffect(m,parentSuspense),!isAsyncWrapperVNode&&(vnodeHook=props&&props.onVnodeMounted)){let scopedInitialVNode=initialVNode;queuePostRenderEffect(()=>invokeVNodeHook(vnodeHook,parent,scopedInitialVNode),parentSuspense)}(initialVNode.shapeFlag&256||parent&&isAsyncWrapper(parent.vnode)&&parent.vnode.shapeFlag&256)&&instance.a&&queuePostRenderEffect(instance.a,parentSuspense),instance.isMounted=!0,initialVNode=container=anchor=null}};instance.scope.on();let effect$1=instance.effect=new ReactiveEffect(componentUpdateFn);instance.scope.off();let update=instance.update=effect$1.run.bind(effect$1),job=instance.job=effect$1.runIfDirty.bind(effect$1);job.i=instance,job.id=instance.uid,effect$1.scheduler=()=>queueJob(job),toggleRecurse(instance,!0),update()},updateComponentPreRender=(instance,nextVNode,optimized)=>{nextVNode.component=instance;let prevProps=instance.vnode.props;instance.vnode=nextVNode,instance.next=null,updateProps(instance,nextVNode.props,prevProps,optimized),updateSlots(instance,nextVNode.children,optimized),pauseTracking(),flushPreFlushCbs(instance),resetTracking()},patchChildren=(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized=!1)=>{let c1=n1&&n1.children,prevShapeFlag=n1?n1.shapeFlag:0,c2=n2.children,{patchFlag,shapeFlag}=n2;if(patchFlag>0){if(patchFlag&128){patchKeyedChildren(c1,c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);return}else if(patchFlag&256){patchUnkeyedChildren(c1,c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);return}}shapeFlag&8?(prevShapeFlag&16&&unmountChildren(c1,parentComponent,parentSuspense),c2!==c1&&hostSetElementText(container,c2)):prevShapeFlag&16?shapeFlag&16?patchKeyedChildren(c1,c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized):unmountChildren(c1,parentComponent,parentSuspense,!0):(prevShapeFlag&8&&hostSetElementText(container,``),shapeFlag&16&&mountChildren(c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized))},patchUnkeyedChildren=(c1,c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{c1||=EMPTY_ARR,c2||=EMPTY_ARR;let oldLength=c1.length,newLength=c2.length,commonLength=Math.min(oldLength,newLength),i;for(i=0;inewLength?unmountChildren(c1,parentComponent,parentSuspense,!0,!1,commonLength):mountChildren(c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,commonLength)},patchKeyedChildren=(c1,c2,container,parentAnchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{let i=0,l2=c2.length,e1=c1.length-1,e2=l2-1;for(;i<=e1&&i<=e2;){let n1=c1[i],n2=c2[i]=optimized?cloneIfMounted(c2[i]):normalizeVNode(c2[i]);if(isSameVNodeType(n1,n2))patch$1(n1,n2,container,null,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);else break;i++}for(;i<=e1&&i<=e2;){let n1=c1[e1],n2=c2[e2]=optimized?cloneIfMounted(c2[e2]):normalizeVNode(c2[e2]);if(isSameVNodeType(n1,n2))patch$1(n1,n2,container,null,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);else break;e1--,e2--}if(i>e1){if(i<=e2){let nextPos=e2+1,anchor=nextPose2)for(;i<=e1;)unmount(c1[i],parentComponent,parentSuspense,!0),i++;else{let s1=i,s2=i,keyToNewIndexMap=new Map;for(i=s2;i<=e2;i++){let nextChild=c2[i]=optimized?cloneIfMounted(c2[i]):normalizeVNode(c2[i]);nextChild.key!=null&&keyToNewIndexMap.set(nextChild.key,i)}let j$1,patched=0,toBePatched=e2-s2+1,moved=!1,maxNewIndexSoFar=0,newIndexToOldIndexMap=Array(toBePatched);for(i=0;i=toBePatched){unmount(prevChild,parentComponent,parentSuspense,!0);continue}let newIndex;if(prevChild.key!=null)newIndex=keyToNewIndexMap.get(prevChild.key);else for(j$1=s2;j$1<=e2;j$1++)if(newIndexToOldIndexMap[j$1-s2]===0&&isSameVNodeType(prevChild,c2[j$1])){newIndex=j$1;break}newIndex===void 0?unmount(prevChild,parentComponent,parentSuspense,!0):(newIndexToOldIndexMap[newIndex-s2]=i+1,newIndex>=maxNewIndexSoFar?maxNewIndexSoFar=newIndex:moved=!0,patch$1(prevChild,c2[newIndex],container,null,parentComponent,parentSuspense,namespace,slotScopeIds,optimized),patched++)}let increasingNewIndexSequence=moved?getSequence(newIndexToOldIndexMap):EMPTY_ARR;for(j$1=increasingNewIndexSequence.length-1,i=toBePatched-1;i>=0;i--){let nextIndex=s2+i,nextChild=c2[nextIndex],anchorVNode=c2[nextIndex+1],anchor=nextIndex+1{let{el,type,transition,children,shapeFlag}=vnode;if(shapeFlag&6){move(vnode.component.subTree,container,anchor,moveType);return}if(shapeFlag&128){vnode.suspense.move(container,anchor,moveType);return}if(shapeFlag&64){type.move(vnode,container,anchor,internals);return}if(type===Fragment){hostInsert(el,container,anchor);for(let i=0;itransition.enter(el),parentSuspense);else{let{leave,delayLeave,afterLeave}=transition,remove2=()=>{vnode.ctx.isUnmounted?hostRemove(el):hostInsert(el,container,anchor)},performLeave=()=>{leave(el,()=>{remove2(),afterLeave&&afterLeave()})};delayLeave?delayLeave(el,remove2,performLeave):performLeave()}else hostInsert(el,container,anchor)},unmount=(vnode,parentComponent,parentSuspense,doRemove=!1,optimized=!1)=>{let{type,props,ref:ref$1,children,dynamicChildren,shapeFlag,patchFlag,dirs,cacheIndex}=vnode;if(patchFlag===-2&&(optimized=!1),ref$1!=null&&(pauseTracking(),setRef(ref$1,null,parentSuspense,vnode,!0),resetTracking()),cacheIndex!=null&&(parentComponent.renderCache[cacheIndex]=void 0),shapeFlag&256){parentComponent.ctx.deactivate(vnode);return}let shouldInvokeDirs=shapeFlag&1&&dirs,shouldInvokeVnodeHook=!isAsyncWrapper(vnode),vnodeHook;if(shouldInvokeVnodeHook&&(vnodeHook=props&&props.onVnodeBeforeUnmount)&&invokeVNodeHook(vnodeHook,parentComponent,vnode),shapeFlag&6)unmountComponent(vnode.component,parentSuspense,doRemove);else{if(shapeFlag&128){vnode.suspense.unmount(parentSuspense,doRemove);return}shouldInvokeDirs&&invokeDirectiveHook(vnode,null,parentComponent,`beforeUnmount`),shapeFlag&64?vnode.type.remove(vnode,parentComponent,parentSuspense,internals,doRemove):dynamicChildren&&!dynamicChildren.hasOnce&&(type!==Fragment||patchFlag>0&&patchFlag&64)?unmountChildren(dynamicChildren,parentComponent,parentSuspense,!1,!0):(type===Fragment&&patchFlag&384||!optimized&&shapeFlag&16)&&unmountChildren(children,parentComponent,parentSuspense),doRemove&&remove$3(vnode)}(shouldInvokeVnodeHook&&(vnodeHook=props&&props.onVnodeUnmounted)||shouldInvokeDirs)&&queuePostRenderEffect(()=>{vnodeHook&&invokeVNodeHook(vnodeHook,parentComponent,vnode),shouldInvokeDirs&&invokeDirectiveHook(vnode,null,parentComponent,`unmounted`)},parentSuspense)},remove$3=vnode=>{let{type,el,anchor,transition}=vnode;if(type===Fragment){removeFragment(el,anchor);return}if(type===Static){removeStaticNode(vnode);return}let performRemove=()=>{hostRemove(el),transition&&!transition.persisted&&transition.afterLeave&&transition.afterLeave()};if(vnode.shapeFlag&1&&transition&&!transition.persisted){let{leave,delayLeave}=transition,performLeave=()=>leave(el,performRemove);delayLeave?delayLeave(vnode.el,performRemove,performLeave):performLeave()}else performRemove()},removeFragment=(cur,end)=>{let next;for(;cur!==end;)next=hostNextSibling(cur),hostRemove(cur),cur=next;hostRemove(end)},unmountComponent=(instance,parentSuspense,doRemove)=>{let{bum,scope:scope$1,job,subTree,um,m,a:a$1,parent,slots:{__:slotCacheKeys}}=instance;invalidateMount(m),invalidateMount(a$1),bum&&invokeArrayFns(bum),parent&&isArray$5(slotCacheKeys)&&slotCacheKeys.forEach(v=>{parent.renderCache[v]=void 0}),scope$1.stop(),job&&(job.flags|=8,unmount(subTree,instance,parentSuspense,doRemove)),um&&queuePostRenderEffect(um,parentSuspense),queuePostRenderEffect(()=>{instance.isUnmounted=!0},parentSuspense),parentSuspense&&parentSuspense.pendingBranch&&!parentSuspense.isUnmounted&&instance.asyncDep&&!instance.asyncResolved&&instance.suspenseId===parentSuspense.pendingId&&(parentSuspense.deps--,parentSuspense.deps===0&&parentSuspense.resolve())},unmountChildren=(children,parentComponent,parentSuspense,doRemove=!1,optimized=!1,start=0)=>{for(let i=start;i{if(vnode.shapeFlag&6)return getNextHostNode(vnode.component.subTree);if(vnode.shapeFlag&128)return vnode.suspense.next();let el=hostNextSibling(vnode.anchor||vnode.el),teleportEnd=el&&el[TeleportEndKey];return teleportEnd?hostNextSibling(teleportEnd):el},isFlushing=!1,render$2=(vnode,container,namespace)=>{vnode==null?container._vnode&&unmount(container._vnode,null,null,!0):patch$1(container._vnode||null,vnode,container,null,null,null,namespace),container._vnode=vnode,!isFlushing&&(isFlushing=!0,flushPreFlushCbs(),flushPostFlushCbs(),isFlushing=!1)},internals={p:patch$1,um:unmount,m:move,r:remove$3,mt:mountComponent,mc:mountChildren,pc:patchChildren,pbc:patchBlockChildren,n:getNextHostNode,o:options$1},hydrate$1,hydrateNode;return createHydrationFns&&([hydrate$1,hydrateNode]=createHydrationFns(internals)),{render:render$2,hydrate:hydrate$1,createApp:createAppAPI(render$2,hydrate$1)}}function resolveChildrenNamespace({type,props},currentNamespace){return currentNamespace===`svg`&&type===`foreignObject`||currentNamespace===`mathml`&&type===`annotation-xml`&&props&&props.encoding&&props.encoding.includes(`html`)?void 0:currentNamespace}function toggleRecurse({effect:effect$1,job},allowed){allowed?(effect$1.flags|=32,job.flags|=4):(effect$1.flags&=-33,job.flags&=-5)}function needTransition(parentSuspense,transition){return(!parentSuspense||parentSuspense&&!parentSuspense.pendingBranch)&&transition&&!transition.persisted}function traverseStaticChildren(n1,n2,shallow=!1){let ch1=n1.children,ch2=n2.children;if(isArray$5(ch1)&&isArray$5(ch2))for(let i=0;i>1,arr[result[c$3]]0&&(p$4[i]=result[u-1]),result[u]=i)}}for(u=result.length,v=result[u-1];u-- >0;)result[u]=v,v=p$4[v];return result}function locateNonHydratedAsyncRoot(instance){let subComponent=instance.subTree.component;if(subComponent)return subComponent.asyncDep&&!subComponent.asyncResolved?subComponent:locateNonHydratedAsyncRoot(subComponent)}function invalidateMount(hooks){if(hooks)for(let i=0;i{{let ctx=inject(ssrContextKey);return ctx}};function watchEffect(effect$1,options$1){return doWatch(effect$1,null,options$1)}function watchPostEffect(effect$1,options$1){return doWatch(effect$1,null,{flush:`post`})}function watchSyncEffect(effect$1,options$1){return doWatch(effect$1,null,{flush:`sync`})}function watch(source,cb$1,options$1){return doWatch(source,cb$1,options$1)}function doWatch(source,cb$1,options$1=EMPTY_OBJ){let{immediate,deep,flush,once}=options$1,baseWatchOptions=extend$2({},options$1),runsImmediately=cb$1&&immediate||!cb$1&&flush!==`post`,ssrCleanup;if(isInSSRComponentSetup){if(flush===`sync`){let ctx=useSSRContext();ssrCleanup=ctx.__watcherHandles||=[]}else if(!runsImmediately){let watchStopHandle=()=>{};return watchStopHandle.stop=NOOP,watchStopHandle.resume=NOOP,watchStopHandle.pause=NOOP,watchStopHandle}}let instance=currentInstance;baseWatchOptions.call=(fn$5,type,args)=>callWithAsyncErrorHandling(fn$5,instance,type,args);let isPre=!1;flush===`post`?baseWatchOptions.scheduler=job=>{queuePostRenderEffect(job,instance&&instance.suspense)}:flush!==`sync`&&(isPre=!0,baseWatchOptions.scheduler=(job,isFirstRun)=>{isFirstRun?job():queueJob(job)}),baseWatchOptions.augmentJob=job=>{cb$1&&(job.flags|=4),isPre&&(job.flags|=2,instance&&(job.id=instance.uid,job.i=instance))};let watchHandle=watch$1(source,cb$1,baseWatchOptions);return isInSSRComponentSetup&&(ssrCleanup?ssrCleanup.push(watchHandle):runsImmediately&&watchHandle()),watchHandle}function instanceWatch(source,value$1,options$1){let publicThis=this.proxy,getter=isString$2(source)?source.includes(`.`)?createPathGetter(publicThis,source):()=>publicThis[source]:source.bind(publicThis,publicThis),cb$1;isFunction$1(value$1)?cb$1=value$1:(cb$1=value$1.handler,options$1=value$1);let reset=setCurrentInstance(this),res=doWatch(getter,cb$1.bind(publicThis),options$1);return reset(),res}function createPathGetter(ctx,path){let segments=path.split(`.`);return()=>{let cur=ctx;for(let i=0;i{let localValue,prevSetValue=EMPTY_OBJ,prevEmittedValue;return watchSyncEffect(()=>{let propValue=props[camelizedName];hasChanged(localValue,propValue)&&(localValue=propValue,trigger$1())}),{get(){return track$1(),options$1.get?options$1.get(localValue):localValue},set(value$1){let emittedValue=options$1.set?options$1.set(value$1):value$1;if(!hasChanged(emittedValue,localValue)&&!(prevSetValue!==EMPTY_OBJ&&hasChanged(value$1,prevSetValue)))return;let rawProps=i.vnode.props;rawProps&&(name$2 in rawProps||camelizedName in rawProps||hyphenatedName in rawProps)&&(`onUpdate:${name$2}`in rawProps||`onUpdate:${camelizedName}`in rawProps||`onUpdate:${hyphenatedName}`in rawProps)||(localValue=value$1,trigger$1()),i.emit(`update:${name$2}`,emittedValue),hasChanged(value$1,emittedValue)&&hasChanged(value$1,prevSetValue)&&!hasChanged(emittedValue,prevEmittedValue)&&trigger$1(),prevSetValue=value$1,prevEmittedValue=emittedValue}}});return res[Symbol.iterator]=()=>{let i2=0;return{next(){return i2<2?{value:i2++?modifiers||EMPTY_OBJ:res,done:!1}:{done:!0}}}},res}const getModelModifiers=(props,modelName)=>modelName===`modelValue`||modelName===`model-value`?props.modelModifiers:props[`${modelName}Modifiers`]||props[`${camelize(modelName)}Modifiers`]||props[`${hyphenate$2(modelName)}Modifiers`];function emit(instance,event,...rawArgs){if(instance.isUnmounted)return;let props=instance.vnode.props||EMPTY_OBJ,args=rawArgs,isModelListener$1=event.startsWith(`update:`),modifiers=isModelListener$1&&getModelModifiers(props,event.slice(7));modifiers&&(modifiers.trim&&(args=rawArgs.map(a$1=>isString$2(a$1)?a$1.trim():a$1)),modifiers.number&&(args=rawArgs.map(looseToNumber)));let handlerName,handler=props[handlerName=toHandlerKey(event)]||props[handlerName=toHandlerKey(camelize(event))];!handler&&isModelListener$1&&(handler=props[handlerName=toHandlerKey(hyphenate$2(event))]),handler&&callWithAsyncErrorHandling(handler,instance,6,args);let onceHandler=props[handlerName+`Once`];if(onceHandler){if(!instance.emitted)instance.emitted={};else if(instance.emitted[handlerName])return;instance.emitted[handlerName]=!0,callWithAsyncErrorHandling(onceHandler,instance,6,args)}}function normalizeEmitsOptions(comp,appContext,asMixin=!1){let cache$1=appContext.emitsCache,cached$1=cache$1.get(comp);if(cached$1!==void 0)return cached$1;let raw$3=comp.emits,normalized={},hasExtends=!1;if(!isFunction$1(comp)){let extendEmits=raw2=>{let normalizedFromExtend=normalizeEmitsOptions(raw2,appContext,!0);normalizedFromExtend&&(hasExtends=!0,extend$2(normalized,normalizedFromExtend))};!asMixin&&appContext.mixins.length&&appContext.mixins.forEach(extendEmits),comp.extends&&extendEmits(comp.extends),comp.mixins&&comp.mixins.forEach(extendEmits)}return!raw$3&&!hasExtends?(isObject$6(comp)&&cache$1.set(comp,null),null):(isArray$5(raw$3)?raw$3.forEach(key$2=>normalized[key$2]=null):extend$2(normalized,raw$3),isObject$6(comp)&&cache$1.set(comp,normalized),normalized)}function isEmitListener(options$1,key$2){return!options$1||!isOn(key$2)?!1:(key$2=key$2.slice(2).replace(/Once$/,``),hasOwn$4(options$1,key$2[0].toLowerCase()+key$2.slice(1))||hasOwn$4(options$1,hyphenate$2(key$2))||hasOwn$4(options$1,key$2))}function renderComponentRoot(instance){let{type:Component,vnode,proxy,withProxy,propsOptions:[propsOptions],slots,attrs,emit:emit$1,render:render$2,renderCache,props,data:data$12,setupState,ctx,inheritAttrs}=instance,prev=setCurrentRenderingInstance(instance),result,fallthroughAttrs;try{if(vnode.shapeFlag&4){let proxyToUse=withProxy||proxy,thisProxy=proxyToUse;result=normalizeVNode(render$2.call(thisProxy,proxyToUse,renderCache,props,setupState,data$12,ctx)),fallthroughAttrs=attrs}else{let render2=Component;result=normalizeVNode(render2.length>1?render2(props,{attrs,slots,emit:emit$1}):render2(props,null)),fallthroughAttrs=Component.props?attrs:getFunctionalFallthrough(attrs)}}catch(err){blockStack.length=0,handleError(err,instance,1),result=createVNode(Comment)}let root$3=result;if(fallthroughAttrs&&inheritAttrs!==!1){let keys$3=Object.keys(fallthroughAttrs),{shapeFlag}=root$3;keys$3.length&&shapeFlag&7&&(propsOptions&&keys$3.some(isModelListener)&&(fallthroughAttrs=filterModelListeners(fallthroughAttrs,propsOptions)),root$3=cloneVNode(root$3,fallthroughAttrs,!1,!0))}return vnode.dirs&&(root$3=cloneVNode(root$3,null,!1,!0),root$3.dirs=root$3.dirs?root$3.dirs.concat(vnode.dirs):vnode.dirs),vnode.transition&&setTransitionHooks(root$3,vnode.transition),result=root$3,setCurrentRenderingInstance(prev),result}function filterSingleRoot(children,recurse=!0){let singleRoot;for(let i=0;i{let res;for(let key$2 in attrs)(key$2===`class`||key$2===`style`||isOn(key$2))&&((res||={})[key$2]=attrs[key$2]);return res},filterModelListeners=(attrs,props)=>{let res={};for(let key$2 in attrs)(!isModelListener(key$2)||!(key$2.slice(9)in props))&&(res[key$2]=attrs[key$2]);return res};function shouldUpdateComponent(prevVNode,nextVNode,optimized){let{props:prevProps,children:prevChildren,component}=prevVNode,{props:nextProps,children:nextChildren,patchFlag}=nextVNode,emits=component.emitsOptions;if(nextVNode.dirs||nextVNode.transition)return!0;if(optimized&&patchFlag>=0){if(patchFlag&1024)return!0;if(patchFlag&16)return prevProps?hasPropsChanged(prevProps,nextProps,emits):!!nextProps;if(patchFlag&8){let dynamicProps=nextVNode.dynamicProps;for(let i=0;itype.__isSuspense;let suspenseId=0;const SuspenseImpl={name:`Suspense`,__isSuspense:!0,process(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,rendererInternals){if(n1==null)mountSuspense(n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,rendererInternals);else{if(parentSuspense&&parentSuspense.deps>0&&!n1.suspense.isInFallback){n2.suspense=n1.suspense,n2.suspense.vnode=n2,n2.el=n1.el;return}patchSuspense(n1,n2,container,anchor,parentComponent,namespace,slotScopeIds,optimized,rendererInternals)}},hydrate:hydrateSuspense,normalize:normalizeSuspenseChildren},Suspense=SuspenseImpl;function triggerEvent(vnode,name$2){let eventListener=vnode.props&&vnode.props[name$2];isFunction$1(eventListener)&&eventListener()}function mountSuspense(vnode,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,rendererInternals){let{p:patch$1,o:{createElement}}=rendererInternals,hiddenContainer=createElement(`div`),suspense=vnode.suspense=createSuspenseBoundary(vnode,parentSuspense,parentComponent,container,hiddenContainer,anchor,namespace,slotScopeIds,optimized,rendererInternals);patch$1(null,suspense.pendingBranch=vnode.ssContent,hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds),suspense.deps>0?(triggerEvent(vnode,`onPending`),triggerEvent(vnode,`onFallback`),patch$1(null,vnode.ssFallback,container,anchor,parentComponent,null,namespace,slotScopeIds),setActiveBranch(suspense,vnode.ssFallback)):suspense.resolve(!1,!0)}function patchSuspense(n1,n2,container,anchor,parentComponent,namespace,slotScopeIds,optimized,{p:patch$1,um:unmount,o:{createElement}}){let suspense=n2.suspense=n1.suspense;suspense.vnode=n2,n2.el=n1.el;let newBranch=n2.ssContent,newFallback=n2.ssFallback,{activeBranch,pendingBranch,isInFallback,isHydrating}=suspense;if(pendingBranch)suspense.pendingBranch=newBranch,isSameVNodeType(newBranch,pendingBranch)?(patch$1(pendingBranch,newBranch,suspense.hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.deps<=0?suspense.resolve():isInFallback&&(isHydrating||(patch$1(activeBranch,newFallback,container,anchor,parentComponent,null,namespace,slotScopeIds,optimized),setActiveBranch(suspense,newFallback)))):(suspense.pendingId=suspenseId++,isHydrating?(suspense.isHydrating=!1,suspense.activeBranch=pendingBranch):unmount(pendingBranch,parentComponent,suspense),suspense.deps=0,suspense.effects.length=0,suspense.hiddenContainer=createElement(`div`),isInFallback?(patch$1(null,newBranch,suspense.hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.deps<=0?suspense.resolve():(patch$1(activeBranch,newFallback,container,anchor,parentComponent,null,namespace,slotScopeIds,optimized),setActiveBranch(suspense,newFallback))):activeBranch&&isSameVNodeType(newBranch,activeBranch)?(patch$1(activeBranch,newBranch,container,anchor,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.resolve(!0)):(patch$1(null,newBranch,suspense.hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.deps<=0&&suspense.resolve()));else if(activeBranch&&isSameVNodeType(newBranch,activeBranch))patch$1(activeBranch,newBranch,container,anchor,parentComponent,suspense,namespace,slotScopeIds,optimized),setActiveBranch(suspense,newBranch);else if(triggerEvent(n2,`onPending`),suspense.pendingBranch=newBranch,newBranch.shapeFlag&512?suspense.pendingId=newBranch.component.suspenseId:suspense.pendingId=suspenseId++,patch$1(null,newBranch,suspense.hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.deps<=0)suspense.resolve();else{let{timeout,pendingId}=suspense;timeout>0?setTimeout(()=>{suspense.pendingId===pendingId&&suspense.fallback(newFallback)},timeout):timeout===0&&suspense.fallback(newFallback)}}function createSuspenseBoundary(vnode,parentSuspense,parentComponent,container,hiddenContainer,anchor,namespace,slotScopeIds,optimized,rendererInternals,isHydrating=!1){let{p:patch$1,m:move,um:unmount,n:next,o:{parentNode,remove:remove$3}}=rendererInternals,parentSuspenseId,isSuspensible=isVNodeSuspensible(vnode);isSuspensible&&parentSuspense&&parentSuspense.pendingBranch&&(parentSuspenseId=parentSuspense.pendingId,parentSuspense.deps++);let timeout=vnode.props?toNumber(vnode.props.timeout):void 0,initialAnchor=anchor,suspense={vnode,parent:parentSuspense,parentComponent,namespace,container,hiddenContainer,deps:0,pendingId:suspenseId++,timeout:typeof timeout==`number`?timeout:-1,activeBranch:null,pendingBranch:null,isInFallback:!isHydrating,isHydrating,isUnmounted:!1,effects:[],resolve(resume=!1,sync$2=!1){let{vnode:vnode2,activeBranch,pendingBranch,pendingId,effects,parentComponent:parentComponent2,container:container2}=suspense,delayEnter=!1;suspense.isHydrating?suspense.isHydrating=!1:resume||(delayEnter=activeBranch&&pendingBranch.transition&&pendingBranch.transition.mode===`out-in`,delayEnter&&(activeBranch.transition.afterLeave=()=>{pendingId===suspense.pendingId&&(move(pendingBranch,container2,anchor===initialAnchor?next(activeBranch):anchor,0),queuePostFlushCb(effects))}),activeBranch&&(parentNode(activeBranch.el)===container2&&(anchor=next(activeBranch)),unmount(activeBranch,parentComponent2,suspense,!0)),delayEnter||move(pendingBranch,container2,anchor,0)),setActiveBranch(suspense,pendingBranch),suspense.pendingBranch=null,suspense.isInFallback=!1;let parent=suspense.parent,hasUnresolvedAncestor=!1;for(;parent;){if(parent.pendingBranch){parent.effects.push(...effects),hasUnresolvedAncestor=!0;break}parent=parent.parent}!hasUnresolvedAncestor&&!delayEnter&&queuePostFlushCb(effects),suspense.effects=[],isSuspensible&&parentSuspense&&parentSuspense.pendingBranch&&parentSuspenseId===parentSuspense.pendingId&&(parentSuspense.deps--,parentSuspense.deps===0&&!sync$2&&parentSuspense.resolve()),triggerEvent(vnode2,`onResolve`)},fallback(fallbackVNode){if(!suspense.pendingBranch)return;let{vnode:vnode2,activeBranch,parentComponent:parentComponent2,container:container2,namespace:namespace2}=suspense;triggerEvent(vnode2,`onFallback`);let anchor2=next(activeBranch),mountFallback=()=>{suspense.isInFallback&&(patch$1(null,fallbackVNode,container2,anchor2,parentComponent2,null,namespace2,slotScopeIds,optimized),setActiveBranch(suspense,fallbackVNode))},delayEnter=fallbackVNode.transition&&fallbackVNode.transition.mode===`out-in`;delayEnter&&(activeBranch.transition.afterLeave=mountFallback),suspense.isInFallback=!0,unmount(activeBranch,parentComponent2,null,!0),!delayEnter&&mountFallback()},move(container2,anchor2,type){suspense.activeBranch&&move(suspense.activeBranch,container2,anchor2,type),suspense.container=container2},next(){return suspense.activeBranch&&next(suspense.activeBranch)},registerDep(instance,setupRenderEffect,optimized2){let isInPendingSuspense=!!suspense.pendingBranch;isInPendingSuspense&&suspense.deps++;let hydratedEl=instance.vnode.el;instance.asyncDep.catch(err=>{handleError(err,instance,0)}).then(asyncSetupResult=>{if(instance.isUnmounted||suspense.isUnmounted||suspense.pendingId!==instance.suspenseId)return;instance.asyncResolved=!0;let{vnode:vnode2}=instance;handleSetupResult(instance,asyncSetupResult,!1),hydratedEl&&(vnode2.el=hydratedEl);let placeholder=!hydratedEl&&instance.subTree.el;setupRenderEffect(instance,vnode2,parentNode(hydratedEl||instance.subTree.el),hydratedEl?null:next(instance.subTree),suspense,namespace,optimized2),placeholder&&remove$3(placeholder),updateHOCHostEl(instance,vnode2.el),isInPendingSuspense&&--suspense.deps===0&&suspense.resolve()})},unmount(parentSuspense2,doRemove){suspense.isUnmounted=!0,suspense.activeBranch&&unmount(suspense.activeBranch,parentComponent,parentSuspense2,doRemove),suspense.pendingBranch&&unmount(suspense.pendingBranch,parentComponent,parentSuspense2,doRemove)}};return suspense}function hydrateSuspense(node$1,vnode,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,rendererInternals,hydrateNode){let suspense=vnode.suspense=createSuspenseBoundary(vnode,parentSuspense,parentComponent,node$1.parentNode,document.createElement(`div`),null,namespace,slotScopeIds,optimized,rendererInternals,!0),result=hydrateNode(node$1,suspense.pendingBranch=vnode.ssContent,parentComponent,suspense,slotScopeIds,optimized);return suspense.deps===0&&suspense.resolve(!1,!0),result}function normalizeSuspenseChildren(vnode){let{shapeFlag,children}=vnode,isSlotChildren=shapeFlag&32;vnode.ssContent=normalizeSuspenseSlot(isSlotChildren?children.default:children),vnode.ssFallback=isSlotChildren?normalizeSuspenseSlot(children.fallback):createVNode(Comment)}function normalizeSuspenseSlot(s){let block;if(isFunction$1(s)){let trackBlock=isBlockTreeEnabled&&s._c;trackBlock&&(s._d=!1,openBlock()),s=s(),trackBlock&&(s._d=!0,block=currentBlock,closeBlock())}if(isArray$5(s)){let singleChild=filterSingleRoot(s);s=singleChild}return s=normalizeVNode(s),block&&!s.dynamicChildren&&(s.dynamicChildren=block.filter(c$3=>c$3!==s)),s}function queueEffectWithSuspense(fn$5,suspense){suspense&&suspense.pendingBranch?isArray$5(fn$5)?suspense.effects.push(...fn$5):suspense.effects.push(fn$5):queuePostFlushCb(fn$5)}function setActiveBranch(suspense,branch){suspense.activeBranch=branch;let{vnode,parentComponent}=suspense,el=branch.el;for(;!el&&branch.component;)branch=branch.component.subTree,el=branch.el;vnode.el=el,parentComponent&&parentComponent.subTree===vnode&&(parentComponent.vnode.el=el,updateHOCHostEl(parentComponent,el))}function isVNodeSuspensible(vnode){let suspensible=vnode.props&&vnode.props.suspensible;return suspensible!=null&&suspensible!==!1}const Fragment=Symbol.for(`v-fgt`),Text=Symbol.for(`v-txt`),Comment=Symbol.for(`v-cmt`),Static=Symbol.for(`v-stc`),blockStack=[];let currentBlock=null;function openBlock(disableTracking=!1){blockStack.push(currentBlock=disableTracking?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(value$1,inVOnce=!1){isBlockTreeEnabled+=value$1,value$1<0&¤tBlock&&inVOnce&&(currentBlock.hasOnce=!0)}function setupBlock(vnode){return vnode.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(vnode),vnode}function createElementBlock(type,props,children,patchFlag,dynamicProps,shapeFlag){return setupBlock(createBaseVNode(type,props,children,patchFlag,dynamicProps,shapeFlag,!0))}function createBlock(type,props,children,patchFlag,dynamicProps){return setupBlock(createVNode(type,props,children,patchFlag,dynamicProps,!0))}function isVNode(value$1){return value$1?value$1.__v_isVNode===!0:!1}function isSameVNodeType(n1,n2){return n1.type===n2.type&&n1.key===n2.key}let vnodeArgsTransformer;function transformVNodeArgs(transformer){vnodeArgsTransformer=transformer}const normalizeKey=({key:key$2})=>key$2??null,normalizeRef=({ref:ref$1,ref_key,ref_for})=>(typeof ref$1==`number`&&(ref$1=``+ref$1),ref$1==null?null:isString$2(ref$1)||isRef(ref$1)||isFunction$1(ref$1)?{i:currentRenderingInstance,r:ref$1,k:ref_key,f:!!ref_for}:ref$1);function createBaseVNode(type,props=null,children=null,patchFlag=0,dynamicProps=null,shapeFlag=type===Fragment?0:1,isBlockNode=!1,needFullChildrenNormalization=!1){let vnode={__v_isVNode:!0,__v_skip:!0,type,props,key:props&&normalizeKey(props),ref:props&&normalizeRef(props),scopeId:currentScopeId,slotScopeIds:null,children,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag,patchFlag,dynamicProps,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return needFullChildrenNormalization?(normalizeChildren(vnode,children),shapeFlag&128&&type.normalize(vnode)):children&&(vnode.shapeFlag|=isString$2(children)?8:16),isBlockTreeEnabled>0&&!isBlockNode&¤tBlock&&(vnode.patchFlag>0||shapeFlag&6)&&vnode.patchFlag!==32&¤tBlock.push(vnode),vnode}const createVNode=_createVNode;function _createVNode(type,props=null,children=null,patchFlag=0,dynamicProps=null,isBlockNode=!1){if((!type||type===NULL_DYNAMIC_COMPONENT)&&(type=Comment),isVNode(type)){let cloned=cloneVNode(type,props,!0);return children&&normalizeChildren(cloned,children),isBlockTreeEnabled>0&&!isBlockNode&¤tBlock&&(cloned.shapeFlag&6?currentBlock[currentBlock.indexOf(type)]=cloned:currentBlock.push(cloned)),cloned.patchFlag=-2,cloned}if(isClassComponent(type)&&(type=type.__vccOpts),props){props=guardReactiveProps(props);let{class:klass,style}=props;klass&&!isString$2(klass)&&(props.class=normalizeClass(klass)),isObject$6(style)&&(isProxy(style)&&!isArray$5(style)&&(style=extend$2({},style)),props.style=normalizeStyle(style))}let shapeFlag=isString$2(type)?1:isSuspense(type)?128:isTeleport(type)?64:isObject$6(type)?4:isFunction$1(type)?2:0;return createBaseVNode(type,props,children,patchFlag,dynamicProps,shapeFlag,isBlockNode,!0)}function guardReactiveProps(props){return props?isProxy(props)||isInternalObject(props)?extend$2({},props):props:null}function cloneVNode(vnode,extraProps,mergeRef=!1,cloneTransition=!1){let{props,ref:ref$1,patchFlag,children,transition}=vnode,mergedProps=extraProps?mergeProps(props||{},extraProps):props,cloned={__v_isVNode:!0,__v_skip:!0,type:vnode.type,props:mergedProps,key:mergedProps&&normalizeKey(mergedProps),ref:extraProps&&extraProps.ref?mergeRef&&ref$1?isArray$5(ref$1)?ref$1.concat(normalizeRef(extraProps)):[ref$1,normalizeRef(extraProps)]:normalizeRef(extraProps):ref$1,scopeId:vnode.scopeId,slotScopeIds:vnode.slotScopeIds,children,target:vnode.target,targetStart:vnode.targetStart,targetAnchor:vnode.targetAnchor,staticCount:vnode.staticCount,shapeFlag:vnode.shapeFlag,patchFlag:extraProps&&vnode.type!==Fragment?patchFlag===-1?16:patchFlag|16:patchFlag,dynamicProps:vnode.dynamicProps,dynamicChildren:vnode.dynamicChildren,appContext:vnode.appContext,dirs:vnode.dirs,transition,component:vnode.component,suspense:vnode.suspense,ssContent:vnode.ssContent&&cloneVNode(vnode.ssContent),ssFallback:vnode.ssFallback&&cloneVNode(vnode.ssFallback),placeholder:vnode.placeholder,el:vnode.el,anchor:vnode.anchor,ctx:vnode.ctx,ce:vnode.ce};return transition&&cloneTransition&&setTransitionHooks(cloned,transition.clone(cloned)),cloned}function createTextVNode(text$5=` `,flag=0){return createVNode(Text,null,text$5,flag)}function createStaticVNode(content$2,numberOfNodes){let vnode=createVNode(Static,null,content$2);return vnode.staticCount=numberOfNodes,vnode}function createCommentVNode(text$5=``,asBlock=!1){return asBlock?(openBlock(),createBlock(Comment,null,text$5)):createVNode(Comment,null,text$5)}function normalizeVNode(child){return child==null||typeof child==`boolean`?createVNode(Comment):isArray$5(child)?createVNode(Fragment,null,child.slice()):isVNode(child)?cloneIfMounted(child):createVNode(Text,null,String(child))}function cloneIfMounted(child){return child.el===null&&child.patchFlag!==-1||child.memo?child:cloneVNode(child)}function normalizeChildren(vnode,children){let type=0,{shapeFlag}=vnode;if(children==null)children=null;else if(isArray$5(children))type=16;else if(typeof children==`object`)if(shapeFlag&65){let slot=children.default;slot&&(slot._c&&(slot._d=!1),normalizeChildren(vnode,slot()),slot._c&&(slot._d=!0));return}else{type=32;let slotFlag=children._;!slotFlag&&!isInternalObject(children)?children._ctx=currentRenderingInstance:slotFlag===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?children._=1:(children._=2,vnode.patchFlag|=1024))}else isFunction$1(children)?(children={default:children,_ctx:currentRenderingInstance},type=32):(children=String(children),shapeFlag&64?(type=16,children=[createTextVNode(children)]):type=8);vnode.children=children,vnode.shapeFlag|=type}function mergeProps(...args){let ret={};for(let i=0;icurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{let g=getGlobalThis$1(),registerGlobalSetter=(key$2,setter)=>{let setters;return(setters=g[key$2])||(setters=g[key$2]=[]),setters.push(setter),v=>{setters.length>1?setters.forEach(set=>set(v)):setters[0](v)}};internalSetCurrentInstance=registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`,v=>currentInstance=v),setInSSRSetupState=registerGlobalSetter(`__VUE_SSR_SETTERS__`,v=>isInSSRComponentSetup=v)}const setCurrentInstance=instance=>{let prev=currentInstance;return internalSetCurrentInstance(instance),instance.scope.on(),()=>{instance.scope.off(),internalSetCurrentInstance(prev)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)},isBuiltInTag=makeMap(`slot,component`);function isStatefulComponent(instance){return instance.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(instance,isSSR=!1,optimized=!1){isSSR&&setInSSRSetupState(isSSR);let{props,children}=instance.vnode,isStateful=isStatefulComponent(instance);initProps(instance,props,isStateful,isSSR),initSlots(instance,children,optimized||isSSR);let setupResult=isStateful?setupStatefulComponent(instance,isSSR):void 0;return isSSR&&setInSSRSetupState(!1),setupResult}function setupStatefulComponent(instance,isSSR){let Component=instance.type;instance.accessCache=Object.create(null),instance.proxy=new Proxy(instance.ctx,PublicInstanceProxyHandlers);let{setup}=Component;if(setup){pauseTracking();let setupContext=instance.setupContext=setup.length>1?createSetupContext(instance):null,reset=setCurrentInstance(instance),setupResult=callWithErrorHandling(setup,instance,0,[instance.props,setupContext]),isAsyncSetup=isPromise$1(setupResult);if(resetTracking(),reset(),(isAsyncSetup||instance.sp)&&!isAsyncWrapper(instance)&&markAsyncBoundary(instance),isAsyncSetup){if(setupResult.then(unsetCurrentInstance,unsetCurrentInstance),isSSR)return setupResult.then(resolvedResult=>{handleSetupResult(instance,resolvedResult,isSSR)}).catch(e$4=>{handleError(e$4,instance,0)});instance.asyncDep=setupResult}else handleSetupResult(instance,setupResult,isSSR)}else finishComponentSetup(instance,isSSR)}function handleSetupResult(instance,setupResult,isSSR){isFunction$1(setupResult)?instance.type.__ssrInlineRender?instance.ssrRender=setupResult:instance.render=setupResult:isObject$6(setupResult)&&(instance.setupState=proxyRefs(setupResult)),finishComponentSetup(instance,isSSR)}let compile$2,installWithProxy;function registerRuntimeCompiler(_compile){compile$2=_compile,installWithProxy=i=>{i.render._rc&&(i.withProxy=new Proxy(i.ctx,RuntimeCompiledPublicInstanceProxyHandlers))}}const isRuntimeOnly=()=>!compile$2;function finishComponentSetup(instance,isSSR,skipOptions){let Component=instance.type;if(!instance.render){if(!isSSR&&compile$2&&!Component.render){let template=Component.template||resolveMergedOptions(instance).template;if(template){let{isCustomElement,compilerOptions}=instance.appContext.config,{delimiters,compilerOptions:componentCompilerOptions}=Component,finalCompilerOptions=extend$2(extend$2({isCustomElement,delimiters},compilerOptions),componentCompilerOptions);Component.render=compile$2(template,finalCompilerOptions)}}instance.render=Component.render||NOOP,installWithProxy&&installWithProxy(instance)}{let reset=setCurrentInstance(instance);pauseTracking();try{applyOptions(instance)}finally{resetTracking(),reset()}}}const attrsProxyHandlers={get(target$1,key$2){return track(target$1,`get`,``),target$1[key$2]}};function createSetupContext(instance){let expose=exposed=>{instance.exposed=exposed||{}};return{attrs:new Proxy(instance.attrs,attrsProxyHandlers),slots:instance.slots,emit:instance.emit,expose}}function getComponentPublicInstance(instance){return instance.exposed?instance.exposeProxy||=new Proxy(proxyRefs(markRaw(instance.exposed)),{get(target$1,key$2){if(key$2 in target$1)return target$1[key$2];if(key$2 in publicPropertiesMap)return publicPropertiesMap[key$2](instance)},has(target$1,key$2){return key$2 in target$1||key$2 in publicPropertiesMap}}):instance.proxy}function getComponentName(Component,includeInferred=!0){return isFunction$1(Component)?Component.displayName||Component.name:Component.name||includeInferred&&Component.__name}function isClassComponent(value$1){return isFunction$1(value$1)&&`__vccOpts`in value$1}const computed=(getterOrOptions,debugOptions)=>{let c$3=computed$1(getterOrOptions,debugOptions,isInSSRComponentSetup);return c$3};function h(type,propsOrChildren,children){let l=arguments.length;return l===2?isObject$6(propsOrChildren)&&!isArray$5(propsOrChildren)?isVNode(propsOrChildren)?createVNode(type,null,[propsOrChildren]):createVNode(type,propsOrChildren):createVNode(type,null,propsOrChildren):(l>3?children=Array.prototype.slice.call(arguments,2):l===3&&isVNode(children)&&(children=[children]),createVNode(type,propsOrChildren,children))}function initCustomFormatter(){return;function isKeyOfType(Comp,key$2,type){let opts=Comp[type];if(isArray$5(opts)&&opts.includes(key$2)||isObject$6(opts)&&key$2 in opts||Comp.extends&&isKeyOfType(Comp.extends,key$2,type)||Comp.mixins&&Comp.mixins.some(m=>isKeyOfType(m,key$2,type)))return!0}}function withMemo(memo,render$2,cache$1,index$1){let cached$1=cache$1[index$1];if(cached$1&&isMemoSame(cached$1,memo))return cached$1;let ret=render$2();return ret.memo=memo.slice(),ret.cacheIndex=index$1,cache$1[index$1]=ret}function isMemoSame(cached$1,memo){let prev=cached$1.memo;if(prev.length!=memo.length)return!1;for(let i=0;i0&¤tBlock&¤tBlock.push(cached$1),!0}const version$1=`3.5.18`,warn$1=NOOP,ErrorTypeStrings=ErrorTypeStrings$1,devtools$2=devtools$1,setDevtoolsHook=setDevtoolsHook$1,_ssrUtils={createComponentInstance,setupComponent,renderComponentRoot,setCurrentRenderingInstance,isVNode,normalizeVNode,getComponentPublicInstance,ensureValidVNode,pushWarningContext,popWarningContext},ssrUtils=_ssrUtils,resolveFilter=null,compatUtils=null,DeprecationTypes=null;let policy;const tt$1=typeof window<`u`&&window.trustedTypes;if(tt$1)try{policy=tt$1.createPolicy(`vue`,{createHTML:val=>val})}catch{}const unsafeToTrustedHTML=policy?val=>policy.createHTML(val):val=>val,svgNS=`http://www.w3.org/2000/svg`,mathmlNS=`http://www.w3.org/1998/Math/MathML`,doc$1=typeof document<`u`?document:null,templateContainer=doc$1&&doc$1.createElement(`template`),nodeOps={insert:(child,parent,anchor)=>{parent.insertBefore(child,anchor||null)},remove:child=>{let parent=child.parentNode;parent&&parent.removeChild(child)},createElement:(tag,namespace,is,props)=>{let el=namespace===`svg`?doc$1.createElementNS(svgNS,tag):namespace===`mathml`?doc$1.createElementNS(mathmlNS,tag):is?doc$1.createElement(tag,{is}):doc$1.createElement(tag);return tag===`select`&&props&&props.multiple!=null&&el.setAttribute(`multiple`,props.multiple),el},createText:text$5=>doc$1.createTextNode(text$5),createComment:text$5=>doc$1.createComment(text$5),setText:(node$1,text$5)=>{node$1.nodeValue=text$5},setElementText:(el,text$5)=>{el.textContent=text$5},parentNode:node$1=>node$1.parentNode,nextSibling:node$1=>node$1.nextSibling,querySelector:selector=>doc$1.querySelector(selector),setScopeId(el,id){el.setAttribute(id,``)},insertStaticContent(content$2,parent,anchor,namespace,start,end){let before=anchor?anchor.previousSibling:parent.lastChild;if(start&&(start===end||start.nextSibling))for(;parent.insertBefore(start.cloneNode(!0),anchor),!(start===end||!(start=start.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(namespace===`svg`?`${content$2}`:namespace===`mathml`?`${content$2}`:content$2);let template=templateContainer.content;if(namespace===`svg`||namespace===`mathml`){let wrapper=template.firstChild;for(;wrapper.firstChild;)template.appendChild(wrapper.firstChild);template.removeChild(wrapper)}parent.insertBefore(template,anchor)}return[before?before.nextSibling:parent.firstChild,anchor?anchor.previousSibling:parent.lastChild]}},TRANSITION=`transition`,ANIMATION=`animation`,vtcKey=Symbol(`_vtc`),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$2({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=t$1=>(t$1.displayName=`Transition`,t$1.props=TransitionPropsValidators,t$1),Transition=decorate$1((props,{slots})=>h(BaseTransition,resolveTransitionProps(props),slots)),callHook=(hook,args=[])=>{isArray$5(hook)?hook.forEach(h2=>h2(...args)):hook&&hook(...args)},hasExplicitCallback=hook=>hook?isArray$5(hook)?hook.some(h2=>h2.length>1):hook.length>1:!1;function resolveTransitionProps(rawProps){let baseProps={};for(let key$2 in rawProps)key$2 in DOMTransitionPropsValidators||(baseProps[key$2]=rawProps[key$2]);if(rawProps.css===!1)return baseProps;let{name:name$2=`v`,type,duration:duration$2,enterFromClass=`${name$2}-enter-from`,enterActiveClass=`${name$2}-enter-active`,enterToClass=`${name$2}-enter-to`,appearFromClass=enterFromClass,appearActiveClass=enterActiveClass,appearToClass=enterToClass,leaveFromClass=`${name$2}-leave-from`,leaveActiveClass=`${name$2}-leave-active`,leaveToClass=`${name$2}-leave-to`}=rawProps,durations=normalizeDuration(duration$2),enterDuration=durations&&durations[0],leaveDuration=durations&&durations[1],{onBeforeEnter,onEnter,onEnterCancelled,onLeave,onLeaveCancelled,onBeforeAppear=onBeforeEnter,onAppear=onEnter,onAppearCancelled=onEnterCancelled}=baseProps,finishEnter=(el,isAppear,done,isCancelled)=>{el._enterCancelled=isCancelled,removeTransitionClass(el,isAppear?appearToClass:enterToClass),removeTransitionClass(el,isAppear?appearActiveClass:enterActiveClass),done&&done()},finishLeave=(el,done)=>{el._isLeaving=!1,removeTransitionClass(el,leaveFromClass),removeTransitionClass(el,leaveToClass),removeTransitionClass(el,leaveActiveClass),done&&done()},makeEnterHook=isAppear=>(el,done)=>{let hook=isAppear?onAppear:onEnter,resolve$1=()=>finishEnter(el,isAppear,done);callHook(hook,[el,resolve$1]),nextFrame(()=>{removeTransitionClass(el,isAppear?appearFromClass:enterFromClass),addTransitionClass(el,isAppear?appearToClass:enterToClass),!hasExplicitCallback(hook)&&whenTransitionEnds(el,type,enterDuration,resolve$1)})};return extend$2(baseProps,{onBeforeEnter(el){callHook(onBeforeEnter,[el]),addTransitionClass(el,enterFromClass),addTransitionClass(el,enterActiveClass)},onBeforeAppear(el){callHook(onBeforeAppear,[el]),addTransitionClass(el,appearFromClass),addTransitionClass(el,appearActiveClass)},onEnter:makeEnterHook(!1),onAppear:makeEnterHook(!0),onLeave(el,done){el._isLeaving=!0;let resolve$1=()=>finishLeave(el,done);addTransitionClass(el,leaveFromClass),el._enterCancelled?(addTransitionClass(el,leaveActiveClass),forceReflow()):(forceReflow(),addTransitionClass(el,leaveActiveClass)),nextFrame(()=>{el._isLeaving&&(removeTransitionClass(el,leaveFromClass),addTransitionClass(el,leaveToClass),!hasExplicitCallback(onLeave))&&whenTransitionEnds(el,type,leaveDuration,resolve$1)}),callHook(onLeave,[el,resolve$1])},onEnterCancelled(el){finishEnter(el,!1,void 0,!0),callHook(onEnterCancelled,[el])},onAppearCancelled(el){finishEnter(el,!0,void 0,!0),callHook(onAppearCancelled,[el])},onLeaveCancelled(el){finishLeave(el),callHook(onLeaveCancelled,[el])}})}function normalizeDuration(duration$2){if(duration$2==null)return null;if(isObject$6(duration$2))return[NumberOf(duration$2.enter),NumberOf(duration$2.leave)];{let n=NumberOf(duration$2);return[n,n]}}function NumberOf(val){let res=toNumber(val);return res}function addTransitionClass(el,cls){cls.split(/\s+/).forEach(c$3=>c$3&&el.classList.add(c$3)),(el[vtcKey]||(el[vtcKey]=new Set)).add(cls)}function removeTransitionClass(el,cls){cls.split(/\s+/).forEach(c$3=>c$3&&el.classList.remove(c$3));let _vtc=el[vtcKey];_vtc&&(_vtc.delete(cls),!_vtc.size&&(el[vtcKey]=void 0))}function nextFrame(cb$1){requestAnimationFrame(()=>{requestAnimationFrame(cb$1)})}let endId=0;function whenTransitionEnds(el,expectedType,explicitTimeout,resolve$1){let id=el._endId=++endId,resolveIfNotStale=()=>{id===el._endId&&resolve$1()};if(explicitTimeout!=null)return setTimeout(resolveIfNotStale,explicitTimeout);let{type,timeout,propCount}=getTransitionInfo(el,expectedType);if(!type)return resolve$1();let endEvent=type+`end`,ended=0,end=()=>{el.removeEventListener(endEvent,onEnd),resolveIfNotStale()},onEnd=e$4=>{e$4.target===el&&++ended>=propCount&&end()};setTimeout(()=>{ended(styles[key$2]||``).split(`, `),transitionDelays=getStyleProperties(`${TRANSITION}Delay`),transitionDurations=getStyleProperties(`${TRANSITION}Duration`),transitionTimeout=getTimeout(transitionDelays,transitionDurations),animationDelays=getStyleProperties(`${ANIMATION}Delay`),animationDurations=getStyleProperties(`${ANIMATION}Duration`),animationTimeout=getTimeout(animationDelays,animationDurations),type=null,timeout=0,propCount=0;expectedType===TRANSITION?transitionTimeout>0&&(type=TRANSITION,timeout=transitionTimeout,propCount=transitionDurations.length):expectedType===ANIMATION?animationTimeout>0&&(type=ANIMATION,timeout=animationTimeout,propCount=animationDurations.length):(timeout=Math.max(transitionTimeout,animationTimeout),type=timeout>0?transitionTimeout>animationTimeout?TRANSITION:ANIMATION:null,propCount=type?type===TRANSITION?transitionDurations.length:animationDurations.length:0);let hasTransform=type===TRANSITION&&/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION}Property`).toString());return{type,timeout,propCount,hasTransform}}function getTimeout(delays,durations){for(;delays.lengthtoMs(d)+toMs(delays[i])))}function toMs(s){return s===`auto`?0:Number(s.slice(0,-1).replace(`,`,`.`))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(el,value$1,isSVG){let transitionClasses=el[vtcKey];transitionClasses&&(value$1=(value$1?[value$1,...transitionClasses]:[...transitionClasses]).join(` `)),value$1==null?el.removeAttribute(`class`):isSVG?el.setAttribute(`class`,value$1):el.className=value$1}const vShowOriginalDisplay=Symbol(`_vod`),vShowHidden=Symbol(`_vsh`),vShow={beforeMount(el,{value:value$1},{transition}){el[vShowOriginalDisplay]=el.style.display===`none`?``:el.style.display,transition&&value$1?transition.beforeEnter(el):setDisplay(el,value$1)},mounted(el,{value:value$1},{transition}){transition&&value$1&&transition.enter(el)},updated(el,{value:value$1,oldValue},{transition}){!value$1!=!oldValue&&(transition?value$1?(transition.beforeEnter(el),setDisplay(el,!0),transition.enter(el)):transition.leave(el,()=>{setDisplay(el,!1)}):setDisplay(el,value$1))},beforeUnmount(el,{value:value$1}){setDisplay(el,value$1)}};function setDisplay(el,value$1){el.style.display=value$1?el[vShowOriginalDisplay]:`none`,el[vShowHidden]=!value$1}function initVShowForSSR(){vShow.getSSRProps=({value:value$1})=>{if(!value$1)return{style:{display:`none`}}}}const CSS_VAR_TEXT=Symbol(``);function useCssVars(getter){let instance=getCurrentInstance();if(!instance)return;let updateTeleports=instance.ut=(vars=getter(instance.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach(node$1=>setVarsOnNode(node$1,vars))},setVars=()=>{let vars=getter(instance.proxy);instance.ce?setVarsOnNode(instance.ce,vars):setVarsOnVNode(instance.subTree,vars),updateTeleports(vars)};onBeforeUpdate(()=>{queuePostFlushCb(setVars)}),onMounted(()=>{watch(setVars,NOOP,{flush:`post`});let ob=new MutationObserver(setVars);ob.observe(instance.subTree.el.parentNode,{childList:!0}),onUnmounted(()=>ob.disconnect())})}function setVarsOnVNode(vnode,vars){if(vnode.shapeFlag&128){let suspense=vnode.suspense;vnode=suspense.activeBranch,suspense.pendingBranch&&!suspense.isHydrating&&suspense.effects.push(()=>{setVarsOnVNode(suspense.activeBranch,vars)})}for(;vnode.component;)vnode=vnode.component.subTree;if(vnode.shapeFlag&1&&vnode.el)setVarsOnNode(vnode.el,vars);else if(vnode.type===Fragment)vnode.children.forEach(c$3=>setVarsOnVNode(c$3,vars));else if(vnode.type===Static){let{el,anchor}=vnode;for(;el&&(setVarsOnNode(el,vars),el!==anchor);)el=el.nextSibling}}function setVarsOnNode(el,vars){if(el.nodeType===1){let style=el.style,cssText=``;for(let key$2 in vars){let value$1=normalizeCssVarValue(vars[key$2]);style.setProperty(`--${key$2}`,value$1),cssText+=`--${key$2}: ${value$1};`}style[CSS_VAR_TEXT]=cssText}}const displayRE=/(^|;)\s*display\s*:/;function patchStyle(el,prev,next){let style=el.style,isCssString=isString$2(next),hasControlledDisplay=!1;if(next&&!isCssString){if(prev)if(isString$2(prev))for(let prevStyle of prev.split(`;`)){let key$2=prevStyle.slice(0,prevStyle.indexOf(`:`)).trim();next[key$2]??setStyle(style,key$2,``)}else for(let key$2 in prev)next[key$2]??setStyle(style,key$2,``);for(let key$2 in next)key$2===`display`&&(hasControlledDisplay=!0),setStyle(style,key$2,next[key$2])}else if(isCssString){if(prev!==next){let cssVarText=style[CSS_VAR_TEXT];cssVarText&&(next+=`;`+cssVarText),style.cssText=next,hasControlledDisplay=displayRE.test(next)}}else prev&&el.removeAttribute(`style`);vShowOriginalDisplay in el&&(el[vShowOriginalDisplay]=hasControlledDisplay?style.display:``,el[vShowHidden]&&(style.display=`none`))}const importantRE=/\s*!important$/;function setStyle(style,name$2,val){if(isArray$5(val))val.forEach(v=>setStyle(style,name$2,v));else if(val??=``,name$2.startsWith(`--`))style.setProperty(name$2,val);else{let prefixed=autoPrefix(style,name$2);importantRE.test(val)?style.setProperty(hyphenate$2(prefixed),val.replace(importantRE,``),`important`):style[prefixed]=val}}const prefixes=[`Webkit`,`Moz`,`ms`],prefixCache={};function autoPrefix(style,rawName){let cached$1=prefixCache[rawName];if(cached$1)return cached$1;let name$2=camelize(rawName);if(name$2!==`filter`&&name$2 in style)return prefixCache[rawName]=name$2;name$2=capitalize$1(name$2);for(let i=0;icachedNow||(p$3.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(initialValue,instance){let invoker=e$4=>{if(!e$4._vts)e$4._vts=Date.now();else if(e$4._vts<=invoker.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(e$4,invoker.value),instance,5,[e$4])};return invoker.value=initialValue,invoker.attached=getNow(),invoker}function patchStopImmediatePropagation(e$4,value$1){if(isArray$5(value$1)){let originalStop=e$4.stopImmediatePropagation;return e$4.stopImmediatePropagation=()=>{originalStop.call(e$4),e$4._stopped=!0},value$1.map(fn$5=>e2=>!e2._stopped&&fn$5&&fn$5(e2))}else return value$1}const isNativeOn=key$2=>key$2.charCodeAt(0)===111&&key$2.charCodeAt(1)===110&&key$2.charCodeAt(2)>96&&key$2.charCodeAt(2)<123,patchProp=(el,key$2,prevValue,nextValue,namespace,parentComponent)=>{let isSVG=namespace===`svg`;key$2===`class`?patchClass(el,nextValue,isSVG):key$2===`style`?patchStyle(el,prevValue,nextValue):isOn(key$2)?isModelListener(key$2)||patchEvent(el,key$2,prevValue,nextValue,parentComponent):(key$2[0]===`.`?(key$2=key$2.slice(1),!0):key$2[0]===`^`?(key$2=key$2.slice(1),!1):shouldSetAsProp(el,key$2,nextValue,isSVG))?(patchDOMProp(el,key$2,nextValue),!el.tagName.includes(`-`)&&(key$2===`value`||key$2===`checked`||key$2===`selected`)&&patchAttr(el,key$2,nextValue,isSVG,parentComponent,key$2!==`value`)):el._isVueCE&&(/[A-Z]/.test(key$2)||!isString$2(nextValue))?patchDOMProp(el,camelize(key$2),nextValue,parentComponent,key$2):(key$2===`true-value`?el._trueValue=nextValue:key$2===`false-value`&&(el._falseValue=nextValue),patchAttr(el,key$2,nextValue,isSVG))};function shouldSetAsProp(el,key$2,value$1,isSVG){if(isSVG)return!!(key$2===`innerHTML`||key$2===`textContent`||key$2 in el&&isNativeOn(key$2)&&isFunction$1(value$1));if(key$2===`spellcheck`||key$2===`draggable`||key$2===`translate`||key$2===`autocorrect`||key$2===`form`||key$2===`list`&&el.tagName===`INPUT`||key$2===`type`&&el.tagName===`TEXTAREA`)return!1;if(key$2===`width`||key$2===`height`){let tag=el.tagName;if(tag===`IMG`||tag===`VIDEO`||tag===`CANVAS`||tag===`SOURCE`)return!1}return isNativeOn(key$2)&&isString$2(value$1)?!1:key$2 in el}const REMOVAL={}; +function defineAsyncComponent(source){isFunction$1(source)&&(source={loader:source});let{loader:loader$1,loadingComponent,errorComponent,delay=200,hydrate:hydrateStrategy,timeout,suspensible=!0,onError:userOnError}=source,pendingRequest=null,resolvedComp,retries=0,retry=()=>(retries++,pendingRequest=null,load()),load=()=>{let thisRequest;return pendingRequest||(thisRequest=pendingRequest=loader$1().catch(err=>{if(err=err instanceof Error?err:Error(String(err)),userOnError)return new Promise((resolve$1,reject)=>{let userRetry=()=>resolve$1(retry()),userFail=()=>reject(err);userOnError(err,userRetry,userFail,retries+1)});throw err}).then(comp=>thisRequest!==pendingRequest&&pendingRequest?pendingRequest:(comp&&(comp.__esModule||comp[Symbol.toStringTag]===`Module`)&&(comp=comp.default),resolvedComp=comp,comp)))};return defineComponent({name:`AsyncComponentWrapper`,__asyncLoader:load,__asyncHydrate(el,instance,hydrate$1){let patched=!1;(instance.bu||=[]).push(()=>patched=!0);let performHydrate=()=>{patched||hydrate$1()},doHydrate=hydrateStrategy?()=>{let teardown=hydrateStrategy(performHydrate,cb$1=>forEachElement(el,cb$1));teardown&&(instance.bum||=[]).push(teardown)}:performHydrate;resolvedComp?doHydrate():load().then(()=>!instance.isUnmounted&&doHydrate())},get __asyncResolved(){return resolvedComp},setup(){let instance=currentInstance;if(markAsyncBoundary(instance),resolvedComp)return()=>createInnerComp(resolvedComp,instance);let onError=err=>{pendingRequest=null,handleError(err,instance,13,!errorComponent)};if(suspensible&&instance.suspense||isInSSRComponentSetup)return load().then(comp=>()=>createInnerComp(comp,instance)).catch(err=>(onError(err),()=>errorComponent?createVNode(errorComponent,{error:err}):null));let loaded=ref(!1),error=ref(),delayed=ref(!!delay);return delay&&setTimeout(()=>{delayed.value=!1},delay),timeout!=null&&setTimeout(()=>{if(!loaded.value&&!error.value){let err=Error(`Async component timed out after ${timeout}ms.`);onError(err),error.value=err}},timeout),load().then(()=>{loaded.value=!0,instance.parent&&isKeepAlive(instance.parent.vnode)&&instance.parent.update()}).catch(err=>{onError(err),error.value=err}),()=>{if(loaded.value&&resolvedComp)return createInnerComp(resolvedComp,instance);if(error.value&&errorComponent)return createVNode(errorComponent,{error:error.value});if(loadingComponent&&!delayed.value)return createVNode(loadingComponent)}}})}function createInnerComp(comp,parent){let{ref:ref2,props,children,ce:ce$1}=parent.vnode,vnode=createVNode(comp,props,children);return vnode.ref=ref2,vnode.ce=ce$1,delete parent.vnode.ce,vnode}const isKeepAlive=vnode=>vnode.type.__isKeepAlive,KeepAliveImpl={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(props,{slots}){let instance=getCurrentInstance(),sharedContext=instance.ctx;if(!sharedContext.renderer)return()=>{let children=slots.default&&slots.default();return children&&children.length===1?children[0]:children};let cache$1=new Map,keys$3=new Set,current=null,parentSuspense=instance.suspense,{renderer:{p:patch$1,m:move,um:_unmount,o:{createElement}}}=sharedContext,storageContainer=createElement(`div`);sharedContext.activate=(vnode,container,anchor,namespace,optimized)=>{let instance2=vnode.component;move(vnode,container,anchor,0,parentSuspense),patch$1(instance2.vnode,vnode,container,anchor,instance2,parentSuspense,namespace,vnode.slotScopeIds,optimized),queuePostRenderEffect(()=>{instance2.isDeactivated=!1,instance2.a&&invokeArrayFns(instance2.a);let vnodeHook=vnode.props&&vnode.props.onVnodeMounted;vnodeHook&&invokeVNodeHook(vnodeHook,instance2.parent,vnode)},parentSuspense)},sharedContext.deactivate=vnode=>{let instance2=vnode.component;invalidateMount(instance2.m),invalidateMount(instance2.a),move(vnode,storageContainer,null,1,parentSuspense),queuePostRenderEffect(()=>{instance2.da&&invokeArrayFns(instance2.da);let vnodeHook=vnode.props&&vnode.props.onVnodeUnmounted;vnodeHook&&invokeVNodeHook(vnodeHook,instance2.parent,vnode),instance2.isDeactivated=!0},parentSuspense)};function unmount(vnode){resetShapeFlag(vnode),_unmount(vnode,instance,parentSuspense,!0)}function pruneCache(filter$1){cache$1.forEach((vnode,key$2)=>{let name$2=getComponentName(vnode.type);name$2&&!filter$1(name$2)&&pruneCacheEntry(key$2)})}function pruneCacheEntry(key$2){let cached$1=cache$1.get(key$2);cached$1&&(!current||!isSameVNodeType(cached$1,current))?unmount(cached$1):current&&resetShapeFlag(current),cache$1.delete(key$2),keys$3.delete(key$2)}watch(()=>[props.include,props.exclude],([include,exclude])=>{include&&pruneCache(name$2=>matches(include,name$2)),exclude&&pruneCache(name$2=>!matches(exclude,name$2))},{flush:`post`,deep:!0});let pendingCacheKey=null,cacheSubtree=()=>{pendingCacheKey!=null&&(isSuspense(instance.subTree.type)?queuePostRenderEffect(()=>{cache$1.set(pendingCacheKey,getInnerChild(instance.subTree))},instance.subTree.suspense):cache$1.set(pendingCacheKey,getInnerChild(instance.subTree)))};return onMounted(cacheSubtree),onUpdated(cacheSubtree),onBeforeUnmount(()=>{cache$1.forEach(cached$1=>{let{subTree,suspense}=instance,vnode=getInnerChild(subTree);if(cached$1.type===vnode.type&&cached$1.key===vnode.key){resetShapeFlag(vnode);let da=vnode.component.da;da&&queuePostRenderEffect(da,suspense);return}unmount(cached$1)})}),()=>{if(pendingCacheKey=null,!slots.default)return current=null;let children=slots.default(),rawVNode=children[0];if(children.length>1)return current=null,children;if(!isVNode(rawVNode)||!(rawVNode.shapeFlag&4)&&!(rawVNode.shapeFlag&128))return current=null,rawVNode;let vnode=getInnerChild(rawVNode);if(vnode.type===Comment)return current=null,vnode;let comp=vnode.type,name$2=getComponentName(isAsyncWrapper(vnode)?vnode.type.__asyncResolved||{}:comp),{include,exclude,max:max$1}=props;if(include&&(!name$2||!matches(include,name$2))||exclude&&name$2&&matches(exclude,name$2))return vnode.shapeFlag&=-257,current=vnode,rawVNode;let key$2=vnode.key==null?comp:vnode.key,cachedVNode=cache$1.get(key$2);return vnode.el&&(vnode=cloneVNode(vnode),rawVNode.shapeFlag&128&&(rawVNode.ssContent=vnode)),pendingCacheKey=key$2,cachedVNode?(vnode.el=cachedVNode.el,vnode.component=cachedVNode.component,vnode.transition&&setTransitionHooks(vnode,vnode.transition),vnode.shapeFlag|=512,keys$3.delete(key$2),keys$3.add(key$2)):(keys$3.add(key$2),max$1&&keys$3.size>parseInt(max$1,10)&&pruneCacheEntry(keys$3.values().next().value)),vnode.shapeFlag|=256,current=vnode,isSuspense(rawVNode.type)?rawVNode:vnode}}},KeepAlive=KeepAliveImpl;function matches(pattern,name$2){return isArray$5(pattern)?pattern.some(p$4=>matches(p$4,name$2)):isString$2(pattern)?pattern.split(`,`).includes(name$2):isRegExp$1(pattern)?(pattern.lastIndex=0,pattern.test(name$2)):!1}function onActivated(hook,target$1){registerKeepAliveHook(hook,`a`,target$1)}function onDeactivated(hook,target$1){registerKeepAliveHook(hook,`da`,target$1)}function registerKeepAliveHook(hook,type,target$1=currentInstance){let wrappedHook=hook.__wdc||=()=>{let current=target$1;for(;current;){if(current.isDeactivated)return;current=current.parent}return hook()};if(injectHook(type,wrappedHook,target$1),target$1){let current=target$1.parent;for(;current&¤t.parent;)isKeepAlive(current.parent.vnode)&&injectToKeepAliveRoot(wrappedHook,type,target$1,current),current=current.parent}}function injectToKeepAliveRoot(hook,type,target$1,keepAliveRoot){let injected=injectHook(type,hook,keepAliveRoot,!0);onUnmounted(()=>{remove$2(keepAliveRoot[type],injected)},target$1)}function resetShapeFlag(vnode){vnode.shapeFlag&=-257,vnode.shapeFlag&=-513}function getInnerChild(vnode){return vnode.shapeFlag&128?vnode.ssContent:vnode}function injectHook(type,hook,target$1=currentInstance,prepend=!1){if(target$1){let hooks=target$1[type]||(target$1[type]=[]),wrappedHook=hook.__weh||=(...args)=>{pauseTracking();let reset=setCurrentInstance(target$1),res=callWithAsyncErrorHandling(hook,target$1,type,args);return reset(),resetTracking(),res};return prepend?hooks.unshift(wrappedHook):hooks.push(wrappedHook),wrappedHook}}const createHook=lifecycle=>(hook,target$1=currentInstance)=>{(!isInSSRComponentSetup||lifecycle===`sp`)&&injectHook(lifecycle,(...args)=>hook(...args),target$1)},onBeforeMount=createHook(`bm`),onMounted=createHook(`m`),onBeforeUpdate=createHook(`bu`),onUpdated=createHook(`u`),onBeforeUnmount=createHook(`bum`),onUnmounted=createHook(`um`),onServerPrefetch=createHook(`sp`),onRenderTriggered=createHook(`rtg`),onRenderTracked=createHook(`rtc`);function onErrorCaptured(hook,target$1=currentInstance){injectHook(`ec`,hook,target$1)}const COMPONENTS=`components`,DIRECTIVES=`directives`;function resolveComponent(name$2,maybeSelfReference){return resolveAsset(COMPONENTS,name$2,!0,maybeSelfReference)||name$2}const NULL_DYNAMIC_COMPONENT=Symbol.for(`v-ndc`);function resolveDynamicComponent(component){return isString$2(component)?resolveAsset(COMPONENTS,component,!1)||component:component||NULL_DYNAMIC_COMPONENT}function resolveDirective(name$2){return resolveAsset(DIRECTIVES,name$2)}function resolveAsset(type,name$2,warnMissing=!0,maybeSelfReference=!1){let instance=currentRenderingInstance||currentInstance;if(instance){let Component=instance.type;if(type===COMPONENTS){let selfName=getComponentName(Component,!1);if(selfName&&(selfName===name$2||selfName===camelize(name$2)||selfName===capitalize$1(camelize(name$2))))return Component}let res=resolve(instance[type]||Component[type],name$2)||resolve(instance.appContext[type],name$2);return!res&&maybeSelfReference?Component:res}}function resolve(registry$1,name$2){return registry$1&&(registry$1[name$2]||registry$1[camelize(name$2)]||registry$1[capitalize$1(camelize(name$2))])}function renderList(source,renderItem,cache$1,index$1){let ret,cached$1=cache$1&&cache$1[index$1],sourceIsArray=isArray$5(source);if(sourceIsArray||isString$2(source)){let sourceIsReactiveArray=sourceIsArray&&isReactive(source),needsWrap=!1,isReadonlySource=!1;sourceIsReactiveArray&&(needsWrap=!isShallow(source),isReadonlySource=isReadonly(source),source=shallowReadArray(source)),ret=Array(source.length);for(let i=0,l=source.length;irenderItem(item,i,void 0,cached$1&&cached$1[i]));else{let keys$3=Object.keys(source);ret=Array(keys$3.length);for(let i=0,l=keys$3.length;i{let res=slot.fn(...args);return res&&(res.key=slot.key),res}:slot.fn)}return slots}function renderSlot(slots,name$2,props={},fallback,noSlotted){if(currentRenderingInstance.ce||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.ce)return name$2!==`default`&&(props.name=name$2),openBlock(),createBlock(Fragment,null,[createVNode(`slot`,props,fallback&&fallback())],64);let slot=slots[name$2];slot&&slot._c&&(slot._d=!1),openBlock();let validSlotContent=slot&&ensureValidVNode(slot(props)),slotKey=props.key||validSlotContent&&validSlotContent.key,rendered=createBlock(Fragment,{key:(slotKey&&!isSymbol$1(slotKey)?slotKey:`_${name$2}`)+(!validSlotContent&&fallback?`_fb`:``)},validSlotContent||(fallback?fallback():[]),validSlotContent&&slots._===1?64:-2);return!noSlotted&&rendered.scopeId&&(rendered.slotScopeIds=[rendered.scopeId+`-s`]),slot&&slot._c&&(slot._d=!0),rendered}function ensureValidVNode(vnodes){return vnodes.some(child=>isVNode(child)?!(child.type===Comment||child.type===Fragment&&!ensureValidVNode(child.children)):!0)?vnodes:null}function toHandlers(obj,preserveCaseIfNecessary){let ret={};for(let key$2 in obj)ret[preserveCaseIfNecessary&&/[A-Z]/.test(key$2)?`on:${key$2}`:toHandlerKey(key$2)]=obj[key$2];return ret}const getPublicInstance=i=>i?isStatefulComponent(i)?getComponentPublicInstance(i):getPublicInstance(i.parent):null,publicPropertiesMap=extend$2(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>getPublicInstance(i.parent),$root:i=>getPublicInstance(i.root),$host:i=>i.ce,$emit:i=>i.emit,$options:i=>resolveMergedOptions(i),$forceUpdate:i=>i.f||=()=>{queueJob(i.update)},$nextTick:i=>i.n||=nextTick.bind(i.proxy),$watch:i=>instanceWatch.bind(i)}),isReservedPrefix=key$2=>key$2===`_`||key$2===`$`,hasSetupBinding=(state,key$2)=>state!==EMPTY_OBJ&&!state.__isScriptSetup&&hasOwn$4(state,key$2),PublicInstanceProxyHandlers={get({_:instance},key$2){if(key$2===`__v_skip`)return!0;let{ctx,setupState,data:data$12,props,accessCache,type,appContext}=instance,normalizedProps;if(key$2[0]!==`$`){let n=accessCache[key$2];if(n!==void 0)switch(n){case 1:return setupState[key$2];case 2:return data$12[key$2];case 4:return ctx[key$2];case 3:return props[key$2]}else if(hasSetupBinding(setupState,key$2))return accessCache[key$2]=1,setupState[key$2];else if(data$12!==EMPTY_OBJ&&hasOwn$4(data$12,key$2))return accessCache[key$2]=2,data$12[key$2];else if((normalizedProps=instance.propsOptions[0])&&hasOwn$4(normalizedProps,key$2))return accessCache[key$2]=3,props[key$2];else if(ctx!==EMPTY_OBJ&&hasOwn$4(ctx,key$2))return accessCache[key$2]=4,ctx[key$2];else shouldCacheAccess&&(accessCache[key$2]=0)}let publicGetter=publicPropertiesMap[key$2],cssModule,globalProperties;if(publicGetter)return key$2===`$attrs`&&track(instance.attrs,`get`,``),publicGetter(instance);if((cssModule=type.__cssModules)&&(cssModule=cssModule[key$2]))return cssModule;if(ctx!==EMPTY_OBJ&&hasOwn$4(ctx,key$2))return accessCache[key$2]=4,ctx[key$2];if(globalProperties=appContext.config.globalProperties,hasOwn$4(globalProperties,key$2))return globalProperties[key$2]},set({_:instance},key$2,value$1){let{data:data$12,setupState,ctx}=instance;return hasSetupBinding(setupState,key$2)?(setupState[key$2]=value$1,!0):data$12!==EMPTY_OBJ&&hasOwn$4(data$12,key$2)?(data$12[key$2]=value$1,!0):hasOwn$4(instance.props,key$2)||key$2[0]===`$`&&key$2.slice(1)in instance?!1:(ctx[key$2]=value$1,!0)},has({_:{data:data$12,setupState,accessCache,ctx,appContext,propsOptions}},key$2){let normalizedProps;return!!accessCache[key$2]||data$12!==EMPTY_OBJ&&hasOwn$4(data$12,key$2)||hasSetupBinding(setupState,key$2)||(normalizedProps=propsOptions[0])&&hasOwn$4(normalizedProps,key$2)||hasOwn$4(ctx,key$2)||hasOwn$4(publicPropertiesMap,key$2)||hasOwn$4(appContext.config.globalProperties,key$2)},defineProperty(target$1,key$2,descriptor){return descriptor.get==null?hasOwn$4(descriptor,`value`)&&this.set(target$1,key$2,descriptor.value,null):target$1._.accessCache[key$2]=0,Reflect.defineProperty(target$1,key$2,descriptor)}},RuntimeCompiledPublicInstanceProxyHandlers=extend$2({},PublicInstanceProxyHandlers,{get(target$1,key$2){if(key$2!==Symbol.unscopables)return PublicInstanceProxyHandlers.get(target$1,key$2,target$1)},has(_$1,key$2){let has=key$2[0]!==`_`&&!isGloballyAllowed(key$2);return has}});function defineProps(){return null}function defineEmits(){return null}function defineExpose(exposed){}function defineOptions(options$1){}function defineSlots(){return null}function defineModel(){}function withDefaults(props,defaults$1){return null}function useSlots(){return getContext(`useSlots`).slots}function useAttrs(){return getContext(`useAttrs`).attrs}function getContext(calledFunctionName){let i=getCurrentInstance();return i.setupContext||=createSetupContext(i)}function normalizePropsOrEmits(props){return isArray$5(props)?props.reduce((normalized,p$4)=>(normalized[p$4]=null,normalized),{}):props}function mergeDefaults(raw$3,defaults$1){let props=normalizePropsOrEmits(raw$3);for(let key$2 in defaults$1){if(key$2.startsWith(`__skip`))continue;let opt=props[key$2];opt?isArray$5(opt)||isFunction$1(opt)?opt=props[key$2]={type:opt,default:defaults$1[key$2]}:opt.default=defaults$1[key$2]:opt===null&&(opt=props[key$2]={default:defaults$1[key$2]}),opt&&defaults$1[`__skip_${key$2}`]&&(opt.skipFactory=!0)}return props}function mergeModels(a$1,b$1){return!a$1||!b$1?a$1||b$1:isArray$5(a$1)&&isArray$5(b$1)?a$1.concat(b$1):extend$2({},normalizePropsOrEmits(a$1),normalizePropsOrEmits(b$1))}function createPropsRestProxy(props,excludedKeys){let ret={};for(let key$2 in props)excludedKeys.includes(key$2)||Object.defineProperty(ret,key$2,{enumerable:!0,get:()=>props[key$2]});return ret}function withAsyncContext(getAwaitable){let ctx=getCurrentInstance(),awaitable=getAwaitable();return unsetCurrentInstance(),isPromise$1(awaitable)&&(awaitable=awaitable.catch(e$4=>{throw setCurrentInstance(ctx),e$4})),[awaitable,()=>setCurrentInstance(ctx)]}let shouldCacheAccess=!0;function applyOptions(instance){let options$1=resolveMergedOptions(instance),publicThis=instance.proxy,ctx=instance.ctx;shouldCacheAccess=!1,options$1.beforeCreate&&callHook$1(options$1.beforeCreate,instance,`bc`);let{data:dataOptions,computed:computedOptions,methods,watch:watchOptions,provide:provideOptions,inject:injectOptions,created,beforeMount,mounted,beforeUpdate,updated,activated,deactivated,beforeDestroy,beforeUnmount,destroyed,unmounted,render:render$2,renderTracked,renderTriggered,errorCaptured,serverPrefetch,expose,inheritAttrs,components,directives,filters}=options$1,checkDuplicateProperties=null;if(injectOptions&&resolveInjections(injectOptions,ctx,checkDuplicateProperties),methods)for(let key$2 in methods){let methodHandler=methods[key$2];isFunction$1(methodHandler)&&(ctx[key$2]=methodHandler.bind(publicThis))}if(dataOptions){let data$12=dataOptions.call(publicThis,publicThis);isObject$6(data$12)&&(instance.data=reactive(data$12))}if(shouldCacheAccess=!0,computedOptions)for(let key$2 in computedOptions){let opt=computedOptions[key$2],get=isFunction$1(opt)?opt.bind(publicThis,publicThis):isFunction$1(opt.get)?opt.get.bind(publicThis,publicThis):NOOP,set=!isFunction$1(opt)&&isFunction$1(opt.set)?opt.set.bind(publicThis):NOOP,c$3=computed({get,set});Object.defineProperty(ctx,key$2,{enumerable:!0,configurable:!0,get:()=>c$3.value,set:v=>c$3.value=v})}if(watchOptions)for(let key$2 in watchOptions)createWatcher(watchOptions[key$2],ctx,publicThis,key$2);if(provideOptions){let provides=isFunction$1(provideOptions)?provideOptions.call(publicThis):provideOptions;Reflect.ownKeys(provides).forEach(key$2=>{provide(key$2,provides[key$2])})}created&&callHook$1(created,instance,`c`);function registerLifecycleHook(register,hook){isArray$5(hook)?hook.forEach(_hook=>register(_hook.bind(publicThis))):hook&®ister(hook.bind(publicThis))}if(registerLifecycleHook(onBeforeMount,beforeMount),registerLifecycleHook(onMounted,mounted),registerLifecycleHook(onBeforeUpdate,beforeUpdate),registerLifecycleHook(onUpdated,updated),registerLifecycleHook(onActivated,activated),registerLifecycleHook(onDeactivated,deactivated),registerLifecycleHook(onErrorCaptured,errorCaptured),registerLifecycleHook(onRenderTracked,renderTracked),registerLifecycleHook(onRenderTriggered,renderTriggered),registerLifecycleHook(onBeforeUnmount,beforeUnmount),registerLifecycleHook(onUnmounted,unmounted),registerLifecycleHook(onServerPrefetch,serverPrefetch),isArray$5(expose))if(expose.length){let exposed=instance.exposed||={};expose.forEach(key$2=>{Object.defineProperty(exposed,key$2,{get:()=>publicThis[key$2],set:val=>publicThis[key$2]=val,enumerable:!0})})}else instance.exposed||={};render$2&&instance.render===NOOP&&(instance.render=render$2),inheritAttrs!=null&&(instance.inheritAttrs=inheritAttrs),components&&(instance.components=components),directives&&(instance.directives=directives),serverPrefetch&&markAsyncBoundary(instance)}function resolveInjections(injectOptions,ctx,checkDuplicateProperties=NOOP){for(let key$2 in isArray$5(injectOptions)&&(injectOptions=normalizeInject(injectOptions)),injectOptions){let opt=injectOptions[key$2],injected;injected=isObject$6(opt)?`default`in opt?inject(opt.from||key$2,opt.default,!0):inject(opt.from||key$2):inject(opt),isRef(injected)?Object.defineProperty(ctx,key$2,{enumerable:!0,configurable:!0,get:()=>injected.value,set:v=>injected.value=v}):ctx[key$2]=injected}}function callHook$1(hook,instance,type){callWithAsyncErrorHandling(isArray$5(hook)?hook.map(h$1=>h$1.bind(instance.proxy)):hook.bind(instance.proxy),instance,type)}function createWatcher(raw$3,ctx,publicThis,key$2){let getter=key$2.includes(`.`)?createPathGetter(publicThis,key$2):()=>publicThis[key$2];if(isString$2(raw$3)){let handler=ctx[raw$3];isFunction$1(handler)&&watch(getter,handler)}else if(isFunction$1(raw$3))watch(getter,raw$3.bind(publicThis));else if(isObject$6(raw$3))if(isArray$5(raw$3))raw$3.forEach(r$1=>createWatcher(r$1,ctx,publicThis,key$2));else{let handler=isFunction$1(raw$3.handler)?raw$3.handler.bind(publicThis):ctx[raw$3.handler];isFunction$1(handler)&&watch(getter,handler,raw$3)}}function resolveMergedOptions(instance){let base=instance.type,{mixins,extends:extendsOptions}=base,{mixins:globalMixins,optionsCache:cache$1,config:{optionMergeStrategies}}=instance.appContext,cached$1=cache$1.get(base),resolved;return cached$1?resolved=cached$1:!globalMixins.length&&!mixins&&!extendsOptions?resolved=base:(resolved={},globalMixins.length&&globalMixins.forEach(m=>mergeOptions$1(resolved,m,optionMergeStrategies,!0)),mergeOptions$1(resolved,base,optionMergeStrategies)),isObject$6(base)&&cache$1.set(base,resolved),resolved}function mergeOptions$1(to$1,from,strats,asMixin=!1){let{mixins,extends:extendsOptions}=from;for(let key$2 in extendsOptions&&mergeOptions$1(to$1,extendsOptions,strats,!0),mixins&&mixins.forEach(m=>mergeOptions$1(to$1,m,strats,!0)),from)if(!(asMixin&&key$2===`expose`)){let strat=internalOptionMergeStrats[key$2]||strats&&strats[key$2];to$1[key$2]=strat?strat(to$1[key$2],from[key$2]):from[key$2]}return to$1}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(to$1,from){return from?to$1?function(){return extend$2(isFunction$1(to$1)?to$1.call(this,this):to$1,isFunction$1(from)?from.call(this,this):from)}:from:to$1}function mergeInject(to$1,from){return mergeObjectOptions(normalizeInject(to$1),normalizeInject(from))}function normalizeInject(raw$3){if(isArray$5(raw$3)){let res={};for(let i=0;i1)return treatDefaultAsFactory&&isFunction$1(defaultValue)?defaultValue.call(instance&&instance.proxy):defaultValue}}function hasInjectionContext(){return!!(getCurrentInstance()||currentApp)}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=obj=>Object.getPrototypeOf(obj)===internalObjectProto;function initProps(instance,rawProps,isStateful,isSSR=!1){let props={},attrs=createInternalObject();for(let key$2 in instance.propsDefaults=Object.create(null),setFullProps(instance,rawProps,props,attrs),instance.propsOptions[0])key$2 in props||(props[key$2]=void 0);isStateful?instance.props=isSSR?props:shallowReactive(props):instance.type.props?instance.props=props:instance.props=attrs,instance.attrs=attrs}function updateProps(instance,rawProps,rawPrevProps,optimized){let{props,attrs,vnode:{patchFlag}}=instance,rawCurrentProps=toRaw(props),[options$1]=instance.propsOptions,hasAttrsChanged=!1;if((optimized||patchFlag>0)&&!(patchFlag&16)){if(patchFlag&8){let propsToUpdate=instance.vnode.dynamicProps;for(let i=0;i{hasExtends=!0;let[props,keys$3]=normalizePropsOptions(raw2,appContext,!0);extend$2(normalized,props),keys$3&&needCastKeys.push(...keys$3)};!asMixin&&appContext.mixins.length&&appContext.mixins.forEach(extendProps),comp.extends&&extendProps(comp.extends),comp.mixins&&comp.mixins.forEach(extendProps)}if(!raw$3&&!hasExtends)return isObject$6(comp)&&cache$1.set(comp,EMPTY_ARR),EMPTY_ARR;if(isArray$5(raw$3))for(let i=0;ikey$2===`_`||key$2===`__`||key$2===`_ctx`||key$2===`$stable`,normalizeSlotValue=value$1=>isArray$5(value$1)?value$1.map(normalizeVNode):[normalizeVNode(value$1)],normalizeSlot$1=(key$2,rawSlot,ctx)=>{if(rawSlot._n)return rawSlot;let normalized=withCtx((...args)=>normalizeSlotValue(rawSlot(...args)),ctx);return normalized._c=!1,normalized},normalizeObjectSlots=(rawSlots,slots,instance)=>{let ctx=rawSlots._ctx;for(let key$2 in rawSlots){if(isInternalKey(key$2))continue;let value$1=rawSlots[key$2];if(isFunction$1(value$1))slots[key$2]=normalizeSlot$1(key$2,value$1,ctx);else if(value$1!=null){let normalized=normalizeSlotValue(value$1);slots[key$2]=()=>normalized}}},normalizeVNodeSlots=(instance,children)=>{let normalized=normalizeSlotValue(children);instance.slots.default=()=>normalized},assignSlots=(slots,children,optimized)=>{for(let key$2 in children)(optimized||!isInternalKey(key$2))&&(slots[key$2]=children[key$2])},initSlots=(instance,children,optimized)=>{let slots=instance.slots=createInternalObject();if(instance.vnode.shapeFlag&32){let cacheIndexes=children.__;cacheIndexes&&def(slots,`__`,cacheIndexes,!0);let type=children._;type?(assignSlots(slots,children,optimized),optimized&&def(slots,`_`,type,!0)):normalizeObjectSlots(children,slots)}else children&&normalizeVNodeSlots(instance,children)},updateSlots=(instance,children,optimized)=>{let{vnode,slots}=instance,needDeletionCheck=!0,deletionComparisonTarget=EMPTY_OBJ;if(vnode.shapeFlag&32){let type=children._;type?optimized&&type===1?needDeletionCheck=!1:assignSlots(slots,children,optimized):(needDeletionCheck=!children.$stable,normalizeObjectSlots(children,slots)),deletionComparisonTarget=children}else children&&(normalizeVNodeSlots(instance,children),deletionComparisonTarget={default:1});if(needDeletionCheck)for(let key$2 in slots)!isInternalKey(key$2)&&deletionComparisonTarget[key$2]==null&&delete slots[key$2]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(options$1){return baseCreateRenderer(options$1)}function createHydrationRenderer(options$1){return baseCreateRenderer(options$1,createHydrationFunctions)}function baseCreateRenderer(options$1,createHydrationFns){let target$1=getGlobalThis$1();target$1.__VUE__=!0;let{insert:hostInsert,remove:hostRemove,patchProp:hostPatchProp,createElement:hostCreateElement,createText:hostCreateText,createComment:hostCreateComment,setText:hostSetText,setElementText:hostSetElementText,parentNode:hostParentNode,nextSibling:hostNextSibling,setScopeId:hostSetScopeId=NOOP,insertStaticContent:hostInsertStaticContent}=options$1,patch$1=(n1,n2,container,anchor=null,parentComponent=null,parentSuspense=null,namespace=void 0,slotScopeIds=null,optimized=!!n2.dynamicChildren)=>{if(n1===n2)return;n1&&!isSameVNodeType(n1,n2)&&(anchor=getNextHostNode(n1),unmount(n1,parentComponent,parentSuspense,!0),n1=null),n2.patchFlag===-2&&(optimized=!1,n2.dynamicChildren=null);let{type,ref:ref$1,shapeFlag}=n2;switch(type){case Text:processText(n1,n2,container,anchor);break;case Comment:processCommentNode(n1,n2,container,anchor);break;case Static:n1??mountStaticNode(n2,container,anchor,namespace);break;case Fragment:processFragment(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);break;default:shapeFlag&1?processElement(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized):shapeFlag&6?processComponent(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized):(shapeFlag&64||shapeFlag&128)&&type.process(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,internals)}ref$1!=null&&parentComponent?setRef(ref$1,n1&&n1.ref,parentSuspense,n2||n1,!n2):ref$1==null&&n1&&n1.ref!=null&&setRef(n1.ref,null,parentSuspense,n1,!0)},processText=(n1,n2,container,anchor)=>{if(n1==null)hostInsert(n2.el=hostCreateText(n2.children),container,anchor);else{let el=n2.el=n1.el;n2.children!==n1.children&&hostSetText(el,n2.children)}},processCommentNode=(n1,n2,container,anchor)=>{n1==null?hostInsert(n2.el=hostCreateComment(n2.children||``),container,anchor):n2.el=n1.el},mountStaticNode=(n2,container,anchor,namespace)=>{[n2.el,n2.anchor]=hostInsertStaticContent(n2.children,container,anchor,namespace,n2.el,n2.anchor)},moveStaticNode=({el,anchor},container,nextSibling)=>{let next;for(;el&&el!==anchor;)next=hostNextSibling(el),hostInsert(el,container,nextSibling),el=next;hostInsert(anchor,container,nextSibling)},removeStaticNode=({el,anchor})=>{let next;for(;el&&el!==anchor;)next=hostNextSibling(el),hostRemove(el),el=next;hostRemove(anchor)},processElement=(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{n2.type===`svg`?namespace=`svg`:n2.type===`math`&&(namespace=`mathml`),n1==null?mountElement(n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized):patchElement(n1,n2,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)},mountElement=(vnode,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{let el,vnodeHook,{props,shapeFlag,transition,dirs}=vnode;if(el=vnode.el=hostCreateElement(vnode.type,namespace,props&&props.is,props),shapeFlag&8?hostSetElementText(el,vnode.children):shapeFlag&16&&mountChildren(vnode.children,el,null,parentComponent,parentSuspense,resolveChildrenNamespace(vnode,namespace),slotScopeIds,optimized),dirs&&invokeDirectiveHook(vnode,null,parentComponent,`created`),setScopeId(el,vnode,vnode.scopeId,slotScopeIds,parentComponent),props){for(let key$2 in props)key$2!==`value`&&!isReservedProp(key$2)&&hostPatchProp(el,key$2,null,props[key$2],namespace,parentComponent);`value`in props&&hostPatchProp(el,`value`,null,props.value,namespace),(vnodeHook=props.onVnodeBeforeMount)&&invokeVNodeHook(vnodeHook,parentComponent,vnode)}dirs&&invokeDirectiveHook(vnode,null,parentComponent,`beforeMount`);let needCallTransitionHooks=needTransition(parentSuspense,transition);needCallTransitionHooks&&transition.beforeEnter(el),hostInsert(el,container,anchor),((vnodeHook=props&&props.onVnodeMounted)||needCallTransitionHooks||dirs)&&queuePostRenderEffect(()=>{vnodeHook&&invokeVNodeHook(vnodeHook,parentComponent,vnode),needCallTransitionHooks&&transition.enter(el),dirs&&invokeDirectiveHook(vnode,null,parentComponent,`mounted`)},parentSuspense)},setScopeId=(el,vnode,scopeId,slotScopeIds,parentComponent)=>{if(scopeId&&hostSetScopeId(el,scopeId),slotScopeIds)for(let i=0;i{for(let i=start;i{let el=n2.el=n1.el,{patchFlag,dynamicChildren,dirs}=n2;patchFlag|=n1.patchFlag&16;let oldProps=n1.props||EMPTY_OBJ,newProps=n2.props||EMPTY_OBJ,vnodeHook;if(parentComponent&&toggleRecurse(parentComponent,!1),(vnodeHook=newProps.onVnodeBeforeUpdate)&&invokeVNodeHook(vnodeHook,parentComponent,n2,n1),dirs&&invokeDirectiveHook(n2,n1,parentComponent,`beforeUpdate`),parentComponent&&toggleRecurse(parentComponent,!0),(oldProps.innerHTML&&newProps.innerHTML==null||oldProps.textContent&&newProps.textContent==null)&&hostSetElementText(el,``),dynamicChildren?patchBlockChildren(n1.dynamicChildren,dynamicChildren,el,parentComponent,parentSuspense,resolveChildrenNamespace(n2,namespace),slotScopeIds):optimized||patchChildren(n1,n2,el,null,parentComponent,parentSuspense,resolveChildrenNamespace(n2,namespace),slotScopeIds,!1),patchFlag>0){if(patchFlag&16)patchProps(el,oldProps,newProps,parentComponent,namespace);else if(patchFlag&2&&oldProps.class!==newProps.class&&hostPatchProp(el,`class`,null,newProps.class,namespace),patchFlag&4&&hostPatchProp(el,`style`,oldProps.style,newProps.style,namespace),patchFlag&8){let propsToUpdate=n2.dynamicProps;for(let i=0;i{vnodeHook&&invokeVNodeHook(vnodeHook,parentComponent,n2,n1),dirs&&invokeDirectiveHook(n2,n1,parentComponent,`updated`)},parentSuspense)},patchBlockChildren=(oldChildren,newChildren,fallbackContainer,parentComponent,parentSuspense,namespace,slotScopeIds)=>{for(let i=0;i{if(oldProps!==newProps){if(oldProps!==EMPTY_OBJ)for(let key$2 in oldProps)!isReservedProp(key$2)&&!(key$2 in newProps)&&hostPatchProp(el,key$2,oldProps[key$2],null,namespace,parentComponent);for(let key$2 in newProps){if(isReservedProp(key$2))continue;let next=newProps[key$2],prev=oldProps[key$2];next!==prev&&key$2!==`value`&&hostPatchProp(el,key$2,prev,next,namespace,parentComponent)}`value`in newProps&&hostPatchProp(el,`value`,oldProps.value,newProps.value,namespace)}},processFragment=(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{let fragmentStartAnchor=n2.el=n1?n1.el:hostCreateText(``),fragmentEndAnchor=n2.anchor=n1?n1.anchor:hostCreateText(``),{patchFlag,dynamicChildren,slotScopeIds:fragmentSlotScopeIds}=n2;fragmentSlotScopeIds&&(slotScopeIds=slotScopeIds?slotScopeIds.concat(fragmentSlotScopeIds):fragmentSlotScopeIds),n1==null?(hostInsert(fragmentStartAnchor,container,anchor),hostInsert(fragmentEndAnchor,container,anchor),mountChildren(n2.children||[],container,fragmentEndAnchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)):patchFlag>0&&patchFlag&64&&dynamicChildren&&n1.dynamicChildren?(patchBlockChildren(n1.dynamicChildren,dynamicChildren,container,parentComponent,parentSuspense,namespace,slotScopeIds),(n2.key!=null||parentComponent&&n2===parentComponent.subTree)&&traverseStaticChildren(n1,n2,!0)):patchChildren(n1,n2,container,fragmentEndAnchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)},processComponent=(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{n2.slotScopeIds=slotScopeIds,n1==null?n2.shapeFlag&512?parentComponent.ctx.activate(n2,container,anchor,namespace,optimized):mountComponent(n2,container,anchor,parentComponent,parentSuspense,namespace,optimized):updateComponent(n1,n2,optimized)},mountComponent=(initialVNode,container,anchor,parentComponent,parentSuspense,namespace,optimized)=>{let instance=initialVNode.component=createComponentInstance(initialVNode,parentComponent,parentSuspense);if(isKeepAlive(initialVNode)&&(instance.ctx.renderer=internals),setupComponent(instance,!1,optimized),instance.asyncDep){if(parentSuspense&&parentSuspense.registerDep(instance,setupRenderEffect,optimized),!initialVNode.el){let placeholder=instance.subTree=createVNode(Comment);processCommentNode(null,placeholder,container,anchor),initialVNode.placeholder=placeholder.el}}else setupRenderEffect(instance,initialVNode,container,anchor,parentSuspense,namespace,optimized)},updateComponent=(n1,n2,optimized)=>{let instance=n2.component=n1.component;if(shouldUpdateComponent(n1,n2,optimized))if(instance.asyncDep&&!instance.asyncResolved){updateComponentPreRender(instance,n2,optimized);return}else instance.next=n2,instance.update();else n2.el=n1.el,instance.vnode=n2},setupRenderEffect=(instance,initialVNode,container,anchor,parentSuspense,namespace,optimized)=>{let componentUpdateFn=()=>{if(instance.isMounted){let{next,bu,u,parent,vnode}=instance;{let nonHydratedAsyncRoot=locateNonHydratedAsyncRoot(instance);if(nonHydratedAsyncRoot){next&&(next.el=vnode.el,updateComponentPreRender(instance,next,optimized)),nonHydratedAsyncRoot.asyncDep.then(()=>{instance.isUnmounted||componentUpdateFn()});return}}let originNext=next,vnodeHook;toggleRecurse(instance,!1),next?(next.el=vnode.el,updateComponentPreRender(instance,next,optimized)):next=vnode,bu&&invokeArrayFns(bu),(vnodeHook=next.props&&next.props.onVnodeBeforeUpdate)&&invokeVNodeHook(vnodeHook,parent,next,vnode),toggleRecurse(instance,!0);let nextTree=renderComponentRoot(instance),prevTree=instance.subTree;instance.subTree=nextTree,patch$1(prevTree,nextTree,hostParentNode(prevTree.el),getNextHostNode(prevTree),instance,parentSuspense,namespace),next.el=nextTree.el,originNext===null&&updateHOCHostEl(instance,nextTree.el),u&&queuePostRenderEffect(u,parentSuspense),(vnodeHook=next.props&&next.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(vnodeHook,parent,next,vnode),parentSuspense)}else{let vnodeHook,{el,props}=initialVNode,{bm,m,parent,root:root$3,type}=instance,isAsyncWrapperVNode=isAsyncWrapper(initialVNode);if(toggleRecurse(instance,!1),bm&&invokeArrayFns(bm),!isAsyncWrapperVNode&&(vnodeHook=props&&props.onVnodeBeforeMount)&&invokeVNodeHook(vnodeHook,parent,initialVNode),toggleRecurse(instance,!0),el&&hydrateNode){let hydrateSubTree=()=>{instance.subTree=renderComponentRoot(instance),hydrateNode(el,instance.subTree,instance,parentSuspense,null)};isAsyncWrapperVNode&&type.__asyncHydrate?type.__asyncHydrate(el,instance,hydrateSubTree):hydrateSubTree()}else{root$3.ce&&root$3.ce._def.shadowRoot!==!1&&root$3.ce._injectChildStyle(type);let subTree=instance.subTree=renderComponentRoot(instance);patch$1(null,subTree,container,anchor,instance,parentSuspense,namespace),initialVNode.el=subTree.el}if(m&&queuePostRenderEffect(m,parentSuspense),!isAsyncWrapperVNode&&(vnodeHook=props&&props.onVnodeMounted)){let scopedInitialVNode=initialVNode;queuePostRenderEffect(()=>invokeVNodeHook(vnodeHook,parent,scopedInitialVNode),parentSuspense)}(initialVNode.shapeFlag&256||parent&&isAsyncWrapper(parent.vnode)&&parent.vnode.shapeFlag&256)&&instance.a&&queuePostRenderEffect(instance.a,parentSuspense),instance.isMounted=!0,initialVNode=container=anchor=null}};instance.scope.on();let effect$1=instance.effect=new ReactiveEffect(componentUpdateFn);instance.scope.off();let update=instance.update=effect$1.run.bind(effect$1),job=instance.job=effect$1.runIfDirty.bind(effect$1);job.i=instance,job.id=instance.uid,effect$1.scheduler=()=>queueJob(job),toggleRecurse(instance,!0),update()},updateComponentPreRender=(instance,nextVNode,optimized)=>{nextVNode.component=instance;let prevProps=instance.vnode.props;instance.vnode=nextVNode,instance.next=null,updateProps(instance,nextVNode.props,prevProps,optimized),updateSlots(instance,nextVNode.children,optimized),pauseTracking(),flushPreFlushCbs(instance),resetTracking()},patchChildren=(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized=!1)=>{let c1=n1&&n1.children,prevShapeFlag=n1?n1.shapeFlag:0,c2=n2.children,{patchFlag,shapeFlag}=n2;if(patchFlag>0){if(patchFlag&128){patchKeyedChildren(c1,c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);return}else if(patchFlag&256){patchUnkeyedChildren(c1,c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);return}}shapeFlag&8?(prevShapeFlag&16&&unmountChildren(c1,parentComponent,parentSuspense),c2!==c1&&hostSetElementText(container,c2)):prevShapeFlag&16?shapeFlag&16?patchKeyedChildren(c1,c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized):unmountChildren(c1,parentComponent,parentSuspense,!0):(prevShapeFlag&8&&hostSetElementText(container,``),shapeFlag&16&&mountChildren(c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized))},patchUnkeyedChildren=(c1,c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{c1||=EMPTY_ARR,c2||=EMPTY_ARR;let oldLength=c1.length,newLength=c2.length,commonLength=Math.min(oldLength,newLength),i;for(i=0;inewLength?unmountChildren(c1,parentComponent,parentSuspense,!0,!1,commonLength):mountChildren(c2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,commonLength)},patchKeyedChildren=(c1,c2,container,parentAnchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized)=>{let i=0,l2=c2.length,e1=c1.length-1,e2=l2-1;for(;i<=e1&&i<=e2;){let n1=c1[i],n2=c2[i]=optimized?cloneIfMounted(c2[i]):normalizeVNode(c2[i]);if(isSameVNodeType(n1,n2))patch$1(n1,n2,container,null,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);else break;i++}for(;i<=e1&&i<=e2;){let n1=c1[e1],n2=c2[e2]=optimized?cloneIfMounted(c2[e2]):normalizeVNode(c2[e2]);if(isSameVNodeType(n1,n2))patch$1(n1,n2,container,null,parentComponent,parentSuspense,namespace,slotScopeIds,optimized);else break;e1--,e2--}if(i>e1){if(i<=e2){let nextPos=e2+1,anchor=nextPose2)for(;i<=e1;)unmount(c1[i],parentComponent,parentSuspense,!0),i++;else{let s1=i,s2=i,keyToNewIndexMap=new Map;for(i=s2;i<=e2;i++){let nextChild=c2[i]=optimized?cloneIfMounted(c2[i]):normalizeVNode(c2[i]);nextChild.key!=null&&keyToNewIndexMap.set(nextChild.key,i)}let j$1,patched=0,toBePatched=e2-s2+1,moved=!1,maxNewIndexSoFar=0,newIndexToOldIndexMap=Array(toBePatched);for(i=0;i=toBePatched){unmount(prevChild,parentComponent,parentSuspense,!0);continue}let newIndex;if(prevChild.key!=null)newIndex=keyToNewIndexMap.get(prevChild.key);else for(j$1=s2;j$1<=e2;j$1++)if(newIndexToOldIndexMap[j$1-s2]===0&&isSameVNodeType(prevChild,c2[j$1])){newIndex=j$1;break}newIndex===void 0?unmount(prevChild,parentComponent,parentSuspense,!0):(newIndexToOldIndexMap[newIndex-s2]=i+1,newIndex>=maxNewIndexSoFar?maxNewIndexSoFar=newIndex:moved=!0,patch$1(prevChild,c2[newIndex],container,null,parentComponent,parentSuspense,namespace,slotScopeIds,optimized),patched++)}let increasingNewIndexSequence=moved?getSequence(newIndexToOldIndexMap):EMPTY_ARR;for(j$1=increasingNewIndexSequence.length-1,i=toBePatched-1;i>=0;i--){let nextIndex=s2+i,nextChild=c2[nextIndex],anchorVNode=c2[nextIndex+1],anchor=nextIndex+1{let{el,type,transition,children,shapeFlag}=vnode;if(shapeFlag&6){move(vnode.component.subTree,container,anchor,moveType);return}if(shapeFlag&128){vnode.suspense.move(container,anchor,moveType);return}if(shapeFlag&64){type.move(vnode,container,anchor,internals);return}if(type===Fragment){hostInsert(el,container,anchor);for(let i=0;itransition.enter(el),parentSuspense);else{let{leave,delayLeave,afterLeave}=transition,remove2=()=>{vnode.ctx.isUnmounted?hostRemove(el):hostInsert(el,container,anchor)},performLeave=()=>{leave(el,()=>{remove2(),afterLeave&&afterLeave()})};delayLeave?delayLeave(el,remove2,performLeave):performLeave()}else hostInsert(el,container,anchor)},unmount=(vnode,parentComponent,parentSuspense,doRemove=!1,optimized=!1)=>{let{type,props,ref:ref$1,children,dynamicChildren,shapeFlag,patchFlag,dirs,cacheIndex}=vnode;if(patchFlag===-2&&(optimized=!1),ref$1!=null&&(pauseTracking(),setRef(ref$1,null,parentSuspense,vnode,!0),resetTracking()),cacheIndex!=null&&(parentComponent.renderCache[cacheIndex]=void 0),shapeFlag&256){parentComponent.ctx.deactivate(vnode);return}let shouldInvokeDirs=shapeFlag&1&&dirs,shouldInvokeVnodeHook=!isAsyncWrapper(vnode),vnodeHook;if(shouldInvokeVnodeHook&&(vnodeHook=props&&props.onVnodeBeforeUnmount)&&invokeVNodeHook(vnodeHook,parentComponent,vnode),shapeFlag&6)unmountComponent(vnode.component,parentSuspense,doRemove);else{if(shapeFlag&128){vnode.suspense.unmount(parentSuspense,doRemove);return}shouldInvokeDirs&&invokeDirectiveHook(vnode,null,parentComponent,`beforeUnmount`),shapeFlag&64?vnode.type.remove(vnode,parentComponent,parentSuspense,internals,doRemove):dynamicChildren&&!dynamicChildren.hasOnce&&(type!==Fragment||patchFlag>0&&patchFlag&64)?unmountChildren(dynamicChildren,parentComponent,parentSuspense,!1,!0):(type===Fragment&&patchFlag&384||!optimized&&shapeFlag&16)&&unmountChildren(children,parentComponent,parentSuspense),doRemove&&remove$3(vnode)}(shouldInvokeVnodeHook&&(vnodeHook=props&&props.onVnodeUnmounted)||shouldInvokeDirs)&&queuePostRenderEffect(()=>{vnodeHook&&invokeVNodeHook(vnodeHook,parentComponent,vnode),shouldInvokeDirs&&invokeDirectiveHook(vnode,null,parentComponent,`unmounted`)},parentSuspense)},remove$3=vnode=>{let{type,el,anchor,transition}=vnode;if(type===Fragment){removeFragment(el,anchor);return}if(type===Static){removeStaticNode(vnode);return}let performRemove=()=>{hostRemove(el),transition&&!transition.persisted&&transition.afterLeave&&transition.afterLeave()};if(vnode.shapeFlag&1&&transition&&!transition.persisted){let{leave,delayLeave}=transition,performLeave=()=>leave(el,performRemove);delayLeave?delayLeave(vnode.el,performRemove,performLeave):performLeave()}else performRemove()},removeFragment=(cur,end)=>{let next;for(;cur!==end;)next=hostNextSibling(cur),hostRemove(cur),cur=next;hostRemove(end)},unmountComponent=(instance,parentSuspense,doRemove)=>{let{bum,scope:scope$1,job,subTree,um,m,a:a$1,parent,slots:{__:slotCacheKeys}}=instance;invalidateMount(m),invalidateMount(a$1),bum&&invokeArrayFns(bum),parent&&isArray$5(slotCacheKeys)&&slotCacheKeys.forEach(v=>{parent.renderCache[v]=void 0}),scope$1.stop(),job&&(job.flags|=8,unmount(subTree,instance,parentSuspense,doRemove)),um&&queuePostRenderEffect(um,parentSuspense),queuePostRenderEffect(()=>{instance.isUnmounted=!0},parentSuspense),parentSuspense&&parentSuspense.pendingBranch&&!parentSuspense.isUnmounted&&instance.asyncDep&&!instance.asyncResolved&&instance.suspenseId===parentSuspense.pendingId&&(parentSuspense.deps--,parentSuspense.deps===0&&parentSuspense.resolve())},unmountChildren=(children,parentComponent,parentSuspense,doRemove=!1,optimized=!1,start=0)=>{for(let i=start;i{if(vnode.shapeFlag&6)return getNextHostNode(vnode.component.subTree);if(vnode.shapeFlag&128)return vnode.suspense.next();let el=hostNextSibling(vnode.anchor||vnode.el),teleportEnd=el&&el[TeleportEndKey];return teleportEnd?hostNextSibling(teleportEnd):el},isFlushing=!1,render$2=(vnode,container,namespace)=>{vnode==null?container._vnode&&unmount(container._vnode,null,null,!0):patch$1(container._vnode||null,vnode,container,null,null,null,namespace),container._vnode=vnode,!isFlushing&&(isFlushing=!0,flushPreFlushCbs(),flushPostFlushCbs(),isFlushing=!1)},internals={p:patch$1,um:unmount,m:move,r:remove$3,mt:mountComponent,mc:mountChildren,pc:patchChildren,pbc:patchBlockChildren,n:getNextHostNode,o:options$1},hydrate$1,hydrateNode;return createHydrationFns&&([hydrate$1,hydrateNode]=createHydrationFns(internals)),{render:render$2,hydrate:hydrate$1,createApp:createAppAPI(render$2,hydrate$1)}}function resolveChildrenNamespace({type,props},currentNamespace){return currentNamespace===`svg`&&type===`foreignObject`||currentNamespace===`mathml`&&type===`annotation-xml`&&props&&props.encoding&&props.encoding.includes(`html`)?void 0:currentNamespace}function toggleRecurse({effect:effect$1,job},allowed){allowed?(effect$1.flags|=32,job.flags|=4):(effect$1.flags&=-33,job.flags&=-5)}function needTransition(parentSuspense,transition){return(!parentSuspense||parentSuspense&&!parentSuspense.pendingBranch)&&transition&&!transition.persisted}function traverseStaticChildren(n1,n2,shallow=!1){let ch1=n1.children,ch2=n2.children;if(isArray$5(ch1)&&isArray$5(ch2))for(let i=0;i>1,arr[result[c$3]]0&&(p$4[i]=result[u-1]),result[u]=i)}}for(u=result.length,v=result[u-1];u-- >0;)result[u]=v,v=p$4[v];return result}function locateNonHydratedAsyncRoot(instance){let subComponent=instance.subTree.component;if(subComponent)return subComponent.asyncDep&&!subComponent.asyncResolved?subComponent:locateNonHydratedAsyncRoot(subComponent)}function invalidateMount(hooks){if(hooks)for(let i=0;i{{let ctx=inject(ssrContextKey);return ctx}};function watchEffect(effect$1,options$1){return doWatch(effect$1,null,options$1)}function watchPostEffect(effect$1,options$1){return doWatch(effect$1,null,{flush:`post`})}function watchSyncEffect(effect$1,options$1){return doWatch(effect$1,null,{flush:`sync`})}function watch(source,cb$1,options$1){return doWatch(source,cb$1,options$1)}function doWatch(source,cb$1,options$1=EMPTY_OBJ){let{immediate,deep,flush,once}=options$1,baseWatchOptions=extend$2({},options$1),runsImmediately=cb$1&&immediate||!cb$1&&flush!==`post`,ssrCleanup;if(isInSSRComponentSetup){if(flush===`sync`){let ctx=useSSRContext();ssrCleanup=ctx.__watcherHandles||=[]}else if(!runsImmediately){let watchStopHandle=()=>{};return watchStopHandle.stop=NOOP,watchStopHandle.resume=NOOP,watchStopHandle.pause=NOOP,watchStopHandle}}let instance=currentInstance;baseWatchOptions.call=(fn$5,type,args)=>callWithAsyncErrorHandling(fn$5,instance,type,args);let isPre=!1;flush===`post`?baseWatchOptions.scheduler=job=>{queuePostRenderEffect(job,instance&&instance.suspense)}:flush!==`sync`&&(isPre=!0,baseWatchOptions.scheduler=(job,isFirstRun)=>{isFirstRun?job():queueJob(job)}),baseWatchOptions.augmentJob=job=>{cb$1&&(job.flags|=4),isPre&&(job.flags|=2,instance&&(job.id=instance.uid,job.i=instance))};let watchHandle=watch$1(source,cb$1,baseWatchOptions);return isInSSRComponentSetup&&(ssrCleanup?ssrCleanup.push(watchHandle):runsImmediately&&watchHandle()),watchHandle}function instanceWatch(source,value$1,options$1){let publicThis=this.proxy,getter=isString$2(source)?source.includes(`.`)?createPathGetter(publicThis,source):()=>publicThis[source]:source.bind(publicThis,publicThis),cb$1;isFunction$1(value$1)?cb$1=value$1:(cb$1=value$1.handler,options$1=value$1);let reset=setCurrentInstance(this),res=doWatch(getter,cb$1.bind(publicThis),options$1);return reset(),res}function createPathGetter(ctx,path){let segments=path.split(`.`);return()=>{let cur=ctx;for(let i=0;i{let localValue,prevSetValue=EMPTY_OBJ,prevEmittedValue;return watchSyncEffect(()=>{let propValue=props[camelizedName];hasChanged(localValue,propValue)&&(localValue=propValue,trigger$1())}),{get(){return track$1(),options$1.get?options$1.get(localValue):localValue},set(value$1){let emittedValue=options$1.set?options$1.set(value$1):value$1;if(!hasChanged(emittedValue,localValue)&&!(prevSetValue!==EMPTY_OBJ&&hasChanged(value$1,prevSetValue)))return;let rawProps=i.vnode.props;rawProps&&(name$2 in rawProps||camelizedName in rawProps||hyphenatedName in rawProps)&&(`onUpdate:${name$2}`in rawProps||`onUpdate:${camelizedName}`in rawProps||`onUpdate:${hyphenatedName}`in rawProps)||(localValue=value$1,trigger$1()),i.emit(`update:${name$2}`,emittedValue),hasChanged(value$1,emittedValue)&&hasChanged(value$1,prevSetValue)&&!hasChanged(emittedValue,prevEmittedValue)&&trigger$1(),prevSetValue=value$1,prevEmittedValue=emittedValue}}});return res[Symbol.iterator]=()=>{let i2=0;return{next(){return i2<2?{value:i2++?modifiers||EMPTY_OBJ:res,done:!1}:{done:!0}}}},res}const getModelModifiers=(props,modelName)=>modelName===`modelValue`||modelName===`model-value`?props.modelModifiers:props[`${modelName}Modifiers`]||props[`${camelize(modelName)}Modifiers`]||props[`${hyphenate$2(modelName)}Modifiers`];function emit(instance,event,...rawArgs){if(instance.isUnmounted)return;let props=instance.vnode.props||EMPTY_OBJ,args=rawArgs,isModelListener$1=event.startsWith(`update:`),modifiers=isModelListener$1&&getModelModifiers(props,event.slice(7));modifiers&&(modifiers.trim&&(args=rawArgs.map(a$1=>isString$2(a$1)?a$1.trim():a$1)),modifiers.number&&(args=rawArgs.map(looseToNumber)));let handlerName,handler=props[handlerName=toHandlerKey(event)]||props[handlerName=toHandlerKey(camelize(event))];!handler&&isModelListener$1&&(handler=props[handlerName=toHandlerKey(hyphenate$2(event))]),handler&&callWithAsyncErrorHandling(handler,instance,6,args);let onceHandler=props[handlerName+`Once`];if(onceHandler){if(!instance.emitted)instance.emitted={};else if(instance.emitted[handlerName])return;instance.emitted[handlerName]=!0,callWithAsyncErrorHandling(onceHandler,instance,6,args)}}function normalizeEmitsOptions(comp,appContext,asMixin=!1){let cache$1=appContext.emitsCache,cached$1=cache$1.get(comp);if(cached$1!==void 0)return cached$1;let raw$3=comp.emits,normalized={},hasExtends=!1;if(!isFunction$1(comp)){let extendEmits=raw2=>{let normalizedFromExtend=normalizeEmitsOptions(raw2,appContext,!0);normalizedFromExtend&&(hasExtends=!0,extend$2(normalized,normalizedFromExtend))};!asMixin&&appContext.mixins.length&&appContext.mixins.forEach(extendEmits),comp.extends&&extendEmits(comp.extends),comp.mixins&&comp.mixins.forEach(extendEmits)}return!raw$3&&!hasExtends?(isObject$6(comp)&&cache$1.set(comp,null),null):(isArray$5(raw$3)?raw$3.forEach(key$2=>normalized[key$2]=null):extend$2(normalized,raw$3),isObject$6(comp)&&cache$1.set(comp,normalized),normalized)}function isEmitListener(options$1,key$2){return!options$1||!isOn(key$2)?!1:(key$2=key$2.slice(2).replace(/Once$/,``),hasOwn$4(options$1,key$2[0].toLowerCase()+key$2.slice(1))||hasOwn$4(options$1,hyphenate$2(key$2))||hasOwn$4(options$1,key$2))}function renderComponentRoot(instance){let{type:Component,vnode,proxy,withProxy,propsOptions:[propsOptions],slots,attrs,emit:emit$1,render:render$2,renderCache,props,data:data$12,setupState,ctx,inheritAttrs}=instance,prev=setCurrentRenderingInstance(instance),result,fallthroughAttrs;try{if(vnode.shapeFlag&4){let proxyToUse=withProxy||proxy,thisProxy=proxyToUse;result=normalizeVNode(render$2.call(thisProxy,proxyToUse,renderCache,props,setupState,data$12,ctx)),fallthroughAttrs=attrs}else{let render2=Component;result=normalizeVNode(render2.length>1?render2(props,{attrs,slots,emit:emit$1}):render2(props,null)),fallthroughAttrs=Component.props?attrs:getFunctionalFallthrough(attrs)}}catch(err){blockStack.length=0,handleError(err,instance,1),result=createVNode(Comment)}let root$3=result;if(fallthroughAttrs&&inheritAttrs!==!1){let keys$3=Object.keys(fallthroughAttrs),{shapeFlag}=root$3;keys$3.length&&shapeFlag&7&&(propsOptions&&keys$3.some(isModelListener)&&(fallthroughAttrs=filterModelListeners(fallthroughAttrs,propsOptions)),root$3=cloneVNode(root$3,fallthroughAttrs,!1,!0))}return vnode.dirs&&(root$3=cloneVNode(root$3,null,!1,!0),root$3.dirs=root$3.dirs?root$3.dirs.concat(vnode.dirs):vnode.dirs),vnode.transition&&setTransitionHooks(root$3,vnode.transition),result=root$3,setCurrentRenderingInstance(prev),result}function filterSingleRoot(children,recurse=!0){let singleRoot;for(let i=0;i{let res;for(let key$2 in attrs)(key$2===`class`||key$2===`style`||isOn(key$2))&&((res||={})[key$2]=attrs[key$2]);return res},filterModelListeners=(attrs,props)=>{let res={};for(let key$2 in attrs)(!isModelListener(key$2)||!(key$2.slice(9)in props))&&(res[key$2]=attrs[key$2]);return res};function shouldUpdateComponent(prevVNode,nextVNode,optimized){let{props:prevProps,children:prevChildren,component}=prevVNode,{props:nextProps,children:nextChildren,patchFlag}=nextVNode,emits=component.emitsOptions;if(nextVNode.dirs||nextVNode.transition)return!0;if(optimized&&patchFlag>=0){if(patchFlag&1024)return!0;if(patchFlag&16)return prevProps?hasPropsChanged(prevProps,nextProps,emits):!!nextProps;if(patchFlag&8){let dynamicProps=nextVNode.dynamicProps;for(let i=0;itype.__isSuspense;let suspenseId=0;const SuspenseImpl={name:`Suspense`,__isSuspense:!0,process(n1,n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,rendererInternals){if(n1==null)mountSuspense(n2,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,rendererInternals);else{if(parentSuspense&&parentSuspense.deps>0&&!n1.suspense.isInFallback){n2.suspense=n1.suspense,n2.suspense.vnode=n2,n2.el=n1.el;return}patchSuspense(n1,n2,container,anchor,parentComponent,namespace,slotScopeIds,optimized,rendererInternals)}},hydrate:hydrateSuspense,normalize:normalizeSuspenseChildren},Suspense=SuspenseImpl;function triggerEvent(vnode,name$2){let eventListener=vnode.props&&vnode.props[name$2];isFunction$1(eventListener)&&eventListener()}function mountSuspense(vnode,container,anchor,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,rendererInternals){let{p:patch$1,o:{createElement}}=rendererInternals,hiddenContainer=createElement(`div`),suspense=vnode.suspense=createSuspenseBoundary(vnode,parentSuspense,parentComponent,container,hiddenContainer,anchor,namespace,slotScopeIds,optimized,rendererInternals);patch$1(null,suspense.pendingBranch=vnode.ssContent,hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds),suspense.deps>0?(triggerEvent(vnode,`onPending`),triggerEvent(vnode,`onFallback`),patch$1(null,vnode.ssFallback,container,anchor,parentComponent,null,namespace,slotScopeIds),setActiveBranch(suspense,vnode.ssFallback)):suspense.resolve(!1,!0)}function patchSuspense(n1,n2,container,anchor,parentComponent,namespace,slotScopeIds,optimized,{p:patch$1,um:unmount,o:{createElement}}){let suspense=n2.suspense=n1.suspense;suspense.vnode=n2,n2.el=n1.el;let newBranch=n2.ssContent,newFallback=n2.ssFallback,{activeBranch,pendingBranch,isInFallback,isHydrating}=suspense;if(pendingBranch)suspense.pendingBranch=newBranch,isSameVNodeType(newBranch,pendingBranch)?(patch$1(pendingBranch,newBranch,suspense.hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.deps<=0?suspense.resolve():isInFallback&&(isHydrating||(patch$1(activeBranch,newFallback,container,anchor,parentComponent,null,namespace,slotScopeIds,optimized),setActiveBranch(suspense,newFallback)))):(suspense.pendingId=suspenseId++,isHydrating?(suspense.isHydrating=!1,suspense.activeBranch=pendingBranch):unmount(pendingBranch,parentComponent,suspense),suspense.deps=0,suspense.effects.length=0,suspense.hiddenContainer=createElement(`div`),isInFallback?(patch$1(null,newBranch,suspense.hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.deps<=0?suspense.resolve():(patch$1(activeBranch,newFallback,container,anchor,parentComponent,null,namespace,slotScopeIds,optimized),setActiveBranch(suspense,newFallback))):activeBranch&&isSameVNodeType(newBranch,activeBranch)?(patch$1(activeBranch,newBranch,container,anchor,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.resolve(!0)):(patch$1(null,newBranch,suspense.hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.deps<=0&&suspense.resolve()));else if(activeBranch&&isSameVNodeType(newBranch,activeBranch))patch$1(activeBranch,newBranch,container,anchor,parentComponent,suspense,namespace,slotScopeIds,optimized),setActiveBranch(suspense,newBranch);else if(triggerEvent(n2,`onPending`),suspense.pendingBranch=newBranch,newBranch.shapeFlag&512?suspense.pendingId=newBranch.component.suspenseId:suspense.pendingId=suspenseId++,patch$1(null,newBranch,suspense.hiddenContainer,null,parentComponent,suspense,namespace,slotScopeIds,optimized),suspense.deps<=0)suspense.resolve();else{let{timeout,pendingId}=suspense;timeout>0?setTimeout(()=>{suspense.pendingId===pendingId&&suspense.fallback(newFallback)},timeout):timeout===0&&suspense.fallback(newFallback)}}function createSuspenseBoundary(vnode,parentSuspense,parentComponent,container,hiddenContainer,anchor,namespace,slotScopeIds,optimized,rendererInternals,isHydrating=!1){let{p:patch$1,m:move,um:unmount,n:next,o:{parentNode,remove:remove$3}}=rendererInternals,parentSuspenseId,isSuspensible=isVNodeSuspensible(vnode);isSuspensible&&parentSuspense&&parentSuspense.pendingBranch&&(parentSuspenseId=parentSuspense.pendingId,parentSuspense.deps++);let timeout=vnode.props?toNumber(vnode.props.timeout):void 0,initialAnchor=anchor,suspense={vnode,parent:parentSuspense,parentComponent,namespace,container,hiddenContainer,deps:0,pendingId:suspenseId++,timeout:typeof timeout==`number`?timeout:-1,activeBranch:null,pendingBranch:null,isInFallback:!isHydrating,isHydrating,isUnmounted:!1,effects:[],resolve(resume=!1,sync$2=!1){let{vnode:vnode2,activeBranch,pendingBranch,pendingId,effects,parentComponent:parentComponent2,container:container2}=suspense,delayEnter=!1;suspense.isHydrating?suspense.isHydrating=!1:resume||(delayEnter=activeBranch&&pendingBranch.transition&&pendingBranch.transition.mode===`out-in`,delayEnter&&(activeBranch.transition.afterLeave=()=>{pendingId===suspense.pendingId&&(move(pendingBranch,container2,anchor===initialAnchor?next(activeBranch):anchor,0),queuePostFlushCb(effects))}),activeBranch&&(parentNode(activeBranch.el)===container2&&(anchor=next(activeBranch)),unmount(activeBranch,parentComponent2,suspense,!0)),delayEnter||move(pendingBranch,container2,anchor,0)),setActiveBranch(suspense,pendingBranch),suspense.pendingBranch=null,suspense.isInFallback=!1;let parent=suspense.parent,hasUnresolvedAncestor=!1;for(;parent;){if(parent.pendingBranch){parent.effects.push(...effects),hasUnresolvedAncestor=!0;break}parent=parent.parent}!hasUnresolvedAncestor&&!delayEnter&&queuePostFlushCb(effects),suspense.effects=[],isSuspensible&&parentSuspense&&parentSuspense.pendingBranch&&parentSuspenseId===parentSuspense.pendingId&&(parentSuspense.deps--,parentSuspense.deps===0&&!sync$2&&parentSuspense.resolve()),triggerEvent(vnode2,`onResolve`)},fallback(fallbackVNode){if(!suspense.pendingBranch)return;let{vnode:vnode2,activeBranch,parentComponent:parentComponent2,container:container2,namespace:namespace2}=suspense;triggerEvent(vnode2,`onFallback`);let anchor2=next(activeBranch),mountFallback=()=>{suspense.isInFallback&&(patch$1(null,fallbackVNode,container2,anchor2,parentComponent2,null,namespace2,slotScopeIds,optimized),setActiveBranch(suspense,fallbackVNode))},delayEnter=fallbackVNode.transition&&fallbackVNode.transition.mode===`out-in`;delayEnter&&(activeBranch.transition.afterLeave=mountFallback),suspense.isInFallback=!0,unmount(activeBranch,parentComponent2,null,!0),!delayEnter&&mountFallback()},move(container2,anchor2,type){suspense.activeBranch&&move(suspense.activeBranch,container2,anchor2,type),suspense.container=container2},next(){return suspense.activeBranch&&next(suspense.activeBranch)},registerDep(instance,setupRenderEffect,optimized2){let isInPendingSuspense=!!suspense.pendingBranch;isInPendingSuspense&&suspense.deps++;let hydratedEl=instance.vnode.el;instance.asyncDep.catch(err=>{handleError(err,instance,0)}).then(asyncSetupResult=>{if(instance.isUnmounted||suspense.isUnmounted||suspense.pendingId!==instance.suspenseId)return;instance.asyncResolved=!0;let{vnode:vnode2}=instance;handleSetupResult(instance,asyncSetupResult,!1),hydratedEl&&(vnode2.el=hydratedEl);let placeholder=!hydratedEl&&instance.subTree.el;setupRenderEffect(instance,vnode2,parentNode(hydratedEl||instance.subTree.el),hydratedEl?null:next(instance.subTree),suspense,namespace,optimized2),placeholder&&remove$3(placeholder),updateHOCHostEl(instance,vnode2.el),isInPendingSuspense&&--suspense.deps===0&&suspense.resolve()})},unmount(parentSuspense2,doRemove){suspense.isUnmounted=!0,suspense.activeBranch&&unmount(suspense.activeBranch,parentComponent,parentSuspense2,doRemove),suspense.pendingBranch&&unmount(suspense.pendingBranch,parentComponent,parentSuspense2,doRemove)}};return suspense}function hydrateSuspense(node$1,vnode,parentComponent,parentSuspense,namespace,slotScopeIds,optimized,rendererInternals,hydrateNode){let suspense=vnode.suspense=createSuspenseBoundary(vnode,parentSuspense,parentComponent,node$1.parentNode,document.createElement(`div`),null,namespace,slotScopeIds,optimized,rendererInternals,!0),result=hydrateNode(node$1,suspense.pendingBranch=vnode.ssContent,parentComponent,suspense,slotScopeIds,optimized);return suspense.deps===0&&suspense.resolve(!1,!0),result}function normalizeSuspenseChildren(vnode){let{shapeFlag,children}=vnode,isSlotChildren=shapeFlag&32;vnode.ssContent=normalizeSuspenseSlot(isSlotChildren?children.default:children),vnode.ssFallback=isSlotChildren?normalizeSuspenseSlot(children.fallback):createVNode(Comment)}function normalizeSuspenseSlot(s){let block;if(isFunction$1(s)){let trackBlock=isBlockTreeEnabled&&s._c;trackBlock&&(s._d=!1,openBlock()),s=s(),trackBlock&&(s._d=!0,block=currentBlock,closeBlock())}if(isArray$5(s)){let singleChild=filterSingleRoot(s);s=singleChild}return s=normalizeVNode(s),block&&!s.dynamicChildren&&(s.dynamicChildren=block.filter(c$3=>c$3!==s)),s}function queueEffectWithSuspense(fn$5,suspense){suspense&&suspense.pendingBranch?isArray$5(fn$5)?suspense.effects.push(...fn$5):suspense.effects.push(fn$5):queuePostFlushCb(fn$5)}function setActiveBranch(suspense,branch){suspense.activeBranch=branch;let{vnode,parentComponent}=suspense,el=branch.el;for(;!el&&branch.component;)branch=branch.component.subTree,el=branch.el;vnode.el=el,parentComponent&&parentComponent.subTree===vnode&&(parentComponent.vnode.el=el,updateHOCHostEl(parentComponent,el))}function isVNodeSuspensible(vnode){let suspensible=vnode.props&&vnode.props.suspensible;return suspensible!=null&&suspensible!==!1}const Fragment=Symbol.for(`v-fgt`),Text=Symbol.for(`v-txt`),Comment=Symbol.for(`v-cmt`),Static=Symbol.for(`v-stc`),blockStack=[];let currentBlock=null;function openBlock(disableTracking=!1){blockStack.push(currentBlock=disableTracking?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(value$1,inVOnce=!1){isBlockTreeEnabled+=value$1,value$1<0&¤tBlock&&inVOnce&&(currentBlock.hasOnce=!0)}function setupBlock(vnode){return vnode.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(vnode),vnode}function createElementBlock(type,props,children,patchFlag,dynamicProps,shapeFlag){return setupBlock(createBaseVNode(type,props,children,patchFlag,dynamicProps,shapeFlag,!0))}function createBlock(type,props,children,patchFlag,dynamicProps){return setupBlock(createVNode(type,props,children,patchFlag,dynamicProps,!0))}function isVNode(value$1){return value$1?value$1.__v_isVNode===!0:!1}function isSameVNodeType(n1,n2){return n1.type===n2.type&&n1.key===n2.key}let vnodeArgsTransformer;function transformVNodeArgs(transformer){vnodeArgsTransformer=transformer}const normalizeKey=({key:key$2})=>key$2??null,normalizeRef=({ref:ref$1,ref_key,ref_for})=>(typeof ref$1==`number`&&(ref$1=``+ref$1),ref$1==null?null:isString$2(ref$1)||isRef(ref$1)||isFunction$1(ref$1)?{i:currentRenderingInstance,r:ref$1,k:ref_key,f:!!ref_for}:ref$1);function createBaseVNode(type,props=null,children=null,patchFlag=0,dynamicProps=null,shapeFlag=type===Fragment?0:1,isBlockNode=!1,needFullChildrenNormalization=!1){let vnode={__v_isVNode:!0,__v_skip:!0,type,props,key:props&&normalizeKey(props),ref:props&&normalizeRef(props),scopeId:currentScopeId,slotScopeIds:null,children,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag,patchFlag,dynamicProps,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return needFullChildrenNormalization?(normalizeChildren(vnode,children),shapeFlag&128&&type.normalize(vnode)):children&&(vnode.shapeFlag|=isString$2(children)?8:16),isBlockTreeEnabled>0&&!isBlockNode&¤tBlock&&(vnode.patchFlag>0||shapeFlag&6)&&vnode.patchFlag!==32&¤tBlock.push(vnode),vnode}const createVNode=_createVNode;function _createVNode(type,props=null,children=null,patchFlag=0,dynamicProps=null,isBlockNode=!1){if((!type||type===NULL_DYNAMIC_COMPONENT)&&(type=Comment),isVNode(type)){let cloned=cloneVNode(type,props,!0);return children&&normalizeChildren(cloned,children),isBlockTreeEnabled>0&&!isBlockNode&¤tBlock&&(cloned.shapeFlag&6?currentBlock[currentBlock.indexOf(type)]=cloned:currentBlock.push(cloned)),cloned.patchFlag=-2,cloned}if(isClassComponent(type)&&(type=type.__vccOpts),props){props=guardReactiveProps(props);let{class:klass,style}=props;klass&&!isString$2(klass)&&(props.class=normalizeClass(klass)),isObject$6(style)&&(isProxy(style)&&!isArray$5(style)&&(style=extend$2({},style)),props.style=normalizeStyle(style))}let shapeFlag=isString$2(type)?1:isSuspense(type)?128:isTeleport(type)?64:isObject$6(type)?4:isFunction$1(type)?2:0;return createBaseVNode(type,props,children,patchFlag,dynamicProps,shapeFlag,isBlockNode,!0)}function guardReactiveProps(props){return props?isProxy(props)||isInternalObject(props)?extend$2({},props):props:null}function cloneVNode(vnode,extraProps,mergeRef=!1,cloneTransition=!1){let{props,ref:ref$1,patchFlag,children,transition}=vnode,mergedProps=extraProps?mergeProps(props||{},extraProps):props,cloned={__v_isVNode:!0,__v_skip:!0,type:vnode.type,props:mergedProps,key:mergedProps&&normalizeKey(mergedProps),ref:extraProps&&extraProps.ref?mergeRef&&ref$1?isArray$5(ref$1)?ref$1.concat(normalizeRef(extraProps)):[ref$1,normalizeRef(extraProps)]:normalizeRef(extraProps):ref$1,scopeId:vnode.scopeId,slotScopeIds:vnode.slotScopeIds,children,target:vnode.target,targetStart:vnode.targetStart,targetAnchor:vnode.targetAnchor,staticCount:vnode.staticCount,shapeFlag:vnode.shapeFlag,patchFlag:extraProps&&vnode.type!==Fragment?patchFlag===-1?16:patchFlag|16:patchFlag,dynamicProps:vnode.dynamicProps,dynamicChildren:vnode.dynamicChildren,appContext:vnode.appContext,dirs:vnode.dirs,transition,component:vnode.component,suspense:vnode.suspense,ssContent:vnode.ssContent&&cloneVNode(vnode.ssContent),ssFallback:vnode.ssFallback&&cloneVNode(vnode.ssFallback),placeholder:vnode.placeholder,el:vnode.el,anchor:vnode.anchor,ctx:vnode.ctx,ce:vnode.ce};return transition&&cloneTransition&&setTransitionHooks(cloned,transition.clone(cloned)),cloned}function createTextVNode(text$5=` `,flag=0){return createVNode(Text,null,text$5,flag)}function createStaticVNode(content$2,numberOfNodes){let vnode=createVNode(Static,null,content$2);return vnode.staticCount=numberOfNodes,vnode}function createCommentVNode(text$5=``,asBlock=!1){return asBlock?(openBlock(),createBlock(Comment,null,text$5)):createVNode(Comment,null,text$5)}function normalizeVNode(child){return child==null||typeof child==`boolean`?createVNode(Comment):isArray$5(child)?createVNode(Fragment,null,child.slice()):isVNode(child)?cloneIfMounted(child):createVNode(Text,null,String(child))}function cloneIfMounted(child){return child.el===null&&child.patchFlag!==-1||child.memo?child:cloneVNode(child)}function normalizeChildren(vnode,children){let type=0,{shapeFlag}=vnode;if(children==null)children=null;else if(isArray$5(children))type=16;else if(typeof children==`object`)if(shapeFlag&65){let slot=children.default;slot&&(slot._c&&(slot._d=!1),normalizeChildren(vnode,slot()),slot._c&&(slot._d=!0));return}else{type=32;let slotFlag=children._;!slotFlag&&!isInternalObject(children)?children._ctx=currentRenderingInstance:slotFlag===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?children._=1:(children._=2,vnode.patchFlag|=1024))}else isFunction$1(children)?(children={default:children,_ctx:currentRenderingInstance},type=32):(children=String(children),shapeFlag&64?(type=16,children=[createTextVNode(children)]):type=8);vnode.children=children,vnode.shapeFlag|=type}function mergeProps(...args){let ret={};for(let i=0;icurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{let g=getGlobalThis$1(),registerGlobalSetter=(key$2,setter)=>{let setters;return(setters=g[key$2])||(setters=g[key$2]=[]),setters.push(setter),v=>{setters.length>1?setters.forEach(set=>set(v)):setters[0](v)}};internalSetCurrentInstance=registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`,v=>currentInstance=v),setInSSRSetupState=registerGlobalSetter(`__VUE_SSR_SETTERS__`,v=>isInSSRComponentSetup=v)}const setCurrentInstance=instance=>{let prev=currentInstance;return internalSetCurrentInstance(instance),instance.scope.on(),()=>{instance.scope.off(),internalSetCurrentInstance(prev)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)},isBuiltInTag=makeMap(`slot,component`);function isStatefulComponent(instance){return instance.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(instance,isSSR=!1,optimized=!1){isSSR&&setInSSRSetupState(isSSR);let{props,children}=instance.vnode,isStateful=isStatefulComponent(instance);initProps(instance,props,isStateful,isSSR),initSlots(instance,children,optimized||isSSR);let setupResult=isStateful?setupStatefulComponent(instance,isSSR):void 0;return isSSR&&setInSSRSetupState(!1),setupResult}function setupStatefulComponent(instance,isSSR){let Component=instance.type;instance.accessCache=Object.create(null),instance.proxy=new Proxy(instance.ctx,PublicInstanceProxyHandlers);let{setup}=Component;if(setup){pauseTracking();let setupContext=instance.setupContext=setup.length>1?createSetupContext(instance):null,reset=setCurrentInstance(instance),setupResult=callWithErrorHandling(setup,instance,0,[instance.props,setupContext]),isAsyncSetup=isPromise$1(setupResult);if(resetTracking(),reset(),(isAsyncSetup||instance.sp)&&!isAsyncWrapper(instance)&&markAsyncBoundary(instance),isAsyncSetup){if(setupResult.then(unsetCurrentInstance,unsetCurrentInstance),isSSR)return setupResult.then(resolvedResult=>{handleSetupResult(instance,resolvedResult,isSSR)}).catch(e$4=>{handleError(e$4,instance,0)});instance.asyncDep=setupResult}else handleSetupResult(instance,setupResult,isSSR)}else finishComponentSetup(instance,isSSR)}function handleSetupResult(instance,setupResult,isSSR){isFunction$1(setupResult)?instance.type.__ssrInlineRender?instance.ssrRender=setupResult:instance.render=setupResult:isObject$6(setupResult)&&(instance.setupState=proxyRefs(setupResult)),finishComponentSetup(instance,isSSR)}let compile$2,installWithProxy;function registerRuntimeCompiler(_compile){compile$2=_compile,installWithProxy=i=>{i.render._rc&&(i.withProxy=new Proxy(i.ctx,RuntimeCompiledPublicInstanceProxyHandlers))}}const isRuntimeOnly=()=>!compile$2;function finishComponentSetup(instance,isSSR,skipOptions){let Component=instance.type;if(!instance.render){if(!isSSR&&compile$2&&!Component.render){let template=Component.template||resolveMergedOptions(instance).template;if(template){let{isCustomElement,compilerOptions}=instance.appContext.config,{delimiters,compilerOptions:componentCompilerOptions}=Component,finalCompilerOptions=extend$2(extend$2({isCustomElement,delimiters},compilerOptions),componentCompilerOptions);Component.render=compile$2(template,finalCompilerOptions)}}instance.render=Component.render||NOOP,installWithProxy&&installWithProxy(instance)}{let reset=setCurrentInstance(instance);pauseTracking();try{applyOptions(instance)}finally{resetTracking(),reset()}}}const attrsProxyHandlers={get(target$1,key$2){return track(target$1,`get`,``),target$1[key$2]}};function createSetupContext(instance){let expose=exposed=>{instance.exposed=exposed||{}};return{attrs:new Proxy(instance.attrs,attrsProxyHandlers),slots:instance.slots,emit:instance.emit,expose}}function getComponentPublicInstance(instance){return instance.exposed?instance.exposeProxy||=new Proxy(proxyRefs(markRaw(instance.exposed)),{get(target$1,key$2){if(key$2 in target$1)return target$1[key$2];if(key$2 in publicPropertiesMap)return publicPropertiesMap[key$2](instance)},has(target$1,key$2){return key$2 in target$1||key$2 in publicPropertiesMap}}):instance.proxy}function getComponentName(Component,includeInferred=!0){return isFunction$1(Component)?Component.displayName||Component.name:Component.name||includeInferred&&Component.__name}function isClassComponent(value$1){return isFunction$1(value$1)&&`__vccOpts`in value$1}const computed=(getterOrOptions,debugOptions)=>{let c$3=computed$1(getterOrOptions,debugOptions,isInSSRComponentSetup);return c$3};function h(type,propsOrChildren,children){let l=arguments.length;return l===2?isObject$6(propsOrChildren)&&!isArray$5(propsOrChildren)?isVNode(propsOrChildren)?createVNode(type,null,[propsOrChildren]):createVNode(type,propsOrChildren):createVNode(type,null,propsOrChildren):(l>3?children=Array.prototype.slice.call(arguments,2):l===3&&isVNode(children)&&(children=[children]),createVNode(type,propsOrChildren,children))}function initCustomFormatter(){return;function isKeyOfType(Comp,key$2,type){let opts=Comp[type];if(isArray$5(opts)&&opts.includes(key$2)||isObject$6(opts)&&key$2 in opts||Comp.extends&&isKeyOfType(Comp.extends,key$2,type)||Comp.mixins&&Comp.mixins.some(m=>isKeyOfType(m,key$2,type)))return!0}}function withMemo(memo,render$2,cache$1,index$1){let cached$1=cache$1[index$1];if(cached$1&&isMemoSame(cached$1,memo))return cached$1;let ret=render$2();return ret.memo=memo.slice(),ret.cacheIndex=index$1,cache$1[index$1]=ret}function isMemoSame(cached$1,memo){let prev=cached$1.memo;if(prev.length!=memo.length)return!1;for(let i=0;i0&¤tBlock&¤tBlock.push(cached$1),!0}const version$1=`3.5.18`,warn$1=NOOP,ErrorTypeStrings=ErrorTypeStrings$1,devtools$2=devtools$1,setDevtoolsHook=setDevtoolsHook$1,_ssrUtils={createComponentInstance,setupComponent,renderComponentRoot,setCurrentRenderingInstance,isVNode,normalizeVNode,getComponentPublicInstance,ensureValidVNode,pushWarningContext,popWarningContext},ssrUtils=_ssrUtils,resolveFilter=null,compatUtils=null,DeprecationTypes=null;let policy;const tt$1=typeof window<`u`&&window.trustedTypes;if(tt$1)try{policy=tt$1.createPolicy(`vue`,{createHTML:val=>val})}catch{}const unsafeToTrustedHTML=policy?val=>policy.createHTML(val):val=>val,svgNS=`http://www.w3.org/2000/svg`,mathmlNS=`http://www.w3.org/1998/Math/MathML`,doc$1=typeof document<`u`?document:null,templateContainer=doc$1&&doc$1.createElement(`template`),nodeOps={insert:(child,parent,anchor)=>{parent.insertBefore(child,anchor||null)},remove:child=>{let parent=child.parentNode;parent&&parent.removeChild(child)},createElement:(tag,namespace,is,props)=>{let el=namespace===`svg`?doc$1.createElementNS(svgNS,tag):namespace===`mathml`?doc$1.createElementNS(mathmlNS,tag):is?doc$1.createElement(tag,{is}):doc$1.createElement(tag);return tag===`select`&&props&&props.multiple!=null&&el.setAttribute(`multiple`,props.multiple),el},createText:text$5=>doc$1.createTextNode(text$5),createComment:text$5=>doc$1.createComment(text$5),setText:(node$1,text$5)=>{node$1.nodeValue=text$5},setElementText:(el,text$5)=>{el.textContent=text$5},parentNode:node$1=>node$1.parentNode,nextSibling:node$1=>node$1.nextSibling,querySelector:selector=>doc$1.querySelector(selector),setScopeId(el,id){el.setAttribute(id,``)},insertStaticContent(content$2,parent,anchor,namespace,start,end){let before=anchor?anchor.previousSibling:parent.lastChild;if(start&&(start===end||start.nextSibling))for(;parent.insertBefore(start.cloneNode(!0),anchor),!(start===end||!(start=start.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(namespace===`svg`?`${content$2}`:namespace===`mathml`?`${content$2}`:content$2);let template=templateContainer.content;if(namespace===`svg`||namespace===`mathml`){let wrapper=template.firstChild;for(;wrapper.firstChild;)template.appendChild(wrapper.firstChild);template.removeChild(wrapper)}parent.insertBefore(template,anchor)}return[before?before.nextSibling:parent.firstChild,anchor?anchor.previousSibling:parent.lastChild]}},TRANSITION=`transition`,ANIMATION=`animation`,vtcKey=Symbol(`_vtc`),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$2({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=t$1=>(t$1.displayName=`Transition`,t$1.props=TransitionPropsValidators,t$1),Transition=decorate$1((props,{slots})=>h(BaseTransition,resolveTransitionProps(props),slots)),callHook=(hook,args=[])=>{isArray$5(hook)?hook.forEach(h2=>h2(...args)):hook&&hook(...args)},hasExplicitCallback=hook=>hook?isArray$5(hook)?hook.some(h2=>h2.length>1):hook.length>1:!1;function resolveTransitionProps(rawProps){let baseProps={};for(let key$2 in rawProps)key$2 in DOMTransitionPropsValidators||(baseProps[key$2]=rawProps[key$2]);if(rawProps.css===!1)return baseProps;let{name:name$2=`v`,type,duration:duration$2,enterFromClass=`${name$2}-enter-from`,enterActiveClass=`${name$2}-enter-active`,enterToClass=`${name$2}-enter-to`,appearFromClass=enterFromClass,appearActiveClass=enterActiveClass,appearToClass=enterToClass,leaveFromClass=`${name$2}-leave-from`,leaveActiveClass=`${name$2}-leave-active`,leaveToClass=`${name$2}-leave-to`}=rawProps,durations=normalizeDuration(duration$2),enterDuration=durations&&durations[0],leaveDuration=durations&&durations[1],{onBeforeEnter,onEnter,onEnterCancelled,onLeave,onLeaveCancelled,onBeforeAppear=onBeforeEnter,onAppear=onEnter,onAppearCancelled=onEnterCancelled}=baseProps,finishEnter=(el,isAppear,done,isCancelled)=>{el._enterCancelled=isCancelled,removeTransitionClass(el,isAppear?appearToClass:enterToClass),removeTransitionClass(el,isAppear?appearActiveClass:enterActiveClass),done&&done()},finishLeave=(el,done)=>{el._isLeaving=!1,removeTransitionClass(el,leaveFromClass),removeTransitionClass(el,leaveToClass),removeTransitionClass(el,leaveActiveClass),done&&done()},makeEnterHook=isAppear=>(el,done)=>{let hook=isAppear?onAppear:onEnter,resolve$1=()=>finishEnter(el,isAppear,done);callHook(hook,[el,resolve$1]),nextFrame(()=>{removeTransitionClass(el,isAppear?appearFromClass:enterFromClass),addTransitionClass(el,isAppear?appearToClass:enterToClass),!hasExplicitCallback(hook)&&whenTransitionEnds(el,type,enterDuration,resolve$1)})};return extend$2(baseProps,{onBeforeEnter(el){callHook(onBeforeEnter,[el]),addTransitionClass(el,enterFromClass),addTransitionClass(el,enterActiveClass)},onBeforeAppear(el){callHook(onBeforeAppear,[el]),addTransitionClass(el,appearFromClass),addTransitionClass(el,appearActiveClass)},onEnter:makeEnterHook(!1),onAppear:makeEnterHook(!0),onLeave(el,done){el._isLeaving=!0;let resolve$1=()=>finishLeave(el,done);addTransitionClass(el,leaveFromClass),el._enterCancelled?(addTransitionClass(el,leaveActiveClass),forceReflow()):(forceReflow(),addTransitionClass(el,leaveActiveClass)),nextFrame(()=>{el._isLeaving&&(removeTransitionClass(el,leaveFromClass),addTransitionClass(el,leaveToClass),!hasExplicitCallback(onLeave))&&whenTransitionEnds(el,type,leaveDuration,resolve$1)}),callHook(onLeave,[el,resolve$1])},onEnterCancelled(el){finishEnter(el,!1,void 0,!0),callHook(onEnterCancelled,[el])},onAppearCancelled(el){finishEnter(el,!0,void 0,!0),callHook(onAppearCancelled,[el])},onLeaveCancelled(el){finishLeave(el),callHook(onLeaveCancelled,[el])}})}function normalizeDuration(duration$2){if(duration$2==null)return null;if(isObject$6(duration$2))return[NumberOf(duration$2.enter),NumberOf(duration$2.leave)];{let n=NumberOf(duration$2);return[n,n]}}function NumberOf(val){let res=toNumber(val);return res}function addTransitionClass(el,cls){cls.split(/\s+/).forEach(c$3=>c$3&&el.classList.add(c$3)),(el[vtcKey]||(el[vtcKey]=new Set)).add(cls)}function removeTransitionClass(el,cls){cls.split(/\s+/).forEach(c$3=>c$3&&el.classList.remove(c$3));let _vtc=el[vtcKey];_vtc&&(_vtc.delete(cls),!_vtc.size&&(el[vtcKey]=void 0))}function nextFrame(cb$1){requestAnimationFrame(()=>{requestAnimationFrame(cb$1)})}let endId=0;function whenTransitionEnds(el,expectedType,explicitTimeout,resolve$1){let id=el._endId=++endId,resolveIfNotStale=()=>{id===el._endId&&resolve$1()};if(explicitTimeout!=null)return setTimeout(resolveIfNotStale,explicitTimeout);let{type,timeout,propCount}=getTransitionInfo(el,expectedType);if(!type)return resolve$1();let endEvent=type+`end`,ended=0,end=()=>{el.removeEventListener(endEvent,onEnd),resolveIfNotStale()},onEnd=e$4=>{e$4.target===el&&++ended>=propCount&&end()};setTimeout(()=>{ended(styles[key$2]||``).split(`, `),transitionDelays=getStyleProperties(`${TRANSITION}Delay`),transitionDurations=getStyleProperties(`${TRANSITION}Duration`),transitionTimeout=getTimeout(transitionDelays,transitionDurations),animationDelays=getStyleProperties(`${ANIMATION}Delay`),animationDurations=getStyleProperties(`${ANIMATION}Duration`),animationTimeout=getTimeout(animationDelays,animationDurations),type=null,timeout=0,propCount=0;expectedType===TRANSITION?transitionTimeout>0&&(type=TRANSITION,timeout=transitionTimeout,propCount=transitionDurations.length):expectedType===ANIMATION?animationTimeout>0&&(type=ANIMATION,timeout=animationTimeout,propCount=animationDurations.length):(timeout=Math.max(transitionTimeout,animationTimeout),type=timeout>0?transitionTimeout>animationTimeout?TRANSITION:ANIMATION:null,propCount=type?type===TRANSITION?transitionDurations.length:animationDurations.length:0);let hasTransform=type===TRANSITION&&/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION}Property`).toString());return{type,timeout,propCount,hasTransform}}function getTimeout(delays,durations){for(;delays.lengthtoMs(d)+toMs(delays[i])))}function toMs(s){return s===`auto`?0:Number(s.slice(0,-1).replace(`,`,`.`))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(el,value$1,isSVG){let transitionClasses=el[vtcKey];transitionClasses&&(value$1=(value$1?[value$1,...transitionClasses]:[...transitionClasses]).join(` `)),value$1==null?el.removeAttribute(`class`):isSVG?el.setAttribute(`class`,value$1):el.className=value$1}const vShowOriginalDisplay=Symbol(`_vod`),vShowHidden=Symbol(`_vsh`),vShow={beforeMount(el,{value:value$1},{transition}){el[vShowOriginalDisplay]=el.style.display===`none`?``:el.style.display,transition&&value$1?transition.beforeEnter(el):setDisplay(el,value$1)},mounted(el,{value:value$1},{transition}){transition&&value$1&&transition.enter(el)},updated(el,{value:value$1,oldValue},{transition}){!value$1!=!oldValue&&(transition?value$1?(transition.beforeEnter(el),setDisplay(el,!0),transition.enter(el)):transition.leave(el,()=>{setDisplay(el,!1)}):setDisplay(el,value$1))},beforeUnmount(el,{value:value$1}){setDisplay(el,value$1)}};function setDisplay(el,value$1){el.style.display=value$1?el[vShowOriginalDisplay]:`none`,el[vShowHidden]=!value$1}function initVShowForSSR(){vShow.getSSRProps=({value:value$1})=>{if(!value$1)return{style:{display:`none`}}}}const CSS_VAR_TEXT=Symbol(``);function useCssVars(getter){let instance=getCurrentInstance();if(!instance)return;let updateTeleports=instance.ut=(vars=getter(instance.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach(node$1=>setVarsOnNode(node$1,vars))},setVars=()=>{let vars=getter(instance.proxy);instance.ce?setVarsOnNode(instance.ce,vars):setVarsOnVNode(instance.subTree,vars),updateTeleports(vars)};onBeforeUpdate(()=>{queuePostFlushCb(setVars)}),onMounted(()=>{watch(setVars,NOOP,{flush:`post`});let ob=new MutationObserver(setVars);ob.observe(instance.subTree.el.parentNode,{childList:!0}),onUnmounted(()=>ob.disconnect())})}function setVarsOnVNode(vnode,vars){if(vnode.shapeFlag&128){let suspense=vnode.suspense;vnode=suspense.activeBranch,suspense.pendingBranch&&!suspense.isHydrating&&suspense.effects.push(()=>{setVarsOnVNode(suspense.activeBranch,vars)})}for(;vnode.component;)vnode=vnode.component.subTree;if(vnode.shapeFlag&1&&vnode.el)setVarsOnNode(vnode.el,vars);else if(vnode.type===Fragment)vnode.children.forEach(c$3=>setVarsOnVNode(c$3,vars));else if(vnode.type===Static){let{el,anchor}=vnode;for(;el&&(setVarsOnNode(el,vars),el!==anchor);)el=el.nextSibling}}function setVarsOnNode(el,vars){if(el.nodeType===1){let style=el.style,cssText=``;for(let key$2 in vars){let value$1=normalizeCssVarValue(vars[key$2]);style.setProperty(`--${key$2}`,value$1),cssText+=`--${key$2}: ${value$1};`}style[CSS_VAR_TEXT]=cssText}}const displayRE=/(^|;)\s*display\s*:/;function patchStyle(el,prev,next){let style=el.style,isCssString=isString$2(next),hasControlledDisplay=!1;if(next&&!isCssString){if(prev)if(isString$2(prev))for(let prevStyle of prev.split(`;`)){let key$2=prevStyle.slice(0,prevStyle.indexOf(`:`)).trim();next[key$2]??setStyle(style,key$2,``)}else for(let key$2 in prev)next[key$2]??setStyle(style,key$2,``);for(let key$2 in next)key$2===`display`&&(hasControlledDisplay=!0),setStyle(style,key$2,next[key$2])}else if(isCssString){if(prev!==next){let cssVarText=style[CSS_VAR_TEXT];cssVarText&&(next+=`;`+cssVarText),style.cssText=next,hasControlledDisplay=displayRE.test(next)}}else prev&&el.removeAttribute(`style`);vShowOriginalDisplay in el&&(el[vShowOriginalDisplay]=hasControlledDisplay?style.display:``,el[vShowHidden]&&(style.display=`none`))}const importantRE=/\s*!important$/;function setStyle(style,name$2,val){if(isArray$5(val))val.forEach(v=>setStyle(style,name$2,v));else if(val??=``,name$2.startsWith(`--`))style.setProperty(name$2,val);else{let prefixed=autoPrefix(style,name$2);importantRE.test(val)?style.setProperty(hyphenate$2(prefixed),val.replace(importantRE,``),`important`):style[prefixed]=val}}const prefixes=[`Webkit`,`Moz`,`ms`],prefixCache={};function autoPrefix(style,rawName){let cached$1=prefixCache[rawName];if(cached$1)return cached$1;let name$2=camelize(rawName);if(name$2!==`filter`&&name$2 in style)return prefixCache[rawName]=name$2;name$2=capitalize$1(name$2);for(let i=0;icachedNow||(p$3.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(initialValue,instance){let invoker=e$4=>{if(!e$4._vts)e$4._vts=Date.now();else if(e$4._vts<=invoker.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(e$4,invoker.value),instance,5,[e$4])};return invoker.value=initialValue,invoker.attached=getNow(),invoker}function patchStopImmediatePropagation(e$4,value$1){if(isArray$5(value$1)){let originalStop=e$4.stopImmediatePropagation;return e$4.stopImmediatePropagation=()=>{originalStop.call(e$4),e$4._stopped=!0},value$1.map(fn$5=>e2=>!e2._stopped&&fn$5&&fn$5(e2))}else return value$1}const isNativeOn=key$2=>key$2.charCodeAt(0)===111&&key$2.charCodeAt(1)===110&&key$2.charCodeAt(2)>96&&key$2.charCodeAt(2)<123,patchProp=(el,key$2,prevValue,nextValue,namespace,parentComponent)=>{let isSVG=namespace===`svg`;key$2===`class`?patchClass(el,nextValue,isSVG):key$2===`style`?patchStyle(el,prevValue,nextValue):isOn(key$2)?isModelListener(key$2)||patchEvent(el,key$2,prevValue,nextValue,parentComponent):(key$2[0]===`.`?(key$2=key$2.slice(1),!0):key$2[0]===`^`?(key$2=key$2.slice(1),!1):shouldSetAsProp(el,key$2,nextValue,isSVG))?(patchDOMProp(el,key$2,nextValue),!el.tagName.includes(`-`)&&(key$2===`value`||key$2===`checked`||key$2===`selected`)&&patchAttr(el,key$2,nextValue,isSVG,parentComponent,key$2!==`value`)):el._isVueCE&&(/[A-Z]/.test(key$2)||!isString$2(nextValue))?patchDOMProp(el,camelize(key$2),nextValue,parentComponent,key$2):(key$2===`true-value`?el._trueValue=nextValue:key$2===`false-value`&&(el._falseValue=nextValue),patchAttr(el,key$2,nextValue,isSVG))};function shouldSetAsProp(el,key$2,value$1,isSVG){if(isSVG)return!!(key$2===`innerHTML`||key$2===`textContent`||key$2 in el&&isNativeOn(key$2)&&isFunction$1(value$1));if(key$2===`spellcheck`||key$2===`draggable`||key$2===`translate`||key$2===`autocorrect`||key$2===`form`||key$2===`list`&&el.tagName===`INPUT`||key$2===`type`&&el.tagName===`TEXTAREA`)return!1;if(key$2===`width`||key$2===`height`){let tag=el.tagName;if(tag===`IMG`||tag===`VIDEO`||tag===`CANVAS`||tag===`SOURCE`)return!1}return isNativeOn(key$2)&&isString$2(value$1)?!1:key$2 in el}const REMOVAL={}; /*! #__NO_SIDE_EFFECTS__ */ function defineCustomElement(options$1,extraOptions,_createApp){let Comp=defineComponent(options$1,extraOptions);isPlainObject$7(Comp)&&extend$2(Comp,extraOptions);class VueCustomElement extends VueElement{constructor(initialProps){super(Comp,initialProps,_createApp)}}return VueCustomElement.def=Comp,VueCustomElement} /*! #__NO_SIDE_EFFECTS__ */ -const defineSSRCustomElement=(options$1,extraOptions)=>defineCustomElement(options$1,extraOptions,createSSRApp),BaseClass=typeof HTMLElement<`u`?HTMLElement:class{};var VueElement=class VueElement extends BaseClass{constructor(_def,_props={},_createApp=createApp){super(),this._def=_def,this._props=_props,this._createApp=_createApp,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&_createApp!==createApp?this._root=this.shadowRoot:_def.shadowRoot===!1?this._root=this:(this.attachShadow({mode:`open`}),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let parent=this;for(;parent&&=parent.parentNode||parent.host;)if(parent instanceof VueElement){this._parent=parent;break}this._instance||(this._resolved?this._mount(this._def):parent&&parent._pendingResolve?this._pendingResolve=parent._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(parent=this._parent){parent&&(this._instance.parent=parent._instance,this._inheritParentContext(parent))}_inheritParentContext(parent=this._parent){parent&&this._app&&Object.setPrototypeOf(this._app._context.provides,parent._instance.provides)}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i{for(let m of mutations$1)this._setAttr(m.attributeName)}),this._ob.observe(this,{attributes:!0});let resolve$1=(def$1,isAsync=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props,styles}=def$1,numberProps;if(props&&!isArray$5(props))for(let key$2 in props){let opt=props[key$2];(opt===Number||opt&&opt.type===Number)&&(key$2 in this._props&&(this._props[key$2]=toNumber(this._props[key$2])),(numberProps||=Object.create(null))[camelize(key$2)]=!0)}this._numberProps=numberProps,this._resolveProps(def$1),this.shadowRoot&&this._applyStyles(styles),this._mount(def$1)},asyncDef=this._def.__asyncLoader;asyncDef?this._pendingResolve=asyncDef().then(def$1=>{def$1.configureApp=this._def.configureApp,resolve$1(this._def=def$1,!0)}):resolve$1(this._def)}_mount(def$1){this._app=this._createApp(def$1),this._inheritParentContext(),def$1.configureApp&&def$1.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let exposed=this._instance&&this._instance.exposed;if(exposed)for(let key$2 in exposed)hasOwn$4(this,key$2)||Object.defineProperty(this,key$2,{get:()=>unref(exposed[key$2])})}_resolveProps(def$1){let{props}=def$1,declaredPropKeys=isArray$5(props)?props:Object.keys(props||{});for(let key$2 of Object.keys(this))key$2[0]!==`_`&&declaredPropKeys.includes(key$2)&&this._setProp(key$2,this[key$2]);for(let key$2 of declaredPropKeys.map(camelize))Object.defineProperty(this,key$2,{get(){return this._getProp(key$2)},set(val){this._setProp(key$2,val,!0,!0)}})}_setAttr(key$2){if(key$2.startsWith(`data-v-`))return;let has=this.hasAttribute(key$2),value$1=has?this.getAttribute(key$2):REMOVAL,camelKey=camelize(key$2);has&&this._numberProps&&this._numberProps[camelKey]&&(value$1=toNumber(value$1)),this._setProp(camelKey,value$1,!1,!0)}_getProp(key$2){return this._props[key$2]}_setProp(key$2,val,shouldReflect=!0,shouldUpdate=!1){if(val!==this._props[key$2]&&(val===REMOVAL?delete this._props[key$2]:(this._props[key$2]=val,key$2===`key`&&this._app&&(this._app._ceVNode.key=val)),shouldUpdate&&this._instance&&this._update(),shouldReflect)){let ob=this._ob;ob&&ob.disconnect(),val===!0?this.setAttribute(hyphenate$2(key$2),``):typeof val==`string`||typeof val==`number`?this.setAttribute(hyphenate$2(key$2),val+``):val||this.removeAttribute(hyphenate$2(key$2)),ob&&ob.observe(this,{attributes:!0})}}_update(){let vnode=this._createVNode();this._app&&(vnode.appContext=this._app._context),render$1(vnode,this._root)}_createVNode(){let baseProps={};this.shadowRoot||(baseProps.onVnodeMounted=baseProps.onVnodeUpdated=this._renderSlots.bind(this));let vnode=createVNode(this._def,extend$2(baseProps,this._props));return this._instance||(vnode.ce=instance=>{this._instance=instance,instance.ce=this,instance.isCE=!0;let dispatch=(event,args)=>{this.dispatchEvent(new CustomEvent(event,isPlainObject$7(args[0])?extend$2({detail:args},args[0]):{detail:args}))};instance.emit=(event,...args)=>{dispatch(event,args),hyphenate$2(event)!==event&&dispatch(hyphenate$2(event),args)},this._setParent()}),vnode}_applyStyles(styles,owner){if(!styles)return;if(owner){if(owner===this._def||this._styleChildren.has(owner))return;this._styleChildren.add(owner)}let nonce=this._nonce;for(let i=styles.length-1;i>=0;i--){let s=document.createElement(`style`);nonce&&s.setAttribute(`nonce`,nonce),s.textContent=styles[i],this.shadowRoot.prepend(s)}}_parseSlots(){let slots=this._slots={},n;for(;n=this.firstChild;){let slotName=n.nodeType===1&&n.getAttribute(`slot`)||`default`;(slots[slotName]||(slots[slotName]=[])).push(n),this.removeChild(n)}}_renderSlots(){let outlets=(this._teleportTarget||this).querySelectorAll(`slot`),scopeId=this._instance.type.__scopeId;for(let i=0;i(delete t$1.props.mode,t$1),TransitionGroupImpl=decorate({name:`TransitionGroup`,props:extend$2({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(props,{slots}){let instance=getCurrentInstance(),state=useTransitionState(),prevChildren,children;return onUpdated(()=>{if(!prevChildren.length)return;let moveClass=props.moveClass||`${props.name||`v`}-move`;if(!hasCSSTransform(prevChildren[0].el,instance.vnode.el,moveClass)){prevChildren=[];return}prevChildren.forEach(callPendingCbs),prevChildren.forEach(recordPosition);let movedChildren=prevChildren.filter(applyTranslation);forceReflow(),movedChildren.forEach(c$3=>{let el=c$3.el,style=el.style;addTransitionClass(el,moveClass),style.transform=style.webkitTransform=style.transitionDuration=``;let cb$1=el[moveCbKey]=e$4=>{!(e$4&&e$4.target!==el)&&(!e$4||/transform$/.test(e$4.propertyName))&&(el.removeEventListener(`transitionend`,cb$1),el[moveCbKey]=null,removeTransitionClass(el,moveClass))};el.addEventListener(`transitionend`,cb$1)}),prevChildren=[]}),()=>{let rawProps=toRaw(props),cssTransitionProps=resolveTransitionProps(rawProps),tag=rawProps.tag||Fragment;if(prevChildren=[],children)for(let i=0;i{cls.split(/\s+/).forEach(c$3=>c$3&&clone$3.classList.remove(c$3))}),moveClass.split(/\s+/).forEach(c$3=>c$3&&clone$3.classList.add(c$3)),clone$3.style.display=`none`;let container=root$3.nodeType===1?root$3:root$3.parentNode;container.appendChild(clone$3);let{hasTransform}=getTransitionInfo(clone$3);return container.removeChild(clone$3),hasTransform}const getModelAssigner=vnode=>{let fn$5=vnode.props[`onUpdate:modelValue`]||!1;return isArray$5(fn$5)?value$1=>invokeArrayFns(fn$5,value$1):fn$5};function onCompositionStart(e$4){e$4.target.composing=!0}function onCompositionEnd(e$4){let target$1=e$4.target;target$1.composing&&(target$1.composing=!1,target$1.dispatchEvent(new Event(`input`)))}const assignKey=Symbol(`_assign`),vModelText={created(el,{modifiers:{lazy,trim,number:number$5}},vnode){el[assignKey]=getModelAssigner(vnode);let castToNumber=number$5||vnode.props&&vnode.props.type===`number`;addEventListener(el,lazy?`change`:`input`,e$4=>{if(e$4.target.composing)return;let domValue=el.value;trim&&(domValue=domValue.trim()),castToNumber&&(domValue=looseToNumber(domValue)),el[assignKey](domValue)}),trim&&addEventListener(el,`change`,()=>{el.value=el.value.trim()}),lazy||(addEventListener(el,`compositionstart`,onCompositionStart),addEventListener(el,`compositionend`,onCompositionEnd),addEventListener(el,`change`,onCompositionEnd))},mounted(el,{value:value$1}){el.value=value$1??``},beforeUpdate(el,{value:value$1,oldValue,modifiers:{lazy,trim,number:number$5}},vnode){if(el[assignKey]=getModelAssigner(vnode),el.composing)return;let elValue=(number$5||el.type===`number`)&&!/^0\d/.test(el.value)?looseToNumber(el.value):el.value,newValue=value$1??``;if(elValue!==newValue){if(document.activeElement===el&&el.type!==`range`&&(lazy&&value$1===oldValue||trim&&el.value.trim()===newValue))return;el.value=newValue}}},vModelCheckbox={deep:!0,created(el,_$1,vnode){el[assignKey]=getModelAssigner(vnode),addEventListener(el,`change`,()=>{let modelValue=el._modelValue,elementValue=getValue$1(el),checked=el.checked,assign$3=el[assignKey];if(isArray$5(modelValue)){let index$1=looseIndexOf(modelValue,elementValue),found=index$1!==-1;if(checked&&!found)assign$3(modelValue.concat(elementValue));else if(!checked&&found){let filtered=[...modelValue];filtered.splice(index$1,1),assign$3(filtered)}}else if(isSet(modelValue)){let cloned=new Set(modelValue);checked?cloned.add(elementValue):cloned.delete(elementValue),assign$3(cloned)}else assign$3(getCheckboxValue(el,checked))})},mounted:setChecked,beforeUpdate(el,binding,vnode){el[assignKey]=getModelAssigner(vnode),setChecked(el,binding,vnode)}};function setChecked(el,{value:value$1,oldValue},vnode){el._modelValue=value$1;let checked;if(isArray$5(value$1))checked=looseIndexOf(value$1,vnode.props.value)>-1;else if(isSet(value$1))checked=value$1.has(vnode.props.value);else{if(value$1===oldValue)return;checked=looseEqual(value$1,getCheckboxValue(el,!0))}el.checked!==checked&&(el.checked=checked)}const vModelRadio={created(el,{value:value$1},vnode){el.checked=looseEqual(value$1,vnode.props.value),el[assignKey]=getModelAssigner(vnode),addEventListener(el,`change`,()=>{el[assignKey](getValue$1(el))})},beforeUpdate(el,{value:value$1,oldValue},vnode){el[assignKey]=getModelAssigner(vnode),value$1!==oldValue&&(el.checked=looseEqual(value$1,vnode.props.value))}},vModelSelect={deep:!0,created(el,{value:value$1,modifiers:{number:number$5}},vnode){let isSetModel=isSet(value$1);addEventListener(el,`change`,()=>{let selectedVal=Array.prototype.filter.call(el.options,o=>o.selected).map(o=>number$5?looseToNumber(getValue$1(o)):getValue$1(o));el[assignKey](el.multiple?isSetModel?new Set(selectedVal):selectedVal:selectedVal[0]),el._assigning=!0,nextTick(()=>{el._assigning=!1})}),el[assignKey]=getModelAssigner(vnode)},mounted(el,{value:value$1}){setSelected(el,value$1)},beforeUpdate(el,_binding,vnode){el[assignKey]=getModelAssigner(vnode)},updated(el,{value:value$1}){el._assigning||setSelected(el,value$1)}};function setSelected(el,value$1){let isMultiple=el.multiple,isArrayValue=isArray$5(value$1);if(!(isMultiple&&!isArrayValue&&!isSet(value$1))){for(let i=0,l=el.options.length;iString(v)===String(optionValue)):option$1.selected=looseIndexOf(value$1,optionValue)>-1}else option$1.selected=value$1.has(optionValue);else if(looseEqual(getValue$1(option$1),value$1)){el.selectedIndex!==i&&(el.selectedIndex=i);return}}!isMultiple&&el.selectedIndex!==-1&&(el.selectedIndex=-1)}}function getValue$1(el){return`_value`in el?el._value:el.value}function getCheckboxValue(el,checked){let key$2=checked?`_trueValue`:`_falseValue`;return key$2 in el?el[key$2]:checked}const vModelDynamic={created(el,binding,vnode){callModelHook(el,binding,vnode,null,`created`)},mounted(el,binding,vnode){callModelHook(el,binding,vnode,null,`mounted`)},beforeUpdate(el,binding,vnode,prevVNode){callModelHook(el,binding,vnode,prevVNode,`beforeUpdate`)},updated(el,binding,vnode,prevVNode){callModelHook(el,binding,vnode,prevVNode,`updated`)}};function resolveDynamicModel(tagName,type){switch(tagName){case`SELECT`:return vModelSelect;case`TEXTAREA`:return vModelText;default:switch(type){case`checkbox`:return vModelCheckbox;case`radio`:return vModelRadio;default:return vModelText}}}function callModelHook(el,binding,vnode,prevVNode,hook){let modelToUse=resolveDynamicModel(el.tagName,vnode.props&&vnode.props.type),fn$5=modelToUse[hook];fn$5&&fn$5(el,binding,vnode,prevVNode)}function initVModelForSSR(){vModelText.getSSRProps=({value:value$1})=>({value:value$1}),vModelRadio.getSSRProps=({value:value$1},vnode)=>{if(vnode.props&&looseEqual(vnode.props.value,value$1))return{checked:!0}},vModelCheckbox.getSSRProps=({value:value$1},vnode)=>{if(isArray$5(value$1)){if(vnode.props&&looseIndexOf(value$1,vnode.props.value)>-1)return{checked:!0}}else if(isSet(value$1)){if(vnode.props&&value$1.has(vnode.props.value))return{checked:!0}}else if(value$1)return{checked:!0}},vModelDynamic.getSSRProps=(binding,vnode)=>{if(typeof vnode.type!=`string`)return;let modelToUse=resolveDynamicModel(vnode.type.toUpperCase(),vnode.props&&vnode.props.type);if(modelToUse.getSSRProps)return modelToUse.getSSRProps(binding,vnode)}}const systemModifiers=[`ctrl`,`shift`,`alt`,`meta`],modifierGuards={stop:e$4=>e$4.stopPropagation(),prevent:e$4=>e$4.preventDefault(),self:e$4=>e$4.target!==e$4.currentTarget,ctrl:e$4=>!e$4.ctrlKey,shift:e$4=>!e$4.shiftKey,alt:e$4=>!e$4.altKey,meta:e$4=>!e$4.metaKey,left:e$4=>`button`in e$4&&e$4.button!==0,middle:e$4=>`button`in e$4&&e$4.button!==1,right:e$4=>`button`in e$4&&e$4.button!==2,exact:(e$4,modifiers)=>systemModifiers.some(m=>e$4[`${m}Key`]&&!modifiers.includes(m))},withModifiers=(fn$5,modifiers)=>{let cache$1=fn$5._withMods||={},cacheKey=modifiers.join(`.`);return cache$1[cacheKey]||(cache$1[cacheKey]=(event,...args)=>{for(let i=0;i{let cache$1=fn$5._withKeys||={},cacheKey=modifiers.join(`.`);return cache$1[cacheKey]||(cache$1[cacheKey]=event=>{if(!(`key`in event))return;let eventKey=hyphenate$2(event.key);if(modifiers.some(k$3=>k$3===eventKey||keyNames[k$3]===eventKey))return fn$5(event)})},rendererOptions=extend$2({patchProp},nodeOps);let renderer,enabledHydration=!1;function ensureRenderer(){return renderer||=createRenderer(rendererOptions)}function ensureHydrationRenderer(){return renderer=enabledHydration?renderer:createHydrationRenderer(rendererOptions),enabledHydration=!0,renderer}const render$1=(...args)=>{ensureRenderer().render(...args)},hydrate=(...args)=>{ensureHydrationRenderer().hydrate(...args)},createApp=(...args)=>{let app=ensureRenderer().createApp(...args),{mount}=app;return app.mount=containerOrSelector=>{let container=normalizeContainer(containerOrSelector);if(!container)return;let component=app._component;!isFunction$1(component)&&!component.render&&!component.template&&(component.template=container.innerHTML),container.nodeType===1&&(container.textContent=``);let proxy=mount(container,!1,resolveRootNamespace(container));return container instanceof Element&&(container.removeAttribute(`v-cloak`),container.setAttribute(`data-v-app`,``)),proxy},app},createSSRApp=(...args)=>{let app=ensureHydrationRenderer().createApp(...args),{mount}=app;return app.mount=containerOrSelector=>{let container=normalizeContainer(containerOrSelector);if(container)return mount(container,!0,resolveRootNamespace(container))},app};function resolveRootNamespace(container){if(container instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&container instanceof MathMLElement)return`mathml`}function normalizeContainer(container){if(isString$2(container)){let res=document.querySelector(container);return res}return container}let ssrDirectiveInitialized=!1;const initDirectivesForSSR=()=>{ssrDirectiveInitialized||(ssrDirectiveInitialized=!0,initVModelForSSR(),initVShowForSSR())};var vue_runtime_esm_bundler_exports={};__export(vue_runtime_esm_bundler_exports,{BaseTransition:()=>BaseTransition,BaseTransitionPropsValidators:()=>BaseTransitionPropsValidators,Comment:()=>Comment,DeprecationTypes:()=>DeprecationTypes,EffectScope:()=>EffectScope,ErrorCodes:()=>ErrorCodes,ErrorTypeStrings:()=>ErrorTypeStrings,Fragment:()=>Fragment,KeepAlive:()=>KeepAlive,ReactiveEffect:()=>ReactiveEffect,Static:()=>Static,Suspense:()=>Suspense,Teleport:()=>Teleport,Text:()=>Text,TrackOpTypes:()=>TrackOpTypes,Transition:()=>Transition,TransitionGroup:()=>TransitionGroup,TriggerOpTypes:()=>TriggerOpTypes,VueElement:()=>VueElement,assertNumber:()=>assertNumber,callWithAsyncErrorHandling:()=>callWithAsyncErrorHandling,callWithErrorHandling:()=>callWithErrorHandling,camelize:()=>camelize,capitalize:()=>capitalize$1,cloneVNode:()=>cloneVNode,compatUtils:()=>compatUtils,compile:()=>compile$1,computed:()=>computed,createApp:()=>createApp,createBlock:()=>createBlock,createCommentVNode:()=>createCommentVNode,createElementBlock:()=>createElementBlock,createElementVNode:()=>createBaseVNode,createHydrationRenderer:()=>createHydrationRenderer,createPropsRestProxy:()=>createPropsRestProxy,createRenderer:()=>createRenderer,createSSRApp:()=>createSSRApp,createSlots:()=>createSlots,createStaticVNode:()=>createStaticVNode,createTextVNode:()=>createTextVNode,createVNode:()=>createVNode,customRef:()=>customRef,defineAsyncComponent:()=>defineAsyncComponent,defineComponent:()=>defineComponent,defineCustomElement:()=>defineCustomElement,defineEmits:()=>defineEmits,defineExpose:()=>defineExpose,defineModel:()=>defineModel,defineOptions:()=>defineOptions,defineProps:()=>defineProps,defineSSRCustomElement:()=>defineSSRCustomElement,defineSlots:()=>defineSlots,devtools:()=>devtools$2,effect:()=>effect,effectScope:()=>effectScope,getCurrentInstance:()=>getCurrentInstance,getCurrentScope:()=>getCurrentScope,getCurrentWatcher:()=>getCurrentWatcher,getTransitionRawChildren:()=>getTransitionRawChildren,guardReactiveProps:()=>guardReactiveProps,h:()=>h,handleError:()=>handleError,hasInjectionContext:()=>hasInjectionContext,hydrate:()=>hydrate,hydrateOnIdle:()=>hydrateOnIdle,hydrateOnInteraction:()=>hydrateOnInteraction,hydrateOnMediaQuery:()=>hydrateOnMediaQuery,hydrateOnVisible:()=>hydrateOnVisible,initCustomFormatter:()=>initCustomFormatter,initDirectivesForSSR:()=>initDirectivesForSSR,inject:()=>inject,isMemoSame:()=>isMemoSame,isProxy:()=>isProxy,isReactive:()=>isReactive,isReadonly:()=>isReadonly,isRef:()=>isRef,isRuntimeOnly:()=>isRuntimeOnly,isShallow:()=>isShallow,isVNode:()=>isVNode,markRaw:()=>markRaw,mergeDefaults:()=>mergeDefaults,mergeModels:()=>mergeModels,mergeProps:()=>mergeProps,nextTick:()=>nextTick,normalizeClass:()=>normalizeClass,normalizeProps:()=>normalizeProps,normalizeStyle:()=>normalizeStyle,onActivated:()=>onActivated,onBeforeMount:()=>onBeforeMount,onBeforeUnmount:()=>onBeforeUnmount,onBeforeUpdate:()=>onBeforeUpdate,onDeactivated:()=>onDeactivated,onErrorCaptured:()=>onErrorCaptured,onMounted:()=>onMounted,onRenderTracked:()=>onRenderTracked,onRenderTriggered:()=>onRenderTriggered,onScopeDispose:()=>onScopeDispose,onServerPrefetch:()=>onServerPrefetch,onUnmounted:()=>onUnmounted,onUpdated:()=>onUpdated,onWatcherCleanup:()=>onWatcherCleanup,openBlock:()=>openBlock,popScopeId:()=>popScopeId,provide:()=>provide,proxyRefs:()=>proxyRefs,pushScopeId:()=>pushScopeId,queuePostFlushCb:()=>queuePostFlushCb,reactive:()=>reactive,readonly:()=>readonly$1,ref:()=>ref,registerRuntimeCompiler:()=>registerRuntimeCompiler,render:()=>render$1,renderList:()=>renderList,renderSlot:()=>renderSlot,resolveComponent:()=>resolveComponent,resolveDirective:()=>resolveDirective,resolveDynamicComponent:()=>resolveDynamicComponent,resolveFilter:()=>resolveFilter,resolveTransitionHooks:()=>resolveTransitionHooks,setBlockTracking:()=>setBlockTracking,setDevtoolsHook:()=>setDevtoolsHook,setTransitionHooks:()=>setTransitionHooks,shallowReactive:()=>shallowReactive,shallowReadonly:()=>shallowReadonly,shallowRef:()=>shallowRef,ssrContextKey:()=>ssrContextKey,ssrUtils:()=>ssrUtils,stop:()=>stop,toDisplayString:()=>toDisplayString,toHandlerKey:()=>toHandlerKey,toHandlers:()=>toHandlers,toRaw:()=>toRaw,toRef:()=>toRef,toRefs:()=>toRefs,toValue:()=>toValue$1,transformVNodeArgs:()=>transformVNodeArgs,triggerRef:()=>triggerRef,unref:()=>unref,useAttrs:()=>useAttrs,useCssModule:()=>useCssModule,useCssVars:()=>useCssVars,useHost:()=>useHost,useId:()=>useId$1,useModel:()=>useModel,useSSRContext:()=>useSSRContext,useShadowRoot:()=>useShadowRoot,useSlots:()=>useSlots,useTemplateRef:()=>useTemplateRef,useTransitionState:()=>useTransitionState,vModelCheckbox:()=>vModelCheckbox,vModelDynamic:()=>vModelDynamic,vModelRadio:()=>vModelRadio,vModelSelect:()=>vModelSelect,vModelText:()=>vModelText,vShow:()=>vShow,version:()=>version$1,warn:()=>warn$1,watch:()=>watch,watchEffect:()=>watchEffect,watchPostEffect:()=>watchPostEffect,watchSyncEffect:()=>watchSyncEffect,withAsyncContext:()=>withAsyncContext,withCtx:()=>withCtx,withDefaults:()=>withDefaults,withDirectives:()=>withDirectives,withKeys:()=>withKeys,withMemo:()=>withMemo,withModifiers:()=>withModifiers,withScopeId:()=>withScopeId});const compile$1=()=>{},REVISION=`179`,MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},CullFaceNone=0,CullFaceBack=1,CullFaceFront=2,CullFaceFrontBack=3,BasicShadowMap=0,PCFShadowMap=1,PCFSoftShadowMap=2,VSMShadowMap=3,FrontSide=0,BackSide=1,DoubleSide=2,NoBlending=0,NormalBlending=1,AdditiveBlending=2,SubtractiveBlending=3,MultiplyBlending=4,CustomBlending=5,AddEquation=100,SubtractEquation=101,ReverseSubtractEquation=102,MinEquation=103,MaxEquation=104,ZeroFactor=200,OneFactor=201,SrcColorFactor=202,OneMinusSrcColorFactor=203,SrcAlphaFactor=204,OneMinusSrcAlphaFactor=205,DstAlphaFactor=206,OneMinusDstAlphaFactor=207,DstColorFactor=208,OneMinusDstColorFactor=209,SrcAlphaSaturateFactor=210,ConstantColorFactor=211,OneMinusConstantColorFactor=212,ConstantAlphaFactor=213,OneMinusConstantAlphaFactor=214,NeverDepth=0,AlwaysDepth=1,LessDepth=2,LessEqualDepth=3,EqualDepth=4,GreaterEqualDepth=5,GreaterDepth=6,NotEqualDepth=7,MultiplyOperation=0,MixOperation=1,AddOperation=2,NoToneMapping=0,LinearToneMapping=1,ReinhardToneMapping=2,CineonToneMapping=3,ACESFilmicToneMapping=4,CustomToneMapping=5,AgXToneMapping=6,NeutralToneMapping=7,AttachedBindMode=`attached`,DetachedBindMode=`detached`,UVMapping=300,CubeReflectionMapping=301,CubeRefractionMapping=302,EquirectangularReflectionMapping=303,EquirectangularRefractionMapping=304,CubeUVReflectionMapping=306,RepeatWrapping=1e3,ClampToEdgeWrapping=1001,MirroredRepeatWrapping=1002,NearestFilter=1003,NearestMipmapNearestFilter=1004,NearestMipMapNearestFilter=1004,NearestMipmapLinearFilter=1005,NearestMipMapLinearFilter=1005,LinearFilter=1006,LinearMipmapNearestFilter=1007,LinearMipMapNearestFilter=1007,LinearMipmapLinearFilter=1008,LinearMipMapLinearFilter=1008,UnsignedByteType=1009,ByteType=1010,ShortType=1011,UnsignedShortType=1012,IntType=1013,UnsignedIntType=1014,FloatType=1015,HalfFloatType=1016,UnsignedShort4444Type=1017,UnsignedShort5551Type=1018,UnsignedInt248Type=1020,UnsignedInt5999Type=35902,AlphaFormat=1021,RGBFormat=1022,RGBAFormat=1023,DepthFormat=1026,DepthStencilFormat=1027,RedFormat=1028,RedIntegerFormat=1029,RGFormat=1030,RGIntegerFormat=1031,RGBIntegerFormat=1032,RGBAIntegerFormat=1033,RGB_S3TC_DXT1_Format=33776,RGBA_S3TC_DXT1_Format=33777,RGBA_S3TC_DXT3_Format=33778,RGBA_S3TC_DXT5_Format=33779,RGB_PVRTC_4BPPV1_Format=35840,RGB_PVRTC_2BPPV1_Format=35841,RGBA_PVRTC_4BPPV1_Format=35842,RGBA_PVRTC_2BPPV1_Format=35843,RGB_ETC1_Format=36196,RGB_ETC2_Format=37492,RGBA_ETC2_EAC_Format=37496,RGBA_ASTC_4x4_Format=37808,RGBA_ASTC_5x4_Format=37809,RGBA_ASTC_5x5_Format=37810,RGBA_ASTC_6x5_Format=37811,RGBA_ASTC_6x6_Format=37812,RGBA_ASTC_8x5_Format=37813,RGBA_ASTC_8x6_Format=37814,RGBA_ASTC_8x8_Format=37815,RGBA_ASTC_10x5_Format=37816,RGBA_ASTC_10x6_Format=37817,RGBA_ASTC_10x8_Format=37818,RGBA_ASTC_10x10_Format=37819,RGBA_ASTC_12x10_Format=37820,RGBA_ASTC_12x12_Format=37821,RGBA_BPTC_Format=36492,RGB_BPTC_SIGNED_Format=36494,RGB_BPTC_UNSIGNED_Format=36495,RED_RGTC1_Format=36283,SIGNED_RED_RGTC1_Format=36284,RED_GREEN_RGTC2_Format=36285,SIGNED_RED_GREEN_RGTC2_Format=36286,LoopOnce=2200,LoopRepeat=2201,LoopPingPong=2202,InterpolateDiscrete=2300,InterpolateLinear=2301,InterpolateSmooth=2302,ZeroCurvatureEnding=2400,ZeroSlopeEnding=2401,WrapAroundEnding=2402,NormalAnimationBlendMode=2500,AdditiveAnimationBlendMode=2501,TrianglesDrawMode=0,TriangleStripDrawMode=1,TriangleFanDrawMode=2,BasicDepthPacking=3200,RGBADepthPacking=3201,RGBDepthPacking=3202,RGDepthPacking=3203,TangentSpaceNormalMap=0,ObjectSpaceNormalMap=1,NoColorSpace=``,SRGBColorSpace=`srgb`,LinearSRGBColorSpace=`srgb-linear`,LinearTransfer=`linear`,SRGBTransfer=`srgb`,ZeroStencilOp=0,KeepStencilOp=7680,ReplaceStencilOp=7681,IncrementStencilOp=7682,DecrementStencilOp=7683,IncrementWrapStencilOp=34055,DecrementWrapStencilOp=34056,InvertStencilOp=5386,NeverStencilFunc=512,LessStencilFunc=513,EqualStencilFunc=514,LessEqualStencilFunc=515,GreaterStencilFunc=516,NotEqualStencilFunc=517,GreaterEqualStencilFunc=518,AlwaysStencilFunc=519,NeverCompare=512,LessCompare=513,EqualCompare=514,LessEqualCompare=515,GreaterCompare=516,NotEqualCompare=517,GreaterEqualCompare=518,AlwaysCompare=519,StaticDrawUsage=35044,DynamicDrawUsage=35048,StreamDrawUsage=35040,StaticReadUsage=35045,DynamicReadUsage=35049,StreamReadUsage=35041,StaticCopyUsage=35046,DynamicCopyUsage=35050,StreamCopyUsage=35042,GLSL1=`100`,GLSL3=`300 es`,WebGLCoordinateSystem=2e3,WebGPUCoordinateSystem=2001,TimestampQuery={COMPUTE:`compute`,RENDER:`render`},InterpolationSamplingType={PERSPECTIVE:`perspective`,LINEAR:`linear`,FLAT:`flat`},InterpolationSamplingMode={NORMAL:`normal`,CENTROID:`centroid`,SAMPLE:`sample`,FIRST:`first`,EITHER:`either`};var EventDispatcher=class{addEventListener(type,listener){this._listeners===void 0&&(this._listeners={});let listeners=this._listeners;listeners[type]===void 0&&(listeners[type]=[]),listeners[type].indexOf(listener)===-1&&listeners[type].push(listener)}hasEventListener(type,listener){let listeners=this._listeners;return listeners===void 0?!1:listeners[type]!==void 0&&listeners[type].indexOf(listener)!==-1}removeEventListener(type,listener){let listeners=this._listeners;if(listeners===void 0)return;let listenerArray=listeners[type];if(listenerArray!==void 0){let index$1=listenerArray.indexOf(listener);index$1!==-1&&listenerArray.splice(index$1,1)}}dispatchEvent(event){let listeners=this._listeners;if(listeners===void 0)return;let listenerArray=listeners[event.type];if(listenerArray!==void 0){event.target=this;let array$1=listenerArray.slice(0);for(let i=0,l=array$1.length;i>8&255]+_lut[d0$2>>16&255]+_lut[d0$2>>24&255]+`-`+_lut[d1&255]+_lut[d1>>8&255]+`-`+_lut[d1>>16&15|64]+_lut[d1>>24&255]+`-`+_lut[d2&63|128]+_lut[d2>>8&255]+`-`+_lut[d2>>16&255]+_lut[d2>>24&255]+_lut[d3&255]+_lut[d3>>8&255]+_lut[d3>>16&255]+_lut[d3>>24&255];return uuid$1.toLowerCase()}function clamp$7(value$1,min$1,max$1){return Math.max(min$1,Math.min(max$1,value$1))}function euclideanModulo(n,m){return(n%m+m)%m}function mapLinear(x$1,a1,a2,b1,b2){return b1+(x$1-a1)*(b2-b1)/(a2-a1)}function inverseLerp(x$1,y,value$1){return x$1===y?0:(value$1-x$1)/(y-x$1)}function lerp$3(x$1,y,t$1){return(1-t$1)*x$1+t$1*y}function damp(x$1,y,lambda,dt$3){return lerp$3(x$1,y,1-Math.exp(-lambda*dt$3))}function pingpong(x$1,length=1){return length-Math.abs(euclideanModulo(x$1,length*2)-length)}function smoothstep(x$1,min$1,max$1){return x$1<=min$1?0:x$1>=max$1?1:(x$1=(x$1-min$1)/(max$1-min$1),x$1*x$1*(3-2*x$1))}function smootherstep(x$1,min$1,max$1){return x$1<=min$1?0:x$1>=max$1?1:(x$1=(x$1-min$1)/(max$1-min$1),x$1*x$1*x$1*(x$1*(x$1*6-15)+10))}function randInt(low,high){return low+Math.floor(Math.random()*(high-low+1))}function randFloat$1(low,high){return low+Math.random()*(high-low)}function randFloatSpread(range$1){return range$1*(.5-Math.random())}function seededRandom(s){s!==void 0&&(_seed=s);let t$1=_seed+=1831565813;return t$1=Math.imul(t$1^t$1>>>15,t$1|1),t$1^=t$1+Math.imul(t$1^t$1>>>7,t$1|61),((t$1^t$1>>>14)>>>0)/4294967296}function degToRad$2(degrees$1){return degrees$1*DEG2RAD$1}function radToDeg$2(radians){return radians*RAD2DEG$2}function isPowerOfTwo(value$1){return(value$1&value$1-1)==0&&value$1!==0}function ceilPowerOfTwo(value$1){return 2**Math.ceil(Math.log(value$1)/Math.LN2)}function floorPowerOfTwo(value$1){return 2**Math.floor(Math.log(value$1)/Math.LN2)}function setQuaternionFromProperEuler(q,a$1,b$1,c$3,order$3){let cos$1=Math.cos,sin$1=Math.sin,c2=cos$1(b$1/2),s2=sin$1(b$1/2),c13=cos$1((a$1+c$3)/2),s13=sin$1((a$1+c$3)/2),c1_3=cos$1((a$1-c$3)/2),s1_3=sin$1((a$1-c$3)/2),c3_1=cos$1((c$3-a$1)/2),s3_1=sin$1((c$3-a$1)/2);switch(order$3){case`XYX`:q.set(c2*s13,s2*c1_3,s2*s1_3,c2*c13);break;case`YZY`:q.set(s2*s1_3,c2*s13,s2*c1_3,c2*c13);break;case`ZXZ`:q.set(s2*c1_3,s2*s1_3,c2*s13,c2*c13);break;case`XZX`:q.set(c2*s13,s2*s3_1,s2*c3_1,c2*c13);break;case`YXY`:q.set(s2*c3_1,c2*s13,s2*s3_1,c2*c13);break;case`ZYZ`:q.set(s2*s3_1,s2*c3_1,c2*s13,c2*c13);break;default:console.warn(`THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: `+order$3)}}function denormalize(value$1,array$1){switch(array$1.constructor){case Float32Array:return value$1;case Uint32Array:return value$1/4294967295;case Uint16Array:return value$1/65535;case Uint8Array:return value$1/255;case Int32Array:return Math.max(value$1/2147483647,-1);case Int16Array:return Math.max(value$1/32767,-1);case Int8Array:return Math.max(value$1/127,-1);default:throw Error(`Invalid component type.`)}}function normalize$2(value$1,array$1){switch(array$1.constructor){case Float32Array:return value$1;case Uint32Array:return Math.round(value$1*4294967295);case Uint16Array:return Math.round(value$1*65535);case Uint8Array:return Math.round(value$1*255);case Int32Array:return Math.round(value$1*2147483647);case Int16Array:return Math.round(value$1*32767);case Int8Array:return Math.round(value$1*127);default:throw Error(`Invalid component type.`)}}const MathUtils={DEG2RAD:DEG2RAD$1,RAD2DEG:RAD2DEG$2,generateUUID,clamp:clamp$7,euclideanModulo,mapLinear,inverseLerp,lerp:lerp$3,damp,pingpong,smoothstep,smootherstep,randInt,randFloat:randFloat$1,randFloatSpread,seededRandom,degToRad:degToRad$2,radToDeg:radToDeg$2,isPowerOfTwo,ceilPowerOfTwo,floorPowerOfTwo,setQuaternionFromProperEuler,normalize:normalize$2,denormalize};var Vector2=class Vector2{constructor(x$1=0,y=0){Vector2.prototype.isVector2=!0,this.x=x$1,this.y=y}get width(){return this.x}set width(value$1){this.x=value$1}get height(){return this.y}set height(value$1){this.y=value$1}set(x$1,y){return this.x=x$1,this.y=y,this}setScalar(scalar){return this.x=scalar,this.y=scalar,this}setX(x$1){return this.x=x$1,this}setY(y){return this.y=y,this}setComponent(index$1,value$1){switch(index$1){case 0:this.x=value$1;break;case 1:this.y=value$1;break;default:throw Error(`index is out of range: `+index$1)}return this}getComponent(index$1){switch(index$1){case 0:return this.x;case 1:return this.y;default:throw Error(`index is out of range: `+index$1)}}clone(){return new this.constructor(this.x,this.y)}copy(v){return this.x=v.x,this.y=v.y,this}add(v){return this.x+=v.x,this.y+=v.y,this}addScalar(s){return this.x+=s,this.y+=s,this}addVectors(a$1,b$1){return this.x=a$1.x+b$1.x,this.y=a$1.y+b$1.y,this}addScaledVector(v,s){return this.x+=v.x*s,this.y+=v.y*s,this}sub(v){return this.x-=v.x,this.y-=v.y,this}subScalar(s){return this.x-=s,this.y-=s,this}subVectors(a$1,b$1){return this.x=a$1.x-b$1.x,this.y=a$1.y-b$1.y,this}multiply(v){return this.x*=v.x,this.y*=v.y,this}multiplyScalar(scalar){return this.x*=scalar,this.y*=scalar,this}divide(v){return this.x/=v.x,this.y/=v.y,this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}applyMatrix3(m){let x$1=this.x,y=this.y,e$4=m.elements;return this.x=e$4[0]*x$1+e$4[3]*y+e$4[6],this.y=e$4[1]*x$1+e$4[4]*y+e$4[7],this}min(v){return this.x=Math.min(this.x,v.x),this.y=Math.min(this.y,v.y),this}max(v){return this.x=Math.max(this.x,v.x),this.y=Math.max(this.y,v.y),this}clamp(min$1,max$1){return this.x=clamp$7(this.x,min$1.x,max$1.x),this.y=clamp$7(this.y,min$1.y,max$1.y),this}clampScalar(minVal,maxVal){return this.x=clamp$7(this.x,minVal,maxVal),this.y=clamp$7(this.y,minVal,maxVal),this}clampLength(min$1,max$1){let length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp$7(length,min$1,max$1))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(v){return this.x*v.x+this.y*v.y}cross(v){return this.x*v.y-this.y*v.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){let angle=Math.atan2(-this.y,-this.x)+Math.PI;return angle}angleTo(v){let denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;let theta=this.dot(v)/denominator;return Math.acos(clamp$7(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){let dx=this.x-v.x,dy=this.y-v.y;return dx*dx+dy*dy}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha$1){return this.x+=(v.x-this.x)*alpha$1,this.y+=(v.y-this.y)*alpha$1,this}lerpVectors(v1,v2,alpha$1){return this.x=v1.x+(v2.x-v1.x)*alpha$1,this.y=v1.y+(v2.y-v1.y)*alpha$1,this}equals(v){return v.x===this.x&&v.y===this.y}fromArray(array$1,offset$2=0){return this.x=array$1[offset$2],this.y=array$1[offset$2+1],this}toArray(array$1=[],offset$2=0){return array$1[offset$2]=this.x,array$1[offset$2+1]=this.y,array$1}fromBufferAttribute(attribute,index$1){return this.x=attribute.getX(index$1),this.y=attribute.getY(index$1),this}rotateAround(center,angle){let c$3=Math.cos(angle),s=Math.sin(angle),x$1=this.x-center.x,y=this.y-center.y;return this.x=x$1*c$3-y*s+center.x,this.y=x$1*s+y*c$3+center.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Quaternion=class{constructor(x$1=0,y=0,z$1=0,w=1){this.isQuaternion=!0,this._x=x$1,this._y=y,this._z=z$1,this._w=w}static slerpFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1,t$1){let x0=src0[srcOffset0+0],y0=src0[srcOffset0+1],z0=src0[srcOffset0+2],w0=src0[srcOffset0+3],x1=src1[srcOffset1+0],y1=src1[srcOffset1+1],z1=src1[srcOffset1+2],w1=src1[srcOffset1+3];if(t$1===0){dst[dstOffset+0]=x0,dst[dstOffset+1]=y0,dst[dstOffset+2]=z0,dst[dstOffset+3]=w0;return}if(t$1===1){dst[dstOffset+0]=x1,dst[dstOffset+1]=y1,dst[dstOffset+2]=z1,dst[dstOffset+3]=w1;return}if(w0!==w1||x0!==x1||y0!==y1||z0!==z1){let s=1-t$1,cos$1=x0*x1+y0*y1+z0*z1+w0*w1,dir=cos$1>=0?1:-1,sqrSin=1-cos$1*cos$1;if(sqrSin>2**-52){let sin$1=Math.sqrt(sqrSin),len=Math.atan2(sin$1,cos$1*dir);s=Math.sin(s*len)/sin$1,t$1=Math.sin(t$1*len)/sin$1}let tDir=t$1*dir;if(x0=x0*s+x1*tDir,y0=y0*s+y1*tDir,z0=z0*s+z1*tDir,w0=w0*s+w1*tDir,s===1-t$1){let f$2=1/Math.sqrt(x0*x0+y0*y0+z0*z0+w0*w0);x0*=f$2,y0*=f$2,z0*=f$2,w0*=f$2}}dst[dstOffset]=x0,dst[dstOffset+1]=y0,dst[dstOffset+2]=z0,dst[dstOffset+3]=w0}static multiplyQuaternionsFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1){let x0=src0[srcOffset0],y0=src0[srcOffset0+1],z0=src0[srcOffset0+2],w0=src0[srcOffset0+3],x1=src1[srcOffset1],y1=src1[srcOffset1+1],z1=src1[srcOffset1+2],w1=src1[srcOffset1+3];return dst[dstOffset]=x0*w1+w0*x1+y0*z1-z0*y1,dst[dstOffset+1]=y0*w1+w0*y1+z0*x1-x0*z1,dst[dstOffset+2]=z0*w1+w0*z1+x0*y1-y0*x1,dst[dstOffset+3]=w0*w1-x0*x1-y0*y1-z0*z1,dst}get x(){return this._x}set x(value$1){this._x=value$1,this._onChangeCallback()}get y(){return this._y}set y(value$1){this._y=value$1,this._onChangeCallback()}get z(){return this._z}set z(value$1){this._z=value$1,this._onChangeCallback()}get w(){return this._w}set w(value$1){this._w=value$1,this._onChangeCallback()}set(x$1,y,z$1,w){return this._x=x$1,this._y=y,this._z=z$1,this._w=w,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(quaternion){return this._x=quaternion.x,this._y=quaternion.y,this._z=quaternion.z,this._w=quaternion.w,this._onChangeCallback(),this}setFromEuler(euler,update=!0){let x$1=euler._x,y=euler._y,z$1=euler._z,order$3=euler._order,cos$1=Math.cos,sin$1=Math.sin,c1=cos$1(x$1/2),c2=cos$1(y/2),c3=cos$1(z$1/2),s1=sin$1(x$1/2),s2=sin$1(y/2),s3=sin$1(z$1/2);switch(order$3){case`XYZ`:this._x=s1*c2*c3+c1*s2*s3,this._y=c1*s2*c3-s1*c2*s3,this._z=c1*c2*s3+s1*s2*c3,this._w=c1*c2*c3-s1*s2*s3;break;case`YXZ`:this._x=s1*c2*c3+c1*s2*s3,this._y=c1*s2*c3-s1*c2*s3,this._z=c1*c2*s3-s1*s2*c3,this._w=c1*c2*c3+s1*s2*s3;break;case`ZXY`:this._x=s1*c2*c3-c1*s2*s3,this._y=c1*s2*c3+s1*c2*s3,this._z=c1*c2*s3+s1*s2*c3,this._w=c1*c2*c3-s1*s2*s3;break;case`ZYX`:this._x=s1*c2*c3-c1*s2*s3,this._y=c1*s2*c3+s1*c2*s3,this._z=c1*c2*s3-s1*s2*c3,this._w=c1*c2*c3+s1*s2*s3;break;case`YZX`:this._x=s1*c2*c3+c1*s2*s3,this._y=c1*s2*c3+s1*c2*s3,this._z=c1*c2*s3-s1*s2*c3,this._w=c1*c2*c3-s1*s2*s3;break;case`XZY`:this._x=s1*c2*c3-c1*s2*s3,this._y=c1*s2*c3-s1*c2*s3,this._z=c1*c2*s3+s1*s2*c3,this._w=c1*c2*c3+s1*s2*s3;break;default:console.warn(`THREE.Quaternion: .setFromEuler() encountered an unknown order: `+order$3)}return update===!0&&this._onChangeCallback(),this}setFromAxisAngle(axis,angle){let halfAngle=angle/2,s=Math.sin(halfAngle);return this._x=axis.x*s,this._y=axis.y*s,this._z=axis.z*s,this._w=Math.cos(halfAngle),this._onChangeCallback(),this}setFromRotationMatrix(m){let te$1=m.elements,m11=te$1[0],m12=te$1[4],m13=te$1[8],m21=te$1[1],m22=te$1[5],m23=te$1[9],m31=te$1[2],m32=te$1[6],m33=te$1[10],trace=m11+m22+m33;if(trace>0){let s=.5/Math.sqrt(trace+1);this._w=.25/s,this._x=(m32-m23)*s,this._y=(m13-m31)*s,this._z=(m21-m12)*s}else if(m11>m22&&m11>m33){let s=2*Math.sqrt(1+m11-m22-m33);this._w=(m32-m23)/s,this._x=.25*s,this._y=(m12+m21)/s,this._z=(m13+m31)/s}else if(m22>m33){let s=2*Math.sqrt(1+m22-m11-m33);this._w=(m13-m31)/s,this._x=(m12+m21)/s,this._y=.25*s,this._z=(m23+m32)/s}else{let s=2*Math.sqrt(1+m33-m11-m22);this._w=(m21-m12)/s,this._x=(m13+m31)/s,this._y=(m23+m32)/s,this._z=.25*s}return this._onChangeCallback(),this}setFromUnitVectors(vFrom,vTo){let r$1=vFrom.dot(vTo)+1;return r$1<1e-8?(r$1=0,Math.abs(vFrom.x)>Math.abs(vFrom.z)?(this._x=-vFrom.y,this._y=vFrom.x,this._z=0,this._w=r$1):(this._x=0,this._y=-vFrom.z,this._z=vFrom.y,this._w=r$1)):(this._x=vFrom.y*vTo.z-vFrom.z*vTo.y,this._y=vFrom.z*vTo.x-vFrom.x*vTo.z,this._z=vFrom.x*vTo.y-vFrom.y*vTo.x,this._w=r$1),this.normalize()}angleTo(q){return 2*Math.acos(Math.abs(clamp$7(this.dot(q),-1,1)))}rotateTowards(q,step){let angle=this.angleTo(q);if(angle===0)return this;let t$1=Math.min(1,step/angle);return this.slerp(q,t$1),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(v){return this._x*v._x+this._y*v._y+this._z*v._z+this._w*v._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let l=this.length();return l===0?(this._x=0,this._y=0,this._z=0,this._w=1):(l=1/l,this._x*=l,this._y*=l,this._z*=l,this._w*=l),this._onChangeCallback(),this}multiply(q){return this.multiplyQuaternions(this,q)}premultiply(q){return this.multiplyQuaternions(q,this)}multiplyQuaternions(a$1,b$1){let qax=a$1._x,qay=a$1._y,qaz=a$1._z,qaw=a$1._w,qbx=b$1._x,qby=b$1._y,qbz=b$1._z,qbw=b$1._w;return this._x=qax*qbw+qaw*qbx+qay*qbz-qaz*qby,this._y=qay*qbw+qaw*qby+qaz*qbx-qax*qbz,this._z=qaz*qbw+qaw*qbz+qax*qby-qay*qbx,this._w=qaw*qbw-qax*qbx-qay*qby-qaz*qbz,this._onChangeCallback(),this}slerp(qb,t$1){if(t$1===0)return this;if(t$1===1)return this.copy(qb);let x$1=this._x,y=this._y,z$1=this._z,w=this._w,cosHalfTheta=w*qb._w+x$1*qb._x+y*qb._y+z$1*qb._z;if(cosHalfTheta<0?(this._w=-qb._w,this._x=-qb._x,this._y=-qb._y,this._z=-qb._z,cosHalfTheta=-cosHalfTheta):this.copy(qb),cosHalfTheta>=1)return this._w=w,this._x=x$1,this._y=y,this._z=z$1,this;let sqrSinHalfTheta=1-cosHalfTheta*cosHalfTheta;if(sqrSinHalfTheta<=2**-52){let s=1-t$1;return this._w=s*w+t$1*this._w,this._x=s*x$1+t$1*this._x,this._y=s*y+t$1*this._y,this._z=s*z$1+t$1*this._z,this.normalize(),this}let sinHalfTheta=Math.sqrt(sqrSinHalfTheta),halfTheta=Math.atan2(sinHalfTheta,cosHalfTheta),ratioA=Math.sin((1-t$1)*halfTheta)/sinHalfTheta,ratioB=Math.sin(t$1*halfTheta)/sinHalfTheta;return this._w=w*ratioA+this._w*ratioB,this._x=x$1*ratioA+this._x*ratioB,this._y=y*ratioA+this._y*ratioB,this._z=z$1*ratioA+this._z*ratioB,this._onChangeCallback(),this}slerpQuaternions(qa,qb,t$1){return this.copy(qa).slerp(qb,t$1)}random(){let theta1=2*Math.PI*Math.random(),theta2=2*Math.PI*Math.random(),x0=Math.random(),r1=Math.sqrt(1-x0),r2=Math.sqrt(x0);return this.set(r1*Math.sin(theta1),r1*Math.cos(theta1),r2*Math.sin(theta2),r2*Math.cos(theta2))}equals(quaternion){return quaternion._x===this._x&&quaternion._y===this._y&&quaternion._z===this._z&&quaternion._w===this._w}fromArray(array$1,offset$2=0){return this._x=array$1[offset$2],this._y=array$1[offset$2+1],this._z=array$1[offset$2+2],this._w=array$1[offset$2+3],this._onChangeCallback(),this}toArray(array$1=[],offset$2=0){return array$1[offset$2]=this._x,array$1[offset$2+1]=this._y,array$1[offset$2+2]=this._z,array$1[offset$2+3]=this._w,array$1}fromBufferAttribute(attribute,index$1){return this._x=attribute.getX(index$1),this._y=attribute.getY(index$1),this._z=attribute.getZ(index$1),this._w=attribute.getW(index$1),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(callback){return this._onChangeCallback=callback,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Vector3=class Vector3{constructor(x$1=0,y=0,z$1=0){Vector3.prototype.isVector3=!0,this.x=x$1,this.y=y,this.z=z$1}set(x$1,y,z$1){return z$1===void 0&&(z$1=this.z),this.x=x$1,this.y=y,this.z=z$1,this}setScalar(scalar){return this.x=scalar,this.y=scalar,this.z=scalar,this}setX(x$1){return this.x=x$1,this}setY(y){return this.y=y,this}setZ(z$1){return this.z=z$1,this}setComponent(index$1,value$1){switch(index$1){case 0:this.x=value$1;break;case 1:this.y=value$1;break;case 2:this.z=value$1;break;default:throw Error(`index is out of range: `+index$1)}return this}getComponent(index$1){switch(index$1){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(`index is out of range: `+index$1)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(v){return this.x=v.x,this.y=v.y,this.z=v.z,this}add(v){return this.x+=v.x,this.y+=v.y,this.z+=v.z,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this}addVectors(a$1,b$1){return this.x=a$1.x+b$1.x,this.y=a$1.y+b$1.y,this.z=a$1.z+b$1.z,this}addScaledVector(v,s){return this.x+=v.x*s,this.y+=v.y*s,this.z+=v.z*s,this}sub(v){return this.x-=v.x,this.y-=v.y,this.z-=v.z,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this}subVectors(a$1,b$1){return this.x=a$1.x-b$1.x,this.y=a$1.y-b$1.y,this.z=a$1.z-b$1.z,this}multiply(v){return this.x*=v.x,this.y*=v.y,this.z*=v.z,this}multiplyScalar(scalar){return this.x*=scalar,this.y*=scalar,this.z*=scalar,this}multiplyVectors(a$1,b$1){return this.x=a$1.x*b$1.x,this.y=a$1.y*b$1.y,this.z=a$1.z*b$1.z,this}applyEuler(euler){return this.applyQuaternion(_quaternion$4.setFromEuler(euler))}applyAxisAngle(axis,angle){return this.applyQuaternion(_quaternion$4.setFromAxisAngle(axis,angle))}applyMatrix3(m){let x$1=this.x,y=this.y,z$1=this.z,e$4=m.elements;return this.x=e$4[0]*x$1+e$4[3]*y+e$4[6]*z$1,this.y=e$4[1]*x$1+e$4[4]*y+e$4[7]*z$1,this.z=e$4[2]*x$1+e$4[5]*y+e$4[8]*z$1,this}applyNormalMatrix(m){return this.applyMatrix3(m).normalize()}applyMatrix4(m){let x$1=this.x,y=this.y,z$1=this.z,e$4=m.elements,w=1/(e$4[3]*x$1+e$4[7]*y+e$4[11]*z$1+e$4[15]);return this.x=(e$4[0]*x$1+e$4[4]*y+e$4[8]*z$1+e$4[12])*w,this.y=(e$4[1]*x$1+e$4[5]*y+e$4[9]*z$1+e$4[13])*w,this.z=(e$4[2]*x$1+e$4[6]*y+e$4[10]*z$1+e$4[14])*w,this}applyQuaternion(q){let vx=this.x,vy=this.y,vz=this.z,qx=q.x,qy=q.y,qz=q.z,qw=q.w,tx=2*(qy*vz-qz*vy),ty=2*(qz*vx-qx*vz),tz=2*(qx*vy-qy*vx);return this.x=vx+qw*tx+qy*tz-qz*ty,this.y=vy+qw*ty+qz*tx-qx*tz,this.z=vz+qw*tz+qx*ty-qy*tx,this}project(camera){return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix)}unproject(camera){return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld)}transformDirection(m){let x$1=this.x,y=this.y,z$1=this.z,e$4=m.elements;return this.x=e$4[0]*x$1+e$4[4]*y+e$4[8]*z$1,this.y=e$4[1]*x$1+e$4[5]*y+e$4[9]*z$1,this.z=e$4[2]*x$1+e$4[6]*y+e$4[10]*z$1,this.normalize()}divide(v){return this.x/=v.x,this.y/=v.y,this.z/=v.z,this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}min(v){return this.x=Math.min(this.x,v.x),this.y=Math.min(this.y,v.y),this.z=Math.min(this.z,v.z),this}max(v){return this.x=Math.max(this.x,v.x),this.y=Math.max(this.y,v.y),this.z=Math.max(this.z,v.z),this}clamp(min$1,max$1){return this.x=clamp$7(this.x,min$1.x,max$1.x),this.y=clamp$7(this.y,min$1.y,max$1.y),this.z=clamp$7(this.z,min$1.z,max$1.z),this}clampScalar(minVal,maxVal){return this.x=clamp$7(this.x,minVal,maxVal),this.y=clamp$7(this.y,minVal,maxVal),this.z=clamp$7(this.z,minVal,maxVal),this}clampLength(min$1,max$1){let length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp$7(length,min$1,max$1))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha$1){return this.x+=(v.x-this.x)*alpha$1,this.y+=(v.y-this.y)*alpha$1,this.z+=(v.z-this.z)*alpha$1,this}lerpVectors(v1,v2,alpha$1){return this.x=v1.x+(v2.x-v1.x)*alpha$1,this.y=v1.y+(v2.y-v1.y)*alpha$1,this.z=v1.z+(v2.z-v1.z)*alpha$1,this}cross(v){return this.crossVectors(this,v)}crossVectors(a$1,b$1){let ax=a$1.x,ay=a$1.y,az=a$1.z,bx=b$1.x,by=b$1.y,bz=b$1.z;return this.x=ay*bz-az*by,this.y=az*bx-ax*bz,this.z=ax*by-ay*bx,this}projectOnVector(v){let denominator=v.lengthSq();if(denominator===0)return this.set(0,0,0);let scalar=v.dot(this)/denominator;return this.copy(v).multiplyScalar(scalar)}projectOnPlane(planeNormal){return _vector$c.copy(this).projectOnVector(planeNormal),this.sub(_vector$c)}reflect(normal){return this.sub(_vector$c.copy(normal).multiplyScalar(2*this.dot(normal)))}angleTo(v){let denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;let theta=this.dot(v)/denominator;return Math.acos(clamp$7(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){let dx=this.x-v.x,dy=this.y-v.y,dz=this.z-v.z;return dx*dx+dy*dy+dz*dz}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)+Math.abs(this.z-v.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(radius,phi,theta){let sinPhiRadius=Math.sin(phi)*radius;return this.x=sinPhiRadius*Math.sin(theta),this.y=Math.cos(phi)*radius,this.z=sinPhiRadius*Math.cos(theta),this}setFromCylindrical(c$3){return this.setFromCylindricalCoords(c$3.radius,c$3.theta,c$3.y)}setFromCylindricalCoords(radius,theta,y){return this.x=radius*Math.sin(theta),this.y=y,this.z=radius*Math.cos(theta),this}setFromMatrixPosition(m){let e$4=m.elements;return this.x=e$4[12],this.y=e$4[13],this.z=e$4[14],this}setFromMatrixScale(m){let sx=this.setFromMatrixColumn(m,0).length(),sy=this.setFromMatrixColumn(m,1).length(),sz=this.setFromMatrixColumn(m,2).length();return this.x=sx,this.y=sy,this.z=sz,this}setFromMatrixColumn(m,index$1){return this.fromArray(m.elements,index$1*4)}setFromMatrix3Column(m,index$1){return this.fromArray(m.elements,index$1*3)}setFromEuler(e$4){return this.x=e$4._x,this.y=e$4._y,this.z=e$4._z,this}setFromColor(c$3){return this.x=c$3.r,this.y=c$3.g,this.z=c$3.b,this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z}fromArray(array$1,offset$2=0){return this.x=array$1[offset$2],this.y=array$1[offset$2+1],this.z=array$1[offset$2+2],this}toArray(array$1=[],offset$2=0){return array$1[offset$2]=this.x,array$1[offset$2+1]=this.y,array$1[offset$2+2]=this.z,array$1}fromBufferAttribute(attribute,index$1){return this.x=attribute.getX(index$1),this.y=attribute.getY(index$1),this.z=attribute.getZ(index$1),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let theta=Math.random()*Math.PI*2,u=Math.random()*2-1,c$3=Math.sqrt(1-u*u);return this.x=c$3*Math.cos(theta),this.y=u,this.z=c$3*Math.sin(theta),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};const _vector$c=new Vector3,_quaternion$4=new Quaternion;var Matrix3=class Matrix3{constructor(n11,n12,n13,n21,n22,n23,n31,n32,n33){Matrix3.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],n11!==void 0&&this.set(n11,n12,n13,n21,n22,n23,n31,n32,n33)}set(n11,n12,n13,n21,n22,n23,n31,n32,n33){let te$1=this.elements;return te$1[0]=n11,te$1[1]=n21,te$1[2]=n31,te$1[3]=n12,te$1[4]=n22,te$1[5]=n32,te$1[6]=n13,te$1[7]=n23,te$1[8]=n33,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(m){let te$1=this.elements,me=m.elements;return te$1[0]=me[0],te$1[1]=me[1],te$1[2]=me[2],te$1[3]=me[3],te$1[4]=me[4],te$1[5]=me[5],te$1[6]=me[6],te$1[7]=me[7],te$1[8]=me[8],this}extractBasis(xAxis,yAxis,zAxis){return xAxis.setFromMatrix3Column(this,0),yAxis.setFromMatrix3Column(this,1),zAxis.setFromMatrix3Column(this,2),this}setFromMatrix4(m){let me=m.elements;return this.set(me[0],me[4],me[8],me[1],me[5],me[9],me[2],me[6],me[10]),this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a$1,b$1){let ae=a$1.elements,be$1=b$1.elements,te$1=this.elements,a11=ae[0],a12=ae[3],a13=ae[6],a21=ae[1],a22=ae[4],a23=ae[7],a31=ae[2],a32=ae[5],a33=ae[8],b11=be$1[0],b12=be$1[3],b13=be$1[6],b21=be$1[1],b22=be$1[4],b23=be$1[7],b31=be$1[2],b32=be$1[5],b33=be$1[8];return te$1[0]=a11*b11+a12*b21+a13*b31,te$1[3]=a11*b12+a12*b22+a13*b32,te$1[6]=a11*b13+a12*b23+a13*b33,te$1[1]=a21*b11+a22*b21+a23*b31,te$1[4]=a21*b12+a22*b22+a23*b32,te$1[7]=a21*b13+a22*b23+a23*b33,te$1[2]=a31*b11+a32*b21+a33*b31,te$1[5]=a31*b12+a32*b22+a33*b32,te$1[8]=a31*b13+a32*b23+a33*b33,this}multiplyScalar(s){let te$1=this.elements;return te$1[0]*=s,te$1[3]*=s,te$1[6]*=s,te$1[1]*=s,te$1[4]*=s,te$1[7]*=s,te$1[2]*=s,te$1[5]*=s,te$1[8]*=s,this}determinant(){let te$1=this.elements,a$1=te$1[0],b$1=te$1[1],c$3=te$1[2],d=te$1[3],e$4=te$1[4],f$2=te$1[5],g=te$1[6],h$1=te$1[7],i=te$1[8];return a$1*e$4*i-a$1*f$2*h$1-b$1*d*i+b$1*f$2*g+c$3*d*h$1-c$3*e$4*g}invert(){let te$1=this.elements,n11=te$1[0],n21=te$1[1],n31=te$1[2],n12=te$1[3],n22=te$1[4],n32=te$1[5],n13=te$1[6],n23=te$1[7],n33=te$1[8],t11=n33*n22-n32*n23,t12=n32*n13-n33*n12,t13=n23*n12-n22*n13,det=n11*t11+n21*t12+n31*t13;if(det===0)return this.set(0,0,0,0,0,0,0,0,0);let detInv=1/det;return te$1[0]=t11*detInv,te$1[1]=(n31*n23-n33*n21)*detInv,te$1[2]=(n32*n21-n31*n22)*detInv,te$1[3]=t12*detInv,te$1[4]=(n33*n11-n31*n13)*detInv,te$1[5]=(n31*n12-n32*n11)*detInv,te$1[6]=t13*detInv,te$1[7]=(n21*n13-n23*n11)*detInv,te$1[8]=(n22*n11-n21*n12)*detInv,this}transpose(){let tmp$1,m=this.elements;return tmp$1=m[1],m[1]=m[3],m[3]=tmp$1,tmp$1=m[2],m[2]=m[6],m[6]=tmp$1,tmp$1=m[5],m[5]=m[7],m[7]=tmp$1,this}getNormalMatrix(matrix4){return this.setFromMatrix4(matrix4).invert().transpose()}transposeIntoArray(r$1){let m=this.elements;return r$1[0]=m[0],r$1[1]=m[3],r$1[2]=m[6],r$1[3]=m[1],r$1[4]=m[4],r$1[5]=m[7],r$1[6]=m[2],r$1[7]=m[5],r$1[8]=m[8],this}setUvTransform(tx,ty,sx,sy,rotation,cx,cy){let c$3=Math.cos(rotation),s=Math.sin(rotation);return this.set(sx*c$3,sx*s,-sx*(c$3*cx+s*cy)+cx+tx,-sy*s,sy*c$3,-sy*(-s*cx+c$3*cy)+cy+ty,0,0,1),this}scale(sx,sy){return this.premultiply(_m3.makeScale(sx,sy)),this}rotate(theta){return this.premultiply(_m3.makeRotation(-theta)),this}translate(tx,ty){return this.premultiply(_m3.makeTranslation(tx,ty)),this}makeTranslation(x$1,y){return x$1.isVector2?this.set(1,0,x$1.x,0,1,x$1.y,0,0,1):this.set(1,0,x$1,0,1,y,0,0,1),this}makeRotation(theta){let c$3=Math.cos(theta),s=Math.sin(theta);return this.set(c$3,-s,0,s,c$3,0,0,0,1),this}makeScale(x$1,y){return this.set(x$1,0,0,0,y,0,0,0,1),this}equals(matrix){let te$1=this.elements,me=matrix.elements;for(let i=0;i<9;i++)if(te$1[i]!==me[i])return!1;return!0}fromArray(array$1,offset$2=0){for(let i=0;i<9;i++)this.elements[i]=array$1[i+offset$2];return this}toArray(array$1=[],offset$2=0){let te$1=this.elements;return array$1[offset$2]=te$1[0],array$1[offset$2+1]=te$1[1],array$1[offset$2+2]=te$1[2],array$1[offset$2+3]=te$1[3],array$1[offset$2+4]=te$1[4],array$1[offset$2+5]=te$1[5],array$1[offset$2+6]=te$1[6],array$1[offset$2+7]=te$1[7],array$1[offset$2+8]=te$1[8],array$1}clone(){return new this.constructor().fromArray(this.elements)}};const _m3=new Matrix3;function arrayNeedsUint32(array$1){for(let i=array$1.length-1;i>=0;--i)if(array$1[i]>=65535)return!0;return!1}const TYPED_ARRAYS={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function getTypedArray(type,buffer$1){return new TYPED_ARRAYS[type](buffer$1)}function createElementNS(name$2){return document.createElementNS(`http://www.w3.org/1999/xhtml`,name$2)}function createCanvasElement(){let canvas=createElementNS(`canvas`);return canvas.style.display=`block`,canvas}const _cache={};function warnOnce$1(message$1){message$1 in _cache||(_cache[message$1]=!0,console.warn(message$1))}function probeAsync(gl,sync$2,interval){return new Promise(function(resolve$1,reject){function probe(){switch(gl.clientWaitSync(sync$2,gl.SYNC_FLUSH_COMMANDS_BIT,0)){case gl.WAIT_FAILED:reject();break;case gl.TIMEOUT_EXPIRED:setTimeout(probe,interval);break;default:resolve$1()}}setTimeout(probe,interval)})}const LINEAR_REC709_TO_XYZ=new Matrix3().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),XYZ_TO_LINEAR_REC709=new Matrix3().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function createColorManagement(){let ColorManagement$1={enabled:!0,workingColorSpace:LinearSRGBColorSpace,spaces:{},convert:function(color$2,sourceColorSpace,targetColorSpace){return this.enabled===!1||sourceColorSpace===targetColorSpace||!sourceColorSpace||!targetColorSpace?color$2:(this.spaces[sourceColorSpace].transfer===SRGBTransfer&&(color$2.r=SRGBToLinear(color$2.r),color$2.g=SRGBToLinear(color$2.g),color$2.b=SRGBToLinear(color$2.b)),this.spaces[sourceColorSpace].primaries!==this.spaces[targetColorSpace].primaries&&(color$2.applyMatrix3(this.spaces[sourceColorSpace].toXYZ),color$2.applyMatrix3(this.spaces[targetColorSpace].fromXYZ)),this.spaces[targetColorSpace].transfer===SRGBTransfer&&(color$2.r=LinearToSRGB(color$2.r),color$2.g=LinearToSRGB(color$2.g),color$2.b=LinearToSRGB(color$2.b)),color$2)},workingToColorSpace:function(color$2,targetColorSpace){return this.convert(color$2,this.workingColorSpace,targetColorSpace)},colorSpaceToWorking:function(color$2,sourceColorSpace){return this.convert(color$2,sourceColorSpace,this.workingColorSpace)},getPrimaries:function(colorSpace){return this.spaces[colorSpace].primaries},getTransfer:function(colorSpace){return colorSpace===NoColorSpace?LinearTransfer:this.spaces[colorSpace].transfer},getLuminanceCoefficients:function(target$1,colorSpace=this.workingColorSpace){return target$1.fromArray(this.spaces[colorSpace].luminanceCoefficients)},define:function(colorSpaces){Object.assign(this.spaces,colorSpaces)},_getMatrix:function(targetMatrix,sourceColorSpace,targetColorSpace){return targetMatrix.copy(this.spaces[sourceColorSpace].toXYZ).multiply(this.spaces[targetColorSpace].fromXYZ)},_getDrawingBufferColorSpace:function(colorSpace){return this.spaces[colorSpace].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(colorSpace=this.workingColorSpace){return this.spaces[colorSpace].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(color$2,targetColorSpace){return warnOnce$1(`THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().`),ColorManagement$1.workingToColorSpace(color$2,targetColorSpace)},toWorkingColorSpace:function(color$2,sourceColorSpace){return warnOnce$1(`THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().`),ColorManagement$1.colorSpaceToWorking(color$2,sourceColorSpace)}},REC709_PRIMARIES=[.64,.33,.3,.6,.15,.06],REC709_LUMINANCE_COEFFICIENTS=[.2126,.7152,.0722],D65$1=[.3127,.329];return ColorManagement$1.define({[LinearSRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65$1,transfer:LinearTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,workingColorSpaceConfig:{unpackColorSpace:SRGBColorSpace},outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}},[SRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65$1,transfer:SRGBTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}}}),ColorManagement$1}const ColorManagement=createColorManagement();function SRGBToLinear(c$3){return c$3<.04045?c$3*.0773993808:(c$3*.9478672986+.0521327014)**2.4}function LinearToSRGB(c$3){return c$3<.0031308?c$3*12.92:1.055*c$3**.41666-.055}let _canvas;var ImageUtils=class{static getDataURL(image$1,type=`image/png`){if(/^data:/i.test(image$1.src)||typeof HTMLCanvasElement>`u`)return image$1.src;let canvas;if(image$1 instanceof HTMLCanvasElement)canvas=image$1;else{_canvas===void 0&&(_canvas=createElementNS(`canvas`)),_canvas.width=image$1.width,_canvas.height=image$1.height;let context$1=_canvas.getContext(`2d`);image$1 instanceof ImageData?context$1.putImageData(image$1,0,0):context$1.drawImage(image$1,0,0,image$1.width,image$1.height),canvas=_canvas}return canvas.toDataURL(type)}static sRGBToLinear(image$1){if(typeof HTMLImageElement<`u`&&image$1 instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&image$1 instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&image$1 instanceof ImageBitmap){let canvas=createElementNS(`canvas`);canvas.width=image$1.width,canvas.height=image$1.height;let context$1=canvas.getContext(`2d`);context$1.drawImage(image$1,0,0,image$1.width,image$1.height);let imageData=context$1.getImageData(0,0,image$1.width,image$1.height),data$12=imageData.data;for(let i=0;i1),this.pmremVersion=0}get width(){return this.source.getSize(_tempVec3).x}get height(){return this.source.getSize(_tempVec3).y}get depth(){return this.source.getSize(_tempVec3).z}get image(){return this.source.data}set image(value$1=null){this.source.data=value$1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(start,count$1){this.updateRanges.push({start,count:count$1})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(source){return this.name=source.name,this.source=source.source,this.mipmaps=source.mipmaps.slice(0),this.mapping=source.mapping,this.channel=source.channel,this.wrapS=source.wrapS,this.wrapT=source.wrapT,this.magFilter=source.magFilter,this.minFilter=source.minFilter,this.anisotropy=source.anisotropy,this.format=source.format,this.internalFormat=source.internalFormat,this.type=source.type,this.offset.copy(source.offset),this.repeat.copy(source.repeat),this.center.copy(source.center),this.rotation=source.rotation,this.matrixAutoUpdate=source.matrixAutoUpdate,this.matrix.copy(source.matrix),this.generateMipmaps=source.generateMipmaps,this.premultiplyAlpha=source.premultiplyAlpha,this.flipY=source.flipY,this.unpackAlignment=source.unpackAlignment,this.colorSpace=source.colorSpace,this.renderTarget=source.renderTarget,this.isRenderTargetTexture=source.isRenderTargetTexture,this.isArrayTexture=source.isArrayTexture,this.userData=JSON.parse(JSON.stringify(source.userData)),this.needsUpdate=!0,this}setValues(values){for(let key$2 in values){let newValue=values[key$2];if(newValue===void 0){console.warn(`THREE.Texture.setValues(): parameter '${key$2}' has value of undefined.`);continue}let currentValue=this[key$2];if(currentValue===void 0){console.warn(`THREE.Texture.setValues(): property '${key$2}' does not exist.`);continue}currentValue&&newValue&¤tValue.isVector2&&newValue.isVector2||currentValue&&newValue&¤tValue.isVector3&&newValue.isVector3||currentValue&&newValue&¤tValue.isMatrix3&&newValue.isMatrix3?currentValue.copy(newValue):this[key$2]=newValue}}toJSON(meta){let isRootObject=meta===void 0||typeof meta==`string`;if(!isRootObject&&meta.textures[this.uuid]!==void 0)return meta.textures[this.uuid];let output={metadata:{version:4.7,type:`Texture`,generator:`Texture.toJSON`},uuid:this.uuid,name:this.name,image:this.source.toJSON(meta).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(output.userData=this.userData),isRootObject||(meta.textures[this.uuid]=output),output}dispose(){this.dispatchEvent({type:`dispose`})}transformUv(uv){if(this.mapping!==UVMapping)return uv;if(uv.applyMatrix3(this.matrix),uv.x<0||uv.x>1)switch(this.wrapS){case RepeatWrapping:uv.x-=Math.floor(uv.x);break;case ClampToEdgeWrapping:uv.x=uv.x<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(uv.x)%2)===1?uv.x=Math.ceil(uv.x)-uv.x:uv.x-=Math.floor(uv.x);break}if(uv.y<0||uv.y>1)switch(this.wrapT){case RepeatWrapping:uv.y-=Math.floor(uv.y);break;case ClampToEdgeWrapping:uv.y=uv.y<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(uv.y)%2)===1?uv.y=Math.ceil(uv.y)-uv.y:uv.y-=Math.floor(uv.y);break}return this.flipY&&(uv.y=1-uv.y),uv}set needsUpdate(value$1){value$1===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(value$1){value$1===!0&&this.pmremVersion++}};Texture.DEFAULT_IMAGE=null,Texture.DEFAULT_MAPPING=UVMapping,Texture.DEFAULT_ANISOTROPY=1;var Vector4=class Vector4{constructor(x$1=0,y=0,z$1=0,w=1){Vector4.prototype.isVector4=!0,this.x=x$1,this.y=y,this.z=z$1,this.w=w}get width(){return this.z}set width(value$1){this.z=value$1}get height(){return this.w}set height(value$1){this.w=value$1}set(x$1,y,z$1,w){return this.x=x$1,this.y=y,this.z=z$1,this.w=w,this}setScalar(scalar){return this.x=scalar,this.y=scalar,this.z=scalar,this.w=scalar,this}setX(x$1){return this.x=x$1,this}setY(y){return this.y=y,this}setZ(z$1){return this.z=z$1,this}setW(w){return this.w=w,this}setComponent(index$1,value$1){switch(index$1){case 0:this.x=value$1;break;case 1:this.y=value$1;break;case 2:this.z=value$1;break;case 3:this.w=value$1;break;default:throw Error(`index is out of range: `+index$1)}return this}getComponent(index$1){switch(index$1){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(`index is out of range: `+index$1)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(v){return this.x=v.x,this.y=v.y,this.z=v.z,this.w=v.w===void 0?1:v.w,this}add(v){return this.x+=v.x,this.y+=v.y,this.z+=v.z,this.w+=v.w,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this.w+=s,this}addVectors(a$1,b$1){return this.x=a$1.x+b$1.x,this.y=a$1.y+b$1.y,this.z=a$1.z+b$1.z,this.w=a$1.w+b$1.w,this}addScaledVector(v,s){return this.x+=v.x*s,this.y+=v.y*s,this.z+=v.z*s,this.w+=v.w*s,this}sub(v){return this.x-=v.x,this.y-=v.y,this.z-=v.z,this.w-=v.w,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this.w-=s,this}subVectors(a$1,b$1){return this.x=a$1.x-b$1.x,this.y=a$1.y-b$1.y,this.z=a$1.z-b$1.z,this.w=a$1.w-b$1.w,this}multiply(v){return this.x*=v.x,this.y*=v.y,this.z*=v.z,this.w*=v.w,this}multiplyScalar(scalar){return this.x*=scalar,this.y*=scalar,this.z*=scalar,this.w*=scalar,this}applyMatrix4(m){let x$1=this.x,y=this.y,z$1=this.z,w=this.w,e$4=m.elements;return this.x=e$4[0]*x$1+e$4[4]*y+e$4[8]*z$1+e$4[12]*w,this.y=e$4[1]*x$1+e$4[5]*y+e$4[9]*z$1+e$4[13]*w,this.z=e$4[2]*x$1+e$4[6]*y+e$4[10]*z$1+e$4[14]*w,this.w=e$4[3]*x$1+e$4[7]*y+e$4[11]*z$1+e$4[15]*w,this}divide(v){return this.x/=v.x,this.y/=v.y,this.z/=v.z,this.w/=v.w,this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}setAxisAngleFromQuaternion(q){this.w=2*Math.acos(q.w);let s=Math.sqrt(1-q.w*q.w);return s<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=q.x/s,this.y=q.y/s,this.z=q.z/s),this}setAxisAngleFromRotationMatrix(m){let angle,x$1,y,z$1,epsilon=.01,epsilon2=.1,te$1=m.elements,m11=te$1[0],m12=te$1[4],m13=te$1[8],m21=te$1[1],m22=te$1[5],m23=te$1[9],m31=te$1[2],m32=te$1[6],m33=te$1[10];if(Math.abs(m12-m21)yy&&xx>zz?xxzz?yy1;this.dispose()}this.viewport.set(0,0,width,height),this.scissor.set(0,0,width,height)}clone(){return new this.constructor().copy(this)}copy(source){this.width=source.width,this.height=source.height,this.depth=source.depth,this.scissor.copy(source.scissor),this.scissorTest=source.scissorTest,this.viewport.copy(source.viewport),this.textures.length=0;for(let i=0,il=source.textures.length;i=this.min.x&&point$3.x<=this.max.x&&point$3.y>=this.min.y&&point$3.y<=this.max.y&&point$3.z>=this.min.z&&point$3.z<=this.max.z}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y&&this.min.z<=box.min.z&&box.max.z<=this.max.z}getParameter(point$3,target$1){return target$1.set((point$3.x-this.min.x)/(this.max.x-this.min.x),(point$3.y-this.min.y)/(this.max.y-this.min.y),(point$3.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y&&box.max.z>=this.min.z&&box.min.z<=this.max.z}intersectsSphere(sphere){return this.clampPoint(sphere.center,_vector$b),_vector$b.distanceToSquared(sphere.center)<=sphere.radius*sphere.radius}intersectsPlane(plane){let min$1,max$1;return plane.normal.x>0?(min$1=plane.normal.x*this.min.x,max$1=plane.normal.x*this.max.x):(min$1=plane.normal.x*this.max.x,max$1=plane.normal.x*this.min.x),plane.normal.y>0?(min$1+=plane.normal.y*this.min.y,max$1+=plane.normal.y*this.max.y):(min$1+=plane.normal.y*this.max.y,max$1+=plane.normal.y*this.min.y),plane.normal.z>0?(min$1+=plane.normal.z*this.min.z,max$1+=plane.normal.z*this.max.z):(min$1+=plane.normal.z*this.max.z,max$1+=plane.normal.z*this.min.z),min$1<=-plane.constant&&max$1>=-plane.constant}intersectsTriangle(triangle){if(this.isEmpty())return!1;this.getCenter(_center),_extents.subVectors(this.max,_center),_v0$2.subVectors(triangle.a,_center),_v1$7.subVectors(triangle.b,_center),_v2$4.subVectors(triangle.c,_center),_f0.subVectors(_v1$7,_v0$2),_f1.subVectors(_v2$4,_v1$7),_f2.subVectors(_v0$2,_v2$4);let axes=[0,-_f0.z,_f0.y,0,-_f1.z,_f1.y,0,-_f2.z,_f2.y,_f0.z,0,-_f0.x,_f1.z,0,-_f1.x,_f2.z,0,-_f2.x,-_f0.y,_f0.x,0,-_f1.y,_f1.x,0,-_f2.y,_f2.x,0];return!satForAxes(axes,_v0$2,_v1$7,_v2$4,_extents)||(axes=[1,0,0,0,1,0,0,0,1],!satForAxes(axes,_v0$2,_v1$7,_v2$4,_extents))?!1:(_triangleNormal.crossVectors(_f0,_f1),axes=[_triangleNormal.x,_triangleNormal.y,_triangleNormal.z],satForAxes(axes,_v0$2,_v1$7,_v2$4,_extents))}clampPoint(point$3,target$1){return target$1.copy(point$3).clamp(this.min,this.max)}distanceToPoint(point$3){return this.clampPoint(point$3,_vector$b).distanceTo(point$3)}getBoundingSphere(target$1){return this.isEmpty()?target$1.makeEmpty():(this.getCenter(target$1.center),target$1.radius=this.getSize(_vector$b).length()*.5),target$1}intersect(box){return this.min.max(box.min),this.max.min(box.max),this.isEmpty()&&this.makeEmpty(),this}union(box){return this.min.min(box.min),this.max.max(box.max),this}applyMatrix4(matrix){return this.isEmpty()?this:(_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(matrix),_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(matrix),_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(matrix),_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(matrix),_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(matrix),_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(matrix),_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(matrix),_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(matrix),this.setFromPoints(_points),this)}translate(offset$2){return this.min.add(offset$2),this.max.add(offset$2),this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(json){return this.min.fromArray(json.min),this.max.fromArray(json.max),this}};const _points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3],_vector$b=new Vector3,_box$4=new Box3,_v0$2=new Vector3,_v1$7=new Vector3,_v2$4=new Vector3,_f0=new Vector3,_f1=new Vector3,_f2=new Vector3,_center=new Vector3,_extents=new Vector3,_triangleNormal=new Vector3,_testAxis=new Vector3;function satForAxes(axes,v0,v1,v2,extents){for(let i=0,j$1=axes.length-3;i<=j$1;i+=3){_testAxis.fromArray(axes,i);let r$1=extents.x*Math.abs(_testAxis.x)+extents.y*Math.abs(_testAxis.y)+extents.z*Math.abs(_testAxis.z),p0=v0.dot(_testAxis),p1=v1.dot(_testAxis),p2=v2.dot(_testAxis);if(Math.max(-Math.max(p0,p1,p2),Math.min(p0,p1,p2))>r$1)return!1}return!0}const _box$3=new Box3,_v1$6=new Vector3,_v2$3=new Vector3;var Sphere=class{constructor(center=new Vector3,radius=-1){this.isSphere=!0,this.center=center,this.radius=radius}set(center,radius){return this.center.copy(center),this.radius=radius,this}setFromPoints(points,optionalCenter){let center=this.center;optionalCenter===void 0?_box$3.setFromPoints(points).getCenter(center):center.copy(optionalCenter);let maxRadiusSq=0;for(let i=0,il=points.length;ithis.radius*this.radius&&(target$1.sub(this.center).normalize(),target$1.multiplyScalar(this.radius).add(this.center)),target$1}getBoundingBox(target$1){return this.isEmpty()?(target$1.makeEmpty(),target$1):(target$1.set(this.center,this.center),target$1.expandByScalar(this.radius),target$1)}applyMatrix4(matrix){return this.center.applyMatrix4(matrix),this.radius*=matrix.getMaxScaleOnAxis(),this}translate(offset$2){return this.center.add(offset$2),this}expandByPoint(point$3){if(this.isEmpty())return this.center.copy(point$3),this.radius=0,this;_v1$6.subVectors(point$3,this.center);let lengthSq=_v1$6.lengthSq();if(lengthSq>this.radius*this.radius){let length=Math.sqrt(lengthSq),delta=(length-this.radius)*.5;this.center.addScaledVector(_v1$6,delta/length),this.radius+=delta}return this}union(sphere){return sphere.isEmpty()?this:this.isEmpty()?(this.copy(sphere),this):(this.center.equals(sphere.center)===!0?this.radius=Math.max(this.radius,sphere.radius):(_v2$3.subVectors(sphere.center,this.center).setLength(sphere.radius),this.expandByPoint(_v1$6.copy(sphere.center).add(_v2$3)),this.expandByPoint(_v1$6.copy(sphere.center).sub(_v2$3))),this)}equals(sphere){return sphere.center.equals(this.center)&&sphere.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(json){return this.radius=json.radius,this.center.fromArray(json.center),this}};const _vector$a=new Vector3,_segCenter=new Vector3,_segDir=new Vector3,_diff=new Vector3,_edge1=new Vector3,_edge2=new Vector3,_normal$1=new Vector3;var Ray=class{constructor(origin=new Vector3,direction=new Vector3(0,0,-1)){this.origin=origin,this.direction=direction}set(origin,direction){return this.origin.copy(origin),this.direction.copy(direction),this}copy(ray){return this.origin.copy(ray.origin),this.direction.copy(ray.direction),this}at(t$1,target$1){return target$1.copy(this.origin).addScaledVector(this.direction,t$1)}lookAt(v){return this.direction.copy(v).sub(this.origin).normalize(),this}recast(t$1){return this.origin.copy(this.at(t$1,_vector$a)),this}closestPointToPoint(point$3,target$1){target$1.subVectors(point$3,this.origin);let directionDistance=target$1.dot(this.direction);return directionDistance<0?target$1.copy(this.origin):target$1.copy(this.origin).addScaledVector(this.direction,directionDistance)}distanceToPoint(point$3){return Math.sqrt(this.distanceSqToPoint(point$3))}distanceSqToPoint(point$3){let directionDistance=_vector$a.subVectors(point$3,this.origin).dot(this.direction);return directionDistance<0?this.origin.distanceToSquared(point$3):(_vector$a.copy(this.origin).addScaledVector(this.direction,directionDistance),_vector$a.distanceToSquared(point$3))}distanceSqToSegment(v0,v1,optionalPointOnRay,optionalPointOnSegment){_segCenter.copy(v0).add(v1).multiplyScalar(.5),_segDir.copy(v1).sub(v0).normalize(),_diff.copy(this.origin).sub(_segCenter);let segExtent=v0.distanceTo(v1)*.5,a01=-this.direction.dot(_segDir),b0=_diff.dot(this.direction),b1=-_diff.dot(_segDir),c$3=_diff.lengthSq(),det=Math.abs(1-a01*a01),s0,s1,sqrDist,extDet;if(det>0)if(s0=a01*b1-b0,s1=a01*b0-b1,extDet=segExtent*det,s0>=0)if(s1>=-extDet)if(s1<=extDet){let invDet=1/det;s0*=invDet,s1*=invDet,sqrDist=s0*(s0+a01*s1+2*b0)+s1*(a01*s0+s1+2*b1)+c$3}else s1=segExtent,s0=Math.max(0,-(a01*s1+b0)),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3;else s1=-segExtent,s0=Math.max(0,-(a01*s1+b0)),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3;else s1<=-extDet?(s0=Math.max(0,-(-a01*segExtent+b0)),s1=s0>0?-segExtent:Math.min(Math.max(-segExtent,-b1),segExtent),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3):s1<=extDet?(s0=0,s1=Math.min(Math.max(-segExtent,-b1),segExtent),sqrDist=s1*(s1+2*b1)+c$3):(s0=Math.max(0,-(a01*segExtent+b0)),s1=s0>0?segExtent:Math.min(Math.max(-segExtent,-b1),segExtent),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3);else s1=a01>0?-segExtent:segExtent,s0=Math.max(0,-(a01*s1+b0)),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3;return optionalPointOnRay&&optionalPointOnRay.copy(this.origin).addScaledVector(this.direction,s0),optionalPointOnSegment&&optionalPointOnSegment.copy(_segCenter).addScaledVector(_segDir,s1),sqrDist}intersectSphere(sphere,target$1){_vector$a.subVectors(sphere.center,this.origin);let tca=_vector$a.dot(this.direction),d2=_vector$a.dot(_vector$a)-tca*tca,radius2=sphere.radius*sphere.radius;if(d2>radius2)return null;let thc=Math.sqrt(radius2-d2),t0=tca-thc,t1=tca+thc;return t1<0?null:t0<0?this.at(t1,target$1):this.at(t0,target$1)}intersectsSphere(sphere){return sphere.radius<0?!1:this.distanceSqToPoint(sphere.center)<=sphere.radius*sphere.radius}distanceToPlane(plane){let denominator=plane.normal.dot(this.direction);if(denominator===0)return plane.distanceToPoint(this.origin)===0?0:null;let t$1=-(this.origin.dot(plane.normal)+plane.constant)/denominator;return t$1>=0?t$1:null}intersectPlane(plane,target$1){let t$1=this.distanceToPlane(plane);return t$1===null?null:this.at(t$1,target$1)}intersectsPlane(plane){let distToPoint=plane.distanceToPoint(this.origin);if(distToPoint===0)return!0;let denominator=plane.normal.dot(this.direction);return denominator*distToPoint<0}intersectBox(box,target$1){let tmin,tmax,tymin,tymax,tzmin,tzmax,invdirx=1/this.direction.x,invdiry=1/this.direction.y,invdirz=1/this.direction.z,origin=this.origin;return invdirx>=0?(tmin=(box.min.x-origin.x)*invdirx,tmax=(box.max.x-origin.x)*invdirx):(tmin=(box.max.x-origin.x)*invdirx,tmax=(box.min.x-origin.x)*invdirx),invdiry>=0?(tymin=(box.min.y-origin.y)*invdiry,tymax=(box.max.y-origin.y)*invdiry):(tymin=(box.max.y-origin.y)*invdiry,tymax=(box.min.y-origin.y)*invdiry),tmin>tymax||tymin>tmax||((tymin>tmin||isNaN(tmin))&&(tmin=tymin),(tymax=0?(tzmin=(box.min.z-origin.z)*invdirz,tzmax=(box.max.z-origin.z)*invdirz):(tzmin=(box.max.z-origin.z)*invdirz,tzmax=(box.min.z-origin.z)*invdirz),tmin>tzmax||tzmin>tmax)||((tzmin>tmin||tmin!==tmin)&&(tmin=tzmin),(tzmax=0?tmin:tmax,target$1)}intersectsBox(box){return this.intersectBox(box,_vector$a)!==null}intersectTriangle(a$1,b$1,c$3,backfaceCulling,target$1){_edge1.subVectors(b$1,a$1),_edge2.subVectors(c$3,a$1),_normal$1.crossVectors(_edge1,_edge2);let DdN=this.direction.dot(_normal$1),sign$1;if(DdN>0){if(backfaceCulling)return null;sign$1=1}else if(DdN<0)sign$1=-1,DdN=-DdN;else return null;_diff.subVectors(this.origin,a$1);let DdQxE2=sign$1*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(DdQxE2<0)return null;let DdE1xQ=sign$1*this.direction.dot(_edge1.cross(_diff));if(DdE1xQ<0||DdQxE2+DdE1xQ>DdN)return null;let QdN=-sign$1*_diff.dot(_normal$1);return QdN<0?null:this.at(QdN/DdN,target$1)}applyMatrix4(matrix4){return this.origin.applyMatrix4(matrix4),this.direction.transformDirection(matrix4),this}equals(ray){return ray.origin.equals(this.origin)&&ray.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Matrix4=class Matrix4{constructor(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){Matrix4.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],n11!==void 0&&this.set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44)}set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){let te$1=this.elements;return te$1[0]=n11,te$1[4]=n12,te$1[8]=n13,te$1[12]=n14,te$1[1]=n21,te$1[5]=n22,te$1[9]=n23,te$1[13]=n24,te$1[2]=n31,te$1[6]=n32,te$1[10]=n33,te$1[14]=n34,te$1[3]=n41,te$1[7]=n42,te$1[11]=n43,te$1[15]=n44,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Matrix4().fromArray(this.elements)}copy(m){let te$1=this.elements,me=m.elements;return te$1[0]=me[0],te$1[1]=me[1],te$1[2]=me[2],te$1[3]=me[3],te$1[4]=me[4],te$1[5]=me[5],te$1[6]=me[6],te$1[7]=me[7],te$1[8]=me[8],te$1[9]=me[9],te$1[10]=me[10],te$1[11]=me[11],te$1[12]=me[12],te$1[13]=me[13],te$1[14]=me[14],te$1[15]=me[15],this}copyPosition(m){let te$1=this.elements,me=m.elements;return te$1[12]=me[12],te$1[13]=me[13],te$1[14]=me[14],this}setFromMatrix3(m){let me=m.elements;return this.set(me[0],me[3],me[6],0,me[1],me[4],me[7],0,me[2],me[5],me[8],0,0,0,0,1),this}extractBasis(xAxis,yAxis,zAxis){return xAxis.setFromMatrixColumn(this,0),yAxis.setFromMatrixColumn(this,1),zAxis.setFromMatrixColumn(this,2),this}makeBasis(xAxis,yAxis,zAxis){return this.set(xAxis.x,yAxis.x,zAxis.x,0,xAxis.y,yAxis.y,zAxis.y,0,xAxis.z,yAxis.z,zAxis.z,0,0,0,0,1),this}extractRotation(m){let te$1=this.elements,me=m.elements,scaleX=1/_v1$5.setFromMatrixColumn(m,0).length(),scaleY=1/_v1$5.setFromMatrixColumn(m,1).length(),scaleZ=1/_v1$5.setFromMatrixColumn(m,2).length();return te$1[0]=me[0]*scaleX,te$1[1]=me[1]*scaleX,te$1[2]=me[2]*scaleX,te$1[3]=0,te$1[4]=me[4]*scaleY,te$1[5]=me[5]*scaleY,te$1[6]=me[6]*scaleY,te$1[7]=0,te$1[8]=me[8]*scaleZ,te$1[9]=me[9]*scaleZ,te$1[10]=me[10]*scaleZ,te$1[11]=0,te$1[12]=0,te$1[13]=0,te$1[14]=0,te$1[15]=1,this}makeRotationFromEuler(euler){let te$1=this.elements,x$1=euler.x,y=euler.y,z$1=euler.z,a$1=Math.cos(x$1),b$1=Math.sin(x$1),c$3=Math.cos(y),d=Math.sin(y),e$4=Math.cos(z$1),f$2=Math.sin(z$1);if(euler.order===`XYZ`){let ae=a$1*e$4,af=a$1*f$2,be$1=b$1*e$4,bf=b$1*f$2;te$1[0]=c$3*e$4,te$1[4]=-c$3*f$2,te$1[8]=d,te$1[1]=af+be$1*d,te$1[5]=ae-bf*d,te$1[9]=-b$1*c$3,te$1[2]=bf-ae*d,te$1[6]=be$1+af*d,te$1[10]=a$1*c$3}else if(euler.order===`YXZ`){let ce$1=c$3*e$4,cf=c$3*f$2,de$2=d*e$4,df=d*f$2;te$1[0]=ce$1+df*b$1,te$1[4]=de$2*b$1-cf,te$1[8]=a$1*d,te$1[1]=a$1*f$2,te$1[5]=a$1*e$4,te$1[9]=-b$1,te$1[2]=cf*b$1-de$2,te$1[6]=df+ce$1*b$1,te$1[10]=a$1*c$3}else if(euler.order===`ZXY`){let ce$1=c$3*e$4,cf=c$3*f$2,de$2=d*e$4,df=d*f$2;te$1[0]=ce$1-df*b$1,te$1[4]=-a$1*f$2,te$1[8]=de$2+cf*b$1,te$1[1]=cf+de$2*b$1,te$1[5]=a$1*e$4,te$1[9]=df-ce$1*b$1,te$1[2]=-a$1*d,te$1[6]=b$1,te$1[10]=a$1*c$3}else if(euler.order===`ZYX`){let ae=a$1*e$4,af=a$1*f$2,be$1=b$1*e$4,bf=b$1*f$2;te$1[0]=c$3*e$4,te$1[4]=be$1*d-af,te$1[8]=ae*d+bf,te$1[1]=c$3*f$2,te$1[5]=bf*d+ae,te$1[9]=af*d-be$1,te$1[2]=-d,te$1[6]=b$1*c$3,te$1[10]=a$1*c$3}else if(euler.order===`YZX`){let ac=a$1*c$3,ad=a$1*d,bc=b$1*c$3,bd=b$1*d;te$1[0]=c$3*e$4,te$1[4]=bd-ac*f$2,te$1[8]=bc*f$2+ad,te$1[1]=f$2,te$1[5]=a$1*e$4,te$1[9]=-b$1*e$4,te$1[2]=-d*e$4,te$1[6]=ad*f$2+bc,te$1[10]=ac-bd*f$2}else if(euler.order===`XZY`){let ac=a$1*c$3,ad=a$1*d,bc=b$1*c$3,bd=b$1*d;te$1[0]=c$3*e$4,te$1[4]=-f$2,te$1[8]=d*e$4,te$1[1]=ac*f$2+bd,te$1[5]=a$1*e$4,te$1[9]=ad*f$2-bc,te$1[2]=bc*f$2-ad,te$1[6]=b$1*e$4,te$1[10]=bd*f$2+ac}return te$1[3]=0,te$1[7]=0,te$1[11]=0,te$1[12]=0,te$1[13]=0,te$1[14]=0,te$1[15]=1,this}makeRotationFromQuaternion(q){return this.compose(_zero,q,_one)}lookAt(eye,target$1,up){let te$1=this.elements;return _z.subVectors(eye,target$1),_z.lengthSq()===0&&(_z.z=1),_z.normalize(),_x.crossVectors(up,_z),_x.lengthSq()===0&&(Math.abs(up.z)===1?_z.x+=1e-4:_z.z+=1e-4,_z.normalize(),_x.crossVectors(up,_z)),_x.normalize(),_y.crossVectors(_z,_x),te$1[0]=_x.x,te$1[4]=_y.x,te$1[8]=_z.x,te$1[1]=_x.y,te$1[5]=_y.y,te$1[9]=_z.y,te$1[2]=_x.z,te$1[6]=_y.z,te$1[10]=_z.z,this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a$1,b$1){let ae=a$1.elements,be$1=b$1.elements,te$1=this.elements,a11=ae[0],a12=ae[4],a13=ae[8],a14=ae[12],a21=ae[1],a22=ae[5],a23=ae[9],a24=ae[13],a31=ae[2],a32=ae[6],a33=ae[10],a34=ae[14],a41=ae[3],a42=ae[7],a43=ae[11],a44=ae[15],b11=be$1[0],b12=be$1[4],b13=be$1[8],b14=be$1[12],b21=be$1[1],b22=be$1[5],b23=be$1[9],b24=be$1[13],b31=be$1[2],b32=be$1[6],b33=be$1[10],b34=be$1[14],b41=be$1[3],b42=be$1[7],b43=be$1[11],b44=be$1[15];return te$1[0]=a11*b11+a12*b21+a13*b31+a14*b41,te$1[4]=a11*b12+a12*b22+a13*b32+a14*b42,te$1[8]=a11*b13+a12*b23+a13*b33+a14*b43,te$1[12]=a11*b14+a12*b24+a13*b34+a14*b44,te$1[1]=a21*b11+a22*b21+a23*b31+a24*b41,te$1[5]=a21*b12+a22*b22+a23*b32+a24*b42,te$1[9]=a21*b13+a22*b23+a23*b33+a24*b43,te$1[13]=a21*b14+a22*b24+a23*b34+a24*b44,te$1[2]=a31*b11+a32*b21+a33*b31+a34*b41,te$1[6]=a31*b12+a32*b22+a33*b32+a34*b42,te$1[10]=a31*b13+a32*b23+a33*b33+a34*b43,te$1[14]=a31*b14+a32*b24+a33*b34+a34*b44,te$1[3]=a41*b11+a42*b21+a43*b31+a44*b41,te$1[7]=a41*b12+a42*b22+a43*b32+a44*b42,te$1[11]=a41*b13+a42*b23+a43*b33+a44*b43,te$1[15]=a41*b14+a42*b24+a43*b34+a44*b44,this}multiplyScalar(s){let te$1=this.elements;return te$1[0]*=s,te$1[4]*=s,te$1[8]*=s,te$1[12]*=s,te$1[1]*=s,te$1[5]*=s,te$1[9]*=s,te$1[13]*=s,te$1[2]*=s,te$1[6]*=s,te$1[10]*=s,te$1[14]*=s,te$1[3]*=s,te$1[7]*=s,te$1[11]*=s,te$1[15]*=s,this}determinant(){let te$1=this.elements,n11=te$1[0],n12=te$1[4],n13=te$1[8],n14=te$1[12],n21=te$1[1],n22=te$1[5],n23=te$1[9],n24=te$1[13],n31=te$1[2],n32=te$1[6],n33=te$1[10],n34=te$1[14],n41=te$1[3],n42=te$1[7],n43=te$1[11],n44=te$1[15];return n41*(+n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34)+n42*(+n11*n23*n34-n11*n24*n33+n14*n21*n33-n13*n21*n34+n13*n24*n31-n14*n23*n31)+n43*(+n11*n24*n32-n11*n22*n34-n14*n21*n32+n12*n21*n34+n14*n22*n31-n12*n24*n31)+n44*(-n13*n22*n31-n11*n23*n32+n11*n22*n33+n13*n21*n32-n12*n21*n33+n12*n23*n31)}transpose(){let te$1=this.elements,tmp$1;return tmp$1=te$1[1],te$1[1]=te$1[4],te$1[4]=tmp$1,tmp$1=te$1[2],te$1[2]=te$1[8],te$1[8]=tmp$1,tmp$1=te$1[6],te$1[6]=te$1[9],te$1[9]=tmp$1,tmp$1=te$1[3],te$1[3]=te$1[12],te$1[12]=tmp$1,tmp$1=te$1[7],te$1[7]=te$1[13],te$1[13]=tmp$1,tmp$1=te$1[11],te$1[11]=te$1[14],te$1[14]=tmp$1,this}setPosition(x$1,y,z$1){let te$1=this.elements;return x$1.isVector3?(te$1[12]=x$1.x,te$1[13]=x$1.y,te$1[14]=x$1.z):(te$1[12]=x$1,te$1[13]=y,te$1[14]=z$1),this}invert(){let te$1=this.elements,n11=te$1[0],n21=te$1[1],n31=te$1[2],n41=te$1[3],n12=te$1[4],n22=te$1[5],n32=te$1[6],n42=te$1[7],n13=te$1[8],n23=te$1[9],n33=te$1[10],n43=te$1[11],n14=te$1[12],n24=te$1[13],n34=te$1[14],n44=te$1[15],t11=n23*n34*n42-n24*n33*n42+n24*n32*n43-n22*n34*n43-n23*n32*n44+n22*n33*n44,t12=n14*n33*n42-n13*n34*n42-n14*n32*n43+n12*n34*n43+n13*n32*n44-n12*n33*n44,t13=n13*n24*n42-n14*n23*n42+n14*n22*n43-n12*n24*n43-n13*n22*n44+n12*n23*n44,t14=n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34,det=n11*t11+n21*t12+n31*t13+n41*t14;if(det===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let detInv=1/det;return te$1[0]=t11*detInv,te$1[1]=(n24*n33*n41-n23*n34*n41-n24*n31*n43+n21*n34*n43+n23*n31*n44-n21*n33*n44)*detInv,te$1[2]=(n22*n34*n41-n24*n32*n41+n24*n31*n42-n21*n34*n42-n22*n31*n44+n21*n32*n44)*detInv,te$1[3]=(n23*n32*n41-n22*n33*n41-n23*n31*n42+n21*n33*n42+n22*n31*n43-n21*n32*n43)*detInv,te$1[4]=t12*detInv,te$1[5]=(n13*n34*n41-n14*n33*n41+n14*n31*n43-n11*n34*n43-n13*n31*n44+n11*n33*n44)*detInv,te$1[6]=(n14*n32*n41-n12*n34*n41-n14*n31*n42+n11*n34*n42+n12*n31*n44-n11*n32*n44)*detInv,te$1[7]=(n12*n33*n41-n13*n32*n41+n13*n31*n42-n11*n33*n42-n12*n31*n43+n11*n32*n43)*detInv,te$1[8]=t13*detInv,te$1[9]=(n14*n23*n41-n13*n24*n41-n14*n21*n43+n11*n24*n43+n13*n21*n44-n11*n23*n44)*detInv,te$1[10]=(n12*n24*n41-n14*n22*n41+n14*n21*n42-n11*n24*n42-n12*n21*n44+n11*n22*n44)*detInv,te$1[11]=(n13*n22*n41-n12*n23*n41-n13*n21*n42+n11*n23*n42+n12*n21*n43-n11*n22*n43)*detInv,te$1[12]=t14*detInv,te$1[13]=(n13*n24*n31-n14*n23*n31+n14*n21*n33-n11*n24*n33-n13*n21*n34+n11*n23*n34)*detInv,te$1[14]=(n14*n22*n31-n12*n24*n31-n14*n21*n32+n11*n24*n32+n12*n21*n34-n11*n22*n34)*detInv,te$1[15]=(n12*n23*n31-n13*n22*n31+n13*n21*n32-n11*n23*n32-n12*n21*n33+n11*n22*n33)*detInv,this}scale(v){let te$1=this.elements,x$1=v.x,y=v.y,z$1=v.z;return te$1[0]*=x$1,te$1[4]*=y,te$1[8]*=z$1,te$1[1]*=x$1,te$1[5]*=y,te$1[9]*=z$1,te$1[2]*=x$1,te$1[6]*=y,te$1[10]*=z$1,te$1[3]*=x$1,te$1[7]*=y,te$1[11]*=z$1,this}getMaxScaleOnAxis(){let te$1=this.elements,scaleXSq=te$1[0]*te$1[0]+te$1[1]*te$1[1]+te$1[2]*te$1[2],scaleYSq=te$1[4]*te$1[4]+te$1[5]*te$1[5]+te$1[6]*te$1[6],scaleZSq=te$1[8]*te$1[8]+te$1[9]*te$1[9]+te$1[10]*te$1[10];return Math.sqrt(Math.max(scaleXSq,scaleYSq,scaleZSq))}makeTranslation(x$1,y,z$1){return x$1.isVector3?this.set(1,0,0,x$1.x,0,1,0,x$1.y,0,0,1,x$1.z,0,0,0,1):this.set(1,0,0,x$1,0,1,0,y,0,0,1,z$1,0,0,0,1),this}makeRotationX(theta){let c$3=Math.cos(theta),s=Math.sin(theta);return this.set(1,0,0,0,0,c$3,-s,0,0,s,c$3,0,0,0,0,1),this}makeRotationY(theta){let c$3=Math.cos(theta),s=Math.sin(theta);return this.set(c$3,0,s,0,0,1,0,0,-s,0,c$3,0,0,0,0,1),this}makeRotationZ(theta){let c$3=Math.cos(theta),s=Math.sin(theta);return this.set(c$3,-s,0,0,s,c$3,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(axis,angle){let c$3=Math.cos(angle),s=Math.sin(angle),t$1=1-c$3,x$1=axis.x,y=axis.y,z$1=axis.z,tx=t$1*x$1,ty=t$1*y;return this.set(tx*x$1+c$3,tx*y-s*z$1,tx*z$1+s*y,0,tx*y+s*z$1,ty*y+c$3,ty*z$1-s*x$1,0,tx*z$1-s*y,ty*z$1+s*x$1,t$1*z$1*z$1+c$3,0,0,0,0,1),this}makeScale(x$1,y,z$1){return this.set(x$1,0,0,0,0,y,0,0,0,0,z$1,0,0,0,0,1),this}makeShear(xy,xz,yx,yz,zx,zy){return this.set(1,yx,zx,0,xy,1,zy,0,xz,yz,1,0,0,0,0,1),this}compose(position$2,quaternion,scale$1){let te$1=this.elements,x$1=quaternion._x,y=quaternion._y,z$1=quaternion._z,w=quaternion._w,x2=x$1+x$1,y2=y+y,z2=z$1+z$1,xx=x$1*x2,xy=x$1*y2,xz=x$1*z2,yy=y*y2,yz=y*z2,zz=z$1*z2,wx=w*x2,wy=w*y2,wz=w*z2,sx=scale$1.x,sy=scale$1.y,sz=scale$1.z;return te$1[0]=(1-(yy+zz))*sx,te$1[1]=(xy+wz)*sx,te$1[2]=(xz-wy)*sx,te$1[3]=0,te$1[4]=(xy-wz)*sy,te$1[5]=(1-(xx+zz))*sy,te$1[6]=(yz+wx)*sy,te$1[7]=0,te$1[8]=(xz+wy)*sz,te$1[9]=(yz-wx)*sz,te$1[10]=(1-(xx+yy))*sz,te$1[11]=0,te$1[12]=position$2.x,te$1[13]=position$2.y,te$1[14]=position$2.z,te$1[15]=1,this}decompose(position$2,quaternion,scale$1){let te$1=this.elements,sx=_v1$5.set(te$1[0],te$1[1],te$1[2]).length(),sy=_v1$5.set(te$1[4],te$1[5],te$1[6]).length(),sz=_v1$5.set(te$1[8],te$1[9],te$1[10]).length(),det=this.determinant();det<0&&(sx=-sx),position$2.x=te$1[12],position$2.y=te$1[13],position$2.z=te$1[14],_m1$2.copy(this);let invSX=1/sx,invSY=1/sy,invSZ=1/sz;return _m1$2.elements[0]*=invSX,_m1$2.elements[1]*=invSX,_m1$2.elements[2]*=invSX,_m1$2.elements[4]*=invSY,_m1$2.elements[5]*=invSY,_m1$2.elements[6]*=invSY,_m1$2.elements[8]*=invSZ,_m1$2.elements[9]*=invSZ,_m1$2.elements[10]*=invSZ,quaternion.setFromRotationMatrix(_m1$2),scale$1.x=sx,scale$1.y=sy,scale$1.z=sz,this}makePerspective(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=!1){let te$1=this.elements,x$1=2*near/(right-left),y=2*near/(top-bottom),a$1=(right+left)/(right-left),b$1=(top+bottom)/(top-bottom),c$3,d;if(reversedDepth)c$3=near/(far-near),d=far*near/(far-near);else if(coordinateSystem===WebGLCoordinateSystem)c$3=-(far+near)/(far-near),d=-2*far*near/(far-near);else if(coordinateSystem===WebGPUCoordinateSystem)c$3=-far/(far-near),d=-far*near/(far-near);else throw Error(`THREE.Matrix4.makePerspective(): Invalid coordinate system: `+coordinateSystem);return te$1[0]=x$1,te$1[4]=0,te$1[8]=a$1,te$1[12]=0,te$1[1]=0,te$1[5]=y,te$1[9]=b$1,te$1[13]=0,te$1[2]=0,te$1[6]=0,te$1[10]=c$3,te$1[14]=d,te$1[3]=0,te$1[7]=0,te$1[11]=-1,te$1[15]=0,this}makeOrthographic(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=!1){let te$1=this.elements,x$1=2/(right-left),y=2/(top-bottom),a$1=-(right+left)/(right-left),b$1=-(top+bottom)/(top-bottom),c$3,d;if(reversedDepth)c$3=1/(far-near),d=far/(far-near);else if(coordinateSystem===WebGLCoordinateSystem)c$3=-2/(far-near),d=-(far+near)/(far-near);else if(coordinateSystem===WebGPUCoordinateSystem)c$3=-1/(far-near),d=-near/(far-near);else throw Error(`THREE.Matrix4.makeOrthographic(): Invalid coordinate system: `+coordinateSystem);return te$1[0]=x$1,te$1[4]=0,te$1[8]=0,te$1[12]=a$1,te$1[1]=0,te$1[5]=y,te$1[9]=0,te$1[13]=b$1,te$1[2]=0,te$1[6]=0,te$1[10]=c$3,te$1[14]=d,te$1[3]=0,te$1[7]=0,te$1[11]=0,te$1[15]=1,this}equals(matrix){let te$1=this.elements,me=matrix.elements;for(let i=0;i<16;i++)if(te$1[i]!==me[i])return!1;return!0}fromArray(array$1,offset$2=0){for(let i=0;i<16;i++)this.elements[i]=array$1[i+offset$2];return this}toArray(array$1=[],offset$2=0){let te$1=this.elements;return array$1[offset$2]=te$1[0],array$1[offset$2+1]=te$1[1],array$1[offset$2+2]=te$1[2],array$1[offset$2+3]=te$1[3],array$1[offset$2+4]=te$1[4],array$1[offset$2+5]=te$1[5],array$1[offset$2+6]=te$1[6],array$1[offset$2+7]=te$1[7],array$1[offset$2+8]=te$1[8],array$1[offset$2+9]=te$1[9],array$1[offset$2+10]=te$1[10],array$1[offset$2+11]=te$1[11],array$1[offset$2+12]=te$1[12],array$1[offset$2+13]=te$1[13],array$1[offset$2+14]=te$1[14],array$1[offset$2+15]=te$1[15],array$1}};const _v1$5=new Vector3,_m1$2=new Matrix4,_zero=new Vector3(0,0,0),_one=new Vector3(1,1,1),_x=new Vector3,_y=new Vector3,_z=new Vector3,_matrix$2=new Matrix4,_quaternion$3=new Quaternion;var Euler=class Euler{constructor(x$1=0,y=0,z$1=0,order$3=Euler.DEFAULT_ORDER){this.isEuler=!0,this._x=x$1,this._y=y,this._z=z$1,this._order=order$3}get x(){return this._x}set x(value$1){this._x=value$1,this._onChangeCallback()}get y(){return this._y}set y(value$1){this._y=value$1,this._onChangeCallback()}get z(){return this._z}set z(value$1){this._z=value$1,this._onChangeCallback()}get order(){return this._order}set order(value$1){this._order=value$1,this._onChangeCallback()}set(x$1,y,z$1,order$3=this._order){return this._x=x$1,this._y=y,this._z=z$1,this._order=order$3,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(euler){return this._x=euler._x,this._y=euler._y,this._z=euler._z,this._order=euler._order,this._onChangeCallback(),this}setFromRotationMatrix(m,order$3=this._order,update=!0){let te$1=m.elements,m11=te$1[0],m12=te$1[4],m13=te$1[8],m21=te$1[1],m22=te$1[5],m23=te$1[9],m31=te$1[2],m32=te$1[6],m33=te$1[10];switch(order$3){case`XYZ`:this._y=Math.asin(clamp$7(m13,-1,1)),Math.abs(m13)<.9999999?(this._x=Math.atan2(-m23,m33),this._z=Math.atan2(-m12,m11)):(this._x=Math.atan2(m32,m22),this._z=0);break;case`YXZ`:this._x=Math.asin(-clamp$7(m23,-1,1)),Math.abs(m23)<.9999999?(this._y=Math.atan2(m13,m33),this._z=Math.atan2(m21,m22)):(this._y=Math.atan2(-m31,m11),this._z=0);break;case`ZXY`:this._x=Math.asin(clamp$7(m32,-1,1)),Math.abs(m32)<.9999999?(this._y=Math.atan2(-m31,m33),this._z=Math.atan2(-m12,m22)):(this._y=0,this._z=Math.atan2(m21,m11));break;case`ZYX`:this._y=Math.asin(-clamp$7(m31,-1,1)),Math.abs(m31)<.9999999?(this._x=Math.atan2(m32,m33),this._z=Math.atan2(m21,m11)):(this._x=0,this._z=Math.atan2(-m12,m22));break;case`YZX`:this._z=Math.asin(clamp$7(m21,-1,1)),Math.abs(m21)<.9999999?(this._x=Math.atan2(-m23,m22),this._y=Math.atan2(-m31,m11)):(this._x=0,this._y=Math.atan2(m13,m33));break;case`XZY`:this._z=Math.asin(-clamp$7(m12,-1,1)),Math.abs(m12)<.9999999?(this._x=Math.atan2(m32,m22),this._y=Math.atan2(m13,m11)):(this._x=Math.atan2(-m23,m33),this._y=0);break;default:console.warn(`THREE.Euler: .setFromRotationMatrix() encountered an unknown order: `+order$3)}return this._order=order$3,update===!0&&this._onChangeCallback(),this}setFromQuaternion(q,order$3,update){return _matrix$2.makeRotationFromQuaternion(q),this.setFromRotationMatrix(_matrix$2,order$3,update)}setFromVector3(v,order$3=this._order){return this.set(v.x,v.y,v.z,order$3)}reorder(newOrder){return _quaternion$3.setFromEuler(this),this.setFromQuaternion(_quaternion$3,newOrder)}equals(euler){return euler._x===this._x&&euler._y===this._y&&euler._z===this._z&&euler._order===this._order}fromArray(array$1){return this._x=array$1[0],this._y=array$1[1],this._z=array$1[2],array$1[3]!==void 0&&(this._order=array$1[3]),this._onChangeCallback(),this}toArray(array$1=[],offset$2=0){return array$1[offset$2]=this._x,array$1[offset$2+1]=this._y,array$1[offset$2+2]=this._z,array$1[offset$2+3]=this._order,array$1}_onChange(callback){return this._onChangeCallback=callback,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};Euler.DEFAULT_ORDER=`XYZ`;var Layers=class{constructor(){this.mask=1}set(layer){this.mask=(1<>>0}enable(layer){this.mask|=1<1){for(let i=0;i1){for(let i=0;i0&&(object$1.userData=this.userData),object$1.layers=this.layers.mask,object$1.matrix=this.matrix.toArray(),object$1.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(object$1.matrixAutoUpdate=!1),this.isInstancedMesh&&(object$1.type=`InstancedMesh`,object$1.count=this.count,object$1.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(object$1.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(object$1.type=`BatchedMesh`,object$1.perObjectFrustumCulled=this.perObjectFrustumCulled,object$1.sortObjects=this.sortObjects,object$1.drawRanges=this._drawRanges,object$1.reservedRanges=this._reservedRanges,object$1.geometryInfo=this._geometryInfo.map(info=>({...info,boundingBox:info.boundingBox?info.boundingBox.toJSON():void 0,boundingSphere:info.boundingSphere?info.boundingSphere.toJSON():void 0})),object$1.instanceInfo=this._instanceInfo.map(info=>({...info})),object$1.availableInstanceIds=this._availableInstanceIds.slice(),object$1.availableGeometryIds=this._availableGeometryIds.slice(),object$1.nextIndexStart=this._nextIndexStart,object$1.nextVertexStart=this._nextVertexStart,object$1.geometryCount=this._geometryCount,object$1.maxInstanceCount=this._maxInstanceCount,object$1.maxVertexCount=this._maxVertexCount,object$1.maxIndexCount=this._maxIndexCount,object$1.geometryInitialized=this._geometryInitialized,object$1.matricesTexture=this._matricesTexture.toJSON(meta),object$1.indirectTexture=this._indirectTexture.toJSON(meta),this._colorsTexture!==null&&(object$1.colorsTexture=this._colorsTexture.toJSON(meta)),this.boundingSphere!==null&&(object$1.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(object$1.boundingBox=this.boundingBox.toJSON()));function serialize$2(library,element$3){return library[element$3.uuid]===void 0&&(library[element$3.uuid]=element$3.toJSON(meta)),element$3.uuid}if(this.isScene)this.background&&(this.background.isColor?object$1.background=this.background.toJSON():this.background.isTexture&&(object$1.background=this.background.toJSON(meta).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(object$1.environment=this.environment.toJSON(meta).uuid);else if(this.isMesh||this.isLine||this.isPoints){object$1.geometry=serialize$2(meta.geometries,this.geometry);let parameters=this.geometry.parameters;if(parameters!==void 0&¶meters.shapes!==void 0){let shapes=parameters.shapes;if(Array.isArray(shapes))for(let i=0,l=shapes.length;i0){object$1.children=[];for(let i=0;i0){object$1.animations=[];for(let i=0;i0&&(output.geometries=geometries),materials.length>0&&(output.materials=materials),textures.length>0&&(output.textures=textures),images.length>0&&(output.images=images),shapes.length>0&&(output.shapes=shapes),skeletons.length>0&&(output.skeletons=skeletons),animations$1.length>0&&(output.animations=animations$1),nodes.length>0&&(output.nodes=nodes)}return output.object=object$1,output;function extractFromCache(cache$1){let values=[];for(let key$2 in cache$1){let data$12=cache$1[key$2];delete data$12.metadata,values.push(data$12)}return values}}clone(recursive){return new this.constructor().copy(this,recursive)}copy(source,recursive=!0){if(this.name=source.name,this.up.copy(source.up),this.position.copy(source.position),this.rotation.order=source.rotation.order,this.quaternion.copy(source.quaternion),this.scale.copy(source.scale),this.matrix.copy(source.matrix),this.matrixWorld.copy(source.matrixWorld),this.matrixAutoUpdate=source.matrixAutoUpdate,this.matrixWorldAutoUpdate=source.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=source.matrixWorldNeedsUpdate,this.layers.mask=source.layers.mask,this.visible=source.visible,this.castShadow=source.castShadow,this.receiveShadow=source.receiveShadow,this.frustumCulled=source.frustumCulled,this.renderOrder=source.renderOrder,this.animations=source.animations.slice(),this.userData=JSON.parse(JSON.stringify(source.userData)),recursive===!0)for(let i=0;i0?target$1.multiplyScalar(1/Math.sqrt(targetLengthSq)):target$1.set(0,0,0)}static getBarycoord(point$3,a$1,b$1,c$3,target$1){_v0$1.subVectors(c$3,a$1),_v1$3.subVectors(b$1,a$1),_v2$2.subVectors(point$3,a$1);let dot00=_v0$1.dot(_v0$1),dot01=_v0$1.dot(_v1$3),dot02=_v0$1.dot(_v2$2),dot11=_v1$3.dot(_v1$3),dot12=_v1$3.dot(_v2$2),denom=dot00*dot11-dot01*dot01;if(denom===0)return target$1.set(0,0,0),null;let invDenom=1/denom,u=(dot11*dot02-dot01*dot12)*invDenom,v=(dot00*dot12-dot01*dot02)*invDenom;return target$1.set(1-u-v,v,u)}static containsPoint(point$3,a$1,b$1,c$3){return this.getBarycoord(point$3,a$1,b$1,c$3,_v3$2)===null?!1:_v3$2.x>=0&&_v3$2.y>=0&&_v3$2.x+_v3$2.y<=1}static getInterpolation(point$3,p1,p2,p3$1,v1,v2,v3,target$1){return this.getBarycoord(point$3,p1,p2,p3$1,_v3$2)===null?(target$1.x=0,target$1.y=0,`z`in target$1&&(target$1.z=0),`w`in target$1&&(target$1.w=0),null):(target$1.setScalar(0),target$1.addScaledVector(v1,_v3$2.x),target$1.addScaledVector(v2,_v3$2.y),target$1.addScaledVector(v3,_v3$2.z),target$1)}static getInterpolatedAttribute(attr,i1,i2,i3,barycoord,target$1){return _v40.setScalar(0),_v41.setScalar(0),_v42.setScalar(0),_v40.fromBufferAttribute(attr,i1),_v41.fromBufferAttribute(attr,i2),_v42.fromBufferAttribute(attr,i3),target$1.setScalar(0),target$1.addScaledVector(_v40,barycoord.x),target$1.addScaledVector(_v41,barycoord.y),target$1.addScaledVector(_v42,barycoord.z),target$1}static isFrontFacing(a$1,b$1,c$3,direction){return _v0$1.subVectors(c$3,b$1),_v1$3.subVectors(a$1,b$1),_v0$1.cross(_v1$3).dot(direction)<0}set(a$1,b$1,c$3){return this.a.copy(a$1),this.b.copy(b$1),this.c.copy(c$3),this}setFromPointsAndIndices(points,i0,i1,i2){return this.a.copy(points[i0]),this.b.copy(points[i1]),this.c.copy(points[i2]),this}setFromAttributeAndIndices(attribute,i0,i1,i2){return this.a.fromBufferAttribute(attribute,i0),this.b.fromBufferAttribute(attribute,i1),this.c.fromBufferAttribute(attribute,i2),this}clone(){return new this.constructor().copy(this)}copy(triangle){return this.a.copy(triangle.a),this.b.copy(triangle.b),this.c.copy(triangle.c),this}getArea(){return _v0$1.subVectors(this.c,this.b),_v1$3.subVectors(this.a,this.b),_v0$1.cross(_v1$3).length()*.5}getMidpoint(target$1){return target$1.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(target$1){return Triangle.getNormal(this.a,this.b,this.c,target$1)}getPlane(target$1){return target$1.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(point$3,target$1){return Triangle.getBarycoord(point$3,this.a,this.b,this.c,target$1)}getInterpolation(point$3,v1,v2,v3,target$1){return Triangle.getInterpolation(point$3,this.a,this.b,this.c,v1,v2,v3,target$1)}containsPoint(point$3){return Triangle.containsPoint(point$3,this.a,this.b,this.c)}isFrontFacing(direction){return Triangle.isFrontFacing(this.a,this.b,this.c,direction)}intersectsBox(box){return box.intersectsTriangle(this)}closestPointToPoint(p$4,target$1){let a$1=this.a,b$1=this.b,c$3=this.c,v,w;_vab.subVectors(b$1,a$1),_vac.subVectors(c$3,a$1),_vap.subVectors(p$4,a$1);let d1=_vab.dot(_vap),d2=_vac.dot(_vap);if(d1<=0&&d2<=0)return target$1.copy(a$1);_vbp.subVectors(p$4,b$1);let d3=_vab.dot(_vbp),d4=_vac.dot(_vbp);if(d3>=0&&d4<=d3)return target$1.copy(b$1);let vc=d1*d4-d3*d2;if(vc<=0&&d1>=0&&d3<=0)return v=d1/(d1-d3),target$1.copy(a$1).addScaledVector(_vab,v);_vcp.subVectors(p$4,c$3);let d5=_vab.dot(_vcp),d6=_vac.dot(_vcp);if(d6>=0&&d5<=d6)return target$1.copy(c$3);let vb=d5*d2-d1*d6;if(vb<=0&&d2>=0&&d6<=0)return w=d2/(d2-d6),target$1.copy(a$1).addScaledVector(_vac,w);let va=d3*d6-d5*d4;if(va<=0&&d4-d3>=0&&d5-d6>=0)return _vbc.subVectors(c$3,b$1),w=(d4-d3)/(d4-d3+(d5-d6)),target$1.copy(b$1).addScaledVector(_vbc,w);let denom=1/(va+vb+vc);return v=vb*denom,w=vc*denom,target$1.copy(a$1).addScaledVector(_vab,v).addScaledVector(_vac,w)}equals(triangle){return triangle.a.equals(this.a)&&triangle.b.equals(this.b)&&triangle.c.equals(this.c)}};const _colorKeywords={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},_hslA={h:0,s:0,l:0},_hslB={h:0,s:0,l:0};function hue2rgb$1(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)*6*(2/3-t$1):p$4}var Color=class{constructor(r$1,g,b$1){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(r$1,g,b$1)}set(r$1,g,b$1){if(g===void 0&&b$1===void 0){let value$1=r$1;value$1&&value$1.isColor?this.copy(value$1):typeof value$1==`number`?this.setHex(value$1):typeof value$1==`string`&&this.setStyle(value$1)}else this.setRGB(r$1,g,b$1);return this}setScalar(scalar){return this.r=scalar,this.g=scalar,this.b=scalar,this}setHex(hex$2,colorSpace=SRGBColorSpace){return hex$2=Math.floor(hex$2),this.r=(hex$2>>16&255)/255,this.g=(hex$2>>8&255)/255,this.b=(hex$2&255)/255,ColorManagement.colorSpaceToWorking(this,colorSpace),this}setRGB(r$1,g,b$1,colorSpace=ColorManagement.workingColorSpace){return this.r=r$1,this.g=g,this.b=b$1,ColorManagement.colorSpaceToWorking(this,colorSpace),this}setHSL(h$1,s,l,colorSpace=ColorManagement.workingColorSpace){if(h$1=euclideanModulo(h$1,1),s=clamp$7(s,0,1),l=clamp$7(l,0,1),s===0)this.r=this.g=this.b=l;else{let p$4=l<=.5?l*(1+s):l+s-l*s,q=2*l-p$4;this.r=hue2rgb$1(q,p$4,h$1+1/3),this.g=hue2rgb$1(q,p$4,h$1),this.b=hue2rgb$1(q,p$4,h$1-1/3)}return ColorManagement.colorSpaceToWorking(this,colorSpace),this}setStyle(style,colorSpace=SRGBColorSpace){function handleAlpha(string$4){string$4!==void 0&&parseFloat(string$4)<1&&console.warn(`THREE.Color: Alpha component of `+style+` will be ignored.`)}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(style)){let color$2,name$2=m[1],components=m[2];switch(name$2){case`rgb`:case`rgba`:if(color$2=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components))return handleAlpha(color$2[4]),this.setRGB(Math.min(255,parseInt(color$2[1],10))/255,Math.min(255,parseInt(color$2[2],10))/255,Math.min(255,parseInt(color$2[3],10))/255,colorSpace);if(color$2=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components))return handleAlpha(color$2[4]),this.setRGB(Math.min(100,parseInt(color$2[1],10))/100,Math.min(100,parseInt(color$2[2],10))/100,Math.min(100,parseInt(color$2[3],10))/100,colorSpace);break;case`hsl`:case`hsla`:if(color$2=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components))return handleAlpha(color$2[4]),this.setHSL(parseFloat(color$2[1])/360,parseFloat(color$2[2])/100,parseFloat(color$2[3])/100,colorSpace);break;default:console.warn(`THREE.Color: Unknown color model `+style)}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(style)){let hex$2=m[1],size$2=hex$2.length;if(size$2===3)return this.setRGB(parseInt(hex$2.charAt(0),16)/15,parseInt(hex$2.charAt(1),16)/15,parseInt(hex$2.charAt(2),16)/15,colorSpace);if(size$2===6)return this.setHex(parseInt(hex$2,16),colorSpace);console.warn(`THREE.Color: Invalid hex color `+style)}else if(style&&style.length>0)return this.setColorName(style,colorSpace);return this}setColorName(style,colorSpace=SRGBColorSpace){let hex$2=_colorKeywords[style.toLowerCase()];return hex$2===void 0?console.warn(`THREE.Color: Unknown color `+style):this.setHex(hex$2,colorSpace),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(color$2){return this.r=color$2.r,this.g=color$2.g,this.b=color$2.b,this}copySRGBToLinear(color$2){return this.r=SRGBToLinear(color$2.r),this.g=SRGBToLinear(color$2.g),this.b=SRGBToLinear(color$2.b),this}copyLinearToSRGB(color$2){return this.r=LinearToSRGB(color$2.r),this.g=LinearToSRGB(color$2.g),this.b=LinearToSRGB(color$2.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(colorSpace=SRGBColorSpace){return ColorManagement.workingToColorSpace(_color$2.copy(this),colorSpace),Math.round(clamp$7(_color$2.r*255,0,255))*65536+Math.round(clamp$7(_color$2.g*255,0,255))*256+Math.round(clamp$7(_color$2.b*255,0,255))}getHexString(colorSpace=SRGBColorSpace){return(`000000`+this.getHex(colorSpace).toString(16)).slice(-6)}getHSL(target$1,colorSpace=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color$2.copy(this),colorSpace);let r$1=_color$2.r,g=_color$2.g,b$1=_color$2.b,max$1=Math.max(r$1,g,b$1),min$1=Math.min(r$1,g,b$1),hue$2,saturation,lightness=(min$1+max$1)/2;if(min$1===max$1)hue$2=0,saturation=0;else{let delta=max$1-min$1;switch(saturation=lightness<=.5?delta/(max$1+min$1):delta/(2-max$1-min$1),max$1){case r$1:hue$2=(g-b$1)/delta+(g0!=value$1>0&&this.version++,this._alphaTest=value$1}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(values){if(values!==void 0)for(let key$2 in values){let newValue=values[key$2];if(newValue===void 0){console.warn(`THREE.Material: parameter '${key$2}' has value of undefined.`);continue}let currentValue=this[key$2];if(currentValue===void 0){console.warn(`THREE.Material: '${key$2}' is not a property of THREE.${this.type}.`);continue}currentValue&¤tValue.isColor?currentValue.set(newValue):currentValue&¤tValue.isVector3&&newValue&&newValue.isVector3?currentValue.copy(newValue):this[key$2]=newValue}}toJSON(meta){let isRootObject=meta===void 0||typeof meta==`string`;isRootObject&&(meta={textures:{},images:{}});let data$12={metadata:{version:4.7,type:`Material`,generator:`Material.toJSON`}};data$12.uuid=this.uuid,data$12.type=this.type,this.name!==``&&(data$12.name=this.name),this.color&&this.color.isColor&&(data$12.color=this.color.getHex()),this.roughness!==void 0&&(data$12.roughness=this.roughness),this.metalness!==void 0&&(data$12.metalness=this.metalness),this.sheen!==void 0&&(data$12.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(data$12.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(data$12.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(data$12.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(data$12.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(data$12.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(data$12.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(data$12.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(data$12.shininess=this.shininess),this.clearcoat!==void 0&&(data$12.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(data$12.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(data$12.clearcoatMap=this.clearcoatMap.toJSON(meta).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(data$12.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(meta).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(data$12.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(meta).uuid,data$12.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(data$12.dispersion=this.dispersion),this.iridescence!==void 0&&(data$12.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(data$12.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(data$12.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(data$12.iridescenceMap=this.iridescenceMap.toJSON(meta).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(data$12.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(meta).uuid),this.anisotropy!==void 0&&(data$12.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(data$12.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(data$12.anisotropyMap=this.anisotropyMap.toJSON(meta).uuid),this.map&&this.map.isTexture&&(data$12.map=this.map.toJSON(meta).uuid),this.matcap&&this.matcap.isTexture&&(data$12.matcap=this.matcap.toJSON(meta).uuid),this.alphaMap&&this.alphaMap.isTexture&&(data$12.alphaMap=this.alphaMap.toJSON(meta).uuid),this.lightMap&&this.lightMap.isTexture&&(data$12.lightMap=this.lightMap.toJSON(meta).uuid,data$12.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(data$12.aoMap=this.aoMap.toJSON(meta).uuid,data$12.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(data$12.bumpMap=this.bumpMap.toJSON(meta).uuid,data$12.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(data$12.normalMap=this.normalMap.toJSON(meta).uuid,data$12.normalMapType=this.normalMapType,data$12.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(data$12.displacementMap=this.displacementMap.toJSON(meta).uuid,data$12.displacementScale=this.displacementScale,data$12.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(data$12.roughnessMap=this.roughnessMap.toJSON(meta).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(data$12.metalnessMap=this.metalnessMap.toJSON(meta).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(data$12.emissiveMap=this.emissiveMap.toJSON(meta).uuid),this.specularMap&&this.specularMap.isTexture&&(data$12.specularMap=this.specularMap.toJSON(meta).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(data$12.specularIntensityMap=this.specularIntensityMap.toJSON(meta).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(data$12.specularColorMap=this.specularColorMap.toJSON(meta).uuid),this.envMap&&this.envMap.isTexture&&(data$12.envMap=this.envMap.toJSON(meta).uuid,this.combine!==void 0&&(data$12.combine=this.combine)),this.envMapRotation!==void 0&&(data$12.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(data$12.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(data$12.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(data$12.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(data$12.gradientMap=this.gradientMap.toJSON(meta).uuid),this.transmission!==void 0&&(data$12.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(data$12.transmissionMap=this.transmissionMap.toJSON(meta).uuid),this.thickness!==void 0&&(data$12.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(data$12.thicknessMap=this.thicknessMap.toJSON(meta).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(data$12.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(data$12.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(data$12.size=this.size),this.shadowSide!==null&&(data$12.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(data$12.sizeAttenuation=this.sizeAttenuation),this.blending!==NormalBlending&&(data$12.blending=this.blending),this.side!==FrontSide&&(data$12.side=this.side),this.vertexColors===!0&&(data$12.vertexColors=!0),this.opacity<1&&(data$12.opacity=this.opacity),this.transparent===!0&&(data$12.transparent=!0),this.blendSrc!==SrcAlphaFactor&&(data$12.blendSrc=this.blendSrc),this.blendDst!==OneMinusSrcAlphaFactor&&(data$12.blendDst=this.blendDst),this.blendEquation!==AddEquation&&(data$12.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(data$12.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(data$12.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(data$12.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(data$12.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(data$12.blendAlpha=this.blendAlpha),this.depthFunc!==LessEqualDepth&&(data$12.depthFunc=this.depthFunc),this.depthTest===!1&&(data$12.depthTest=this.depthTest),this.depthWrite===!1&&(data$12.depthWrite=this.depthWrite),this.colorWrite===!1&&(data$12.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(data$12.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==AlwaysStencilFunc&&(data$12.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(data$12.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(data$12.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==KeepStencilOp&&(data$12.stencilFail=this.stencilFail),this.stencilZFail!==KeepStencilOp&&(data$12.stencilZFail=this.stencilZFail),this.stencilZPass!==KeepStencilOp&&(data$12.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(data$12.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(data$12.rotation=this.rotation),this.polygonOffset===!0&&(data$12.polygonOffset=!0),this.polygonOffsetFactor!==0&&(data$12.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(data$12.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(data$12.linewidth=this.linewidth),this.dashSize!==void 0&&(data$12.dashSize=this.dashSize),this.gapSize!==void 0&&(data$12.gapSize=this.gapSize),this.scale!==void 0&&(data$12.scale=this.scale),this.dithering===!0&&(data$12.dithering=!0),this.alphaTest>0&&(data$12.alphaTest=this.alphaTest),this.alphaHash===!0&&(data$12.alphaHash=!0),this.alphaToCoverage===!0&&(data$12.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(data$12.premultipliedAlpha=!0),this.forceSinglePass===!0&&(data$12.forceSinglePass=!0),this.wireframe===!0&&(data$12.wireframe=!0),this.wireframeLinewidth>1&&(data$12.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==`round`&&(data$12.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==`round`&&(data$12.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(data$12.flatShading=!0),this.visible===!1&&(data$12.visible=!1),this.toneMapped===!1&&(data$12.toneMapped=!1),this.fog===!1&&(data$12.fog=!1),Object.keys(this.userData).length>0&&(data$12.userData=this.userData);function extractFromCache(cache$1){let values=[];for(let key$2 in cache$1){let data$13=cache$1[key$2];delete data$13.metadata,values.push(data$13)}return values}if(isRootObject){let textures=extractFromCache(meta.textures),images=extractFromCache(meta.images);textures.length>0&&(data$12.textures=textures),images.length>0&&(data$12.images=images)}return data$12}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name,this.blending=source.blending,this.side=source.side,this.vertexColors=source.vertexColors,this.opacity=source.opacity,this.transparent=source.transparent,this.blendSrc=source.blendSrc,this.blendDst=source.blendDst,this.blendEquation=source.blendEquation,this.blendSrcAlpha=source.blendSrcAlpha,this.blendDstAlpha=source.blendDstAlpha,this.blendEquationAlpha=source.blendEquationAlpha,this.blendColor.copy(source.blendColor),this.blendAlpha=source.blendAlpha,this.depthFunc=source.depthFunc,this.depthTest=source.depthTest,this.depthWrite=source.depthWrite,this.stencilWriteMask=source.stencilWriteMask,this.stencilFunc=source.stencilFunc,this.stencilRef=source.stencilRef,this.stencilFuncMask=source.stencilFuncMask,this.stencilFail=source.stencilFail,this.stencilZFail=source.stencilZFail,this.stencilZPass=source.stencilZPass,this.stencilWrite=source.stencilWrite;let srcPlanes=source.clippingPlanes,dstPlanes=null;if(srcPlanes!==null){let n=srcPlanes.length;dstPlanes=Array(n);for(let i=0;i!==n;++i)dstPlanes[i]=srcPlanes[i].clone()}return this.clippingPlanes=dstPlanes,this.clipIntersection=source.clipIntersection,this.clipShadows=source.clipShadows,this.shadowSide=source.shadowSide,this.colorWrite=source.colorWrite,this.precision=source.precision,this.polygonOffset=source.polygonOffset,this.polygonOffsetFactor=source.polygonOffsetFactor,this.polygonOffsetUnits=source.polygonOffsetUnits,this.dithering=source.dithering,this.alphaTest=source.alphaTest,this.alphaHash=source.alphaHash,this.alphaToCoverage=source.alphaToCoverage,this.premultipliedAlpha=source.premultipliedAlpha,this.forceSinglePass=source.forceSinglePass,this.visible=source.visible,this.toneMapped=source.toneMapped,this.userData=JSON.parse(JSON.stringify(source.userData)),this}dispose(){this.dispatchEvent({type:`dispose`})}set needsUpdate(value$1){value$1===!0&&this.version++}},MeshBasicMaterial=class extends Material{constructor(parameters){super(),this.isMeshBasicMaterial=!0,this.type=`MeshBasicMaterial`,this.color=new Color(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.color.copy(source.color),this.map=source.map,this.lightMap=source.lightMap,this.lightMapIntensity=source.lightMapIntensity,this.aoMap=source.aoMap,this.aoMapIntensity=source.aoMapIntensity,this.specularMap=source.specularMap,this.alphaMap=source.alphaMap,this.envMap=source.envMap,this.envMapRotation.copy(source.envMapRotation),this.combine=source.combine,this.reflectivity=source.reflectivity,this.refractionRatio=source.refractionRatio,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.wireframeLinecap=source.wireframeLinecap,this.wireframeLinejoin=source.wireframeLinejoin,this.fog=source.fog,this}};const _tables=_generateTables();function _generateTables(){let buffer$1=new ArrayBuffer(4),floatView=new Float32Array(buffer$1),uint32View=new Uint32Array(buffer$1),baseTable=new Uint32Array(512),shiftTable=new Uint32Array(512);for(let i=0;i<256;++i){let e$4=i-127;e$4<-27?(baseTable[i]=0,baseTable[i|256]=32768,shiftTable[i]=24,shiftTable[i|256]=24):e$4<-14?(baseTable[i]=1024>>-e$4-14,baseTable[i|256]=1024>>-e$4-14|32768,shiftTable[i]=-e$4-1,shiftTable[i|256]=-e$4-1):e$4<=15?(baseTable[i]=e$4+15<<10,baseTable[i|256]=e$4+15<<10|32768,shiftTable[i]=13,shiftTable[i|256]=13):e$4<128?(baseTable[i]=31744,baseTable[i|256]=64512,shiftTable[i]=24,shiftTable[i|256]=24):(baseTable[i]=31744,baseTable[i|256]=64512,shiftTable[i]=13,shiftTable[i|256]=13)}let mantissaTable=new Uint32Array(2048),exponentTable=new Uint32Array(64),offsetTable=new Uint32Array(64);for(let i=1;i<1024;++i){let m=i<<13,e$4=0;for(;!(m&8388608);)m<<=1,e$4-=8388608;m&=-8388609,e$4+=947912704,mantissaTable[i]=m|e$4}for(let i=1024;i<2048;++i)mantissaTable[i]=939524096+(i-1024<<13);for(let i=1;i<31;++i)exponentTable[i]=i<<23;exponentTable[31]=1199570944,exponentTable[32]=2147483648;for(let i=33;i<63;++i)exponentTable[i]=2147483648+(i-32<<23);exponentTable[63]=3347054592;for(let i=1;i<64;++i)i!==32&&(offsetTable[i]=1024);return{floatView,uint32View,baseTable,shiftTable,mantissaTable,exponentTable,offsetTable}}function toHalfFloat(val){Math.abs(val)>65504&&console.warn(`THREE.DataUtils.toHalfFloat(): Value out of range.`),val=clamp$7(val,-65504,65504),_tables.floatView[0]=val;let f$2=_tables.uint32View[0],e$4=f$2>>23&511;return _tables.baseTable[e$4]+((f$2&8388607)>>_tables.shiftTable[e$4])}function fromHalfFloat(val){let m=val>>10;return _tables.uint32View[0]=_tables.mantissaTable[_tables.offsetTable[m]+(val&1023)]+_tables.exponentTable[m],_tables.floatView[0]}var DataUtils=class{static toHalfFloat(val){return toHalfFloat(val)}static fromHalfFloat(val){return fromHalfFloat(val)}};const _vector$9=new Vector3,_vector2$1=new Vector2;let _id$2=0;var BufferAttribute=class{constructor(array$1,itemSize,normalized=!1){if(Array.isArray(array$1))throw TypeError(`THREE.BufferAttribute: array should be a Typed Array.`);this.isBufferAttribute=!0,Object.defineProperty(this,`id`,{value:_id$2++}),this.name=``,this.array=array$1,this.itemSize=itemSize,this.count=array$1===void 0?0:array$1.length/itemSize,this.normalized=normalized,this.usage=StaticDrawUsage,this.updateRanges=[],this.gpuType=FloatType,this.version=0}onUploadCallback(){}set needsUpdate(value$1){value$1===!0&&this.version++}setUsage(value$1){return this.usage=value$1,this}addUpdateRange(start,count$1){this.updateRanges.push({start,count:count$1})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){return this.name=source.name,this.array=new source.array.constructor(source.array),this.itemSize=source.itemSize,this.count=source.count,this.normalized=source.normalized,this.usage=source.usage,this.gpuType=source.gpuType,this}copyAt(index1,attribute,index2){index1*=this.itemSize,index2*=attribute.itemSize;for(let i=0,l=this.itemSize;ipositionAttribute.count&&console.warn(`THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.`),positionAttribute.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);let position$2=this.attributes.position,morphAttributesPosition=this.morphAttributes.position;if(position$2&&position$2.isGLBufferAttribute){console.error(`THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.`,this),this.boundingBox.set(new Vector3(-1/0,-1/0,-1/0),new Vector3(1/0,1/0,1/0));return}if(position$2!==void 0){if(this.boundingBox.setFromBufferAttribute(position$2),morphAttributesPosition)for(let i=0,il=morphAttributesPosition.length;i0&&(data$12.userData=this.userData),this.parameters!==void 0){let parameters=this.parameters;for(let key$2 in parameters)parameters[key$2]!==void 0&&(data$12[key$2]=parameters[key$2]);return data$12}data$12.data={attributes:{}};let index$1=this.index;index$1!==null&&(data$12.data.index={type:index$1.array.constructor.name,array:Array.prototype.slice.call(index$1.array)});let attributes=this.attributes;for(let key$2 in attributes){let attribute=attributes[key$2];data$12.data.attributes[key$2]=attribute.toJSON(data$12.data)}let morphAttributes={},hasMorphAttributes=!1;for(let key$2 in this.morphAttributes){let attributeArray=this.morphAttributes[key$2],array$1=[];for(let i=0,il=attributeArray.length;i0&&(morphAttributes[key$2]=array$1,hasMorphAttributes=!0)}hasMorphAttributes&&(data$12.data.morphAttributes=morphAttributes,data$12.data.morphTargetsRelative=this.morphTargetsRelative);let groups=this.groups;groups.length>0&&(data$12.data.groups=JSON.parse(JSON.stringify(groups)));let boundingSphere=this.boundingSphere;return boundingSphere!==null&&(data$12.data.boundingSphere=boundingSphere.toJSON()),data$12}clone(){return new this.constructor().copy(this)}copy(source){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let data$12={};this.name=source.name;let index$1=source.index;index$1!==null&&this.setIndex(index$1.clone());let attributes=source.attributes;for(let name$2 in attributes){let attribute=attributes[name$2];this.setAttribute(name$2,attribute.clone(data$12))}let morphAttributes=source.morphAttributes;for(let name$2 in morphAttributes){let array$1=[],morphAttribute=morphAttributes[name$2];for(let i=0,l=morphAttribute.length;i0){let morphAttribute=morphAttributes[keys$3[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m(raycaster.far-raycaster.near)**2))&&(_inverseMatrix$3.copy(matrixWorld).invert(),_ray$3.copy(raycaster.ray).applyMatrix4(_inverseMatrix$3),!(geometry.boundingBox!==null&&_ray$3.intersectsBox(geometry.boundingBox)===!1)&&this._computeIntersections(raycaster,intersects$1,_ray$3)))}_computeIntersections(raycaster,intersects$1,rayLocalSpace){let intersection$1,geometry=this.geometry,material=this.material,index$1=geometry.index,position$2=geometry.attributes.position,uv=geometry.attributes.uv,uv1=geometry.attributes.uv1,normal=geometry.attributes.normal,groups=geometry.groups,drawRange=geometry.drawRange;if(index$1!==null)if(Array.isArray(material))for(let i=0,il=groups.length;iraycaster.far?null:{distance,point:_intersectionPointWorld.clone(),object:object$1}}function checkGeometryIntersection(object$1,material,raycaster,ray,uv,uv1,normal,a$1,b$1,c$3){object$1.getVertexPosition(a$1,_vA$1),object$1.getVertexPosition(b$1,_vB$1),object$1.getVertexPosition(c$3,_vC$1);let intersection$1=checkIntersection$1(object$1,material,raycaster,ray,_vA$1,_vB$1,_vC$1,_intersectionPoint);if(intersection$1){let barycoord=new Vector3;Triangle.getBarycoord(_intersectionPoint,_vA$1,_vB$1,_vC$1,barycoord),uv&&(intersection$1.uv=Triangle.getInterpolatedAttribute(uv,a$1,b$1,c$3,barycoord,new Vector2)),uv1&&(intersection$1.uv1=Triangle.getInterpolatedAttribute(uv1,a$1,b$1,c$3,barycoord,new Vector2)),normal&&(intersection$1.normal=Triangle.getInterpolatedAttribute(normal,a$1,b$1,c$3,barycoord,new Vector3),intersection$1.normal.dot(ray.direction)>0&&intersection$1.normal.multiplyScalar(-1));let face={a:a$1,b:b$1,c:c$3,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA$1,_vB$1,_vC$1,face.normal),intersection$1.face=face,intersection$1.barycoord=barycoord}return intersection$1}var BoxGeometry=class BoxGeometry extends BufferGeometry{constructor(width=1,height=1,depth=1,widthSegments=1,heightSegments=1,depthSegments=1){super(),this.type=`BoxGeometry`,this.parameters={width,height,depth,widthSegments,heightSegments,depthSegments};let scope$1=this;widthSegments=Math.floor(widthSegments),heightSegments=Math.floor(heightSegments),depthSegments=Math.floor(depthSegments);let indices=[],vertices=[],normals=[],uvs=[],numberOfVertices=0,groupStart=0;buildPlane(`z`,`y`,`x`,-1,-1,depth,height,width,depthSegments,heightSegments,0),buildPlane(`z`,`y`,`x`,1,-1,depth,height,-width,depthSegments,heightSegments,1),buildPlane(`x`,`z`,`y`,1,1,width,depth,height,widthSegments,depthSegments,2),buildPlane(`x`,`z`,`y`,1,-1,width,depth,-height,widthSegments,depthSegments,3),buildPlane(`x`,`y`,`z`,1,-1,width,height,depth,widthSegments,heightSegments,4),buildPlane(`x`,`y`,`z`,-1,-1,width,height,-depth,widthSegments,heightSegments,5),this.setIndex(indices),this.setAttribute(`position`,new Float32BufferAttribute(vertices,3)),this.setAttribute(`normal`,new Float32BufferAttribute(normals,3)),this.setAttribute(`uv`,new Float32BufferAttribute(uvs,2));function buildPlane(u,v,w,udir,vdir,width$1,height$1,depth$1,gridX,gridY,materialIndex){let segmentWidth=width$1/gridX,segmentHeight=height$1/gridY,widthHalf=width$1/2,heightHalf=height$1/2,depthHalf=depth$1/2,gridX1=gridX+1,gridY1=gridY+1,vertexCounter=0,groupCount=0,vector=new Vector3;for(let iy=0;iy0?1:-1,normals.push(vector.x,vector.y,vector.z),uvs.push(ix/gridX),uvs.push(1-iy/gridY),vertexCounter+=1}}for(let iy=0;iydefineCustomElement(options$1,extraOptions,createSSRApp),BaseClass=typeof HTMLElement<`u`?HTMLElement:class{};var VueElement=class VueElement extends BaseClass{constructor(_def,_props={},_createApp=createApp){super(),this._def=_def,this._props=_props,this._createApp=_createApp,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&_createApp!==createApp?this._root=this.shadowRoot:_def.shadowRoot===!1?this._root=this:(this.attachShadow({mode:`open`}),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let parent=this;for(;parent&&=parent.parentNode||parent.host;)if(parent instanceof VueElement){this._parent=parent;break}this._instance||(this._resolved?this._mount(this._def):parent&&parent._pendingResolve?this._pendingResolve=parent._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(parent=this._parent){parent&&(this._instance.parent=parent._instance,this._inheritParentContext(parent))}_inheritParentContext(parent=this._parent){parent&&this._app&&Object.setPrototypeOf(this._app._context.provides,parent._instance.provides)}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i{for(let m of mutations$1)this._setAttr(m.attributeName)}),this._ob.observe(this,{attributes:!0});let resolve$1=(def$1,isAsync=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props,styles}=def$1,numberProps;if(props&&!isArray$5(props))for(let key$2 in props){let opt=props[key$2];(opt===Number||opt&&opt.type===Number)&&(key$2 in this._props&&(this._props[key$2]=toNumber(this._props[key$2])),(numberProps||=Object.create(null))[camelize(key$2)]=!0)}this._numberProps=numberProps,this._resolveProps(def$1),this.shadowRoot&&this._applyStyles(styles),this._mount(def$1)},asyncDef=this._def.__asyncLoader;asyncDef?this._pendingResolve=asyncDef().then(def$1=>{def$1.configureApp=this._def.configureApp,resolve$1(this._def=def$1,!0)}):resolve$1(this._def)}_mount(def$1){this._app=this._createApp(def$1),this._inheritParentContext(),def$1.configureApp&&def$1.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let exposed=this._instance&&this._instance.exposed;if(exposed)for(let key$2 in exposed)hasOwn$4(this,key$2)||Object.defineProperty(this,key$2,{get:()=>unref(exposed[key$2])})}_resolveProps(def$1){let{props}=def$1,declaredPropKeys=isArray$5(props)?props:Object.keys(props||{});for(let key$2 of Object.keys(this))key$2[0]!==`_`&&declaredPropKeys.includes(key$2)&&this._setProp(key$2,this[key$2]);for(let key$2 of declaredPropKeys.map(camelize))Object.defineProperty(this,key$2,{get(){return this._getProp(key$2)},set(val){this._setProp(key$2,val,!0,!0)}})}_setAttr(key$2){if(key$2.startsWith(`data-v-`))return;let has=this.hasAttribute(key$2),value$1=has?this.getAttribute(key$2):REMOVAL,camelKey=camelize(key$2);has&&this._numberProps&&this._numberProps[camelKey]&&(value$1=toNumber(value$1)),this._setProp(camelKey,value$1,!1,!0)}_getProp(key$2){return this._props[key$2]}_setProp(key$2,val,shouldReflect=!0,shouldUpdate=!1){if(val!==this._props[key$2]&&(val===REMOVAL?delete this._props[key$2]:(this._props[key$2]=val,key$2===`key`&&this._app&&(this._app._ceVNode.key=val)),shouldUpdate&&this._instance&&this._update(),shouldReflect)){let ob=this._ob;ob&&ob.disconnect(),val===!0?this.setAttribute(hyphenate$2(key$2),``):typeof val==`string`||typeof val==`number`?this.setAttribute(hyphenate$2(key$2),val+``):val||this.removeAttribute(hyphenate$2(key$2)),ob&&ob.observe(this,{attributes:!0})}}_update(){let vnode=this._createVNode();this._app&&(vnode.appContext=this._app._context),render$1(vnode,this._root)}_createVNode(){let baseProps={};this.shadowRoot||(baseProps.onVnodeMounted=baseProps.onVnodeUpdated=this._renderSlots.bind(this));let vnode=createVNode(this._def,extend$2(baseProps,this._props));return this._instance||(vnode.ce=instance=>{this._instance=instance,instance.ce=this,instance.isCE=!0;let dispatch=(event,args)=>{this.dispatchEvent(new CustomEvent(event,isPlainObject$7(args[0])?extend$2({detail:args},args[0]):{detail:args}))};instance.emit=(event,...args)=>{dispatch(event,args),hyphenate$2(event)!==event&&dispatch(hyphenate$2(event),args)},this._setParent()}),vnode}_applyStyles(styles,owner){if(!styles)return;if(owner){if(owner===this._def||this._styleChildren.has(owner))return;this._styleChildren.add(owner)}let nonce=this._nonce;for(let i=styles.length-1;i>=0;i--){let s=document.createElement(`style`);nonce&&s.setAttribute(`nonce`,nonce),s.textContent=styles[i],this.shadowRoot.prepend(s)}}_parseSlots(){let slots=this._slots={},n;for(;n=this.firstChild;){let slotName=n.nodeType===1&&n.getAttribute(`slot`)||`default`;(slots[slotName]||(slots[slotName]=[])).push(n),this.removeChild(n)}}_renderSlots(){let outlets=(this._teleportTarget||this).querySelectorAll(`slot`),scopeId=this._instance.type.__scopeId;for(let i=0;i(delete t$1.props.mode,t$1),TransitionGroupImpl=decorate({name:`TransitionGroup`,props:extend$2({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(props,{slots}){let instance=getCurrentInstance(),state=useTransitionState(),prevChildren,children;return onUpdated(()=>{if(!prevChildren.length)return;let moveClass=props.moveClass||`${props.name||`v`}-move`;if(!hasCSSTransform(prevChildren[0].el,instance.vnode.el,moveClass)){prevChildren=[];return}prevChildren.forEach(callPendingCbs),prevChildren.forEach(recordPosition);let movedChildren=prevChildren.filter(applyTranslation);forceReflow(),movedChildren.forEach(c$3=>{let el=c$3.el,style=el.style;addTransitionClass(el,moveClass),style.transform=style.webkitTransform=style.transitionDuration=``;let cb$1=el[moveCbKey]=e$4=>{!(e$4&&e$4.target!==el)&&(!e$4||/transform$/.test(e$4.propertyName))&&(el.removeEventListener(`transitionend`,cb$1),el[moveCbKey]=null,removeTransitionClass(el,moveClass))};el.addEventListener(`transitionend`,cb$1)}),prevChildren=[]}),()=>{let rawProps=toRaw(props),cssTransitionProps=resolveTransitionProps(rawProps),tag=rawProps.tag||Fragment;if(prevChildren=[],children)for(let i=0;i{cls.split(/\s+/).forEach(c$3=>c$3&&clone$3.classList.remove(c$3))}),moveClass.split(/\s+/).forEach(c$3=>c$3&&clone$3.classList.add(c$3)),clone$3.style.display=`none`;let container=root$3.nodeType===1?root$3:root$3.parentNode;container.appendChild(clone$3);let{hasTransform}=getTransitionInfo(clone$3);return container.removeChild(clone$3),hasTransform}const getModelAssigner=vnode=>{let fn$5=vnode.props[`onUpdate:modelValue`]||!1;return isArray$5(fn$5)?value$1=>invokeArrayFns(fn$5,value$1):fn$5};function onCompositionStart(e$4){e$4.target.composing=!0}function onCompositionEnd(e$4){let target$1=e$4.target;target$1.composing&&(target$1.composing=!1,target$1.dispatchEvent(new Event(`input`)))}const assignKey=Symbol(`_assign`),vModelText={created(el,{modifiers:{lazy,trim,number:number$5}},vnode){el[assignKey]=getModelAssigner(vnode);let castToNumber=number$5||vnode.props&&vnode.props.type===`number`;addEventListener(el,lazy?`change`:`input`,e$4=>{if(e$4.target.composing)return;let domValue=el.value;trim&&(domValue=domValue.trim()),castToNumber&&(domValue=looseToNumber(domValue)),el[assignKey](domValue)}),trim&&addEventListener(el,`change`,()=>{el.value=el.value.trim()}),lazy||(addEventListener(el,`compositionstart`,onCompositionStart),addEventListener(el,`compositionend`,onCompositionEnd),addEventListener(el,`change`,onCompositionEnd))},mounted(el,{value:value$1}){el.value=value$1??``},beforeUpdate(el,{value:value$1,oldValue,modifiers:{lazy,trim,number:number$5}},vnode){if(el[assignKey]=getModelAssigner(vnode),el.composing)return;let elValue=(number$5||el.type===`number`)&&!/^0\d/.test(el.value)?looseToNumber(el.value):el.value,newValue=value$1??``;if(elValue!==newValue){if(document.activeElement===el&&el.type!==`range`&&(lazy&&value$1===oldValue||trim&&el.value.trim()===newValue))return;el.value=newValue}}},vModelCheckbox={deep:!0,created(el,_$1,vnode){el[assignKey]=getModelAssigner(vnode),addEventListener(el,`change`,()=>{let modelValue=el._modelValue,elementValue=getValue$1(el),checked=el.checked,assign$3=el[assignKey];if(isArray$5(modelValue)){let index$1=looseIndexOf(modelValue,elementValue),found=index$1!==-1;if(checked&&!found)assign$3(modelValue.concat(elementValue));else if(!checked&&found){let filtered=[...modelValue];filtered.splice(index$1,1),assign$3(filtered)}}else if(isSet(modelValue)){let cloned=new Set(modelValue);checked?cloned.add(elementValue):cloned.delete(elementValue),assign$3(cloned)}else assign$3(getCheckboxValue(el,checked))})},mounted:setChecked,beforeUpdate(el,binding,vnode){el[assignKey]=getModelAssigner(vnode),setChecked(el,binding,vnode)}};function setChecked(el,{value:value$1,oldValue},vnode){el._modelValue=value$1;let checked;if(isArray$5(value$1))checked=looseIndexOf(value$1,vnode.props.value)>-1;else if(isSet(value$1))checked=value$1.has(vnode.props.value);else{if(value$1===oldValue)return;checked=looseEqual(value$1,getCheckboxValue(el,!0))}el.checked!==checked&&(el.checked=checked)}const vModelRadio={created(el,{value:value$1},vnode){el.checked=looseEqual(value$1,vnode.props.value),el[assignKey]=getModelAssigner(vnode),addEventListener(el,`change`,()=>{el[assignKey](getValue$1(el))})},beforeUpdate(el,{value:value$1,oldValue},vnode){el[assignKey]=getModelAssigner(vnode),value$1!==oldValue&&(el.checked=looseEqual(value$1,vnode.props.value))}},vModelSelect={deep:!0,created(el,{value:value$1,modifiers:{number:number$5}},vnode){let isSetModel=isSet(value$1);addEventListener(el,`change`,()=>{let selectedVal=Array.prototype.filter.call(el.options,o=>o.selected).map(o=>number$5?looseToNumber(getValue$1(o)):getValue$1(o));el[assignKey](el.multiple?isSetModel?new Set(selectedVal):selectedVal:selectedVal[0]),el._assigning=!0,nextTick(()=>{el._assigning=!1})}),el[assignKey]=getModelAssigner(vnode)},mounted(el,{value:value$1}){setSelected(el,value$1)},beforeUpdate(el,_binding,vnode){el[assignKey]=getModelAssigner(vnode)},updated(el,{value:value$1}){el._assigning||setSelected(el,value$1)}};function setSelected(el,value$1){let isMultiple=el.multiple,isArrayValue=isArray$5(value$1);if(!(isMultiple&&!isArrayValue&&!isSet(value$1))){for(let i=0,l=el.options.length;iString(v)===String(optionValue)):option$1.selected=looseIndexOf(value$1,optionValue)>-1}else option$1.selected=value$1.has(optionValue);else if(looseEqual(getValue$1(option$1),value$1)){el.selectedIndex!==i&&(el.selectedIndex=i);return}}!isMultiple&&el.selectedIndex!==-1&&(el.selectedIndex=-1)}}function getValue$1(el){return`_value`in el?el._value:el.value}function getCheckboxValue(el,checked){let key$2=checked?`_trueValue`:`_falseValue`;return key$2 in el?el[key$2]:checked}const vModelDynamic={created(el,binding,vnode){callModelHook(el,binding,vnode,null,`created`)},mounted(el,binding,vnode){callModelHook(el,binding,vnode,null,`mounted`)},beforeUpdate(el,binding,vnode,prevVNode){callModelHook(el,binding,vnode,prevVNode,`beforeUpdate`)},updated(el,binding,vnode,prevVNode){callModelHook(el,binding,vnode,prevVNode,`updated`)}};function resolveDynamicModel(tagName,type){switch(tagName){case`SELECT`:return vModelSelect;case`TEXTAREA`:return vModelText;default:switch(type){case`checkbox`:return vModelCheckbox;case`radio`:return vModelRadio;default:return vModelText}}}function callModelHook(el,binding,vnode,prevVNode,hook){let modelToUse=resolveDynamicModel(el.tagName,vnode.props&&vnode.props.type),fn$5=modelToUse[hook];fn$5&&fn$5(el,binding,vnode,prevVNode)}function initVModelForSSR(){vModelText.getSSRProps=({value:value$1})=>({value:value$1}),vModelRadio.getSSRProps=({value:value$1},vnode)=>{if(vnode.props&&looseEqual(vnode.props.value,value$1))return{checked:!0}},vModelCheckbox.getSSRProps=({value:value$1},vnode)=>{if(isArray$5(value$1)){if(vnode.props&&looseIndexOf(value$1,vnode.props.value)>-1)return{checked:!0}}else if(isSet(value$1)){if(vnode.props&&value$1.has(vnode.props.value))return{checked:!0}}else if(value$1)return{checked:!0}},vModelDynamic.getSSRProps=(binding,vnode)=>{if(typeof vnode.type!=`string`)return;let modelToUse=resolveDynamicModel(vnode.type.toUpperCase(),vnode.props&&vnode.props.type);if(modelToUse.getSSRProps)return modelToUse.getSSRProps(binding,vnode)}}const systemModifiers=[`ctrl`,`shift`,`alt`,`meta`],modifierGuards={stop:e$4=>e$4.stopPropagation(),prevent:e$4=>e$4.preventDefault(),self:e$4=>e$4.target!==e$4.currentTarget,ctrl:e$4=>!e$4.ctrlKey,shift:e$4=>!e$4.shiftKey,alt:e$4=>!e$4.altKey,meta:e$4=>!e$4.metaKey,left:e$4=>`button`in e$4&&e$4.button!==0,middle:e$4=>`button`in e$4&&e$4.button!==1,right:e$4=>`button`in e$4&&e$4.button!==2,exact:(e$4,modifiers)=>systemModifiers.some(m=>e$4[`${m}Key`]&&!modifiers.includes(m))},withModifiers=(fn$5,modifiers)=>{let cache$1=fn$5._withMods||={},cacheKey=modifiers.join(`.`);return cache$1[cacheKey]||(cache$1[cacheKey]=(event,...args)=>{for(let i=0;i{let cache$1=fn$5._withKeys||={},cacheKey=modifiers.join(`.`);return cache$1[cacheKey]||(cache$1[cacheKey]=event=>{if(!(`key`in event))return;let eventKey=hyphenate$2(event.key);if(modifiers.some(k$3=>k$3===eventKey||keyNames[k$3]===eventKey))return fn$5(event)})},rendererOptions=extend$2({patchProp},nodeOps);let renderer,enabledHydration=!1;function ensureRenderer(){return renderer||=createRenderer(rendererOptions)}function ensureHydrationRenderer(){return renderer=enabledHydration?renderer:createHydrationRenderer(rendererOptions),enabledHydration=!0,renderer}const render$1=(...args)=>{ensureRenderer().render(...args)},hydrate=(...args)=>{ensureHydrationRenderer().hydrate(...args)},createApp=(...args)=>{let app=ensureRenderer().createApp(...args),{mount}=app;return app.mount=containerOrSelector=>{let container=normalizeContainer(containerOrSelector);if(!container)return;let component=app._component;!isFunction$1(component)&&!component.render&&!component.template&&(component.template=container.innerHTML),container.nodeType===1&&(container.textContent=``);let proxy=mount(container,!1,resolveRootNamespace(container));return container instanceof Element&&(container.removeAttribute(`v-cloak`),container.setAttribute(`data-v-app`,``)),proxy},app},createSSRApp=(...args)=>{let app=ensureHydrationRenderer().createApp(...args),{mount}=app;return app.mount=containerOrSelector=>{let container=normalizeContainer(containerOrSelector);if(container)return mount(container,!0,resolveRootNamespace(container))},app};function resolveRootNamespace(container){if(container instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&container instanceof MathMLElement)return`mathml`}function normalizeContainer(container){if(isString$2(container)){let res=document.querySelector(container);return res}return container}let ssrDirectiveInitialized=!1;const initDirectivesForSSR=()=>{ssrDirectiveInitialized||(ssrDirectiveInitialized=!0,initVModelForSSR(),initVShowForSSR())};var vue_runtime_esm_bundler_exports={};__export(vue_runtime_esm_bundler_exports,{BaseTransition:()=>BaseTransition,BaseTransitionPropsValidators:()=>BaseTransitionPropsValidators,Comment:()=>Comment,DeprecationTypes:()=>DeprecationTypes,EffectScope:()=>EffectScope,ErrorCodes:()=>ErrorCodes,ErrorTypeStrings:()=>ErrorTypeStrings,Fragment:()=>Fragment,KeepAlive:()=>KeepAlive,ReactiveEffect:()=>ReactiveEffect,Static:()=>Static,Suspense:()=>Suspense,Teleport:()=>Teleport,Text:()=>Text,TrackOpTypes:()=>TrackOpTypes,Transition:()=>Transition,TransitionGroup:()=>TransitionGroup,TriggerOpTypes:()=>TriggerOpTypes,VueElement:()=>VueElement,assertNumber:()=>assertNumber,callWithAsyncErrorHandling:()=>callWithAsyncErrorHandling,callWithErrorHandling:()=>callWithErrorHandling,camelize:()=>camelize,capitalize:()=>capitalize$1,cloneVNode:()=>cloneVNode,compatUtils:()=>compatUtils,compile:()=>compile$1,computed:()=>computed,createApp:()=>createApp,createBlock:()=>createBlock,createCommentVNode:()=>createCommentVNode,createElementBlock:()=>createElementBlock,createElementVNode:()=>createBaseVNode,createHydrationRenderer:()=>createHydrationRenderer,createPropsRestProxy:()=>createPropsRestProxy,createRenderer:()=>createRenderer,createSSRApp:()=>createSSRApp,createSlots:()=>createSlots,createStaticVNode:()=>createStaticVNode,createTextVNode:()=>createTextVNode,createVNode:()=>createVNode,customRef:()=>customRef,defineAsyncComponent:()=>defineAsyncComponent,defineComponent:()=>defineComponent,defineCustomElement:()=>defineCustomElement,defineEmits:()=>defineEmits,defineExpose:()=>defineExpose,defineModel:()=>defineModel,defineOptions:()=>defineOptions,defineProps:()=>defineProps,defineSSRCustomElement:()=>defineSSRCustomElement,defineSlots:()=>defineSlots,devtools:()=>devtools$2,effect:()=>effect,effectScope:()=>effectScope,getCurrentInstance:()=>getCurrentInstance,getCurrentScope:()=>getCurrentScope,getCurrentWatcher:()=>getCurrentWatcher,getTransitionRawChildren:()=>getTransitionRawChildren,guardReactiveProps:()=>guardReactiveProps,h:()=>h,handleError:()=>handleError,hasInjectionContext:()=>hasInjectionContext,hydrate:()=>hydrate,hydrateOnIdle:()=>hydrateOnIdle,hydrateOnInteraction:()=>hydrateOnInteraction,hydrateOnMediaQuery:()=>hydrateOnMediaQuery,hydrateOnVisible:()=>hydrateOnVisible,initCustomFormatter:()=>initCustomFormatter,initDirectivesForSSR:()=>initDirectivesForSSR,inject:()=>inject,isMemoSame:()=>isMemoSame,isProxy:()=>isProxy,isReactive:()=>isReactive,isReadonly:()=>isReadonly,isRef:()=>isRef,isRuntimeOnly:()=>isRuntimeOnly,isShallow:()=>isShallow,isVNode:()=>isVNode,markRaw:()=>markRaw,mergeDefaults:()=>mergeDefaults,mergeModels:()=>mergeModels,mergeProps:()=>mergeProps,nextTick:()=>nextTick,normalizeClass:()=>normalizeClass,normalizeProps:()=>normalizeProps,normalizeStyle:()=>normalizeStyle,onActivated:()=>onActivated,onBeforeMount:()=>onBeforeMount,onBeforeUnmount:()=>onBeforeUnmount,onBeforeUpdate:()=>onBeforeUpdate,onDeactivated:()=>onDeactivated,onErrorCaptured:()=>onErrorCaptured,onMounted:()=>onMounted,onRenderTracked:()=>onRenderTracked,onRenderTriggered:()=>onRenderTriggered,onScopeDispose:()=>onScopeDispose,onServerPrefetch:()=>onServerPrefetch,onUnmounted:()=>onUnmounted,onUpdated:()=>onUpdated,onWatcherCleanup:()=>onWatcherCleanup,openBlock:()=>openBlock,popScopeId:()=>popScopeId,provide:()=>provide,proxyRefs:()=>proxyRefs,pushScopeId:()=>pushScopeId,queuePostFlushCb:()=>queuePostFlushCb,reactive:()=>reactive,readonly:()=>readonly$1,ref:()=>ref,registerRuntimeCompiler:()=>registerRuntimeCompiler,render:()=>render$1,renderList:()=>renderList,renderSlot:()=>renderSlot,resolveComponent:()=>resolveComponent,resolveDirective:()=>resolveDirective,resolveDynamicComponent:()=>resolveDynamicComponent,resolveFilter:()=>resolveFilter,resolveTransitionHooks:()=>resolveTransitionHooks,setBlockTracking:()=>setBlockTracking,setDevtoolsHook:()=>setDevtoolsHook,setTransitionHooks:()=>setTransitionHooks,shallowReactive:()=>shallowReactive,shallowReadonly:()=>shallowReadonly,shallowRef:()=>shallowRef,ssrContextKey:()=>ssrContextKey,ssrUtils:()=>ssrUtils,stop:()=>stop,toDisplayString:()=>toDisplayString,toHandlerKey:()=>toHandlerKey,toHandlers:()=>toHandlers,toRaw:()=>toRaw,toRef:()=>toRef,toRefs:()=>toRefs,toValue:()=>toValue$1,transformVNodeArgs:()=>transformVNodeArgs,triggerRef:()=>triggerRef,unref:()=>unref,useAttrs:()=>useAttrs,useCssModule:()=>useCssModule,useCssVars:()=>useCssVars,useHost:()=>useHost,useId:()=>useId$1,useModel:()=>useModel,useSSRContext:()=>useSSRContext,useShadowRoot:()=>useShadowRoot,useSlots:()=>useSlots,useTemplateRef:()=>useTemplateRef,useTransitionState:()=>useTransitionState,vModelCheckbox:()=>vModelCheckbox,vModelDynamic:()=>vModelDynamic,vModelRadio:()=>vModelRadio,vModelSelect:()=>vModelSelect,vModelText:()=>vModelText,vShow:()=>vShow,version:()=>version$1,warn:()=>warn$1,watch:()=>watch,watchEffect:()=>watchEffect,watchPostEffect:()=>watchPostEffect,watchSyncEffect:()=>watchSyncEffect,withAsyncContext:()=>withAsyncContext,withCtx:()=>withCtx,withDefaults:()=>withDefaults,withDirectives:()=>withDirectives,withKeys:()=>withKeys,withMemo:()=>withMemo,withModifiers:()=>withModifiers,withScopeId:()=>withScopeId});const compile$1=()=>{},REVISION=`179`,MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},CullFaceNone=0,CullFaceBack=1,CullFaceFront=2,CullFaceFrontBack=3,BasicShadowMap=0,PCFShadowMap=1,PCFSoftShadowMap=2,VSMShadowMap=3,FrontSide=0,BackSide=1,DoubleSide=2,NoBlending=0,NormalBlending=1,AdditiveBlending=2,SubtractiveBlending=3,MultiplyBlending=4,CustomBlending=5,AddEquation=100,SubtractEquation=101,ReverseSubtractEquation=102,MinEquation=103,MaxEquation=104,ZeroFactor=200,OneFactor=201,SrcColorFactor=202,OneMinusSrcColorFactor=203,SrcAlphaFactor=204,OneMinusSrcAlphaFactor=205,DstAlphaFactor=206,OneMinusDstAlphaFactor=207,DstColorFactor=208,OneMinusDstColorFactor=209,SrcAlphaSaturateFactor=210,ConstantColorFactor=211,OneMinusConstantColorFactor=212,ConstantAlphaFactor=213,OneMinusConstantAlphaFactor=214,NeverDepth=0,AlwaysDepth=1,LessDepth=2,LessEqualDepth=3,EqualDepth=4,GreaterEqualDepth=5,GreaterDepth=6,NotEqualDepth=7,MultiplyOperation=0,MixOperation=1,AddOperation=2,NoToneMapping=0,LinearToneMapping=1,ReinhardToneMapping=2,CineonToneMapping=3,ACESFilmicToneMapping=4,CustomToneMapping=5,AgXToneMapping=6,NeutralToneMapping=7,AttachedBindMode=`attached`,DetachedBindMode=`detached`,UVMapping=300,CubeReflectionMapping=301,CubeRefractionMapping=302,EquirectangularReflectionMapping=303,EquirectangularRefractionMapping=304,CubeUVReflectionMapping=306,RepeatWrapping=1e3,ClampToEdgeWrapping=1001,MirroredRepeatWrapping=1002,NearestFilter=1003,NearestMipmapNearestFilter=1004,NearestMipMapNearestFilter=1004,NearestMipmapLinearFilter=1005,NearestMipMapLinearFilter=1005,LinearFilter=1006,LinearMipmapNearestFilter=1007,LinearMipMapNearestFilter=1007,LinearMipmapLinearFilter=1008,LinearMipMapLinearFilter=1008,UnsignedByteType=1009,ByteType=1010,ShortType=1011,UnsignedShortType=1012,IntType=1013,UnsignedIntType=1014,FloatType=1015,HalfFloatType=1016,UnsignedShort4444Type=1017,UnsignedShort5551Type=1018,UnsignedInt248Type=1020,UnsignedInt5999Type=35902,AlphaFormat=1021,RGBFormat=1022,RGBAFormat=1023,DepthFormat=1026,DepthStencilFormat=1027,RedFormat=1028,RedIntegerFormat=1029,RGFormat=1030,RGIntegerFormat=1031,RGBIntegerFormat=1032,RGBAIntegerFormat=1033,RGB_S3TC_DXT1_Format=33776,RGBA_S3TC_DXT1_Format=33777,RGBA_S3TC_DXT3_Format=33778,RGBA_S3TC_DXT5_Format=33779,RGB_PVRTC_4BPPV1_Format=35840,RGB_PVRTC_2BPPV1_Format=35841,RGBA_PVRTC_4BPPV1_Format=35842,RGBA_PVRTC_2BPPV1_Format=35843,RGB_ETC1_Format=36196,RGB_ETC2_Format=37492,RGBA_ETC2_EAC_Format=37496,RGBA_ASTC_4x4_Format=37808,RGBA_ASTC_5x4_Format=37809,RGBA_ASTC_5x5_Format=37810,RGBA_ASTC_6x5_Format=37811,RGBA_ASTC_6x6_Format=37812,RGBA_ASTC_8x5_Format=37813,RGBA_ASTC_8x6_Format=37814,RGBA_ASTC_8x8_Format=37815,RGBA_ASTC_10x5_Format=37816,RGBA_ASTC_10x6_Format=37817,RGBA_ASTC_10x8_Format=37818,RGBA_ASTC_10x10_Format=37819,RGBA_ASTC_12x10_Format=37820,RGBA_ASTC_12x12_Format=37821,RGBA_BPTC_Format=36492,RGB_BPTC_SIGNED_Format=36494,RGB_BPTC_UNSIGNED_Format=36495,RED_RGTC1_Format=36283,SIGNED_RED_RGTC1_Format=36284,RED_GREEN_RGTC2_Format=36285,SIGNED_RED_GREEN_RGTC2_Format=36286,LoopOnce=2200,LoopRepeat=2201,LoopPingPong=2202,InterpolateDiscrete=2300,InterpolateLinear=2301,InterpolateSmooth=2302,ZeroCurvatureEnding=2400,ZeroSlopeEnding=2401,WrapAroundEnding=2402,NormalAnimationBlendMode=2500,AdditiveAnimationBlendMode=2501,TrianglesDrawMode=0,TriangleStripDrawMode=1,TriangleFanDrawMode=2,BasicDepthPacking=3200,RGBADepthPacking=3201,RGBDepthPacking=3202,RGDepthPacking=3203,TangentSpaceNormalMap=0,ObjectSpaceNormalMap=1,NoColorSpace=``,SRGBColorSpace=`srgb`,LinearSRGBColorSpace=`srgb-linear`,LinearTransfer=`linear`,SRGBTransfer=`srgb`,ZeroStencilOp=0,KeepStencilOp=7680,ReplaceStencilOp=7681,IncrementStencilOp=7682,DecrementStencilOp=7683,IncrementWrapStencilOp=34055,DecrementWrapStencilOp=34056,InvertStencilOp=5386,NeverStencilFunc=512,LessStencilFunc=513,EqualStencilFunc=514,LessEqualStencilFunc=515,GreaterStencilFunc=516,NotEqualStencilFunc=517,GreaterEqualStencilFunc=518,AlwaysStencilFunc=519,NeverCompare=512,LessCompare=513,EqualCompare=514,LessEqualCompare=515,GreaterCompare=516,NotEqualCompare=517,GreaterEqualCompare=518,AlwaysCompare=519,StaticDrawUsage=35044,DynamicDrawUsage=35048,StreamDrawUsage=35040,StaticReadUsage=35045,DynamicReadUsage=35049,StreamReadUsage=35041,StaticCopyUsage=35046,DynamicCopyUsage=35050,StreamCopyUsage=35042,GLSL1=`100`,GLSL3=`300 es`,WebGLCoordinateSystem=2e3,WebGPUCoordinateSystem=2001,TimestampQuery={COMPUTE:`compute`,RENDER:`render`},InterpolationSamplingType={PERSPECTIVE:`perspective`,LINEAR:`linear`,FLAT:`flat`},InterpolationSamplingMode={NORMAL:`normal`,CENTROID:`centroid`,SAMPLE:`sample`,FIRST:`first`,EITHER:`either`};var EventDispatcher=class{addEventListener(type,listener){this._listeners===void 0&&(this._listeners={});let listeners=this._listeners;listeners[type]===void 0&&(listeners[type]=[]),listeners[type].indexOf(listener)===-1&&listeners[type].push(listener)}hasEventListener(type,listener){let listeners=this._listeners;return listeners===void 0?!1:listeners[type]!==void 0&&listeners[type].indexOf(listener)!==-1}removeEventListener(type,listener){let listeners=this._listeners;if(listeners===void 0)return;let listenerArray=listeners[type];if(listenerArray!==void 0){let index$1=listenerArray.indexOf(listener);index$1!==-1&&listenerArray.splice(index$1,1)}}dispatchEvent(event){let listeners=this._listeners;if(listeners===void 0)return;let listenerArray=listeners[event.type];if(listenerArray!==void 0){event.target=this;let array$1=listenerArray.slice(0);for(let i=0,l=array$1.length;i>8&255]+_lut[d0$2>>16&255]+_lut[d0$2>>24&255]+`-`+_lut[d1&255]+_lut[d1>>8&255]+`-`+_lut[d1>>16&15|64]+_lut[d1>>24&255]+`-`+_lut[d2&63|128]+_lut[d2>>8&255]+`-`+_lut[d2>>16&255]+_lut[d2>>24&255]+_lut[d3&255]+_lut[d3>>8&255]+_lut[d3>>16&255]+_lut[d3>>24&255];return uuid$1.toLowerCase()}function clamp$7(value$1,min$1,max$1){return Math.max(min$1,Math.min(max$1,value$1))}function euclideanModulo(n,m){return(n%m+m)%m}function mapLinear(x$1,a1,a2,b1,b2){return b1+(x$1-a1)*(b2-b1)/(a2-a1)}function inverseLerp(x$1,y,value$1){return x$1===y?0:(value$1-x$1)/(y-x$1)}function lerp$3(x$1,y,t$1){return(1-t$1)*x$1+t$1*y}function damp(x$1,y,lambda,dt$3){return lerp$3(x$1,y,1-Math.exp(-lambda*dt$3))}function pingpong(x$1,length=1){return length-Math.abs(euclideanModulo(x$1,length*2)-length)}function smoothstep(x$1,min$1,max$1){return x$1<=min$1?0:x$1>=max$1?1:(x$1=(x$1-min$1)/(max$1-min$1),x$1*x$1*(3-2*x$1))}function smootherstep(x$1,min$1,max$1){return x$1<=min$1?0:x$1>=max$1?1:(x$1=(x$1-min$1)/(max$1-min$1),x$1*x$1*x$1*(x$1*(x$1*6-15)+10))}function randInt(low,high){return low+Math.floor(Math.random()*(high-low+1))}function randFloat$1(low,high){return low+Math.random()*(high-low)}function randFloatSpread(range$1){return range$1*(.5-Math.random())}function seededRandom(s){s!==void 0&&(_seed=s);let t$1=_seed+=1831565813;return t$1=Math.imul(t$1^t$1>>>15,t$1|1),t$1^=t$1+Math.imul(t$1^t$1>>>7,t$1|61),((t$1^t$1>>>14)>>>0)/4294967296}function degToRad$2(degrees$1){return degrees$1*DEG2RAD$1}function radToDeg$2(radians){return radians*RAD2DEG$2}function isPowerOfTwo(value$1){return(value$1&value$1-1)==0&&value$1!==0}function ceilPowerOfTwo(value$1){return 2**Math.ceil(Math.log(value$1)/Math.LN2)}function floorPowerOfTwo(value$1){return 2**Math.floor(Math.log(value$1)/Math.LN2)}function setQuaternionFromProperEuler(q,a$1,b$1,c$3,order$3){let cos$1=Math.cos,sin$1=Math.sin,c2=cos$1(b$1/2),s2=sin$1(b$1/2),c13=cos$1((a$1+c$3)/2),s13=sin$1((a$1+c$3)/2),c1_3=cos$1((a$1-c$3)/2),s1_3=sin$1((a$1-c$3)/2),c3_1=cos$1((c$3-a$1)/2),s3_1=sin$1((c$3-a$1)/2);switch(order$3){case`XYX`:q.set(c2*s13,s2*c1_3,s2*s1_3,c2*c13);break;case`YZY`:q.set(s2*s1_3,c2*s13,s2*c1_3,c2*c13);break;case`ZXZ`:q.set(s2*c1_3,s2*s1_3,c2*s13,c2*c13);break;case`XZX`:q.set(c2*s13,s2*s3_1,s2*c3_1,c2*c13);break;case`YXY`:q.set(s2*c3_1,c2*s13,s2*s3_1,c2*c13);break;case`ZYZ`:q.set(s2*s3_1,s2*c3_1,c2*s13,c2*c13);break;default:console.warn(`THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: `+order$3)}}function denormalize(value$1,array$1){switch(array$1.constructor){case Float32Array:return value$1;case Uint32Array:return value$1/4294967295;case Uint16Array:return value$1/65535;case Uint8Array:return value$1/255;case Int32Array:return Math.max(value$1/2147483647,-1);case Int16Array:return Math.max(value$1/32767,-1);case Int8Array:return Math.max(value$1/127,-1);default:throw Error(`Invalid component type.`)}}function normalize$2(value$1,array$1){switch(array$1.constructor){case Float32Array:return value$1;case Uint32Array:return Math.round(value$1*4294967295);case Uint16Array:return Math.round(value$1*65535);case Uint8Array:return Math.round(value$1*255);case Int32Array:return Math.round(value$1*2147483647);case Int16Array:return Math.round(value$1*32767);case Int8Array:return Math.round(value$1*127);default:throw Error(`Invalid component type.`)}}const MathUtils={DEG2RAD:DEG2RAD$1,RAD2DEG:RAD2DEG$2,generateUUID,clamp:clamp$7,euclideanModulo,mapLinear,inverseLerp,lerp:lerp$3,damp,pingpong,smoothstep,smootherstep,randInt,randFloat:randFloat$1,randFloatSpread,seededRandom,degToRad:degToRad$2,radToDeg:radToDeg$2,isPowerOfTwo,ceilPowerOfTwo,floorPowerOfTwo,setQuaternionFromProperEuler,normalize:normalize$2,denormalize};var Vector2=class Vector2{constructor(x$1=0,y=0){Vector2.prototype.isVector2=!0,this.x=x$1,this.y=y}get width(){return this.x}set width(value$1){this.x=value$1}get height(){return this.y}set height(value$1){this.y=value$1}set(x$1,y){return this.x=x$1,this.y=y,this}setScalar(scalar){return this.x=scalar,this.y=scalar,this}setX(x$1){return this.x=x$1,this}setY(y){return this.y=y,this}setComponent(index$1,value$1){switch(index$1){case 0:this.x=value$1;break;case 1:this.y=value$1;break;default:throw Error(`index is out of range: `+index$1)}return this}getComponent(index$1){switch(index$1){case 0:return this.x;case 1:return this.y;default:throw Error(`index is out of range: `+index$1)}}clone(){return new this.constructor(this.x,this.y)}copy(v){return this.x=v.x,this.y=v.y,this}add(v){return this.x+=v.x,this.y+=v.y,this}addScalar(s){return this.x+=s,this.y+=s,this}addVectors(a$1,b$1){return this.x=a$1.x+b$1.x,this.y=a$1.y+b$1.y,this}addScaledVector(v,s){return this.x+=v.x*s,this.y+=v.y*s,this}sub(v){return this.x-=v.x,this.y-=v.y,this}subScalar(s){return this.x-=s,this.y-=s,this}subVectors(a$1,b$1){return this.x=a$1.x-b$1.x,this.y=a$1.y-b$1.y,this}multiply(v){return this.x*=v.x,this.y*=v.y,this}multiplyScalar(scalar){return this.x*=scalar,this.y*=scalar,this}divide(v){return this.x/=v.x,this.y/=v.y,this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}applyMatrix3(m){let x$1=this.x,y=this.y,e$4=m.elements;return this.x=e$4[0]*x$1+e$4[3]*y+e$4[6],this.y=e$4[1]*x$1+e$4[4]*y+e$4[7],this}min(v){return this.x=Math.min(this.x,v.x),this.y=Math.min(this.y,v.y),this}max(v){return this.x=Math.max(this.x,v.x),this.y=Math.max(this.y,v.y),this}clamp(min$1,max$1){return this.x=clamp$7(this.x,min$1.x,max$1.x),this.y=clamp$7(this.y,min$1.y,max$1.y),this}clampScalar(minVal,maxVal){return this.x=clamp$7(this.x,minVal,maxVal),this.y=clamp$7(this.y,minVal,maxVal),this}clampLength(min$1,max$1){let length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp$7(length,min$1,max$1))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(v){return this.x*v.x+this.y*v.y}cross(v){return this.x*v.y-this.y*v.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){let angle=Math.atan2(-this.y,-this.x)+Math.PI;return angle}angleTo(v){let denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;let theta=this.dot(v)/denominator;return Math.acos(clamp$7(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){let dx=this.x-v.x,dy=this.y-v.y;return dx*dx+dy*dy}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha$1){return this.x+=(v.x-this.x)*alpha$1,this.y+=(v.y-this.y)*alpha$1,this}lerpVectors(v1,v2,alpha$1){return this.x=v1.x+(v2.x-v1.x)*alpha$1,this.y=v1.y+(v2.y-v1.y)*alpha$1,this}equals(v){return v.x===this.x&&v.y===this.y}fromArray(array$1,offset$2=0){return this.x=array$1[offset$2],this.y=array$1[offset$2+1],this}toArray(array$1=[],offset$2=0){return array$1[offset$2]=this.x,array$1[offset$2+1]=this.y,array$1}fromBufferAttribute(attribute,index$1){return this.x=attribute.getX(index$1),this.y=attribute.getY(index$1),this}rotateAround(center,angle){let c$3=Math.cos(angle),s=Math.sin(angle),x$1=this.x-center.x,y=this.y-center.y;return this.x=x$1*c$3-y*s+center.x,this.y=x$1*s+y*c$3+center.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Quaternion=class{constructor(x$1=0,y=0,z$1=0,w=1){this.isQuaternion=!0,this._x=x$1,this._y=y,this._z=z$1,this._w=w}static slerpFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1,t$1){let x0=src0[srcOffset0+0],y0=src0[srcOffset0+1],z0=src0[srcOffset0+2],w0=src0[srcOffset0+3],x1=src1[srcOffset1+0],y1=src1[srcOffset1+1],z1=src1[srcOffset1+2],w1=src1[srcOffset1+3];if(t$1===0){dst[dstOffset+0]=x0,dst[dstOffset+1]=y0,dst[dstOffset+2]=z0,dst[dstOffset+3]=w0;return}if(t$1===1){dst[dstOffset+0]=x1,dst[dstOffset+1]=y1,dst[dstOffset+2]=z1,dst[dstOffset+3]=w1;return}if(w0!==w1||x0!==x1||y0!==y1||z0!==z1){let s=1-t$1,cos$1=x0*x1+y0*y1+z0*z1+w0*w1,dir=cos$1>=0?1:-1,sqrSin=1-cos$1*cos$1;if(sqrSin>2**-52){let sin$1=Math.sqrt(sqrSin),len=Math.atan2(sin$1,cos$1*dir);s=Math.sin(s*len)/sin$1,t$1=Math.sin(t$1*len)/sin$1}let tDir=t$1*dir;if(x0=x0*s+x1*tDir,y0=y0*s+y1*tDir,z0=z0*s+z1*tDir,w0=w0*s+w1*tDir,s===1-t$1){let f$2=1/Math.sqrt(x0*x0+y0*y0+z0*z0+w0*w0);x0*=f$2,y0*=f$2,z0*=f$2,w0*=f$2}}dst[dstOffset]=x0,dst[dstOffset+1]=y0,dst[dstOffset+2]=z0,dst[dstOffset+3]=w0}static multiplyQuaternionsFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1){let x0=src0[srcOffset0],y0=src0[srcOffset0+1],z0=src0[srcOffset0+2],w0=src0[srcOffset0+3],x1=src1[srcOffset1],y1=src1[srcOffset1+1],z1=src1[srcOffset1+2],w1=src1[srcOffset1+3];return dst[dstOffset]=x0*w1+w0*x1+y0*z1-z0*y1,dst[dstOffset+1]=y0*w1+w0*y1+z0*x1-x0*z1,dst[dstOffset+2]=z0*w1+w0*z1+x0*y1-y0*x1,dst[dstOffset+3]=w0*w1-x0*x1-y0*y1-z0*z1,dst}get x(){return this._x}set x(value$1){this._x=value$1,this._onChangeCallback()}get y(){return this._y}set y(value$1){this._y=value$1,this._onChangeCallback()}get z(){return this._z}set z(value$1){this._z=value$1,this._onChangeCallback()}get w(){return this._w}set w(value$1){this._w=value$1,this._onChangeCallback()}set(x$1,y,z$1,w){return this._x=x$1,this._y=y,this._z=z$1,this._w=w,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(quaternion){return this._x=quaternion.x,this._y=quaternion.y,this._z=quaternion.z,this._w=quaternion.w,this._onChangeCallback(),this}setFromEuler(euler,update=!0){let x$1=euler._x,y=euler._y,z$1=euler._z,order$3=euler._order,cos$1=Math.cos,sin$1=Math.sin,c1=cos$1(x$1/2),c2=cos$1(y/2),c3=cos$1(z$1/2),s1=sin$1(x$1/2),s2=sin$1(y/2),s3=sin$1(z$1/2);switch(order$3){case`XYZ`:this._x=s1*c2*c3+c1*s2*s3,this._y=c1*s2*c3-s1*c2*s3,this._z=c1*c2*s3+s1*s2*c3,this._w=c1*c2*c3-s1*s2*s3;break;case`YXZ`:this._x=s1*c2*c3+c1*s2*s3,this._y=c1*s2*c3-s1*c2*s3,this._z=c1*c2*s3-s1*s2*c3,this._w=c1*c2*c3+s1*s2*s3;break;case`ZXY`:this._x=s1*c2*c3-c1*s2*s3,this._y=c1*s2*c3+s1*c2*s3,this._z=c1*c2*s3+s1*s2*c3,this._w=c1*c2*c3-s1*s2*s3;break;case`ZYX`:this._x=s1*c2*c3-c1*s2*s3,this._y=c1*s2*c3+s1*c2*s3,this._z=c1*c2*s3-s1*s2*c3,this._w=c1*c2*c3+s1*s2*s3;break;case`YZX`:this._x=s1*c2*c3+c1*s2*s3,this._y=c1*s2*c3+s1*c2*s3,this._z=c1*c2*s3-s1*s2*c3,this._w=c1*c2*c3-s1*s2*s3;break;case`XZY`:this._x=s1*c2*c3-c1*s2*s3,this._y=c1*s2*c3-s1*c2*s3,this._z=c1*c2*s3+s1*s2*c3,this._w=c1*c2*c3+s1*s2*s3;break;default:console.warn(`THREE.Quaternion: .setFromEuler() encountered an unknown order: `+order$3)}return update===!0&&this._onChangeCallback(),this}setFromAxisAngle(axis,angle){let halfAngle=angle/2,s=Math.sin(halfAngle);return this._x=axis.x*s,this._y=axis.y*s,this._z=axis.z*s,this._w=Math.cos(halfAngle),this._onChangeCallback(),this}setFromRotationMatrix(m){let te$1=m.elements,m11=te$1[0],m12=te$1[4],m13=te$1[8],m21=te$1[1],m22=te$1[5],m23=te$1[9],m31=te$1[2],m32=te$1[6],m33=te$1[10],trace=m11+m22+m33;if(trace>0){let s=.5/Math.sqrt(trace+1);this._w=.25/s,this._x=(m32-m23)*s,this._y=(m13-m31)*s,this._z=(m21-m12)*s}else if(m11>m22&&m11>m33){let s=2*Math.sqrt(1+m11-m22-m33);this._w=(m32-m23)/s,this._x=.25*s,this._y=(m12+m21)/s,this._z=(m13+m31)/s}else if(m22>m33){let s=2*Math.sqrt(1+m22-m11-m33);this._w=(m13-m31)/s,this._x=(m12+m21)/s,this._y=.25*s,this._z=(m23+m32)/s}else{let s=2*Math.sqrt(1+m33-m11-m22);this._w=(m21-m12)/s,this._x=(m13+m31)/s,this._y=(m23+m32)/s,this._z=.25*s}return this._onChangeCallback(),this}setFromUnitVectors(vFrom,vTo){let r$1=vFrom.dot(vTo)+1;return r$1<1e-8?(r$1=0,Math.abs(vFrom.x)>Math.abs(vFrom.z)?(this._x=-vFrom.y,this._y=vFrom.x,this._z=0,this._w=r$1):(this._x=0,this._y=-vFrom.z,this._z=vFrom.y,this._w=r$1)):(this._x=vFrom.y*vTo.z-vFrom.z*vTo.y,this._y=vFrom.z*vTo.x-vFrom.x*vTo.z,this._z=vFrom.x*vTo.y-vFrom.y*vTo.x,this._w=r$1),this.normalize()}angleTo(q){return 2*Math.acos(Math.abs(clamp$7(this.dot(q),-1,1)))}rotateTowards(q,step){let angle=this.angleTo(q);if(angle===0)return this;let t$1=Math.min(1,step/angle);return this.slerp(q,t$1),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(v){return this._x*v._x+this._y*v._y+this._z*v._z+this._w*v._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let l=this.length();return l===0?(this._x=0,this._y=0,this._z=0,this._w=1):(l=1/l,this._x*=l,this._y*=l,this._z*=l,this._w*=l),this._onChangeCallback(),this}multiply(q){return this.multiplyQuaternions(this,q)}premultiply(q){return this.multiplyQuaternions(q,this)}multiplyQuaternions(a$1,b$1){let qax=a$1._x,qay=a$1._y,qaz=a$1._z,qaw=a$1._w,qbx=b$1._x,qby=b$1._y,qbz=b$1._z,qbw=b$1._w;return this._x=qax*qbw+qaw*qbx+qay*qbz-qaz*qby,this._y=qay*qbw+qaw*qby+qaz*qbx-qax*qbz,this._z=qaz*qbw+qaw*qbz+qax*qby-qay*qbx,this._w=qaw*qbw-qax*qbx-qay*qby-qaz*qbz,this._onChangeCallback(),this}slerp(qb,t$1){if(t$1===0)return this;if(t$1===1)return this.copy(qb);let x$1=this._x,y=this._y,z$1=this._z,w=this._w,cosHalfTheta=w*qb._w+x$1*qb._x+y*qb._y+z$1*qb._z;if(cosHalfTheta<0?(this._w=-qb._w,this._x=-qb._x,this._y=-qb._y,this._z=-qb._z,cosHalfTheta=-cosHalfTheta):this.copy(qb),cosHalfTheta>=1)return this._w=w,this._x=x$1,this._y=y,this._z=z$1,this;let sqrSinHalfTheta=1-cosHalfTheta*cosHalfTheta;if(sqrSinHalfTheta<=2**-52){let s=1-t$1;return this._w=s*w+t$1*this._w,this._x=s*x$1+t$1*this._x,this._y=s*y+t$1*this._y,this._z=s*z$1+t$1*this._z,this.normalize(),this}let sinHalfTheta=Math.sqrt(sqrSinHalfTheta),halfTheta=Math.atan2(sinHalfTheta,cosHalfTheta),ratioA=Math.sin((1-t$1)*halfTheta)/sinHalfTheta,ratioB=Math.sin(t$1*halfTheta)/sinHalfTheta;return this._w=w*ratioA+this._w*ratioB,this._x=x$1*ratioA+this._x*ratioB,this._y=y*ratioA+this._y*ratioB,this._z=z$1*ratioA+this._z*ratioB,this._onChangeCallback(),this}slerpQuaternions(qa,qb,t$1){return this.copy(qa).slerp(qb,t$1)}random(){let theta1=2*Math.PI*Math.random(),theta2=2*Math.PI*Math.random(),x0=Math.random(),r1=Math.sqrt(1-x0),r2=Math.sqrt(x0);return this.set(r1*Math.sin(theta1),r1*Math.cos(theta1),r2*Math.sin(theta2),r2*Math.cos(theta2))}equals(quaternion){return quaternion._x===this._x&&quaternion._y===this._y&&quaternion._z===this._z&&quaternion._w===this._w}fromArray(array$1,offset$2=0){return this._x=array$1[offset$2],this._y=array$1[offset$2+1],this._z=array$1[offset$2+2],this._w=array$1[offset$2+3],this._onChangeCallback(),this}toArray(array$1=[],offset$2=0){return array$1[offset$2]=this._x,array$1[offset$2+1]=this._y,array$1[offset$2+2]=this._z,array$1[offset$2+3]=this._w,array$1}fromBufferAttribute(attribute,index$1){return this._x=attribute.getX(index$1),this._y=attribute.getY(index$1),this._z=attribute.getZ(index$1),this._w=attribute.getW(index$1),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(callback){return this._onChangeCallback=callback,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Vector3=class Vector3{constructor(x$1=0,y=0,z$1=0){Vector3.prototype.isVector3=!0,this.x=x$1,this.y=y,this.z=z$1}set(x$1,y,z$1){return z$1===void 0&&(z$1=this.z),this.x=x$1,this.y=y,this.z=z$1,this}setScalar(scalar){return this.x=scalar,this.y=scalar,this.z=scalar,this}setX(x$1){return this.x=x$1,this}setY(y){return this.y=y,this}setZ(z$1){return this.z=z$1,this}setComponent(index$1,value$1){switch(index$1){case 0:this.x=value$1;break;case 1:this.y=value$1;break;case 2:this.z=value$1;break;default:throw Error(`index is out of range: `+index$1)}return this}getComponent(index$1){switch(index$1){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(`index is out of range: `+index$1)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(v){return this.x=v.x,this.y=v.y,this.z=v.z,this}add(v){return this.x+=v.x,this.y+=v.y,this.z+=v.z,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this}addVectors(a$1,b$1){return this.x=a$1.x+b$1.x,this.y=a$1.y+b$1.y,this.z=a$1.z+b$1.z,this}addScaledVector(v,s){return this.x+=v.x*s,this.y+=v.y*s,this.z+=v.z*s,this}sub(v){return this.x-=v.x,this.y-=v.y,this.z-=v.z,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this}subVectors(a$1,b$1){return this.x=a$1.x-b$1.x,this.y=a$1.y-b$1.y,this.z=a$1.z-b$1.z,this}multiply(v){return this.x*=v.x,this.y*=v.y,this.z*=v.z,this}multiplyScalar(scalar){return this.x*=scalar,this.y*=scalar,this.z*=scalar,this}multiplyVectors(a$1,b$1){return this.x=a$1.x*b$1.x,this.y=a$1.y*b$1.y,this.z=a$1.z*b$1.z,this}applyEuler(euler){return this.applyQuaternion(_quaternion$4.setFromEuler(euler))}applyAxisAngle(axis,angle){return this.applyQuaternion(_quaternion$4.setFromAxisAngle(axis,angle))}applyMatrix3(m){let x$1=this.x,y=this.y,z$1=this.z,e$4=m.elements;return this.x=e$4[0]*x$1+e$4[3]*y+e$4[6]*z$1,this.y=e$4[1]*x$1+e$4[4]*y+e$4[7]*z$1,this.z=e$4[2]*x$1+e$4[5]*y+e$4[8]*z$1,this}applyNormalMatrix(m){return this.applyMatrix3(m).normalize()}applyMatrix4(m){let x$1=this.x,y=this.y,z$1=this.z,e$4=m.elements,w=1/(e$4[3]*x$1+e$4[7]*y+e$4[11]*z$1+e$4[15]);return this.x=(e$4[0]*x$1+e$4[4]*y+e$4[8]*z$1+e$4[12])*w,this.y=(e$4[1]*x$1+e$4[5]*y+e$4[9]*z$1+e$4[13])*w,this.z=(e$4[2]*x$1+e$4[6]*y+e$4[10]*z$1+e$4[14])*w,this}applyQuaternion(q){let vx=this.x,vy=this.y,vz=this.z,qx=q.x,qy=q.y,qz=q.z,qw=q.w,tx=2*(qy*vz-qz*vy),ty=2*(qz*vx-qx*vz),tz=2*(qx*vy-qy*vx);return this.x=vx+qw*tx+qy*tz-qz*ty,this.y=vy+qw*ty+qz*tx-qx*tz,this.z=vz+qw*tz+qx*ty-qy*tx,this}project(camera){return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix)}unproject(camera){return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld)}transformDirection(m){let x$1=this.x,y=this.y,z$1=this.z,e$4=m.elements;return this.x=e$4[0]*x$1+e$4[4]*y+e$4[8]*z$1,this.y=e$4[1]*x$1+e$4[5]*y+e$4[9]*z$1,this.z=e$4[2]*x$1+e$4[6]*y+e$4[10]*z$1,this.normalize()}divide(v){return this.x/=v.x,this.y/=v.y,this.z/=v.z,this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}min(v){return this.x=Math.min(this.x,v.x),this.y=Math.min(this.y,v.y),this.z=Math.min(this.z,v.z),this}max(v){return this.x=Math.max(this.x,v.x),this.y=Math.max(this.y,v.y),this.z=Math.max(this.z,v.z),this}clamp(min$1,max$1){return this.x=clamp$7(this.x,min$1.x,max$1.x),this.y=clamp$7(this.y,min$1.y,max$1.y),this.z=clamp$7(this.z,min$1.z,max$1.z),this}clampScalar(minVal,maxVal){return this.x=clamp$7(this.x,minVal,maxVal),this.y=clamp$7(this.y,minVal,maxVal),this.z=clamp$7(this.z,minVal,maxVal),this}clampLength(min$1,max$1){let length=this.length();return this.divideScalar(length||1).multiplyScalar(clamp$7(length,min$1,max$1))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha$1){return this.x+=(v.x-this.x)*alpha$1,this.y+=(v.y-this.y)*alpha$1,this.z+=(v.z-this.z)*alpha$1,this}lerpVectors(v1,v2,alpha$1){return this.x=v1.x+(v2.x-v1.x)*alpha$1,this.y=v1.y+(v2.y-v1.y)*alpha$1,this.z=v1.z+(v2.z-v1.z)*alpha$1,this}cross(v){return this.crossVectors(this,v)}crossVectors(a$1,b$1){let ax=a$1.x,ay=a$1.y,az=a$1.z,bx=b$1.x,by=b$1.y,bz=b$1.z;return this.x=ay*bz-az*by,this.y=az*bx-ax*bz,this.z=ax*by-ay*bx,this}projectOnVector(v){let denominator=v.lengthSq();if(denominator===0)return this.set(0,0,0);let scalar=v.dot(this)/denominator;return this.copy(v).multiplyScalar(scalar)}projectOnPlane(planeNormal){return _vector$c.copy(this).projectOnVector(planeNormal),this.sub(_vector$c)}reflect(normal){return this.sub(_vector$c.copy(normal).multiplyScalar(2*this.dot(normal)))}angleTo(v){let denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;let theta=this.dot(v)/denominator;return Math.acos(clamp$7(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){let dx=this.x-v.x,dy=this.y-v.y,dz=this.z-v.z;return dx*dx+dy*dy+dz*dz}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)+Math.abs(this.z-v.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(radius,phi,theta){let sinPhiRadius=Math.sin(phi)*radius;return this.x=sinPhiRadius*Math.sin(theta),this.y=Math.cos(phi)*radius,this.z=sinPhiRadius*Math.cos(theta),this}setFromCylindrical(c$3){return this.setFromCylindricalCoords(c$3.radius,c$3.theta,c$3.y)}setFromCylindricalCoords(radius,theta,y){return this.x=radius*Math.sin(theta),this.y=y,this.z=radius*Math.cos(theta),this}setFromMatrixPosition(m){let e$4=m.elements;return this.x=e$4[12],this.y=e$4[13],this.z=e$4[14],this}setFromMatrixScale(m){let sx=this.setFromMatrixColumn(m,0).length(),sy=this.setFromMatrixColumn(m,1).length(),sz=this.setFromMatrixColumn(m,2).length();return this.x=sx,this.y=sy,this.z=sz,this}setFromMatrixColumn(m,index$1){return this.fromArray(m.elements,index$1*4)}setFromMatrix3Column(m,index$1){return this.fromArray(m.elements,index$1*3)}setFromEuler(e$4){return this.x=e$4._x,this.y=e$4._y,this.z=e$4._z,this}setFromColor(c$3){return this.x=c$3.r,this.y=c$3.g,this.z=c$3.b,this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z}fromArray(array$1,offset$2=0){return this.x=array$1[offset$2],this.y=array$1[offset$2+1],this.z=array$1[offset$2+2],this}toArray(array$1=[],offset$2=0){return array$1[offset$2]=this.x,array$1[offset$2+1]=this.y,array$1[offset$2+2]=this.z,array$1}fromBufferAttribute(attribute,index$1){return this.x=attribute.getX(index$1),this.y=attribute.getY(index$1),this.z=attribute.getZ(index$1),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let theta=Math.random()*Math.PI*2,u=Math.random()*2-1,c$3=Math.sqrt(1-u*u);return this.x=c$3*Math.cos(theta),this.y=u,this.z=c$3*Math.sin(theta),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};const _vector$c=new Vector3,_quaternion$4=new Quaternion;var Matrix3=class Matrix3{constructor(n11,n12,n13,n21,n22,n23,n31,n32,n33){Matrix3.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],n11!==void 0&&this.set(n11,n12,n13,n21,n22,n23,n31,n32,n33)}set(n11,n12,n13,n21,n22,n23,n31,n32,n33){let te$1=this.elements;return te$1[0]=n11,te$1[1]=n21,te$1[2]=n31,te$1[3]=n12,te$1[4]=n22,te$1[5]=n32,te$1[6]=n13,te$1[7]=n23,te$1[8]=n33,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(m){let te$1=this.elements,me=m.elements;return te$1[0]=me[0],te$1[1]=me[1],te$1[2]=me[2],te$1[3]=me[3],te$1[4]=me[4],te$1[5]=me[5],te$1[6]=me[6],te$1[7]=me[7],te$1[8]=me[8],this}extractBasis(xAxis,yAxis,zAxis){return xAxis.setFromMatrix3Column(this,0),yAxis.setFromMatrix3Column(this,1),zAxis.setFromMatrix3Column(this,2),this}setFromMatrix4(m){let me=m.elements;return this.set(me[0],me[4],me[8],me[1],me[5],me[9],me[2],me[6],me[10]),this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a$1,b$1){let ae=a$1.elements,be$1=b$1.elements,te$1=this.elements,a11=ae[0],a12=ae[3],a13=ae[6],a21=ae[1],a22=ae[4],a23=ae[7],a31=ae[2],a32=ae[5],a33=ae[8],b11=be$1[0],b12=be$1[3],b13=be$1[6],b21=be$1[1],b22=be$1[4],b23=be$1[7],b31=be$1[2],b32=be$1[5],b33=be$1[8];return te$1[0]=a11*b11+a12*b21+a13*b31,te$1[3]=a11*b12+a12*b22+a13*b32,te$1[6]=a11*b13+a12*b23+a13*b33,te$1[1]=a21*b11+a22*b21+a23*b31,te$1[4]=a21*b12+a22*b22+a23*b32,te$1[7]=a21*b13+a22*b23+a23*b33,te$1[2]=a31*b11+a32*b21+a33*b31,te$1[5]=a31*b12+a32*b22+a33*b32,te$1[8]=a31*b13+a32*b23+a33*b33,this}multiplyScalar(s){let te$1=this.elements;return te$1[0]*=s,te$1[3]*=s,te$1[6]*=s,te$1[1]*=s,te$1[4]*=s,te$1[7]*=s,te$1[2]*=s,te$1[5]*=s,te$1[8]*=s,this}determinant(){let te$1=this.elements,a$1=te$1[0],b$1=te$1[1],c$3=te$1[2],d=te$1[3],e$4=te$1[4],f$2=te$1[5],g=te$1[6],h$1=te$1[7],i=te$1[8];return a$1*e$4*i-a$1*f$2*h$1-b$1*d*i+b$1*f$2*g+c$3*d*h$1-c$3*e$4*g}invert(){let te$1=this.elements,n11=te$1[0],n21=te$1[1],n31=te$1[2],n12=te$1[3],n22=te$1[4],n32=te$1[5],n13=te$1[6],n23=te$1[7],n33=te$1[8],t11=n33*n22-n32*n23,t12=n32*n13-n33*n12,t13=n23*n12-n22*n13,det=n11*t11+n21*t12+n31*t13;if(det===0)return this.set(0,0,0,0,0,0,0,0,0);let detInv=1/det;return te$1[0]=t11*detInv,te$1[1]=(n31*n23-n33*n21)*detInv,te$1[2]=(n32*n21-n31*n22)*detInv,te$1[3]=t12*detInv,te$1[4]=(n33*n11-n31*n13)*detInv,te$1[5]=(n31*n12-n32*n11)*detInv,te$1[6]=t13*detInv,te$1[7]=(n21*n13-n23*n11)*detInv,te$1[8]=(n22*n11-n21*n12)*detInv,this}transpose(){let tmp$1,m=this.elements;return tmp$1=m[1],m[1]=m[3],m[3]=tmp$1,tmp$1=m[2],m[2]=m[6],m[6]=tmp$1,tmp$1=m[5],m[5]=m[7],m[7]=tmp$1,this}getNormalMatrix(matrix4){return this.setFromMatrix4(matrix4).invert().transpose()}transposeIntoArray(r$1){let m=this.elements;return r$1[0]=m[0],r$1[1]=m[3],r$1[2]=m[6],r$1[3]=m[1],r$1[4]=m[4],r$1[5]=m[7],r$1[6]=m[2],r$1[7]=m[5],r$1[8]=m[8],this}setUvTransform(tx,ty,sx,sy,rotation,cx,cy){let c$3=Math.cos(rotation),s=Math.sin(rotation);return this.set(sx*c$3,sx*s,-sx*(c$3*cx+s*cy)+cx+tx,-sy*s,sy*c$3,-sy*(-s*cx+c$3*cy)+cy+ty,0,0,1),this}scale(sx,sy){return this.premultiply(_m3.makeScale(sx,sy)),this}rotate(theta){return this.premultiply(_m3.makeRotation(-theta)),this}translate(tx,ty){return this.premultiply(_m3.makeTranslation(tx,ty)),this}makeTranslation(x$1,y){return x$1.isVector2?this.set(1,0,x$1.x,0,1,x$1.y,0,0,1):this.set(1,0,x$1,0,1,y,0,0,1),this}makeRotation(theta){let c$3=Math.cos(theta),s=Math.sin(theta);return this.set(c$3,-s,0,s,c$3,0,0,0,1),this}makeScale(x$1,y){return this.set(x$1,0,0,0,y,0,0,0,1),this}equals(matrix){let te$1=this.elements,me=matrix.elements;for(let i=0;i<9;i++)if(te$1[i]!==me[i])return!1;return!0}fromArray(array$1,offset$2=0){for(let i=0;i<9;i++)this.elements[i]=array$1[i+offset$2];return this}toArray(array$1=[],offset$2=0){let te$1=this.elements;return array$1[offset$2]=te$1[0],array$1[offset$2+1]=te$1[1],array$1[offset$2+2]=te$1[2],array$1[offset$2+3]=te$1[3],array$1[offset$2+4]=te$1[4],array$1[offset$2+5]=te$1[5],array$1[offset$2+6]=te$1[6],array$1[offset$2+7]=te$1[7],array$1[offset$2+8]=te$1[8],array$1}clone(){return new this.constructor().fromArray(this.elements)}};const _m3=new Matrix3;function arrayNeedsUint32(array$1){for(let i=array$1.length-1;i>=0;--i)if(array$1[i]>=65535)return!0;return!1}const TYPED_ARRAYS={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function getTypedArray(type,buffer$1){return new TYPED_ARRAYS[type](buffer$1)}function createElementNS(name$2){return document.createElementNS(`http://www.w3.org/1999/xhtml`,name$2)}function createCanvasElement(){let canvas=createElementNS(`canvas`);return canvas.style.display=`block`,canvas}const _cache={};function warnOnce$1(message$1){message$1 in _cache||(_cache[message$1]=!0,console.warn(message$1))}function probeAsync(gl,sync$2,interval){return new Promise(function(resolve$1,reject){function probe(){switch(gl.clientWaitSync(sync$2,gl.SYNC_FLUSH_COMMANDS_BIT,0)){case gl.WAIT_FAILED:reject();break;case gl.TIMEOUT_EXPIRED:setTimeout(probe,interval);break;default:resolve$1()}}setTimeout(probe,interval)})}const LINEAR_REC709_TO_XYZ=new Matrix3().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),XYZ_TO_LINEAR_REC709=new Matrix3().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function createColorManagement(){let ColorManagement$1={enabled:!0,workingColorSpace:LinearSRGBColorSpace,spaces:{},convert:function(color$2,sourceColorSpace,targetColorSpace){return this.enabled===!1||sourceColorSpace===targetColorSpace||!sourceColorSpace||!targetColorSpace?color$2:(this.spaces[sourceColorSpace].transfer===SRGBTransfer&&(color$2.r=SRGBToLinear(color$2.r),color$2.g=SRGBToLinear(color$2.g),color$2.b=SRGBToLinear(color$2.b)),this.spaces[sourceColorSpace].primaries!==this.spaces[targetColorSpace].primaries&&(color$2.applyMatrix3(this.spaces[sourceColorSpace].toXYZ),color$2.applyMatrix3(this.spaces[targetColorSpace].fromXYZ)),this.spaces[targetColorSpace].transfer===SRGBTransfer&&(color$2.r=LinearToSRGB(color$2.r),color$2.g=LinearToSRGB(color$2.g),color$2.b=LinearToSRGB(color$2.b)),color$2)},workingToColorSpace:function(color$2,targetColorSpace){return this.convert(color$2,this.workingColorSpace,targetColorSpace)},colorSpaceToWorking:function(color$2,sourceColorSpace){return this.convert(color$2,sourceColorSpace,this.workingColorSpace)},getPrimaries:function(colorSpace){return this.spaces[colorSpace].primaries},getTransfer:function(colorSpace){return colorSpace===NoColorSpace?LinearTransfer:this.spaces[colorSpace].transfer},getLuminanceCoefficients:function(target$1,colorSpace=this.workingColorSpace){return target$1.fromArray(this.spaces[colorSpace].luminanceCoefficients)},define:function(colorSpaces){Object.assign(this.spaces,colorSpaces)},_getMatrix:function(targetMatrix,sourceColorSpace,targetColorSpace){return targetMatrix.copy(this.spaces[sourceColorSpace].toXYZ).multiply(this.spaces[targetColorSpace].fromXYZ)},_getDrawingBufferColorSpace:function(colorSpace){return this.spaces[colorSpace].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(colorSpace=this.workingColorSpace){return this.spaces[colorSpace].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(color$2,targetColorSpace){return warnOnce$1(`THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().`),ColorManagement$1.workingToColorSpace(color$2,targetColorSpace)},toWorkingColorSpace:function(color$2,sourceColorSpace){return warnOnce$1(`THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().`),ColorManagement$1.colorSpaceToWorking(color$2,sourceColorSpace)}},REC709_PRIMARIES=[.64,.33,.3,.6,.15,.06],REC709_LUMINANCE_COEFFICIENTS=[.2126,.7152,.0722],D65$1=[.3127,.329];return ColorManagement$1.define({[LinearSRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65$1,transfer:LinearTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,workingColorSpaceConfig:{unpackColorSpace:SRGBColorSpace},outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}},[SRGBColorSpace]:{primaries:REC709_PRIMARIES,whitePoint:D65$1,transfer:SRGBTransfer,toXYZ:LINEAR_REC709_TO_XYZ,fromXYZ:XYZ_TO_LINEAR_REC709,luminanceCoefficients:REC709_LUMINANCE_COEFFICIENTS,outputColorSpaceConfig:{drawingBufferColorSpace:SRGBColorSpace}}}),ColorManagement$1}const ColorManagement=createColorManagement();function SRGBToLinear(c$3){return c$3<.04045?c$3*.0773993808:(c$3*.9478672986+.0521327014)**2.4}function LinearToSRGB(c$3){return c$3<.0031308?c$3*12.92:1.055*c$3**.41666-.055}let _canvas;var ImageUtils=class{static getDataURL(image$1,type=`image/png`){if(/^data:/i.test(image$1.src)||typeof HTMLCanvasElement>`u`)return image$1.src;let canvas;if(image$1 instanceof HTMLCanvasElement)canvas=image$1;else{_canvas===void 0&&(_canvas=createElementNS(`canvas`)),_canvas.width=image$1.width,_canvas.height=image$1.height;let context$1=_canvas.getContext(`2d`);image$1 instanceof ImageData?context$1.putImageData(image$1,0,0):context$1.drawImage(image$1,0,0,image$1.width,image$1.height),canvas=_canvas}return canvas.toDataURL(type)}static sRGBToLinear(image$1){if(typeof HTMLImageElement<`u`&&image$1 instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&image$1 instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&image$1 instanceof ImageBitmap){let canvas=createElementNS(`canvas`);canvas.width=image$1.width,canvas.height=image$1.height;let context$1=canvas.getContext(`2d`);context$1.drawImage(image$1,0,0,image$1.width,image$1.height);let imageData=context$1.getImageData(0,0,image$1.width,image$1.height),data$12=imageData.data;for(let i=0;i1),this.pmremVersion=0}get width(){return this.source.getSize(_tempVec3).x}get height(){return this.source.getSize(_tempVec3).y}get depth(){return this.source.getSize(_tempVec3).z}get image(){return this.source.data}set image(value$1=null){this.source.data=value$1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(start,count$2){this.updateRanges.push({start,count:count$2})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(source){return this.name=source.name,this.source=source.source,this.mipmaps=source.mipmaps.slice(0),this.mapping=source.mapping,this.channel=source.channel,this.wrapS=source.wrapS,this.wrapT=source.wrapT,this.magFilter=source.magFilter,this.minFilter=source.minFilter,this.anisotropy=source.anisotropy,this.format=source.format,this.internalFormat=source.internalFormat,this.type=source.type,this.offset.copy(source.offset),this.repeat.copy(source.repeat),this.center.copy(source.center),this.rotation=source.rotation,this.matrixAutoUpdate=source.matrixAutoUpdate,this.matrix.copy(source.matrix),this.generateMipmaps=source.generateMipmaps,this.premultiplyAlpha=source.premultiplyAlpha,this.flipY=source.flipY,this.unpackAlignment=source.unpackAlignment,this.colorSpace=source.colorSpace,this.renderTarget=source.renderTarget,this.isRenderTargetTexture=source.isRenderTargetTexture,this.isArrayTexture=source.isArrayTexture,this.userData=JSON.parse(JSON.stringify(source.userData)),this.needsUpdate=!0,this}setValues(values){for(let key$2 in values){let newValue=values[key$2];if(newValue===void 0){console.warn(`THREE.Texture.setValues(): parameter '${key$2}' has value of undefined.`);continue}let currentValue=this[key$2];if(currentValue===void 0){console.warn(`THREE.Texture.setValues(): property '${key$2}' does not exist.`);continue}currentValue&&newValue&¤tValue.isVector2&&newValue.isVector2||currentValue&&newValue&¤tValue.isVector3&&newValue.isVector3||currentValue&&newValue&¤tValue.isMatrix3&&newValue.isMatrix3?currentValue.copy(newValue):this[key$2]=newValue}}toJSON(meta){let isRootObject=meta===void 0||typeof meta==`string`;if(!isRootObject&&meta.textures[this.uuid]!==void 0)return meta.textures[this.uuid];let output={metadata:{version:4.7,type:`Texture`,generator:`Texture.toJSON`},uuid:this.uuid,name:this.name,image:this.source.toJSON(meta).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(output.userData=this.userData),isRootObject||(meta.textures[this.uuid]=output),output}dispose(){this.dispatchEvent({type:`dispose`})}transformUv(uv){if(this.mapping!==UVMapping)return uv;if(uv.applyMatrix3(this.matrix),uv.x<0||uv.x>1)switch(this.wrapS){case RepeatWrapping:uv.x-=Math.floor(uv.x);break;case ClampToEdgeWrapping:uv.x=uv.x<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(uv.x)%2)===1?uv.x=Math.ceil(uv.x)-uv.x:uv.x-=Math.floor(uv.x);break}if(uv.y<0||uv.y>1)switch(this.wrapT){case RepeatWrapping:uv.y-=Math.floor(uv.y);break;case ClampToEdgeWrapping:uv.y=uv.y<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(uv.y)%2)===1?uv.y=Math.ceil(uv.y)-uv.y:uv.y-=Math.floor(uv.y);break}return this.flipY&&(uv.y=1-uv.y),uv}set needsUpdate(value$1){value$1===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(value$1){value$1===!0&&this.pmremVersion++}};Texture.DEFAULT_IMAGE=null,Texture.DEFAULT_MAPPING=UVMapping,Texture.DEFAULT_ANISOTROPY=1;var Vector4=class Vector4{constructor(x$1=0,y=0,z$1=0,w=1){Vector4.prototype.isVector4=!0,this.x=x$1,this.y=y,this.z=z$1,this.w=w}get width(){return this.z}set width(value$1){this.z=value$1}get height(){return this.w}set height(value$1){this.w=value$1}set(x$1,y,z$1,w){return this.x=x$1,this.y=y,this.z=z$1,this.w=w,this}setScalar(scalar){return this.x=scalar,this.y=scalar,this.z=scalar,this.w=scalar,this}setX(x$1){return this.x=x$1,this}setY(y){return this.y=y,this}setZ(z$1){return this.z=z$1,this}setW(w){return this.w=w,this}setComponent(index$1,value$1){switch(index$1){case 0:this.x=value$1;break;case 1:this.y=value$1;break;case 2:this.z=value$1;break;case 3:this.w=value$1;break;default:throw Error(`index is out of range: `+index$1)}return this}getComponent(index$1){switch(index$1){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(`index is out of range: `+index$1)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(v){return this.x=v.x,this.y=v.y,this.z=v.z,this.w=v.w===void 0?1:v.w,this}add(v){return this.x+=v.x,this.y+=v.y,this.z+=v.z,this.w+=v.w,this}addScalar(s){return this.x+=s,this.y+=s,this.z+=s,this.w+=s,this}addVectors(a$1,b$1){return this.x=a$1.x+b$1.x,this.y=a$1.y+b$1.y,this.z=a$1.z+b$1.z,this.w=a$1.w+b$1.w,this}addScaledVector(v,s){return this.x+=v.x*s,this.y+=v.y*s,this.z+=v.z*s,this.w+=v.w*s,this}sub(v){return this.x-=v.x,this.y-=v.y,this.z-=v.z,this.w-=v.w,this}subScalar(s){return this.x-=s,this.y-=s,this.z-=s,this.w-=s,this}subVectors(a$1,b$1){return this.x=a$1.x-b$1.x,this.y=a$1.y-b$1.y,this.z=a$1.z-b$1.z,this.w=a$1.w-b$1.w,this}multiply(v){return this.x*=v.x,this.y*=v.y,this.z*=v.z,this.w*=v.w,this}multiplyScalar(scalar){return this.x*=scalar,this.y*=scalar,this.z*=scalar,this.w*=scalar,this}applyMatrix4(m){let x$1=this.x,y=this.y,z$1=this.z,w=this.w,e$4=m.elements;return this.x=e$4[0]*x$1+e$4[4]*y+e$4[8]*z$1+e$4[12]*w,this.y=e$4[1]*x$1+e$4[5]*y+e$4[9]*z$1+e$4[13]*w,this.z=e$4[2]*x$1+e$4[6]*y+e$4[10]*z$1+e$4[14]*w,this.w=e$4[3]*x$1+e$4[7]*y+e$4[11]*z$1+e$4[15]*w,this}divide(v){return this.x/=v.x,this.y/=v.y,this.z/=v.z,this.w/=v.w,this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}setAxisAngleFromQuaternion(q){this.w=2*Math.acos(q.w);let s=Math.sqrt(1-q.w*q.w);return s<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=q.x/s,this.y=q.y/s,this.z=q.z/s),this}setAxisAngleFromRotationMatrix(m){let angle,x$1,y,z$1,epsilon=.01,epsilon2=.1,te$1=m.elements,m11=te$1[0],m12=te$1[4],m13=te$1[8],m21=te$1[1],m22=te$1[5],m23=te$1[9],m31=te$1[2],m32=te$1[6],m33=te$1[10];if(Math.abs(m12-m21)yy&&xx>zz?xxzz?yy1;this.dispose()}this.viewport.set(0,0,width,height),this.scissor.set(0,0,width,height)}clone(){return new this.constructor().copy(this)}copy(source){this.width=source.width,this.height=source.height,this.depth=source.depth,this.scissor.copy(source.scissor),this.scissorTest=source.scissorTest,this.viewport.copy(source.viewport),this.textures.length=0;for(let i=0,il=source.textures.length;i=this.min.x&&point$3.x<=this.max.x&&point$3.y>=this.min.y&&point$3.y<=this.max.y&&point$3.z>=this.min.z&&point$3.z<=this.max.z}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y&&this.min.z<=box.min.z&&box.max.z<=this.max.z}getParameter(point$3,target$1){return target$1.set((point$3.x-this.min.x)/(this.max.x-this.min.x),(point$3.y-this.min.y)/(this.max.y-this.min.y),(point$3.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y&&box.max.z>=this.min.z&&box.min.z<=this.max.z}intersectsSphere(sphere){return this.clampPoint(sphere.center,_vector$b),_vector$b.distanceToSquared(sphere.center)<=sphere.radius*sphere.radius}intersectsPlane(plane){let min$1,max$1;return plane.normal.x>0?(min$1=plane.normal.x*this.min.x,max$1=plane.normal.x*this.max.x):(min$1=plane.normal.x*this.max.x,max$1=plane.normal.x*this.min.x),plane.normal.y>0?(min$1+=plane.normal.y*this.min.y,max$1+=plane.normal.y*this.max.y):(min$1+=plane.normal.y*this.max.y,max$1+=plane.normal.y*this.min.y),plane.normal.z>0?(min$1+=plane.normal.z*this.min.z,max$1+=plane.normal.z*this.max.z):(min$1+=plane.normal.z*this.max.z,max$1+=plane.normal.z*this.min.z),min$1<=-plane.constant&&max$1>=-plane.constant}intersectsTriangle(triangle){if(this.isEmpty())return!1;this.getCenter(_center),_extents.subVectors(this.max,_center),_v0$2.subVectors(triangle.a,_center),_v1$7.subVectors(triangle.b,_center),_v2$4.subVectors(triangle.c,_center),_f0.subVectors(_v1$7,_v0$2),_f1.subVectors(_v2$4,_v1$7),_f2.subVectors(_v0$2,_v2$4);let axes=[0,-_f0.z,_f0.y,0,-_f1.z,_f1.y,0,-_f2.z,_f2.y,_f0.z,0,-_f0.x,_f1.z,0,-_f1.x,_f2.z,0,-_f2.x,-_f0.y,_f0.x,0,-_f1.y,_f1.x,0,-_f2.y,_f2.x,0];return!satForAxes(axes,_v0$2,_v1$7,_v2$4,_extents)||(axes=[1,0,0,0,1,0,0,0,1],!satForAxes(axes,_v0$2,_v1$7,_v2$4,_extents))?!1:(_triangleNormal.crossVectors(_f0,_f1),axes=[_triangleNormal.x,_triangleNormal.y,_triangleNormal.z],satForAxes(axes,_v0$2,_v1$7,_v2$4,_extents))}clampPoint(point$3,target$1){return target$1.copy(point$3).clamp(this.min,this.max)}distanceToPoint(point$3){return this.clampPoint(point$3,_vector$b).distanceTo(point$3)}getBoundingSphere(target$1){return this.isEmpty()?target$1.makeEmpty():(this.getCenter(target$1.center),target$1.radius=this.getSize(_vector$b).length()*.5),target$1}intersect(box){return this.min.max(box.min),this.max.min(box.max),this.isEmpty()&&this.makeEmpty(),this}union(box){return this.min.min(box.min),this.max.max(box.max),this}applyMatrix4(matrix){return this.isEmpty()?this:(_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(matrix),_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(matrix),_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(matrix),_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(matrix),_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(matrix),_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(matrix),_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(matrix),_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(matrix),this.setFromPoints(_points),this)}translate(offset$2){return this.min.add(offset$2),this.max.add(offset$2),this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(json){return this.min.fromArray(json.min),this.max.fromArray(json.max),this}};const _points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3],_vector$b=new Vector3,_box$4=new Box3,_v0$2=new Vector3,_v1$7=new Vector3,_v2$4=new Vector3,_f0=new Vector3,_f1=new Vector3,_f2=new Vector3,_center=new Vector3,_extents=new Vector3,_triangleNormal=new Vector3,_testAxis=new Vector3;function satForAxes(axes,v0,v1,v2,extents){for(let i=0,j$1=axes.length-3;i<=j$1;i+=3){_testAxis.fromArray(axes,i);let r$1=extents.x*Math.abs(_testAxis.x)+extents.y*Math.abs(_testAxis.y)+extents.z*Math.abs(_testAxis.z),p0=v0.dot(_testAxis),p1=v1.dot(_testAxis),p2=v2.dot(_testAxis);if(Math.max(-Math.max(p0,p1,p2),Math.min(p0,p1,p2))>r$1)return!1}return!0}const _box$3=new Box3,_v1$6=new Vector3,_v2$3=new Vector3;var Sphere=class{constructor(center=new Vector3,radius=-1){this.isSphere=!0,this.center=center,this.radius=radius}set(center,radius){return this.center.copy(center),this.radius=radius,this}setFromPoints(points,optionalCenter){let center=this.center;optionalCenter===void 0?_box$3.setFromPoints(points).getCenter(center):center.copy(optionalCenter);let maxRadiusSq=0;for(let i=0,il=points.length;ithis.radius*this.radius&&(target$1.sub(this.center).normalize(),target$1.multiplyScalar(this.radius).add(this.center)),target$1}getBoundingBox(target$1){return this.isEmpty()?(target$1.makeEmpty(),target$1):(target$1.set(this.center,this.center),target$1.expandByScalar(this.radius),target$1)}applyMatrix4(matrix){return this.center.applyMatrix4(matrix),this.radius*=matrix.getMaxScaleOnAxis(),this}translate(offset$2){return this.center.add(offset$2),this}expandByPoint(point$3){if(this.isEmpty())return this.center.copy(point$3),this.radius=0,this;_v1$6.subVectors(point$3,this.center);let lengthSq=_v1$6.lengthSq();if(lengthSq>this.radius*this.radius){let length=Math.sqrt(lengthSq),delta=(length-this.radius)*.5;this.center.addScaledVector(_v1$6,delta/length),this.radius+=delta}return this}union(sphere){return sphere.isEmpty()?this:this.isEmpty()?(this.copy(sphere),this):(this.center.equals(sphere.center)===!0?this.radius=Math.max(this.radius,sphere.radius):(_v2$3.subVectors(sphere.center,this.center).setLength(sphere.radius),this.expandByPoint(_v1$6.copy(sphere.center).add(_v2$3)),this.expandByPoint(_v1$6.copy(sphere.center).sub(_v2$3))),this)}equals(sphere){return sphere.center.equals(this.center)&&sphere.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(json){return this.radius=json.radius,this.center.fromArray(json.center),this}};const _vector$a=new Vector3,_segCenter=new Vector3,_segDir=new Vector3,_diff=new Vector3,_edge1=new Vector3,_edge2=new Vector3,_normal$1=new Vector3;var Ray=class{constructor(origin=new Vector3,direction=new Vector3(0,0,-1)){this.origin=origin,this.direction=direction}set(origin,direction){return this.origin.copy(origin),this.direction.copy(direction),this}copy(ray){return this.origin.copy(ray.origin),this.direction.copy(ray.direction),this}at(t$1,target$1){return target$1.copy(this.origin).addScaledVector(this.direction,t$1)}lookAt(v){return this.direction.copy(v).sub(this.origin).normalize(),this}recast(t$1){return this.origin.copy(this.at(t$1,_vector$a)),this}closestPointToPoint(point$3,target$1){target$1.subVectors(point$3,this.origin);let directionDistance=target$1.dot(this.direction);return directionDistance<0?target$1.copy(this.origin):target$1.copy(this.origin).addScaledVector(this.direction,directionDistance)}distanceToPoint(point$3){return Math.sqrt(this.distanceSqToPoint(point$3))}distanceSqToPoint(point$3){let directionDistance=_vector$a.subVectors(point$3,this.origin).dot(this.direction);return directionDistance<0?this.origin.distanceToSquared(point$3):(_vector$a.copy(this.origin).addScaledVector(this.direction,directionDistance),_vector$a.distanceToSquared(point$3))}distanceSqToSegment(v0,v1,optionalPointOnRay,optionalPointOnSegment){_segCenter.copy(v0).add(v1).multiplyScalar(.5),_segDir.copy(v1).sub(v0).normalize(),_diff.copy(this.origin).sub(_segCenter);let segExtent=v0.distanceTo(v1)*.5,a01=-this.direction.dot(_segDir),b0=_diff.dot(this.direction),b1=-_diff.dot(_segDir),c$3=_diff.lengthSq(),det=Math.abs(1-a01*a01),s0,s1,sqrDist,extDet;if(det>0)if(s0=a01*b1-b0,s1=a01*b0-b1,extDet=segExtent*det,s0>=0)if(s1>=-extDet)if(s1<=extDet){let invDet=1/det;s0*=invDet,s1*=invDet,sqrDist=s0*(s0+a01*s1+2*b0)+s1*(a01*s0+s1+2*b1)+c$3}else s1=segExtent,s0=Math.max(0,-(a01*s1+b0)),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3;else s1=-segExtent,s0=Math.max(0,-(a01*s1+b0)),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3;else s1<=-extDet?(s0=Math.max(0,-(-a01*segExtent+b0)),s1=s0>0?-segExtent:Math.min(Math.max(-segExtent,-b1),segExtent),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3):s1<=extDet?(s0=0,s1=Math.min(Math.max(-segExtent,-b1),segExtent),sqrDist=s1*(s1+2*b1)+c$3):(s0=Math.max(0,-(a01*segExtent+b0)),s1=s0>0?segExtent:Math.min(Math.max(-segExtent,-b1),segExtent),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3);else s1=a01>0?-segExtent:segExtent,s0=Math.max(0,-(a01*s1+b0)),sqrDist=-s0*s0+s1*(s1+2*b1)+c$3;return optionalPointOnRay&&optionalPointOnRay.copy(this.origin).addScaledVector(this.direction,s0),optionalPointOnSegment&&optionalPointOnSegment.copy(_segCenter).addScaledVector(_segDir,s1),sqrDist}intersectSphere(sphere,target$1){_vector$a.subVectors(sphere.center,this.origin);let tca=_vector$a.dot(this.direction),d2=_vector$a.dot(_vector$a)-tca*tca,radius2=sphere.radius*sphere.radius;if(d2>radius2)return null;let thc=Math.sqrt(radius2-d2),t0=tca-thc,t1=tca+thc;return t1<0?null:t0<0?this.at(t1,target$1):this.at(t0,target$1)}intersectsSphere(sphere){return sphere.radius<0?!1:this.distanceSqToPoint(sphere.center)<=sphere.radius*sphere.radius}distanceToPlane(plane){let denominator=plane.normal.dot(this.direction);if(denominator===0)return plane.distanceToPoint(this.origin)===0?0:null;let t$1=-(this.origin.dot(plane.normal)+plane.constant)/denominator;return t$1>=0?t$1:null}intersectPlane(plane,target$1){let t$1=this.distanceToPlane(plane);return t$1===null?null:this.at(t$1,target$1)}intersectsPlane(plane){let distToPoint=plane.distanceToPoint(this.origin);if(distToPoint===0)return!0;let denominator=plane.normal.dot(this.direction);return denominator*distToPoint<0}intersectBox(box,target$1){let tmin,tmax,tymin,tymax,tzmin,tzmax,invdirx=1/this.direction.x,invdiry=1/this.direction.y,invdirz=1/this.direction.z,origin=this.origin;return invdirx>=0?(tmin=(box.min.x-origin.x)*invdirx,tmax=(box.max.x-origin.x)*invdirx):(tmin=(box.max.x-origin.x)*invdirx,tmax=(box.min.x-origin.x)*invdirx),invdiry>=0?(tymin=(box.min.y-origin.y)*invdiry,tymax=(box.max.y-origin.y)*invdiry):(tymin=(box.max.y-origin.y)*invdiry,tymax=(box.min.y-origin.y)*invdiry),tmin>tymax||tymin>tmax||((tymin>tmin||isNaN(tmin))&&(tmin=tymin),(tymax=0?(tzmin=(box.min.z-origin.z)*invdirz,tzmax=(box.max.z-origin.z)*invdirz):(tzmin=(box.max.z-origin.z)*invdirz,tzmax=(box.min.z-origin.z)*invdirz),tmin>tzmax||tzmin>tmax)||((tzmin>tmin||tmin!==tmin)&&(tmin=tzmin),(tzmax=0?tmin:tmax,target$1)}intersectsBox(box){return this.intersectBox(box,_vector$a)!==null}intersectTriangle(a$1,b$1,c$3,backfaceCulling,target$1){_edge1.subVectors(b$1,a$1),_edge2.subVectors(c$3,a$1),_normal$1.crossVectors(_edge1,_edge2);let DdN=this.direction.dot(_normal$1),sign$1;if(DdN>0){if(backfaceCulling)return null;sign$1=1}else if(DdN<0)sign$1=-1,DdN=-DdN;else return null;_diff.subVectors(this.origin,a$1);let DdQxE2=sign$1*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(DdQxE2<0)return null;let DdE1xQ=sign$1*this.direction.dot(_edge1.cross(_diff));if(DdE1xQ<0||DdQxE2+DdE1xQ>DdN)return null;let QdN=-sign$1*_diff.dot(_normal$1);return QdN<0?null:this.at(QdN/DdN,target$1)}applyMatrix4(matrix4){return this.origin.applyMatrix4(matrix4),this.direction.transformDirection(matrix4),this}equals(ray){return ray.origin.equals(this.origin)&&ray.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Matrix4=class Matrix4{constructor(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){Matrix4.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],n11!==void 0&&this.set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44)}set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){let te$1=this.elements;return te$1[0]=n11,te$1[4]=n12,te$1[8]=n13,te$1[12]=n14,te$1[1]=n21,te$1[5]=n22,te$1[9]=n23,te$1[13]=n24,te$1[2]=n31,te$1[6]=n32,te$1[10]=n33,te$1[14]=n34,te$1[3]=n41,te$1[7]=n42,te$1[11]=n43,te$1[15]=n44,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Matrix4().fromArray(this.elements)}copy(m){let te$1=this.elements,me=m.elements;return te$1[0]=me[0],te$1[1]=me[1],te$1[2]=me[2],te$1[3]=me[3],te$1[4]=me[4],te$1[5]=me[5],te$1[6]=me[6],te$1[7]=me[7],te$1[8]=me[8],te$1[9]=me[9],te$1[10]=me[10],te$1[11]=me[11],te$1[12]=me[12],te$1[13]=me[13],te$1[14]=me[14],te$1[15]=me[15],this}copyPosition(m){let te$1=this.elements,me=m.elements;return te$1[12]=me[12],te$1[13]=me[13],te$1[14]=me[14],this}setFromMatrix3(m){let me=m.elements;return this.set(me[0],me[3],me[6],0,me[1],me[4],me[7],0,me[2],me[5],me[8],0,0,0,0,1),this}extractBasis(xAxis,yAxis,zAxis){return xAxis.setFromMatrixColumn(this,0),yAxis.setFromMatrixColumn(this,1),zAxis.setFromMatrixColumn(this,2),this}makeBasis(xAxis,yAxis,zAxis){return this.set(xAxis.x,yAxis.x,zAxis.x,0,xAxis.y,yAxis.y,zAxis.y,0,xAxis.z,yAxis.z,zAxis.z,0,0,0,0,1),this}extractRotation(m){let te$1=this.elements,me=m.elements,scaleX=1/_v1$5.setFromMatrixColumn(m,0).length(),scaleY=1/_v1$5.setFromMatrixColumn(m,1).length(),scaleZ=1/_v1$5.setFromMatrixColumn(m,2).length();return te$1[0]=me[0]*scaleX,te$1[1]=me[1]*scaleX,te$1[2]=me[2]*scaleX,te$1[3]=0,te$1[4]=me[4]*scaleY,te$1[5]=me[5]*scaleY,te$1[6]=me[6]*scaleY,te$1[7]=0,te$1[8]=me[8]*scaleZ,te$1[9]=me[9]*scaleZ,te$1[10]=me[10]*scaleZ,te$1[11]=0,te$1[12]=0,te$1[13]=0,te$1[14]=0,te$1[15]=1,this}makeRotationFromEuler(euler){let te$1=this.elements,x$1=euler.x,y=euler.y,z$1=euler.z,a$1=Math.cos(x$1),b$1=Math.sin(x$1),c$3=Math.cos(y),d=Math.sin(y),e$4=Math.cos(z$1),f$2=Math.sin(z$1);if(euler.order===`XYZ`){let ae=a$1*e$4,af=a$1*f$2,be$1=b$1*e$4,bf=b$1*f$2;te$1[0]=c$3*e$4,te$1[4]=-c$3*f$2,te$1[8]=d,te$1[1]=af+be$1*d,te$1[5]=ae-bf*d,te$1[9]=-b$1*c$3,te$1[2]=bf-ae*d,te$1[6]=be$1+af*d,te$1[10]=a$1*c$3}else if(euler.order===`YXZ`){let ce$1=c$3*e$4,cf=c$3*f$2,de$2=d*e$4,df=d*f$2;te$1[0]=ce$1+df*b$1,te$1[4]=de$2*b$1-cf,te$1[8]=a$1*d,te$1[1]=a$1*f$2,te$1[5]=a$1*e$4,te$1[9]=-b$1,te$1[2]=cf*b$1-de$2,te$1[6]=df+ce$1*b$1,te$1[10]=a$1*c$3}else if(euler.order===`ZXY`){let ce$1=c$3*e$4,cf=c$3*f$2,de$2=d*e$4,df=d*f$2;te$1[0]=ce$1-df*b$1,te$1[4]=-a$1*f$2,te$1[8]=de$2+cf*b$1,te$1[1]=cf+de$2*b$1,te$1[5]=a$1*e$4,te$1[9]=df-ce$1*b$1,te$1[2]=-a$1*d,te$1[6]=b$1,te$1[10]=a$1*c$3}else if(euler.order===`ZYX`){let ae=a$1*e$4,af=a$1*f$2,be$1=b$1*e$4,bf=b$1*f$2;te$1[0]=c$3*e$4,te$1[4]=be$1*d-af,te$1[8]=ae*d+bf,te$1[1]=c$3*f$2,te$1[5]=bf*d+ae,te$1[9]=af*d-be$1,te$1[2]=-d,te$1[6]=b$1*c$3,te$1[10]=a$1*c$3}else if(euler.order===`YZX`){let ac=a$1*c$3,ad=a$1*d,bc=b$1*c$3,bd=b$1*d;te$1[0]=c$3*e$4,te$1[4]=bd-ac*f$2,te$1[8]=bc*f$2+ad,te$1[1]=f$2,te$1[5]=a$1*e$4,te$1[9]=-b$1*e$4,te$1[2]=-d*e$4,te$1[6]=ad*f$2+bc,te$1[10]=ac-bd*f$2}else if(euler.order===`XZY`){let ac=a$1*c$3,ad=a$1*d,bc=b$1*c$3,bd=b$1*d;te$1[0]=c$3*e$4,te$1[4]=-f$2,te$1[8]=d*e$4,te$1[1]=ac*f$2+bd,te$1[5]=a$1*e$4,te$1[9]=ad*f$2-bc,te$1[2]=bc*f$2-ad,te$1[6]=b$1*e$4,te$1[10]=bd*f$2+ac}return te$1[3]=0,te$1[7]=0,te$1[11]=0,te$1[12]=0,te$1[13]=0,te$1[14]=0,te$1[15]=1,this}makeRotationFromQuaternion(q){return this.compose(_zero,q,_one)}lookAt(eye,target$1,up){let te$1=this.elements;return _z.subVectors(eye,target$1),_z.lengthSq()===0&&(_z.z=1),_z.normalize(),_x.crossVectors(up,_z),_x.lengthSq()===0&&(Math.abs(up.z)===1?_z.x+=1e-4:_z.z+=1e-4,_z.normalize(),_x.crossVectors(up,_z)),_x.normalize(),_y.crossVectors(_z,_x),te$1[0]=_x.x,te$1[4]=_y.x,te$1[8]=_z.x,te$1[1]=_x.y,te$1[5]=_y.y,te$1[9]=_z.y,te$1[2]=_x.z,te$1[6]=_y.z,te$1[10]=_z.z,this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a$1,b$1){let ae=a$1.elements,be$1=b$1.elements,te$1=this.elements,a11=ae[0],a12=ae[4],a13=ae[8],a14=ae[12],a21=ae[1],a22=ae[5],a23=ae[9],a24=ae[13],a31=ae[2],a32=ae[6],a33=ae[10],a34=ae[14],a41=ae[3],a42=ae[7],a43=ae[11],a44=ae[15],b11=be$1[0],b12=be$1[4],b13=be$1[8],b14=be$1[12],b21=be$1[1],b22=be$1[5],b23=be$1[9],b24=be$1[13],b31=be$1[2],b32=be$1[6],b33=be$1[10],b34=be$1[14],b41=be$1[3],b42=be$1[7],b43=be$1[11],b44=be$1[15];return te$1[0]=a11*b11+a12*b21+a13*b31+a14*b41,te$1[4]=a11*b12+a12*b22+a13*b32+a14*b42,te$1[8]=a11*b13+a12*b23+a13*b33+a14*b43,te$1[12]=a11*b14+a12*b24+a13*b34+a14*b44,te$1[1]=a21*b11+a22*b21+a23*b31+a24*b41,te$1[5]=a21*b12+a22*b22+a23*b32+a24*b42,te$1[9]=a21*b13+a22*b23+a23*b33+a24*b43,te$1[13]=a21*b14+a22*b24+a23*b34+a24*b44,te$1[2]=a31*b11+a32*b21+a33*b31+a34*b41,te$1[6]=a31*b12+a32*b22+a33*b32+a34*b42,te$1[10]=a31*b13+a32*b23+a33*b33+a34*b43,te$1[14]=a31*b14+a32*b24+a33*b34+a34*b44,te$1[3]=a41*b11+a42*b21+a43*b31+a44*b41,te$1[7]=a41*b12+a42*b22+a43*b32+a44*b42,te$1[11]=a41*b13+a42*b23+a43*b33+a44*b43,te$1[15]=a41*b14+a42*b24+a43*b34+a44*b44,this}multiplyScalar(s){let te$1=this.elements;return te$1[0]*=s,te$1[4]*=s,te$1[8]*=s,te$1[12]*=s,te$1[1]*=s,te$1[5]*=s,te$1[9]*=s,te$1[13]*=s,te$1[2]*=s,te$1[6]*=s,te$1[10]*=s,te$1[14]*=s,te$1[3]*=s,te$1[7]*=s,te$1[11]*=s,te$1[15]*=s,this}determinant(){let te$1=this.elements,n11=te$1[0],n12=te$1[4],n13=te$1[8],n14=te$1[12],n21=te$1[1],n22=te$1[5],n23=te$1[9],n24=te$1[13],n31=te$1[2],n32=te$1[6],n33=te$1[10],n34=te$1[14],n41=te$1[3],n42=te$1[7],n43=te$1[11],n44=te$1[15];return n41*(+n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34)+n42*(+n11*n23*n34-n11*n24*n33+n14*n21*n33-n13*n21*n34+n13*n24*n31-n14*n23*n31)+n43*(+n11*n24*n32-n11*n22*n34-n14*n21*n32+n12*n21*n34+n14*n22*n31-n12*n24*n31)+n44*(-n13*n22*n31-n11*n23*n32+n11*n22*n33+n13*n21*n32-n12*n21*n33+n12*n23*n31)}transpose(){let te$1=this.elements,tmp$1;return tmp$1=te$1[1],te$1[1]=te$1[4],te$1[4]=tmp$1,tmp$1=te$1[2],te$1[2]=te$1[8],te$1[8]=tmp$1,tmp$1=te$1[6],te$1[6]=te$1[9],te$1[9]=tmp$1,tmp$1=te$1[3],te$1[3]=te$1[12],te$1[12]=tmp$1,tmp$1=te$1[7],te$1[7]=te$1[13],te$1[13]=tmp$1,tmp$1=te$1[11],te$1[11]=te$1[14],te$1[14]=tmp$1,this}setPosition(x$1,y,z$1){let te$1=this.elements;return x$1.isVector3?(te$1[12]=x$1.x,te$1[13]=x$1.y,te$1[14]=x$1.z):(te$1[12]=x$1,te$1[13]=y,te$1[14]=z$1),this}invert(){let te$1=this.elements,n11=te$1[0],n21=te$1[1],n31=te$1[2],n41=te$1[3],n12=te$1[4],n22=te$1[5],n32=te$1[6],n42=te$1[7],n13=te$1[8],n23=te$1[9],n33=te$1[10],n43=te$1[11],n14=te$1[12],n24=te$1[13],n34=te$1[14],n44=te$1[15],t11=n23*n34*n42-n24*n33*n42+n24*n32*n43-n22*n34*n43-n23*n32*n44+n22*n33*n44,t12=n14*n33*n42-n13*n34*n42-n14*n32*n43+n12*n34*n43+n13*n32*n44-n12*n33*n44,t13=n13*n24*n42-n14*n23*n42+n14*n22*n43-n12*n24*n43-n13*n22*n44+n12*n23*n44,t14=n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34,det=n11*t11+n21*t12+n31*t13+n41*t14;if(det===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let detInv=1/det;return te$1[0]=t11*detInv,te$1[1]=(n24*n33*n41-n23*n34*n41-n24*n31*n43+n21*n34*n43+n23*n31*n44-n21*n33*n44)*detInv,te$1[2]=(n22*n34*n41-n24*n32*n41+n24*n31*n42-n21*n34*n42-n22*n31*n44+n21*n32*n44)*detInv,te$1[3]=(n23*n32*n41-n22*n33*n41-n23*n31*n42+n21*n33*n42+n22*n31*n43-n21*n32*n43)*detInv,te$1[4]=t12*detInv,te$1[5]=(n13*n34*n41-n14*n33*n41+n14*n31*n43-n11*n34*n43-n13*n31*n44+n11*n33*n44)*detInv,te$1[6]=(n14*n32*n41-n12*n34*n41-n14*n31*n42+n11*n34*n42+n12*n31*n44-n11*n32*n44)*detInv,te$1[7]=(n12*n33*n41-n13*n32*n41+n13*n31*n42-n11*n33*n42-n12*n31*n43+n11*n32*n43)*detInv,te$1[8]=t13*detInv,te$1[9]=(n14*n23*n41-n13*n24*n41-n14*n21*n43+n11*n24*n43+n13*n21*n44-n11*n23*n44)*detInv,te$1[10]=(n12*n24*n41-n14*n22*n41+n14*n21*n42-n11*n24*n42-n12*n21*n44+n11*n22*n44)*detInv,te$1[11]=(n13*n22*n41-n12*n23*n41-n13*n21*n42+n11*n23*n42+n12*n21*n43-n11*n22*n43)*detInv,te$1[12]=t14*detInv,te$1[13]=(n13*n24*n31-n14*n23*n31+n14*n21*n33-n11*n24*n33-n13*n21*n34+n11*n23*n34)*detInv,te$1[14]=(n14*n22*n31-n12*n24*n31-n14*n21*n32+n11*n24*n32+n12*n21*n34-n11*n22*n34)*detInv,te$1[15]=(n12*n23*n31-n13*n22*n31+n13*n21*n32-n11*n23*n32-n12*n21*n33+n11*n22*n33)*detInv,this}scale(v){let te$1=this.elements,x$1=v.x,y=v.y,z$1=v.z;return te$1[0]*=x$1,te$1[4]*=y,te$1[8]*=z$1,te$1[1]*=x$1,te$1[5]*=y,te$1[9]*=z$1,te$1[2]*=x$1,te$1[6]*=y,te$1[10]*=z$1,te$1[3]*=x$1,te$1[7]*=y,te$1[11]*=z$1,this}getMaxScaleOnAxis(){let te$1=this.elements,scaleXSq=te$1[0]*te$1[0]+te$1[1]*te$1[1]+te$1[2]*te$1[2],scaleYSq=te$1[4]*te$1[4]+te$1[5]*te$1[5]+te$1[6]*te$1[6],scaleZSq=te$1[8]*te$1[8]+te$1[9]*te$1[9]+te$1[10]*te$1[10];return Math.sqrt(Math.max(scaleXSq,scaleYSq,scaleZSq))}makeTranslation(x$1,y,z$1){return x$1.isVector3?this.set(1,0,0,x$1.x,0,1,0,x$1.y,0,0,1,x$1.z,0,0,0,1):this.set(1,0,0,x$1,0,1,0,y,0,0,1,z$1,0,0,0,1),this}makeRotationX(theta){let c$3=Math.cos(theta),s=Math.sin(theta);return this.set(1,0,0,0,0,c$3,-s,0,0,s,c$3,0,0,0,0,1),this}makeRotationY(theta){let c$3=Math.cos(theta),s=Math.sin(theta);return this.set(c$3,0,s,0,0,1,0,0,-s,0,c$3,0,0,0,0,1),this}makeRotationZ(theta){let c$3=Math.cos(theta),s=Math.sin(theta);return this.set(c$3,-s,0,0,s,c$3,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(axis,angle){let c$3=Math.cos(angle),s=Math.sin(angle),t$1=1-c$3,x$1=axis.x,y=axis.y,z$1=axis.z,tx=t$1*x$1,ty=t$1*y;return this.set(tx*x$1+c$3,tx*y-s*z$1,tx*z$1+s*y,0,tx*y+s*z$1,ty*y+c$3,ty*z$1-s*x$1,0,tx*z$1-s*y,ty*z$1+s*x$1,t$1*z$1*z$1+c$3,0,0,0,0,1),this}makeScale(x$1,y,z$1){return this.set(x$1,0,0,0,0,y,0,0,0,0,z$1,0,0,0,0,1),this}makeShear(xy,xz,yx,yz,zx,zy){return this.set(1,yx,zx,0,xy,1,zy,0,xz,yz,1,0,0,0,0,1),this}compose(position$2,quaternion,scale$1){let te$1=this.elements,x$1=quaternion._x,y=quaternion._y,z$1=quaternion._z,w=quaternion._w,x2=x$1+x$1,y2=y+y,z2=z$1+z$1,xx=x$1*x2,xy=x$1*y2,xz=x$1*z2,yy=y*y2,yz=y*z2,zz=z$1*z2,wx=w*x2,wy=w*y2,wz=w*z2,sx=scale$1.x,sy=scale$1.y,sz=scale$1.z;return te$1[0]=(1-(yy+zz))*sx,te$1[1]=(xy+wz)*sx,te$1[2]=(xz-wy)*sx,te$1[3]=0,te$1[4]=(xy-wz)*sy,te$1[5]=(1-(xx+zz))*sy,te$1[6]=(yz+wx)*sy,te$1[7]=0,te$1[8]=(xz+wy)*sz,te$1[9]=(yz-wx)*sz,te$1[10]=(1-(xx+yy))*sz,te$1[11]=0,te$1[12]=position$2.x,te$1[13]=position$2.y,te$1[14]=position$2.z,te$1[15]=1,this}decompose(position$2,quaternion,scale$1){let te$1=this.elements,sx=_v1$5.set(te$1[0],te$1[1],te$1[2]).length(),sy=_v1$5.set(te$1[4],te$1[5],te$1[6]).length(),sz=_v1$5.set(te$1[8],te$1[9],te$1[10]).length(),det=this.determinant();det<0&&(sx=-sx),position$2.x=te$1[12],position$2.y=te$1[13],position$2.z=te$1[14],_m1$2.copy(this);let invSX=1/sx,invSY=1/sy,invSZ=1/sz;return _m1$2.elements[0]*=invSX,_m1$2.elements[1]*=invSX,_m1$2.elements[2]*=invSX,_m1$2.elements[4]*=invSY,_m1$2.elements[5]*=invSY,_m1$2.elements[6]*=invSY,_m1$2.elements[8]*=invSZ,_m1$2.elements[9]*=invSZ,_m1$2.elements[10]*=invSZ,quaternion.setFromRotationMatrix(_m1$2),scale$1.x=sx,scale$1.y=sy,scale$1.z=sz,this}makePerspective(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=!1){let te$1=this.elements,x$1=2*near/(right-left),y=2*near/(top-bottom),a$1=(right+left)/(right-left),b$1=(top+bottom)/(top-bottom),c$3,d;if(reversedDepth)c$3=near/(far-near),d=far*near/(far-near);else if(coordinateSystem===WebGLCoordinateSystem)c$3=-(far+near)/(far-near),d=-2*far*near/(far-near);else if(coordinateSystem===WebGPUCoordinateSystem)c$3=-far/(far-near),d=-far*near/(far-near);else throw Error(`THREE.Matrix4.makePerspective(): Invalid coordinate system: `+coordinateSystem);return te$1[0]=x$1,te$1[4]=0,te$1[8]=a$1,te$1[12]=0,te$1[1]=0,te$1[5]=y,te$1[9]=b$1,te$1[13]=0,te$1[2]=0,te$1[6]=0,te$1[10]=c$3,te$1[14]=d,te$1[3]=0,te$1[7]=0,te$1[11]=-1,te$1[15]=0,this}makeOrthographic(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem,reversedDepth=!1){let te$1=this.elements,x$1=2/(right-left),y=2/(top-bottom),a$1=-(right+left)/(right-left),b$1=-(top+bottom)/(top-bottom),c$3,d;if(reversedDepth)c$3=1/(far-near),d=far/(far-near);else if(coordinateSystem===WebGLCoordinateSystem)c$3=-2/(far-near),d=-(far+near)/(far-near);else if(coordinateSystem===WebGPUCoordinateSystem)c$3=-1/(far-near),d=-near/(far-near);else throw Error(`THREE.Matrix4.makeOrthographic(): Invalid coordinate system: `+coordinateSystem);return te$1[0]=x$1,te$1[4]=0,te$1[8]=0,te$1[12]=a$1,te$1[1]=0,te$1[5]=y,te$1[9]=0,te$1[13]=b$1,te$1[2]=0,te$1[6]=0,te$1[10]=c$3,te$1[14]=d,te$1[3]=0,te$1[7]=0,te$1[11]=0,te$1[15]=1,this}equals(matrix){let te$1=this.elements,me=matrix.elements;for(let i=0;i<16;i++)if(te$1[i]!==me[i])return!1;return!0}fromArray(array$1,offset$2=0){for(let i=0;i<16;i++)this.elements[i]=array$1[i+offset$2];return this}toArray(array$1=[],offset$2=0){let te$1=this.elements;return array$1[offset$2]=te$1[0],array$1[offset$2+1]=te$1[1],array$1[offset$2+2]=te$1[2],array$1[offset$2+3]=te$1[3],array$1[offset$2+4]=te$1[4],array$1[offset$2+5]=te$1[5],array$1[offset$2+6]=te$1[6],array$1[offset$2+7]=te$1[7],array$1[offset$2+8]=te$1[8],array$1[offset$2+9]=te$1[9],array$1[offset$2+10]=te$1[10],array$1[offset$2+11]=te$1[11],array$1[offset$2+12]=te$1[12],array$1[offset$2+13]=te$1[13],array$1[offset$2+14]=te$1[14],array$1[offset$2+15]=te$1[15],array$1}};const _v1$5=new Vector3,_m1$2=new Matrix4,_zero=new Vector3(0,0,0),_one=new Vector3(1,1,1),_x=new Vector3,_y=new Vector3,_z=new Vector3,_matrix$2=new Matrix4,_quaternion$3=new Quaternion;var Euler=class Euler{constructor(x$1=0,y=0,z$1=0,order$3=Euler.DEFAULT_ORDER){this.isEuler=!0,this._x=x$1,this._y=y,this._z=z$1,this._order=order$3}get x(){return this._x}set x(value$1){this._x=value$1,this._onChangeCallback()}get y(){return this._y}set y(value$1){this._y=value$1,this._onChangeCallback()}get z(){return this._z}set z(value$1){this._z=value$1,this._onChangeCallback()}get order(){return this._order}set order(value$1){this._order=value$1,this._onChangeCallback()}set(x$1,y,z$1,order$3=this._order){return this._x=x$1,this._y=y,this._z=z$1,this._order=order$3,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(euler){return this._x=euler._x,this._y=euler._y,this._z=euler._z,this._order=euler._order,this._onChangeCallback(),this}setFromRotationMatrix(m,order$3=this._order,update=!0){let te$1=m.elements,m11=te$1[0],m12=te$1[4],m13=te$1[8],m21=te$1[1],m22=te$1[5],m23=te$1[9],m31=te$1[2],m32=te$1[6],m33=te$1[10];switch(order$3){case`XYZ`:this._y=Math.asin(clamp$7(m13,-1,1)),Math.abs(m13)<.9999999?(this._x=Math.atan2(-m23,m33),this._z=Math.atan2(-m12,m11)):(this._x=Math.atan2(m32,m22),this._z=0);break;case`YXZ`:this._x=Math.asin(-clamp$7(m23,-1,1)),Math.abs(m23)<.9999999?(this._y=Math.atan2(m13,m33),this._z=Math.atan2(m21,m22)):(this._y=Math.atan2(-m31,m11),this._z=0);break;case`ZXY`:this._x=Math.asin(clamp$7(m32,-1,1)),Math.abs(m32)<.9999999?(this._y=Math.atan2(-m31,m33),this._z=Math.atan2(-m12,m22)):(this._y=0,this._z=Math.atan2(m21,m11));break;case`ZYX`:this._y=Math.asin(-clamp$7(m31,-1,1)),Math.abs(m31)<.9999999?(this._x=Math.atan2(m32,m33),this._z=Math.atan2(m21,m11)):(this._x=0,this._z=Math.atan2(-m12,m22));break;case`YZX`:this._z=Math.asin(clamp$7(m21,-1,1)),Math.abs(m21)<.9999999?(this._x=Math.atan2(-m23,m22),this._y=Math.atan2(-m31,m11)):(this._x=0,this._y=Math.atan2(m13,m33));break;case`XZY`:this._z=Math.asin(-clamp$7(m12,-1,1)),Math.abs(m12)<.9999999?(this._x=Math.atan2(m32,m22),this._y=Math.atan2(m13,m11)):(this._x=Math.atan2(-m23,m33),this._y=0);break;default:console.warn(`THREE.Euler: .setFromRotationMatrix() encountered an unknown order: `+order$3)}return this._order=order$3,update===!0&&this._onChangeCallback(),this}setFromQuaternion(q,order$3,update){return _matrix$2.makeRotationFromQuaternion(q),this.setFromRotationMatrix(_matrix$2,order$3,update)}setFromVector3(v,order$3=this._order){return this.set(v.x,v.y,v.z,order$3)}reorder(newOrder){return _quaternion$3.setFromEuler(this),this.setFromQuaternion(_quaternion$3,newOrder)}equals(euler){return euler._x===this._x&&euler._y===this._y&&euler._z===this._z&&euler._order===this._order}fromArray(array$1){return this._x=array$1[0],this._y=array$1[1],this._z=array$1[2],array$1[3]!==void 0&&(this._order=array$1[3]),this._onChangeCallback(),this}toArray(array$1=[],offset$2=0){return array$1[offset$2]=this._x,array$1[offset$2+1]=this._y,array$1[offset$2+2]=this._z,array$1[offset$2+3]=this._order,array$1}_onChange(callback){return this._onChangeCallback=callback,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};Euler.DEFAULT_ORDER=`XYZ`;var Layers=class{constructor(){this.mask=1}set(layer){this.mask=(1<>>0}enable(layer){this.mask|=1<1){for(let i=0;i1){for(let i=0;i0&&(object$1.userData=this.userData),object$1.layers=this.layers.mask,object$1.matrix=this.matrix.toArray(),object$1.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(object$1.matrixAutoUpdate=!1),this.isInstancedMesh&&(object$1.type=`InstancedMesh`,object$1.count=this.count,object$1.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(object$1.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(object$1.type=`BatchedMesh`,object$1.perObjectFrustumCulled=this.perObjectFrustumCulled,object$1.sortObjects=this.sortObjects,object$1.drawRanges=this._drawRanges,object$1.reservedRanges=this._reservedRanges,object$1.geometryInfo=this._geometryInfo.map(info=>({...info,boundingBox:info.boundingBox?info.boundingBox.toJSON():void 0,boundingSphere:info.boundingSphere?info.boundingSphere.toJSON():void 0})),object$1.instanceInfo=this._instanceInfo.map(info=>({...info})),object$1.availableInstanceIds=this._availableInstanceIds.slice(),object$1.availableGeometryIds=this._availableGeometryIds.slice(),object$1.nextIndexStart=this._nextIndexStart,object$1.nextVertexStart=this._nextVertexStart,object$1.geometryCount=this._geometryCount,object$1.maxInstanceCount=this._maxInstanceCount,object$1.maxVertexCount=this._maxVertexCount,object$1.maxIndexCount=this._maxIndexCount,object$1.geometryInitialized=this._geometryInitialized,object$1.matricesTexture=this._matricesTexture.toJSON(meta),object$1.indirectTexture=this._indirectTexture.toJSON(meta),this._colorsTexture!==null&&(object$1.colorsTexture=this._colorsTexture.toJSON(meta)),this.boundingSphere!==null&&(object$1.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(object$1.boundingBox=this.boundingBox.toJSON()));function serialize$2(library,element$3){return library[element$3.uuid]===void 0&&(library[element$3.uuid]=element$3.toJSON(meta)),element$3.uuid}if(this.isScene)this.background&&(this.background.isColor?object$1.background=this.background.toJSON():this.background.isTexture&&(object$1.background=this.background.toJSON(meta).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(object$1.environment=this.environment.toJSON(meta).uuid);else if(this.isMesh||this.isLine||this.isPoints){object$1.geometry=serialize$2(meta.geometries,this.geometry);let parameters=this.geometry.parameters;if(parameters!==void 0&¶meters.shapes!==void 0){let shapes=parameters.shapes;if(Array.isArray(shapes))for(let i=0,l=shapes.length;i0){object$1.children=[];for(let i=0;i0){object$1.animations=[];for(let i=0;i0&&(output.geometries=geometries),materials.length>0&&(output.materials=materials),textures.length>0&&(output.textures=textures),images.length>0&&(output.images=images),shapes.length>0&&(output.shapes=shapes),skeletons.length>0&&(output.skeletons=skeletons),animations$1.length>0&&(output.animations=animations$1),nodes.length>0&&(output.nodes=nodes)}return output.object=object$1,output;function extractFromCache(cache$1){let values=[];for(let key$2 in cache$1){let data$12=cache$1[key$2];delete data$12.metadata,values.push(data$12)}return values}}clone(recursive){return new this.constructor().copy(this,recursive)}copy(source,recursive=!0){if(this.name=source.name,this.up.copy(source.up),this.position.copy(source.position),this.rotation.order=source.rotation.order,this.quaternion.copy(source.quaternion),this.scale.copy(source.scale),this.matrix.copy(source.matrix),this.matrixWorld.copy(source.matrixWorld),this.matrixAutoUpdate=source.matrixAutoUpdate,this.matrixWorldAutoUpdate=source.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=source.matrixWorldNeedsUpdate,this.layers.mask=source.layers.mask,this.visible=source.visible,this.castShadow=source.castShadow,this.receiveShadow=source.receiveShadow,this.frustumCulled=source.frustumCulled,this.renderOrder=source.renderOrder,this.animations=source.animations.slice(),this.userData=JSON.parse(JSON.stringify(source.userData)),recursive===!0)for(let i=0;i0?target$1.multiplyScalar(1/Math.sqrt(targetLengthSq)):target$1.set(0,0,0)}static getBarycoord(point$3,a$1,b$1,c$3,target$1){_v0$1.subVectors(c$3,a$1),_v1$3.subVectors(b$1,a$1),_v2$2.subVectors(point$3,a$1);let dot00=_v0$1.dot(_v0$1),dot01=_v0$1.dot(_v1$3),dot02=_v0$1.dot(_v2$2),dot11=_v1$3.dot(_v1$3),dot12=_v1$3.dot(_v2$2),denom=dot00*dot11-dot01*dot01;if(denom===0)return target$1.set(0,0,0),null;let invDenom=1/denom,u=(dot11*dot02-dot01*dot12)*invDenom,v=(dot00*dot12-dot01*dot02)*invDenom;return target$1.set(1-u-v,v,u)}static containsPoint(point$3,a$1,b$1,c$3){return this.getBarycoord(point$3,a$1,b$1,c$3,_v3$2)===null?!1:_v3$2.x>=0&&_v3$2.y>=0&&_v3$2.x+_v3$2.y<=1}static getInterpolation(point$3,p1,p2,p3$1,v1,v2,v3,target$1){return this.getBarycoord(point$3,p1,p2,p3$1,_v3$2)===null?(target$1.x=0,target$1.y=0,`z`in target$1&&(target$1.z=0),`w`in target$1&&(target$1.w=0),null):(target$1.setScalar(0),target$1.addScaledVector(v1,_v3$2.x),target$1.addScaledVector(v2,_v3$2.y),target$1.addScaledVector(v3,_v3$2.z),target$1)}static getInterpolatedAttribute(attr,i1,i2,i3,barycoord,target$1){return _v40.setScalar(0),_v41.setScalar(0),_v42.setScalar(0),_v40.fromBufferAttribute(attr,i1),_v41.fromBufferAttribute(attr,i2),_v42.fromBufferAttribute(attr,i3),target$1.setScalar(0),target$1.addScaledVector(_v40,barycoord.x),target$1.addScaledVector(_v41,barycoord.y),target$1.addScaledVector(_v42,barycoord.z),target$1}static isFrontFacing(a$1,b$1,c$3,direction){return _v0$1.subVectors(c$3,b$1),_v1$3.subVectors(a$1,b$1),_v0$1.cross(_v1$3).dot(direction)<0}set(a$1,b$1,c$3){return this.a.copy(a$1),this.b.copy(b$1),this.c.copy(c$3),this}setFromPointsAndIndices(points,i0,i1,i2){return this.a.copy(points[i0]),this.b.copy(points[i1]),this.c.copy(points[i2]),this}setFromAttributeAndIndices(attribute,i0,i1,i2){return this.a.fromBufferAttribute(attribute,i0),this.b.fromBufferAttribute(attribute,i1),this.c.fromBufferAttribute(attribute,i2),this}clone(){return new this.constructor().copy(this)}copy(triangle){return this.a.copy(triangle.a),this.b.copy(triangle.b),this.c.copy(triangle.c),this}getArea(){return _v0$1.subVectors(this.c,this.b),_v1$3.subVectors(this.a,this.b),_v0$1.cross(_v1$3).length()*.5}getMidpoint(target$1){return target$1.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(target$1){return Triangle.getNormal(this.a,this.b,this.c,target$1)}getPlane(target$1){return target$1.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(point$3,target$1){return Triangle.getBarycoord(point$3,this.a,this.b,this.c,target$1)}getInterpolation(point$3,v1,v2,v3,target$1){return Triangle.getInterpolation(point$3,this.a,this.b,this.c,v1,v2,v3,target$1)}containsPoint(point$3){return Triangle.containsPoint(point$3,this.a,this.b,this.c)}isFrontFacing(direction){return Triangle.isFrontFacing(this.a,this.b,this.c,direction)}intersectsBox(box){return box.intersectsTriangle(this)}closestPointToPoint(p$4,target$1){let a$1=this.a,b$1=this.b,c$3=this.c,v,w;_vab.subVectors(b$1,a$1),_vac.subVectors(c$3,a$1),_vap.subVectors(p$4,a$1);let d1=_vab.dot(_vap),d2=_vac.dot(_vap);if(d1<=0&&d2<=0)return target$1.copy(a$1);_vbp.subVectors(p$4,b$1);let d3=_vab.dot(_vbp),d4=_vac.dot(_vbp);if(d3>=0&&d4<=d3)return target$1.copy(b$1);let vc=d1*d4-d3*d2;if(vc<=0&&d1>=0&&d3<=0)return v=d1/(d1-d3),target$1.copy(a$1).addScaledVector(_vab,v);_vcp.subVectors(p$4,c$3);let d5=_vab.dot(_vcp),d6=_vac.dot(_vcp);if(d6>=0&&d5<=d6)return target$1.copy(c$3);let vb=d5*d2-d1*d6;if(vb<=0&&d2>=0&&d6<=0)return w=d2/(d2-d6),target$1.copy(a$1).addScaledVector(_vac,w);let va=d3*d6-d5*d4;if(va<=0&&d4-d3>=0&&d5-d6>=0)return _vbc.subVectors(c$3,b$1),w=(d4-d3)/(d4-d3+(d5-d6)),target$1.copy(b$1).addScaledVector(_vbc,w);let denom=1/(va+vb+vc);return v=vb*denom,w=vc*denom,target$1.copy(a$1).addScaledVector(_vab,v).addScaledVector(_vac,w)}equals(triangle){return triangle.a.equals(this.a)&&triangle.b.equals(this.b)&&triangle.c.equals(this.c)}};const _colorKeywords={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},_hslA={h:0,s:0,l:0},_hslB={h:0,s:0,l:0};function hue2rgb$1(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)*6*(2/3-t$1):p$4}var Color=class{constructor(r$1,g,b$1){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(r$1,g,b$1)}set(r$1,g,b$1){if(g===void 0&&b$1===void 0){let value$1=r$1;value$1&&value$1.isColor?this.copy(value$1):typeof value$1==`number`?this.setHex(value$1):typeof value$1==`string`&&this.setStyle(value$1)}else this.setRGB(r$1,g,b$1);return this}setScalar(scalar){return this.r=scalar,this.g=scalar,this.b=scalar,this}setHex(hex$2,colorSpace=SRGBColorSpace){return hex$2=Math.floor(hex$2),this.r=(hex$2>>16&255)/255,this.g=(hex$2>>8&255)/255,this.b=(hex$2&255)/255,ColorManagement.colorSpaceToWorking(this,colorSpace),this}setRGB(r$1,g,b$1,colorSpace=ColorManagement.workingColorSpace){return this.r=r$1,this.g=g,this.b=b$1,ColorManagement.colorSpaceToWorking(this,colorSpace),this}setHSL(h$1,s,l,colorSpace=ColorManagement.workingColorSpace){if(h$1=euclideanModulo(h$1,1),s=clamp$7(s,0,1),l=clamp$7(l,0,1),s===0)this.r=this.g=this.b=l;else{let p$4=l<=.5?l*(1+s):l+s-l*s,q=2*l-p$4;this.r=hue2rgb$1(q,p$4,h$1+1/3),this.g=hue2rgb$1(q,p$4,h$1),this.b=hue2rgb$1(q,p$4,h$1-1/3)}return ColorManagement.colorSpaceToWorking(this,colorSpace),this}setStyle(style,colorSpace=SRGBColorSpace){function handleAlpha(string$4){string$4!==void 0&&parseFloat(string$4)<1&&console.warn(`THREE.Color: Alpha component of `+style+` will be ignored.`)}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(style)){let color$2,name$2=m[1],components=m[2];switch(name$2){case`rgb`:case`rgba`:if(color$2=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components))return handleAlpha(color$2[4]),this.setRGB(Math.min(255,parseInt(color$2[1],10))/255,Math.min(255,parseInt(color$2[2],10))/255,Math.min(255,parseInt(color$2[3],10))/255,colorSpace);if(color$2=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components))return handleAlpha(color$2[4]),this.setRGB(Math.min(100,parseInt(color$2[1],10))/100,Math.min(100,parseInt(color$2[2],10))/100,Math.min(100,parseInt(color$2[3],10))/100,colorSpace);break;case`hsl`:case`hsla`:if(color$2=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components))return handleAlpha(color$2[4]),this.setHSL(parseFloat(color$2[1])/360,parseFloat(color$2[2])/100,parseFloat(color$2[3])/100,colorSpace);break;default:console.warn(`THREE.Color: Unknown color model `+style)}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(style)){let hex$2=m[1],size$2=hex$2.length;if(size$2===3)return this.setRGB(parseInt(hex$2.charAt(0),16)/15,parseInt(hex$2.charAt(1),16)/15,parseInt(hex$2.charAt(2),16)/15,colorSpace);if(size$2===6)return this.setHex(parseInt(hex$2,16),colorSpace);console.warn(`THREE.Color: Invalid hex color `+style)}else if(style&&style.length>0)return this.setColorName(style,colorSpace);return this}setColorName(style,colorSpace=SRGBColorSpace){let hex$2=_colorKeywords[style.toLowerCase()];return hex$2===void 0?console.warn(`THREE.Color: Unknown color `+style):this.setHex(hex$2,colorSpace),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(color$2){return this.r=color$2.r,this.g=color$2.g,this.b=color$2.b,this}copySRGBToLinear(color$2){return this.r=SRGBToLinear(color$2.r),this.g=SRGBToLinear(color$2.g),this.b=SRGBToLinear(color$2.b),this}copyLinearToSRGB(color$2){return this.r=LinearToSRGB(color$2.r),this.g=LinearToSRGB(color$2.g),this.b=LinearToSRGB(color$2.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(colorSpace=SRGBColorSpace){return ColorManagement.workingToColorSpace(_color$2.copy(this),colorSpace),Math.round(clamp$7(_color$2.r*255,0,255))*65536+Math.round(clamp$7(_color$2.g*255,0,255))*256+Math.round(clamp$7(_color$2.b*255,0,255))}getHexString(colorSpace=SRGBColorSpace){return(`000000`+this.getHex(colorSpace).toString(16)).slice(-6)}getHSL(target$1,colorSpace=ColorManagement.workingColorSpace){ColorManagement.workingToColorSpace(_color$2.copy(this),colorSpace);let r$1=_color$2.r,g=_color$2.g,b$1=_color$2.b,max$1=Math.max(r$1,g,b$1),min$1=Math.min(r$1,g,b$1),hue$2,saturation,lightness=(min$1+max$1)/2;if(min$1===max$1)hue$2=0,saturation=0;else{let delta=max$1-min$1;switch(saturation=lightness<=.5?delta/(max$1+min$1):delta/(2-max$1-min$1),max$1){case r$1:hue$2=(g-b$1)/delta+(g0!=value$1>0&&this.version++,this._alphaTest=value$1}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(values){if(values!==void 0)for(let key$2 in values){let newValue=values[key$2];if(newValue===void 0){console.warn(`THREE.Material: parameter '${key$2}' has value of undefined.`);continue}let currentValue=this[key$2];if(currentValue===void 0){console.warn(`THREE.Material: '${key$2}' is not a property of THREE.${this.type}.`);continue}currentValue&¤tValue.isColor?currentValue.set(newValue):currentValue&¤tValue.isVector3&&newValue&&newValue.isVector3?currentValue.copy(newValue):this[key$2]=newValue}}toJSON(meta){let isRootObject=meta===void 0||typeof meta==`string`;isRootObject&&(meta={textures:{},images:{}});let data$12={metadata:{version:4.7,type:`Material`,generator:`Material.toJSON`}};data$12.uuid=this.uuid,data$12.type=this.type,this.name!==``&&(data$12.name=this.name),this.color&&this.color.isColor&&(data$12.color=this.color.getHex()),this.roughness!==void 0&&(data$12.roughness=this.roughness),this.metalness!==void 0&&(data$12.metalness=this.metalness),this.sheen!==void 0&&(data$12.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(data$12.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(data$12.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(data$12.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(data$12.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(data$12.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(data$12.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(data$12.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(data$12.shininess=this.shininess),this.clearcoat!==void 0&&(data$12.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(data$12.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(data$12.clearcoatMap=this.clearcoatMap.toJSON(meta).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(data$12.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(meta).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(data$12.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(meta).uuid,data$12.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(data$12.dispersion=this.dispersion),this.iridescence!==void 0&&(data$12.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(data$12.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(data$12.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(data$12.iridescenceMap=this.iridescenceMap.toJSON(meta).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(data$12.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(meta).uuid),this.anisotropy!==void 0&&(data$12.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(data$12.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(data$12.anisotropyMap=this.anisotropyMap.toJSON(meta).uuid),this.map&&this.map.isTexture&&(data$12.map=this.map.toJSON(meta).uuid),this.matcap&&this.matcap.isTexture&&(data$12.matcap=this.matcap.toJSON(meta).uuid),this.alphaMap&&this.alphaMap.isTexture&&(data$12.alphaMap=this.alphaMap.toJSON(meta).uuid),this.lightMap&&this.lightMap.isTexture&&(data$12.lightMap=this.lightMap.toJSON(meta).uuid,data$12.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(data$12.aoMap=this.aoMap.toJSON(meta).uuid,data$12.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(data$12.bumpMap=this.bumpMap.toJSON(meta).uuid,data$12.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(data$12.normalMap=this.normalMap.toJSON(meta).uuid,data$12.normalMapType=this.normalMapType,data$12.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(data$12.displacementMap=this.displacementMap.toJSON(meta).uuid,data$12.displacementScale=this.displacementScale,data$12.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(data$12.roughnessMap=this.roughnessMap.toJSON(meta).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(data$12.metalnessMap=this.metalnessMap.toJSON(meta).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(data$12.emissiveMap=this.emissiveMap.toJSON(meta).uuid),this.specularMap&&this.specularMap.isTexture&&(data$12.specularMap=this.specularMap.toJSON(meta).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(data$12.specularIntensityMap=this.specularIntensityMap.toJSON(meta).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(data$12.specularColorMap=this.specularColorMap.toJSON(meta).uuid),this.envMap&&this.envMap.isTexture&&(data$12.envMap=this.envMap.toJSON(meta).uuid,this.combine!==void 0&&(data$12.combine=this.combine)),this.envMapRotation!==void 0&&(data$12.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(data$12.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(data$12.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(data$12.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(data$12.gradientMap=this.gradientMap.toJSON(meta).uuid),this.transmission!==void 0&&(data$12.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(data$12.transmissionMap=this.transmissionMap.toJSON(meta).uuid),this.thickness!==void 0&&(data$12.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(data$12.thicknessMap=this.thicknessMap.toJSON(meta).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(data$12.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(data$12.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(data$12.size=this.size),this.shadowSide!==null&&(data$12.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(data$12.sizeAttenuation=this.sizeAttenuation),this.blending!==NormalBlending&&(data$12.blending=this.blending),this.side!==FrontSide&&(data$12.side=this.side),this.vertexColors===!0&&(data$12.vertexColors=!0),this.opacity<1&&(data$12.opacity=this.opacity),this.transparent===!0&&(data$12.transparent=!0),this.blendSrc!==SrcAlphaFactor&&(data$12.blendSrc=this.blendSrc),this.blendDst!==OneMinusSrcAlphaFactor&&(data$12.blendDst=this.blendDst),this.blendEquation!==AddEquation&&(data$12.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(data$12.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(data$12.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(data$12.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(data$12.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(data$12.blendAlpha=this.blendAlpha),this.depthFunc!==LessEqualDepth&&(data$12.depthFunc=this.depthFunc),this.depthTest===!1&&(data$12.depthTest=this.depthTest),this.depthWrite===!1&&(data$12.depthWrite=this.depthWrite),this.colorWrite===!1&&(data$12.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(data$12.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==AlwaysStencilFunc&&(data$12.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(data$12.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(data$12.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==KeepStencilOp&&(data$12.stencilFail=this.stencilFail),this.stencilZFail!==KeepStencilOp&&(data$12.stencilZFail=this.stencilZFail),this.stencilZPass!==KeepStencilOp&&(data$12.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(data$12.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(data$12.rotation=this.rotation),this.polygonOffset===!0&&(data$12.polygonOffset=!0),this.polygonOffsetFactor!==0&&(data$12.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(data$12.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(data$12.linewidth=this.linewidth),this.dashSize!==void 0&&(data$12.dashSize=this.dashSize),this.gapSize!==void 0&&(data$12.gapSize=this.gapSize),this.scale!==void 0&&(data$12.scale=this.scale),this.dithering===!0&&(data$12.dithering=!0),this.alphaTest>0&&(data$12.alphaTest=this.alphaTest),this.alphaHash===!0&&(data$12.alphaHash=!0),this.alphaToCoverage===!0&&(data$12.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(data$12.premultipliedAlpha=!0),this.forceSinglePass===!0&&(data$12.forceSinglePass=!0),this.wireframe===!0&&(data$12.wireframe=!0),this.wireframeLinewidth>1&&(data$12.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==`round`&&(data$12.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==`round`&&(data$12.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(data$12.flatShading=!0),this.visible===!1&&(data$12.visible=!1),this.toneMapped===!1&&(data$12.toneMapped=!1),this.fog===!1&&(data$12.fog=!1),Object.keys(this.userData).length>0&&(data$12.userData=this.userData);function extractFromCache(cache$1){let values=[];for(let key$2 in cache$1){let data$13=cache$1[key$2];delete data$13.metadata,values.push(data$13)}return values}if(isRootObject){let textures=extractFromCache(meta.textures),images=extractFromCache(meta.images);textures.length>0&&(data$12.textures=textures),images.length>0&&(data$12.images=images)}return data$12}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name,this.blending=source.blending,this.side=source.side,this.vertexColors=source.vertexColors,this.opacity=source.opacity,this.transparent=source.transparent,this.blendSrc=source.blendSrc,this.blendDst=source.blendDst,this.blendEquation=source.blendEquation,this.blendSrcAlpha=source.blendSrcAlpha,this.blendDstAlpha=source.blendDstAlpha,this.blendEquationAlpha=source.blendEquationAlpha,this.blendColor.copy(source.blendColor),this.blendAlpha=source.blendAlpha,this.depthFunc=source.depthFunc,this.depthTest=source.depthTest,this.depthWrite=source.depthWrite,this.stencilWriteMask=source.stencilWriteMask,this.stencilFunc=source.stencilFunc,this.stencilRef=source.stencilRef,this.stencilFuncMask=source.stencilFuncMask,this.stencilFail=source.stencilFail,this.stencilZFail=source.stencilZFail,this.stencilZPass=source.stencilZPass,this.stencilWrite=source.stencilWrite;let srcPlanes=source.clippingPlanes,dstPlanes=null;if(srcPlanes!==null){let n=srcPlanes.length;dstPlanes=Array(n);for(let i=0;i!==n;++i)dstPlanes[i]=srcPlanes[i].clone()}return this.clippingPlanes=dstPlanes,this.clipIntersection=source.clipIntersection,this.clipShadows=source.clipShadows,this.shadowSide=source.shadowSide,this.colorWrite=source.colorWrite,this.precision=source.precision,this.polygonOffset=source.polygonOffset,this.polygonOffsetFactor=source.polygonOffsetFactor,this.polygonOffsetUnits=source.polygonOffsetUnits,this.dithering=source.dithering,this.alphaTest=source.alphaTest,this.alphaHash=source.alphaHash,this.alphaToCoverage=source.alphaToCoverage,this.premultipliedAlpha=source.premultipliedAlpha,this.forceSinglePass=source.forceSinglePass,this.visible=source.visible,this.toneMapped=source.toneMapped,this.userData=JSON.parse(JSON.stringify(source.userData)),this}dispose(){this.dispatchEvent({type:`dispose`})}set needsUpdate(value$1){value$1===!0&&this.version++}},MeshBasicMaterial=class extends Material{constructor(parameters){super(),this.isMeshBasicMaterial=!0,this.type=`MeshBasicMaterial`,this.color=new Color(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.color.copy(source.color),this.map=source.map,this.lightMap=source.lightMap,this.lightMapIntensity=source.lightMapIntensity,this.aoMap=source.aoMap,this.aoMapIntensity=source.aoMapIntensity,this.specularMap=source.specularMap,this.alphaMap=source.alphaMap,this.envMap=source.envMap,this.envMapRotation.copy(source.envMapRotation),this.combine=source.combine,this.reflectivity=source.reflectivity,this.refractionRatio=source.refractionRatio,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.wireframeLinecap=source.wireframeLinecap,this.wireframeLinejoin=source.wireframeLinejoin,this.fog=source.fog,this}};const _tables=_generateTables();function _generateTables(){let buffer$1=new ArrayBuffer(4),floatView=new Float32Array(buffer$1),uint32View=new Uint32Array(buffer$1),baseTable=new Uint32Array(512),shiftTable=new Uint32Array(512);for(let i=0;i<256;++i){let e$4=i-127;e$4<-27?(baseTable[i]=0,baseTable[i|256]=32768,shiftTable[i]=24,shiftTable[i|256]=24):e$4<-14?(baseTable[i]=1024>>-e$4-14,baseTable[i|256]=1024>>-e$4-14|32768,shiftTable[i]=-e$4-1,shiftTable[i|256]=-e$4-1):e$4<=15?(baseTable[i]=e$4+15<<10,baseTable[i|256]=e$4+15<<10|32768,shiftTable[i]=13,shiftTable[i|256]=13):e$4<128?(baseTable[i]=31744,baseTable[i|256]=64512,shiftTable[i]=24,shiftTable[i|256]=24):(baseTable[i]=31744,baseTable[i|256]=64512,shiftTable[i]=13,shiftTable[i|256]=13)}let mantissaTable=new Uint32Array(2048),exponentTable=new Uint32Array(64),offsetTable=new Uint32Array(64);for(let i=1;i<1024;++i){let m=i<<13,e$4=0;for(;!(m&8388608);)m<<=1,e$4-=8388608;m&=-8388609,e$4+=947912704,mantissaTable[i]=m|e$4}for(let i=1024;i<2048;++i)mantissaTable[i]=939524096+(i-1024<<13);for(let i=1;i<31;++i)exponentTable[i]=i<<23;exponentTable[31]=1199570944,exponentTable[32]=2147483648;for(let i=33;i<63;++i)exponentTable[i]=2147483648+(i-32<<23);exponentTable[63]=3347054592;for(let i=1;i<64;++i)i!==32&&(offsetTable[i]=1024);return{floatView,uint32View,baseTable,shiftTable,mantissaTable,exponentTable,offsetTable}}function toHalfFloat(val){Math.abs(val)>65504&&console.warn(`THREE.DataUtils.toHalfFloat(): Value out of range.`),val=clamp$7(val,-65504,65504),_tables.floatView[0]=val;let f$2=_tables.uint32View[0],e$4=f$2>>23&511;return _tables.baseTable[e$4]+((f$2&8388607)>>_tables.shiftTable[e$4])}function fromHalfFloat(val){let m=val>>10;return _tables.uint32View[0]=_tables.mantissaTable[_tables.offsetTable[m]+(val&1023)]+_tables.exponentTable[m],_tables.floatView[0]}var DataUtils=class{static toHalfFloat(val){return toHalfFloat(val)}static fromHalfFloat(val){return fromHalfFloat(val)}};const _vector$9=new Vector3,_vector2$1=new Vector2;let _id$2=0;var BufferAttribute=class{constructor(array$1,itemSize,normalized=!1){if(Array.isArray(array$1))throw TypeError(`THREE.BufferAttribute: array should be a Typed Array.`);this.isBufferAttribute=!0,Object.defineProperty(this,`id`,{value:_id$2++}),this.name=``,this.array=array$1,this.itemSize=itemSize,this.count=array$1===void 0?0:array$1.length/itemSize,this.normalized=normalized,this.usage=StaticDrawUsage,this.updateRanges=[],this.gpuType=FloatType,this.version=0}onUploadCallback(){}set needsUpdate(value$1){value$1===!0&&this.version++}setUsage(value$1){return this.usage=value$1,this}addUpdateRange(start,count$2){this.updateRanges.push({start,count:count$2})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){return this.name=source.name,this.array=new source.array.constructor(source.array),this.itemSize=source.itemSize,this.count=source.count,this.normalized=source.normalized,this.usage=source.usage,this.gpuType=source.gpuType,this}copyAt(index1,attribute,index2){index1*=this.itemSize,index2*=attribute.itemSize;for(let i=0,l=this.itemSize;ipositionAttribute.count&&console.warn(`THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.`),positionAttribute.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);let position$2=this.attributes.position,morphAttributesPosition=this.morphAttributes.position;if(position$2&&position$2.isGLBufferAttribute){console.error(`THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.`,this),this.boundingBox.set(new Vector3(-1/0,-1/0,-1/0),new Vector3(1/0,1/0,1/0));return}if(position$2!==void 0){if(this.boundingBox.setFromBufferAttribute(position$2),morphAttributesPosition)for(let i=0,il=morphAttributesPosition.length;i0&&(data$12.userData=this.userData),this.parameters!==void 0){let parameters=this.parameters;for(let key$2 in parameters)parameters[key$2]!==void 0&&(data$12[key$2]=parameters[key$2]);return data$12}data$12.data={attributes:{}};let index$1=this.index;index$1!==null&&(data$12.data.index={type:index$1.array.constructor.name,array:Array.prototype.slice.call(index$1.array)});let attributes=this.attributes;for(let key$2 in attributes){let attribute=attributes[key$2];data$12.data.attributes[key$2]=attribute.toJSON(data$12.data)}let morphAttributes={},hasMorphAttributes=!1;for(let key$2 in this.morphAttributes){let attributeArray=this.morphAttributes[key$2],array$1=[];for(let i=0,il=attributeArray.length;i0&&(morphAttributes[key$2]=array$1,hasMorphAttributes=!0)}hasMorphAttributes&&(data$12.data.morphAttributes=morphAttributes,data$12.data.morphTargetsRelative=this.morphTargetsRelative);let groups=this.groups;groups.length>0&&(data$12.data.groups=JSON.parse(JSON.stringify(groups)));let boundingSphere=this.boundingSphere;return boundingSphere!==null&&(data$12.data.boundingSphere=boundingSphere.toJSON()),data$12}clone(){return new this.constructor().copy(this)}copy(source){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let data$12={};this.name=source.name;let index$1=source.index;index$1!==null&&this.setIndex(index$1.clone());let attributes=source.attributes;for(let name$2 in attributes){let attribute=attributes[name$2];this.setAttribute(name$2,attribute.clone(data$12))}let morphAttributes=source.morphAttributes;for(let name$2 in morphAttributes){let array$1=[],morphAttribute=morphAttributes[name$2];for(let i=0,l=morphAttribute.length;i0){let morphAttribute=morphAttributes[keys$3[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m(raycaster.far-raycaster.near)**2))&&(_inverseMatrix$3.copy(matrixWorld).invert(),_ray$3.copy(raycaster.ray).applyMatrix4(_inverseMatrix$3),!(geometry.boundingBox!==null&&_ray$3.intersectsBox(geometry.boundingBox)===!1)&&this._computeIntersections(raycaster,intersects$1,_ray$3)))}_computeIntersections(raycaster,intersects$1,rayLocalSpace){let intersection$1,geometry=this.geometry,material=this.material,index$1=geometry.index,position$2=geometry.attributes.position,uv=geometry.attributes.uv,uv1=geometry.attributes.uv1,normal=geometry.attributes.normal,groups=geometry.groups,drawRange=geometry.drawRange;if(index$1!==null)if(Array.isArray(material))for(let i=0,il=groups.length;iraycaster.far?null:{distance,point:_intersectionPointWorld.clone(),object:object$1}}function checkGeometryIntersection(object$1,material,raycaster,ray,uv,uv1,normal,a$1,b$1,c$3){object$1.getVertexPosition(a$1,_vA$1),object$1.getVertexPosition(b$1,_vB$1),object$1.getVertexPosition(c$3,_vC$1);let intersection$1=checkIntersection$1(object$1,material,raycaster,ray,_vA$1,_vB$1,_vC$1,_intersectionPoint);if(intersection$1){let barycoord=new Vector3;Triangle.getBarycoord(_intersectionPoint,_vA$1,_vB$1,_vC$1,barycoord),uv&&(intersection$1.uv=Triangle.getInterpolatedAttribute(uv,a$1,b$1,c$3,barycoord,new Vector2)),uv1&&(intersection$1.uv1=Triangle.getInterpolatedAttribute(uv1,a$1,b$1,c$3,barycoord,new Vector2)),normal&&(intersection$1.normal=Triangle.getInterpolatedAttribute(normal,a$1,b$1,c$3,barycoord,new Vector3),intersection$1.normal.dot(ray.direction)>0&&intersection$1.normal.multiplyScalar(-1));let face={a:a$1,b:b$1,c:c$3,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA$1,_vB$1,_vC$1,face.normal),intersection$1.face=face,intersection$1.barycoord=barycoord}return intersection$1}var BoxGeometry=class BoxGeometry extends BufferGeometry{constructor(width=1,height=1,depth=1,widthSegments=1,heightSegments=1,depthSegments=1){super(),this.type=`BoxGeometry`,this.parameters={width,height,depth,widthSegments,heightSegments,depthSegments};let scope$1=this;widthSegments=Math.floor(widthSegments),heightSegments=Math.floor(heightSegments),depthSegments=Math.floor(depthSegments);let indices=[],vertices=[],normals=[],uvs=[],numberOfVertices=0,groupStart=0;buildPlane(`z`,`y`,`x`,-1,-1,depth,height,width,depthSegments,heightSegments,0),buildPlane(`z`,`y`,`x`,1,-1,depth,height,-width,depthSegments,heightSegments,1),buildPlane(`x`,`z`,`y`,1,1,width,depth,height,widthSegments,depthSegments,2),buildPlane(`x`,`z`,`y`,1,-1,width,depth,-height,widthSegments,depthSegments,3),buildPlane(`x`,`y`,`z`,1,-1,width,height,depth,widthSegments,heightSegments,4),buildPlane(`x`,`y`,`z`,-1,-1,width,height,-depth,widthSegments,heightSegments,5),this.setIndex(indices),this.setAttribute(`position`,new Float32BufferAttribute(vertices,3)),this.setAttribute(`normal`,new Float32BufferAttribute(normals,3)),this.setAttribute(`uv`,new Float32BufferAttribute(uvs,2));function buildPlane(u,v,w,udir,vdir,width$1,height$1,depth$1,gridX,gridY,materialIndex){let segmentWidth=width$1/gridX,segmentHeight=height$1/gridY,widthHalf=width$1/2,heightHalf=height$1/2,depthHalf=depth$1/2,gridX1=gridX+1,gridY1=gridY+1,vertexCounter=0,groupCount=0,vector=new Vector3;for(let iy=0;iy0?1:-1,normals.push(vector.x,vector.y,vector.z),uvs.push(ix/gridX),uvs.push(1-iy/gridY),vertexCounter+=1}}for(let iy=0;iydefineCustomElement(optio gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},geometry=new BoxGeometry(5,5,5),material=new ShaderMaterial({name:`CubemapFromEquirect`,uniforms:cloneUniforms(shader.uniforms),vertexShader:shader.vertexShader,fragmentShader:shader.fragmentShader,side:BackSide,blending:NoBlending});material.uniforms.tEquirect.value=texture;let mesh=new Mesh(geometry,material),currentMinFilter=texture.minFilter;texture.minFilter===LinearMipmapLinearFilter&&(texture.minFilter=LinearFilter);let camera=new CubeCamera(1,10,this);return camera.update(renderer$1,mesh),texture.minFilter=currentMinFilter,mesh.geometry.dispose(),mesh.material.dispose(),this}clear(renderer$1,color$2=!0,depth=!0,stencil=!0){let currentRenderTarget=renderer$1.getRenderTarget();for(let i=0;i<6;i++)renderer$1.setRenderTarget(this,i),renderer$1.clear(color$2,depth,stencil);renderer$1.setRenderTarget(currentRenderTarget)}},Group=class extends Object3D{constructor(){super(),this.isGroup=!0,this.type=`Group`}};const _moveEvent={type:`move`};var WebXRController=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Group,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Group,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Vector3,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Vector3),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Group,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Vector3,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Vector3),this._grip}dispatchEvent(event){return this._targetRay!==null&&this._targetRay.dispatchEvent(event),this._grip!==null&&this._grip.dispatchEvent(event),this._hand!==null&&this._hand.dispatchEvent(event),this}connect(inputSource){if(inputSource&&inputSource.hand){let hand=this._hand;if(hand)for(let inputjoint of inputSource.hand.values())this._getHandJoint(hand,inputjoint)}return this.dispatchEvent({type:`connected`,data:inputSource}),this}disconnect(inputSource){return this.dispatchEvent({type:`disconnected`,data:inputSource}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(inputSource,frame$1,referenceSpace){let inputPose=null,gripPose=null,handPose=null,targetRay=this._targetRay,grip=this._grip,hand=this._hand;if(inputSource&&frame$1.session.visibilityState!==`visible-blurred`){if(hand&&inputSource.hand){handPose=!0;for(let inputjoint of inputSource.hand.values()){let jointPose=frame$1.getJointPose(inputjoint,referenceSpace),joint=this._getHandJoint(hand,inputjoint);jointPose!==null&&(joint.matrix.fromArray(jointPose.transform.matrix),joint.matrix.decompose(joint.position,joint.rotation,joint.scale),joint.matrixWorldNeedsUpdate=!0,joint.jointRadius=jointPose.radius),joint.visible=jointPose!==null}let indexTip=hand.joints[`index-finger-tip`],thumbTip=hand.joints[`thumb-tip`],distance=indexTip.position.distanceTo(thumbTip.position),distanceToPinch=.02,threshold=.005;hand.inputState.pinching&&distance>distanceToPinch+threshold?(hand.inputState.pinching=!1,this.dispatchEvent({type:`pinchend`,handedness:inputSource.handedness,target:this})):!hand.inputState.pinching&&distance<=distanceToPinch-threshold&&(hand.inputState.pinching=!0,this.dispatchEvent({type:`pinchstart`,handedness:inputSource.handedness,target:this}))}else grip!==null&&inputSource.gripSpace&&(gripPose=frame$1.getPose(inputSource.gripSpace,referenceSpace),gripPose!==null&&(grip.matrix.fromArray(gripPose.transform.matrix),grip.matrix.decompose(grip.position,grip.rotation,grip.scale),grip.matrixWorldNeedsUpdate=!0,gripPose.linearVelocity?(grip.hasLinearVelocity=!0,grip.linearVelocity.copy(gripPose.linearVelocity)):grip.hasLinearVelocity=!1,gripPose.angularVelocity?(grip.hasAngularVelocity=!0,grip.angularVelocity.copy(gripPose.angularVelocity)):grip.hasAngularVelocity=!1));targetRay!==null&&(inputPose=frame$1.getPose(inputSource.targetRaySpace,referenceSpace),inputPose===null&&gripPose!==null&&(inputPose=gripPose),inputPose!==null&&(targetRay.matrix.fromArray(inputPose.transform.matrix),targetRay.matrix.decompose(targetRay.position,targetRay.rotation,targetRay.scale),targetRay.matrixWorldNeedsUpdate=!0,inputPose.linearVelocity?(targetRay.hasLinearVelocity=!0,targetRay.linearVelocity.copy(inputPose.linearVelocity)):targetRay.hasLinearVelocity=!1,inputPose.angularVelocity?(targetRay.hasAngularVelocity=!0,targetRay.angularVelocity.copy(inputPose.angularVelocity)):targetRay.hasAngularVelocity=!1,this.dispatchEvent(_moveEvent)))}return targetRay!==null&&(targetRay.visible=inputPose!==null),grip!==null&&(grip.visible=gripPose!==null),hand!==null&&(hand.visible=handPose!==null),this}_getHandJoint(hand,inputjoint){if(hand.joints[inputjoint.jointName]===void 0){let joint=new Group;joint.matrixAutoUpdate=!1,joint.visible=!1,hand.joints[inputjoint.jointName]=joint,hand.add(joint)}return hand.joints[inputjoint.jointName]}},FogExp2=class FogExp2{constructor(color$2,density=25e-5){this.isFogExp2=!0,this.name=``,this.color=new Color(color$2),this.density=density}clone(){return new FogExp2(this.color,this.density)}toJSON(){return{type:`FogExp2`,name:this.name,color:this.color.getHex(),density:this.density}}},Fog=class Fog{constructor(color$2,near=1,far=1e3){this.isFog=!0,this.name=``,this.color=new Color(color$2),this.near=near,this.far=far}clone(){return new Fog(this.color,this.near,this.far)}toJSON(){return{type:`Fog`,name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},Scene=class extends Object3D{constructor(){super(),this.isScene=!0,this.type=`Scene`,this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Euler,this.environmentIntensity=1,this.environmentRotation=new Euler,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}copy(source,recursive){return super.copy(source,recursive),source.background!==null&&(this.background=source.background.clone()),source.environment!==null&&(this.environment=source.environment.clone()),source.fog!==null&&(this.fog=source.fog.clone()),this.backgroundBlurriness=source.backgroundBlurriness,this.backgroundIntensity=source.backgroundIntensity,this.backgroundRotation.copy(source.backgroundRotation),this.environmentIntensity=source.environmentIntensity,this.environmentRotation.copy(source.environmentRotation),source.overrideMaterial!==null&&(this.overrideMaterial=source.overrideMaterial.clone()),this.matrixAutoUpdate=source.matrixAutoUpdate,this}toJSON(meta){let data$12=super.toJSON(meta);return this.fog!==null&&(data$12.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(data$12.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(data$12.object.backgroundIntensity=this.backgroundIntensity),data$12.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(data$12.object.environmentIntensity=this.environmentIntensity),data$12.object.environmentRotation=this.environmentRotation.toArray(),data$12}},InterleavedBuffer=class{constructor(array$1,stride){this.isInterleavedBuffer=!0,this.array=array$1,this.stride=stride,this.count=array$1===void 0?0:array$1.length/stride,this.usage=StaticDrawUsage,this.updateRanges=[],this.version=0,this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(value$1){value$1===!0&&this.version++}setUsage(value$1){return this.usage=value$1,this}addUpdateRange(start,count$1){this.updateRanges.push({start,count:count$1})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){return this.array=new source.array.constructor(source.array),this.count=source.count,this.stride=source.stride,this.usage=source.usage,this}copyAt(index1,interleavedBuffer,index2){index1*=this.stride,index2*=interleavedBuffer.stride;for(let i=0,l=this.stride;iraycaster.far||intersects$1.push({distance,point:_intersectPoint.clone(),uv:Triangle.getInterpolation(_intersectPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2),face:null,object:this})}copy(source,recursive){return super.copy(source,recursive),source.center!==void 0&&this.center.copy(source.center),this.material=source.material,this}};function transformVertex(vertexPosition,mvPosition,center,scale$1,sin$1,cos$1){_alignedPosition.subVectors(vertexPosition,center).addScalar(.5).multiply(scale$1),sin$1===void 0?_rotatedPosition.copy(_alignedPosition):(_rotatedPosition.x=cos$1*_alignedPosition.x-sin$1*_alignedPosition.y,_rotatedPosition.y=sin$1*_alignedPosition.x+cos$1*_alignedPosition.y),vertexPosition.copy(mvPosition),vertexPosition.x+=_rotatedPosition.x,vertexPosition.y+=_rotatedPosition.y,vertexPosition.applyMatrix4(_viewWorldMatrix)}const _v1$2=new Vector3,_v2$1$1=new Vector3;var LOD=class extends Object3D{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type=`LOD`,Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(source){super.copy(source,!1);let levels$1=source.levels;for(let i=0,l=levels$1.length;i0){let i,l;for(i=1,l=levels$1.length;i0){_v1$2.setFromMatrixPosition(this.matrixWorld);let distance=raycaster.ray.origin.distanceTo(_v1$2);this.getObjectForDistance(distance).raycast(raycaster,intersects$1)}}update(camera){let levels$1=this.levels;if(levels$1.length>1){_v1$2.setFromMatrixPosition(camera.matrixWorld),_v2$1$1.setFromMatrixPosition(this.matrixWorld);let distance=_v1$2.distanceTo(_v2$1$1)/camera.zoom;levels$1[0].object.visible=!0;let i,l;for(i=1,l=levels$1.length;i=levelDistance)levels$1[i-1].object.visible=!1,levels$1[i].object.visible=!0;else break}for(this._currentLevel=i-1;i1?null:target$1.copy(line.start).addScaledVector(direction,t$1)}intersectsLine(line){let startSign=this.distanceToPoint(line.start),endSign=this.distanceToPoint(line.end);return startSign<0&&endSign>0||endSign<0&&startSign>0}intersectsBox(box){return box.intersectsPlane(this)}intersectsSphere(sphere){return sphere.intersectsPlane(this)}coplanarPoint(target$1){return target$1.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(matrix,optionalNormalMatrix){let normalMatrix=optionalNormalMatrix||_normalMatrix.getNormalMatrix(matrix),referencePoint=this.coplanarPoint(_vector1).applyMatrix4(matrix),normal=this.normal.applyMatrix3(normalMatrix).normalize();return this.constant=-referencePoint.dot(normal),this}translate(offset$2){return this.constant-=offset$2.dot(this.normal),this}equals(plane){return plane.normal.equals(this.normal)&&plane.constant===this.constant}clone(){return new this.constructor().copy(this)}};const _sphere$3=new Sphere,_defaultSpriteCenter=new Vector2(.5,.5),_vector$6=new Vector3;var Frustum=class{constructor(p0=new Plane,p1=new Plane,p2=new Plane,p3$1=new Plane,p4=new Plane,p5=new Plane){this.planes=[p0,p1,p2,p3$1,p4,p5]}set(p0,p1,p2,p3$1,p4,p5){let planes=this.planes;return planes[0].copy(p0),planes[1].copy(p1),planes[2].copy(p2),planes[3].copy(p3$1),planes[4].copy(p4),planes[5].copy(p5),this}copy(frustum){let planes=this.planes;for(let i=0;i<6;i++)planes[i].copy(frustum.planes[i]);return this}setFromProjectionMatrix(m,coordinateSystem=WebGLCoordinateSystem,reversedDepth=!1){let planes=this.planes,me=m.elements,me0=me[0],me1=me[1],me2=me[2],me3=me[3],me4=me[4],me5=me[5],me6=me[6],me7=me[7],me8=me[8],me9=me[9],me10=me[10],me11=me[11],me12=me[12],me13=me[13],me14=me[14],me15=me[15];if(planes[0].setComponents(me3-me0,me7-me4,me11-me8,me15-me12).normalize(),planes[1].setComponents(me3+me0,me7+me4,me11+me8,me15+me12).normalize(),planes[2].setComponents(me3+me1,me7+me5,me11+me9,me15+me13).normalize(),planes[3].setComponents(me3-me1,me7-me5,me11-me9,me15-me13).normalize(),reversedDepth)planes[4].setComponents(me2,me6,me10,me14).normalize(),planes[5].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize();else if(planes[4].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize(),coordinateSystem===WebGLCoordinateSystem)planes[5].setComponents(me3+me2,me7+me6,me11+me10,me15+me14).normalize();else if(coordinateSystem===WebGPUCoordinateSystem)planes[5].setComponents(me2,me6,me10,me14).normalize();else throw Error(`THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: `+coordinateSystem);return this}intersectsObject(object$1){if(object$1.boundingSphere!==void 0)object$1.boundingSphere===null&&object$1.computeBoundingSphere(),_sphere$3.copy(object$1.boundingSphere).applyMatrix4(object$1.matrixWorld);else{let geometry=object$1.geometry;geometry.boundingSphere===null&&geometry.computeBoundingSphere(),_sphere$3.copy(geometry.boundingSphere).applyMatrix4(object$1.matrixWorld)}return this.intersectsSphere(_sphere$3)}intersectsSprite(sprite){_sphere$3.center.set(0,0,0);let offset$2=_defaultSpriteCenter.distanceTo(sprite.center);return _sphere$3.radius=.7071067811865476+offset$2,_sphere$3.applyMatrix4(sprite.matrixWorld),this.intersectsSphere(_sphere$3)}intersectsSphere(sphere){let planes=this.planes,center=sphere.center,negRadius=-sphere.radius;for(let i=0;i<6;i++){let distance=planes[i].distanceToPoint(center);if(distance0?box.max.x:box.min.x,_vector$6.y=plane.normal.y>0?box.max.y:box.min.y,_vector$6.z=plane.normal.z>0?box.max.z:box.min.z,plane.distanceToPoint(_vector$6)<0)return!1}return!0}containsPoint(point$3){let planes=this.planes;for(let i=0;i<6;i++)if(planes[i].distanceToPoint(point$3)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};const _projScreenMatrix$2=new Matrix4,_frustum$1=new Frustum;var FrustumArray=class FrustumArray{constructor(){this.coordinateSystem=WebGLCoordinateSystem}intersectsObject(object$1,cameraArray){if(!cameraArray.isArrayCamera||cameraArray.cameras.length===0)return!1;for(let i=0;i=pool.length&&pool.push({start:-1,count:-1,z:-1,index:-1});let item=pool[this.index];list$2.push(item),this.index++,item.start=start,item.count=count$1,item.z=z$1,item.index=index$1}reset(){this.list.length=0,this.index=0}};const _matrix$1=new Matrix4,_whiteColor=new Color(1,1,1),_frustum=new Frustum,_frustumArray=new FrustumArray,_box$1=new Box3,_sphere$2=new Sphere,_vector$5=new Vector3,_forward$1=new Vector3,_temp=new Vector3,_renderList=new MultiDrawRenderList,_mesh=new Mesh,_batchIntersects=[];function copyAttributeData(src,target$1,targetOffset=0){let itemSize=target$1.itemSize;if(src.isInterleavedBufferAttribute||src.array.constructor!==target$1.array.constructor){let vertexCount=src.count;for(let i=0;i65535?new Uint32Array(maxIndexCount):new Uint16Array(maxIndexCount);geometry.setIndex(new BufferAttribute(indexArray,1))}this._geometryInitialized=!0}}_validateGeometry(geometry){let batchGeometry=this.geometry;if(!!geometry.getIndex()!=!!batchGeometry.getIndex())throw Error(`THREE.BatchedMesh: All geometries must consistently have "index".`);for(let attributeName in batchGeometry.attributes){if(!geometry.hasAttribute(attributeName))throw Error(`THREE.BatchedMesh: Added geometry missing "${attributeName}". All geometries must have consistent attributes.`);let srcAttribute=geometry.getAttribute(attributeName),dstAttribute=batchGeometry.getAttribute(attributeName);if(srcAttribute.itemSize!==dstAttribute.itemSize||srcAttribute.normalized!==dstAttribute.normalized)throw Error(`THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.`)}}validateInstanceId(instanceId){let instanceInfo=this._instanceInfo;if(instanceId<0||instanceId>=instanceInfo.length||instanceInfo[instanceId].active===!1)throw Error(`THREE.BatchedMesh: Invalid instanceId ${instanceId}. Instance is either out of range or has been deleted.`)}validateGeometryId(geometryId){let geometryInfoList=this._geometryInfo;if(geometryId<0||geometryId>=geometryInfoList.length||geometryInfoList[geometryId].active===!1)throw Error(`THREE.BatchedMesh: Invalid geometryId ${geometryId}. Geometry is either out of range or has been deleted.`)}setCustomSort(func){return this.customSort=func,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);let boundingBox=this.boundingBox,instanceInfo=this._instanceInfo;boundingBox.makeEmpty();for(let i=0,l=instanceInfo.length;i=this.maxInstanceCount;if(atCapacity&&this._availableInstanceIds.length===0)throw Error(`THREE.BatchedMesh: Maximum item count reached.`);let instanceInfo={visible:!0,active:!0,geometryIndex:geometryId},drawId=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(ascIdSort),drawId=this._availableInstanceIds.shift(),this._instanceInfo[drawId]=instanceInfo):(drawId=this._instanceInfo.length,this._instanceInfo.push(instanceInfo));let matricesTexture=this._matricesTexture;_matrix$1.identity().toArray(matricesTexture.image.data,drawId*16),matricesTexture.needsUpdate=!0;let colorsTexture=this._colorsTexture;return colorsTexture&&(_whiteColor.toArray(colorsTexture.image.data,drawId*4),colorsTexture.needsUpdate=!0),this._visibilityChanged=!0,drawId}addGeometry(geometry,reservedVertexCount=-1,reservedIndexCount=-1){this._initializeGeometry(geometry),this._validateGeometry(geometry);let geometryInfo={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},geometryInfoList=this._geometryInfo;geometryInfo.vertexStart=this._nextVertexStart,geometryInfo.reservedVertexCount=reservedVertexCount===-1?geometry.getAttribute(`position`).count:reservedVertexCount;let index$1=geometry.getIndex(),hasIndex=index$1!==null;if(hasIndex&&(geometryInfo.indexStart=this._nextIndexStart,geometryInfo.reservedIndexCount=reservedIndexCount===-1?index$1.count:reservedIndexCount),geometryInfo.indexStart!==-1&&geometryInfo.indexStart+geometryInfo.reservedIndexCount>this._maxIndexCount||geometryInfo.vertexStart+geometryInfo.reservedVertexCount>this._maxVertexCount)throw Error(`THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.`);let geometryId;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(ascIdSort),geometryId=this._availableGeometryIds.shift(),geometryInfoList[geometryId]=geometryInfo):(geometryId=this._geometryCount,this._geometryCount++,geometryInfoList.push(geometryInfo)),this.setGeometryAt(geometryId,geometry),this._nextIndexStart=geometryInfo.indexStart+geometryInfo.reservedIndexCount,this._nextVertexStart=geometryInfo.vertexStart+geometryInfo.reservedVertexCount,geometryId}setGeometryAt(geometryId,geometry){if(geometryId>=this._geometryCount)throw Error(`THREE.BatchedMesh: Maximum geometry count reached.`);this._validateGeometry(geometry);let batchGeometry=this.geometry,hasIndex=batchGeometry.getIndex()!==null,dstIndex=batchGeometry.getIndex(),srcIndex=geometry.getIndex(),geometryInfo=this._geometryInfo[geometryId];if(hasIndex&&srcIndex.count>geometryInfo.reservedIndexCount||geometry.attributes.position.count>geometryInfo.reservedVertexCount)throw Error(`THREE.BatchedMesh: Reserved space not large enough for provided geometry.`);let vertexStart=geometryInfo.vertexStart,reservedVertexCount=geometryInfo.reservedVertexCount;for(let attributeName in geometryInfo.vertexCount=geometry.getAttribute(`position`).count,batchGeometry.attributes){let srcAttribute=geometry.getAttribute(attributeName),dstAttribute=batchGeometry.getAttribute(attributeName);copyAttributeData(srcAttribute,dstAttribute,vertexStart);let itemSize=srcAttribute.itemSize;for(let i=srcAttribute.count,l=reservedVertexCount;i=geometryInfoList.length||geometryInfoList[geometryId].active===!1)return this;let instanceInfo=this._instanceInfo;for(let i=0,l=instanceInfo.length;ii).sort((a$1,b$1)=>geometryInfoList[a$1].vertexStart-geometryInfoList[b$1].vertexStart),geometry=this.geometry;for(let i=0,l=geometryInfoList.length;i=this._geometryCount)return null;let geometry=this.geometry,geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingBox===null){let box=new Box3,index$1=geometry.index,position$2=geometry.attributes.position;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;i=this._geometryCount)return null;let geometry=this.geometry,geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingSphere===null){let sphere=new Sphere;this.getBoundingBoxAt(geometryId,_box$1),_box$1.getCenter(sphere.center);let index$1=geometry.index,position$2=geometry.attributes.position,maxRadiusSq=0;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;iinfo.active),requiredVertexLength=Math.max(...validRanges.map(range$1=>range$1.vertexStart+range$1.reservedVertexCount));if(requiredVertexLength>maxVertexCount)throw Error(`BatchedMesh: Geometry vertex values are being used outside the range ${maxIndexCount}. Cannot shrink further.`);if(this.geometry.index){let requiredIndexLength=Math.max(...validRanges.map(range$1=>range$1.indexStart+range$1.reservedIndexCount));if(requiredIndexLength>maxIndexCount)throw Error(`BatchedMesh: Geometry index values are being used outside the range ${maxIndexCount}. Cannot shrink further.`)}let oldGeometry=this.geometry;oldGeometry.dispose(),this._maxVertexCount=maxVertexCount,this._maxIndexCount=maxIndexCount,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new BufferGeometry,this._initializeGeometry(oldGeometry));let geometry=this.geometry;for(let key$2 in oldGeometry.index&©ArrayContents(oldGeometry.index.array,geometry.index.array),oldGeometry.attributes)copyArrayContents(oldGeometry.attributes[key$2].array,geometry.attributes[key$2].array)}raycast(raycaster,intersects$1){let instanceInfo=this._instanceInfo,geometryInfoList=this._geometryInfo,matrixWorld=this.matrixWorld,batchGeometry=this.geometry;_mesh.material=this.material,_mesh.geometry.index=batchGeometry.index,_mesh.geometry.attributes=batchGeometry.attributes,_mesh.geometry.boundingBox===null&&(_mesh.geometry.boundingBox=new Box3),_mesh.geometry.boundingSphere===null&&(_mesh.geometry.boundingSphere=new Sphere);for(let i=0,l=instanceInfo.length;i({...info,boundingBox:info.boundingBox===null?null:info.boundingBox.clone(),boundingSphere:info.boundingSphere===null?null:info.boundingSphere.clone()})),this._instanceInfo=source._instanceInfo.map(info=>({...info})),this._availableInstanceIds=source._availableInstanceIds.slice(),this._availableGeometryIds=source._availableGeometryIds.slice(),this._nextIndexStart=source._nextIndexStart,this._nextVertexStart=source._nextVertexStart,this._geometryCount=source._geometryCount,this._maxInstanceCount=source._maxInstanceCount,this._maxVertexCount=source._maxVertexCount,this._maxIndexCount=source._maxIndexCount,this._geometryInitialized=source._geometryInitialized,this._multiDrawCounts=source._multiDrawCounts.slice(),this._multiDrawStarts=source._multiDrawStarts.slice(),this._indirectTexture=source._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=source._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=source._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(renderer$1,scene,camera,geometry,material){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let index$1=geometry.getIndex(),bytesPerElement=index$1===null?1:index$1.array.BYTES_PER_ELEMENT,instanceInfo=this._instanceInfo,multiDrawStarts=this._multiDrawStarts,multiDrawCounts=this._multiDrawCounts,geometryInfoList=this._geometryInfo,perObjectFrustumCulled=this.perObjectFrustumCulled,indirectTexture=this._indirectTexture,indirectArray=indirectTexture.image.data,frustum=camera.isArrayCamera?_frustumArray:_frustum;perObjectFrustumCulled&&!camera.isArrayCamera&&(_matrix$1.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse).multiply(this.matrixWorld),_frustum.setFromProjectionMatrix(_matrix$1,camera.coordinateSystem,camera.reversedDepth));let multiDrawCount=0;if(this.sortObjects){_matrix$1.copy(this.matrixWorld).invert(),_vector$5.setFromMatrixPosition(camera.matrixWorld).applyMatrix4(_matrix$1),_forward$1.set(0,0,-1).transformDirection(camera.matrixWorld).transformDirection(_matrix$1);for(let i=0,l=instanceInfo.length;i0){let morphAttribute=morphAttributes[keys$3[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;mthresholdSq)return;_intersectPointOnRay.applyMatrix4(object$1.matrixWorld);let distance=raycaster.ray.origin.distanceTo(_intersectPointOnRay);if(!(distanceraycaster.far))return{distance,point:_intersectPointOnSegment.clone().applyMatrix4(object$1.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:object$1}}const _start=new Vector3,_end=new Vector3;var LineSegments=class extends Line{constructor(geometry,material){super(geometry,material),this.isLineSegments=!0,this.type=`LineSegments`}computeLineDistances(){let geometry=this.geometry;if(geometry.index===null){let positionAttribute=geometry.attributes.position,lineDistances=[];for(let i=0,l=positionAttribute.count;i0){let morphAttribute=morphAttributes[keys$3[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;mraycaster.far)return;intersects$1.push({distance,distanceToRay:Math.sqrt(rayPointDistanceSq),point:intersectPoint,index:index$1,face:null,faceIndex:null,barycoord:null,object:object$1})}}var VideoTexture=class extends Texture{constructor(video,mapping,wrapS,wrapT,magFilter=LinearFilter,minFilter=LinearFilter,format$2,type,anisotropy){super(video,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;let scope$1=this;function updateVideo(){scope$1.needsUpdate=!0,scope$1._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo)}`requestVideoFrameCallback`in video&&(this._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo))}clone(){return new this.constructor(this.image).copy(this)}update(){let video=this.image,hasVideoFrameCallback=`requestVideoFrameCallback`in video;hasVideoFrameCallback===!1&&video.readyState>=video.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),super.dispose()}},VideoFrameTexture=class extends VideoTexture{constructor(mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy){super({},mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(frame$1){this.image=frame$1,this.needsUpdate=!0}},FramebufferTexture=class extends Texture{constructor(width,height){super({width,height}),this.isFramebufferTexture=!0,this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.generateMipmaps=!1,this.needsUpdate=!0}},CompressedTexture=class extends Texture{constructor(mipmaps,width,height,format$2,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy,colorSpace),this.isCompressedTexture=!0,this.image={width,height},this.mipmaps=mipmaps,this.flipY=!1,this.generateMipmaps=!1}},CompressedArrayTexture=class extends CompressedTexture{constructor(mipmaps,width,height,depth,format$2,type){super(mipmaps,width,height,format$2,type),this.isCompressedArrayTexture=!0,this.image.depth=depth,this.wrapR=ClampToEdgeWrapping,this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}},CompressedCubeTexture=class extends CompressedTexture{constructor(images,format$2,type){super(void 0,images[0].width,images[0].height,format$2,type,CubeReflectionMapping),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=images}},CanvasTexture=class extends Texture{constructor(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy){super(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy),this.isCanvasTexture=!0,this.needsUpdate=!0}},DepthTexture=class extends Texture{constructor(width,height,type=UnsignedIntType,mapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,format$2=DepthFormat,depth=1){if(format$2!==DepthFormat&&format$2!==DepthStencilFormat)throw Error(`DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat`);let image$1={width,height,depth};super(image$1,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(source){return super.copy(source),this.source=new Source(Object.assign({},source.image)),this.compareFunction=source.compareFunction,this}toJSON(meta){let data$12=super.toJSON(meta);return this.compareFunction!==null&&(data$12.compareFunction=this.compareFunction),data$12}},CapsuleGeometry=class CapsuleGeometry extends BufferGeometry{constructor(radius=1,height=1,capSegments=4,radialSegments=8,heightSegments=1){super(),this.type=`CapsuleGeometry`,this.parameters={radius,height,capSegments,radialSegments,heightSegments},height=Math.max(0,height),capSegments=Math.max(1,Math.floor(capSegments)),radialSegments=Math.max(3,Math.floor(radialSegments)),heightSegments=Math.max(1,Math.floor(heightSegments));let indices=[],vertices=[],normals=[],uvs=[],halfHeight=height/2,capArcLength=Math.PI/2*radius,cylinderPartLength=height,totalArcLength=2*capArcLength+cylinderPartLength,numVerticalSegments=capSegments*2+heightSegments,verticesPerRow=radialSegments+1,normal=new Vector3,vertex$10=new Vector3;for(let iy=0;iy<=numVerticalSegments;iy++){let currentArcLength=0,profileY=0,profileRadius=0,normalYComponent=0;if(iy<=capSegments){let segmentProgress=iy/capSegments,angle=segmentProgress*Math.PI/2;profileY=-halfHeight-radius*Math.cos(angle),profileRadius=radius*Math.sin(angle),normalYComponent=-radius*Math.cos(angle),currentArcLength=segmentProgress*capArcLength}else if(iy<=capSegments+heightSegments){let segmentProgress=(iy-capSegments)/heightSegments;profileY=-halfHeight+segmentProgress*height,profileRadius=radius,normalYComponent=0,currentArcLength=capArcLength+segmentProgress*cylinderPartLength}else{let segmentProgress=(iy-capSegments-heightSegments)/capSegments,angle=segmentProgress*Math.PI/2;profileY=halfHeight+radius*Math.sin(angle),profileRadius=radius*Math.cos(angle),normalYComponent=radius*Math.sin(angle),currentArcLength=capArcLength+cylinderPartLength+segmentProgress*capArcLength}let v=Math.max(0,Math.min(1,currentArcLength/totalArcLength)),uOffset=0;iy===0?uOffset=.5/radialSegments:iy===numVerticalSegments&&(uOffset=-.5/radialSegments);for(let ix=0;ix<=radialSegments;ix++){let u=ix/radialSegments,theta=u*Math.PI*2,sinTheta=Math.sin(theta),cosTheta=Math.cos(theta);vertex$10.x=-profileRadius*cosTheta,vertex$10.y=profileY,vertex$10.z=profileRadius*sinTheta,vertices.push(vertex$10.x,vertex$10.y,vertex$10.z),normal.set(-profileRadius*cosTheta,normalYComponent,profileRadius*sinTheta),normal.normalize(),normals.push(normal.x,normal.y,normal.z),uvs.push(u+uOffset,v)}if(iy>0){let prevIndexRow=(iy-1)*verticesPerRow;for(let ix=0;ix0&&generateCap(!0),radiusBottom>0&&generateCap(!1)),this.setIndex(indices),this.setAttribute(`position`,new Float32BufferAttribute(vertices,3)),this.setAttribute(`normal`,new Float32BufferAttribute(normals,3)),this.setAttribute(`uv`,new Float32BufferAttribute(uvs,2));function generateTorso(){let normal=new Vector3,vertex$10=new Vector3,groupCount=0,slope=(radiusBottom-radiusTop)/height;for(let y=0;y<=heightSegments;y++){let indexRow=[],v=y/heightSegments,radius=v*(radiusBottom-radiusTop)+radiusTop;for(let x$1=0;x$1<=radialSegments;x$1++){let u=x$1/radialSegments,theta=u*thetaLength+thetaStart,sinTheta=Math.sin(theta),cosTheta=Math.cos(theta);vertex$10.x=radius*sinTheta,vertex$10.y=-v*height+halfHeight,vertex$10.z=radius*cosTheta,vertices.push(vertex$10.x,vertex$10.y,vertex$10.z),normal.set(sinTheta,slope,cosTheta).normalize(),normals.push(normal.x,normal.y,normal.z),uvs.push(u,1-v),indexRow.push(index$1++)}indexArray.push(indexRow)}for(let x$1=0;x$10||y!==0)&&(indices.push(a$1,b$1,d),groupCount+=3),(radiusBottom>0||y!==heightSegments-1)&&(indices.push(b$1,c$3,d),groupCount+=3)}scope$1.addGroup(groupStart,groupCount,0),groupStart+=groupCount}function generateCap(top){let centerIndexStart=index$1,uv=new Vector2,vertex$10=new Vector3,groupCount=0,radius=top===!0?radiusTop:radiusBottom,sign$1=top===!0?1:-1;for(let x$1=1;x$1<=radialSegments;x$1++)vertices.push(0,halfHeight*sign$1,0),normals.push(0,sign$1,0),uvs.push(.5,.5),index$1++;let centerIndexEnd=index$1;for(let x$1=0;x$1<=radialSegments;x$1++){let u=x$1/radialSegments,theta=u*thetaLength+thetaStart,cosTheta=Math.cos(theta),sinTheta=Math.sin(theta);vertex$10.x=radius*sinTheta,vertex$10.y=halfHeight*sign$1,vertex$10.z=radius*cosTheta,vertices.push(vertex$10.x,vertex$10.y,vertex$10.z),normals.push(0,sign$1,0),uv.x=cosTheta*.5+.5,uv.y=sinTheta*.5*sign$1+.5,uvs.push(uv.x,uv.y),index$1++}for(let x$1=0;x$1.9&&min$1<.1&&(x0<.2&&(uvBuffer[i+0]+=1),x1<.2&&(uvBuffer[i+2]+=1),x2<.2&&(uvBuffer[i+4]+=1))}}function pushVertex(vertex$10){vertexBuffer.push(vertex$10.x,vertex$10.y,vertex$10.z)}function getVertexByIndex(index$1,vertex$10){let stride=index$1*3;vertex$10.x=vertices[stride+0],vertex$10.y=vertices[stride+1],vertex$10.z=vertices[stride+2]}function correctUVs(){let a$1=new Vector3,b$1=new Vector3,c$3=new Vector3,centroid=new Vector3,uvA=new Vector2,uvB=new Vector2,uvC=new Vector2;for(let i=0,j$1=0;i0)high=i-1;else{high=i;break}if(i=high,arcLengths[i]===targetArcLength)return i/(il-1);let lengthBefore=arcLengths[i],lengthAfter=arcLengths[i+1],segmentLength=lengthAfter-lengthBefore,segmentFraction=(targetArcLength-lengthBefore)/segmentLength,t$1=(i+segmentFraction)/(il-1);return t$1}getTangent(t$1,optionalTarget){let delta=1e-4,t1=t$1-delta,t2=t$1+delta;t1<0&&(t1=0),t2>1&&(t2=1);let pt1=this.getPoint(t1),pt2=this.getPoint(t2),tangent=optionalTarget||(pt1.isVector2?new Vector2:new Vector3);return tangent.copy(pt2).sub(pt1).normalize(),tangent}getTangentAt(u,optionalTarget){let t$1=this.getUtoTmapping(u);return this.getTangent(t$1,optionalTarget)}computeFrenetFrames(segments,closed$1=!1){let normal=new Vector3,tangents=[],normals=[],binormals=[],vec=new Vector3,mat=new Matrix4;for(let i=0;i<=segments;i++){let u=i/segments;tangents[i]=this.getTangentAt(u,new Vector3)}normals[0]=new Vector3,binormals[0]=new Vector3;let min$1=Number.MAX_VALUE,tx=Math.abs(tangents[0].x),ty=Math.abs(tangents[0].y),tz=Math.abs(tangents[0].z);tx<=min$1&&(min$1=tx,normal.set(1,0,0)),ty<=min$1&&(min$1=ty,normal.set(0,1,0)),tz<=min$1&&normal.set(0,0,1),vec.crossVectors(tangents[0],normal).normalize(),normals[0].crossVectors(tangents[0],vec),binormals[0].crossVectors(tangents[0],normals[0]);for(let i=1;i<=segments;i++){if(normals[i]=normals[i-1].clone(),binormals[i]=binormals[i-1].clone(),vec.crossVectors(tangents[i-1],tangents[i]),vec.length()>2**-52){vec.normalize();let theta=Math.acos(clamp$7(tangents[i-1].dot(tangents[i]),-1,1));normals[i].applyMatrix4(mat.makeRotationAxis(vec,theta))}binormals[i].crossVectors(tangents[i],normals[i])}if(closed$1===!0){let theta=Math.acos(clamp$7(normals[0].dot(normals[segments]),-1,1));theta/=segments,tangents[0].dot(vec.crossVectors(normals[0],normals[segments]))>0&&(theta=-theta);for(let i=1;i<=segments;i++)normals[i].applyMatrix4(mat.makeRotationAxis(tangents[i],theta*i)),binormals[i].crossVectors(tangents[i],normals[i])}return{tangents,normals,binormals}}clone(){return new this.constructor().copy(this)}copy(source){return this.arcLengthDivisions=source.arcLengthDivisions,this}toJSON(){let data$12={metadata:{version:4.7,type:`Curve`,generator:`Curve.toJSON`}};return data$12.arcLengthDivisions=this.arcLengthDivisions,data$12.type=this.type,data$12}fromJSON(json){return this.arcLengthDivisions=json.arcLengthDivisions,this}},EllipseCurve=class extends Curve{constructor(aX=0,aY=0,xRadius=1,yRadius=1,aStartAngle=0,aEndAngle=Math.PI*2,aClockwise=!1,aRotation=0){super(),this.isEllipseCurve=!0,this.type=`EllipseCurve`,this.aX=aX,this.aY=aY,this.xRadius=xRadius,this.yRadius=yRadius,this.aStartAngle=aStartAngle,this.aEndAngle=aEndAngle,this.aClockwise=aClockwise,this.aRotation=aRotation}getPoint(t$1,optionalTarget=new Vector2){let point$3=optionalTarget,twoPi=Math.PI*2,deltaAngle=this.aEndAngle-this.aStartAngle,samePoints=Math.abs(deltaAngle)<2**-52;for(;deltaAngle<0;)deltaAngle+=twoPi;for(;deltaAngle>twoPi;)deltaAngle-=twoPi;deltaAngle<2**-52&&(deltaAngle=samePoints?0:twoPi),this.aClockwise===!0&&!samePoints&&(deltaAngle===twoPi?deltaAngle=-twoPi:deltaAngle-=twoPi);let angle=this.aStartAngle+t$1*deltaAngle,x$1=this.aX+this.xRadius*Math.cos(angle),y=this.aY+this.yRadius*Math.sin(angle);if(this.aRotation!==0){let cos$1=Math.cos(this.aRotation),sin$1=Math.sin(this.aRotation),tx=x$1-this.aX,ty=y-this.aY;x$1=tx*cos$1-ty*sin$1+this.aX,y=tx*sin$1+ty*cos$1+this.aY}return point$3.set(x$1,y)}copy(source){return super.copy(source),this.aX=source.aX,this.aY=source.aY,this.xRadius=source.xRadius,this.yRadius=source.yRadius,this.aStartAngle=source.aStartAngle,this.aEndAngle=source.aEndAngle,this.aClockwise=source.aClockwise,this.aRotation=source.aRotation,this}toJSON(){let data$12=super.toJSON();return data$12.aX=this.aX,data$12.aY=this.aY,data$12.xRadius=this.xRadius,data$12.yRadius=this.yRadius,data$12.aStartAngle=this.aStartAngle,data$12.aEndAngle=this.aEndAngle,data$12.aClockwise=this.aClockwise,data$12.aRotation=this.aRotation,data$12}fromJSON(json){return super.fromJSON(json),this.aX=json.aX,this.aY=json.aY,this.xRadius=json.xRadius,this.yRadius=json.yRadius,this.aStartAngle=json.aStartAngle,this.aEndAngle=json.aEndAngle,this.aClockwise=json.aClockwise,this.aRotation=json.aRotation,this}},ArcCurve=class extends EllipseCurve{constructor(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){super(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise),this.isArcCurve=!0,this.type=`ArcCurve`}};function CubicPoly(){let c0=0,c1=0,c2=0,c3=0;function init(x0,x1,t0,t1){c0=x0,c1=t0,c2=-3*x0+3*x1-2*t0-t1,c3=2*x0-2*x1+t0+t1}return{initCatmullRom:function(x0,x1,x2,x3,tension){init(x1,x2,tension*(x2-x0),tension*(x3-x1))},initNonuniformCatmullRom:function(x0,x1,x2,x3,dt0,dt1,dt2){let t1=(x1-x0)/dt0-(x2-x0)/(dt0+dt1)+(x2-x1)/dt1,t2=(x2-x1)/dt1-(x3-x1)/(dt1+dt2)+(x3-x2)/dt2;t1*=dt1,t2*=dt1,init(x1,x2,t1,t2)},calc:function(t$1){let t2=t$1*t$1,t3=t2*t$1;return c0+c1*t$1+c2*t2+c3*t3}}}const tmp=new Vector3,px$1=new CubicPoly,py=new CubicPoly,pz=new CubicPoly;var CatmullRomCurve3=class extends Curve{constructor(points=[],closed$1=!1,curveType=`centripetal`,tension=.5){super(),this.isCatmullRomCurve3=!0,this.type=`CatmullRomCurve3`,this.points=points,this.closed=closed$1,this.curveType=curveType,this.tension=tension}getPoint(t$1,optionalTarget=new Vector3){let point$3=optionalTarget,points=this.points,l=points.length,p$4=(l-(this.closed?0:1))*t$1,intPoint=Math.floor(p$4),weight=p$4-intPoint;this.closed?intPoint+=intPoint>0?0:(Math.floor(Math.abs(intPoint)/l)+1)*l:weight===0&&intPoint===l-1&&(intPoint=l-2,weight=1);let p0,p3$1;this.closed||intPoint>0?p0=points[(intPoint-1)%l]:(tmp.subVectors(points[0],points[1]).add(points[0]),p0=tmp);let p1=points[intPoint%l],p2=points[(intPoint+1)%l];if(this.closed||intPoint+2points.length-2?points.length-1:intPoint+1],p3$1=points[intPoint>points.length-3?points.length-1:intPoint+2];return point$3.set(CatmullRom(weight,p0.x,p1.x,p2.x,p3$1.x),CatmullRom(weight,p0.y,p1.y,p2.y,p3$1.y)),point$3}copy(source){super.copy(source),this.points=[];for(let i=0,l=source.points.length;i=d){let diff=curveLengths[i]-d,curve=this.curves[i],segmentLength=curve.getLength(),u=segmentLength===0?0:1-diff/segmentLength;return curve.getPointAt(u,optionalTarget)}i++}return null}getLength(){let lens=this.getCurveLengths();return lens[lens.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let lengths=[],sums=0;for(let i=0,l=this.curves.length;i1&&!points[points.length-1].equals(points[0])&&points.push(points[0]),points}copy(source){super.copy(source),this.curves=[];for(let i=0,l=source.curves.length;i0){let firstPoint=curve.getPoint(0);firstPoint.equals(this.currentPoint)||this.lineTo(firstPoint.x,firstPoint.y)}this.curves.push(curve);let lastPoint=curve.getPoint(1);return this.currentPoint.copy(lastPoint),this}copy(source){return super.copy(source),this.currentPoint.copy(source.currentPoint),this}toJSON(){let data$12=super.toJSON();return data$12.currentPoint=this.currentPoint.toArray(),data$12}fromJSON(json){return super.fromJSON(json),this.currentPoint.fromArray(json.currentPoint),this}},Shape=class extends Path{constructor(points){super(points),this.uuid=generateUUID(),this.type=`Shape`,this.holes=[]}getPointsHoles(divisions){let holesPts=[];for(let i=0,l=this.holes.length;i80*dim){minX=1/0,minY=1/0;let maxX=-1/0,maxY=-1/0;for(let i=dim;imaxX&&(maxX=x$1),y>maxY&&(maxY=y)}invSize=Math.max(maxX-minX,maxY-minY),invSize=invSize===0?0:32767/invSize}return earcutLinked(outerNode,triangles,dim,minX,minY,invSize,0),triangles}function linkedList(data$12,start,end,dim,clockwise){let last;if(clockwise===signedArea(data$12,start,end,dim)>0)for(let i=start;i=start;i-=dim)last=insertNode(i/dim|0,data$12[i],data$12[i+1],last);return last&&equals(last,last.next)&&(removeNode(last),last=last.next),last}function filterPoints(start,end){if(!start)return start;end||=start;let p$4=start,again;do if(again=!1,!p$4.steiner&&(equals(p$4,p$4.next)||area(p$4.prev,p$4,p$4.next)===0)){if(removeNode(p$4),p$4=end=p$4.prev,p$4===p$4.next)break;again=!0}else p$4=p$4.next;while(again||p$4!==end);return end}function earcutLinked(ear,triangles,dim,minX,minY,invSize,pass){if(!ear)return;!pass&&invSize&&indexCurve(ear,minX,minY,invSize);let stop$1=ear;for(;ear.prev!==ear.next;){let prev=ear.prev,next=ear.next;if(invSize?isEarHashed(ear,minX,minY,invSize):isEar(ear)){triangles.push(prev.i,ear.i,next.i),removeNode(ear),ear=next.next,stop$1=next.next;continue}if(ear=next,ear===stop$1){pass?pass===1?(ear=cureLocalIntersections(filterPoints(ear),triangles),earcutLinked(ear,triangles,dim,minX,minY,invSize,2)):pass===2&&splitEarcut(ear,triangles,dim,minX,minY,invSize):earcutLinked(filterPoints(ear),triangles,dim,minX,minY,invSize,1);break}}}function isEar(ear){let a$1=ear.prev,b$1=ear,c$3=ear.next;if(area(a$1,b$1,c$3)>=0)return!1;let ax=a$1.x,bx=b$1.x,cx=c$3.x,ay=a$1.y,by=b$1.y,cy=c$3.y,x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy),p$4=c$3.next;for(;p$4!==a$1;){if(p$4.x>=x0&&p$4.x<=x1&&p$4.y>=y0&&p$4.y<=y1&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p$4.x,p$4.y)&&area(p$4.prev,p$4,p$4.next)>=0)return!1;p$4=p$4.next}return!0}function isEarHashed(ear,minX,minY,invSize){let a$1=ear.prev,b$1=ear,c$3=ear.next;if(area(a$1,b$1,c$3)>=0)return!1;let ax=a$1.x,bx=b$1.x,cx=c$3.x,ay=a$1.y,by=b$1.y,cy=c$3.y,x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy),minZ=zOrder(x0,y0,minX,minY,invSize),maxZ=zOrder(x1,y1,minX,minY,invSize),p$4=ear.prevZ,n=ear.nextZ;for(;p$4&&p$4.z>=minZ&&n&&n.z<=maxZ;){if(p$4.x>=x0&&p$4.x<=x1&&p$4.y>=y0&&p$4.y<=y1&&p$4!==a$1&&p$4!==c$3&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p$4.x,p$4.y)&&area(p$4.prev,p$4,p$4.next)>=0||(p$4=p$4.prevZ,n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a$1&&n!==c$3&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0))return!1;n=n.nextZ}for(;p$4&&p$4.z>=minZ;){if(p$4.x>=x0&&p$4.x<=x1&&p$4.y>=y0&&p$4.y<=y1&&p$4!==a$1&&p$4!==c$3&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p$4.x,p$4.y)&&area(p$4.prev,p$4,p$4.next)>=0)return!1;p$4=p$4.prevZ}for(;n&&n.z<=maxZ;){if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a$1&&n!==c$3&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return!1;n=n.nextZ}return!0}function cureLocalIntersections(start,triangles){let p$4=start;do{let a$1=p$4.prev,b$1=p$4.next.next;!equals(a$1,b$1)&&intersects(a$1,p$4,p$4.next,b$1)&&locallyInside(a$1,b$1)&&locallyInside(b$1,a$1)&&(triangles.push(a$1.i,p$4.i,b$1.i),removeNode(p$4),removeNode(p$4.next),p$4=start=b$1),p$4=p$4.next}while(p$4!==start);return filterPoints(p$4)}function splitEarcut(start,triangles,dim,minX,minY,invSize){let a$1=start;do{let b$1=a$1.next.next;for(;b$1!==a$1.prev;){if(a$1.i!==b$1.i&&isValidDiagonal(a$1,b$1)){let c$3=splitPolygon(a$1,b$1);a$1=filterPoints(a$1,a$1.next),c$3=filterPoints(c$3,c$3.next),earcutLinked(a$1,triangles,dim,minX,minY,invSize,0),earcutLinked(c$3,triangles,dim,minX,minY,invSize,0);return}b$1=b$1.next}a$1=a$1.next}while(a$1!==start)}function eliminateHoles(data$12,holeIndices,outerNode,dim){let queue$1=[];for(let i=0,len=holeIndices.length;i=p$4.next.y&&p$4.next.y!==p$4.y){let x$1=p$4.x+(hy-p$4.y)*(p$4.next.x-p$4.x)/(p$4.next.y-p$4.y);if(x$1<=hx&&x$1>qx&&(qx=x$1,m=p$4.x=p$4.x&&p$4.x>=mx&&hx!==p$4.x&&pointInTriangle(hym.x||p$4.x===m.x&§orContainsSector(m,p$4)))&&(m=p$4,tanMin=tan)}p$4=p$4.next}while(p$4!==stop$1);return m}function sectorContainsSector(m,p$4){return area(m.prev,m,p$4.prev)<0&&area(p$4.next,m,m.next)<0}function indexCurve(start,minX,minY,invSize){let p$4=start;do p$4.z===0&&(p$4.z=zOrder(p$4.x,p$4.y,minX,minY,invSize)),p$4.prevZ=p$4.prev,p$4.nextZ=p$4.next,p$4=p$4.next;while(p$4!==start);p$4.prevZ.nextZ=null,p$4.prevZ=null,sortLinked(p$4)}function sortLinked(list$2){let numMerges,inSize=1;do{let p$4=list$2,e$4;list$2=null;let tail=null;for(numMerges=0;p$4;){numMerges++;let q=p$4,pSize=0;for(let i=0;i0||qSize>0&&q;)pSize!==0&&(qSize===0||!q||p$4.z<=q.z)?(e$4=p$4,p$4=p$4.nextZ,pSize--):(e$4=q,q=q.nextZ,qSize--),tail?tail.nextZ=e$4:list$2=e$4,e$4.prevZ=tail,tail=e$4;p$4=q}tail.nextZ=null,inSize*=2}while(numMerges>1);return list$2}function zOrder(x$1,y,minX,minY,invSize){return x$1=(x$1-minX)*invSize|0,y=(y-minY)*invSize|0,x$1=(x$1|x$1<<8)&16711935,x$1=(x$1|x$1<<4)&252645135,x$1=(x$1|x$1<<2)&858993459,x$1=(x$1|x$1<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,x$1|y<<1}function getLeftmost(start){let p$4=start,leftmost=start;do(p$4.x=(ax-px$2)*(cy-py$1)&&(ax-px$2)*(by-py$1)>=(bx-px$2)*(ay-py$1)&&(bx-px$2)*(cy-py$1)>=(cx-px$2)*(by-py$1)}function pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,px$2,py$1){return!(ax===px$2&&ay===py$1)&&pointInTriangle(ax,ay,bx,by,cx,cy,px$2,py$1)}function isValidDiagonal(a$1,b$1){return a$1.next.i!==b$1.i&&a$1.prev.i!==b$1.i&&!intersectsPolygon(a$1,b$1)&&(locallyInside(a$1,b$1)&&locallyInside(b$1,a$1)&&middleInside(a$1,b$1)&&(area(a$1.prev,a$1,b$1.prev)||area(a$1,b$1.prev,b$1))||equals(a$1,b$1)&&area(a$1.prev,a$1,a$1.next)>0&&area(b$1.prev,b$1,b$1.next)>0)}function area(p$4,q,r$1){return(q.y-p$4.y)*(r$1.x-q.x)-(q.x-p$4.x)*(r$1.y-q.y)}function equals(p1,p2){return p1.x===p2.x&&p1.y===p2.y}function intersects(p1,q1,p2,q2){let o1=sign(area(p1,q1,p2)),o2=sign(area(p1,q1,q2)),o3=sign(area(p2,q2,p1)),o4=sign(area(p2,q2,q1));return!!(o1!==o2&&o3!==o4||o1===0&&onSegment(p1,p2,q1)||o2===0&&onSegment(p1,q2,q1)||o3===0&&onSegment(p2,p1,q2)||o4===0&&onSegment(p2,q1,q2))}function onSegment(p$4,q,r$1){return q.x<=Math.max(p$4.x,r$1.x)&&q.x>=Math.min(p$4.x,r$1.x)&&q.y<=Math.max(p$4.y,r$1.y)&&q.y>=Math.min(p$4.y,r$1.y)}function sign(num$2){return num$2>0?1:num$2<0?-1:0}function intersectsPolygon(a$1,b$1){let p$4=a$1;do{if(p$4.i!==a$1.i&&p$4.next.i!==a$1.i&&p$4.i!==b$1.i&&p$4.next.i!==b$1.i&&intersects(p$4,p$4.next,a$1,b$1))return!0;p$4=p$4.next}while(p$4!==a$1);return!1}function locallyInside(a$1,b$1){return area(a$1.prev,a$1,a$1.next)<0?area(a$1,b$1,a$1.next)>=0&&area(a$1,a$1.prev,b$1)>=0:area(a$1,b$1,a$1.prev)<0||area(a$1,a$1.next,b$1)<0}function middleInside(a$1,b$1){let p$4=a$1,inside=!1,px$2=(a$1.x+b$1.x)/2,py$1=(a$1.y+b$1.y)/2;do p$4.y>py$1!=p$4.next.y>py$1&&p$4.next.y!==p$4.y&&px$2<(p$4.next.x-p$4.x)*(py$1-p$4.y)/(p$4.next.y-p$4.y)+p$4.x&&(inside=!inside),p$4=p$4.next;while(p$4!==a$1);return inside}function splitPolygon(a$1,b$1){let a2=createNode(a$1.i,a$1.x,a$1.y),b2=createNode(b$1.i,b$1.x,b$1.y),an$1=a$1.next,bp=b$1.prev;return a$1.next=b$1,b$1.prev=a$1,a2.next=an$1,an$1.prev=a2,b2.next=a2,a2.prev=b2,bp.next=b2,b2.prev=bp,b2}function insertNode(i,x$1,y,last){let p$4=createNode(i,x$1,y);return last?(p$4.next=last.next,p$4.prev=last,last.next.prev=p$4,last.next=p$4):(p$4.prev=p$4,p$4.next=p$4),p$4}function removeNode(p$4){p$4.next.prev=p$4.prev,p$4.prev.next=p$4.next,p$4.prevZ&&(p$4.prevZ.nextZ=p$4.nextZ),p$4.nextZ&&(p$4.nextZ.prevZ=p$4.prevZ)}function createNode(i,x$1,y){return{i,x:x$1,y,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function signedArea(data$12,start,end,dim){let sum=0;for(let i=start,j$1=end-dim;i2&&points[l-1].equals(points[0])&&points.pop()}function addContour(vertices,contour){for(let i=0;i2**-52){let v_prev_len=Math.sqrt(v_prev_lensq),v_next_len=Math.sqrt(v_next_x*v_next_x+v_next_y*v_next_y),ptPrevShift_x=inPrev.x-v_prev_y/v_prev_len,ptPrevShift_y=inPrev.y+v_prev_x/v_prev_len,ptNextShift_x=inNext.x-v_next_y/v_next_len,ptNextShift_y=inNext.y+v_next_x/v_next_len,sf=((ptNextShift_x-ptPrevShift_x)*v_next_y-(ptNextShift_y-ptPrevShift_y)*v_next_x)/(v_prev_x*v_next_y-v_prev_y*v_next_x);v_trans_x=ptPrevShift_x+v_prev_x*sf-inPt.x,v_trans_y=ptPrevShift_y+v_prev_y*sf-inPt.y;let v_trans_lensq=v_trans_x*v_trans_x+v_trans_y*v_trans_y;if(v_trans_lensq<=2)return new Vector2(v_trans_x,v_trans_y);shrink_by=Math.sqrt(v_trans_lensq/2)}else{let direction_eq=!1;v_prev_x>2**-52?v_next_x>2**-52&&(direction_eq=!0):v_prev_x<-(2**-52)?v_next_x<-(2**-52)&&(direction_eq=!0):Math.sign(v_prev_y)===Math.sign(v_next_y)&&(direction_eq=!0),direction_eq?(v_trans_x=-v_prev_y,v_trans_y=v_prev_x,shrink_by=Math.sqrt(v_prev_lensq)):(v_trans_x=v_prev_x,v_trans_y=v_prev_y,shrink_by=Math.sqrt(v_prev_lensq/2))}return new Vector2(v_trans_x/shrink_by,v_trans_y/shrink_by)}let contourMovements=[];for(let i=0,il=contour.length,j$1=il-1,k$3=i+1;i=0;b$1--){let t$1=b$1/bevelSegments,z$1=bevelThickness*Math.cos(t$1*Math.PI/2),bs$1=bevelSize*Math.sin(t$1*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i=0;){let j$1=i,k$3=i-1;k$3<0&&(k$3=contour$1.length-1);for(let s=0,sl=steps$2+bevelSegments*2;s0)&&indices.push(a$1,b$1,d),(iy!==heightSegments-1||thetaEnd0!=value$1>0&&this.version++,this._anisotropy=value$1}get clearcoat(){return this._clearcoat}set clearcoat(value$1){this._clearcoat>0!=value$1>0&&this.version++,this._clearcoat=value$1}get iridescence(){return this._iridescence}set iridescence(value$1){this._iridescence>0!=value$1>0&&this.version++,this._iridescence=value$1}get dispersion(){return this._dispersion}set dispersion(value$1){this._dispersion>0!=value$1>0&&this.version++,this._dispersion=value$1}get sheen(){return this._sheen}set sheen(value$1){this._sheen>0!=value$1>0&&this.version++,this._sheen=value$1}get transmission(){return this._transmission}set transmission(value$1){this._transmission>0!=value$1>0&&this.version++,this._transmission=value$1}copy(source){return super.copy(source),this.defines={STANDARD:``,PHYSICAL:``},this.anisotropy=source.anisotropy,this.anisotropyRotation=source.anisotropyRotation,this.anisotropyMap=source.anisotropyMap,this.clearcoat=source.clearcoat,this.clearcoatMap=source.clearcoatMap,this.clearcoatRoughness=source.clearcoatRoughness,this.clearcoatRoughnessMap=source.clearcoatRoughnessMap,this.clearcoatNormalMap=source.clearcoatNormalMap,this.clearcoatNormalScale.copy(source.clearcoatNormalScale),this.dispersion=source.dispersion,this.ior=source.ior,this.iridescence=source.iridescence,this.iridescenceMap=source.iridescenceMap,this.iridescenceIOR=source.iridescenceIOR,this.iridescenceThicknessRange=[...source.iridescenceThicknessRange],this.iridescenceThicknessMap=source.iridescenceThicknessMap,this.sheen=source.sheen,this.sheenColor.copy(source.sheenColor),this.sheenColorMap=source.sheenColorMap,this.sheenRoughness=source.sheenRoughness,this.sheenRoughnessMap=source.sheenRoughnessMap,this.transmission=source.transmission,this.transmissionMap=source.transmissionMap,this.thickness=source.thickness,this.thicknessMap=source.thicknessMap,this.attenuationDistance=source.attenuationDistance,this.attenuationColor.copy(source.attenuationColor),this.specularIntensity=source.specularIntensity,this.specularIntensityMap=source.specularIntensityMap,this.specularColor.copy(source.specularColor),this.specularColorMap=source.specularColorMap,this}},MeshPhongMaterial=class extends Material{constructor(parameters){super(),this.isMeshPhongMaterial=!0,this.type=`MeshPhongMaterial`,this.color=new Color(16777215),this.specular=new Color(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.color.copy(source.color),this.specular.copy(source.specular),this.shininess=source.shininess,this.map=source.map,this.lightMap=source.lightMap,this.lightMapIntensity=source.lightMapIntensity,this.aoMap=source.aoMap,this.aoMapIntensity=source.aoMapIntensity,this.emissive.copy(source.emissive),this.emissiveMap=source.emissiveMap,this.emissiveIntensity=source.emissiveIntensity,this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.specularMap=source.specularMap,this.alphaMap=source.alphaMap,this.envMap=source.envMap,this.envMapRotation.copy(source.envMapRotation),this.combine=source.combine,this.reflectivity=source.reflectivity,this.refractionRatio=source.refractionRatio,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.wireframeLinecap=source.wireframeLinecap,this.wireframeLinejoin=source.wireframeLinejoin,this.flatShading=source.flatShading,this.fog=source.fog,this}},MeshToonMaterial=class extends Material{constructor(parameters){super(),this.isMeshToonMaterial=!0,this.defines={TOON:``},this.type=`MeshToonMaterial`,this.color=new Color(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.color.copy(source.color),this.map=source.map,this.gradientMap=source.gradientMap,this.lightMap=source.lightMap,this.lightMapIntensity=source.lightMapIntensity,this.aoMap=source.aoMap,this.aoMapIntensity=source.aoMapIntensity,this.emissive.copy(source.emissive),this.emissiveMap=source.emissiveMap,this.emissiveIntensity=source.emissiveIntensity,this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.alphaMap=source.alphaMap,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.wireframeLinecap=source.wireframeLinecap,this.wireframeLinejoin=source.wireframeLinejoin,this.fog=source.fog,this}},MeshNormalMaterial=class extends Material{constructor(parameters){super(),this.isMeshNormalMaterial=!0,this.type=`MeshNormalMaterial`,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(parameters)}copy(source){return super.copy(source),this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.flatShading=source.flatShading,this}},MeshLambertMaterial=class extends Material{constructor(parameters){super(),this.isMeshLambertMaterial=!0,this.type=`MeshLambertMaterial`,this.color=new Color(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.color.copy(source.color),this.map=source.map,this.lightMap=source.lightMap,this.lightMapIntensity=source.lightMapIntensity,this.aoMap=source.aoMap,this.aoMapIntensity=source.aoMapIntensity,this.emissive.copy(source.emissive),this.emissiveMap=source.emissiveMap,this.emissiveIntensity=source.emissiveIntensity,this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.specularMap=source.specularMap,this.alphaMap=source.alphaMap,this.envMap=source.envMap,this.envMapRotation.copy(source.envMapRotation),this.combine=source.combine,this.reflectivity=source.reflectivity,this.refractionRatio=source.refractionRatio,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.wireframeLinecap=source.wireframeLinecap,this.wireframeLinejoin=source.wireframeLinejoin,this.flatShading=source.flatShading,this.fog=source.fog,this}},MeshDepthMaterial=class extends Material{constructor(parameters){super(),this.isMeshDepthMaterial=!0,this.type=`MeshDepthMaterial`,this.depthPacking=BasicDepthPacking,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(parameters)}copy(source){return super.copy(source),this.depthPacking=source.depthPacking,this.map=source.map,this.alphaMap=source.alphaMap,this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this}},MeshDistanceMaterial=class extends Material{constructor(parameters){super(),this.isMeshDistanceMaterial=!0,this.type=`MeshDistanceMaterial`,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(parameters)}copy(source){return super.copy(source),this.map=source.map,this.alphaMap=source.alphaMap,this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this}},MeshMatcapMaterial=class extends Material{constructor(parameters){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:``},this.type=`MeshMatcapMaterial`,this.color=new Color(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.defines={MATCAP:``},this.color.copy(source.color),this.matcap=source.matcap,this.map=source.map,this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.alphaMap=source.alphaMap,this.flatShading=source.flatShading,this.fog=source.fog,this}},LineDashedMaterial=class extends LineBasicMaterial{constructor(parameters){super(),this.isLineDashedMaterial=!0,this.type=`LineDashedMaterial`,this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(parameters)}copy(source){return super.copy(source),this.scale=source.scale,this.dashSize=source.dashSize,this.gapSize=source.gapSize,this}};function convertArray(array$1,type){return!array$1||array$1.constructor===type?array$1:typeof type.BYTES_PER_ELEMENT==`number`?new type(array$1):Array.prototype.slice.call(array$1)}function isTypedArray(object$1){return ArrayBuffer.isView(object$1)&&!(object$1 instanceof DataView)}function getKeyframeOrder(times){function compareTime(i,j$1){return times[i]-times[j$1]}let n=times.length,result=Array(n);for(let i=0;i!==n;++i)result[i]=i;return result.sort(compareTime),result}function sortedArray(values,stride,order$3){let nValues=values.length,result=new values.constructor(nValues);for(let i=0,dstOffset=0;dstOffset!==nValues;++i){let srcOffset=order$3[i]*stride;for(let j$1=0;j$1!==stride;++j$1)result[dstOffset++]=values[srcOffset+j$1]}return result}function flattenJSON(jsonKeys,times,values,valuePropertyName){let i=1,key$2=jsonKeys[0];for(;key$2!==void 0&&key$2[valuePropertyName]===void 0;)key$2=jsonKeys[i++];if(key$2===void 0)return;let value$1=key$2[valuePropertyName];if(value$1!==void 0)if(Array.isArray(value$1))do value$1=key$2[valuePropertyName],value$1!==void 0&&(times.push(key$2.time),values.push(...value$1)),key$2=jsonKeys[i++];while(key$2!==void 0);else if(value$1.toArray!==void 0)do value$1=key$2[valuePropertyName],value$1!==void 0&&(times.push(key$2.time),value$1.toArray(values,values.length)),key$2=jsonKeys[i++];while(key$2!==void 0);else do value$1=key$2[valuePropertyName],value$1!==void 0&&(times.push(key$2.time),values.push(value$1)),key$2=jsonKeys[i++];while(key$2!==void 0)}function subclip(sourceClip,name$2,startFrame,endFrame,fps=30){let clip=sourceClip.clone();clip.name=name$2;let tracks=[];for(let i=0;i=endFrame)){times.push(track$1.times[j$1]);for(let k$3=0;k$3clip.tracks[i].times[0]&&(minStartTime=clip.tracks[i].times[0]);for(let i=0;i=referenceTrack.times[lastIndex]){let startIndex=lastIndex*referenceValueSize+referenceOffset,endIndex=startIndex+referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else{let interpolant=referenceTrack.createInterpolant(),startIndex=referenceOffset,endIndex=referenceValueSize-referenceOffset;interpolant.evaluate(referenceTime),referenceValue=interpolant.resultBuffer.slice(startIndex,endIndex)}if(referenceTrackType===`quaternion`){let referenceQuat=new Quaternion().fromArray(referenceValue).normalize().conjugate();referenceQuat.toArray(referenceValue)}let numTimes=targetTrack.times.length;for(let j$1=0;j$1=t0)){let t1global=pp[1];t$1=t0)break seek}right=i1,i1=0;break linear_scan}break validate_interval}for(;i1>>1;t$1endTime;)--to$1;if(++to$1,from!==0||to$1!==nKeys){from>=to$1&&(to$1=Math.max(to$1,1),from=to$1-1);let stride=this.getValueSize();this.times=times.slice(from,to$1),this.values=this.values.slice(from*stride,to$1*stride)}return this}validate(){let valid$1=!0,valueSize=this.getValueSize();valueSize-Math.floor(valueSize)!==0&&(console.error(`THREE.KeyframeTrack: Invalid value size in track.`,this),valid$1=!1);let times=this.times,values=this.values,nKeys=times.length;nKeys===0&&(console.error(`THREE.KeyframeTrack: Track is empty.`,this),valid$1=!1);let prevTime=null;for(let i=0;i!==nKeys;i++){let currTime=times[i];if(typeof currTime==`number`&&isNaN(currTime)){console.error(`THREE.KeyframeTrack: Time is not a valid number.`,this,i,currTime),valid$1=!1;break}if(prevTime!==null&&prevTime>currTime){console.error(`THREE.KeyframeTrack: Out of order keys.`,this,i,currTime,prevTime),valid$1=!1;break}prevTime=currTime}if(values!==void 0&&isTypedArray(values))for(let i=0,n=values.length;i!==n;++i){let value$1=values[i];if(isNaN(value$1)){console.error(`THREE.KeyframeTrack: Value is not a valid number.`,this,i,value$1),valid$1=!1;break}}return valid$1}optimize(){let times=this.times.slice(),values=this.values.slice(),stride=this.getValueSize(),smoothInterpolation=this.getInterpolation()===InterpolateSmooth,lastIndex=times.length-1,writeIndex=1;for(let i=1;i0){times[writeIndex]=times[lastIndex];for(let readOffset=lastIndex*stride,writeOffset=writeIndex*stride,j$1=0;j$1!==stride;++j$1)values[writeOffset+j$1]=values[readOffset+j$1];++writeIndex}return writeIndex===times.length?(this.times=times,this.values=values):(this.times=times.slice(0,writeIndex),this.values=values.slice(0,writeIndex*stride)),this}clone(){let times=this.times.slice(),values=this.values.slice(),TypedKeyframeTrack=this.constructor,track$1=new TypedKeyframeTrack(this.name,times,values);return track$1.createInterpolant=this.createInterpolant,track$1}};KeyframeTrack.prototype.ValueTypeName=``,KeyframeTrack.prototype.TimeBufferType=Float32Array,KeyframeTrack.prototype.ValueBufferType=Float32Array,KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;var BooleanKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values){super(name$2,times,values)}};BooleanKeyframeTrack.prototype.ValueTypeName=`bool`,BooleanKeyframeTrack.prototype.ValueBufferType=Array,BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;var ColorKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values,interpolation){super(name$2,times,values,interpolation)}};ColorKeyframeTrack.prototype.ValueTypeName=`color`;var NumberKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values,interpolation){super(name$2,times,values,interpolation)}};NumberKeyframeTrack.prototype.ValueTypeName=`number`;var QuaternionLinearInterpolant=class extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t$1,t1){let result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,alpha$1=(t$1-t0)/(t1-t0),offset$2=i1*stride;for(let end=offset$2+stride;offset$2!==end;offset$2+=4)Quaternion.slerpFlat(result,0,values,offset$2-stride,values,offset$2,alpha$1);return result}},QuaternionKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values,interpolation){super(name$2,times,values,interpolation)}InterpolantFactoryMethodLinear(result){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),result)}};QuaternionKeyframeTrack.prototype.ValueTypeName=`quaternion`,QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;var StringKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values){super(name$2,times,values)}};StringKeyframeTrack.prototype.ValueTypeName=`string`,StringKeyframeTrack.prototype.ValueBufferType=Array,StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete,StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;var VectorKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values,interpolation){super(name$2,times,values,interpolation)}};VectorKeyframeTrack.prototype.ValueTypeName=`vector`;var AnimationClip=class{constructor(name$2=``,duration$2=-1,tracks=[],blendMode=NormalAnimationBlendMode){this.name=name$2,this.tracks=tracks,this.duration=duration$2,this.blendMode=blendMode,this.uuid=generateUUID(),this.duration<0&&this.resetDuration()}static parse(json){let tracks=[],jsonTracks=json.tracks,frameTime=1/(json.fps||1);for(let i=0,n=jsonTracks.length;i!==n;++i)tracks.push(parseKeyframeTrack(jsonTracks[i]).scale(frameTime));let clip=new this(json.name,json.duration,tracks,json.blendMode);return clip.uuid=json.uuid,clip}static toJSON(clip){let tracks=[],clipTracks=clip.tracks,json={name:clip.name,duration:clip.duration,tracks,uuid:clip.uuid,blendMode:clip.blendMode};for(let i=0,n=clipTracks.length;i!==n;++i)tracks.push(KeyframeTrack.toJSON(clipTracks[i]));return json}static CreateFromMorphTargetSequence(name$2,morphTargetSequence,fps,noLoop){let numMorphTargets=morphTargetSequence.length,tracks=[];for(let i=0;i1){let name$2=parts[1],animationMorphTargets=animationToMorphTargets[name$2];animationMorphTargets||(animationToMorphTargets[name$2]=animationMorphTargets=[]),animationMorphTargets.push(morphTarget)}}let clips=[];for(let name$2 in animationToMorphTargets)clips.push(this.CreateFromMorphTargetSequence(name$2,animationToMorphTargets[name$2],fps,noLoop));return clips}static parseAnimation(animation,bones){if(console.warn(`THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185`),!animation)return console.error(`THREE.AnimationClip: No animation in JSONLoader data.`),null;let addNonemptyTrack=function(trackType,trackName,animationKeys,propertyName,destTracks){if(animationKeys.length!==0){let times=[],values=[];flattenJSON(animationKeys,times,values,propertyName),times.length!==0&&destTracks.push(new trackType(trackName,times,values))}},tracks=[],clipName=animation.name||`default`,fps=animation.fps||30,blendMode=animation.blendMode,duration$2=animation.length||-1,hierarchyTracks=animation.hierarchy||[];for(let h$1=0;h$1{onLoad&&onLoad(cached$1),this.manager.itemEnd(url)},0),cached$1;if(loading[url]!==void 0){loading[url].push({onLoad,onProgress,onError});return}loading[url]=[],loading[url].push({onLoad,onProgress,onError});let req=new Request(url,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?`include`:`same-origin`,signal:typeof AbortSignal.any==`function`?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),mimeType=this.mimeType,responseType=this.responseType;fetch(req).then(response=>{if(response.status===200||response.status===0){if(response.status===0&&console.warn(`THREE.FileLoader: HTTP Status 0 received.`),typeof ReadableStream>`u`||response.body===void 0||response.body.getReader===void 0)return response;let callbacks=loading[url],reader=response.body.getReader(),contentLength=response.headers.get(`X-File-Size`)||response.headers.get(`Content-Length`),total=contentLength?parseInt(contentLength):0,lengthComputable=total!==0,loaded=0,stream=new ReadableStream({start(controller){readData();function readData(){reader.read().then(({done,value:value$1})=>{if(done)controller.close();else{loaded+=value$1.byteLength;let event=new ProgressEvent(`progress`,{lengthComputable,loaded,total});for(let i=0,il=callbacks.length;i{controller.error(e$4)})}}});return new Response(stream)}else throw new HttpError(`fetch for "${response.url}" responded with ${response.status}: ${response.statusText}`,response)}).then(response=>{switch(responseType){case`arraybuffer`:return response.arrayBuffer();case`blob`:return response.blob();case`document`:return response.text().then(text$5=>{let parser=new DOMParser;return parser.parseFromString(text$5,mimeType)});case`json`:return response.json();default:if(mimeType===``)return response.text();{let re$2=/charset="?([^;"\s]*)"?/i,exec=re$2.exec(mimeType),label=exec&&exec[1]?exec[1].toLowerCase():void 0,decoder=new TextDecoder(label);return response.arrayBuffer().then(ab=>decoder.decode(ab))}}}).then(data$12=>{Cache.add(`file:${url}`,data$12);let callbacks=loading[url];delete loading[url];for(let i=0,il=callbacks.length;i{let callbacks=loading[url];if(callbacks===void 0)throw this.manager.itemError(url),err;delete loading[url];for(let i=0,il=callbacks.length;i{this.manager.itemEnd(url)}),this.manager.itemStart(url)}setResponseType(value$1){return this.responseType=value$1,this}setMimeType(value$1){return this.mimeType=value$1,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}},AnimationLoader=class extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){let scope$1=this,loader$1=new FileLoader(this.manager);loader$1.setPath(this.path),loader$1.setRequestHeader(this.requestHeader),loader$1.setWithCredentials(this.withCredentials),loader$1.load(url,function(text$5){try{onLoad(scope$1.parse(JSON.parse(text$5)))}catch(e$4){onError?onError(e$4):console.error(e$4),scope$1.manager.itemError(url)}},onProgress,onError)}parse(json){let animations$1=[];for(let i=0;i0:material.vertexColors=json.vertexColors),json.uniforms!==void 0)for(let name$2 in json.uniforms){let uniform=json.uniforms[name$2];switch(material.uniforms[name$2]={},uniform.type){case`t`:material.uniforms[name$2].value=getTexture(uniform.value);break;case`c`:material.uniforms[name$2].value=new Color().setHex(uniform.value);break;case`v2`:material.uniforms[name$2].value=new Vector2().fromArray(uniform.value);break;case`v3`:material.uniforms[name$2].value=new Vector3().fromArray(uniform.value);break;case`v4`:material.uniforms[name$2].value=new Vector4().fromArray(uniform.value);break;case`m3`:material.uniforms[name$2].value=new Matrix3().fromArray(uniform.value);break;case`m4`:material.uniforms[name$2].value=new Matrix4().fromArray(uniform.value);break;default:material.uniforms[name$2].value=uniform.value}}if(json.defines!==void 0&&(material.defines=json.defines),json.vertexShader!==void 0&&(material.vertexShader=json.vertexShader),json.fragmentShader!==void 0&&(material.fragmentShader=json.fragmentShader),json.glslVersion!==void 0&&(material.glslVersion=json.glslVersion),json.extensions!==void 0)for(let key$2 in json.extensions)material.extensions[key$2]=json.extensions[key$2];if(json.lights!==void 0&&(material.lights=json.lights),json.clipping!==void 0&&(material.clipping=json.clipping),json.size!==void 0&&(material.size=json.size),json.sizeAttenuation!==void 0&&(material.sizeAttenuation=json.sizeAttenuation),json.map!==void 0&&(material.map=getTexture(json.map)),json.matcap!==void 0&&(material.matcap=getTexture(json.matcap)),json.alphaMap!==void 0&&(material.alphaMap=getTexture(json.alphaMap)),json.bumpMap!==void 0&&(material.bumpMap=getTexture(json.bumpMap)),json.bumpScale!==void 0&&(material.bumpScale=json.bumpScale),json.normalMap!==void 0&&(material.normalMap=getTexture(json.normalMap)),json.normalMapType!==void 0&&(material.normalMapType=json.normalMapType),json.normalScale!==void 0){let normalScale=json.normalScale;Array.isArray(normalScale)===!1&&(normalScale=[normalScale,normalScale]),material.normalScale=new Vector2().fromArray(normalScale)}return json.displacementMap!==void 0&&(material.displacementMap=getTexture(json.displacementMap)),json.displacementScale!==void 0&&(material.displacementScale=json.displacementScale),json.displacementBias!==void 0&&(material.displacementBias=json.displacementBias),json.roughnessMap!==void 0&&(material.roughnessMap=getTexture(json.roughnessMap)),json.metalnessMap!==void 0&&(material.metalnessMap=getTexture(json.metalnessMap)),json.emissiveMap!==void 0&&(material.emissiveMap=getTexture(json.emissiveMap)),json.emissiveIntensity!==void 0&&(material.emissiveIntensity=json.emissiveIntensity),json.specularMap!==void 0&&(material.specularMap=getTexture(json.specularMap)),json.specularIntensityMap!==void 0&&(material.specularIntensityMap=getTexture(json.specularIntensityMap)),json.specularColorMap!==void 0&&(material.specularColorMap=getTexture(json.specularColorMap)),json.envMap!==void 0&&(material.envMap=getTexture(json.envMap)),json.envMapRotation!==void 0&&material.envMapRotation.fromArray(json.envMapRotation),json.envMapIntensity!==void 0&&(material.envMapIntensity=json.envMapIntensity),json.reflectivity!==void 0&&(material.reflectivity=json.reflectivity),json.refractionRatio!==void 0&&(material.refractionRatio=json.refractionRatio),json.lightMap!==void 0&&(material.lightMap=getTexture(json.lightMap)),json.lightMapIntensity!==void 0&&(material.lightMapIntensity=json.lightMapIntensity),json.aoMap!==void 0&&(material.aoMap=getTexture(json.aoMap)),json.aoMapIntensity!==void 0&&(material.aoMapIntensity=json.aoMapIntensity),json.gradientMap!==void 0&&(material.gradientMap=getTexture(json.gradientMap)),json.clearcoatMap!==void 0&&(material.clearcoatMap=getTexture(json.clearcoatMap)),json.clearcoatRoughnessMap!==void 0&&(material.clearcoatRoughnessMap=getTexture(json.clearcoatRoughnessMap)),json.clearcoatNormalMap!==void 0&&(material.clearcoatNormalMap=getTexture(json.clearcoatNormalMap)),json.clearcoatNormalScale!==void 0&&(material.clearcoatNormalScale=new Vector2().fromArray(json.clearcoatNormalScale)),json.iridescenceMap!==void 0&&(material.iridescenceMap=getTexture(json.iridescenceMap)),json.iridescenceThicknessMap!==void 0&&(material.iridescenceThicknessMap=getTexture(json.iridescenceThicknessMap)),json.transmissionMap!==void 0&&(material.transmissionMap=getTexture(json.transmissionMap)),json.thicknessMap!==void 0&&(material.thicknessMap=getTexture(json.thicknessMap)),json.anisotropyMap!==void 0&&(material.anisotropyMap=getTexture(json.anisotropyMap)),json.sheenColorMap!==void 0&&(material.sheenColorMap=getTexture(json.sheenColorMap)),json.sheenRoughnessMap!==void 0&&(material.sheenRoughnessMap=getTexture(json.sheenRoughnessMap)),material}setTextures(value$1){return this.textures=value$1,this}createMaterialFromType(type){return MaterialLoader.createMaterialFromType(type)}static createMaterialFromType(type){let materialLib={ShadowMaterial,SpriteMaterial,RawShaderMaterial,ShaderMaterial,PointsMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshPhongMaterial,MeshToonMaterial,MeshNormalMaterial,MeshLambertMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshBasicMaterial,MeshMatcapMaterial,LineDashedMaterial,LineBasicMaterial,Material};return new materialLib[type]}},LoaderUtils=class{static extractUrlBase(url){let index$1=url.lastIndexOf(`/`);return index$1===-1?`./`:url.slice(0,index$1+1)}static resolveURL(url,path){return typeof url!=`string`||url===``?``:(/^https?:\/\//i.test(path)&&/^\//.test(url)&&(path=path.replace(/(^https?:\/\/[^\/]+).*/i,`$1`)),/^(https?:)?\/\//i.test(url)||/^data:.*,.*$/i.test(url)||/^blob:.*$/i.test(url)?url:path+url)}},InstancedBufferGeometry=class extends BufferGeometry{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type=`InstancedBufferGeometry`,this.instanceCount=1/0}copy(source){return super.copy(source),this.instanceCount=source.instanceCount,this}toJSON(){let data$12=super.toJSON();return data$12.instanceCount=this.instanceCount,data$12.isInstancedBufferGeometry=!0,data$12}},BufferGeometryLoader=class extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){let scope$1=this,loader$1=new FileLoader(scope$1.manager);loader$1.setPath(scope$1.path),loader$1.setRequestHeader(scope$1.requestHeader),loader$1.setWithCredentials(scope$1.withCredentials),loader$1.load(url,function(text$5){try{onLoad(scope$1.parse(JSON.parse(text$5)))}catch(e$4){onError?onError(e$4):console.error(e$4),scope$1.manager.itemError(url)}},onProgress,onError)}parse(json){let interleavedBufferMap={},arrayBufferMap={};function getInterleavedBuffer(json$1,uuid$1){if(interleavedBufferMap[uuid$1]!==void 0)return interleavedBufferMap[uuid$1];let interleavedBuffers=json$1.interleavedBuffers,interleavedBuffer=interleavedBuffers[uuid$1],buffer$1=getArrayBuffer(json$1,interleavedBuffer.buffer),array$1=getTypedArray(interleavedBuffer.type,buffer$1),ib=new InterleavedBuffer(array$1,interleavedBuffer.stride);return ib.uuid=interleavedBuffer.uuid,interleavedBufferMap[uuid$1]=ib,ib}function getArrayBuffer(json$1,uuid$1){if(arrayBufferMap[uuid$1]!==void 0)return arrayBufferMap[uuid$1];let arrayBuffers=json$1.arrayBuffers,arrayBuffer=arrayBuffers[uuid$1],ab=new Uint32Array(arrayBuffer).buffer;return arrayBufferMap[uuid$1]=ab,ab}let geometry=json.isInstancedBufferGeometry?new InstancedBufferGeometry:new BufferGeometry,index$1=json.data.index;if(index$1!==void 0){let typedArray=getTypedArray(index$1.type,index$1.array);geometry.setIndex(new BufferAttribute(typedArray,1))}let attributes=json.data.attributes;for(let key$2 in attributes){let attribute=attributes[key$2],bufferAttribute;if(attribute.isInterleavedBufferAttribute){let interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{let typedArray=getTypedArray(attribute.type,attribute.array),bufferAttributeConstr=attribute.isInstancedBufferAttribute?InstancedBufferAttribute:BufferAttribute;bufferAttribute=new bufferAttributeConstr(typedArray,attribute.itemSize,attribute.normalized)}attribute.name!==void 0&&(bufferAttribute.name=attribute.name),attribute.usage!==void 0&&bufferAttribute.setUsage(attribute.usage),geometry.setAttribute(key$2,bufferAttribute)}let morphAttributes=json.data.morphAttributes;if(morphAttributes)for(let key$2 in morphAttributes){let attributeArray=morphAttributes[key$2],array$1=[];for(let i=0,il=attributeArray.length;i0){let manager=new LoadingManager(onLoad);loader$1=new ImageLoader(manager),loader$1.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i0){loader$1=new ImageLoader(this.manager),loader$1.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i{let box=null,sphere=null;return info.boundingBox!==void 0&&(box=new Box3().fromJSON(info.boundingBox)),info.boundingSphere!==void 0&&(sphere=new Sphere().fromJSON(info.boundingSphere)),{...info,boundingBox:box,boundingSphere:sphere}}),object$1._instanceInfo=data$12.instanceInfo,object$1._availableInstanceIds=data$12._availableInstanceIds,object$1._availableGeometryIds=data$12._availableGeometryIds,object$1._nextIndexStart=data$12.nextIndexStart,object$1._nextVertexStart=data$12.nextVertexStart,object$1._geometryCount=data$12.geometryCount,object$1._maxInstanceCount=data$12.maxInstanceCount,object$1._maxVertexCount=data$12.maxVertexCount,object$1._maxIndexCount=data$12.maxIndexCount,object$1._geometryInitialized=data$12.geometryInitialized,object$1._matricesTexture=getTexture(data$12.matricesTexture.uuid),object$1._indirectTexture=getTexture(data$12.indirectTexture.uuid),data$12.colorsTexture!==void 0&&(object$1._colorsTexture=getTexture(data$12.colorsTexture.uuid)),data$12.boundingSphere!==void 0&&(object$1.boundingSphere=new Sphere().fromJSON(data$12.boundingSphere)),data$12.boundingBox!==void 0&&(object$1.boundingBox=new Box3().fromJSON(data$12.boundingBox));break;case`LOD`:object$1=new LOD;break;case`Line`:object$1=new Line(getGeometry(data$12.geometry),getMaterial(data$12.material));break;case`LineLoop`:object$1=new LineLoop(getGeometry(data$12.geometry),getMaterial(data$12.material));break;case`LineSegments`:object$1=new LineSegments(getGeometry(data$12.geometry),getMaterial(data$12.material));break;case`PointCloud`:case`Points`:object$1=new Points(getGeometry(data$12.geometry),getMaterial(data$12.material));break;case`Sprite`:object$1=new Sprite(getMaterial(data$12.material));break;case`Group`:object$1=new Group;break;case`Bone`:object$1=new Bone;break;default:object$1=new Object3D}if(object$1.uuid=data$12.uuid,data$12.name!==void 0&&(object$1.name=data$12.name),data$12.matrix===void 0?(data$12.position!==void 0&&object$1.position.fromArray(data$12.position),data$12.rotation!==void 0&&object$1.rotation.fromArray(data$12.rotation),data$12.quaternion!==void 0&&object$1.quaternion.fromArray(data$12.quaternion),data$12.scale!==void 0&&object$1.scale.fromArray(data$12.scale)):(object$1.matrix.fromArray(data$12.matrix),data$12.matrixAutoUpdate!==void 0&&(object$1.matrixAutoUpdate=data$12.matrixAutoUpdate),object$1.matrixAutoUpdate&&object$1.matrix.decompose(object$1.position,object$1.quaternion,object$1.scale)),data$12.up!==void 0&&object$1.up.fromArray(data$12.up),data$12.castShadow!==void 0&&(object$1.castShadow=data$12.castShadow),data$12.receiveShadow!==void 0&&(object$1.receiveShadow=data$12.receiveShadow),data$12.shadow&&(data$12.shadow.intensity!==void 0&&(object$1.shadow.intensity=data$12.shadow.intensity),data$12.shadow.bias!==void 0&&(object$1.shadow.bias=data$12.shadow.bias),data$12.shadow.normalBias!==void 0&&(object$1.shadow.normalBias=data$12.shadow.normalBias),data$12.shadow.radius!==void 0&&(object$1.shadow.radius=data$12.shadow.radius),data$12.shadow.mapSize!==void 0&&object$1.shadow.mapSize.fromArray(data$12.shadow.mapSize),data$12.shadow.camera!==void 0&&(object$1.shadow.camera=this.parseObject(data$12.shadow.camera))),data$12.visible!==void 0&&(object$1.visible=data$12.visible),data$12.frustumCulled!==void 0&&(object$1.frustumCulled=data$12.frustumCulled),data$12.renderOrder!==void 0&&(object$1.renderOrder=data$12.renderOrder),data$12.userData!==void 0&&(object$1.userData=data$12.userData),data$12.layers!==void 0&&(object$1.layers.mask=data$12.layers),data$12.children!==void 0){let children=data$12.children;for(let i=0;i`u`&&console.warn(`THREE.ImageBitmapLoader: createImageBitmap() not supported.`),typeof fetch>`u`&&console.warn(`THREE.ImageBitmapLoader: fetch() not supported.`),this.options={premultiplyAlpha:`none`},this._abortController=new AbortController}setOptions(options$1){return this.options=options$1,this}load(url,onLoad,onProgress,onError){url===void 0&&(url=``),this.path!==void 0&&(url=this.path+url),url=this.manager.resolveURL(url);let scope$1=this,cached$1=Cache.get(`image-bitmap:${url}`);if(cached$1!==void 0){if(scope$1.manager.itemStart(url),cached$1.then){cached$1.then(imageBitmap=>{if(_errorMap.has(cached$1)===!0)onError&&onError(_errorMap.get(cached$1)),scope$1.manager.itemError(url),scope$1.manager.itemEnd(url);else return onLoad&&onLoad(imageBitmap),scope$1.manager.itemEnd(url),imageBitmap});return}return setTimeout(function(){onLoad&&onLoad(cached$1),scope$1.manager.itemEnd(url)},0),cached$1}let fetchOptions={};fetchOptions.credentials=this.crossOrigin===`anonymous`?`same-origin`:`include`,fetchOptions.headers=this.requestHeader,fetchOptions.signal=typeof AbortSignal.any==`function`?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;let promise=fetch(url,fetchOptions).then(function(res){return res.blob()}).then(function(blob){return createImageBitmap(blob,Object.assign(scope$1.options,{colorSpaceConversion:`none`}))}).then(function(imageBitmap){return Cache.add(`image-bitmap:${url}`,imageBitmap),onLoad&&onLoad(imageBitmap),scope$1.manager.itemEnd(url),imageBitmap}).catch(function(e$4){onError&&onError(e$4),_errorMap.set(promise,e$4),Cache.remove(`image-bitmap:${url}`),scope$1.manager.itemError(url),scope$1.manager.itemEnd(url)});Cache.add(`image-bitmap:${url}`,promise),scope$1.manager.itemStart(url)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}};let _context;var AudioContext$1=class{static getContext(){return _context===void 0&&(_context=new(window.AudioContext||window.webkitAudioContext)),_context}static setContext(value$1){_context=value$1}},AudioLoader=class extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){let scope$1=this,loader$1=new FileLoader(this.manager);loader$1.setResponseType(`arraybuffer`),loader$1.setPath(this.path),loader$1.setRequestHeader(this.requestHeader),loader$1.setWithCredentials(this.withCredentials),loader$1.load(url,function(buffer$1){try{let bufferCopy=buffer$1.slice(0),context$1=AudioContext$1.getContext();context$1.decodeAudioData(bufferCopy,function(audioBuffer){onLoad(audioBuffer)}).catch(handleError$1)}catch(e$4){handleError$1(e$4)}},onProgress,onError);function handleError$1(e$4){onError?onError(e$4):console.error(e$4),scope$1.manager.itemError(url)}}};const _eyeRight=new Matrix4,_eyeLeft=new Matrix4,_projectionMatrix=new Matrix4;var StereoCamera=class{constructor(){this.type=`StereoCamera`,this.aspect=1,this.eyeSep=.064,this.cameraL=new PerspectiveCamera,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new PerspectiveCamera,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(camera){let cache$1=this._cache,needsUpdate=cache$1.focus!==camera.focus||cache$1.fov!==camera.fov||cache$1.aspect!==camera.aspect*this.aspect||cache$1.near!==camera.near||cache$1.far!==camera.far||cache$1.zoom!==camera.zoom||cache$1.eyeSep!==this.eyeSep;if(needsUpdate){cache$1.focus=camera.focus,cache$1.fov=camera.fov,cache$1.aspect=camera.aspect*this.aspect,cache$1.near=camera.near,cache$1.far=camera.far,cache$1.zoom=camera.zoom,cache$1.eyeSep=this.eyeSep,_projectionMatrix.copy(camera.projectionMatrix);let eyeSepHalf=cache$1.eyeSep/2,eyeSepOnProjection=eyeSepHalf*cache$1.near/cache$1.focus,ymax=cache$1.near*Math.tan(DEG2RAD$1*cache$1.fov*.5)/cache$1.zoom,xmin,xmax;_eyeLeft.elements[12]=-eyeSepHalf,_eyeRight.elements[12]=eyeSepHalf,xmin=-ymax*cache$1.aspect+eyeSepOnProjection,xmax=ymax*cache$1.aspect+eyeSepOnProjection,_projectionMatrix.elements[0]=2*cache$1.near/(xmax-xmin),_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin),this.cameraL.projectionMatrix.copy(_projectionMatrix),xmin=-ymax*cache$1.aspect-eyeSepOnProjection,xmax=ymax*cache$1.aspect-eyeSepOnProjection,_projectionMatrix.elements[0]=2*cache$1.near/(xmax-xmin),_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin),this.cameraR.projectionMatrix.copy(_projectionMatrix)}this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft),this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight)}},ArrayCamera=class extends PerspectiveCamera{constructor(array$1=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=array$1}},Clock$1=class{constructor(autoStart=!0){this.autoStart=autoStart,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let diff=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let newTime=performance.now();diff=(newTime-this.oldTime)/1e3,this.oldTime=newTime,this.elapsedTime+=diff}return diff}};const _position$1$1=new Vector3,_quaternion$1=new Quaternion,_scale$1$1=new Vector3,_forward=new Vector3,_up=new Vector3;var AudioListener=class extends Object3D{constructor(){super(),this.type=`AudioListener`,this.context=AudioContext$1.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Clock$1}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(value$1){return this.filter===null?this.gain.disconnect(this.context.destination):(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)),this.filter=value$1,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(value$1){return this.gain.gain.setTargetAtTime(value$1,this.context.currentTime,.01),this}updateMatrixWorld(force){super.updateMatrixWorld(force);let listener=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(_position$1$1,_quaternion$1,_scale$1$1),_forward.set(0,0,-1).applyQuaternion(_quaternion$1),_up.set(0,1,0).applyQuaternion(_quaternion$1),listener.positionX){let endTime=this.context.currentTime+this.timeDelta;listener.positionX.linearRampToValueAtTime(_position$1$1.x,endTime),listener.positionY.linearRampToValueAtTime(_position$1$1.y,endTime),listener.positionZ.linearRampToValueAtTime(_position$1$1.z,endTime),listener.forwardX.linearRampToValueAtTime(_forward.x,endTime),listener.forwardY.linearRampToValueAtTime(_forward.y,endTime),listener.forwardZ.linearRampToValueAtTime(_forward.z,endTime),listener.upX.linearRampToValueAtTime(_up.x,endTime),listener.upY.linearRampToValueAtTime(_up.y,endTime),listener.upZ.linearRampToValueAtTime(_up.z,endTime)}else listener.setPosition(_position$1$1.x,_position$1$1.y,_position$1$1.z),listener.setOrientation(_forward.x,_forward.y,_forward.z,_up.x,_up.y,_up.z)}},Audio$1=class extends Object3D{constructor(listener){super(),this.type=`Audio`,this.listener=listener,this.context=listener.context,this.gain=this.context.createGain(),this.gain.connect(listener.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType=`empty`,this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(audioNode){return this.hasPlaybackControl=!1,this.sourceType=`audioNode`,this.source=audioNode,this.connect(),this}setMediaElementSource(mediaElement){return this.hasPlaybackControl=!1,this.sourceType=`mediaNode`,this.source=this.context.createMediaElementSource(mediaElement),this.connect(),this}setMediaStreamSource(mediaStream){return this.hasPlaybackControl=!1,this.sourceType=`mediaStreamNode`,this.source=this.context.createMediaStreamSource(mediaStream),this.connect(),this}setBuffer(audioBuffer){return this.buffer=audioBuffer,this.sourceType=`buffer`,this.autoplay&&this.play(),this}play(delay=0){if(this.isPlaying===!0){console.warn(`THREE.Audio: Audio is already playing.`);return}if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}this._startedAt=this.context.currentTime+delay;let source=this.context.createBufferSource();return source.buffer=this.buffer,source.loop=this.loop,source.loopStart=this.loopStart,source.loopEnd=this.loopEnd,source.onended=this.onEnded.bind(this),source.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=source,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress%=this.duration||this.buffer.duration),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(delay=0){if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+delay),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let i=1,l=this.filters.length;i0){this.source.disconnect(this.filters[0]);for(let i=1,l=this.filters.length;i0&&this._mixBufferRegionAdditive(buffer$1,offset$2,this._addIndex*stride,1,stride);for(let i=stride,e$4=stride+stride;i!==e$4;++i)if(buffer$1[i]!==buffer$1[i+stride]){binding.setValue(buffer$1,offset$2);break}}saveOriginalState(){let binding=this.binding,buffer$1=this.buffer,stride=this.valueSize,originalValueOffset=stride*this._origIndex;binding.getValue(buffer$1,originalValueOffset);for(let i=stride,e$4=originalValueOffset;i!==e$4;++i)buffer$1[i]=buffer$1[originalValueOffset+i%stride];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let originalValueOffset=this.valueSize*3;this.binding.setValue(this.buffer,originalValueOffset)}_setAdditiveIdentityNumeric(){let startIndex=this._addIndex*this.valueSize,endIndex=startIndex+this.valueSize;for(let i=startIndex;i=.5)for(let i=0;i!==stride;++i)buffer$1[dstOffset+i]=buffer$1[srcOffset+i]}_slerp(buffer$1,dstOffset,srcOffset,t$1){Quaternion.slerpFlat(buffer$1,dstOffset,buffer$1,dstOffset,buffer$1,srcOffset,t$1)}_slerpAdditive(buffer$1,dstOffset,srcOffset,t$1,stride){let workOffset=this._workIndex*stride;Quaternion.multiplyQuaternionsFlat(buffer$1,workOffset,buffer$1,dstOffset,buffer$1,srcOffset),Quaternion.slerpFlat(buffer$1,dstOffset,buffer$1,dstOffset,buffer$1,workOffset,t$1)}_lerp(buffer$1,dstOffset,srcOffset,t$1,stride){let s=1-t$1;for(let i=0;i!==stride;++i){let j$1=dstOffset+i;buffer$1[j$1]=buffer$1[j$1]*s+buffer$1[srcOffset+i]*t$1}}_lerpAdditive(buffer$1,dstOffset,srcOffset,t$1,stride){for(let i=0;i!==stride;++i){let j$1=dstOffset+i;buffer$1[j$1]=buffer$1[j$1]+buffer$1[srcOffset+i]*t$1}}};const _RESERVED_CHARS_RE=`\\[\\]\\.:\\/`,_reservedRe=RegExp(`[`+_RESERVED_CHARS_RE+`]`,`g`),_wordChar=`[^`+_RESERVED_CHARS_RE+`]`,_wordCharOrDot=`[^`+_RESERVED_CHARS_RE.replace(`\\.`,``)+`]`,_directoryRe=/((?:WC+[\/:])*)/.source.replace(`WC`,_wordChar),_nodeRe=/(WCOD+)?/.source.replace(`WCOD`,_wordCharOrDot),_objectRe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace(`WC`,_wordChar),_propertyRe=/\.(WC+)(?:\[(.+)\])?/.source.replace(`WC`,_wordChar),_trackRe=RegExp(`^`+_directoryRe+_nodeRe+_objectRe+_propertyRe+`$`),_supportedObjectNames=[`material`,`materials`,`bones`,`map`];var Composite=class{constructor(targetGroup,path,optionalParsedPath){let parsedPath=optionalParsedPath||PropertyBinding.parseTrackName(path);this._targetGroup=targetGroup,this._bindings=targetGroup.subscribe_(path,parsedPath)}getValue(array$1,offset$2){this.bind();let firstValidIndex=this._targetGroup.nCachedObjects_,binding=this._bindings[firstValidIndex];binding!==void 0&&binding.getValue(array$1,offset$2)}setValue(array$1,offset$2){let bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i)bindings[i].setValue(array$1,offset$2)}bind(){let bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i)bindings[i].bind()}unbind(){let bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i)bindings[i].unbind()}},PropertyBinding=class PropertyBinding{constructor(rootNode,path,parsedPath){this.path=path,this.parsedPath=parsedPath||PropertyBinding.parseTrackName(path),this.node=PropertyBinding.findNode(rootNode,this.parsedPath.nodeName),this.rootNode=rootNode,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(root$3,path,parsedPath){return root$3&&root$3.isAnimationObjectGroup?new PropertyBinding.Composite(root$3,path,parsedPath):new PropertyBinding(root$3,path,parsedPath)}static sanitizeNodeName(name$2){return name$2.replace(/\s/g,`_`).replace(_reservedRe,``)}static parseTrackName(trackName){let matches$1=_trackRe.exec(trackName);if(matches$1===null)throw Error(`PropertyBinding: Cannot parse trackName: `+trackName);let results={nodeName:matches$1[2],objectName:matches$1[3],objectIndex:matches$1[4],propertyName:matches$1[5],propertyIndex:matches$1[6]},lastDot=results.nodeName&&results.nodeName.lastIndexOf(`.`);if(lastDot!==void 0&&lastDot!==-1){let objectName=results.nodeName.substring(lastDot+1);_supportedObjectNames.indexOf(objectName)!==-1&&(results.nodeName=results.nodeName.substring(0,lastDot),results.objectName=objectName)}if(results.propertyName===null||results.propertyName.length===0)throw Error(`PropertyBinding: can not parse propertyName from trackName: `+trackName);return results}static findNode(root$3,nodeName){if(nodeName===void 0||nodeName===``||nodeName===`.`||nodeName===-1||nodeName===root$3.name||nodeName===root$3.uuid)return root$3;if(root$3.skeleton){let bone=root$3.skeleton.getBoneByName(nodeName);if(bone!==void 0)return bone}if(root$3.children){let searchNodeSubtree=function(children){for(let i=0;i=nCachedObjects){let lastCachedIndex=nCachedObjects++,firstActiveObject=objects[lastCachedIndex];indicesByUUID[firstActiveObject.uuid]=index$1,objects[index$1]=firstActiveObject,indicesByUUID[uuid$1]=lastCachedIndex,objects[lastCachedIndex]=object$1;for(let j$1=0,m=nBindings;j$1!==m;++j$1){let bindingsForPath=bindings[j$1],firstActive=bindingsForPath[lastCachedIndex],binding=bindingsForPath[index$1];bindingsForPath[index$1]=firstActive,bindingsForPath[lastCachedIndex]=binding}}}this.nCachedObjects_=nCachedObjects}uncache(){let objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length,nCachedObjects=this.nCachedObjects_,nObjects=objects.length;for(let i=0,n=arguments.length;i!==n;++i){let object$1=arguments[i],uuid$1=object$1.uuid,index$1=indicesByUUID[uuid$1];if(index$1!==void 0)if(delete indicesByUUID[uuid$1],index$10&&(indicesByUUID[lastObject.uuid]=index$1),objects[index$1]=lastObject,objects.pop();for(let j$1=0,m=nBindings;j$1!==m;++j$1){let bindingsForPath=bindings[j$1];bindingsForPath[index$1]=bindingsForPath[lastIndex],bindingsForPath.pop()}}}this.nCachedObjects_=nCachedObjects}subscribe_(path,parsedPath){let indicesByPath=this._bindingsIndicesByPath,index$1=indicesByPath[path],bindings=this._bindings;if(index$1!==void 0)return bindings[index$1];let paths=this._paths,parsedPaths=this._parsedPaths,objects=this._objects,nObjects=objects.length,nCachedObjects=this.nCachedObjects_,bindingsForPath=Array(nObjects);index$1=bindings.length,indicesByPath[path]=index$1,paths.push(path),parsedPaths.push(parsedPath),bindings.push(bindingsForPath);for(let i=nCachedObjects,n=objects.length;i!==n;++i){let object$1=objects[i];bindingsForPath[i]=new PropertyBinding(object$1,path,parsedPath)}return bindingsForPath}unsubscribe_(path){let indicesByPath=this._bindingsIndicesByPath,index$1=indicesByPath[path];if(index$1!==void 0){let paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,lastBindingsIndex=bindings.length-1,lastBindings=bindings[lastBindingsIndex],lastBindingsPath=path[lastBindingsIndex];indicesByPath[lastBindingsPath]=index$1,bindings[index$1]=lastBindings,bindings.pop(),parsedPaths[index$1]=parsedPaths[lastBindingsIndex],parsedPaths.pop(),paths[index$1]=paths[lastBindingsIndex],paths.pop()}}},AnimationAction=class{constructor(mixer,clip,localRoot=null,blendMode=clip.blendMode){this._mixer=mixer,this._clip=clip,this._localRoot=localRoot,this.blendMode=blendMode;let tracks=clip.tracks,nTracks=tracks.length,interpolants=Array(nTracks),interpolantSettings={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding};for(let i=0;i!==nTracks;++i){let interpolant=tracks[i].createInterpolant(null);interpolants[i]=interpolant,interpolant.settings=interpolantSettings}this._interpolantSettings=interpolantSettings,this._interpolants=interpolants,this._propertyBindings=Array(nTracks),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=LoopRepeat,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(time$2){return this._startTime=time$2,this}setLoop(mode,repetitions){return this.loop=mode,this.repetitions=repetitions,this}setEffectiveWeight(weight){return this.weight=weight,this._effectiveWeight=this.enabled?weight:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(duration$2){return this._scheduleFading(duration$2,0,1)}fadeOut(duration$2){return this._scheduleFading(duration$2,1,0)}crossFadeFrom(fadeOutAction,duration$2,warp=!1){if(fadeOutAction.fadeOut(duration$2),this.fadeIn(duration$2),warp===!0){let fadeInDuration=this._clip.duration,fadeOutDuration=fadeOutAction._clip.duration,startEndRatio=fadeOutDuration/fadeInDuration,endStartRatio=fadeInDuration/fadeOutDuration;fadeOutAction.warp(1,startEndRatio,duration$2),this.warp(endStartRatio,1,duration$2)}return this}crossFadeTo(fadeInAction,duration$2,warp=!1){return fadeInAction.crossFadeFrom(this,duration$2,warp)}stopFading(){let weightInterpolant=this._weightInterpolant;return weightInterpolant!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(weightInterpolant)),this}setEffectiveTimeScale(timeScale){return this.timeScale=timeScale,this._effectiveTimeScale=this.paused?0:timeScale,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(duration$2){return this.timeScale=this._clip.duration/duration$2,this.stopWarping()}syncWith(action){return this.time=action.time,this.timeScale=action.timeScale,this.stopWarping()}halt(duration$2){return this.warp(this._effectiveTimeScale,0,duration$2)}warp(startTimeScale,endTimeScale,duration$2){let mixer=this._mixer,now$1=mixer.time,timeScale=this.timeScale,interpolant=this._timeScaleInterpolant;interpolant===null&&(interpolant=mixer._lendControlInterpolant(),this._timeScaleInterpolant=interpolant);let times=interpolant.parameterPositions,values=interpolant.sampleValues;return times[0]=now$1,times[1]=now$1+duration$2,values[0]=startTimeScale/timeScale,values[1]=endTimeScale/timeScale,this}stopWarping(){let timeScaleInterpolant=this._timeScaleInterpolant;return timeScaleInterpolant!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(timeScaleInterpolant)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(time$2,deltaTime,timeDirection,accuIndex){if(!this.enabled){this._updateWeight(time$2);return}let startTime=this._startTime;if(startTime!==null){let timeRunning=(time$2-startTime)*timeDirection;timeRunning<0||timeDirection===0?deltaTime=0:(this._startTime=null,deltaTime=timeDirection*timeRunning)}deltaTime*=this._updateTimeScale(time$2);let clipTime=this._updateTime(deltaTime),weight=this._updateWeight(time$2);if(weight>0){let interpolants=this._interpolants,propertyMixers=this._propertyBindings;switch(this.blendMode){case AdditiveAnimationBlendMode:for(let j$1=0,m=interpolants.length;j$1!==m;++j$1)interpolants[j$1].evaluate(clipTime),propertyMixers[j$1].accumulateAdditive(weight);break;case NormalAnimationBlendMode:default:for(let j$1=0,m=interpolants.length;j$1!==m;++j$1)interpolants[j$1].evaluate(clipTime),propertyMixers[j$1].accumulate(accuIndex,weight)}}}_updateWeight(time$2){let weight=0;if(this.enabled){weight=this.weight;let interpolant=this._weightInterpolant;if(interpolant!==null){let interpolantValue=interpolant.evaluate(time$2)[0];weight*=interpolantValue,time$2>interpolant.parameterPositions[1]&&(this.stopFading(),interpolantValue===0&&(this.enabled=!1))}}return this._effectiveWeight=weight,weight}_updateTimeScale(time$2){let timeScale=0;if(!this.paused){timeScale=this.timeScale;let interpolant=this._timeScaleInterpolant;if(interpolant!==null){let interpolantValue=interpolant.evaluate(time$2)[0];timeScale*=interpolantValue,time$2>interpolant.parameterPositions[1]&&(this.stopWarping(),timeScale===0?this.paused=!0:this.timeScale=timeScale)}}return this._effectiveTimeScale=timeScale,timeScale}_updateTime(deltaTime){let duration$2=this._clip.duration,loop=this.loop,time$2=this.time+deltaTime,loopCount=this._loopCount,pingPong=loop===LoopPingPong;if(deltaTime===0)return loopCount===-1?time$2:pingPong&&(loopCount&1)==1?duration$2-time$2:time$2;if(loop===LoopOnce){loopCount===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));handle_stop:{if(time$2>=duration$2)time$2=duration$2;else if(time$2<0)time$2=0;else{this.time=time$2;break handle_stop}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=time$2,this._mixer.dispatchEvent({type:`finished`,action:this,direction:deltaTime<0?-1:1})}}else{if(loopCount===-1&&(deltaTime>=0?(loopCount=0,this._setEndings(!0,this.repetitions===0,pingPong)):this._setEndings(this.repetitions===0,!0,pingPong)),time$2>=duration$2||time$2<0){let loopDelta=Math.floor(time$2/duration$2);time$2-=duration$2*loopDelta,loopCount+=Math.abs(loopDelta);let pending=this.repetitions-loopCount;if(pending<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,time$2=deltaTime>0?duration$2:0,this.time=time$2,this._mixer.dispatchEvent({type:`finished`,action:this,direction:deltaTime>0?1:-1});else{if(pending===1){let atStart=deltaTime<0;this._setEndings(atStart,!atStart,pingPong)}else this._setEndings(!1,!1,pingPong);this._loopCount=loopCount,this.time=time$2,this._mixer.dispatchEvent({type:`loop`,action:this,loopDelta})}}else this.time=time$2;if(pingPong&&(loopCount&1)==1)return duration$2-time$2}return time$2}_setEndings(atStart,atEnd,pingPong){let settings=this._interpolantSettings;pingPong?(settings.endingStart=ZeroSlopeEnding,settings.endingEnd=ZeroSlopeEnding):(atStart?settings.endingStart=this.zeroSlopeAtStart?ZeroSlopeEnding:ZeroCurvatureEnding:settings.endingStart=WrapAroundEnding,atEnd?settings.endingEnd=this.zeroSlopeAtEnd?ZeroSlopeEnding:ZeroCurvatureEnding:settings.endingEnd=WrapAroundEnding)}_scheduleFading(duration$2,weightNow,weightThen){let mixer=this._mixer,now$1=mixer.time,interpolant=this._weightInterpolant;interpolant===null&&(interpolant=mixer._lendControlInterpolant(),this._weightInterpolant=interpolant);let times=interpolant.parameterPositions,values=interpolant.sampleValues;return times[0]=now$1,values[0]=weightNow,times[1]=now$1+duration$2,values[1]=weightThen,this}};const _controlInterpolantsResultBuffer=new Float32Array(1);var AnimationMixer=class extends EventDispatcher{constructor(root$3){super(),this._root=root$3,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(action,prototypeAction){let root$3=action._localRoot||this._root,tracks=action._clip.tracks,nTracks=tracks.length,bindings=action._propertyBindings,interpolants=action._interpolants,rootUuid=root$3.uuid,bindingsByRoot=this._bindingsByRootAndName,bindingsByName=bindingsByRoot[rootUuid];bindingsByName===void 0&&(bindingsByName={},bindingsByRoot[rootUuid]=bindingsByName);for(let i=0;i!==nTracks;++i){let track$1=tracks[i],trackName=track$1.name,binding=bindingsByName[trackName];if(binding!==void 0)++binding.referenceCount,bindings[i]=binding;else{if(binding=bindings[i],binding!==void 0){binding._cacheIndex===null&&(++binding.referenceCount,this._addInactiveBinding(binding,rootUuid,trackName));continue}let path=prototypeAction&&prototypeAction._propertyBindings[i].binding.parsedPath;binding=new PropertyMixer(PropertyBinding.create(root$3,trackName,path),track$1.ValueTypeName,track$1.getValueSize()),++binding.referenceCount,this._addInactiveBinding(binding,rootUuid,trackName),bindings[i]=binding}interpolants[i].resultBuffer=binding.buffer}}_activateAction(action){if(!this._isActiveAction(action)){if(action._cacheIndex===null){let rootUuid=(action._localRoot||this._root).uuid,clipUuid=action._clip.uuid,actionsForClip=this._actionsByClip[clipUuid];this._bindAction(action,actionsForClip&&actionsForClip.knownActions[0]),this._addInactiveAction(action,clipUuid,rootUuid)}let bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){let binding=bindings[i];binding.useCount++===0&&(this._lendBinding(binding),binding.saveOriginalState())}this._lendAction(action)}}_deactivateAction(action){if(this._isActiveAction(action)){let bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){let binding=bindings[i];--binding.useCount===0&&(binding.restoreOriginalState(),this._takeBackBinding(binding))}this._takeBackAction(action)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let scope$1=this;this.stats={actions:{get total(){return scope$1._actions.length},get inUse(){return scope$1._nActiveActions}},bindings:{get total(){return scope$1._bindings.length},get inUse(){return scope$1._nActiveBindings}},controlInterpolants:{get total(){return scope$1._controlInterpolants.length},get inUse(){return scope$1._nActiveControlInterpolants}}}}_isActiveAction(action){let index$1=action._cacheIndex;return index$1!==null&&index$1=0;--i)actions[i].stop();return this}update(deltaTime){deltaTime*=this.timeScale;let actions=this._actions,nActions=this._nActiveActions,time$2=this.time+=deltaTime,timeDirection=Math.sign(deltaTime),accuIndex=this._accuIndex^=1;for(let i=0;i!==nActions;++i){let action=actions[i];action._update(time$2,deltaTime,timeDirection,accuIndex)}let bindings=this._bindings,nBindings=this._nActiveBindings;for(let i=0;i!==nBindings;++i)bindings[i].apply(accuIndex);return this}setTime(time$2){this.time=0;for(let i=0;i=this.min.x&&point$3.x<=this.max.x&&point$3.y>=this.min.y&&point$3.y<=this.max.y}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y}getParameter(point$3,target$1){return target$1.set((point$3.x-this.min.x)/(this.max.x-this.min.x),(point$3.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y}clampPoint(point$3,target$1){return target$1.copy(point$3).clamp(this.min,this.max)}distanceToPoint(point$3){return this.clampPoint(point$3,_vector$4).distanceTo(point$3)}intersect(box){return this.min.max(box.min),this.max.min(box.max),this.isEmpty()&&this.makeEmpty(),this}union(box){return this.min.min(box.min),this.max.max(box.max),this}translate(offset$2){return this.min.add(offset$2),this.max.add(offset$2),this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}};const _startP=new Vector3,_startEnd=new Vector3,_d1=new Vector3,_d2=new Vector3,_r$1=new Vector3,_c1=new Vector3,_c2=new Vector3;var Line3=class{constructor(start=new Vector3,end=new Vector3){this.start=start,this.end=end}set(start,end){return this.start.copy(start),this.end.copy(end),this}copy(line){return this.start.copy(line.start),this.end.copy(line.end),this}getCenter(target$1){return target$1.addVectors(this.start,this.end).multiplyScalar(.5)}delta(target$1){return target$1.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t$1,target$1){return this.delta(target$1).multiplyScalar(t$1).add(this.start)}closestPointToPointParameter(point$3,clampToLine){_startP.subVectors(point$3,this.start),_startEnd.subVectors(this.end,this.start);let startEnd2=_startEnd.dot(_startEnd),startEnd_startP=_startEnd.dot(_startP),t$1=startEnd_startP/startEnd2;return clampToLine&&(t$1=clamp$7(t$1,0,1)),t$1}closestPointToPoint(point$3,clampToLine,target$1){let t$1=this.closestPointToPointParameter(point$3,clampToLine);return this.delta(target$1).multiplyScalar(t$1).add(this.start)}distanceSqToLine3(line,c1=_c1,c2=_c2){let EPSILON=1e-8*1e-8,s,t$1,p1=this.start,p2=line.start,q1=this.end,q2=line.end;_d1.subVectors(q1,p1),_d2.subVectors(q2,p2),_r$1.subVectors(p1,p2);let a$1=_d1.dot(_d1),e$4=_d2.dot(_d2),f$2=_d2.dot(_r$1);if(a$1<=EPSILON&&e$4<=EPSILON)return c1.copy(p1),c2.copy(p2),c1.sub(c2),c1.dot(c1);if(a$1<=EPSILON)s=0,t$1=f$2/e$4,t$1=clamp$7(t$1,0,1);else{let c$3=_d1.dot(_r$1);if(e$4<=EPSILON)t$1=0,s=clamp$7(-c$3/a$1,0,1);else{let b$1=_d1.dot(_d2),denom=a$1*e$4-b$1*b$1;s=denom===0?0:clamp$7((b$1*f$2-c$3*e$4)/denom,0,1),t$1=(b$1*s+f$2)/e$4,t$1<0?(t$1=0,s=clamp$7(-c$3/a$1,0,1)):t$1>1&&(t$1=1,s=clamp$7((b$1-c$3)/a$1,0,1))}}return c1.copy(p1).add(_d1.multiplyScalar(s)),c2.copy(p2).add(_d2.multiplyScalar(t$1)),c1.sub(c2),c1.dot(c1)}applyMatrix4(matrix){return this.start.applyMatrix4(matrix),this.end.applyMatrix4(matrix),this}equals(line){return line.start.equals(this.start)&&line.end.equals(this.end)}clone(){return new this.constructor().copy(this)}};const _vector$3=new Vector3;var SpotLightHelper=class extends Object3D{constructor(light,color$2){super(),this.light=light,this.matrixAutoUpdate=!1,this.color=color$2,this.type=`SpotLightHelper`;let geometry=new BufferGeometry,positions=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let i=0,j$1=1,l=32;i1)for(let i=0;i.99999)this.quaternion.set(0,0,0,1);else if(dir.y<-.99999)this.quaternion.set(1,0,0,0);else{_axis.set(dir.z,0,-dir.x).normalize();let radians=Math.acos(dir.y);this.quaternion.setFromAxisAngle(_axis,radians)}}setLength(length,headLength=length*.2,headWidth=headLength*.2){this.line.scale.set(1,Math.max(1e-4,length-headLength),1),this.line.updateMatrix(),this.cone.scale.set(headWidth,headLength,headWidth),this.cone.position.y=length,this.cone.updateMatrix()}setColor(color$2){this.line.material.color.set(color$2),this.cone.material.color.set(color$2)}copy(source){return super.copy(source,!1),this.line.copy(source.line),this.cone.copy(source.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},AxesHelper=class extends LineSegments{constructor(size$2=1){let vertices=[0,0,0,size$2,0,0,0,0,0,0,size$2,0,0,0,0,0,0,size$2],colors=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],geometry=new BufferGeometry;geometry.setAttribute(`position`,new Float32BufferAttribute(vertices,3)),geometry.setAttribute(`color`,new Float32BufferAttribute(colors,3));let material=new LineBasicMaterial({vertexColors:!0,toneMapped:!1});super(geometry,material),this.type=`AxesHelper`}setColors(xAxisColor,yAxisColor,zAxisColor){let color$2=new Color,array$1=this.geometry.attributes.color.array;return color$2.set(xAxisColor),color$2.toArray(array$1,0),color$2.toArray(array$1,3),color$2.set(yAxisColor),color$2.toArray(array$1,6),color$2.toArray(array$1,9),color$2.set(zAxisColor),color$2.toArray(array$1,12),color$2.toArray(array$1,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},ShapePath=class{constructor(){this.type=`ShapePath`,this.color=new Color,this.subPaths=[],this.currentPath=null}moveTo(x$1,y){return this.currentPath=new Path,this.subPaths.push(this.currentPath),this.currentPath.moveTo(x$1,y),this}lineTo(x$1,y){return this.currentPath.lineTo(x$1,y),this}quadraticCurveTo(aCPx,aCPy,aX,aY){return this.currentPath.quadraticCurveTo(aCPx,aCPy,aX,aY),this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){return this.currentPath.bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY),this}splineThru(pts){return this.currentPath.splineThru(pts),this}toShapes(isCCW){function toShapesNoHoles(inSubpaths){let shapes$1=[];for(let i=0,l=inSubpaths.length;i2**-52){if(edgeDy<0&&(edgeLowPt=inPolygon[q],edgeDx=-edgeDx,edgeHighPt=inPolygon[p$4],edgeDy=-edgeDy),inPt.yedgeHighPt.y)continue;if(inPt.y===edgeLowPt.y){if(inPt.x===edgeLowPt.x)return!0}else{let perpEdge=edgeDy*(inPt.x-edgeLowPt.x)-edgeDx*(inPt.y-edgeLowPt.y);if(perpEdge===0)return!0;if(perpEdge<0)continue;inside=!inside}}else{if(inPt.y!==edgeLowPt.y)continue;if(edgeHighPt.x<=inPt.x&&inPt.x<=edgeLowPt.x||edgeLowPt.x<=inPt.x&&inPt.x<=edgeHighPt.x)return!0}}return inside}let isClockWise=ShapeUtils.isClockWise,subPaths=this.subPaths;if(subPaths.length===0)return[];let solid,tmpPath,tmpShape,shapes=[];if(subPaths.length===1)return tmpPath=subPaths[0],tmpShape=new Shape,tmpShape.curves=tmpPath.curves,shapes.push(tmpShape),shapes;let holesFirst=!isClockWise(subPaths[0].getPoints());holesFirst=isCCW?!holesFirst:holesFirst;let betterShapeHoles=[],newShapes=[],newShapeHoles=[],mainIdx=0,tmpPoints;newShapes[mainIdx]=void 0,newShapeHoles[mainIdx]=[];for(let i=0,l=subPaths.length;i1){let ambiguous=!1,toChange=0;for(let sIdx=0,sLen=newShapes.length;sIdx0&&ambiguous===!1&&(newShapeHoles=betterShapeHoles)}let tmpHoles;for(let i=0,il=newShapes.length;iaspect$1?(texture.repeat.x=1,texture.repeat.y=imageAspect/aspect$1,texture.offset.x=0,texture.offset.y=(1-texture.repeat.y)/2):(texture.repeat.x=aspect$1/imageAspect,texture.repeat.y=1,texture.offset.x=(1-texture.repeat.x)/2,texture.offset.y=0),texture}function cover(texture,aspect$1){let imageAspect=texture.image&&texture.image.width?texture.image.width/texture.image.height:1;return imageAspect>aspect$1?(texture.repeat.x=aspect$1/imageAspect,texture.repeat.y=1,texture.offset.x=(1-texture.repeat.x)/2,texture.offset.y=0):(texture.repeat.x=1,texture.repeat.y=imageAspect/aspect$1,texture.offset.x=0,texture.offset.y=(1-texture.repeat.y)/2),texture}function fill(texture){return texture.repeat.x=1,texture.repeat.y=1,texture.offset.x=0,texture.offset.y=0,texture}function getByteLength(width,height,format$2,type){let typeByteLength=getTextureTypeByteLength(type);switch(format$2){case AlphaFormat:return width*height;case RedFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RedIntegerFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RGFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGIntegerFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGBFormat:return width*height*3/typeByteLength.components*typeByteLength.byteLength;case RGBAFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGBAIntegerFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGB_S3TC_DXT1_Format:case RGBA_S3TC_DXT1_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_S3TC_DXT3_Format:case RGBA_S3TC_DXT5_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGB_PVRTC_2BPPV1_Format:case RGBA_PVRTC_2BPPV1_Format:return Math.max(width,16)*Math.max(height,8)/4;case RGB_PVRTC_4BPPV1_Format:case RGBA_PVRTC_4BPPV1_Format:return Math.max(width,8)*Math.max(height,8)/2;case RGB_ETC1_Format:case RGB_ETC2_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_ETC2_EAC_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_4x4_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x4_Format:return Math.floor((width+4)/5)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x5_Format:return Math.floor((width+4)/5)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x5_Format:return Math.floor((width+5)/6)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x6_Format:return Math.floor((width+5)/6)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x5_Format:return Math.floor((width+7)/8)*Math.floor((height+4)/5)*16;case RGBA_ASTC_8x6_Format:return Math.floor((width+7)/8)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x8_Format:return Math.floor((width+7)/8)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x5_Format:return Math.floor((width+9)/10)*Math.floor((height+4)/5)*16;case RGBA_ASTC_10x6_Format:return Math.floor((width+9)/10)*Math.floor((height+5)/6)*16;case RGBA_ASTC_10x8_Format:return Math.floor((width+9)/10)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x10_Format:return Math.floor((width+9)/10)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x10_Format:return Math.floor((width+11)/12)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x12_Format:return Math.floor((width+11)/12)*Math.floor((height+11)/12)*16;case RGBA_BPTC_Format:case RGB_BPTC_SIGNED_Format:case RGB_BPTC_UNSIGNED_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16;case RED_RGTC1_Format:case SIGNED_RED_RGTC1_Format:return Math.ceil(width/4)*Math.ceil(height/4)*8;case RED_GREEN_RGTC2_Format:case SIGNED_RED_GREEN_RGTC2_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16}throw Error(`Unable to determine texture byte length for ${format$2} format.`)}function getTextureTypeByteLength(type){switch(type){case UnsignedByteType:case ByteType:return{byteLength:1,components:1};case UnsignedShortType:case ShortType:case HalfFloatType:return{byteLength:2,components:1};case UnsignedShort4444Type:case UnsignedShort5551Type:return{byteLength:2,components:4};case UnsignedIntType:case IntType:case FloatType:return{byteLength:4,components:1};case UnsignedInt5999Type:return{byteLength:4,components:3}}throw Error(`Unknown texture type ${type}.`)}var TextureUtils=class{static contain(texture,aspect$1){return contain(texture,aspect$1)}static cover(texture,aspect$1){return cover(texture,aspect$1)}static fill(texture){return fill(texture)}static getByteLength(width,height,format$2,type){return getByteLength(width,height,format$2,type)}};typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`register`,{detail:{revision:REVISION}})),typeof window<`u`&&(window.__THREE__?console.warn(`WARNING: Multiple instances of Three.js being imported.`):window.__THREE__=REVISION);var three_module_exports={};__export(three_module_exports,{ACESFilmicToneMapping:()=>ACESFilmicToneMapping,AddEquation:()=>AddEquation,AddOperation:()=>AddOperation,AdditiveAnimationBlendMode:()=>AdditiveAnimationBlendMode,AdditiveBlending:()=>AdditiveBlending,AgXToneMapping:()=>AgXToneMapping,AlphaFormat:()=>AlphaFormat,AlwaysCompare:()=>AlwaysCompare,AlwaysDepth:()=>AlwaysDepth,AlwaysStencilFunc:()=>AlwaysStencilFunc,AmbientLight:()=>AmbientLight,AnimationAction:()=>AnimationAction,AnimationClip:()=>AnimationClip,AnimationLoader:()=>AnimationLoader,AnimationMixer:()=>AnimationMixer,AnimationObjectGroup:()=>AnimationObjectGroup,AnimationUtils:()=>AnimationUtils,ArcCurve:()=>ArcCurve,ArrayCamera:()=>ArrayCamera,ArrowHelper:()=>ArrowHelper,AttachedBindMode:()=>AttachedBindMode,Audio:()=>Audio$1,AudioAnalyser:()=>AudioAnalyser,AudioContext:()=>AudioContext$1,AudioListener:()=>AudioListener,AudioLoader:()=>AudioLoader,AxesHelper:()=>AxesHelper,BackSide:()=>BackSide,BasicDepthPacking:()=>BasicDepthPacking,BasicShadowMap:()=>BasicShadowMap,BatchedMesh:()=>BatchedMesh,Bone:()=>Bone,BooleanKeyframeTrack:()=>BooleanKeyframeTrack,Box2:()=>Box2,Box3:()=>Box3,Box3Helper:()=>Box3Helper,BoxGeometry:()=>BoxGeometry,BoxHelper:()=>BoxHelper,BufferAttribute:()=>BufferAttribute,BufferGeometry:()=>BufferGeometry,BufferGeometryLoader:()=>BufferGeometryLoader,ByteType:()=>ByteType,Cache:()=>Cache,Camera:()=>Camera,CameraHelper:()=>CameraHelper,CanvasTexture:()=>CanvasTexture,CapsuleGeometry:()=>CapsuleGeometry,CatmullRomCurve3:()=>CatmullRomCurve3,CineonToneMapping:()=>CineonToneMapping,CircleGeometry:()=>CircleGeometry,ClampToEdgeWrapping:()=>ClampToEdgeWrapping,Clock:()=>Clock$1,Color:()=>Color,ColorKeyframeTrack:()=>ColorKeyframeTrack,ColorManagement:()=>ColorManagement,CompressedArrayTexture:()=>CompressedArrayTexture,CompressedCubeTexture:()=>CompressedCubeTexture,CompressedTexture:()=>CompressedTexture,CompressedTextureLoader:()=>CompressedTextureLoader,ConeGeometry:()=>ConeGeometry,ConstantAlphaFactor:()=>ConstantAlphaFactor,ConstantColorFactor:()=>ConstantColorFactor,Controls:()=>Controls,CubeCamera:()=>CubeCamera,CubeReflectionMapping:()=>CubeReflectionMapping,CubeRefractionMapping:()=>CubeRefractionMapping,CubeTexture:()=>CubeTexture,CubeTextureLoader:()=>CubeTextureLoader,CubeUVReflectionMapping:()=>CubeUVReflectionMapping,CubicBezierCurve:()=>CubicBezierCurve,CubicBezierCurve3:()=>CubicBezierCurve3,CubicInterpolant:()=>CubicInterpolant,CullFaceBack:()=>CullFaceBack,CullFaceFront:()=>CullFaceFront,CullFaceFrontBack:()=>CullFaceFrontBack,CullFaceNone:()=>CullFaceNone,Curve:()=>Curve,CurvePath:()=>CurvePath,CustomBlending:()=>CustomBlending,CustomToneMapping:()=>CustomToneMapping,CylinderGeometry:()=>CylinderGeometry,Cylindrical:()=>Cylindrical,Data3DTexture:()=>Data3DTexture,DataArrayTexture:()=>DataArrayTexture,DataTexture:()=>DataTexture,DataTextureLoader:()=>DataTextureLoader,DataUtils:()=>DataUtils,DecrementStencilOp:()=>DecrementStencilOp,DecrementWrapStencilOp:()=>DecrementWrapStencilOp,DefaultLoadingManager:()=>DefaultLoadingManager,DepthFormat:()=>DepthFormat,DepthStencilFormat:()=>DepthStencilFormat,DepthTexture:()=>DepthTexture,DetachedBindMode:()=>DetachedBindMode,DirectionalLight:()=>DirectionalLight,DirectionalLightHelper:()=>DirectionalLightHelper,DiscreteInterpolant:()=>DiscreteInterpolant,DodecahedronGeometry:()=>DodecahedronGeometry,DoubleSide:()=>DoubleSide,DstAlphaFactor:()=>DstAlphaFactor,DstColorFactor:()=>DstColorFactor,DynamicCopyUsage:()=>DynamicCopyUsage,DynamicDrawUsage:()=>DynamicDrawUsage,DynamicReadUsage:()=>DynamicReadUsage,EdgesGeometry:()=>EdgesGeometry,EllipseCurve:()=>EllipseCurve,EqualCompare:()=>EqualCompare,EqualDepth:()=>EqualDepth,EqualStencilFunc:()=>EqualStencilFunc,EquirectangularReflectionMapping:()=>EquirectangularReflectionMapping,EquirectangularRefractionMapping:()=>EquirectangularRefractionMapping,Euler:()=>Euler,EventDispatcher:()=>EventDispatcher,ExtrudeGeometry:()=>ExtrudeGeometry,FileLoader:()=>FileLoader,Float16BufferAttribute:()=>Float16BufferAttribute,Float32BufferAttribute:()=>Float32BufferAttribute,FloatType:()=>FloatType,Fog:()=>Fog,FogExp2:()=>FogExp2,FramebufferTexture:()=>FramebufferTexture,FrontSide:()=>FrontSide,Frustum:()=>Frustum,FrustumArray:()=>FrustumArray,GLBufferAttribute:()=>GLBufferAttribute,GLSL1:()=>GLSL1,GLSL3:()=>GLSL3,GreaterCompare:()=>GreaterCompare,GreaterDepth:()=>GreaterDepth,GreaterEqualCompare:()=>GreaterEqualCompare,GreaterEqualDepth:()=>GreaterEqualDepth,GreaterEqualStencilFunc:()=>GreaterEqualStencilFunc,GreaterStencilFunc:()=>GreaterStencilFunc,GridHelper:()=>GridHelper,Group:()=>Group,HalfFloatType:()=>HalfFloatType,HemisphereLight:()=>HemisphereLight,HemisphereLightHelper:()=>HemisphereLightHelper,IcosahedronGeometry:()=>IcosahedronGeometry,ImageBitmapLoader:()=>ImageBitmapLoader,ImageLoader:()=>ImageLoader,ImageUtils:()=>ImageUtils,IncrementStencilOp:()=>IncrementStencilOp,IncrementWrapStencilOp:()=>IncrementWrapStencilOp,InstancedBufferAttribute:()=>InstancedBufferAttribute,InstancedBufferGeometry:()=>InstancedBufferGeometry,InstancedInterleavedBuffer:()=>InstancedInterleavedBuffer,InstancedMesh:()=>InstancedMesh,Int16BufferAttribute:()=>Int16BufferAttribute,Int32BufferAttribute:()=>Int32BufferAttribute,Int8BufferAttribute:()=>Int8BufferAttribute,IntType:()=>IntType,InterleavedBuffer:()=>InterleavedBuffer,InterleavedBufferAttribute:()=>InterleavedBufferAttribute,Interpolant:()=>Interpolant,InterpolateDiscrete:()=>InterpolateDiscrete,InterpolateLinear:()=>InterpolateLinear,InterpolateSmooth:()=>InterpolateSmooth,InterpolationSamplingMode:()=>InterpolationSamplingMode,InterpolationSamplingType:()=>InterpolationSamplingType,InvertStencilOp:()=>InvertStencilOp,KeepStencilOp:()=>KeepStencilOp,KeyframeTrack:()=>KeyframeTrack,LOD:()=>LOD,LatheGeometry:()=>LatheGeometry,Layers:()=>Layers,LessCompare:()=>LessCompare,LessDepth:()=>LessDepth,LessEqualCompare:()=>LessEqualCompare,LessEqualDepth:()=>LessEqualDepth,LessEqualStencilFunc:()=>LessEqualStencilFunc,LessStencilFunc:()=>LessStencilFunc,Light:()=>Light,LightProbe:()=>LightProbe,Line:()=>Line,Line3:()=>Line3,LineBasicMaterial:()=>LineBasicMaterial,LineCurve:()=>LineCurve,LineCurve3:()=>LineCurve3,LineDashedMaterial:()=>LineDashedMaterial,LineLoop:()=>LineLoop,LineSegments:()=>LineSegments,LinearFilter:()=>LinearFilter,LinearInterpolant:()=>LinearInterpolant,LinearMipMapLinearFilter:()=>LinearMipMapLinearFilter,LinearMipMapNearestFilter:()=>LinearMipMapNearestFilter,LinearMipmapLinearFilter:()=>LinearMipmapLinearFilter,LinearMipmapNearestFilter:()=>LinearMipmapNearestFilter,LinearSRGBColorSpace:()=>LinearSRGBColorSpace,LinearToneMapping:()=>LinearToneMapping,LinearTransfer:()=>LinearTransfer,Loader:()=>Loader,LoaderUtils:()=>LoaderUtils,LoadingManager:()=>LoadingManager,LoopOnce:()=>LoopOnce,LoopPingPong:()=>LoopPingPong,LoopRepeat:()=>LoopRepeat,MOUSE:()=>MOUSE,Material:()=>Material,MaterialLoader:()=>MaterialLoader,MathUtils:()=>MathUtils,Matrix2:()=>Matrix2,Matrix3:()=>Matrix3,Matrix4:()=>Matrix4,MaxEquation:()=>MaxEquation,Mesh:()=>Mesh,MeshBasicMaterial:()=>MeshBasicMaterial,MeshDepthMaterial:()=>MeshDepthMaterial,MeshDistanceMaterial:()=>MeshDistanceMaterial,MeshLambertMaterial:()=>MeshLambertMaterial,MeshMatcapMaterial:()=>MeshMatcapMaterial,MeshNormalMaterial:()=>MeshNormalMaterial,MeshPhongMaterial:()=>MeshPhongMaterial,MeshPhysicalMaterial:()=>MeshPhysicalMaterial,MeshStandardMaterial:()=>MeshStandardMaterial,MeshToonMaterial:()=>MeshToonMaterial,MinEquation:()=>MinEquation,MirroredRepeatWrapping:()=>MirroredRepeatWrapping,MixOperation:()=>MixOperation,MultiplyBlending:()=>MultiplyBlending,MultiplyOperation:()=>MultiplyOperation,NearestFilter:()=>NearestFilter,NearestMipMapLinearFilter:()=>NearestMipMapLinearFilter,NearestMipMapNearestFilter:()=>NearestMipMapNearestFilter,NearestMipmapLinearFilter:()=>NearestMipmapLinearFilter,NearestMipmapNearestFilter:()=>NearestMipmapNearestFilter,NeutralToneMapping:()=>NeutralToneMapping,NeverCompare:()=>NeverCompare,NeverDepth:()=>NeverDepth,NeverStencilFunc:()=>NeverStencilFunc,NoBlending:()=>NoBlending,NoColorSpace:()=>NoColorSpace,NoToneMapping:()=>NoToneMapping,NormalAnimationBlendMode:()=>NormalAnimationBlendMode,NormalBlending:()=>NormalBlending,NotEqualCompare:()=>NotEqualCompare,NotEqualDepth:()=>NotEqualDepth,NotEqualStencilFunc:()=>NotEqualStencilFunc,NumberKeyframeTrack:()=>NumberKeyframeTrack,Object3D:()=>Object3D,ObjectLoader:()=>ObjectLoader,ObjectSpaceNormalMap:()=>ObjectSpaceNormalMap,OctahedronGeometry:()=>OctahedronGeometry,OneFactor:()=>OneFactor,OneMinusConstantAlphaFactor:()=>OneMinusConstantAlphaFactor,OneMinusConstantColorFactor:()=>OneMinusConstantColorFactor,OneMinusDstAlphaFactor:()=>OneMinusDstAlphaFactor,OneMinusDstColorFactor:()=>OneMinusDstColorFactor,OneMinusSrcAlphaFactor:()=>OneMinusSrcAlphaFactor,OneMinusSrcColorFactor:()=>OneMinusSrcColorFactor,OrthographicCamera:()=>OrthographicCamera,PCFShadowMap:()=>PCFShadowMap,PCFSoftShadowMap:()=>PCFSoftShadowMap,PMREMGenerator:()=>PMREMGenerator,Path:()=>Path,PerspectiveCamera:()=>PerspectiveCamera,Plane:()=>Plane,PlaneGeometry:()=>PlaneGeometry,PlaneHelper:()=>PlaneHelper,PointLight:()=>PointLight,PointLightHelper:()=>PointLightHelper,Points:()=>Points,PointsMaterial:()=>PointsMaterial,PolarGridHelper:()=>PolarGridHelper,PolyhedronGeometry:()=>PolyhedronGeometry,PositionalAudio:()=>PositionalAudio,PropertyBinding:()=>PropertyBinding,PropertyMixer:()=>PropertyMixer,QuadraticBezierCurve:()=>QuadraticBezierCurve,QuadraticBezierCurve3:()=>QuadraticBezierCurve3,Quaternion:()=>Quaternion,QuaternionKeyframeTrack:()=>QuaternionKeyframeTrack,QuaternionLinearInterpolant:()=>QuaternionLinearInterpolant,RED_GREEN_RGTC2_Format:()=>RED_GREEN_RGTC2_Format,RED_RGTC1_Format:()=>RED_RGTC1_Format,REVISION:()=>REVISION,RGBADepthPacking:()=>RGBADepthPacking,RGBAFormat:()=>RGBAFormat,RGBAIntegerFormat:()=>RGBAIntegerFormat,RGBA_ASTC_10x10_Format:()=>RGBA_ASTC_10x10_Format,RGBA_ASTC_10x5_Format:()=>RGBA_ASTC_10x5_Format,RGBA_ASTC_10x6_Format:()=>RGBA_ASTC_10x6_Format,RGBA_ASTC_10x8_Format:()=>RGBA_ASTC_10x8_Format,RGBA_ASTC_12x10_Format:()=>RGBA_ASTC_12x10_Format,RGBA_ASTC_12x12_Format:()=>RGBA_ASTC_12x12_Format,RGBA_ASTC_4x4_Format:()=>RGBA_ASTC_4x4_Format,RGBA_ASTC_5x4_Format:()=>RGBA_ASTC_5x4_Format,RGBA_ASTC_5x5_Format:()=>RGBA_ASTC_5x5_Format,RGBA_ASTC_6x5_Format:()=>RGBA_ASTC_6x5_Format,RGBA_ASTC_6x6_Format:()=>RGBA_ASTC_6x6_Format,RGBA_ASTC_8x5_Format:()=>RGBA_ASTC_8x5_Format,RGBA_ASTC_8x6_Format:()=>RGBA_ASTC_8x6_Format,RGBA_ASTC_8x8_Format:()=>RGBA_ASTC_8x8_Format,RGBA_BPTC_Format:()=>RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:()=>RGBA_ETC2_EAC_Format,RGBA_PVRTC_2BPPV1_Format:()=>RGBA_PVRTC_2BPPV1_Format,RGBA_PVRTC_4BPPV1_Format:()=>RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT1_Format:()=>RGBA_S3TC_DXT1_Format,RGBA_S3TC_DXT3_Format:()=>RGBA_S3TC_DXT3_Format,RGBA_S3TC_DXT5_Format:()=>RGBA_S3TC_DXT5_Format,RGBDepthPacking:()=>RGBDepthPacking,RGBFormat:()=>RGBFormat,RGBIntegerFormat:()=>RGBIntegerFormat,RGB_BPTC_SIGNED_Format:()=>RGB_BPTC_SIGNED_Format,RGB_BPTC_UNSIGNED_Format:()=>RGB_BPTC_UNSIGNED_Format,RGB_ETC1_Format:()=>RGB_ETC1_Format,RGB_ETC2_Format:()=>RGB_ETC2_Format,RGB_PVRTC_2BPPV1_Format:()=>RGB_PVRTC_2BPPV1_Format,RGB_PVRTC_4BPPV1_Format:()=>RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:()=>RGB_S3TC_DXT1_Format,RGDepthPacking:()=>RGDepthPacking,RGFormat:()=>RGFormat,RGIntegerFormat:()=>RGIntegerFormat,RawShaderMaterial:()=>RawShaderMaterial,Ray:()=>Ray,Raycaster:()=>Raycaster,RectAreaLight:()=>RectAreaLight,RedFormat:()=>RedFormat,RedIntegerFormat:()=>RedIntegerFormat,ReinhardToneMapping:()=>ReinhardToneMapping,RenderTarget:()=>RenderTarget,RenderTarget3D:()=>RenderTarget3D,RepeatWrapping:()=>RepeatWrapping,ReplaceStencilOp:()=>ReplaceStencilOp,ReverseSubtractEquation:()=>ReverseSubtractEquation,RingGeometry:()=>RingGeometry,SIGNED_RED_GREEN_RGTC2_Format:()=>SIGNED_RED_GREEN_RGTC2_Format,SIGNED_RED_RGTC1_Format:()=>SIGNED_RED_RGTC1_Format,SRGBColorSpace:()=>SRGBColorSpace,SRGBTransfer:()=>SRGBTransfer,Scene:()=>Scene,ShaderChunk:()=>ShaderChunk,ShaderLib:()=>ShaderLib,ShaderMaterial:()=>ShaderMaterial,ShadowMaterial:()=>ShadowMaterial,Shape:()=>Shape,ShapeGeometry:()=>ShapeGeometry,ShapePath:()=>ShapePath,ShapeUtils:()=>ShapeUtils,ShortType:()=>ShortType,Skeleton:()=>Skeleton,SkeletonHelper:()=>SkeletonHelper,SkinnedMesh:()=>SkinnedMesh,Source:()=>Source,Sphere:()=>Sphere,SphereGeometry:()=>SphereGeometry,Spherical:()=>Spherical,SphericalHarmonics3:()=>SphericalHarmonics3,SplineCurve:()=>SplineCurve,SpotLight:()=>SpotLight,SpotLightHelper:()=>SpotLightHelper,Sprite:()=>Sprite,SpriteMaterial:()=>SpriteMaterial,SrcAlphaFactor:()=>SrcAlphaFactor,SrcAlphaSaturateFactor:()=>SrcAlphaSaturateFactor,SrcColorFactor:()=>SrcColorFactor,StaticCopyUsage:()=>StaticCopyUsage,StaticDrawUsage:()=>StaticDrawUsage,StaticReadUsage:()=>StaticReadUsage,StereoCamera:()=>StereoCamera,StreamCopyUsage:()=>StreamCopyUsage,StreamDrawUsage:()=>StreamDrawUsage,StreamReadUsage:()=>StreamReadUsage,StringKeyframeTrack:()=>StringKeyframeTrack,SubtractEquation:()=>SubtractEquation,SubtractiveBlending:()=>SubtractiveBlending,TOUCH:()=>TOUCH,TangentSpaceNormalMap:()=>TangentSpaceNormalMap,TetrahedronGeometry:()=>TetrahedronGeometry,Texture:()=>Texture,TextureLoader:()=>TextureLoader,TextureUtils:()=>TextureUtils,Timer:()=>Timer$1,TimestampQuery:()=>TimestampQuery,TorusGeometry:()=>TorusGeometry,TorusKnotGeometry:()=>TorusKnotGeometry,Triangle:()=>Triangle,TriangleFanDrawMode:()=>TriangleFanDrawMode,TriangleStripDrawMode:()=>TriangleStripDrawMode,TrianglesDrawMode:()=>TrianglesDrawMode,TubeGeometry:()=>TubeGeometry,UVMapping:()=>UVMapping,Uint16BufferAttribute:()=>Uint16BufferAttribute,Uint32BufferAttribute:()=>Uint32BufferAttribute,Uint8BufferAttribute:()=>Uint8BufferAttribute,Uint8ClampedBufferAttribute:()=>Uint8ClampedBufferAttribute,Uniform:()=>Uniform,UniformsGroup:()=>UniformsGroup,UniformsLib:()=>UniformsLib,UniformsUtils:()=>UniformsUtils,UnsignedByteType:()=>UnsignedByteType,UnsignedInt248Type:()=>UnsignedInt248Type,UnsignedInt5999Type:()=>UnsignedInt5999Type,UnsignedIntType:()=>UnsignedIntType,UnsignedShort4444Type:()=>UnsignedShort4444Type,UnsignedShort5551Type:()=>UnsignedShort5551Type,UnsignedShortType:()=>UnsignedShortType,VSMShadowMap:()=>VSMShadowMap,Vector2:()=>Vector2,Vector3:()=>Vector3,Vector4:()=>Vector4,VectorKeyframeTrack:()=>VectorKeyframeTrack,VideoFrameTexture:()=>VideoFrameTexture,VideoTexture:()=>VideoTexture,WebGL3DRenderTarget:()=>WebGL3DRenderTarget,WebGLArrayRenderTarget:()=>WebGLArrayRenderTarget,WebGLCoordinateSystem:()=>WebGLCoordinateSystem,WebGLCubeRenderTarget:()=>WebGLCubeRenderTarget,WebGLRenderTarget:()=>WebGLRenderTarget,WebGLRenderer:()=>WebGLRenderer,WebGLUtils:()=>WebGLUtils,WebGPUCoordinateSystem:()=>WebGPUCoordinateSystem,WebXRController:()=>WebXRController,WireframeGeometry:()=>WireframeGeometry,WrapAroundEnding:()=>WrapAroundEnding,ZeroCurvatureEnding:()=>ZeroCurvatureEnding,ZeroFactor:()=>ZeroFactor,ZeroSlopeEnding:()=>ZeroSlopeEnding,ZeroStencilOp:()=>ZeroStencilOp,createCanvasElement:()=>createCanvasElement});function WebGLAnimation(){let context$1=null,isAnimating=!1,animationLoop=null,requestId=null;function onAnimationFrame(time$2,frame$1){animationLoop(time$2,frame$1),requestId=context$1.requestAnimationFrame(onAnimationFrame)}return{start:function(){isAnimating!==!0&&animationLoop!==null&&(requestId=context$1.requestAnimationFrame(onAnimationFrame),isAnimating=!0)},stop:function(){context$1.cancelAnimationFrame(requestId),isAnimating=!1},setAnimationLoop:function(callback){animationLoop=callback},setContext:function(value$1){context$1=value$1}}}function WebGLAttributes(gl){let buffers=new WeakMap;function createBuffer(attribute,bufferType){let array$1=attribute.array,usage=attribute.usage,size$2=array$1.byteLength,buffer$1=gl.createBuffer();gl.bindBuffer(bufferType,buffer$1),gl.bufferData(bufferType,array$1,usage),attribute.onUploadCallback();let type;if(array$1 instanceof Float32Array)type=gl.FLOAT;else if(typeof Float16Array<`u`&&array$1 instanceof Float16Array)type=gl.HALF_FLOAT;else if(array$1 instanceof Uint16Array)type=attribute.isFloat16BufferAttribute?gl.HALF_FLOAT:gl.UNSIGNED_SHORT;else if(array$1 instanceof Int16Array)type=gl.SHORT;else if(array$1 instanceof Uint32Array)type=gl.UNSIGNED_INT;else if(array$1 instanceof Int32Array)type=gl.INT;else if(array$1 instanceof Int8Array)type=gl.BYTE;else if(array$1 instanceof Uint8Array)type=gl.UNSIGNED_BYTE;else if(array$1 instanceof Uint8ClampedArray)type=gl.UNSIGNED_BYTE;else throw Error(`THREE.WebGLAttributes: Unsupported buffer data format: `+array$1);return{buffer:buffer$1,type,bytesPerElement:array$1.BYTES_PER_ELEMENT,version:attribute.version,size:size$2}}function updateBuffer(buffer$1,attribute,bufferType){let array$1=attribute.array,updateRanges=attribute.updateRanges;if(gl.bindBuffer(bufferType,buffer$1),updateRanges.length===0)gl.bufferSubData(bufferType,0,array$1);else{updateRanges.sort((a$1,b$1)=>a$1.start-b$1.start);let mergeIndex=0;for(let i=1;idistanceToPinch+threshold?(hand.inputState.pinching=!1,this.dispatchEvent({type:`pinchend`,handedness:inputSource.handedness,target:this})):!hand.inputState.pinching&&distance<=distanceToPinch-threshold&&(hand.inputState.pinching=!0,this.dispatchEvent({type:`pinchstart`,handedness:inputSource.handedness,target:this}))}else grip!==null&&inputSource.gripSpace&&(gripPose=frame$1.getPose(inputSource.gripSpace,referenceSpace),gripPose!==null&&(grip.matrix.fromArray(gripPose.transform.matrix),grip.matrix.decompose(grip.position,grip.rotation,grip.scale),grip.matrixWorldNeedsUpdate=!0,gripPose.linearVelocity?(grip.hasLinearVelocity=!0,grip.linearVelocity.copy(gripPose.linearVelocity)):grip.hasLinearVelocity=!1,gripPose.angularVelocity?(grip.hasAngularVelocity=!0,grip.angularVelocity.copy(gripPose.angularVelocity)):grip.hasAngularVelocity=!1));targetRay!==null&&(inputPose=frame$1.getPose(inputSource.targetRaySpace,referenceSpace),inputPose===null&&gripPose!==null&&(inputPose=gripPose),inputPose!==null&&(targetRay.matrix.fromArray(inputPose.transform.matrix),targetRay.matrix.decompose(targetRay.position,targetRay.rotation,targetRay.scale),targetRay.matrixWorldNeedsUpdate=!0,inputPose.linearVelocity?(targetRay.hasLinearVelocity=!0,targetRay.linearVelocity.copy(inputPose.linearVelocity)):targetRay.hasLinearVelocity=!1,inputPose.angularVelocity?(targetRay.hasAngularVelocity=!0,targetRay.angularVelocity.copy(inputPose.angularVelocity)):targetRay.hasAngularVelocity=!1,this.dispatchEvent(_moveEvent)))}return targetRay!==null&&(targetRay.visible=inputPose!==null),grip!==null&&(grip.visible=gripPose!==null),hand!==null&&(hand.visible=handPose!==null),this}_getHandJoint(hand,inputjoint){if(hand.joints[inputjoint.jointName]===void 0){let joint=new Group;joint.matrixAutoUpdate=!1,joint.visible=!1,hand.joints[inputjoint.jointName]=joint,hand.add(joint)}return hand.joints[inputjoint.jointName]}},FogExp2=class FogExp2{constructor(color$2,density=25e-5){this.isFogExp2=!0,this.name=``,this.color=new Color(color$2),this.density=density}clone(){return new FogExp2(this.color,this.density)}toJSON(){return{type:`FogExp2`,name:this.name,color:this.color.getHex(),density:this.density}}},Fog=class Fog{constructor(color$2,near=1,far=1e3){this.isFog=!0,this.name=``,this.color=new Color(color$2),this.near=near,this.far=far}clone(){return new Fog(this.color,this.near,this.far)}toJSON(){return{type:`Fog`,name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},Scene=class extends Object3D{constructor(){super(),this.isScene=!0,this.type=`Scene`,this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Euler,this.environmentIntensity=1,this.environmentRotation=new Euler,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}copy(source,recursive){return super.copy(source,recursive),source.background!==null&&(this.background=source.background.clone()),source.environment!==null&&(this.environment=source.environment.clone()),source.fog!==null&&(this.fog=source.fog.clone()),this.backgroundBlurriness=source.backgroundBlurriness,this.backgroundIntensity=source.backgroundIntensity,this.backgroundRotation.copy(source.backgroundRotation),this.environmentIntensity=source.environmentIntensity,this.environmentRotation.copy(source.environmentRotation),source.overrideMaterial!==null&&(this.overrideMaterial=source.overrideMaterial.clone()),this.matrixAutoUpdate=source.matrixAutoUpdate,this}toJSON(meta){let data$12=super.toJSON(meta);return this.fog!==null&&(data$12.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(data$12.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(data$12.object.backgroundIntensity=this.backgroundIntensity),data$12.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(data$12.object.environmentIntensity=this.environmentIntensity),data$12.object.environmentRotation=this.environmentRotation.toArray(),data$12}},InterleavedBuffer=class{constructor(array$1,stride){this.isInterleavedBuffer=!0,this.array=array$1,this.stride=stride,this.count=array$1===void 0?0:array$1.length/stride,this.usage=StaticDrawUsage,this.updateRanges=[],this.version=0,this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(value$1){value$1===!0&&this.version++}setUsage(value$1){return this.usage=value$1,this}addUpdateRange(start,count$2){this.updateRanges.push({start,count:count$2})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){return this.array=new source.array.constructor(source.array),this.count=source.count,this.stride=source.stride,this.usage=source.usage,this}copyAt(index1,interleavedBuffer,index2){index1*=this.stride,index2*=interleavedBuffer.stride;for(let i=0,l=this.stride;iraycaster.far||intersects$1.push({distance,point:_intersectPoint.clone(),uv:Triangle.getInterpolation(_intersectPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2),face:null,object:this})}copy(source,recursive){return super.copy(source,recursive),source.center!==void 0&&this.center.copy(source.center),this.material=source.material,this}};function transformVertex(vertexPosition,mvPosition,center,scale$1,sin$1,cos$1){_alignedPosition.subVectors(vertexPosition,center).addScalar(.5).multiply(scale$1),sin$1===void 0?_rotatedPosition.copy(_alignedPosition):(_rotatedPosition.x=cos$1*_alignedPosition.x-sin$1*_alignedPosition.y,_rotatedPosition.y=sin$1*_alignedPosition.x+cos$1*_alignedPosition.y),vertexPosition.copy(mvPosition),vertexPosition.x+=_rotatedPosition.x,vertexPosition.y+=_rotatedPosition.y,vertexPosition.applyMatrix4(_viewWorldMatrix)}const _v1$2=new Vector3,_v2$1$1=new Vector3;var LOD=class extends Object3D{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type=`LOD`,Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(source){super.copy(source,!1);let levels$1=source.levels;for(let i=0,l=levels$1.length;i0){let i,l;for(i=1,l=levels$1.length;i0){_v1$2.setFromMatrixPosition(this.matrixWorld);let distance=raycaster.ray.origin.distanceTo(_v1$2);this.getObjectForDistance(distance).raycast(raycaster,intersects$1)}}update(camera){let levels$1=this.levels;if(levels$1.length>1){_v1$2.setFromMatrixPosition(camera.matrixWorld),_v2$1$1.setFromMatrixPosition(this.matrixWorld);let distance=_v1$2.distanceTo(_v2$1$1)/camera.zoom;levels$1[0].object.visible=!0;let i,l;for(i=1,l=levels$1.length;i=levelDistance)levels$1[i-1].object.visible=!1,levels$1[i].object.visible=!0;else break}for(this._currentLevel=i-1;i1?null:target$1.copy(line.start).addScaledVector(direction,t$1)}intersectsLine(line){let startSign=this.distanceToPoint(line.start),endSign=this.distanceToPoint(line.end);return startSign<0&&endSign>0||endSign<0&&startSign>0}intersectsBox(box){return box.intersectsPlane(this)}intersectsSphere(sphere){return sphere.intersectsPlane(this)}coplanarPoint(target$1){return target$1.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(matrix,optionalNormalMatrix){let normalMatrix=optionalNormalMatrix||_normalMatrix.getNormalMatrix(matrix),referencePoint=this.coplanarPoint(_vector1).applyMatrix4(matrix),normal=this.normal.applyMatrix3(normalMatrix).normalize();return this.constant=-referencePoint.dot(normal),this}translate(offset$2){return this.constant-=offset$2.dot(this.normal),this}equals(plane){return plane.normal.equals(this.normal)&&plane.constant===this.constant}clone(){return new this.constructor().copy(this)}};const _sphere$3=new Sphere,_defaultSpriteCenter=new Vector2(.5,.5),_vector$6=new Vector3;var Frustum=class{constructor(p0=new Plane,p1=new Plane,p2=new Plane,p3$1=new Plane,p4=new Plane,p5=new Plane){this.planes=[p0,p1,p2,p3$1,p4,p5]}set(p0,p1,p2,p3$1,p4,p5){let planes=this.planes;return planes[0].copy(p0),planes[1].copy(p1),planes[2].copy(p2),planes[3].copy(p3$1),planes[4].copy(p4),planes[5].copy(p5),this}copy(frustum){let planes=this.planes;for(let i=0;i<6;i++)planes[i].copy(frustum.planes[i]);return this}setFromProjectionMatrix(m,coordinateSystem=WebGLCoordinateSystem,reversedDepth=!1){let planes=this.planes,me=m.elements,me0=me[0],me1=me[1],me2=me[2],me3=me[3],me4=me[4],me5=me[5],me6=me[6],me7=me[7],me8=me[8],me9=me[9],me10=me[10],me11=me[11],me12=me[12],me13=me[13],me14=me[14],me15=me[15];if(planes[0].setComponents(me3-me0,me7-me4,me11-me8,me15-me12).normalize(),planes[1].setComponents(me3+me0,me7+me4,me11+me8,me15+me12).normalize(),planes[2].setComponents(me3+me1,me7+me5,me11+me9,me15+me13).normalize(),planes[3].setComponents(me3-me1,me7-me5,me11-me9,me15-me13).normalize(),reversedDepth)planes[4].setComponents(me2,me6,me10,me14).normalize(),planes[5].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize();else if(planes[4].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize(),coordinateSystem===WebGLCoordinateSystem)planes[5].setComponents(me3+me2,me7+me6,me11+me10,me15+me14).normalize();else if(coordinateSystem===WebGPUCoordinateSystem)planes[5].setComponents(me2,me6,me10,me14).normalize();else throw Error(`THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: `+coordinateSystem);return this}intersectsObject(object$1){if(object$1.boundingSphere!==void 0)object$1.boundingSphere===null&&object$1.computeBoundingSphere(),_sphere$3.copy(object$1.boundingSphere).applyMatrix4(object$1.matrixWorld);else{let geometry=object$1.geometry;geometry.boundingSphere===null&&geometry.computeBoundingSphere(),_sphere$3.copy(geometry.boundingSphere).applyMatrix4(object$1.matrixWorld)}return this.intersectsSphere(_sphere$3)}intersectsSprite(sprite){_sphere$3.center.set(0,0,0);let offset$2=_defaultSpriteCenter.distanceTo(sprite.center);return _sphere$3.radius=.7071067811865476+offset$2,_sphere$3.applyMatrix4(sprite.matrixWorld),this.intersectsSphere(_sphere$3)}intersectsSphere(sphere){let planes=this.planes,center=sphere.center,negRadius=-sphere.radius;for(let i=0;i<6;i++){let distance=planes[i].distanceToPoint(center);if(distance0?box.max.x:box.min.x,_vector$6.y=plane.normal.y>0?box.max.y:box.min.y,_vector$6.z=plane.normal.z>0?box.max.z:box.min.z,plane.distanceToPoint(_vector$6)<0)return!1}return!0}containsPoint(point$3){let planes=this.planes;for(let i=0;i<6;i++)if(planes[i].distanceToPoint(point$3)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};const _projScreenMatrix$2=new Matrix4,_frustum$1=new Frustum;var FrustumArray=class FrustumArray{constructor(){this.coordinateSystem=WebGLCoordinateSystem}intersectsObject(object$1,cameraArray){if(!cameraArray.isArrayCamera||cameraArray.cameras.length===0)return!1;for(let i=0;i=pool.length&&pool.push({start:-1,count:-1,z:-1,index:-1});let item=pool[this.index];list$2.push(item),this.index++,item.start=start,item.count=count$2,item.z=z$1,item.index=index$1}reset(){this.list.length=0,this.index=0}};const _matrix$1=new Matrix4,_whiteColor=new Color(1,1,1),_frustum=new Frustum,_frustumArray=new FrustumArray,_box$1=new Box3,_sphere$2=new Sphere,_vector$5=new Vector3,_forward$1=new Vector3,_temp=new Vector3,_renderList=new MultiDrawRenderList,_mesh=new Mesh,_batchIntersects=[];function copyAttributeData(src,target$1,targetOffset=0){let itemSize=target$1.itemSize;if(src.isInterleavedBufferAttribute||src.array.constructor!==target$1.array.constructor){let vertexCount=src.count;for(let i=0;i65535?new Uint32Array(maxIndexCount):new Uint16Array(maxIndexCount);geometry.setIndex(new BufferAttribute(indexArray,1))}this._geometryInitialized=!0}}_validateGeometry(geometry){let batchGeometry=this.geometry;if(!!geometry.getIndex()!=!!batchGeometry.getIndex())throw Error(`THREE.BatchedMesh: All geometries must consistently have "index".`);for(let attributeName in batchGeometry.attributes){if(!geometry.hasAttribute(attributeName))throw Error(`THREE.BatchedMesh: Added geometry missing "${attributeName}". All geometries must have consistent attributes.`);let srcAttribute=geometry.getAttribute(attributeName),dstAttribute=batchGeometry.getAttribute(attributeName);if(srcAttribute.itemSize!==dstAttribute.itemSize||srcAttribute.normalized!==dstAttribute.normalized)throw Error(`THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.`)}}validateInstanceId(instanceId){let instanceInfo=this._instanceInfo;if(instanceId<0||instanceId>=instanceInfo.length||instanceInfo[instanceId].active===!1)throw Error(`THREE.BatchedMesh: Invalid instanceId ${instanceId}. Instance is either out of range or has been deleted.`)}validateGeometryId(geometryId){let geometryInfoList=this._geometryInfo;if(geometryId<0||geometryId>=geometryInfoList.length||geometryInfoList[geometryId].active===!1)throw Error(`THREE.BatchedMesh: Invalid geometryId ${geometryId}. Geometry is either out of range or has been deleted.`)}setCustomSort(func){return this.customSort=func,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);let boundingBox=this.boundingBox,instanceInfo=this._instanceInfo;boundingBox.makeEmpty();for(let i=0,l=instanceInfo.length;i=this.maxInstanceCount;if(atCapacity&&this._availableInstanceIds.length===0)throw Error(`THREE.BatchedMesh: Maximum item count reached.`);let instanceInfo={visible:!0,active:!0,geometryIndex:geometryId},drawId=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(ascIdSort),drawId=this._availableInstanceIds.shift(),this._instanceInfo[drawId]=instanceInfo):(drawId=this._instanceInfo.length,this._instanceInfo.push(instanceInfo));let matricesTexture=this._matricesTexture;_matrix$1.identity().toArray(matricesTexture.image.data,drawId*16),matricesTexture.needsUpdate=!0;let colorsTexture=this._colorsTexture;return colorsTexture&&(_whiteColor.toArray(colorsTexture.image.data,drawId*4),colorsTexture.needsUpdate=!0),this._visibilityChanged=!0,drawId}addGeometry(geometry,reservedVertexCount=-1,reservedIndexCount=-1){this._initializeGeometry(geometry),this._validateGeometry(geometry);let geometryInfo={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},geometryInfoList=this._geometryInfo;geometryInfo.vertexStart=this._nextVertexStart,geometryInfo.reservedVertexCount=reservedVertexCount===-1?geometry.getAttribute(`position`).count:reservedVertexCount;let index$1=geometry.getIndex(),hasIndex=index$1!==null;if(hasIndex&&(geometryInfo.indexStart=this._nextIndexStart,geometryInfo.reservedIndexCount=reservedIndexCount===-1?index$1.count:reservedIndexCount),geometryInfo.indexStart!==-1&&geometryInfo.indexStart+geometryInfo.reservedIndexCount>this._maxIndexCount||geometryInfo.vertexStart+geometryInfo.reservedVertexCount>this._maxVertexCount)throw Error(`THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.`);let geometryId;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(ascIdSort),geometryId=this._availableGeometryIds.shift(),geometryInfoList[geometryId]=geometryInfo):(geometryId=this._geometryCount,this._geometryCount++,geometryInfoList.push(geometryInfo)),this.setGeometryAt(geometryId,geometry),this._nextIndexStart=geometryInfo.indexStart+geometryInfo.reservedIndexCount,this._nextVertexStart=geometryInfo.vertexStart+geometryInfo.reservedVertexCount,geometryId}setGeometryAt(geometryId,geometry){if(geometryId>=this._geometryCount)throw Error(`THREE.BatchedMesh: Maximum geometry count reached.`);this._validateGeometry(geometry);let batchGeometry=this.geometry,hasIndex=batchGeometry.getIndex()!==null,dstIndex=batchGeometry.getIndex(),srcIndex=geometry.getIndex(),geometryInfo=this._geometryInfo[geometryId];if(hasIndex&&srcIndex.count>geometryInfo.reservedIndexCount||geometry.attributes.position.count>geometryInfo.reservedVertexCount)throw Error(`THREE.BatchedMesh: Reserved space not large enough for provided geometry.`);let vertexStart=geometryInfo.vertexStart,reservedVertexCount=geometryInfo.reservedVertexCount;for(let attributeName in geometryInfo.vertexCount=geometry.getAttribute(`position`).count,batchGeometry.attributes){let srcAttribute=geometry.getAttribute(attributeName),dstAttribute=batchGeometry.getAttribute(attributeName);copyAttributeData(srcAttribute,dstAttribute,vertexStart);let itemSize=srcAttribute.itemSize;for(let i=srcAttribute.count,l=reservedVertexCount;i=geometryInfoList.length||geometryInfoList[geometryId].active===!1)return this;let instanceInfo=this._instanceInfo;for(let i=0,l=instanceInfo.length;ii).sort((a$1,b$1)=>geometryInfoList[a$1].vertexStart-geometryInfoList[b$1].vertexStart),geometry=this.geometry;for(let i=0,l=geometryInfoList.length;i=this._geometryCount)return null;let geometry=this.geometry,geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingBox===null){let box=new Box3,index$1=geometry.index,position$2=geometry.attributes.position;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;i=this._geometryCount)return null;let geometry=this.geometry,geometryInfo=this._geometryInfo[geometryId];if(geometryInfo.boundingSphere===null){let sphere=new Sphere;this.getBoundingBoxAt(geometryId,_box$1),_box$1.getCenter(sphere.center);let index$1=geometry.index,position$2=geometry.attributes.position,maxRadiusSq=0;for(let i=geometryInfo.start,l=geometryInfo.start+geometryInfo.count;iinfo.active),requiredVertexLength=Math.max(...validRanges.map(range$1=>range$1.vertexStart+range$1.reservedVertexCount));if(requiredVertexLength>maxVertexCount)throw Error(`BatchedMesh: Geometry vertex values are being used outside the range ${maxIndexCount}. Cannot shrink further.`);if(this.geometry.index){let requiredIndexLength=Math.max(...validRanges.map(range$1=>range$1.indexStart+range$1.reservedIndexCount));if(requiredIndexLength>maxIndexCount)throw Error(`BatchedMesh: Geometry index values are being used outside the range ${maxIndexCount}. Cannot shrink further.`)}let oldGeometry=this.geometry;oldGeometry.dispose(),this._maxVertexCount=maxVertexCount,this._maxIndexCount=maxIndexCount,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new BufferGeometry,this._initializeGeometry(oldGeometry));let geometry=this.geometry;for(let key$2 in oldGeometry.index&©ArrayContents(oldGeometry.index.array,geometry.index.array),oldGeometry.attributes)copyArrayContents(oldGeometry.attributes[key$2].array,geometry.attributes[key$2].array)}raycast(raycaster,intersects$1){let instanceInfo=this._instanceInfo,geometryInfoList=this._geometryInfo,matrixWorld=this.matrixWorld,batchGeometry=this.geometry;_mesh.material=this.material,_mesh.geometry.index=batchGeometry.index,_mesh.geometry.attributes=batchGeometry.attributes,_mesh.geometry.boundingBox===null&&(_mesh.geometry.boundingBox=new Box3),_mesh.geometry.boundingSphere===null&&(_mesh.geometry.boundingSphere=new Sphere);for(let i=0,l=instanceInfo.length;i({...info,boundingBox:info.boundingBox===null?null:info.boundingBox.clone(),boundingSphere:info.boundingSphere===null?null:info.boundingSphere.clone()})),this._instanceInfo=source._instanceInfo.map(info=>({...info})),this._availableInstanceIds=source._availableInstanceIds.slice(),this._availableGeometryIds=source._availableGeometryIds.slice(),this._nextIndexStart=source._nextIndexStart,this._nextVertexStart=source._nextVertexStart,this._geometryCount=source._geometryCount,this._maxInstanceCount=source._maxInstanceCount,this._maxVertexCount=source._maxVertexCount,this._maxIndexCount=source._maxIndexCount,this._geometryInitialized=source._geometryInitialized,this._multiDrawCounts=source._multiDrawCounts.slice(),this._multiDrawStarts=source._multiDrawStarts.slice(),this._indirectTexture=source._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=source._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=source._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(renderer$1,scene,camera,geometry,material){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let index$1=geometry.getIndex(),bytesPerElement=index$1===null?1:index$1.array.BYTES_PER_ELEMENT,instanceInfo=this._instanceInfo,multiDrawStarts=this._multiDrawStarts,multiDrawCounts=this._multiDrawCounts,geometryInfoList=this._geometryInfo,perObjectFrustumCulled=this.perObjectFrustumCulled,indirectTexture=this._indirectTexture,indirectArray=indirectTexture.image.data,frustum=camera.isArrayCamera?_frustumArray:_frustum;perObjectFrustumCulled&&!camera.isArrayCamera&&(_matrix$1.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse).multiply(this.matrixWorld),_frustum.setFromProjectionMatrix(_matrix$1,camera.coordinateSystem,camera.reversedDepth));let multiDrawCount=0;if(this.sortObjects){_matrix$1.copy(this.matrixWorld).invert(),_vector$5.setFromMatrixPosition(camera.matrixWorld).applyMatrix4(_matrix$1),_forward$1.set(0,0,-1).transformDirection(camera.matrixWorld).transformDirection(_matrix$1);for(let i=0,l=instanceInfo.length;i0){let morphAttribute=morphAttributes[keys$3[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;mthresholdSq)return;_intersectPointOnRay.applyMatrix4(object$1.matrixWorld);let distance=raycaster.ray.origin.distanceTo(_intersectPointOnRay);if(!(distanceraycaster.far))return{distance,point:_intersectPointOnSegment.clone().applyMatrix4(object$1.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:object$1}}const _start=new Vector3,_end=new Vector3;var LineSegments=class extends Line{constructor(geometry,material){super(geometry,material),this.isLineSegments=!0,this.type=`LineSegments`}computeLineDistances(){let geometry=this.geometry;if(geometry.index===null){let positionAttribute=geometry.attributes.position,lineDistances=[];for(let i=0,l=positionAttribute.count;i0){let morphAttribute=morphAttributes[keys$3[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;mraycaster.far)return;intersects$1.push({distance,distanceToRay:Math.sqrt(rayPointDistanceSq),point:intersectPoint,index:index$1,face:null,faceIndex:null,barycoord:null,object:object$1})}}var VideoTexture=class extends Texture{constructor(video,mapping,wrapS,wrapT,magFilter=LinearFilter,minFilter=LinearFilter,format$2,type,anisotropy){super(video,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;let scope$1=this;function updateVideo(){scope$1.needsUpdate=!0,scope$1._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo)}`requestVideoFrameCallback`in video&&(this._requestVideoFrameCallbackId=video.requestVideoFrameCallback(updateVideo))}clone(){return new this.constructor(this.image).copy(this)}update(){let video=this.image,hasVideoFrameCallback=`requestVideoFrameCallback`in video;hasVideoFrameCallback===!1&&video.readyState>=video.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),super.dispose()}},VideoFrameTexture=class extends VideoTexture{constructor(mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy){super({},mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(frame$1){this.image=frame$1,this.needsUpdate=!0}},FramebufferTexture=class extends Texture{constructor(width,height){super({width,height}),this.isFramebufferTexture=!0,this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.generateMipmaps=!1,this.needsUpdate=!0}},CompressedTexture=class extends Texture{constructor(mipmaps,width,height,format$2,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy,colorSpace),this.isCompressedTexture=!0,this.image={width,height},this.mipmaps=mipmaps,this.flipY=!1,this.generateMipmaps=!1}},CompressedArrayTexture=class extends CompressedTexture{constructor(mipmaps,width,height,depth,format$2,type){super(mipmaps,width,height,format$2,type),this.isCompressedArrayTexture=!0,this.image.depth=depth,this.wrapR=ClampToEdgeWrapping,this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}},CompressedCubeTexture=class extends CompressedTexture{constructor(images,format$2,type){super(void 0,images[0].width,images[0].height,format$2,type,CubeReflectionMapping),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=images}},CanvasTexture=class extends Texture{constructor(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy){super(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy),this.isCanvasTexture=!0,this.needsUpdate=!0}},DepthTexture=class extends Texture{constructor(width,height,type=UnsignedIntType,mapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,format$2=DepthFormat,depth=1){if(format$2!==DepthFormat&&format$2!==DepthStencilFormat)throw Error(`DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat`);let image$1={width,height,depth};super(image$1,mapping,wrapS,wrapT,magFilter,minFilter,format$2,type,anisotropy),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(source){return super.copy(source),this.source=new Source(Object.assign({},source.image)),this.compareFunction=source.compareFunction,this}toJSON(meta){let data$12=super.toJSON(meta);return this.compareFunction!==null&&(data$12.compareFunction=this.compareFunction),data$12}},CapsuleGeometry=class CapsuleGeometry extends BufferGeometry{constructor(radius=1,height=1,capSegments=4,radialSegments=8,heightSegments=1){super(),this.type=`CapsuleGeometry`,this.parameters={radius,height,capSegments,radialSegments,heightSegments},height=Math.max(0,height),capSegments=Math.max(1,Math.floor(capSegments)),radialSegments=Math.max(3,Math.floor(radialSegments)),heightSegments=Math.max(1,Math.floor(heightSegments));let indices=[],vertices=[],normals=[],uvs=[],halfHeight=height/2,capArcLength=Math.PI/2*radius,cylinderPartLength=height,totalArcLength=2*capArcLength+cylinderPartLength,numVerticalSegments=capSegments*2+heightSegments,verticesPerRow=radialSegments+1,normal=new Vector3,vertex$10=new Vector3;for(let iy=0;iy<=numVerticalSegments;iy++){let currentArcLength=0,profileY=0,profileRadius=0,normalYComponent=0;if(iy<=capSegments){let segmentProgress=iy/capSegments,angle=segmentProgress*Math.PI/2;profileY=-halfHeight-radius*Math.cos(angle),profileRadius=radius*Math.sin(angle),normalYComponent=-radius*Math.cos(angle),currentArcLength=segmentProgress*capArcLength}else if(iy<=capSegments+heightSegments){let segmentProgress=(iy-capSegments)/heightSegments;profileY=-halfHeight+segmentProgress*height,profileRadius=radius,normalYComponent=0,currentArcLength=capArcLength+segmentProgress*cylinderPartLength}else{let segmentProgress=(iy-capSegments-heightSegments)/capSegments,angle=segmentProgress*Math.PI/2;profileY=halfHeight+radius*Math.sin(angle),profileRadius=radius*Math.cos(angle),normalYComponent=radius*Math.sin(angle),currentArcLength=capArcLength+cylinderPartLength+segmentProgress*capArcLength}let v=Math.max(0,Math.min(1,currentArcLength/totalArcLength)),uOffset=0;iy===0?uOffset=.5/radialSegments:iy===numVerticalSegments&&(uOffset=-.5/radialSegments);for(let ix=0;ix<=radialSegments;ix++){let u=ix/radialSegments,theta=u*Math.PI*2,sinTheta=Math.sin(theta),cosTheta=Math.cos(theta);vertex$10.x=-profileRadius*cosTheta,vertex$10.y=profileY,vertex$10.z=profileRadius*sinTheta,vertices.push(vertex$10.x,vertex$10.y,vertex$10.z),normal.set(-profileRadius*cosTheta,normalYComponent,profileRadius*sinTheta),normal.normalize(),normals.push(normal.x,normal.y,normal.z),uvs.push(u+uOffset,v)}if(iy>0){let prevIndexRow=(iy-1)*verticesPerRow;for(let ix=0;ix0&&generateCap(!0),radiusBottom>0&&generateCap(!1)),this.setIndex(indices),this.setAttribute(`position`,new Float32BufferAttribute(vertices,3)),this.setAttribute(`normal`,new Float32BufferAttribute(normals,3)),this.setAttribute(`uv`,new Float32BufferAttribute(uvs,2));function generateTorso(){let normal=new Vector3,vertex$10=new Vector3,groupCount=0,slope=(radiusBottom-radiusTop)/height;for(let y=0;y<=heightSegments;y++){let indexRow=[],v=y/heightSegments,radius=v*(radiusBottom-radiusTop)+radiusTop;for(let x$1=0;x$1<=radialSegments;x$1++){let u=x$1/radialSegments,theta=u*thetaLength+thetaStart,sinTheta=Math.sin(theta),cosTheta=Math.cos(theta);vertex$10.x=radius*sinTheta,vertex$10.y=-v*height+halfHeight,vertex$10.z=radius*cosTheta,vertices.push(vertex$10.x,vertex$10.y,vertex$10.z),normal.set(sinTheta,slope,cosTheta).normalize(),normals.push(normal.x,normal.y,normal.z),uvs.push(u,1-v),indexRow.push(index$1++)}indexArray.push(indexRow)}for(let x$1=0;x$10||y!==0)&&(indices.push(a$1,b$1,d),groupCount+=3),(radiusBottom>0||y!==heightSegments-1)&&(indices.push(b$1,c$3,d),groupCount+=3)}scope$1.addGroup(groupStart,groupCount,0),groupStart+=groupCount}function generateCap(top){let centerIndexStart=index$1,uv=new Vector2,vertex$10=new Vector3,groupCount=0,radius=top===!0?radiusTop:radiusBottom,sign$1=top===!0?1:-1;for(let x$1=1;x$1<=radialSegments;x$1++)vertices.push(0,halfHeight*sign$1,0),normals.push(0,sign$1,0),uvs.push(.5,.5),index$1++;let centerIndexEnd=index$1;for(let x$1=0;x$1<=radialSegments;x$1++){let u=x$1/radialSegments,theta=u*thetaLength+thetaStart,cosTheta=Math.cos(theta),sinTheta=Math.sin(theta);vertex$10.x=radius*sinTheta,vertex$10.y=halfHeight*sign$1,vertex$10.z=radius*cosTheta,vertices.push(vertex$10.x,vertex$10.y,vertex$10.z),normals.push(0,sign$1,0),uv.x=cosTheta*.5+.5,uv.y=sinTheta*.5*sign$1+.5,uvs.push(uv.x,uv.y),index$1++}for(let x$1=0;x$1.9&&min$1<.1&&(x0<.2&&(uvBuffer[i+0]+=1),x1<.2&&(uvBuffer[i+2]+=1),x2<.2&&(uvBuffer[i+4]+=1))}}function pushVertex(vertex$10){vertexBuffer.push(vertex$10.x,vertex$10.y,vertex$10.z)}function getVertexByIndex(index$1,vertex$10){let stride=index$1*3;vertex$10.x=vertices[stride+0],vertex$10.y=vertices[stride+1],vertex$10.z=vertices[stride+2]}function correctUVs(){let a$1=new Vector3,b$1=new Vector3,c$3=new Vector3,centroid=new Vector3,uvA=new Vector2,uvB=new Vector2,uvC=new Vector2;for(let i=0,j$1=0;i0)high=i-1;else{high=i;break}if(i=high,arcLengths[i]===targetArcLength)return i/(il-1);let lengthBefore=arcLengths[i],lengthAfter=arcLengths[i+1],segmentLength=lengthAfter-lengthBefore,segmentFraction=(targetArcLength-lengthBefore)/segmentLength,t$1=(i+segmentFraction)/(il-1);return t$1}getTangent(t$1,optionalTarget){let delta=1e-4,t1=t$1-delta,t2=t$1+delta;t1<0&&(t1=0),t2>1&&(t2=1);let pt1=this.getPoint(t1),pt2=this.getPoint(t2),tangent=optionalTarget||(pt1.isVector2?new Vector2:new Vector3);return tangent.copy(pt2).sub(pt1).normalize(),tangent}getTangentAt(u,optionalTarget){let t$1=this.getUtoTmapping(u);return this.getTangent(t$1,optionalTarget)}computeFrenetFrames(segments,closed$1=!1){let normal=new Vector3,tangents=[],normals=[],binormals=[],vec=new Vector3,mat=new Matrix4;for(let i=0;i<=segments;i++){let u=i/segments;tangents[i]=this.getTangentAt(u,new Vector3)}normals[0]=new Vector3,binormals[0]=new Vector3;let min$1=Number.MAX_VALUE,tx=Math.abs(tangents[0].x),ty=Math.abs(tangents[0].y),tz=Math.abs(tangents[0].z);tx<=min$1&&(min$1=tx,normal.set(1,0,0)),ty<=min$1&&(min$1=ty,normal.set(0,1,0)),tz<=min$1&&normal.set(0,0,1),vec.crossVectors(tangents[0],normal).normalize(),normals[0].crossVectors(tangents[0],vec),binormals[0].crossVectors(tangents[0],normals[0]);for(let i=1;i<=segments;i++){if(normals[i]=normals[i-1].clone(),binormals[i]=binormals[i-1].clone(),vec.crossVectors(tangents[i-1],tangents[i]),vec.length()>2**-52){vec.normalize();let theta=Math.acos(clamp$7(tangents[i-1].dot(tangents[i]),-1,1));normals[i].applyMatrix4(mat.makeRotationAxis(vec,theta))}binormals[i].crossVectors(tangents[i],normals[i])}if(closed$1===!0){let theta=Math.acos(clamp$7(normals[0].dot(normals[segments]),-1,1));theta/=segments,tangents[0].dot(vec.crossVectors(normals[0],normals[segments]))>0&&(theta=-theta);for(let i=1;i<=segments;i++)normals[i].applyMatrix4(mat.makeRotationAxis(tangents[i],theta*i)),binormals[i].crossVectors(tangents[i],normals[i])}return{tangents,normals,binormals}}clone(){return new this.constructor().copy(this)}copy(source){return this.arcLengthDivisions=source.arcLengthDivisions,this}toJSON(){let data$12={metadata:{version:4.7,type:`Curve`,generator:`Curve.toJSON`}};return data$12.arcLengthDivisions=this.arcLengthDivisions,data$12.type=this.type,data$12}fromJSON(json){return this.arcLengthDivisions=json.arcLengthDivisions,this}},EllipseCurve=class extends Curve{constructor(aX=0,aY=0,xRadius=1,yRadius=1,aStartAngle=0,aEndAngle=Math.PI*2,aClockwise=!1,aRotation=0){super(),this.isEllipseCurve=!0,this.type=`EllipseCurve`,this.aX=aX,this.aY=aY,this.xRadius=xRadius,this.yRadius=yRadius,this.aStartAngle=aStartAngle,this.aEndAngle=aEndAngle,this.aClockwise=aClockwise,this.aRotation=aRotation}getPoint(t$1,optionalTarget=new Vector2){let point$3=optionalTarget,twoPi=Math.PI*2,deltaAngle=this.aEndAngle-this.aStartAngle,samePoints=Math.abs(deltaAngle)<2**-52;for(;deltaAngle<0;)deltaAngle+=twoPi;for(;deltaAngle>twoPi;)deltaAngle-=twoPi;deltaAngle<2**-52&&(deltaAngle=samePoints?0:twoPi),this.aClockwise===!0&&!samePoints&&(deltaAngle===twoPi?deltaAngle=-twoPi:deltaAngle-=twoPi);let angle=this.aStartAngle+t$1*deltaAngle,x$1=this.aX+this.xRadius*Math.cos(angle),y=this.aY+this.yRadius*Math.sin(angle);if(this.aRotation!==0){let cos$1=Math.cos(this.aRotation),sin$1=Math.sin(this.aRotation),tx=x$1-this.aX,ty=y-this.aY;x$1=tx*cos$1-ty*sin$1+this.aX,y=tx*sin$1+ty*cos$1+this.aY}return point$3.set(x$1,y)}copy(source){return super.copy(source),this.aX=source.aX,this.aY=source.aY,this.xRadius=source.xRadius,this.yRadius=source.yRadius,this.aStartAngle=source.aStartAngle,this.aEndAngle=source.aEndAngle,this.aClockwise=source.aClockwise,this.aRotation=source.aRotation,this}toJSON(){let data$12=super.toJSON();return data$12.aX=this.aX,data$12.aY=this.aY,data$12.xRadius=this.xRadius,data$12.yRadius=this.yRadius,data$12.aStartAngle=this.aStartAngle,data$12.aEndAngle=this.aEndAngle,data$12.aClockwise=this.aClockwise,data$12.aRotation=this.aRotation,data$12}fromJSON(json){return super.fromJSON(json),this.aX=json.aX,this.aY=json.aY,this.xRadius=json.xRadius,this.yRadius=json.yRadius,this.aStartAngle=json.aStartAngle,this.aEndAngle=json.aEndAngle,this.aClockwise=json.aClockwise,this.aRotation=json.aRotation,this}},ArcCurve=class extends EllipseCurve{constructor(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){super(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise),this.isArcCurve=!0,this.type=`ArcCurve`}};function CubicPoly(){let c0=0,c1=0,c2=0,c3=0;function init(x0,x1,t0,t1){c0=x0,c1=t0,c2=-3*x0+3*x1-2*t0-t1,c3=2*x0-2*x1+t0+t1}return{initCatmullRom:function(x0,x1,x2,x3,tension){init(x1,x2,tension*(x2-x0),tension*(x3-x1))},initNonuniformCatmullRom:function(x0,x1,x2,x3,dt0,dt1,dt2){let t1=(x1-x0)/dt0-(x2-x0)/(dt0+dt1)+(x2-x1)/dt1,t2=(x2-x1)/dt1-(x3-x1)/(dt1+dt2)+(x3-x2)/dt2;t1*=dt1,t2*=dt1,init(x1,x2,t1,t2)},calc:function(t$1){let t2=t$1*t$1,t3=t2*t$1;return c0+c1*t$1+c2*t2+c3*t3}}}const tmp=new Vector3,px$1=new CubicPoly,py=new CubicPoly,pz=new CubicPoly;var CatmullRomCurve3=class extends Curve{constructor(points=[],closed$1=!1,curveType=`centripetal`,tension=.5){super(),this.isCatmullRomCurve3=!0,this.type=`CatmullRomCurve3`,this.points=points,this.closed=closed$1,this.curveType=curveType,this.tension=tension}getPoint(t$1,optionalTarget=new Vector3){let point$3=optionalTarget,points=this.points,l=points.length,p$4=(l-(this.closed?0:1))*t$1,intPoint=Math.floor(p$4),weight=p$4-intPoint;this.closed?intPoint+=intPoint>0?0:(Math.floor(Math.abs(intPoint)/l)+1)*l:weight===0&&intPoint===l-1&&(intPoint=l-2,weight=1);let p0,p3$1;this.closed||intPoint>0?p0=points[(intPoint-1)%l]:(tmp.subVectors(points[0],points[1]).add(points[0]),p0=tmp);let p1=points[intPoint%l],p2=points[(intPoint+1)%l];if(this.closed||intPoint+2points.length-2?points.length-1:intPoint+1],p3$1=points[intPoint>points.length-3?points.length-1:intPoint+2];return point$3.set(CatmullRom(weight,p0.x,p1.x,p2.x,p3$1.x),CatmullRom(weight,p0.y,p1.y,p2.y,p3$1.y)),point$3}copy(source){super.copy(source),this.points=[];for(let i=0,l=source.points.length;i=d){let diff=curveLengths[i]-d,curve=this.curves[i],segmentLength=curve.getLength(),u=segmentLength===0?0:1-diff/segmentLength;return curve.getPointAt(u,optionalTarget)}i++}return null}getLength(){let lens=this.getCurveLengths();return lens[lens.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let lengths=[],sums=0;for(let i=0,l=this.curves.length;i1&&!points[points.length-1].equals(points[0])&&points.push(points[0]),points}copy(source){super.copy(source),this.curves=[];for(let i=0,l=source.curves.length;i0){let firstPoint=curve.getPoint(0);firstPoint.equals(this.currentPoint)||this.lineTo(firstPoint.x,firstPoint.y)}this.curves.push(curve);let lastPoint=curve.getPoint(1);return this.currentPoint.copy(lastPoint),this}copy(source){return super.copy(source),this.currentPoint.copy(source.currentPoint),this}toJSON(){let data$12=super.toJSON();return data$12.currentPoint=this.currentPoint.toArray(),data$12}fromJSON(json){return super.fromJSON(json),this.currentPoint.fromArray(json.currentPoint),this}},Shape=class extends Path{constructor(points){super(points),this.uuid=generateUUID(),this.type=`Shape`,this.holes=[]}getPointsHoles(divisions){let holesPts=[];for(let i=0,l=this.holes.length;i80*dim){minX=1/0,minY=1/0;let maxX=-1/0,maxY=-1/0;for(let i=dim;imaxX&&(maxX=x$1),y>maxY&&(maxY=y)}invSize=Math.max(maxX-minX,maxY-minY),invSize=invSize===0?0:32767/invSize}return earcutLinked(outerNode,triangles,dim,minX,minY,invSize,0),triangles}function linkedList(data$12,start,end,dim,clockwise){let last;if(clockwise===signedArea(data$12,start,end,dim)>0)for(let i=start;i=start;i-=dim)last=insertNode(i/dim|0,data$12[i],data$12[i+1],last);return last&&equals(last,last.next)&&(removeNode(last),last=last.next),last}function filterPoints(start,end){if(!start)return start;end||=start;let p$4=start,again;do if(again=!1,!p$4.steiner&&(equals(p$4,p$4.next)||area(p$4.prev,p$4,p$4.next)===0)){if(removeNode(p$4),p$4=end=p$4.prev,p$4===p$4.next)break;again=!0}else p$4=p$4.next;while(again||p$4!==end);return end}function earcutLinked(ear,triangles,dim,minX,minY,invSize,pass){if(!ear)return;!pass&&invSize&&indexCurve(ear,minX,minY,invSize);let stop$1=ear;for(;ear.prev!==ear.next;){let prev=ear.prev,next=ear.next;if(invSize?isEarHashed(ear,minX,minY,invSize):isEar(ear)){triangles.push(prev.i,ear.i,next.i),removeNode(ear),ear=next.next,stop$1=next.next;continue}if(ear=next,ear===stop$1){pass?pass===1?(ear=cureLocalIntersections(filterPoints(ear),triangles),earcutLinked(ear,triangles,dim,minX,minY,invSize,2)):pass===2&&splitEarcut(ear,triangles,dim,minX,minY,invSize):earcutLinked(filterPoints(ear),triangles,dim,minX,minY,invSize,1);break}}}function isEar(ear){let a$1=ear.prev,b$1=ear,c$3=ear.next;if(area(a$1,b$1,c$3)>=0)return!1;let ax=a$1.x,bx=b$1.x,cx=c$3.x,ay=a$1.y,by=b$1.y,cy=c$3.y,x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy),p$4=c$3.next;for(;p$4!==a$1;){if(p$4.x>=x0&&p$4.x<=x1&&p$4.y>=y0&&p$4.y<=y1&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p$4.x,p$4.y)&&area(p$4.prev,p$4,p$4.next)>=0)return!1;p$4=p$4.next}return!0}function isEarHashed(ear,minX,minY,invSize){let a$1=ear.prev,b$1=ear,c$3=ear.next;if(area(a$1,b$1,c$3)>=0)return!1;let ax=a$1.x,bx=b$1.x,cx=c$3.x,ay=a$1.y,by=b$1.y,cy=c$3.y,x0=Math.min(ax,bx,cx),y0=Math.min(ay,by,cy),x1=Math.max(ax,bx,cx),y1=Math.max(ay,by,cy),minZ=zOrder(x0,y0,minX,minY,invSize),maxZ=zOrder(x1,y1,minX,minY,invSize),p$4=ear.prevZ,n=ear.nextZ;for(;p$4&&p$4.z>=minZ&&n&&n.z<=maxZ;){if(p$4.x>=x0&&p$4.x<=x1&&p$4.y>=y0&&p$4.y<=y1&&p$4!==a$1&&p$4!==c$3&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p$4.x,p$4.y)&&area(p$4.prev,p$4,p$4.next)>=0||(p$4=p$4.prevZ,n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a$1&&n!==c$3&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0))return!1;n=n.nextZ}for(;p$4&&p$4.z>=minZ;){if(p$4.x>=x0&&p$4.x<=x1&&p$4.y>=y0&&p$4.y<=y1&&p$4!==a$1&&p$4!==c$3&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,p$4.x,p$4.y)&&area(p$4.prev,p$4,p$4.next)>=0)return!1;p$4=p$4.prevZ}for(;n&&n.z<=maxZ;){if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a$1&&n!==c$3&&pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return!1;n=n.nextZ}return!0}function cureLocalIntersections(start,triangles){let p$4=start;do{let a$1=p$4.prev,b$1=p$4.next.next;!equals(a$1,b$1)&&intersects(a$1,p$4,p$4.next,b$1)&&locallyInside(a$1,b$1)&&locallyInside(b$1,a$1)&&(triangles.push(a$1.i,p$4.i,b$1.i),removeNode(p$4),removeNode(p$4.next),p$4=start=b$1),p$4=p$4.next}while(p$4!==start);return filterPoints(p$4)}function splitEarcut(start,triangles,dim,minX,minY,invSize){let a$1=start;do{let b$1=a$1.next.next;for(;b$1!==a$1.prev;){if(a$1.i!==b$1.i&&isValidDiagonal(a$1,b$1)){let c$3=splitPolygon(a$1,b$1);a$1=filterPoints(a$1,a$1.next),c$3=filterPoints(c$3,c$3.next),earcutLinked(a$1,triangles,dim,minX,minY,invSize,0),earcutLinked(c$3,triangles,dim,minX,minY,invSize,0);return}b$1=b$1.next}a$1=a$1.next}while(a$1!==start)}function eliminateHoles(data$12,holeIndices,outerNode,dim){let queue$1=[];for(let i=0,len=holeIndices.length;i=p$4.next.y&&p$4.next.y!==p$4.y){let x$1=p$4.x+(hy-p$4.y)*(p$4.next.x-p$4.x)/(p$4.next.y-p$4.y);if(x$1<=hx&&x$1>qx&&(qx=x$1,m=p$4.x=p$4.x&&p$4.x>=mx&&hx!==p$4.x&&pointInTriangle(hym.x||p$4.x===m.x&§orContainsSector(m,p$4)))&&(m=p$4,tanMin=tan)}p$4=p$4.next}while(p$4!==stop$1);return m}function sectorContainsSector(m,p$4){return area(m.prev,m,p$4.prev)<0&&area(p$4.next,m,m.next)<0}function indexCurve(start,minX,minY,invSize){let p$4=start;do p$4.z===0&&(p$4.z=zOrder(p$4.x,p$4.y,minX,minY,invSize)),p$4.prevZ=p$4.prev,p$4.nextZ=p$4.next,p$4=p$4.next;while(p$4!==start);p$4.prevZ.nextZ=null,p$4.prevZ=null,sortLinked(p$4)}function sortLinked(list$2){let numMerges,inSize=1;do{let p$4=list$2,e$4;list$2=null;let tail=null;for(numMerges=0;p$4;){numMerges++;let q=p$4,pSize=0;for(let i=0;i0||qSize>0&&q;)pSize!==0&&(qSize===0||!q||p$4.z<=q.z)?(e$4=p$4,p$4=p$4.nextZ,pSize--):(e$4=q,q=q.nextZ,qSize--),tail?tail.nextZ=e$4:list$2=e$4,e$4.prevZ=tail,tail=e$4;p$4=q}tail.nextZ=null,inSize*=2}while(numMerges>1);return list$2}function zOrder(x$1,y,minX,minY,invSize){return x$1=(x$1-minX)*invSize|0,y=(y-minY)*invSize|0,x$1=(x$1|x$1<<8)&16711935,x$1=(x$1|x$1<<4)&252645135,x$1=(x$1|x$1<<2)&858993459,x$1=(x$1|x$1<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,x$1|y<<1}function getLeftmost(start){let p$4=start,leftmost=start;do(p$4.x=(ax-px$2)*(cy-py$1)&&(ax-px$2)*(by-py$1)>=(bx-px$2)*(ay-py$1)&&(bx-px$2)*(cy-py$1)>=(cx-px$2)*(by-py$1)}function pointInTriangleExceptFirst(ax,ay,bx,by,cx,cy,px$2,py$1){return!(ax===px$2&&ay===py$1)&&pointInTriangle(ax,ay,bx,by,cx,cy,px$2,py$1)}function isValidDiagonal(a$1,b$1){return a$1.next.i!==b$1.i&&a$1.prev.i!==b$1.i&&!intersectsPolygon(a$1,b$1)&&(locallyInside(a$1,b$1)&&locallyInside(b$1,a$1)&&middleInside(a$1,b$1)&&(area(a$1.prev,a$1,b$1.prev)||area(a$1,b$1.prev,b$1))||equals(a$1,b$1)&&area(a$1.prev,a$1,a$1.next)>0&&area(b$1.prev,b$1,b$1.next)>0)}function area(p$4,q,r$1){return(q.y-p$4.y)*(r$1.x-q.x)-(q.x-p$4.x)*(r$1.y-q.y)}function equals(p1,p2){return p1.x===p2.x&&p1.y===p2.y}function intersects(p1,q1,p2,q2){let o1=sign(area(p1,q1,p2)),o2=sign(area(p1,q1,q2)),o3=sign(area(p2,q2,p1)),o4=sign(area(p2,q2,q1));return!!(o1!==o2&&o3!==o4||o1===0&&onSegment(p1,p2,q1)||o2===0&&onSegment(p1,q2,q1)||o3===0&&onSegment(p2,p1,q2)||o4===0&&onSegment(p2,q1,q2))}function onSegment(p$4,q,r$1){return q.x<=Math.max(p$4.x,r$1.x)&&q.x>=Math.min(p$4.x,r$1.x)&&q.y<=Math.max(p$4.y,r$1.y)&&q.y>=Math.min(p$4.y,r$1.y)}function sign(num$2){return num$2>0?1:num$2<0?-1:0}function intersectsPolygon(a$1,b$1){let p$4=a$1;do{if(p$4.i!==a$1.i&&p$4.next.i!==a$1.i&&p$4.i!==b$1.i&&p$4.next.i!==b$1.i&&intersects(p$4,p$4.next,a$1,b$1))return!0;p$4=p$4.next}while(p$4!==a$1);return!1}function locallyInside(a$1,b$1){return area(a$1.prev,a$1,a$1.next)<0?area(a$1,b$1,a$1.next)>=0&&area(a$1,a$1.prev,b$1)>=0:area(a$1,b$1,a$1.prev)<0||area(a$1,a$1.next,b$1)<0}function middleInside(a$1,b$1){let p$4=a$1,inside=!1,px$2=(a$1.x+b$1.x)/2,py$1=(a$1.y+b$1.y)/2;do p$4.y>py$1!=p$4.next.y>py$1&&p$4.next.y!==p$4.y&&px$2<(p$4.next.x-p$4.x)*(py$1-p$4.y)/(p$4.next.y-p$4.y)+p$4.x&&(inside=!inside),p$4=p$4.next;while(p$4!==a$1);return inside}function splitPolygon(a$1,b$1){let a2=createNode(a$1.i,a$1.x,a$1.y),b2=createNode(b$1.i,b$1.x,b$1.y),an$1=a$1.next,bp=b$1.prev;return a$1.next=b$1,b$1.prev=a$1,a2.next=an$1,an$1.prev=a2,b2.next=a2,a2.prev=b2,bp.next=b2,b2.prev=bp,b2}function insertNode(i,x$1,y,last){let p$4=createNode(i,x$1,y);return last?(p$4.next=last.next,p$4.prev=last,last.next.prev=p$4,last.next=p$4):(p$4.prev=p$4,p$4.next=p$4),p$4}function removeNode(p$4){p$4.next.prev=p$4.prev,p$4.prev.next=p$4.next,p$4.prevZ&&(p$4.prevZ.nextZ=p$4.nextZ),p$4.nextZ&&(p$4.nextZ.prevZ=p$4.prevZ)}function createNode(i,x$1,y){return{i,x:x$1,y,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function signedArea(data$12,start,end,dim){let sum=0;for(let i=start,j$1=end-dim;i2&&points[l-1].equals(points[0])&&points.pop()}function addContour(vertices,contour){for(let i=0;i2**-52){let v_prev_len=Math.sqrt(v_prev_lensq),v_next_len=Math.sqrt(v_next_x*v_next_x+v_next_y*v_next_y),ptPrevShift_x=inPrev.x-v_prev_y/v_prev_len,ptPrevShift_y=inPrev.y+v_prev_x/v_prev_len,ptNextShift_x=inNext.x-v_next_y/v_next_len,ptNextShift_y=inNext.y+v_next_x/v_next_len,sf=((ptNextShift_x-ptPrevShift_x)*v_next_y-(ptNextShift_y-ptPrevShift_y)*v_next_x)/(v_prev_x*v_next_y-v_prev_y*v_next_x);v_trans_x=ptPrevShift_x+v_prev_x*sf-inPt.x,v_trans_y=ptPrevShift_y+v_prev_y*sf-inPt.y;let v_trans_lensq=v_trans_x*v_trans_x+v_trans_y*v_trans_y;if(v_trans_lensq<=2)return new Vector2(v_trans_x,v_trans_y);shrink_by=Math.sqrt(v_trans_lensq/2)}else{let direction_eq=!1;v_prev_x>2**-52?v_next_x>2**-52&&(direction_eq=!0):v_prev_x<-(2**-52)?v_next_x<-(2**-52)&&(direction_eq=!0):Math.sign(v_prev_y)===Math.sign(v_next_y)&&(direction_eq=!0),direction_eq?(v_trans_x=-v_prev_y,v_trans_y=v_prev_x,shrink_by=Math.sqrt(v_prev_lensq)):(v_trans_x=v_prev_x,v_trans_y=v_prev_y,shrink_by=Math.sqrt(v_prev_lensq/2))}return new Vector2(v_trans_x/shrink_by,v_trans_y/shrink_by)}let contourMovements=[];for(let i=0,il=contour.length,j$1=il-1,k$3=i+1;i=0;b$1--){let t$1=b$1/bevelSegments,z$1=bevelThickness*Math.cos(t$1*Math.PI/2),bs$1=bevelSize*Math.sin(t$1*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i=0;){let j$1=i,k$3=i-1;k$3<0&&(k$3=contour$1.length-1);for(let s=0,sl=steps$2+bevelSegments*2;s0)&&indices.push(a$1,b$1,d),(iy!==heightSegments-1||thetaEnd0!=value$1>0&&this.version++,this._anisotropy=value$1}get clearcoat(){return this._clearcoat}set clearcoat(value$1){this._clearcoat>0!=value$1>0&&this.version++,this._clearcoat=value$1}get iridescence(){return this._iridescence}set iridescence(value$1){this._iridescence>0!=value$1>0&&this.version++,this._iridescence=value$1}get dispersion(){return this._dispersion}set dispersion(value$1){this._dispersion>0!=value$1>0&&this.version++,this._dispersion=value$1}get sheen(){return this._sheen}set sheen(value$1){this._sheen>0!=value$1>0&&this.version++,this._sheen=value$1}get transmission(){return this._transmission}set transmission(value$1){this._transmission>0!=value$1>0&&this.version++,this._transmission=value$1}copy(source){return super.copy(source),this.defines={STANDARD:``,PHYSICAL:``},this.anisotropy=source.anisotropy,this.anisotropyRotation=source.anisotropyRotation,this.anisotropyMap=source.anisotropyMap,this.clearcoat=source.clearcoat,this.clearcoatMap=source.clearcoatMap,this.clearcoatRoughness=source.clearcoatRoughness,this.clearcoatRoughnessMap=source.clearcoatRoughnessMap,this.clearcoatNormalMap=source.clearcoatNormalMap,this.clearcoatNormalScale.copy(source.clearcoatNormalScale),this.dispersion=source.dispersion,this.ior=source.ior,this.iridescence=source.iridescence,this.iridescenceMap=source.iridescenceMap,this.iridescenceIOR=source.iridescenceIOR,this.iridescenceThicknessRange=[...source.iridescenceThicknessRange],this.iridescenceThicknessMap=source.iridescenceThicknessMap,this.sheen=source.sheen,this.sheenColor.copy(source.sheenColor),this.sheenColorMap=source.sheenColorMap,this.sheenRoughness=source.sheenRoughness,this.sheenRoughnessMap=source.sheenRoughnessMap,this.transmission=source.transmission,this.transmissionMap=source.transmissionMap,this.thickness=source.thickness,this.thicknessMap=source.thicknessMap,this.attenuationDistance=source.attenuationDistance,this.attenuationColor.copy(source.attenuationColor),this.specularIntensity=source.specularIntensity,this.specularIntensityMap=source.specularIntensityMap,this.specularColor.copy(source.specularColor),this.specularColorMap=source.specularColorMap,this}},MeshPhongMaterial=class extends Material{constructor(parameters){super(),this.isMeshPhongMaterial=!0,this.type=`MeshPhongMaterial`,this.color=new Color(16777215),this.specular=new Color(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.color.copy(source.color),this.specular.copy(source.specular),this.shininess=source.shininess,this.map=source.map,this.lightMap=source.lightMap,this.lightMapIntensity=source.lightMapIntensity,this.aoMap=source.aoMap,this.aoMapIntensity=source.aoMapIntensity,this.emissive.copy(source.emissive),this.emissiveMap=source.emissiveMap,this.emissiveIntensity=source.emissiveIntensity,this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.specularMap=source.specularMap,this.alphaMap=source.alphaMap,this.envMap=source.envMap,this.envMapRotation.copy(source.envMapRotation),this.combine=source.combine,this.reflectivity=source.reflectivity,this.refractionRatio=source.refractionRatio,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.wireframeLinecap=source.wireframeLinecap,this.wireframeLinejoin=source.wireframeLinejoin,this.flatShading=source.flatShading,this.fog=source.fog,this}},MeshToonMaterial=class extends Material{constructor(parameters){super(),this.isMeshToonMaterial=!0,this.defines={TOON:``},this.type=`MeshToonMaterial`,this.color=new Color(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.color.copy(source.color),this.map=source.map,this.gradientMap=source.gradientMap,this.lightMap=source.lightMap,this.lightMapIntensity=source.lightMapIntensity,this.aoMap=source.aoMap,this.aoMapIntensity=source.aoMapIntensity,this.emissive.copy(source.emissive),this.emissiveMap=source.emissiveMap,this.emissiveIntensity=source.emissiveIntensity,this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.alphaMap=source.alphaMap,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.wireframeLinecap=source.wireframeLinecap,this.wireframeLinejoin=source.wireframeLinejoin,this.fog=source.fog,this}},MeshNormalMaterial=class extends Material{constructor(parameters){super(),this.isMeshNormalMaterial=!0,this.type=`MeshNormalMaterial`,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(parameters)}copy(source){return super.copy(source),this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.flatShading=source.flatShading,this}},MeshLambertMaterial=class extends Material{constructor(parameters){super(),this.isMeshLambertMaterial=!0,this.type=`MeshLambertMaterial`,this.color=new Color(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Euler,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.color.copy(source.color),this.map=source.map,this.lightMap=source.lightMap,this.lightMapIntensity=source.lightMapIntensity,this.aoMap=source.aoMap,this.aoMapIntensity=source.aoMapIntensity,this.emissive.copy(source.emissive),this.emissiveMap=source.emissiveMap,this.emissiveIntensity=source.emissiveIntensity,this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.specularMap=source.specularMap,this.alphaMap=source.alphaMap,this.envMap=source.envMap,this.envMapRotation.copy(source.envMapRotation),this.combine=source.combine,this.reflectivity=source.reflectivity,this.refractionRatio=source.refractionRatio,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this.wireframeLinecap=source.wireframeLinecap,this.wireframeLinejoin=source.wireframeLinejoin,this.flatShading=source.flatShading,this.fog=source.fog,this}},MeshDepthMaterial=class extends Material{constructor(parameters){super(),this.isMeshDepthMaterial=!0,this.type=`MeshDepthMaterial`,this.depthPacking=BasicDepthPacking,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(parameters)}copy(source){return super.copy(source),this.depthPacking=source.depthPacking,this.map=source.map,this.alphaMap=source.alphaMap,this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.wireframe=source.wireframe,this.wireframeLinewidth=source.wireframeLinewidth,this}},MeshDistanceMaterial=class extends Material{constructor(parameters){super(),this.isMeshDistanceMaterial=!0,this.type=`MeshDistanceMaterial`,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(parameters)}copy(source){return super.copy(source),this.map=source.map,this.alphaMap=source.alphaMap,this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this}},MeshMatcapMaterial=class extends Material{constructor(parameters){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:``},this.type=`MeshMatcapMaterial`,this.color=new Color(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(parameters)}copy(source){return super.copy(source),this.defines={MATCAP:``},this.color.copy(source.color),this.matcap=source.matcap,this.map=source.map,this.bumpMap=source.bumpMap,this.bumpScale=source.bumpScale,this.normalMap=source.normalMap,this.normalMapType=source.normalMapType,this.normalScale.copy(source.normalScale),this.displacementMap=source.displacementMap,this.displacementScale=source.displacementScale,this.displacementBias=source.displacementBias,this.alphaMap=source.alphaMap,this.flatShading=source.flatShading,this.fog=source.fog,this}},LineDashedMaterial=class extends LineBasicMaterial{constructor(parameters){super(),this.isLineDashedMaterial=!0,this.type=`LineDashedMaterial`,this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(parameters)}copy(source){return super.copy(source),this.scale=source.scale,this.dashSize=source.dashSize,this.gapSize=source.gapSize,this}};function convertArray(array$1,type){return!array$1||array$1.constructor===type?array$1:typeof type.BYTES_PER_ELEMENT==`number`?new type(array$1):Array.prototype.slice.call(array$1)}function isTypedArray(object$1){return ArrayBuffer.isView(object$1)&&!(object$1 instanceof DataView)}function getKeyframeOrder(times){function compareTime(i,j$1){return times[i]-times[j$1]}let n=times.length,result=Array(n);for(let i=0;i!==n;++i)result[i]=i;return result.sort(compareTime),result}function sortedArray(values,stride,order$3){let nValues=values.length,result=new values.constructor(nValues);for(let i=0,dstOffset=0;dstOffset!==nValues;++i){let srcOffset=order$3[i]*stride;for(let j$1=0;j$1!==stride;++j$1)result[dstOffset++]=values[srcOffset+j$1]}return result}function flattenJSON(jsonKeys,times,values,valuePropertyName){let i=1,key$2=jsonKeys[0];for(;key$2!==void 0&&key$2[valuePropertyName]===void 0;)key$2=jsonKeys[i++];if(key$2===void 0)return;let value$1=key$2[valuePropertyName];if(value$1!==void 0)if(Array.isArray(value$1))do value$1=key$2[valuePropertyName],value$1!==void 0&&(times.push(key$2.time),values.push(...value$1)),key$2=jsonKeys[i++];while(key$2!==void 0);else if(value$1.toArray!==void 0)do value$1=key$2[valuePropertyName],value$1!==void 0&&(times.push(key$2.time),value$1.toArray(values,values.length)),key$2=jsonKeys[i++];while(key$2!==void 0);else do value$1=key$2[valuePropertyName],value$1!==void 0&&(times.push(key$2.time),values.push(value$1)),key$2=jsonKeys[i++];while(key$2!==void 0)}function subclip(sourceClip,name$2,startFrame,endFrame,fps=30){let clip=sourceClip.clone();clip.name=name$2;let tracks=[];for(let i=0;i=endFrame)){times.push(track$1.times[j$1]);for(let k$3=0;k$3clip.tracks[i].times[0]&&(minStartTime=clip.tracks[i].times[0]);for(let i=0;i=referenceTrack.times[lastIndex]){let startIndex=lastIndex*referenceValueSize+referenceOffset,endIndex=startIndex+referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else{let interpolant=referenceTrack.createInterpolant(),startIndex=referenceOffset,endIndex=referenceValueSize-referenceOffset;interpolant.evaluate(referenceTime),referenceValue=interpolant.resultBuffer.slice(startIndex,endIndex)}if(referenceTrackType===`quaternion`){let referenceQuat=new Quaternion().fromArray(referenceValue).normalize().conjugate();referenceQuat.toArray(referenceValue)}let numTimes=targetTrack.times.length;for(let j$1=0;j$1=t0)){let t1global=pp[1];t$1=t0)break seek}right=i1,i1=0;break linear_scan}break validate_interval}for(;i1>>1;t$1endTime;)--to$1;if(++to$1,from!==0||to$1!==nKeys){from>=to$1&&(to$1=Math.max(to$1,1),from=to$1-1);let stride=this.getValueSize();this.times=times.slice(from,to$1),this.values=this.values.slice(from*stride,to$1*stride)}return this}validate(){let valid$1=!0,valueSize=this.getValueSize();valueSize-Math.floor(valueSize)!==0&&(console.error(`THREE.KeyframeTrack: Invalid value size in track.`,this),valid$1=!1);let times=this.times,values=this.values,nKeys=times.length;nKeys===0&&(console.error(`THREE.KeyframeTrack: Track is empty.`,this),valid$1=!1);let prevTime=null;for(let i=0;i!==nKeys;i++){let currTime=times[i];if(typeof currTime==`number`&&isNaN(currTime)){console.error(`THREE.KeyframeTrack: Time is not a valid number.`,this,i,currTime),valid$1=!1;break}if(prevTime!==null&&prevTime>currTime){console.error(`THREE.KeyframeTrack: Out of order keys.`,this,i,currTime,prevTime),valid$1=!1;break}prevTime=currTime}if(values!==void 0&&isTypedArray(values))for(let i=0,n=values.length;i!==n;++i){let value$1=values[i];if(isNaN(value$1)){console.error(`THREE.KeyframeTrack: Value is not a valid number.`,this,i,value$1),valid$1=!1;break}}return valid$1}optimize(){let times=this.times.slice(),values=this.values.slice(),stride=this.getValueSize(),smoothInterpolation=this.getInterpolation()===InterpolateSmooth,lastIndex=times.length-1,writeIndex=1;for(let i=1;i0){times[writeIndex]=times[lastIndex];for(let readOffset=lastIndex*stride,writeOffset=writeIndex*stride,j$1=0;j$1!==stride;++j$1)values[writeOffset+j$1]=values[readOffset+j$1];++writeIndex}return writeIndex===times.length?(this.times=times,this.values=values):(this.times=times.slice(0,writeIndex),this.values=values.slice(0,writeIndex*stride)),this}clone(){let times=this.times.slice(),values=this.values.slice(),TypedKeyframeTrack=this.constructor,track$1=new TypedKeyframeTrack(this.name,times,values);return track$1.createInterpolant=this.createInterpolant,track$1}};KeyframeTrack.prototype.ValueTypeName=``,KeyframeTrack.prototype.TimeBufferType=Float32Array,KeyframeTrack.prototype.ValueBufferType=Float32Array,KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;var BooleanKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values){super(name$2,times,values)}};BooleanKeyframeTrack.prototype.ValueTypeName=`bool`,BooleanKeyframeTrack.prototype.ValueBufferType=Array,BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;var ColorKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values,interpolation){super(name$2,times,values,interpolation)}};ColorKeyframeTrack.prototype.ValueTypeName=`color`;var NumberKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values,interpolation){super(name$2,times,values,interpolation)}};NumberKeyframeTrack.prototype.ValueTypeName=`number`;var QuaternionLinearInterpolant=class extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t$1,t1){let result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,alpha$1=(t$1-t0)/(t1-t0),offset$2=i1*stride;for(let end=offset$2+stride;offset$2!==end;offset$2+=4)Quaternion.slerpFlat(result,0,values,offset$2-stride,values,offset$2,alpha$1);return result}},QuaternionKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values,interpolation){super(name$2,times,values,interpolation)}InterpolantFactoryMethodLinear(result){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),result)}};QuaternionKeyframeTrack.prototype.ValueTypeName=`quaternion`,QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;var StringKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values){super(name$2,times,values)}};StringKeyframeTrack.prototype.ValueTypeName=`string`,StringKeyframeTrack.prototype.ValueBufferType=Array,StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete,StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0,StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;var VectorKeyframeTrack=class extends KeyframeTrack{constructor(name$2,times,values,interpolation){super(name$2,times,values,interpolation)}};VectorKeyframeTrack.prototype.ValueTypeName=`vector`;var AnimationClip=class{constructor(name$2=``,duration$2=-1,tracks=[],blendMode=NormalAnimationBlendMode){this.name=name$2,this.tracks=tracks,this.duration=duration$2,this.blendMode=blendMode,this.uuid=generateUUID(),this.duration<0&&this.resetDuration()}static parse(json){let tracks=[],jsonTracks=json.tracks,frameTime=1/(json.fps||1);for(let i=0,n=jsonTracks.length;i!==n;++i)tracks.push(parseKeyframeTrack(jsonTracks[i]).scale(frameTime));let clip=new this(json.name,json.duration,tracks,json.blendMode);return clip.uuid=json.uuid,clip}static toJSON(clip){let tracks=[],clipTracks=clip.tracks,json={name:clip.name,duration:clip.duration,tracks,uuid:clip.uuid,blendMode:clip.blendMode};for(let i=0,n=clipTracks.length;i!==n;++i)tracks.push(KeyframeTrack.toJSON(clipTracks[i]));return json}static CreateFromMorphTargetSequence(name$2,morphTargetSequence,fps,noLoop){let numMorphTargets=morphTargetSequence.length,tracks=[];for(let i=0;i1){let name$2=parts[1],animationMorphTargets=animationToMorphTargets[name$2];animationMorphTargets||(animationToMorphTargets[name$2]=animationMorphTargets=[]),animationMorphTargets.push(morphTarget)}}let clips=[];for(let name$2 in animationToMorphTargets)clips.push(this.CreateFromMorphTargetSequence(name$2,animationToMorphTargets[name$2],fps,noLoop));return clips}static parseAnimation(animation,bones){if(console.warn(`THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185`),!animation)return console.error(`THREE.AnimationClip: No animation in JSONLoader data.`),null;let addNonemptyTrack=function(trackType,trackName,animationKeys,propertyName,destTracks){if(animationKeys.length!==0){let times=[],values=[];flattenJSON(animationKeys,times,values,propertyName),times.length!==0&&destTracks.push(new trackType(trackName,times,values))}},tracks=[],clipName=animation.name||`default`,fps=animation.fps||30,blendMode=animation.blendMode,duration$2=animation.length||-1,hierarchyTracks=animation.hierarchy||[];for(let h$1=0;h$1{onLoad&&onLoad(cached$1),this.manager.itemEnd(url)},0),cached$1;if(loading[url]!==void 0){loading[url].push({onLoad,onProgress,onError});return}loading[url]=[],loading[url].push({onLoad,onProgress,onError});let req=new Request(url,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?`include`:`same-origin`,signal:typeof AbortSignal.any==`function`?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),mimeType=this.mimeType,responseType=this.responseType;fetch(req).then(response=>{if(response.status===200||response.status===0){if(response.status===0&&console.warn(`THREE.FileLoader: HTTP Status 0 received.`),typeof ReadableStream>`u`||response.body===void 0||response.body.getReader===void 0)return response;let callbacks=loading[url],reader=response.body.getReader(),contentLength=response.headers.get(`X-File-Size`)||response.headers.get(`Content-Length`),total=contentLength?parseInt(contentLength):0,lengthComputable=total!==0,loaded=0,stream=new ReadableStream({start(controller){readData();function readData(){reader.read().then(({done,value:value$1})=>{if(done)controller.close();else{loaded+=value$1.byteLength;let event=new ProgressEvent(`progress`,{lengthComputable,loaded,total});for(let i=0,il=callbacks.length;i{controller.error(e$4)})}}});return new Response(stream)}else throw new HttpError(`fetch for "${response.url}" responded with ${response.status}: ${response.statusText}`,response)}).then(response=>{switch(responseType){case`arraybuffer`:return response.arrayBuffer();case`blob`:return response.blob();case`document`:return response.text().then(text$5=>{let parser=new DOMParser;return parser.parseFromString(text$5,mimeType)});case`json`:return response.json();default:if(mimeType===``)return response.text();{let re$2=/charset="?([^;"\s]*)"?/i,exec=re$2.exec(mimeType),label=exec&&exec[1]?exec[1].toLowerCase():void 0,decoder=new TextDecoder(label);return response.arrayBuffer().then(ab=>decoder.decode(ab))}}}).then(data$12=>{Cache.add(`file:${url}`,data$12);let callbacks=loading[url];delete loading[url];for(let i=0,il=callbacks.length;i{let callbacks=loading[url];if(callbacks===void 0)throw this.manager.itemError(url),err;delete loading[url];for(let i=0,il=callbacks.length;i{this.manager.itemEnd(url)}),this.manager.itemStart(url)}setResponseType(value$1){return this.responseType=value$1,this}setMimeType(value$1){return this.mimeType=value$1,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}},AnimationLoader=class extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){let scope$1=this,loader$1=new FileLoader(this.manager);loader$1.setPath(this.path),loader$1.setRequestHeader(this.requestHeader),loader$1.setWithCredentials(this.withCredentials),loader$1.load(url,function(text$5){try{onLoad(scope$1.parse(JSON.parse(text$5)))}catch(e$4){onError?onError(e$4):console.error(e$4),scope$1.manager.itemError(url)}},onProgress,onError)}parse(json){let animations$1=[];for(let i=0;i0:material.vertexColors=json.vertexColors),json.uniforms!==void 0)for(let name$2 in json.uniforms){let uniform=json.uniforms[name$2];switch(material.uniforms[name$2]={},uniform.type){case`t`:material.uniforms[name$2].value=getTexture(uniform.value);break;case`c`:material.uniforms[name$2].value=new Color().setHex(uniform.value);break;case`v2`:material.uniforms[name$2].value=new Vector2().fromArray(uniform.value);break;case`v3`:material.uniforms[name$2].value=new Vector3().fromArray(uniform.value);break;case`v4`:material.uniforms[name$2].value=new Vector4().fromArray(uniform.value);break;case`m3`:material.uniforms[name$2].value=new Matrix3().fromArray(uniform.value);break;case`m4`:material.uniforms[name$2].value=new Matrix4().fromArray(uniform.value);break;default:material.uniforms[name$2].value=uniform.value}}if(json.defines!==void 0&&(material.defines=json.defines),json.vertexShader!==void 0&&(material.vertexShader=json.vertexShader),json.fragmentShader!==void 0&&(material.fragmentShader=json.fragmentShader),json.glslVersion!==void 0&&(material.glslVersion=json.glslVersion),json.extensions!==void 0)for(let key$2 in json.extensions)material.extensions[key$2]=json.extensions[key$2];if(json.lights!==void 0&&(material.lights=json.lights),json.clipping!==void 0&&(material.clipping=json.clipping),json.size!==void 0&&(material.size=json.size),json.sizeAttenuation!==void 0&&(material.sizeAttenuation=json.sizeAttenuation),json.map!==void 0&&(material.map=getTexture(json.map)),json.matcap!==void 0&&(material.matcap=getTexture(json.matcap)),json.alphaMap!==void 0&&(material.alphaMap=getTexture(json.alphaMap)),json.bumpMap!==void 0&&(material.bumpMap=getTexture(json.bumpMap)),json.bumpScale!==void 0&&(material.bumpScale=json.bumpScale),json.normalMap!==void 0&&(material.normalMap=getTexture(json.normalMap)),json.normalMapType!==void 0&&(material.normalMapType=json.normalMapType),json.normalScale!==void 0){let normalScale=json.normalScale;Array.isArray(normalScale)===!1&&(normalScale=[normalScale,normalScale]),material.normalScale=new Vector2().fromArray(normalScale)}return json.displacementMap!==void 0&&(material.displacementMap=getTexture(json.displacementMap)),json.displacementScale!==void 0&&(material.displacementScale=json.displacementScale),json.displacementBias!==void 0&&(material.displacementBias=json.displacementBias),json.roughnessMap!==void 0&&(material.roughnessMap=getTexture(json.roughnessMap)),json.metalnessMap!==void 0&&(material.metalnessMap=getTexture(json.metalnessMap)),json.emissiveMap!==void 0&&(material.emissiveMap=getTexture(json.emissiveMap)),json.emissiveIntensity!==void 0&&(material.emissiveIntensity=json.emissiveIntensity),json.specularMap!==void 0&&(material.specularMap=getTexture(json.specularMap)),json.specularIntensityMap!==void 0&&(material.specularIntensityMap=getTexture(json.specularIntensityMap)),json.specularColorMap!==void 0&&(material.specularColorMap=getTexture(json.specularColorMap)),json.envMap!==void 0&&(material.envMap=getTexture(json.envMap)),json.envMapRotation!==void 0&&material.envMapRotation.fromArray(json.envMapRotation),json.envMapIntensity!==void 0&&(material.envMapIntensity=json.envMapIntensity),json.reflectivity!==void 0&&(material.reflectivity=json.reflectivity),json.refractionRatio!==void 0&&(material.refractionRatio=json.refractionRatio),json.lightMap!==void 0&&(material.lightMap=getTexture(json.lightMap)),json.lightMapIntensity!==void 0&&(material.lightMapIntensity=json.lightMapIntensity),json.aoMap!==void 0&&(material.aoMap=getTexture(json.aoMap)),json.aoMapIntensity!==void 0&&(material.aoMapIntensity=json.aoMapIntensity),json.gradientMap!==void 0&&(material.gradientMap=getTexture(json.gradientMap)),json.clearcoatMap!==void 0&&(material.clearcoatMap=getTexture(json.clearcoatMap)),json.clearcoatRoughnessMap!==void 0&&(material.clearcoatRoughnessMap=getTexture(json.clearcoatRoughnessMap)),json.clearcoatNormalMap!==void 0&&(material.clearcoatNormalMap=getTexture(json.clearcoatNormalMap)),json.clearcoatNormalScale!==void 0&&(material.clearcoatNormalScale=new Vector2().fromArray(json.clearcoatNormalScale)),json.iridescenceMap!==void 0&&(material.iridescenceMap=getTexture(json.iridescenceMap)),json.iridescenceThicknessMap!==void 0&&(material.iridescenceThicknessMap=getTexture(json.iridescenceThicknessMap)),json.transmissionMap!==void 0&&(material.transmissionMap=getTexture(json.transmissionMap)),json.thicknessMap!==void 0&&(material.thicknessMap=getTexture(json.thicknessMap)),json.anisotropyMap!==void 0&&(material.anisotropyMap=getTexture(json.anisotropyMap)),json.sheenColorMap!==void 0&&(material.sheenColorMap=getTexture(json.sheenColorMap)),json.sheenRoughnessMap!==void 0&&(material.sheenRoughnessMap=getTexture(json.sheenRoughnessMap)),material}setTextures(value$1){return this.textures=value$1,this}createMaterialFromType(type){return MaterialLoader.createMaterialFromType(type)}static createMaterialFromType(type){let materialLib={ShadowMaterial,SpriteMaterial,RawShaderMaterial,ShaderMaterial,PointsMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshPhongMaterial,MeshToonMaterial,MeshNormalMaterial,MeshLambertMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshBasicMaterial,MeshMatcapMaterial,LineDashedMaterial,LineBasicMaterial,Material};return new materialLib[type]}},LoaderUtils=class{static extractUrlBase(url){let index$1=url.lastIndexOf(`/`);return index$1===-1?`./`:url.slice(0,index$1+1)}static resolveURL(url,path){return typeof url!=`string`||url===``?``:(/^https?:\/\//i.test(path)&&/^\//.test(url)&&(path=path.replace(/(^https?:\/\/[^\/]+).*/i,`$1`)),/^(https?:)?\/\//i.test(url)||/^data:.*,.*$/i.test(url)||/^blob:.*$/i.test(url)?url:path+url)}},InstancedBufferGeometry=class extends BufferGeometry{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type=`InstancedBufferGeometry`,this.instanceCount=1/0}copy(source){return super.copy(source),this.instanceCount=source.instanceCount,this}toJSON(){let data$12=super.toJSON();return data$12.instanceCount=this.instanceCount,data$12.isInstancedBufferGeometry=!0,data$12}},BufferGeometryLoader=class extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){let scope$1=this,loader$1=new FileLoader(scope$1.manager);loader$1.setPath(scope$1.path),loader$1.setRequestHeader(scope$1.requestHeader),loader$1.setWithCredentials(scope$1.withCredentials),loader$1.load(url,function(text$5){try{onLoad(scope$1.parse(JSON.parse(text$5)))}catch(e$4){onError?onError(e$4):console.error(e$4),scope$1.manager.itemError(url)}},onProgress,onError)}parse(json){let interleavedBufferMap={},arrayBufferMap={};function getInterleavedBuffer(json$1,uuid$1){if(interleavedBufferMap[uuid$1]!==void 0)return interleavedBufferMap[uuid$1];let interleavedBuffers=json$1.interleavedBuffers,interleavedBuffer=interleavedBuffers[uuid$1],buffer$1=getArrayBuffer(json$1,interleavedBuffer.buffer),array$1=getTypedArray(interleavedBuffer.type,buffer$1),ib=new InterleavedBuffer(array$1,interleavedBuffer.stride);return ib.uuid=interleavedBuffer.uuid,interleavedBufferMap[uuid$1]=ib,ib}function getArrayBuffer(json$1,uuid$1){if(arrayBufferMap[uuid$1]!==void 0)return arrayBufferMap[uuid$1];let arrayBuffers=json$1.arrayBuffers,arrayBuffer=arrayBuffers[uuid$1],ab=new Uint32Array(arrayBuffer).buffer;return arrayBufferMap[uuid$1]=ab,ab}let geometry=json.isInstancedBufferGeometry?new InstancedBufferGeometry:new BufferGeometry,index$1=json.data.index;if(index$1!==void 0){let typedArray=getTypedArray(index$1.type,index$1.array);geometry.setIndex(new BufferAttribute(typedArray,1))}let attributes=json.data.attributes;for(let key$2 in attributes){let attribute=attributes[key$2],bufferAttribute;if(attribute.isInterleavedBufferAttribute){let interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{let typedArray=getTypedArray(attribute.type,attribute.array),bufferAttributeConstr=attribute.isInstancedBufferAttribute?InstancedBufferAttribute:BufferAttribute;bufferAttribute=new bufferAttributeConstr(typedArray,attribute.itemSize,attribute.normalized)}attribute.name!==void 0&&(bufferAttribute.name=attribute.name),attribute.usage!==void 0&&bufferAttribute.setUsage(attribute.usage),geometry.setAttribute(key$2,bufferAttribute)}let morphAttributes=json.data.morphAttributes;if(morphAttributes)for(let key$2 in morphAttributes){let attributeArray=morphAttributes[key$2],array$1=[];for(let i=0,il=attributeArray.length;i0){let manager=new LoadingManager(onLoad);loader$1=new ImageLoader(manager),loader$1.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i0){loader$1=new ImageLoader(this.manager),loader$1.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i{let box=null,sphere=null;return info.boundingBox!==void 0&&(box=new Box3().fromJSON(info.boundingBox)),info.boundingSphere!==void 0&&(sphere=new Sphere().fromJSON(info.boundingSphere)),{...info,boundingBox:box,boundingSphere:sphere}}),object$1._instanceInfo=data$12.instanceInfo,object$1._availableInstanceIds=data$12._availableInstanceIds,object$1._availableGeometryIds=data$12._availableGeometryIds,object$1._nextIndexStart=data$12.nextIndexStart,object$1._nextVertexStart=data$12.nextVertexStart,object$1._geometryCount=data$12.geometryCount,object$1._maxInstanceCount=data$12.maxInstanceCount,object$1._maxVertexCount=data$12.maxVertexCount,object$1._maxIndexCount=data$12.maxIndexCount,object$1._geometryInitialized=data$12.geometryInitialized,object$1._matricesTexture=getTexture(data$12.matricesTexture.uuid),object$1._indirectTexture=getTexture(data$12.indirectTexture.uuid),data$12.colorsTexture!==void 0&&(object$1._colorsTexture=getTexture(data$12.colorsTexture.uuid)),data$12.boundingSphere!==void 0&&(object$1.boundingSphere=new Sphere().fromJSON(data$12.boundingSphere)),data$12.boundingBox!==void 0&&(object$1.boundingBox=new Box3().fromJSON(data$12.boundingBox));break;case`LOD`:object$1=new LOD;break;case`Line`:object$1=new Line(getGeometry(data$12.geometry),getMaterial(data$12.material));break;case`LineLoop`:object$1=new LineLoop(getGeometry(data$12.geometry),getMaterial(data$12.material));break;case`LineSegments`:object$1=new LineSegments(getGeometry(data$12.geometry),getMaterial(data$12.material));break;case`PointCloud`:case`Points`:object$1=new Points(getGeometry(data$12.geometry),getMaterial(data$12.material));break;case`Sprite`:object$1=new Sprite(getMaterial(data$12.material));break;case`Group`:object$1=new Group;break;case`Bone`:object$1=new Bone;break;default:object$1=new Object3D}if(object$1.uuid=data$12.uuid,data$12.name!==void 0&&(object$1.name=data$12.name),data$12.matrix===void 0?(data$12.position!==void 0&&object$1.position.fromArray(data$12.position),data$12.rotation!==void 0&&object$1.rotation.fromArray(data$12.rotation),data$12.quaternion!==void 0&&object$1.quaternion.fromArray(data$12.quaternion),data$12.scale!==void 0&&object$1.scale.fromArray(data$12.scale)):(object$1.matrix.fromArray(data$12.matrix),data$12.matrixAutoUpdate!==void 0&&(object$1.matrixAutoUpdate=data$12.matrixAutoUpdate),object$1.matrixAutoUpdate&&object$1.matrix.decompose(object$1.position,object$1.quaternion,object$1.scale)),data$12.up!==void 0&&object$1.up.fromArray(data$12.up),data$12.castShadow!==void 0&&(object$1.castShadow=data$12.castShadow),data$12.receiveShadow!==void 0&&(object$1.receiveShadow=data$12.receiveShadow),data$12.shadow&&(data$12.shadow.intensity!==void 0&&(object$1.shadow.intensity=data$12.shadow.intensity),data$12.shadow.bias!==void 0&&(object$1.shadow.bias=data$12.shadow.bias),data$12.shadow.normalBias!==void 0&&(object$1.shadow.normalBias=data$12.shadow.normalBias),data$12.shadow.radius!==void 0&&(object$1.shadow.radius=data$12.shadow.radius),data$12.shadow.mapSize!==void 0&&object$1.shadow.mapSize.fromArray(data$12.shadow.mapSize),data$12.shadow.camera!==void 0&&(object$1.shadow.camera=this.parseObject(data$12.shadow.camera))),data$12.visible!==void 0&&(object$1.visible=data$12.visible),data$12.frustumCulled!==void 0&&(object$1.frustumCulled=data$12.frustumCulled),data$12.renderOrder!==void 0&&(object$1.renderOrder=data$12.renderOrder),data$12.userData!==void 0&&(object$1.userData=data$12.userData),data$12.layers!==void 0&&(object$1.layers.mask=data$12.layers),data$12.children!==void 0){let children=data$12.children;for(let i=0;i`u`&&console.warn(`THREE.ImageBitmapLoader: createImageBitmap() not supported.`),typeof fetch>`u`&&console.warn(`THREE.ImageBitmapLoader: fetch() not supported.`),this.options={premultiplyAlpha:`none`},this._abortController=new AbortController}setOptions(options$1){return this.options=options$1,this}load(url,onLoad,onProgress,onError){url===void 0&&(url=``),this.path!==void 0&&(url=this.path+url),url=this.manager.resolveURL(url);let scope$1=this,cached$1=Cache.get(`image-bitmap:${url}`);if(cached$1!==void 0){if(scope$1.manager.itemStart(url),cached$1.then){cached$1.then(imageBitmap=>{if(_errorMap.has(cached$1)===!0)onError&&onError(_errorMap.get(cached$1)),scope$1.manager.itemError(url),scope$1.manager.itemEnd(url);else return onLoad&&onLoad(imageBitmap),scope$1.manager.itemEnd(url),imageBitmap});return}return setTimeout(function(){onLoad&&onLoad(cached$1),scope$1.manager.itemEnd(url)},0),cached$1}let fetchOptions={};fetchOptions.credentials=this.crossOrigin===`anonymous`?`same-origin`:`include`,fetchOptions.headers=this.requestHeader,fetchOptions.signal=typeof AbortSignal.any==`function`?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;let promise=fetch(url,fetchOptions).then(function(res){return res.blob()}).then(function(blob){return createImageBitmap(blob,Object.assign(scope$1.options,{colorSpaceConversion:`none`}))}).then(function(imageBitmap){return Cache.add(`image-bitmap:${url}`,imageBitmap),onLoad&&onLoad(imageBitmap),scope$1.manager.itemEnd(url),imageBitmap}).catch(function(e$4){onError&&onError(e$4),_errorMap.set(promise,e$4),Cache.remove(`image-bitmap:${url}`),scope$1.manager.itemError(url),scope$1.manager.itemEnd(url)});Cache.add(`image-bitmap:${url}`,promise),scope$1.manager.itemStart(url)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}};let _context;var AudioContext$1=class{static getContext(){return _context===void 0&&(_context=new(window.AudioContext||window.webkitAudioContext)),_context}static setContext(value$1){_context=value$1}},AudioLoader=class extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){let scope$1=this,loader$1=new FileLoader(this.manager);loader$1.setResponseType(`arraybuffer`),loader$1.setPath(this.path),loader$1.setRequestHeader(this.requestHeader),loader$1.setWithCredentials(this.withCredentials),loader$1.load(url,function(buffer$1){try{let bufferCopy=buffer$1.slice(0),context$1=AudioContext$1.getContext();context$1.decodeAudioData(bufferCopy,function(audioBuffer){onLoad(audioBuffer)}).catch(handleError$1)}catch(e$4){handleError$1(e$4)}},onProgress,onError);function handleError$1(e$4){onError?onError(e$4):console.error(e$4),scope$1.manager.itemError(url)}}};const _eyeRight=new Matrix4,_eyeLeft=new Matrix4,_projectionMatrix=new Matrix4;var StereoCamera=class{constructor(){this.type=`StereoCamera`,this.aspect=1,this.eyeSep=.064,this.cameraL=new PerspectiveCamera,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new PerspectiveCamera,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(camera){let cache$1=this._cache,needsUpdate=cache$1.focus!==camera.focus||cache$1.fov!==camera.fov||cache$1.aspect!==camera.aspect*this.aspect||cache$1.near!==camera.near||cache$1.far!==camera.far||cache$1.zoom!==camera.zoom||cache$1.eyeSep!==this.eyeSep;if(needsUpdate){cache$1.focus=camera.focus,cache$1.fov=camera.fov,cache$1.aspect=camera.aspect*this.aspect,cache$1.near=camera.near,cache$1.far=camera.far,cache$1.zoom=camera.zoom,cache$1.eyeSep=this.eyeSep,_projectionMatrix.copy(camera.projectionMatrix);let eyeSepHalf=cache$1.eyeSep/2,eyeSepOnProjection=eyeSepHalf*cache$1.near/cache$1.focus,ymax=cache$1.near*Math.tan(DEG2RAD$1*cache$1.fov*.5)/cache$1.zoom,xmin,xmax;_eyeLeft.elements[12]=-eyeSepHalf,_eyeRight.elements[12]=eyeSepHalf,xmin=-ymax*cache$1.aspect+eyeSepOnProjection,xmax=ymax*cache$1.aspect+eyeSepOnProjection,_projectionMatrix.elements[0]=2*cache$1.near/(xmax-xmin),_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin),this.cameraL.projectionMatrix.copy(_projectionMatrix),xmin=-ymax*cache$1.aspect-eyeSepOnProjection,xmax=ymax*cache$1.aspect-eyeSepOnProjection,_projectionMatrix.elements[0]=2*cache$1.near/(xmax-xmin),_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin),this.cameraR.projectionMatrix.copy(_projectionMatrix)}this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft),this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight)}},ArrayCamera=class extends PerspectiveCamera{constructor(array$1=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=array$1}},Clock$1=class{constructor(autoStart=!0){this.autoStart=autoStart,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let diff=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let newTime=performance.now();diff=(newTime-this.oldTime)/1e3,this.oldTime=newTime,this.elapsedTime+=diff}return diff}};const _position$1$1=new Vector3,_quaternion$1=new Quaternion,_scale$1$1=new Vector3,_forward=new Vector3,_up=new Vector3;var AudioListener=class extends Object3D{constructor(){super(),this.type=`AudioListener`,this.context=AudioContext$1.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Clock$1}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(value$1){return this.filter===null?this.gain.disconnect(this.context.destination):(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)),this.filter=value$1,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(value$1){return this.gain.gain.setTargetAtTime(value$1,this.context.currentTime,.01),this}updateMatrixWorld(force){super.updateMatrixWorld(force);let listener=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(_position$1$1,_quaternion$1,_scale$1$1),_forward.set(0,0,-1).applyQuaternion(_quaternion$1),_up.set(0,1,0).applyQuaternion(_quaternion$1),listener.positionX){let endTime=this.context.currentTime+this.timeDelta;listener.positionX.linearRampToValueAtTime(_position$1$1.x,endTime),listener.positionY.linearRampToValueAtTime(_position$1$1.y,endTime),listener.positionZ.linearRampToValueAtTime(_position$1$1.z,endTime),listener.forwardX.linearRampToValueAtTime(_forward.x,endTime),listener.forwardY.linearRampToValueAtTime(_forward.y,endTime),listener.forwardZ.linearRampToValueAtTime(_forward.z,endTime),listener.upX.linearRampToValueAtTime(_up.x,endTime),listener.upY.linearRampToValueAtTime(_up.y,endTime),listener.upZ.linearRampToValueAtTime(_up.z,endTime)}else listener.setPosition(_position$1$1.x,_position$1$1.y,_position$1$1.z),listener.setOrientation(_forward.x,_forward.y,_forward.z,_up.x,_up.y,_up.z)}},Audio$1=class extends Object3D{constructor(listener){super(),this.type=`Audio`,this.listener=listener,this.context=listener.context,this.gain=this.context.createGain(),this.gain.connect(listener.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType=`empty`,this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(audioNode){return this.hasPlaybackControl=!1,this.sourceType=`audioNode`,this.source=audioNode,this.connect(),this}setMediaElementSource(mediaElement){return this.hasPlaybackControl=!1,this.sourceType=`mediaNode`,this.source=this.context.createMediaElementSource(mediaElement),this.connect(),this}setMediaStreamSource(mediaStream){return this.hasPlaybackControl=!1,this.sourceType=`mediaStreamNode`,this.source=this.context.createMediaStreamSource(mediaStream),this.connect(),this}setBuffer(audioBuffer){return this.buffer=audioBuffer,this.sourceType=`buffer`,this.autoplay&&this.play(),this}play(delay=0){if(this.isPlaying===!0){console.warn(`THREE.Audio: Audio is already playing.`);return}if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}this._startedAt=this.context.currentTime+delay;let source=this.context.createBufferSource();return source.buffer=this.buffer,source.loop=this.loop,source.loopStart=this.loopStart,source.loopEnd=this.loopEnd,source.onended=this.onEnded.bind(this),source.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=source,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress%=this.duration||this.buffer.duration),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(delay=0){if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+delay),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let i=1,l=this.filters.length;i0){this.source.disconnect(this.filters[0]);for(let i=1,l=this.filters.length;i0&&this._mixBufferRegionAdditive(buffer$1,offset$2,this._addIndex*stride,1,stride);for(let i=stride,e$4=stride+stride;i!==e$4;++i)if(buffer$1[i]!==buffer$1[i+stride]){binding.setValue(buffer$1,offset$2);break}}saveOriginalState(){let binding=this.binding,buffer$1=this.buffer,stride=this.valueSize,originalValueOffset=stride*this._origIndex;binding.getValue(buffer$1,originalValueOffset);for(let i=stride,e$4=originalValueOffset;i!==e$4;++i)buffer$1[i]=buffer$1[originalValueOffset+i%stride];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let originalValueOffset=this.valueSize*3;this.binding.setValue(this.buffer,originalValueOffset)}_setAdditiveIdentityNumeric(){let startIndex=this._addIndex*this.valueSize,endIndex=startIndex+this.valueSize;for(let i=startIndex;i=.5)for(let i=0;i!==stride;++i)buffer$1[dstOffset+i]=buffer$1[srcOffset+i]}_slerp(buffer$1,dstOffset,srcOffset,t$1){Quaternion.slerpFlat(buffer$1,dstOffset,buffer$1,dstOffset,buffer$1,srcOffset,t$1)}_slerpAdditive(buffer$1,dstOffset,srcOffset,t$1,stride){let workOffset=this._workIndex*stride;Quaternion.multiplyQuaternionsFlat(buffer$1,workOffset,buffer$1,dstOffset,buffer$1,srcOffset),Quaternion.slerpFlat(buffer$1,dstOffset,buffer$1,dstOffset,buffer$1,workOffset,t$1)}_lerp(buffer$1,dstOffset,srcOffset,t$1,stride){let s=1-t$1;for(let i=0;i!==stride;++i){let j$1=dstOffset+i;buffer$1[j$1]=buffer$1[j$1]*s+buffer$1[srcOffset+i]*t$1}}_lerpAdditive(buffer$1,dstOffset,srcOffset,t$1,stride){for(let i=0;i!==stride;++i){let j$1=dstOffset+i;buffer$1[j$1]=buffer$1[j$1]+buffer$1[srcOffset+i]*t$1}}};const _RESERVED_CHARS_RE=`\\[\\]\\.:\\/`,_reservedRe=RegExp(`[`+_RESERVED_CHARS_RE+`]`,`g`),_wordChar=`[^`+_RESERVED_CHARS_RE+`]`,_wordCharOrDot=`[^`+_RESERVED_CHARS_RE.replace(`\\.`,``)+`]`,_directoryRe=/((?:WC+[\/:])*)/.source.replace(`WC`,_wordChar),_nodeRe=/(WCOD+)?/.source.replace(`WCOD`,_wordCharOrDot),_objectRe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace(`WC`,_wordChar),_propertyRe=/\.(WC+)(?:\[(.+)\])?/.source.replace(`WC`,_wordChar),_trackRe=RegExp(`^`+_directoryRe+_nodeRe+_objectRe+_propertyRe+`$`),_supportedObjectNames=[`material`,`materials`,`bones`,`map`];var Composite=class{constructor(targetGroup,path,optionalParsedPath){let parsedPath=optionalParsedPath||PropertyBinding.parseTrackName(path);this._targetGroup=targetGroup,this._bindings=targetGroup.subscribe_(path,parsedPath)}getValue(array$1,offset$2){this.bind();let firstValidIndex=this._targetGroup.nCachedObjects_,binding=this._bindings[firstValidIndex];binding!==void 0&&binding.getValue(array$1,offset$2)}setValue(array$1,offset$2){let bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i)bindings[i].setValue(array$1,offset$2)}bind(){let bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i)bindings[i].bind()}unbind(){let bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i)bindings[i].unbind()}},PropertyBinding=class PropertyBinding{constructor(rootNode,path,parsedPath){this.path=path,this.parsedPath=parsedPath||PropertyBinding.parseTrackName(path),this.node=PropertyBinding.findNode(rootNode,this.parsedPath.nodeName),this.rootNode=rootNode,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(root$3,path,parsedPath){return root$3&&root$3.isAnimationObjectGroup?new PropertyBinding.Composite(root$3,path,parsedPath):new PropertyBinding(root$3,path,parsedPath)}static sanitizeNodeName(name$2){return name$2.replace(/\s/g,`_`).replace(_reservedRe,``)}static parseTrackName(trackName){let matches$1=_trackRe.exec(trackName);if(matches$1===null)throw Error(`PropertyBinding: Cannot parse trackName: `+trackName);let results={nodeName:matches$1[2],objectName:matches$1[3],objectIndex:matches$1[4],propertyName:matches$1[5],propertyIndex:matches$1[6]},lastDot=results.nodeName&&results.nodeName.lastIndexOf(`.`);if(lastDot!==void 0&&lastDot!==-1){let objectName=results.nodeName.substring(lastDot+1);_supportedObjectNames.indexOf(objectName)!==-1&&(results.nodeName=results.nodeName.substring(0,lastDot),results.objectName=objectName)}if(results.propertyName===null||results.propertyName.length===0)throw Error(`PropertyBinding: can not parse propertyName from trackName: `+trackName);return results}static findNode(root$3,nodeName){if(nodeName===void 0||nodeName===``||nodeName===`.`||nodeName===-1||nodeName===root$3.name||nodeName===root$3.uuid)return root$3;if(root$3.skeleton){let bone=root$3.skeleton.getBoneByName(nodeName);if(bone!==void 0)return bone}if(root$3.children){let searchNodeSubtree=function(children){for(let i=0;i=nCachedObjects){let lastCachedIndex=nCachedObjects++,firstActiveObject=objects[lastCachedIndex];indicesByUUID[firstActiveObject.uuid]=index$1,objects[index$1]=firstActiveObject,indicesByUUID[uuid$1]=lastCachedIndex,objects[lastCachedIndex]=object$1;for(let j$1=0,m=nBindings;j$1!==m;++j$1){let bindingsForPath=bindings[j$1],firstActive=bindingsForPath[lastCachedIndex],binding=bindingsForPath[index$1];bindingsForPath[index$1]=firstActive,bindingsForPath[lastCachedIndex]=binding}}}this.nCachedObjects_=nCachedObjects}uncache(){let objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length,nCachedObjects=this.nCachedObjects_,nObjects=objects.length;for(let i=0,n=arguments.length;i!==n;++i){let object$1=arguments[i],uuid$1=object$1.uuid,index$1=indicesByUUID[uuid$1];if(index$1!==void 0)if(delete indicesByUUID[uuid$1],index$10&&(indicesByUUID[lastObject.uuid]=index$1),objects[index$1]=lastObject,objects.pop();for(let j$1=0,m=nBindings;j$1!==m;++j$1){let bindingsForPath=bindings[j$1];bindingsForPath[index$1]=bindingsForPath[lastIndex],bindingsForPath.pop()}}}this.nCachedObjects_=nCachedObjects}subscribe_(path,parsedPath){let indicesByPath=this._bindingsIndicesByPath,index$1=indicesByPath[path],bindings=this._bindings;if(index$1!==void 0)return bindings[index$1];let paths=this._paths,parsedPaths=this._parsedPaths,objects=this._objects,nObjects=objects.length,nCachedObjects=this.nCachedObjects_,bindingsForPath=Array(nObjects);index$1=bindings.length,indicesByPath[path]=index$1,paths.push(path),parsedPaths.push(parsedPath),bindings.push(bindingsForPath);for(let i=nCachedObjects,n=objects.length;i!==n;++i){let object$1=objects[i];bindingsForPath[i]=new PropertyBinding(object$1,path,parsedPath)}return bindingsForPath}unsubscribe_(path){let indicesByPath=this._bindingsIndicesByPath,index$1=indicesByPath[path];if(index$1!==void 0){let paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,lastBindingsIndex=bindings.length-1,lastBindings=bindings[lastBindingsIndex],lastBindingsPath=path[lastBindingsIndex];indicesByPath[lastBindingsPath]=index$1,bindings[index$1]=lastBindings,bindings.pop(),parsedPaths[index$1]=parsedPaths[lastBindingsIndex],parsedPaths.pop(),paths[index$1]=paths[lastBindingsIndex],paths.pop()}}},AnimationAction=class{constructor(mixer,clip,localRoot=null,blendMode=clip.blendMode){this._mixer=mixer,this._clip=clip,this._localRoot=localRoot,this.blendMode=blendMode;let tracks=clip.tracks,nTracks=tracks.length,interpolants=Array(nTracks),interpolantSettings={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding};for(let i=0;i!==nTracks;++i){let interpolant=tracks[i].createInterpolant(null);interpolants[i]=interpolant,interpolant.settings=interpolantSettings}this._interpolantSettings=interpolantSettings,this._interpolants=interpolants,this._propertyBindings=Array(nTracks),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=LoopRepeat,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(time$2){return this._startTime=time$2,this}setLoop(mode,repetitions){return this.loop=mode,this.repetitions=repetitions,this}setEffectiveWeight(weight){return this.weight=weight,this._effectiveWeight=this.enabled?weight:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(duration$2){return this._scheduleFading(duration$2,0,1)}fadeOut(duration$2){return this._scheduleFading(duration$2,1,0)}crossFadeFrom(fadeOutAction,duration$2,warp=!1){if(fadeOutAction.fadeOut(duration$2),this.fadeIn(duration$2),warp===!0){let fadeInDuration=this._clip.duration,fadeOutDuration=fadeOutAction._clip.duration,startEndRatio=fadeOutDuration/fadeInDuration,endStartRatio=fadeInDuration/fadeOutDuration;fadeOutAction.warp(1,startEndRatio,duration$2),this.warp(endStartRatio,1,duration$2)}return this}crossFadeTo(fadeInAction,duration$2,warp=!1){return fadeInAction.crossFadeFrom(this,duration$2,warp)}stopFading(){let weightInterpolant=this._weightInterpolant;return weightInterpolant!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(weightInterpolant)),this}setEffectiveTimeScale(timeScale){return this.timeScale=timeScale,this._effectiveTimeScale=this.paused?0:timeScale,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(duration$2){return this.timeScale=this._clip.duration/duration$2,this.stopWarping()}syncWith(action){return this.time=action.time,this.timeScale=action.timeScale,this.stopWarping()}halt(duration$2){return this.warp(this._effectiveTimeScale,0,duration$2)}warp(startTimeScale,endTimeScale,duration$2){let mixer=this._mixer,now$1=mixer.time,timeScale=this.timeScale,interpolant=this._timeScaleInterpolant;interpolant===null&&(interpolant=mixer._lendControlInterpolant(),this._timeScaleInterpolant=interpolant);let times=interpolant.parameterPositions,values=interpolant.sampleValues;return times[0]=now$1,times[1]=now$1+duration$2,values[0]=startTimeScale/timeScale,values[1]=endTimeScale/timeScale,this}stopWarping(){let timeScaleInterpolant=this._timeScaleInterpolant;return timeScaleInterpolant!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(timeScaleInterpolant)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(time$2,deltaTime,timeDirection,accuIndex){if(!this.enabled){this._updateWeight(time$2);return}let startTime=this._startTime;if(startTime!==null){let timeRunning=(time$2-startTime)*timeDirection;timeRunning<0||timeDirection===0?deltaTime=0:(this._startTime=null,deltaTime=timeDirection*timeRunning)}deltaTime*=this._updateTimeScale(time$2);let clipTime=this._updateTime(deltaTime),weight=this._updateWeight(time$2);if(weight>0){let interpolants=this._interpolants,propertyMixers=this._propertyBindings;switch(this.blendMode){case AdditiveAnimationBlendMode:for(let j$1=0,m=interpolants.length;j$1!==m;++j$1)interpolants[j$1].evaluate(clipTime),propertyMixers[j$1].accumulateAdditive(weight);break;case NormalAnimationBlendMode:default:for(let j$1=0,m=interpolants.length;j$1!==m;++j$1)interpolants[j$1].evaluate(clipTime),propertyMixers[j$1].accumulate(accuIndex,weight)}}}_updateWeight(time$2){let weight=0;if(this.enabled){weight=this.weight;let interpolant=this._weightInterpolant;if(interpolant!==null){let interpolantValue=interpolant.evaluate(time$2)[0];weight*=interpolantValue,time$2>interpolant.parameterPositions[1]&&(this.stopFading(),interpolantValue===0&&(this.enabled=!1))}}return this._effectiveWeight=weight,weight}_updateTimeScale(time$2){let timeScale=0;if(!this.paused){timeScale=this.timeScale;let interpolant=this._timeScaleInterpolant;if(interpolant!==null){let interpolantValue=interpolant.evaluate(time$2)[0];timeScale*=interpolantValue,time$2>interpolant.parameterPositions[1]&&(this.stopWarping(),timeScale===0?this.paused=!0:this.timeScale=timeScale)}}return this._effectiveTimeScale=timeScale,timeScale}_updateTime(deltaTime){let duration$2=this._clip.duration,loop=this.loop,time$2=this.time+deltaTime,loopCount=this._loopCount,pingPong=loop===LoopPingPong;if(deltaTime===0)return loopCount===-1?time$2:pingPong&&(loopCount&1)==1?duration$2-time$2:time$2;if(loop===LoopOnce){loopCount===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));handle_stop:{if(time$2>=duration$2)time$2=duration$2;else if(time$2<0)time$2=0;else{this.time=time$2;break handle_stop}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=time$2,this._mixer.dispatchEvent({type:`finished`,action:this,direction:deltaTime<0?-1:1})}}else{if(loopCount===-1&&(deltaTime>=0?(loopCount=0,this._setEndings(!0,this.repetitions===0,pingPong)):this._setEndings(this.repetitions===0,!0,pingPong)),time$2>=duration$2||time$2<0){let loopDelta=Math.floor(time$2/duration$2);time$2-=duration$2*loopDelta,loopCount+=Math.abs(loopDelta);let pending=this.repetitions-loopCount;if(pending<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,time$2=deltaTime>0?duration$2:0,this.time=time$2,this._mixer.dispatchEvent({type:`finished`,action:this,direction:deltaTime>0?1:-1});else{if(pending===1){let atStart=deltaTime<0;this._setEndings(atStart,!atStart,pingPong)}else this._setEndings(!1,!1,pingPong);this._loopCount=loopCount,this.time=time$2,this._mixer.dispatchEvent({type:`loop`,action:this,loopDelta})}}else this.time=time$2;if(pingPong&&(loopCount&1)==1)return duration$2-time$2}return time$2}_setEndings(atStart,atEnd,pingPong){let settings=this._interpolantSettings;pingPong?(settings.endingStart=ZeroSlopeEnding,settings.endingEnd=ZeroSlopeEnding):(atStart?settings.endingStart=this.zeroSlopeAtStart?ZeroSlopeEnding:ZeroCurvatureEnding:settings.endingStart=WrapAroundEnding,atEnd?settings.endingEnd=this.zeroSlopeAtEnd?ZeroSlopeEnding:ZeroCurvatureEnding:settings.endingEnd=WrapAroundEnding)}_scheduleFading(duration$2,weightNow,weightThen){let mixer=this._mixer,now$1=mixer.time,interpolant=this._weightInterpolant;interpolant===null&&(interpolant=mixer._lendControlInterpolant(),this._weightInterpolant=interpolant);let times=interpolant.parameterPositions,values=interpolant.sampleValues;return times[0]=now$1,values[0]=weightNow,times[1]=now$1+duration$2,values[1]=weightThen,this}};const _controlInterpolantsResultBuffer=new Float32Array(1);var AnimationMixer=class extends EventDispatcher{constructor(root$3){super(),this._root=root$3,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(action,prototypeAction){let root$3=action._localRoot||this._root,tracks=action._clip.tracks,nTracks=tracks.length,bindings=action._propertyBindings,interpolants=action._interpolants,rootUuid=root$3.uuid,bindingsByRoot=this._bindingsByRootAndName,bindingsByName=bindingsByRoot[rootUuid];bindingsByName===void 0&&(bindingsByName={},bindingsByRoot[rootUuid]=bindingsByName);for(let i=0;i!==nTracks;++i){let track$1=tracks[i],trackName=track$1.name,binding=bindingsByName[trackName];if(binding!==void 0)++binding.referenceCount,bindings[i]=binding;else{if(binding=bindings[i],binding!==void 0){binding._cacheIndex===null&&(++binding.referenceCount,this._addInactiveBinding(binding,rootUuid,trackName));continue}let path=prototypeAction&&prototypeAction._propertyBindings[i].binding.parsedPath;binding=new PropertyMixer(PropertyBinding.create(root$3,trackName,path),track$1.ValueTypeName,track$1.getValueSize()),++binding.referenceCount,this._addInactiveBinding(binding,rootUuid,trackName),bindings[i]=binding}interpolants[i].resultBuffer=binding.buffer}}_activateAction(action){if(!this._isActiveAction(action)){if(action._cacheIndex===null){let rootUuid=(action._localRoot||this._root).uuid,clipUuid=action._clip.uuid,actionsForClip=this._actionsByClip[clipUuid];this._bindAction(action,actionsForClip&&actionsForClip.knownActions[0]),this._addInactiveAction(action,clipUuid,rootUuid)}let bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){let binding=bindings[i];binding.useCount++===0&&(this._lendBinding(binding),binding.saveOriginalState())}this._lendAction(action)}}_deactivateAction(action){if(this._isActiveAction(action)){let bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){let binding=bindings[i];--binding.useCount===0&&(binding.restoreOriginalState(),this._takeBackBinding(binding))}this._takeBackAction(action)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let scope$1=this;this.stats={actions:{get total(){return scope$1._actions.length},get inUse(){return scope$1._nActiveActions}},bindings:{get total(){return scope$1._bindings.length},get inUse(){return scope$1._nActiveBindings}},controlInterpolants:{get total(){return scope$1._controlInterpolants.length},get inUse(){return scope$1._nActiveControlInterpolants}}}}_isActiveAction(action){let index$1=action._cacheIndex;return index$1!==null&&index$1=0;--i)actions[i].stop();return this}update(deltaTime){deltaTime*=this.timeScale;let actions=this._actions,nActions=this._nActiveActions,time$2=this.time+=deltaTime,timeDirection=Math.sign(deltaTime),accuIndex=this._accuIndex^=1;for(let i=0;i!==nActions;++i){let action=actions[i];action._update(time$2,deltaTime,timeDirection,accuIndex)}let bindings=this._bindings,nBindings=this._nActiveBindings;for(let i=0;i!==nBindings;++i)bindings[i].apply(accuIndex);return this}setTime(time$2){this.time=0;for(let i=0;i=this.min.x&&point$3.x<=this.max.x&&point$3.y>=this.min.y&&point$3.y<=this.max.y}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y}getParameter(point$3,target$1){return target$1.set((point$3.x-this.min.x)/(this.max.x-this.min.x),(point$3.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y}clampPoint(point$3,target$1){return target$1.copy(point$3).clamp(this.min,this.max)}distanceToPoint(point$3){return this.clampPoint(point$3,_vector$4).distanceTo(point$3)}intersect(box){return this.min.max(box.min),this.max.min(box.max),this.isEmpty()&&this.makeEmpty(),this}union(box){return this.min.min(box.min),this.max.max(box.max),this}translate(offset$2){return this.min.add(offset$2),this.max.add(offset$2),this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}};const _startP=new Vector3,_startEnd=new Vector3,_d1=new Vector3,_d2=new Vector3,_r$1=new Vector3,_c1=new Vector3,_c2=new Vector3;var Line3=class{constructor(start=new Vector3,end=new Vector3){this.start=start,this.end=end}set(start,end){return this.start.copy(start),this.end.copy(end),this}copy(line){return this.start.copy(line.start),this.end.copy(line.end),this}getCenter(target$1){return target$1.addVectors(this.start,this.end).multiplyScalar(.5)}delta(target$1){return target$1.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t$1,target$1){return this.delta(target$1).multiplyScalar(t$1).add(this.start)}closestPointToPointParameter(point$3,clampToLine){_startP.subVectors(point$3,this.start),_startEnd.subVectors(this.end,this.start);let startEnd2=_startEnd.dot(_startEnd),startEnd_startP=_startEnd.dot(_startP),t$1=startEnd_startP/startEnd2;return clampToLine&&(t$1=clamp$7(t$1,0,1)),t$1}closestPointToPoint(point$3,clampToLine,target$1){let t$1=this.closestPointToPointParameter(point$3,clampToLine);return this.delta(target$1).multiplyScalar(t$1).add(this.start)}distanceSqToLine3(line,c1=_c1,c2=_c2){let EPSILON=1e-8*1e-8,s,t$1,p1=this.start,p2=line.start,q1=this.end,q2=line.end;_d1.subVectors(q1,p1),_d2.subVectors(q2,p2),_r$1.subVectors(p1,p2);let a$1=_d1.dot(_d1),e$4=_d2.dot(_d2),f$2=_d2.dot(_r$1);if(a$1<=EPSILON&&e$4<=EPSILON)return c1.copy(p1),c2.copy(p2),c1.sub(c2),c1.dot(c1);if(a$1<=EPSILON)s=0,t$1=f$2/e$4,t$1=clamp$7(t$1,0,1);else{let c$3=_d1.dot(_r$1);if(e$4<=EPSILON)t$1=0,s=clamp$7(-c$3/a$1,0,1);else{let b$1=_d1.dot(_d2),denom=a$1*e$4-b$1*b$1;s=denom===0?0:clamp$7((b$1*f$2-c$3*e$4)/denom,0,1),t$1=(b$1*s+f$2)/e$4,t$1<0?(t$1=0,s=clamp$7(-c$3/a$1,0,1)):t$1>1&&(t$1=1,s=clamp$7((b$1-c$3)/a$1,0,1))}}return c1.copy(p1).add(_d1.multiplyScalar(s)),c2.copy(p2).add(_d2.multiplyScalar(t$1)),c1.sub(c2),c1.dot(c1)}applyMatrix4(matrix){return this.start.applyMatrix4(matrix),this.end.applyMatrix4(matrix),this}equals(line){return line.start.equals(this.start)&&line.end.equals(this.end)}clone(){return new this.constructor().copy(this)}};const _vector$3=new Vector3;var SpotLightHelper=class extends Object3D{constructor(light,color$2){super(),this.light=light,this.matrixAutoUpdate=!1,this.color=color$2,this.type=`SpotLightHelper`;let geometry=new BufferGeometry,positions=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let i=0,j$1=1,l=32;i1)for(let i=0;i.99999)this.quaternion.set(0,0,0,1);else if(dir.y<-.99999)this.quaternion.set(1,0,0,0);else{_axis.set(dir.z,0,-dir.x).normalize();let radians=Math.acos(dir.y);this.quaternion.setFromAxisAngle(_axis,radians)}}setLength(length,headLength=length*.2,headWidth=headLength*.2){this.line.scale.set(1,Math.max(1e-4,length-headLength),1),this.line.updateMatrix(),this.cone.scale.set(headWidth,headLength,headWidth),this.cone.position.y=length,this.cone.updateMatrix()}setColor(color$2){this.line.material.color.set(color$2),this.cone.material.color.set(color$2)}copy(source){return super.copy(source,!1),this.line.copy(source.line),this.cone.copy(source.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},AxesHelper=class extends LineSegments{constructor(size$2=1){let vertices=[0,0,0,size$2,0,0,0,0,0,0,size$2,0,0,0,0,0,0,size$2],colors=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],geometry=new BufferGeometry;geometry.setAttribute(`position`,new Float32BufferAttribute(vertices,3)),geometry.setAttribute(`color`,new Float32BufferAttribute(colors,3));let material=new LineBasicMaterial({vertexColors:!0,toneMapped:!1});super(geometry,material),this.type=`AxesHelper`}setColors(xAxisColor,yAxisColor,zAxisColor){let color$2=new Color,array$1=this.geometry.attributes.color.array;return color$2.set(xAxisColor),color$2.toArray(array$1,0),color$2.toArray(array$1,3),color$2.set(yAxisColor),color$2.toArray(array$1,6),color$2.toArray(array$1,9),color$2.set(zAxisColor),color$2.toArray(array$1,12),color$2.toArray(array$1,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},ShapePath=class{constructor(){this.type=`ShapePath`,this.color=new Color,this.subPaths=[],this.currentPath=null}moveTo(x$1,y){return this.currentPath=new Path,this.subPaths.push(this.currentPath),this.currentPath.moveTo(x$1,y),this}lineTo(x$1,y){return this.currentPath.lineTo(x$1,y),this}quadraticCurveTo(aCPx,aCPy,aX,aY){return this.currentPath.quadraticCurveTo(aCPx,aCPy,aX,aY),this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){return this.currentPath.bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY),this}splineThru(pts){return this.currentPath.splineThru(pts),this}toShapes(isCCW){function toShapesNoHoles(inSubpaths){let shapes$1=[];for(let i=0,l=inSubpaths.length;i2**-52){if(edgeDy<0&&(edgeLowPt=inPolygon[q],edgeDx=-edgeDx,edgeHighPt=inPolygon[p$4],edgeDy=-edgeDy),inPt.yedgeHighPt.y)continue;if(inPt.y===edgeLowPt.y){if(inPt.x===edgeLowPt.x)return!0}else{let perpEdge=edgeDy*(inPt.x-edgeLowPt.x)-edgeDx*(inPt.y-edgeLowPt.y);if(perpEdge===0)return!0;if(perpEdge<0)continue;inside=!inside}}else{if(inPt.y!==edgeLowPt.y)continue;if(edgeHighPt.x<=inPt.x&&inPt.x<=edgeLowPt.x||edgeLowPt.x<=inPt.x&&inPt.x<=edgeHighPt.x)return!0}}return inside}let isClockWise=ShapeUtils.isClockWise,subPaths=this.subPaths;if(subPaths.length===0)return[];let solid,tmpPath,tmpShape,shapes=[];if(subPaths.length===1)return tmpPath=subPaths[0],tmpShape=new Shape,tmpShape.curves=tmpPath.curves,shapes.push(tmpShape),shapes;let holesFirst=!isClockWise(subPaths[0].getPoints());holesFirst=isCCW?!holesFirst:holesFirst;let betterShapeHoles=[],newShapes=[],newShapeHoles=[],mainIdx=0,tmpPoints;newShapes[mainIdx]=void 0,newShapeHoles[mainIdx]=[];for(let i=0,l=subPaths.length;i1){let ambiguous=!1,toChange=0;for(let sIdx=0,sLen=newShapes.length;sIdx0&&ambiguous===!1&&(newShapeHoles=betterShapeHoles)}let tmpHoles;for(let i=0,il=newShapes.length;iaspect$1?(texture.repeat.x=1,texture.repeat.y=imageAspect/aspect$1,texture.offset.x=0,texture.offset.y=(1-texture.repeat.y)/2):(texture.repeat.x=aspect$1/imageAspect,texture.repeat.y=1,texture.offset.x=(1-texture.repeat.x)/2,texture.offset.y=0),texture}function cover(texture,aspect$1){let imageAspect=texture.image&&texture.image.width?texture.image.width/texture.image.height:1;return imageAspect>aspect$1?(texture.repeat.x=aspect$1/imageAspect,texture.repeat.y=1,texture.offset.x=(1-texture.repeat.x)/2,texture.offset.y=0):(texture.repeat.x=1,texture.repeat.y=imageAspect/aspect$1,texture.offset.x=0,texture.offset.y=(1-texture.repeat.y)/2),texture}function fill(texture){return texture.repeat.x=1,texture.repeat.y=1,texture.offset.x=0,texture.offset.y=0,texture}function getByteLength(width,height,format$2,type){let typeByteLength=getTextureTypeByteLength(type);switch(format$2){case AlphaFormat:return width*height;case RedFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RedIntegerFormat:return width*height/typeByteLength.components*typeByteLength.byteLength;case RGFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGIntegerFormat:return width*height*2/typeByteLength.components*typeByteLength.byteLength;case RGBFormat:return width*height*3/typeByteLength.components*typeByteLength.byteLength;case RGBAFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGBAIntegerFormat:return width*height*4/typeByteLength.components*typeByteLength.byteLength;case RGB_S3TC_DXT1_Format:case RGBA_S3TC_DXT1_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_S3TC_DXT3_Format:case RGBA_S3TC_DXT5_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGB_PVRTC_2BPPV1_Format:case RGBA_PVRTC_2BPPV1_Format:return Math.max(width,16)*Math.max(height,8)/4;case RGB_PVRTC_4BPPV1_Format:case RGBA_PVRTC_4BPPV1_Format:return Math.max(width,8)*Math.max(height,8)/2;case RGB_ETC1_Format:case RGB_ETC2_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*8;case RGBA_ETC2_EAC_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_4x4_Format:return Math.floor((width+3)/4)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x4_Format:return Math.floor((width+4)/5)*Math.floor((height+3)/4)*16;case RGBA_ASTC_5x5_Format:return Math.floor((width+4)/5)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x5_Format:return Math.floor((width+5)/6)*Math.floor((height+4)/5)*16;case RGBA_ASTC_6x6_Format:return Math.floor((width+5)/6)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x5_Format:return Math.floor((width+7)/8)*Math.floor((height+4)/5)*16;case RGBA_ASTC_8x6_Format:return Math.floor((width+7)/8)*Math.floor((height+5)/6)*16;case RGBA_ASTC_8x8_Format:return Math.floor((width+7)/8)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x5_Format:return Math.floor((width+9)/10)*Math.floor((height+4)/5)*16;case RGBA_ASTC_10x6_Format:return Math.floor((width+9)/10)*Math.floor((height+5)/6)*16;case RGBA_ASTC_10x8_Format:return Math.floor((width+9)/10)*Math.floor((height+7)/8)*16;case RGBA_ASTC_10x10_Format:return Math.floor((width+9)/10)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x10_Format:return Math.floor((width+11)/12)*Math.floor((height+9)/10)*16;case RGBA_ASTC_12x12_Format:return Math.floor((width+11)/12)*Math.floor((height+11)/12)*16;case RGBA_BPTC_Format:case RGB_BPTC_SIGNED_Format:case RGB_BPTC_UNSIGNED_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16;case RED_RGTC1_Format:case SIGNED_RED_RGTC1_Format:return Math.ceil(width/4)*Math.ceil(height/4)*8;case RED_GREEN_RGTC2_Format:case SIGNED_RED_GREEN_RGTC2_Format:return Math.ceil(width/4)*Math.ceil(height/4)*16}throw Error(`Unable to determine texture byte length for ${format$2} format.`)}function getTextureTypeByteLength(type){switch(type){case UnsignedByteType:case ByteType:return{byteLength:1,components:1};case UnsignedShortType:case ShortType:case HalfFloatType:return{byteLength:2,components:1};case UnsignedShort4444Type:case UnsignedShort5551Type:return{byteLength:2,components:4};case UnsignedIntType:case IntType:case FloatType:return{byteLength:4,components:1};case UnsignedInt5999Type:return{byteLength:4,components:3}}throw Error(`Unknown texture type ${type}.`)}var TextureUtils=class{static contain(texture,aspect$1){return contain(texture,aspect$1)}static cover(texture,aspect$1){return cover(texture,aspect$1)}static fill(texture){return fill(texture)}static getByteLength(width,height,format$2,type){return getByteLength(width,height,format$2,type)}};typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`register`,{detail:{revision:REVISION}})),typeof window<`u`&&(window.__THREE__?console.warn(`WARNING: Multiple instances of Three.js being imported.`):window.__THREE__=REVISION);var three_module_exports={};__export(three_module_exports,{ACESFilmicToneMapping:()=>ACESFilmicToneMapping,AddEquation:()=>AddEquation,AddOperation:()=>AddOperation,AdditiveAnimationBlendMode:()=>AdditiveAnimationBlendMode,AdditiveBlending:()=>AdditiveBlending,AgXToneMapping:()=>AgXToneMapping,AlphaFormat:()=>AlphaFormat,AlwaysCompare:()=>AlwaysCompare,AlwaysDepth:()=>AlwaysDepth,AlwaysStencilFunc:()=>AlwaysStencilFunc,AmbientLight:()=>AmbientLight,AnimationAction:()=>AnimationAction,AnimationClip:()=>AnimationClip,AnimationLoader:()=>AnimationLoader,AnimationMixer:()=>AnimationMixer,AnimationObjectGroup:()=>AnimationObjectGroup,AnimationUtils:()=>AnimationUtils,ArcCurve:()=>ArcCurve,ArrayCamera:()=>ArrayCamera,ArrowHelper:()=>ArrowHelper,AttachedBindMode:()=>AttachedBindMode,Audio:()=>Audio$1,AudioAnalyser:()=>AudioAnalyser,AudioContext:()=>AudioContext$1,AudioListener:()=>AudioListener,AudioLoader:()=>AudioLoader,AxesHelper:()=>AxesHelper,BackSide:()=>BackSide,BasicDepthPacking:()=>BasicDepthPacking,BasicShadowMap:()=>BasicShadowMap,BatchedMesh:()=>BatchedMesh,Bone:()=>Bone,BooleanKeyframeTrack:()=>BooleanKeyframeTrack,Box2:()=>Box2,Box3:()=>Box3,Box3Helper:()=>Box3Helper,BoxGeometry:()=>BoxGeometry,BoxHelper:()=>BoxHelper,BufferAttribute:()=>BufferAttribute,BufferGeometry:()=>BufferGeometry,BufferGeometryLoader:()=>BufferGeometryLoader,ByteType:()=>ByteType,Cache:()=>Cache,Camera:()=>Camera,CameraHelper:()=>CameraHelper,CanvasTexture:()=>CanvasTexture,CapsuleGeometry:()=>CapsuleGeometry,CatmullRomCurve3:()=>CatmullRomCurve3,CineonToneMapping:()=>CineonToneMapping,CircleGeometry:()=>CircleGeometry,ClampToEdgeWrapping:()=>ClampToEdgeWrapping,Clock:()=>Clock$1,Color:()=>Color,ColorKeyframeTrack:()=>ColorKeyframeTrack,ColorManagement:()=>ColorManagement,CompressedArrayTexture:()=>CompressedArrayTexture,CompressedCubeTexture:()=>CompressedCubeTexture,CompressedTexture:()=>CompressedTexture,CompressedTextureLoader:()=>CompressedTextureLoader,ConeGeometry:()=>ConeGeometry,ConstantAlphaFactor:()=>ConstantAlphaFactor,ConstantColorFactor:()=>ConstantColorFactor,Controls:()=>Controls,CubeCamera:()=>CubeCamera,CubeReflectionMapping:()=>CubeReflectionMapping,CubeRefractionMapping:()=>CubeRefractionMapping,CubeTexture:()=>CubeTexture,CubeTextureLoader:()=>CubeTextureLoader,CubeUVReflectionMapping:()=>CubeUVReflectionMapping,CubicBezierCurve:()=>CubicBezierCurve,CubicBezierCurve3:()=>CubicBezierCurve3,CubicInterpolant:()=>CubicInterpolant,CullFaceBack:()=>CullFaceBack,CullFaceFront:()=>CullFaceFront,CullFaceFrontBack:()=>CullFaceFrontBack,CullFaceNone:()=>CullFaceNone,Curve:()=>Curve,CurvePath:()=>CurvePath,CustomBlending:()=>CustomBlending,CustomToneMapping:()=>CustomToneMapping,CylinderGeometry:()=>CylinderGeometry,Cylindrical:()=>Cylindrical,Data3DTexture:()=>Data3DTexture,DataArrayTexture:()=>DataArrayTexture,DataTexture:()=>DataTexture,DataTextureLoader:()=>DataTextureLoader,DataUtils:()=>DataUtils,DecrementStencilOp:()=>DecrementStencilOp,DecrementWrapStencilOp:()=>DecrementWrapStencilOp,DefaultLoadingManager:()=>DefaultLoadingManager,DepthFormat:()=>DepthFormat,DepthStencilFormat:()=>DepthStencilFormat,DepthTexture:()=>DepthTexture,DetachedBindMode:()=>DetachedBindMode,DirectionalLight:()=>DirectionalLight,DirectionalLightHelper:()=>DirectionalLightHelper,DiscreteInterpolant:()=>DiscreteInterpolant,DodecahedronGeometry:()=>DodecahedronGeometry,DoubleSide:()=>DoubleSide,DstAlphaFactor:()=>DstAlphaFactor,DstColorFactor:()=>DstColorFactor,DynamicCopyUsage:()=>DynamicCopyUsage,DynamicDrawUsage:()=>DynamicDrawUsage,DynamicReadUsage:()=>DynamicReadUsage,EdgesGeometry:()=>EdgesGeometry,EllipseCurve:()=>EllipseCurve,EqualCompare:()=>EqualCompare,EqualDepth:()=>EqualDepth,EqualStencilFunc:()=>EqualStencilFunc,EquirectangularReflectionMapping:()=>EquirectangularReflectionMapping,EquirectangularRefractionMapping:()=>EquirectangularRefractionMapping,Euler:()=>Euler,EventDispatcher:()=>EventDispatcher,ExtrudeGeometry:()=>ExtrudeGeometry,FileLoader:()=>FileLoader,Float16BufferAttribute:()=>Float16BufferAttribute,Float32BufferAttribute:()=>Float32BufferAttribute,FloatType:()=>FloatType,Fog:()=>Fog,FogExp2:()=>FogExp2,FramebufferTexture:()=>FramebufferTexture,FrontSide:()=>FrontSide,Frustum:()=>Frustum,FrustumArray:()=>FrustumArray,GLBufferAttribute:()=>GLBufferAttribute,GLSL1:()=>GLSL1,GLSL3:()=>GLSL3,GreaterCompare:()=>GreaterCompare,GreaterDepth:()=>GreaterDepth,GreaterEqualCompare:()=>GreaterEqualCompare,GreaterEqualDepth:()=>GreaterEqualDepth,GreaterEqualStencilFunc:()=>GreaterEqualStencilFunc,GreaterStencilFunc:()=>GreaterStencilFunc,GridHelper:()=>GridHelper,Group:()=>Group,HalfFloatType:()=>HalfFloatType,HemisphereLight:()=>HemisphereLight,HemisphereLightHelper:()=>HemisphereLightHelper,IcosahedronGeometry:()=>IcosahedronGeometry,ImageBitmapLoader:()=>ImageBitmapLoader,ImageLoader:()=>ImageLoader,ImageUtils:()=>ImageUtils,IncrementStencilOp:()=>IncrementStencilOp,IncrementWrapStencilOp:()=>IncrementWrapStencilOp,InstancedBufferAttribute:()=>InstancedBufferAttribute,InstancedBufferGeometry:()=>InstancedBufferGeometry,InstancedInterleavedBuffer:()=>InstancedInterleavedBuffer,InstancedMesh:()=>InstancedMesh,Int16BufferAttribute:()=>Int16BufferAttribute,Int32BufferAttribute:()=>Int32BufferAttribute,Int8BufferAttribute:()=>Int8BufferAttribute,IntType:()=>IntType,InterleavedBuffer:()=>InterleavedBuffer,InterleavedBufferAttribute:()=>InterleavedBufferAttribute,Interpolant:()=>Interpolant,InterpolateDiscrete:()=>InterpolateDiscrete,InterpolateLinear:()=>InterpolateLinear,InterpolateSmooth:()=>InterpolateSmooth,InterpolationSamplingMode:()=>InterpolationSamplingMode,InterpolationSamplingType:()=>InterpolationSamplingType,InvertStencilOp:()=>InvertStencilOp,KeepStencilOp:()=>KeepStencilOp,KeyframeTrack:()=>KeyframeTrack,LOD:()=>LOD,LatheGeometry:()=>LatheGeometry,Layers:()=>Layers,LessCompare:()=>LessCompare,LessDepth:()=>LessDepth,LessEqualCompare:()=>LessEqualCompare,LessEqualDepth:()=>LessEqualDepth,LessEqualStencilFunc:()=>LessEqualStencilFunc,LessStencilFunc:()=>LessStencilFunc,Light:()=>Light,LightProbe:()=>LightProbe,Line:()=>Line,Line3:()=>Line3,LineBasicMaterial:()=>LineBasicMaterial,LineCurve:()=>LineCurve,LineCurve3:()=>LineCurve3,LineDashedMaterial:()=>LineDashedMaterial,LineLoop:()=>LineLoop,LineSegments:()=>LineSegments,LinearFilter:()=>LinearFilter,LinearInterpolant:()=>LinearInterpolant,LinearMipMapLinearFilter:()=>LinearMipMapLinearFilter,LinearMipMapNearestFilter:()=>LinearMipMapNearestFilter,LinearMipmapLinearFilter:()=>LinearMipmapLinearFilter,LinearMipmapNearestFilter:()=>LinearMipmapNearestFilter,LinearSRGBColorSpace:()=>LinearSRGBColorSpace,LinearToneMapping:()=>LinearToneMapping,LinearTransfer:()=>LinearTransfer,Loader:()=>Loader,LoaderUtils:()=>LoaderUtils,LoadingManager:()=>LoadingManager,LoopOnce:()=>LoopOnce,LoopPingPong:()=>LoopPingPong,LoopRepeat:()=>LoopRepeat,MOUSE:()=>MOUSE,Material:()=>Material,MaterialLoader:()=>MaterialLoader,MathUtils:()=>MathUtils,Matrix2:()=>Matrix2,Matrix3:()=>Matrix3,Matrix4:()=>Matrix4,MaxEquation:()=>MaxEquation,Mesh:()=>Mesh,MeshBasicMaterial:()=>MeshBasicMaterial,MeshDepthMaterial:()=>MeshDepthMaterial,MeshDistanceMaterial:()=>MeshDistanceMaterial,MeshLambertMaterial:()=>MeshLambertMaterial,MeshMatcapMaterial:()=>MeshMatcapMaterial,MeshNormalMaterial:()=>MeshNormalMaterial,MeshPhongMaterial:()=>MeshPhongMaterial,MeshPhysicalMaterial:()=>MeshPhysicalMaterial,MeshStandardMaterial:()=>MeshStandardMaterial,MeshToonMaterial:()=>MeshToonMaterial,MinEquation:()=>MinEquation,MirroredRepeatWrapping:()=>MirroredRepeatWrapping,MixOperation:()=>MixOperation,MultiplyBlending:()=>MultiplyBlending,MultiplyOperation:()=>MultiplyOperation,NearestFilter:()=>NearestFilter,NearestMipMapLinearFilter:()=>NearestMipMapLinearFilter,NearestMipMapNearestFilter:()=>NearestMipMapNearestFilter,NearestMipmapLinearFilter:()=>NearestMipmapLinearFilter,NearestMipmapNearestFilter:()=>NearestMipmapNearestFilter,NeutralToneMapping:()=>NeutralToneMapping,NeverCompare:()=>NeverCompare,NeverDepth:()=>NeverDepth,NeverStencilFunc:()=>NeverStencilFunc,NoBlending:()=>NoBlending,NoColorSpace:()=>NoColorSpace,NoToneMapping:()=>NoToneMapping,NormalAnimationBlendMode:()=>NormalAnimationBlendMode,NormalBlending:()=>NormalBlending,NotEqualCompare:()=>NotEqualCompare,NotEqualDepth:()=>NotEqualDepth,NotEqualStencilFunc:()=>NotEqualStencilFunc,NumberKeyframeTrack:()=>NumberKeyframeTrack,Object3D:()=>Object3D,ObjectLoader:()=>ObjectLoader,ObjectSpaceNormalMap:()=>ObjectSpaceNormalMap,OctahedronGeometry:()=>OctahedronGeometry,OneFactor:()=>OneFactor,OneMinusConstantAlphaFactor:()=>OneMinusConstantAlphaFactor,OneMinusConstantColorFactor:()=>OneMinusConstantColorFactor,OneMinusDstAlphaFactor:()=>OneMinusDstAlphaFactor,OneMinusDstColorFactor:()=>OneMinusDstColorFactor,OneMinusSrcAlphaFactor:()=>OneMinusSrcAlphaFactor,OneMinusSrcColorFactor:()=>OneMinusSrcColorFactor,OrthographicCamera:()=>OrthographicCamera,PCFShadowMap:()=>PCFShadowMap,PCFSoftShadowMap:()=>PCFSoftShadowMap,PMREMGenerator:()=>PMREMGenerator,Path:()=>Path,PerspectiveCamera:()=>PerspectiveCamera,Plane:()=>Plane,PlaneGeometry:()=>PlaneGeometry,PlaneHelper:()=>PlaneHelper,PointLight:()=>PointLight,PointLightHelper:()=>PointLightHelper,Points:()=>Points,PointsMaterial:()=>PointsMaterial,PolarGridHelper:()=>PolarGridHelper,PolyhedronGeometry:()=>PolyhedronGeometry,PositionalAudio:()=>PositionalAudio,PropertyBinding:()=>PropertyBinding,PropertyMixer:()=>PropertyMixer,QuadraticBezierCurve:()=>QuadraticBezierCurve,QuadraticBezierCurve3:()=>QuadraticBezierCurve3,Quaternion:()=>Quaternion,QuaternionKeyframeTrack:()=>QuaternionKeyframeTrack,QuaternionLinearInterpolant:()=>QuaternionLinearInterpolant,RED_GREEN_RGTC2_Format:()=>RED_GREEN_RGTC2_Format,RED_RGTC1_Format:()=>RED_RGTC1_Format,REVISION:()=>REVISION,RGBADepthPacking:()=>RGBADepthPacking,RGBAFormat:()=>RGBAFormat,RGBAIntegerFormat:()=>RGBAIntegerFormat,RGBA_ASTC_10x10_Format:()=>RGBA_ASTC_10x10_Format,RGBA_ASTC_10x5_Format:()=>RGBA_ASTC_10x5_Format,RGBA_ASTC_10x6_Format:()=>RGBA_ASTC_10x6_Format,RGBA_ASTC_10x8_Format:()=>RGBA_ASTC_10x8_Format,RGBA_ASTC_12x10_Format:()=>RGBA_ASTC_12x10_Format,RGBA_ASTC_12x12_Format:()=>RGBA_ASTC_12x12_Format,RGBA_ASTC_4x4_Format:()=>RGBA_ASTC_4x4_Format,RGBA_ASTC_5x4_Format:()=>RGBA_ASTC_5x4_Format,RGBA_ASTC_5x5_Format:()=>RGBA_ASTC_5x5_Format,RGBA_ASTC_6x5_Format:()=>RGBA_ASTC_6x5_Format,RGBA_ASTC_6x6_Format:()=>RGBA_ASTC_6x6_Format,RGBA_ASTC_8x5_Format:()=>RGBA_ASTC_8x5_Format,RGBA_ASTC_8x6_Format:()=>RGBA_ASTC_8x6_Format,RGBA_ASTC_8x8_Format:()=>RGBA_ASTC_8x8_Format,RGBA_BPTC_Format:()=>RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:()=>RGBA_ETC2_EAC_Format,RGBA_PVRTC_2BPPV1_Format:()=>RGBA_PVRTC_2BPPV1_Format,RGBA_PVRTC_4BPPV1_Format:()=>RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT1_Format:()=>RGBA_S3TC_DXT1_Format,RGBA_S3TC_DXT3_Format:()=>RGBA_S3TC_DXT3_Format,RGBA_S3TC_DXT5_Format:()=>RGBA_S3TC_DXT5_Format,RGBDepthPacking:()=>RGBDepthPacking,RGBFormat:()=>RGBFormat,RGBIntegerFormat:()=>RGBIntegerFormat,RGB_BPTC_SIGNED_Format:()=>RGB_BPTC_SIGNED_Format,RGB_BPTC_UNSIGNED_Format:()=>RGB_BPTC_UNSIGNED_Format,RGB_ETC1_Format:()=>RGB_ETC1_Format,RGB_ETC2_Format:()=>RGB_ETC2_Format,RGB_PVRTC_2BPPV1_Format:()=>RGB_PVRTC_2BPPV1_Format,RGB_PVRTC_4BPPV1_Format:()=>RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:()=>RGB_S3TC_DXT1_Format,RGDepthPacking:()=>RGDepthPacking,RGFormat:()=>RGFormat,RGIntegerFormat:()=>RGIntegerFormat,RawShaderMaterial:()=>RawShaderMaterial,Ray:()=>Ray,Raycaster:()=>Raycaster,RectAreaLight:()=>RectAreaLight,RedFormat:()=>RedFormat,RedIntegerFormat:()=>RedIntegerFormat,ReinhardToneMapping:()=>ReinhardToneMapping,RenderTarget:()=>RenderTarget,RenderTarget3D:()=>RenderTarget3D,RepeatWrapping:()=>RepeatWrapping,ReplaceStencilOp:()=>ReplaceStencilOp,ReverseSubtractEquation:()=>ReverseSubtractEquation,RingGeometry:()=>RingGeometry,SIGNED_RED_GREEN_RGTC2_Format:()=>SIGNED_RED_GREEN_RGTC2_Format,SIGNED_RED_RGTC1_Format:()=>SIGNED_RED_RGTC1_Format,SRGBColorSpace:()=>SRGBColorSpace,SRGBTransfer:()=>SRGBTransfer,Scene:()=>Scene,ShaderChunk:()=>ShaderChunk,ShaderLib:()=>ShaderLib,ShaderMaterial:()=>ShaderMaterial,ShadowMaterial:()=>ShadowMaterial,Shape:()=>Shape,ShapeGeometry:()=>ShapeGeometry,ShapePath:()=>ShapePath,ShapeUtils:()=>ShapeUtils,ShortType:()=>ShortType,Skeleton:()=>Skeleton,SkeletonHelper:()=>SkeletonHelper,SkinnedMesh:()=>SkinnedMesh,Source:()=>Source,Sphere:()=>Sphere,SphereGeometry:()=>SphereGeometry,Spherical:()=>Spherical,SphericalHarmonics3:()=>SphericalHarmonics3,SplineCurve:()=>SplineCurve,SpotLight:()=>SpotLight,SpotLightHelper:()=>SpotLightHelper,Sprite:()=>Sprite,SpriteMaterial:()=>SpriteMaterial,SrcAlphaFactor:()=>SrcAlphaFactor,SrcAlphaSaturateFactor:()=>SrcAlphaSaturateFactor,SrcColorFactor:()=>SrcColorFactor,StaticCopyUsage:()=>StaticCopyUsage,StaticDrawUsage:()=>StaticDrawUsage,StaticReadUsage:()=>StaticReadUsage,StereoCamera:()=>StereoCamera,StreamCopyUsage:()=>StreamCopyUsage,StreamDrawUsage:()=>StreamDrawUsage,StreamReadUsage:()=>StreamReadUsage,StringKeyframeTrack:()=>StringKeyframeTrack,SubtractEquation:()=>SubtractEquation,SubtractiveBlending:()=>SubtractiveBlending,TOUCH:()=>TOUCH,TangentSpaceNormalMap:()=>TangentSpaceNormalMap,TetrahedronGeometry:()=>TetrahedronGeometry,Texture:()=>Texture,TextureLoader:()=>TextureLoader,TextureUtils:()=>TextureUtils,Timer:()=>Timer$1,TimestampQuery:()=>TimestampQuery,TorusGeometry:()=>TorusGeometry,TorusKnotGeometry:()=>TorusKnotGeometry,Triangle:()=>Triangle,TriangleFanDrawMode:()=>TriangleFanDrawMode,TriangleStripDrawMode:()=>TriangleStripDrawMode,TrianglesDrawMode:()=>TrianglesDrawMode,TubeGeometry:()=>TubeGeometry,UVMapping:()=>UVMapping,Uint16BufferAttribute:()=>Uint16BufferAttribute,Uint32BufferAttribute:()=>Uint32BufferAttribute,Uint8BufferAttribute:()=>Uint8BufferAttribute,Uint8ClampedBufferAttribute:()=>Uint8ClampedBufferAttribute,Uniform:()=>Uniform,UniformsGroup:()=>UniformsGroup,UniformsLib:()=>UniformsLib,UniformsUtils:()=>UniformsUtils,UnsignedByteType:()=>UnsignedByteType,UnsignedInt248Type:()=>UnsignedInt248Type,UnsignedInt5999Type:()=>UnsignedInt5999Type,UnsignedIntType:()=>UnsignedIntType,UnsignedShort4444Type:()=>UnsignedShort4444Type,UnsignedShort5551Type:()=>UnsignedShort5551Type,UnsignedShortType:()=>UnsignedShortType,VSMShadowMap:()=>VSMShadowMap,Vector2:()=>Vector2,Vector3:()=>Vector3,Vector4:()=>Vector4,VectorKeyframeTrack:()=>VectorKeyframeTrack,VideoFrameTexture:()=>VideoFrameTexture,VideoTexture:()=>VideoTexture,WebGL3DRenderTarget:()=>WebGL3DRenderTarget,WebGLArrayRenderTarget:()=>WebGLArrayRenderTarget,WebGLCoordinateSystem:()=>WebGLCoordinateSystem,WebGLCubeRenderTarget:()=>WebGLCubeRenderTarget,WebGLRenderTarget:()=>WebGLRenderTarget,WebGLRenderer:()=>WebGLRenderer,WebGLUtils:()=>WebGLUtils,WebGPUCoordinateSystem:()=>WebGPUCoordinateSystem,WebXRController:()=>WebXRController,WireframeGeometry:()=>WireframeGeometry,WrapAroundEnding:()=>WrapAroundEnding,ZeroCurvatureEnding:()=>ZeroCurvatureEnding,ZeroFactor:()=>ZeroFactor,ZeroSlopeEnding:()=>ZeroSlopeEnding,ZeroStencilOp:()=>ZeroStencilOp,createCanvasElement:()=>createCanvasElement});function WebGLAnimation(){let context$1=null,isAnimating=!1,animationLoop=null,requestId=null;function onAnimationFrame(time$2,frame$1){animationLoop(time$2,frame$1),requestId=context$1.requestAnimationFrame(onAnimationFrame)}return{start:function(){isAnimating!==!0&&animationLoop!==null&&(requestId=context$1.requestAnimationFrame(onAnimationFrame),isAnimating=!0)},stop:function(){context$1.cancelAnimationFrame(requestId),isAnimating=!1},setAnimationLoop:function(callback){animationLoop=callback},setContext:function(value$1){context$1=value$1}}}function WebGLAttributes(gl){let buffers=new WeakMap;function createBuffer(attribute,bufferType){let array$1=attribute.array,usage=attribute.usage,size$2=array$1.byteLength,buffer$1=gl.createBuffer();gl.bindBuffer(bufferType,buffer$1),gl.bufferData(bufferType,array$1,usage),attribute.onUploadCallback();let type;if(array$1 instanceof Float32Array)type=gl.FLOAT;else if(typeof Float16Array<`u`&&array$1 instanceof Float16Array)type=gl.HALF_FLOAT;else if(array$1 instanceof Uint16Array)type=attribute.isFloat16BufferAttribute?gl.HALF_FLOAT:gl.UNSIGNED_SHORT;else if(array$1 instanceof Int16Array)type=gl.SHORT;else if(array$1 instanceof Uint32Array)type=gl.UNSIGNED_INT;else if(array$1 instanceof Int32Array)type=gl.INT;else if(array$1 instanceof Int8Array)type=gl.BYTE;else if(array$1 instanceof Uint8Array)type=gl.UNSIGNED_BYTE;else if(array$1 instanceof Uint8ClampedArray)type=gl.UNSIGNED_BYTE;else throw Error(`THREE.WebGLAttributes: Unsupported buffer data format: `+array$1);return{buffer:buffer$1,type,bytesPerElement:array$1.BYTES_PER_ELEMENT,version:attribute.version,size:size$2}}function updateBuffer(buffer$1,attribute,bufferType){let array$1=attribute.array,updateRanges=attribute.updateRanges;if(gl.bindBuffer(bufferType,buffer$1),updateRanges.length===0)gl.bufferSubData(bufferType,0,array$1);else{updateRanges.sort((a$1,b$1)=>a$1.start-b$1.start);let mergeIndex=0;for(let i=1;i #include #include -}`,ShaderChunk={alphahash_fragment,alphahash_pars_fragment,alphamap_fragment,alphamap_pars_fragment,alphatest_fragment,alphatest_pars_fragment,aomap_fragment,aomap_pars_fragment,batching_pars_vertex,batching_vertex,begin_vertex,beginnormal_vertex,bsdfs,iridescence_fragment,bumpmap_pars_fragment,clipping_planes_fragment,clipping_planes_pars_fragment,clipping_planes_pars_vertex,clipping_planes_vertex,color_fragment,color_pars_fragment,color_pars_vertex,color_vertex,common,cube_uv_reflection_fragment,defaultnormal_vertex,displacementmap_pars_vertex,displacementmap_vertex,emissivemap_fragment,emissivemap_pars_fragment,colorspace_fragment,colorspace_pars_fragment,envmap_fragment,envmap_common_pars_fragment,envmap_pars_fragment,envmap_pars_vertex,envmap_physical_pars_fragment,envmap_vertex,fog_vertex,fog_pars_vertex,fog_fragment,fog_pars_fragment,gradientmap_pars_fragment,lightmap_pars_fragment,lights_lambert_fragment,lights_lambert_pars_fragment,lights_pars_begin,lights_toon_fragment,lights_toon_pars_fragment,lights_phong_fragment,lights_phong_pars_fragment,lights_physical_fragment,lights_physical_pars_fragment,lights_fragment_begin,lights_fragment_maps,lights_fragment_end,logdepthbuf_fragment,logdepthbuf_pars_fragment,logdepthbuf_pars_vertex,logdepthbuf_vertex,map_fragment,map_pars_fragment,map_particle_fragment,map_particle_pars_fragment,metalnessmap_fragment,metalnessmap_pars_fragment,morphinstance_vertex,morphcolor_vertex,morphnormal_vertex,morphtarget_pars_vertex,morphtarget_vertex,normal_fragment_begin,normal_fragment_maps,normal_pars_fragment,normal_pars_vertex,normal_vertex,normalmap_pars_fragment,clearcoat_normal_fragment_begin,clearcoat_normal_fragment_maps,clearcoat_pars_fragment,iridescence_pars_fragment,opaque_fragment,packing,premultiplied_alpha_fragment,project_vertex,dithering_fragment,dithering_pars_fragment,roughnessmap_fragment,roughnessmap_pars_fragment,shadowmap_pars_fragment,shadowmap_pars_vertex,shadowmap_vertex,shadowmask_pars_fragment,skinbase_vertex,skinning_pars_vertex,skinning_vertex,skinnormal_vertex,specularmap_fragment,specularmap_pars_fragment,tonemapping_fragment,tonemapping_pars_fragment,transmission_fragment,transmission_pars_fragment,uv_pars_fragment,uv_pars_vertex,uv_vertex,worldpos_vertex,background_vert:vertex$h,background_frag:fragment$h,backgroundCube_vert:vertex$g,backgroundCube_frag:fragment$g,cube_vert:vertex$f,cube_frag:fragment$f,depth_vert:vertex$e,depth_frag:fragment$e,distanceRGBA_vert:vertex$d,distanceRGBA_frag:fragment$d,equirect_vert:vertex$c,equirect_frag:fragment$c,linedashed_vert:vertex$b,linedashed_frag:fragment$b,meshbasic_vert:vertex$a,meshbasic_frag:fragment$a,meshlambert_vert:vertex$9,meshlambert_frag:fragment$9,meshmatcap_vert:vertex$8,meshmatcap_frag:fragment$8,meshnormal_vert:vertex$7,meshnormal_frag:fragment$7,meshphong_vert:vertex$6,meshphong_frag:fragment$6,meshphysical_vert:vertex$5,meshphysical_frag:fragment$5,meshtoon_vert:vertex$4,meshtoon_frag:fragment$4,points_vert:vertex$3,points_frag:fragment$3,shadow_vert:vertex$2,shadow_frag:fragment$2,sprite_vert:vertex$1,sprite_frag:fragment$1},UniformsLib={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},envMapRotation:{value:new Matrix3},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Matrix3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Matrix3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Matrix3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color(16777215)},opacity:{value:1},center:{value:new Vector2(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}},ShaderLib={basic:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.fog]),vertexShader:ShaderChunk.meshbasic_vert,fragmentShader:ShaderChunk.meshbasic_frag},lambert:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshlambert_vert,fragmentShader:ShaderChunk.meshlambert_frag},phong:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},specular:{value:new Color(1118481)},shininess:{value:30}}]),vertexShader:ShaderChunk.meshphong_vert,fragmentShader:ShaderChunk.meshphong_frag},standard:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.roughnessmap,UniformsLib.metalnessmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag},toon:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.gradientmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshtoon_vert,fragmentShader:ShaderChunk.meshtoon_frag},matcap:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,{matcap:{value:null}}]),vertexShader:ShaderChunk.meshmatcap_vert,fragmentShader:ShaderChunk.meshmatcap_frag},points:{uniforms:mergeUniforms([UniformsLib.points,UniformsLib.fog]),vertexShader:ShaderChunk.points_vert,fragmentShader:ShaderChunk.points_frag},dashed:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ShaderChunk.linedashed_vert,fragmentShader:ShaderChunk.linedashed_frag},depth:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap]),vertexShader:ShaderChunk.depth_vert,fragmentShader:ShaderChunk.depth_frag},normal:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,{opacity:{value:1}}]),vertexShader:ShaderChunk.meshnormal_vert,fragmentShader:ShaderChunk.meshnormal_frag},sprite:{uniforms:mergeUniforms([UniformsLib.sprite,UniformsLib.fog]),vertexShader:ShaderChunk.sprite_vert,fragmentShader:ShaderChunk.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ShaderChunk.background_vert,fragmentShader:ShaderChunk.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Matrix3}},vertexShader:ShaderChunk.backgroundCube_vert,fragmentShader:ShaderChunk.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ShaderChunk.cube_vert,fragmentShader:ShaderChunk.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ShaderChunk.equirect_vert,fragmentShader:ShaderChunk.equirect_frag},distanceRGBA:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ShaderChunk.distanceRGBA_vert,fragmentShader:ShaderChunk.distanceRGBA_frag},shadow:{uniforms:mergeUniforms([UniformsLib.lights,UniformsLib.fog,{color:{value:new Color(0)},opacity:{value:1}}]),vertexShader:ShaderChunk.shadow_vert,fragmentShader:ShaderChunk.shadow_frag}};ShaderLib.physical={uniforms:mergeUniforms([ShaderLib.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Matrix3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Matrix3},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Matrix3},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Matrix3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Matrix3},sheen:{value:0},sheenColor:{value:new Color(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Matrix3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Matrix3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Matrix3},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Matrix3},attenuationDistance:{value:0},attenuationColor:{value:new Color(0)},specularColor:{value:new Color(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Matrix3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Matrix3},anisotropyVector:{value:new Vector2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Matrix3}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag};const _rgb={r:0,b:0,g:0},_e1$1=new Euler,_m1$1=new Matrix4;function WebGLBackground(renderer$1,cubemaps,cubeuvmaps,state,objects,alpha$1,premultipliedAlpha){let clearColor=new Color(0),clearAlpha=alpha$1===!0?0:1,planeMesh,boxMesh,currentBackground=null,currentBackgroundVersion=0,currentTonemapping=null;function getBackground(scene){let background=scene.isScene===!0?scene.background:null;if(background&&background.isTexture){let usePMREM=scene.backgroundBlurriness>0;background=(usePMREM?cubeuvmaps:cubemaps).get(background)}return background}function render$2(scene){let forceClear=!1,background=getBackground(scene);background===null?setClear(clearColor,clearAlpha):background&&background.isColor&&(setClear(background,1),forceClear=!0);let environmentBlendMode=renderer$1.xr.getEnvironmentBlendMode();environmentBlendMode===`additive`?state.buffers.color.setClear(0,0,0,1,premultipliedAlpha):environmentBlendMode===`alpha-blend`&&state.buffers.color.setClear(0,0,0,0,premultipliedAlpha),(renderer$1.autoClear||forceClear)&&(state.buffers.depth.setTest(!0),state.buffers.depth.setMask(!0),state.buffers.color.setMask(!0),renderer$1.clear(renderer$1.autoClearColor,renderer$1.autoClearDepth,renderer$1.autoClearStencil))}function addToRenderList(renderList$1,scene){let background=getBackground(scene);background&&(background.isCubeTexture||background.mapping===CubeUVReflectionMapping)?(boxMesh===void 0&&(boxMesh=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:`BackgroundCubeMaterial`,uniforms:cloneUniforms(ShaderLib.backgroundCube.uniforms),vertexShader:ShaderLib.backgroundCube.vertexShader,fragmentShader:ShaderLib.backgroundCube.fragmentShader,side:BackSide,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),boxMesh.geometry.deleteAttribute(`normal`),boxMesh.geometry.deleteAttribute(`uv`),boxMesh.onBeforeRender=function(renderer$2,scene$1,camera){this.matrixWorld.copyPosition(camera.matrixWorld)},Object.defineProperty(boxMesh.material,`envMap`,{get:function(){return this.uniforms.envMap.value}}),objects.update(boxMesh)),_e1$1.copy(scene.backgroundRotation),_e1$1.x*=-1,_e1$1.y*=-1,_e1$1.z*=-1,background.isCubeTexture&&background.isRenderTargetTexture===!1&&(_e1$1.y*=-1,_e1$1.z*=-1),boxMesh.material.uniforms.envMap.value=background,boxMesh.material.uniforms.flipEnvMap.value=background.isCubeTexture&&background.isRenderTargetTexture===!1?-1:1,boxMesh.material.uniforms.backgroundBlurriness.value=scene.backgroundBlurriness,boxMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity,boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4(_m1$1.makeRotationFromEuler(_e1$1)),boxMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer,(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer$1.toneMapping)&&(boxMesh.material.needsUpdate=!0,currentBackground=background,currentBackgroundVersion=background.version,currentTonemapping=renderer$1.toneMapping),boxMesh.layers.enableAll(),renderList$1.unshift(boxMesh,boxMesh.geometry,boxMesh.material,0,0,null)):background&&background.isTexture&&(planeMesh===void 0&&(planeMesh=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:`BackgroundMaterial`,uniforms:cloneUniforms(ShaderLib.background.uniforms),vertexShader:ShaderLib.background.vertexShader,fragmentShader:ShaderLib.background.fragmentShader,side:FrontSide,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),planeMesh.geometry.deleteAttribute(`normal`),Object.defineProperty(planeMesh.material,`map`,{get:function(){return this.uniforms.t2D.value}}),objects.update(planeMesh)),planeMesh.material.uniforms.t2D.value=background,planeMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity,planeMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer,background.matrixAutoUpdate===!0&&background.updateMatrix(),planeMesh.material.uniforms.uvTransform.value.copy(background.matrix),(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer$1.toneMapping)&&(planeMesh.material.needsUpdate=!0,currentBackground=background,currentBackgroundVersion=background.version,currentTonemapping=renderer$1.toneMapping),planeMesh.layers.enableAll(),renderList$1.unshift(planeMesh,planeMesh.geometry,planeMesh.material,0,0,null))}function setClear(color$2,alpha$2){color$2.getRGB(_rgb,getUnlitUniformColorSpace(renderer$1)),state.buffers.color.setClear(_rgb.r,_rgb.g,_rgb.b,alpha$2,premultipliedAlpha)}function dispose$1(){boxMesh!==void 0&&(boxMesh.geometry.dispose(),boxMesh.material.dispose(),boxMesh=void 0),planeMesh!==void 0&&(planeMesh.geometry.dispose(),planeMesh.material.dispose(),planeMesh=void 0)}return{getClearColor:function(){return clearColor},setClearColor:function(color$2,alpha$2=1){clearColor.set(color$2),clearAlpha=alpha$2,setClear(clearColor,clearAlpha)},getClearAlpha:function(){return clearAlpha},setClearAlpha:function(alpha$2){clearAlpha=alpha$2,setClear(clearColor,clearAlpha)},render:render$2,addToRenderList,dispose:dispose$1}}function WebGLBindingStates(gl,attributes){let maxVertexAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS),bindingStates={},defaultState$2=createBindingState(null),currentState=defaultState$2,forceUpdate=!1;function setup(object$1,material,program,geometry,index$1){let updateBuffers=!1,state=getBindingState(geometry,program,material);currentState!==state&&(currentState=state,bindVertexArrayObject(currentState.object)),updateBuffers=needsUpdate(object$1,geometry,program,index$1),updateBuffers&&saveCache(object$1,geometry,program,index$1),index$1!==null&&attributes.update(index$1,gl.ELEMENT_ARRAY_BUFFER),(updateBuffers||forceUpdate)&&(forceUpdate=!1,setupVertexAttributes(object$1,material,program,geometry),index$1!==null&&gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,attributes.get(index$1).buffer))}function createVertexArrayObject(){return gl.createVertexArray()}function bindVertexArrayObject(vao){return gl.bindVertexArray(vao)}function deleteVertexArrayObject(vao){return gl.deleteVertexArray(vao)}function getBindingState(geometry,program,material){let wireframe=material.wireframe===!0,programMap=bindingStates[geometry.id];programMap===void 0&&(programMap={},bindingStates[geometry.id]=programMap);let stateMap=programMap[program.id];stateMap===void 0&&(stateMap={},programMap[program.id]=stateMap);let state=stateMap[wireframe];return state===void 0&&(state=createBindingState(createVertexArrayObject()),stateMap[wireframe]=state),state}function createBindingState(vao){let newAttributes=[],enabledAttributes=[],attributeDivisors=[];for(let i=0;i=0){let cachedAttribute=cachedAttributes[name$2],geometryAttribute=geometryAttributes[name$2];if(geometryAttribute===void 0&&(name$2===`instanceMatrix`&&object$1.instanceMatrix&&(geometryAttribute=object$1.instanceMatrix),name$2===`instanceColor`&&object$1.instanceColor&&(geometryAttribute=object$1.instanceColor)),cachedAttribute===void 0||cachedAttribute.attribute!==geometryAttribute||geometryAttribute&&cachedAttribute.data!==geometryAttribute.data)return!0;attributesNum++}}return currentState.attributesNum!==attributesNum||currentState.index!==index$1}function saveCache(object$1,geometry,program,index$1){let cache$1={},attributes$1=geometry.attributes,attributesNum=0,programAttributes=program.getAttributes();for(let name$2 in programAttributes){let programAttribute=programAttributes[name$2];if(programAttribute.location>=0){let attribute=attributes$1[name$2];attribute===void 0&&(name$2===`instanceMatrix`&&object$1.instanceMatrix&&(attribute=object$1.instanceMatrix),name$2===`instanceColor`&&object$1.instanceColor&&(attribute=object$1.instanceColor));let data$12={};data$12.attribute=attribute,attribute&&attribute.data&&(data$12.data=attribute.data),cache$1[name$2]=data$12,attributesNum++}}currentState.attributes=cache$1,currentState.attributesNum=attributesNum,currentState.index=index$1}function initAttributes(){let newAttributes=currentState.newAttributes;for(let i=0,il=newAttributes.length;i=0){let geometryAttribute=geometryAttributes[name$2];if(geometryAttribute===void 0&&(name$2===`instanceMatrix`&&object$1.instanceMatrix&&(geometryAttribute=object$1.instanceMatrix),name$2===`instanceColor`&&object$1.instanceColor&&(geometryAttribute=object$1.instanceColor)),geometryAttribute!==void 0){let normalized=geometryAttribute.normalized,size$2=geometryAttribute.itemSize,attribute=attributes.get(geometryAttribute);if(attribute===void 0)continue;let buffer$1=attribute.buffer,type=attribute.type,bytesPerElement=attribute.bytesPerElement,integer$1=type===gl.INT||type===gl.UNSIGNED_INT||geometryAttribute.gpuType===IntType;if(geometryAttribute.isInterleavedBufferAttribute){let data$12=geometryAttribute.data,stride=data$12.stride,offset$2=geometryAttribute.offset;if(data$12.isInstancedInterleavedBuffer){for(let i=0;i0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.HIGH_FLOAT).precision>0)return`highp`;precision$1=`mediump`}return precision$1===`mediump`&&gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.MEDIUM_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.MEDIUM_FLOAT).precision>0?`mediump`:`lowp`}let precision=parameters.precision===void 0?`highp`:parameters.precision,maxPrecision=getMaxPrecision(precision);maxPrecision!==precision&&(console.warn(`THREE.WebGLRenderer:`,precision,`not supported, using`,maxPrecision,`instead.`),precision=maxPrecision);let logarithmicDepthBuffer=parameters.logarithmicDepthBuffer===!0,reversedDepthBuffer=parameters.reversedDepthBuffer===!0&&extensions.has(`EXT_clip_control`),maxTextures=gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS),maxVertexTextures=gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize=gl.getParameter(gl.MAX_TEXTURE_SIZE),maxCubemapSize=gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS),maxVertexUniforms=gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings=gl.getParameter(gl.MAX_VARYING_VECTORS),maxFragmentUniforms=gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures=maxVertexTextures>0,maxSamples=gl.getParameter(gl.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy,getMaxPrecision,textureFormatReadable,textureTypeReadable,precision,logarithmicDepthBuffer,reversedDepthBuffer,maxTextures,maxVertexTextures,maxTextureSize,maxCubemapSize,maxAttributes,maxVertexUniforms,maxVaryings,maxFragmentUniforms,vertexTextures,maxSamples}}function WebGLClipping(properties){let scope$1=this,globalState=null,numGlobalPlanes=0,localClippingEnabled=!1,renderingShadows=!1,plane=new Plane,viewNormalMatrix=new Matrix3,uniform={value:null,needsUpdate:!1};this.uniform=uniform,this.numPlanes=0,this.numIntersection=0,this.init=function(planes,enableLocalClipping){let enabled$1=planes.length!==0||enableLocalClipping||numGlobalPlanes!==0||localClippingEnabled;return localClippingEnabled=enableLocalClipping,numGlobalPlanes=planes.length,enabled$1},this.beginShadows=function(){renderingShadows=!0,projectPlanes(null)},this.endShadows=function(){renderingShadows=!1},this.setGlobalState=function(planes,camera){globalState=projectPlanes(planes,camera,0)},this.setState=function(material,camera,useCache){let planes=material.clippingPlanes,clipIntersection=material.clipIntersection,clipShadows=material.clipShadows,materialProperties=properties.get(material);if(!localClippingEnabled||planes===null||planes.length===0||renderingShadows&&!clipShadows)renderingShadows?projectPlanes(null):resetGlobalState();else{let nGlobal=renderingShadows?0:numGlobalPlanes,lGlobal=nGlobal*4,dstArray=materialProperties.clippingState||null;uniform.value=dstArray,dstArray=projectPlanes(planes,camera,lGlobal,useCache);for(let i=0;i!==lGlobal;++i)dstArray[i]=globalState[i];materialProperties.clippingState=dstArray,this.numIntersection=clipIntersection?this.numPlanes:0,this.numPlanes+=nGlobal}};function resetGlobalState(){uniform.value!==globalState&&(uniform.value=globalState,uniform.needsUpdate=numGlobalPlanes>0),scope$1.numPlanes=numGlobalPlanes,scope$1.numIntersection=0}function projectPlanes(planes,camera,dstOffset,skipTransform){let nPlanes=planes===null?0:planes.length,dstArray=null;if(nPlanes!==0){if(dstArray=uniform.value,skipTransform!==!0||dstArray===null){let flatSize=dstOffset+nPlanes*4,viewMatrix=camera.matrixWorldInverse;viewNormalMatrix.getNormalMatrix(viewMatrix),(dstArray===null||dstArray.length0){let renderTarget=new WebGLCubeRenderTarget(image$1.height);return renderTarget.fromEquirectangularTexture(renderer$1,texture),cubemaps.set(texture,renderTarget),texture.addEventListener(`dispose`,onTextureDispose),mapTextureMapping(renderTarget.texture,texture.mapping)}else return null}}return texture}function onTextureDispose(event){let texture=event.target;texture.removeEventListener(`dispose`,onTextureDispose);let cubemap=cubemaps.get(texture);cubemap!==void 0&&(cubemaps.delete(texture),cubemap.dispose())}function dispose$1(){cubemaps=new WeakMap}return{get,dispose:dispose$1}}const LOD_MIN=4,EXTRA_LOD_SIGMA=[.125,.215,.35,.446,.526,.582],MAX_SAMPLES=20,_flatCamera=new OrthographicCamera,_clearColor=new Color;let _oldTarget=null,_oldActiveCubeFace=0,_oldActiveMipmapLevel=0,_oldXrEnabled=!1;const PHI=(1+Math.sqrt(5))/2,INV_PHI=1/PHI,_axisDirections=[new Vector3(-PHI,INV_PHI,0),new Vector3(PHI,INV_PHI,0),new Vector3(-INV_PHI,0,PHI),new Vector3(INV_PHI,0,PHI),new Vector3(0,PHI,-INV_PHI),new Vector3(0,PHI,INV_PHI),new Vector3(-1,1,-1),new Vector3(1,1,-1),new Vector3(-1,1,1),new Vector3(1,1,1)],_origin=new Vector3;var PMREMGenerator=class{constructor(renderer$1){this._renderer=renderer$1,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(scene,sigma=0,near=.1,far=100,options$1={}){let{size:size$2=256,position:position$2=_origin}=options$1;_oldTarget=this._renderer.getRenderTarget(),_oldActiveCubeFace=this._renderer.getActiveCubeFace(),_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel(),_oldXrEnabled=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(size$2);let cubeUVRenderTarget=this._allocateTargets();return cubeUVRenderTarget.depthBuffer=!0,this._sceneToCubeUV(scene,near,far,cubeUVRenderTarget,position$2),sigma>0&&this._blur(cubeUVRenderTarget,0,0,sigma),this._applyPMREM(cubeUVRenderTarget),this._cleanup(cubeUVRenderTarget),cubeUVRenderTarget}fromEquirectangular(equirectangular,renderTarget=null){return this._fromTexture(equirectangular,renderTarget)}fromCubemap(cubemap,renderTarget=null){return this._fromTexture(cubemap,renderTarget)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=_getCubemapMaterial(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=_getEquirectMaterial(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(cubeSize){this._lodMax=Math.floor(Math.log2(cubeSize)),this._cubeSize=2**this._lodMax}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let i=0;i2?size$2:0,size$2,size$2),renderer$1.setRenderTarget(cubeUVRenderTarget),useSolidColor&&renderer$1.render(backgroundBox,cubeCamera),renderer$1.render(scene,cubeCamera)}backgroundBox.geometry.dispose(),backgroundBox.material.dispose(),renderer$1.toneMapping=toneMapping,renderer$1.autoClear=originalAutoClear,scene.background=background}_textureToCubeUV(texture,cubeUVRenderTarget){let renderer$1=this._renderer,isCubeTexture=texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping;isCubeTexture?(this._cubemapMaterial===null&&(this._cubemapMaterial=_getCubemapMaterial()),this._cubemapMaterial.uniforms.flipEnvMap.value=texture.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=_getEquirectMaterial());let material=isCubeTexture?this._cubemapMaterial:this._equirectMaterial,mesh=new Mesh(this._lodPlanes[0],material),uniforms=material.uniforms;uniforms.envMap.value=texture;let size$2=this._cubeSize;_setViewport(cubeUVRenderTarget,0,0,3*size$2,2*size$2),renderer$1.setRenderTarget(cubeUVRenderTarget),renderer$1.render(mesh,_flatCamera)}_applyPMREM(cubeUVRenderTarget){let renderer$1=this._renderer,autoClear=renderer$1.autoClear;renderer$1.autoClear=!1;let n=this._lodPlanes.length;for(let i=1;iMAX_SAMPLES&&console.warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${MAX_SAMPLES}`);let weights=[],sum=0;for(let i=0;i_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0),y=4*(this._cubeSize-outputSize);_setViewport(targetOut,x$1,y,3*outputSize,2*outputSize),renderer$1.setRenderTarget(targetOut),renderer$1.render(blurMesh,_flatCamera)}};function _createPlanes(lodMax){let lodPlanes=[],sizeLods=[],sigmas=[],lod=lodMax,totalLods=lodMax-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let i=0;ilodMax-LOD_MIN?sigma=EXTRA_LOD_SIGMA[i-lodMax+LOD_MIN-1]:i===0&&(sigma=0),sigmas.push(sigma);let texelSize=1/(sizeLod-2),min$1=-texelSize,max$1=1+texelSize,uv1=[min$1,min$1,max$1,min$1,max$1,max$1,min$1,min$1,max$1,max$1,min$1,max$1],cubeFaces=6,vertices=6,positionSize=3,uvSize=2,faceIndexSize=1,position$2=new Float32Array(positionSize*vertices*cubeFaces),uv=new Float32Array(uvSize*vertices*cubeFaces),faceIndex=new Float32Array(faceIndexSize*vertices*cubeFaces);for(let face=0;face2?0:-1,coordinates=[x$1,y,0,x$1+2/3,y,0,x$1+2/3,y+1,0,x$1,y,0,x$1+2/3,y+1,0,x$1,y+1,0];position$2.set(coordinates,positionSize*vertices*face),uv.set(uv1,uvSize*vertices*face);let fill$1=[face,face,face,face,face,face];faceIndex.set(fill$1,faceIndexSize*vertices*face)}let planes=new BufferGeometry;planes.setAttribute(`position`,new BufferAttribute(position$2,positionSize)),planes.setAttribute(`uv`,new BufferAttribute(uv,uvSize)),planes.setAttribute(`faceIndex`,new BufferAttribute(faceIndex,faceIndexSize)),lodPlanes.push(planes),lod>LOD_MIN&&lod--}return{lodPlanes,sizeLods,sigmas}}function _createRenderTarget(width,height,params){let cubeUVRenderTarget=new WebGLRenderTarget(width,height,params);return cubeUVRenderTarget.texture.mapping=CubeUVReflectionMapping,cubeUVRenderTarget.texture.name=`PMREM.cubeUv`,cubeUVRenderTarget.scissorTest=!0,cubeUVRenderTarget}function _setViewport(target$1,x$1,y,width,height){target$1.viewport.set(x$1,y,width,height),target$1.scissor.set(x$1,y,width,height)}function _getBlurShader(lodMax,width,height){let weights=new Float32Array(MAX_SAMPLES),poleAxis=new Vector3(0,1,0),shaderMaterial=new ShaderMaterial({name:`SphericalGaussianBlur`,defines:{n:MAX_SAMPLES,CUBEUV_TEXEL_WIDTH:1/width,CUBEUV_TEXEL_HEIGHT:1/height,CUBEUV_MAX_MIP:`${lodMax}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:weights},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:poleAxis}},vertexShader:_getCommonVertexShader(),fragmentShader:` +}`,ShaderChunk={alphahash_fragment,alphahash_pars_fragment,alphamap_fragment,alphamap_pars_fragment,alphatest_fragment,alphatest_pars_fragment,aomap_fragment,aomap_pars_fragment,batching_pars_vertex,batching_vertex,begin_vertex,beginnormal_vertex,bsdfs,iridescence_fragment,bumpmap_pars_fragment,clipping_planes_fragment,clipping_planes_pars_fragment,clipping_planes_pars_vertex,clipping_planes_vertex,color_fragment,color_pars_fragment,color_pars_vertex,color_vertex,common,cube_uv_reflection_fragment,defaultnormal_vertex,displacementmap_pars_vertex,displacementmap_vertex,emissivemap_fragment,emissivemap_pars_fragment,colorspace_fragment,colorspace_pars_fragment,envmap_fragment,envmap_common_pars_fragment,envmap_pars_fragment,envmap_pars_vertex,envmap_physical_pars_fragment,envmap_vertex,fog_vertex,fog_pars_vertex,fog_fragment,fog_pars_fragment,gradientmap_pars_fragment,lightmap_pars_fragment,lights_lambert_fragment,lights_lambert_pars_fragment,lights_pars_begin,lights_toon_fragment,lights_toon_pars_fragment,lights_phong_fragment,lights_phong_pars_fragment,lights_physical_fragment,lights_physical_pars_fragment,lights_fragment_begin,lights_fragment_maps,lights_fragment_end,logdepthbuf_fragment,logdepthbuf_pars_fragment,logdepthbuf_pars_vertex,logdepthbuf_vertex,map_fragment,map_pars_fragment,map_particle_fragment,map_particle_pars_fragment,metalnessmap_fragment,metalnessmap_pars_fragment,morphinstance_vertex,morphcolor_vertex,morphnormal_vertex,morphtarget_pars_vertex,morphtarget_vertex,normal_fragment_begin,normal_fragment_maps,normal_pars_fragment,normal_pars_vertex,normal_vertex,normalmap_pars_fragment,clearcoat_normal_fragment_begin,clearcoat_normal_fragment_maps,clearcoat_pars_fragment,iridescence_pars_fragment,opaque_fragment,packing,premultiplied_alpha_fragment,project_vertex,dithering_fragment,dithering_pars_fragment,roughnessmap_fragment,roughnessmap_pars_fragment,shadowmap_pars_fragment,shadowmap_pars_vertex,shadowmap_vertex,shadowmask_pars_fragment,skinbase_vertex,skinning_pars_vertex,skinning_vertex,skinnormal_vertex,specularmap_fragment,specularmap_pars_fragment,tonemapping_fragment,tonemapping_pars_fragment,transmission_fragment,transmission_pars_fragment,uv_pars_fragment,uv_pars_vertex,uv_vertex,worldpos_vertex,background_vert:vertex$h,background_frag:fragment$h,backgroundCube_vert:vertex$g,backgroundCube_frag:fragment$g,cube_vert:vertex$f,cube_frag:fragment$f,depth_vert:vertex$e,depth_frag:fragment$e,distanceRGBA_vert:vertex$d,distanceRGBA_frag:fragment$d,equirect_vert:vertex$c,equirect_frag:fragment$c,linedashed_vert:vertex$b,linedashed_frag:fragment$b,meshbasic_vert:vertex$a,meshbasic_frag:fragment$a,meshlambert_vert:vertex$9,meshlambert_frag:fragment$9,meshmatcap_vert:vertex$8,meshmatcap_frag:fragment$8,meshnormal_vert:vertex$7,meshnormal_frag:fragment$7,meshphong_vert:vertex$6,meshphong_frag:fragment$6,meshphysical_vert:vertex$5,meshphysical_frag:fragment$5,meshtoon_vert:vertex$4,meshtoon_frag:fragment$4,points_vert:vertex$3,points_frag:fragment$3,shadow_vert:vertex$2,shadow_frag:fragment$2,sprite_vert:vertex$1,sprite_frag:fragment$1},UniformsLib={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},envMapRotation:{value:new Matrix3},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Matrix3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Matrix3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Matrix3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color(16777215)},opacity:{value:1},center:{value:new Vector2(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}},ShaderLib={basic:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.fog]),vertexShader:ShaderChunk.meshbasic_vert,fragmentShader:ShaderChunk.meshbasic_frag},lambert:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshlambert_vert,fragmentShader:ShaderChunk.meshlambert_frag},phong:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},specular:{value:new Color(1118481)},shininess:{value:30}}]),vertexShader:ShaderChunk.meshphong_vert,fragmentShader:ShaderChunk.meshphong_frag},standard:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.roughnessmap,UniformsLib.metalnessmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag},toon:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.gradientmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshtoon_vert,fragmentShader:ShaderChunk.meshtoon_frag},matcap:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,{matcap:{value:null}}]),vertexShader:ShaderChunk.meshmatcap_vert,fragmentShader:ShaderChunk.meshmatcap_frag},points:{uniforms:mergeUniforms([UniformsLib.points,UniformsLib.fog]),vertexShader:ShaderChunk.points_vert,fragmentShader:ShaderChunk.points_frag},dashed:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ShaderChunk.linedashed_vert,fragmentShader:ShaderChunk.linedashed_frag},depth:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap]),vertexShader:ShaderChunk.depth_vert,fragmentShader:ShaderChunk.depth_frag},normal:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,{opacity:{value:1}}]),vertexShader:ShaderChunk.meshnormal_vert,fragmentShader:ShaderChunk.meshnormal_frag},sprite:{uniforms:mergeUniforms([UniformsLib.sprite,UniformsLib.fog]),vertexShader:ShaderChunk.sprite_vert,fragmentShader:ShaderChunk.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ShaderChunk.background_vert,fragmentShader:ShaderChunk.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Matrix3}},vertexShader:ShaderChunk.backgroundCube_vert,fragmentShader:ShaderChunk.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ShaderChunk.cube_vert,fragmentShader:ShaderChunk.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ShaderChunk.equirect_vert,fragmentShader:ShaderChunk.equirect_frag},distanceRGBA:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ShaderChunk.distanceRGBA_vert,fragmentShader:ShaderChunk.distanceRGBA_frag},shadow:{uniforms:mergeUniforms([UniformsLib.lights,UniformsLib.fog,{color:{value:new Color(0)},opacity:{value:1}}]),vertexShader:ShaderChunk.shadow_vert,fragmentShader:ShaderChunk.shadow_frag}};ShaderLib.physical={uniforms:mergeUniforms([ShaderLib.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Matrix3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Matrix3},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Matrix3},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Matrix3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Matrix3},sheen:{value:0},sheenColor:{value:new Color(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Matrix3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Matrix3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Matrix3},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Matrix3},attenuationDistance:{value:0},attenuationColor:{value:new Color(0)},specularColor:{value:new Color(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Matrix3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Matrix3},anisotropyVector:{value:new Vector2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Matrix3}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag};const _rgb={r:0,b:0,g:0},_e1$1=new Euler,_m1$1=new Matrix4;function WebGLBackground(renderer$1,cubemaps,cubeuvmaps,state,objects,alpha$1,premultipliedAlpha){let clearColor=new Color(0),clearAlpha=alpha$1===!0?0:1,planeMesh,boxMesh,currentBackground=null,currentBackgroundVersion=0,currentTonemapping=null;function getBackground(scene){let background=scene.isScene===!0?scene.background:null;if(background&&background.isTexture){let usePMREM=scene.backgroundBlurriness>0;background=(usePMREM?cubeuvmaps:cubemaps).get(background)}return background}function render$2(scene){let forceClear=!1,background=getBackground(scene);background===null?setClear(clearColor,clearAlpha):background&&background.isColor&&(setClear(background,1),forceClear=!0);let environmentBlendMode=renderer$1.xr.getEnvironmentBlendMode();environmentBlendMode===`additive`?state.buffers.color.setClear(0,0,0,1,premultipliedAlpha):environmentBlendMode===`alpha-blend`&&state.buffers.color.setClear(0,0,0,0,premultipliedAlpha),(renderer$1.autoClear||forceClear)&&(state.buffers.depth.setTest(!0),state.buffers.depth.setMask(!0),state.buffers.color.setMask(!0),renderer$1.clear(renderer$1.autoClearColor,renderer$1.autoClearDepth,renderer$1.autoClearStencil))}function addToRenderList(renderList$1,scene){let background=getBackground(scene);background&&(background.isCubeTexture||background.mapping===CubeUVReflectionMapping)?(boxMesh===void 0&&(boxMesh=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:`BackgroundCubeMaterial`,uniforms:cloneUniforms(ShaderLib.backgroundCube.uniforms),vertexShader:ShaderLib.backgroundCube.vertexShader,fragmentShader:ShaderLib.backgroundCube.fragmentShader,side:BackSide,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),boxMesh.geometry.deleteAttribute(`normal`),boxMesh.geometry.deleteAttribute(`uv`),boxMesh.onBeforeRender=function(renderer$2,scene$1,camera){this.matrixWorld.copyPosition(camera.matrixWorld)},Object.defineProperty(boxMesh.material,`envMap`,{get:function(){return this.uniforms.envMap.value}}),objects.update(boxMesh)),_e1$1.copy(scene.backgroundRotation),_e1$1.x*=-1,_e1$1.y*=-1,_e1$1.z*=-1,background.isCubeTexture&&background.isRenderTargetTexture===!1&&(_e1$1.y*=-1,_e1$1.z*=-1),boxMesh.material.uniforms.envMap.value=background,boxMesh.material.uniforms.flipEnvMap.value=background.isCubeTexture&&background.isRenderTargetTexture===!1?-1:1,boxMesh.material.uniforms.backgroundBlurriness.value=scene.backgroundBlurriness,boxMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity,boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4(_m1$1.makeRotationFromEuler(_e1$1)),boxMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer,(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer$1.toneMapping)&&(boxMesh.material.needsUpdate=!0,currentBackground=background,currentBackgroundVersion=background.version,currentTonemapping=renderer$1.toneMapping),boxMesh.layers.enableAll(),renderList$1.unshift(boxMesh,boxMesh.geometry,boxMesh.material,0,0,null)):background&&background.isTexture&&(planeMesh===void 0&&(planeMesh=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:`BackgroundMaterial`,uniforms:cloneUniforms(ShaderLib.background.uniforms),vertexShader:ShaderLib.background.vertexShader,fragmentShader:ShaderLib.background.fragmentShader,side:FrontSide,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),planeMesh.geometry.deleteAttribute(`normal`),Object.defineProperty(planeMesh.material,`map`,{get:function(){return this.uniforms.t2D.value}}),objects.update(planeMesh)),planeMesh.material.uniforms.t2D.value=background,planeMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity,planeMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer,background.matrixAutoUpdate===!0&&background.updateMatrix(),planeMesh.material.uniforms.uvTransform.value.copy(background.matrix),(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer$1.toneMapping)&&(planeMesh.material.needsUpdate=!0,currentBackground=background,currentBackgroundVersion=background.version,currentTonemapping=renderer$1.toneMapping),planeMesh.layers.enableAll(),renderList$1.unshift(planeMesh,planeMesh.geometry,planeMesh.material,0,0,null))}function setClear(color$2,alpha$2){color$2.getRGB(_rgb,getUnlitUniformColorSpace(renderer$1)),state.buffers.color.setClear(_rgb.r,_rgb.g,_rgb.b,alpha$2,premultipliedAlpha)}function dispose$1(){boxMesh!==void 0&&(boxMesh.geometry.dispose(),boxMesh.material.dispose(),boxMesh=void 0),planeMesh!==void 0&&(planeMesh.geometry.dispose(),planeMesh.material.dispose(),planeMesh=void 0)}return{getClearColor:function(){return clearColor},setClearColor:function(color$2,alpha$2=1){clearColor.set(color$2),clearAlpha=alpha$2,setClear(clearColor,clearAlpha)},getClearAlpha:function(){return clearAlpha},setClearAlpha:function(alpha$2){clearAlpha=alpha$2,setClear(clearColor,clearAlpha)},render:render$2,addToRenderList,dispose:dispose$1}}function WebGLBindingStates(gl,attributes){let maxVertexAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS),bindingStates={},defaultState$2=createBindingState(null),currentState=defaultState$2,forceUpdate=!1;function setup(object$1,material,program,geometry,index$1){let updateBuffers=!1,state=getBindingState(geometry,program,material);currentState!==state&&(currentState=state,bindVertexArrayObject(currentState.object)),updateBuffers=needsUpdate(object$1,geometry,program,index$1),updateBuffers&&saveCache(object$1,geometry,program,index$1),index$1!==null&&attributes.update(index$1,gl.ELEMENT_ARRAY_BUFFER),(updateBuffers||forceUpdate)&&(forceUpdate=!1,setupVertexAttributes(object$1,material,program,geometry),index$1!==null&&gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,attributes.get(index$1).buffer))}function createVertexArrayObject(){return gl.createVertexArray()}function bindVertexArrayObject(vao){return gl.bindVertexArray(vao)}function deleteVertexArrayObject(vao){return gl.deleteVertexArray(vao)}function getBindingState(geometry,program,material){let wireframe=material.wireframe===!0,programMap=bindingStates[geometry.id];programMap===void 0&&(programMap={},bindingStates[geometry.id]=programMap);let stateMap=programMap[program.id];stateMap===void 0&&(stateMap={},programMap[program.id]=stateMap);let state=stateMap[wireframe];return state===void 0&&(state=createBindingState(createVertexArrayObject()),stateMap[wireframe]=state),state}function createBindingState(vao){let newAttributes=[],enabledAttributes=[],attributeDivisors=[];for(let i=0;i=0){let cachedAttribute=cachedAttributes[name$2],geometryAttribute=geometryAttributes[name$2];if(geometryAttribute===void 0&&(name$2===`instanceMatrix`&&object$1.instanceMatrix&&(geometryAttribute=object$1.instanceMatrix),name$2===`instanceColor`&&object$1.instanceColor&&(geometryAttribute=object$1.instanceColor)),cachedAttribute===void 0||cachedAttribute.attribute!==geometryAttribute||geometryAttribute&&cachedAttribute.data!==geometryAttribute.data)return!0;attributesNum++}}return currentState.attributesNum!==attributesNum||currentState.index!==index$1}function saveCache(object$1,geometry,program,index$1){let cache$1={},attributes$1=geometry.attributes,attributesNum=0,programAttributes=program.getAttributes();for(let name$2 in programAttributes){let programAttribute=programAttributes[name$2];if(programAttribute.location>=0){let attribute=attributes$1[name$2];attribute===void 0&&(name$2===`instanceMatrix`&&object$1.instanceMatrix&&(attribute=object$1.instanceMatrix),name$2===`instanceColor`&&object$1.instanceColor&&(attribute=object$1.instanceColor));let data$12={};data$12.attribute=attribute,attribute&&attribute.data&&(data$12.data=attribute.data),cache$1[name$2]=data$12,attributesNum++}}currentState.attributes=cache$1,currentState.attributesNum=attributesNum,currentState.index=index$1}function initAttributes(){let newAttributes=currentState.newAttributes;for(let i=0,il=newAttributes.length;i=0){let geometryAttribute=geometryAttributes[name$2];if(geometryAttribute===void 0&&(name$2===`instanceMatrix`&&object$1.instanceMatrix&&(geometryAttribute=object$1.instanceMatrix),name$2===`instanceColor`&&object$1.instanceColor&&(geometryAttribute=object$1.instanceColor)),geometryAttribute!==void 0){let normalized=geometryAttribute.normalized,size$2=geometryAttribute.itemSize,attribute=attributes.get(geometryAttribute);if(attribute===void 0)continue;let buffer$1=attribute.buffer,type=attribute.type,bytesPerElement=attribute.bytesPerElement,integer$1=type===gl.INT||type===gl.UNSIGNED_INT||geometryAttribute.gpuType===IntType;if(geometryAttribute.isInterleavedBufferAttribute){let data$12=geometryAttribute.data,stride=data$12.stride,offset$2=geometryAttribute.offset;if(data$12.isInstancedInterleavedBuffer){for(let i=0;i0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.HIGH_FLOAT).precision>0)return`highp`;precision$1=`mediump`}return precision$1===`mediump`&&gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.MEDIUM_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.MEDIUM_FLOAT).precision>0?`mediump`:`lowp`}let precision=parameters.precision===void 0?`highp`:parameters.precision,maxPrecision=getMaxPrecision(precision);maxPrecision!==precision&&(console.warn(`THREE.WebGLRenderer:`,precision,`not supported, using`,maxPrecision,`instead.`),precision=maxPrecision);let logarithmicDepthBuffer=parameters.logarithmicDepthBuffer===!0,reversedDepthBuffer=parameters.reversedDepthBuffer===!0&&extensions.has(`EXT_clip_control`),maxTextures=gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS),maxVertexTextures=gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize=gl.getParameter(gl.MAX_TEXTURE_SIZE),maxCubemapSize=gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS),maxVertexUniforms=gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings=gl.getParameter(gl.MAX_VARYING_VECTORS),maxFragmentUniforms=gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures=maxVertexTextures>0,maxSamples=gl.getParameter(gl.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy,getMaxPrecision,textureFormatReadable,textureTypeReadable,precision,logarithmicDepthBuffer,reversedDepthBuffer,maxTextures,maxVertexTextures,maxTextureSize,maxCubemapSize,maxAttributes,maxVertexUniforms,maxVaryings,maxFragmentUniforms,vertexTextures,maxSamples}}function WebGLClipping(properties){let scope$1=this,globalState=null,numGlobalPlanes=0,localClippingEnabled=!1,renderingShadows=!1,plane=new Plane,viewNormalMatrix=new Matrix3,uniform={value:null,needsUpdate:!1};this.uniform=uniform,this.numPlanes=0,this.numIntersection=0,this.init=function(planes,enableLocalClipping){let enabled$1=planes.length!==0||enableLocalClipping||numGlobalPlanes!==0||localClippingEnabled;return localClippingEnabled=enableLocalClipping,numGlobalPlanes=planes.length,enabled$1},this.beginShadows=function(){renderingShadows=!0,projectPlanes(null)},this.endShadows=function(){renderingShadows=!1},this.setGlobalState=function(planes,camera){globalState=projectPlanes(planes,camera,0)},this.setState=function(material,camera,useCache){let planes=material.clippingPlanes,clipIntersection=material.clipIntersection,clipShadows=material.clipShadows,materialProperties=properties.get(material);if(!localClippingEnabled||planes===null||planes.length===0||renderingShadows&&!clipShadows)renderingShadows?projectPlanes(null):resetGlobalState();else{let nGlobal=renderingShadows?0:numGlobalPlanes,lGlobal=nGlobal*4,dstArray=materialProperties.clippingState||null;uniform.value=dstArray,dstArray=projectPlanes(planes,camera,lGlobal,useCache);for(let i=0;i!==lGlobal;++i)dstArray[i]=globalState[i];materialProperties.clippingState=dstArray,this.numIntersection=clipIntersection?this.numPlanes:0,this.numPlanes+=nGlobal}};function resetGlobalState(){uniform.value!==globalState&&(uniform.value=globalState,uniform.needsUpdate=numGlobalPlanes>0),scope$1.numPlanes=numGlobalPlanes,scope$1.numIntersection=0}function projectPlanes(planes,camera,dstOffset,skipTransform){let nPlanes=planes===null?0:planes.length,dstArray=null;if(nPlanes!==0){if(dstArray=uniform.value,skipTransform!==!0||dstArray===null){let flatSize=dstOffset+nPlanes*4,viewMatrix=camera.matrixWorldInverse;viewNormalMatrix.getNormalMatrix(viewMatrix),(dstArray===null||dstArray.length0){let renderTarget=new WebGLCubeRenderTarget(image$1.height);return renderTarget.fromEquirectangularTexture(renderer$1,texture),cubemaps.set(texture,renderTarget),texture.addEventListener(`dispose`,onTextureDispose),mapTextureMapping(renderTarget.texture,texture.mapping)}else return null}}return texture}function onTextureDispose(event){let texture=event.target;texture.removeEventListener(`dispose`,onTextureDispose);let cubemap=cubemaps.get(texture);cubemap!==void 0&&(cubemaps.delete(texture),cubemap.dispose())}function dispose$1(){cubemaps=new WeakMap}return{get,dispose:dispose$1}}const LOD_MIN=4,EXTRA_LOD_SIGMA=[.125,.215,.35,.446,.526,.582],MAX_SAMPLES=20,_flatCamera=new OrthographicCamera,_clearColor=new Color;let _oldTarget=null,_oldActiveCubeFace=0,_oldActiveMipmapLevel=0,_oldXrEnabled=!1;const PHI=(1+Math.sqrt(5))/2,INV_PHI=1/PHI,_axisDirections=[new Vector3(-PHI,INV_PHI,0),new Vector3(PHI,INV_PHI,0),new Vector3(-INV_PHI,0,PHI),new Vector3(INV_PHI,0,PHI),new Vector3(0,PHI,-INV_PHI),new Vector3(0,PHI,INV_PHI),new Vector3(-1,1,-1),new Vector3(1,1,-1),new Vector3(-1,1,1),new Vector3(1,1,1)],_origin=new Vector3;var PMREMGenerator=class{constructor(renderer$1){this._renderer=renderer$1,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(scene,sigma=0,near=.1,far=100,options$1={}){let{size:size$2=256,position:position$2=_origin}=options$1;_oldTarget=this._renderer.getRenderTarget(),_oldActiveCubeFace=this._renderer.getActiveCubeFace(),_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel(),_oldXrEnabled=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(size$2);let cubeUVRenderTarget=this._allocateTargets();return cubeUVRenderTarget.depthBuffer=!0,this._sceneToCubeUV(scene,near,far,cubeUVRenderTarget,position$2),sigma>0&&this._blur(cubeUVRenderTarget,0,0,sigma),this._applyPMREM(cubeUVRenderTarget),this._cleanup(cubeUVRenderTarget),cubeUVRenderTarget}fromEquirectangular(equirectangular,renderTarget=null){return this._fromTexture(equirectangular,renderTarget)}fromCubemap(cubemap,renderTarget=null){return this._fromTexture(cubemap,renderTarget)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=_getCubemapMaterial(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=_getEquirectMaterial(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(cubeSize){this._lodMax=Math.floor(Math.log2(cubeSize)),this._cubeSize=2**this._lodMax}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let i=0;i2?size$2:0,size$2,size$2),renderer$1.setRenderTarget(cubeUVRenderTarget),useSolidColor&&renderer$1.render(backgroundBox,cubeCamera),renderer$1.render(scene,cubeCamera)}backgroundBox.geometry.dispose(),backgroundBox.material.dispose(),renderer$1.toneMapping=toneMapping,renderer$1.autoClear=originalAutoClear,scene.background=background}_textureToCubeUV(texture,cubeUVRenderTarget){let renderer$1=this._renderer,isCubeTexture=texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping;isCubeTexture?(this._cubemapMaterial===null&&(this._cubemapMaterial=_getCubemapMaterial()),this._cubemapMaterial.uniforms.flipEnvMap.value=texture.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=_getEquirectMaterial());let material=isCubeTexture?this._cubemapMaterial:this._equirectMaterial,mesh=new Mesh(this._lodPlanes[0],material),uniforms=material.uniforms;uniforms.envMap.value=texture;let size$2=this._cubeSize;_setViewport(cubeUVRenderTarget,0,0,3*size$2,2*size$2),renderer$1.setRenderTarget(cubeUVRenderTarget),renderer$1.render(mesh,_flatCamera)}_applyPMREM(cubeUVRenderTarget){let renderer$1=this._renderer,autoClear=renderer$1.autoClear;renderer$1.autoClear=!1;let n=this._lodPlanes.length;for(let i=1;iMAX_SAMPLES&&console.warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${MAX_SAMPLES}`);let weights=[],sum=0;for(let i=0;i_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0),y=4*(this._cubeSize-outputSize);_setViewport(targetOut,x$1,y,3*outputSize,2*outputSize),renderer$1.setRenderTarget(targetOut),renderer$1.render(blurMesh,_flatCamera)}};function _createPlanes(lodMax){let lodPlanes=[],sizeLods=[],sigmas=[],lod=lodMax,totalLods=lodMax-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let i=0;ilodMax-LOD_MIN?sigma=EXTRA_LOD_SIGMA[i-lodMax+LOD_MIN-1]:i===0&&(sigma=0),sigmas.push(sigma);let texelSize=1/(sizeLod-2),min$1=-texelSize,max$1=1+texelSize,uv1=[min$1,min$1,max$1,min$1,max$1,max$1,min$1,min$1,max$1,max$1,min$1,max$1],cubeFaces=6,vertices=6,positionSize=3,uvSize=2,faceIndexSize=1,position$2=new Float32Array(positionSize*vertices*cubeFaces),uv=new Float32Array(uvSize*vertices*cubeFaces),faceIndex=new Float32Array(faceIndexSize*vertices*cubeFaces);for(let face=0;face2?0:-1,coordinates=[x$1,y,0,x$1+2/3,y,0,x$1+2/3,y+1,0,x$1,y,0,x$1+2/3,y+1,0,x$1,y+1,0];position$2.set(coordinates,positionSize*vertices*face),uv.set(uv1,uvSize*vertices*face);let fill$1=[face,face,face,face,face,face];faceIndex.set(fill$1,faceIndexSize*vertices*face)}let planes=new BufferGeometry;planes.setAttribute(`position`,new BufferAttribute(position$2,positionSize)),planes.setAttribute(`uv`,new BufferAttribute(uv,uvSize)),planes.setAttribute(`faceIndex`,new BufferAttribute(faceIndex,faceIndexSize)),lodPlanes.push(planes),lod>LOD_MIN&&lod--}return{lodPlanes,sizeLods,sigmas}}function _createRenderTarget(width,height,params){let cubeUVRenderTarget=new WebGLRenderTarget(width,height,params);return cubeUVRenderTarget.texture.mapping=CubeUVReflectionMapping,cubeUVRenderTarget.texture.name=`PMREM.cubeUv`,cubeUVRenderTarget.scissorTest=!0,cubeUVRenderTarget}function _setViewport(target$1,x$1,y,width,height){target$1.viewport.set(x$1,y,width,height),target$1.scissor.set(x$1,y,width,height)}function _getBlurShader(lodMax,width,height){let weights=new Float32Array(MAX_SAMPLES),poleAxis=new Vector3(0,1,0),shaderMaterial=new ShaderMaterial({name:`SphericalGaussianBlur`,defines:{n:MAX_SAMPLES,CUBEUV_TEXEL_WIDTH:1/width,CUBEUV_TEXEL_HEIGHT:1/height,CUBEUV_MAX_MIP:`${lodMax}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:weights},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:poleAxis}},vertexShader:_getCommonVertexShader(),fragmentShader:` precision mediump float; precision mediump int; @@ -3743,7 +3743,7 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function WebGLCubeUVMaps(renderer$1){let cubeUVmaps=new WeakMap,pmremGenerator=null;function get(texture){if(texture&&texture.isTexture){let mapping=texture.mapping,isEquirectMap=mapping===EquirectangularReflectionMapping||mapping===EquirectangularRefractionMapping,isCubeMap=mapping===CubeReflectionMapping||mapping===CubeRefractionMapping;if(isEquirectMap||isCubeMap){let renderTarget=cubeUVmaps.get(texture),currentPMREMVersion=renderTarget===void 0?0:renderTarget.texture.pmremVersion;if(texture.isRenderTargetTexture&&texture.pmremVersion!==currentPMREMVersion)return pmremGenerator===null&&(pmremGenerator=new PMREMGenerator(renderer$1)),renderTarget=isEquirectMap?pmremGenerator.fromEquirectangular(texture,renderTarget):pmremGenerator.fromCubemap(texture,renderTarget),renderTarget.texture.pmremVersion=texture.pmremVersion,cubeUVmaps.set(texture,renderTarget),renderTarget.texture;if(renderTarget!==void 0)return renderTarget.texture;{let image$1=texture.image;return isEquirectMap&&image$1&&image$1.height>0||isCubeMap&&image$1&&isCubeTextureComplete(image$1)?(pmremGenerator===null&&(pmremGenerator=new PMREMGenerator(renderer$1)),renderTarget=isEquirectMap?pmremGenerator.fromEquirectangular(texture):pmremGenerator.fromCubemap(texture),renderTarget.texture.pmremVersion=texture.pmremVersion,cubeUVmaps.set(texture,renderTarget),texture.addEventListener(`dispose`,onTextureDispose),renderTarget.texture):null}}}return texture}function isCubeTextureComplete(image$1){let count$1=0,length=6;for(let i=0;icapabilities.maxTextureSize&&(height=Math.ceil(width/capabilities.maxTextureSize),width=capabilities.maxTextureSize);let buffer$1=new Float32Array(width*height*4*morphTargetsCount),texture=new DataArrayTexture(buffer$1,width,height,morphTargetsCount);texture.type=FloatType,texture.needsUpdate=!0;let vertexDataStride=vertexDataCount*4;for(let i=0;i0)return array$1;let n=nBlocks*blockSize,r$1=arrayCacheF32[n];if(r$1===void 0&&(r$1=new Float32Array(n),arrayCacheF32[n]=r$1),nBlocks!==0){firstElem.toArray(r$1,0);for(let i=1,offset$2=0;i!==nBlocks;++i)offset$2+=blockSize,array$1[i].toArray(r$1,offset$2)}return r$1}function arraysEqual(a$1,b$1){if(a$1.length!==b$1.length)return!1;for(let i=0,l=a$1.length;i0||isCubeMap&&image$1&&isCubeTextureComplete(image$1)?(pmremGenerator===null&&(pmremGenerator=new PMREMGenerator(renderer$1)),renderTarget=isEquirectMap?pmremGenerator.fromEquirectangular(texture):pmremGenerator.fromCubemap(texture),renderTarget.texture.pmremVersion=texture.pmremVersion,cubeUVmaps.set(texture,renderTarget),texture.addEventListener(`dispose`,onTextureDispose),renderTarget.texture):null}}}return texture}function isCubeTextureComplete(image$1){let count$2=0,length=6;for(let i=0;icapabilities.maxTextureSize&&(height=Math.ceil(width/capabilities.maxTextureSize),width=capabilities.maxTextureSize);let buffer$1=new Float32Array(width*height*4*morphTargetsCount),texture=new DataArrayTexture(buffer$1,width,height,morphTargetsCount);texture.type=FloatType,texture.needsUpdate=!0;let vertexDataStride=vertexDataCount*4;for(let i=0;i0)return array$1;let n=nBlocks*blockSize,r$1=arrayCacheF32[n];if(r$1===void 0&&(r$1=new Float32Array(n),arrayCacheF32[n]=r$1),nBlocks!==0){firstElem.toArray(r$1,0);for(let i=1,offset$2=0;i!==nBlocks;++i)offset$2+=blockSize,array$1[i].toArray(r$1,offset$2)}return r$1}function arraysEqual(a$1,b$1){if(a$1.length!==b$1.length)return!1;for(let i=0,l=a$1.length;i`:` `} ${line}: ${lines[i]}`)}return lines2.join(` `)}const _m0=new Matrix3;function getEncodingComponents(colorSpace){ColorManagement._getMatrix(_m0,ColorManagement.workingColorSpace,colorSpace);let encodingMatrix=`mat3( ${_m0.elements.map(v=>v.toFixed(4))} )`;switch(ColorManagement.getTransfer(colorSpace)){case LinearTransfer:return[encodingMatrix,`LinearTransferOETF`];case SRGBTransfer:return[encodingMatrix,`sRGBTransferOETF`];default:return console.warn(`THREE.WebGLProgram: Unsupported color space: `,colorSpace),[encodingMatrix,`LinearTransferOETF`]}}function getShaderErrors(gl,shader,type){let status=gl.getShaderParameter(shader,gl.COMPILE_STATUS),shaderInfoLog=gl.getShaderInfoLog(shader)||``,errors=shaderInfoLog.trim();if(status&&errors===``)return``;let errorMatches=/ERROR: 0:(\d+)/.exec(errors);if(errorMatches){let errorLine=parseInt(errorMatches[1]);return type.toUpperCase()+` @@ -3822,7 +3822,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function WebGLShadowMap(renderer$1,objects,capabilities){let _frustum$2=new Frustum,_shadowMapSize=new Vector2,_viewportSize=new Vector2,_viewport=new Vector4,_depthMaterial=new MeshDepthMaterial({depthPacking:RGBADepthPacking}),_distanceMaterial=new MeshDistanceMaterial,_materialCache={},_maxTextureSize=capabilities.maxTextureSize,shadowSide={[FrontSide]:BackSide,[BackSide]:FrontSide,[DoubleSide]:DoubleSide},shadowMaterialVertical=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:vertex,fragmentShader:fragment}),shadowMaterialHorizontal=shadowMaterialVertical.clone();shadowMaterialHorizontal.defines.HORIZONTAL_PASS=1;let fullScreenTri=new BufferGeometry;fullScreenTri.setAttribute(`position`,new BufferAttribute(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let fullScreenMesh=new Mesh(fullScreenTri,shadowMaterialVertical),scope$1=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=PCFShadowMap;let _previousType=this.type;this.render=function(lights,scene,camera){if(scope$1.enabled===!1||scope$1.autoUpdate===!1&&scope$1.needsUpdate===!1||lights.length===0)return;let currentRenderTarget=renderer$1.getRenderTarget(),activeCubeFace=renderer$1.getActiveCubeFace(),activeMipmapLevel=renderer$1.getActiveMipmapLevel(),_state=renderer$1.state;_state.setBlending(NoBlending),_state.buffers.depth.getReversed()?_state.buffers.color.setClear(0,0,0,0):_state.buffers.color.setClear(1,1,1,1),_state.buffers.depth.setTest(!0),_state.setScissorTest(!1);let toVSM=_previousType!==VSMShadowMap&&this.type===VSMShadowMap,fromVSM=_previousType===VSMShadowMap&&this.type!==VSMShadowMap;for(let i=0,il=lights.length;i_maxTextureSize||_shadowMapSize.y>_maxTextureSize)&&(_shadowMapSize.x>_maxTextureSize&&(_viewportSize.x=Math.floor(_maxTextureSize/shadowFrameExtents.x),_shadowMapSize.x=_viewportSize.x*shadowFrameExtents.x,shadow.mapSize.x=_viewportSize.x),_shadowMapSize.y>_maxTextureSize&&(_viewportSize.y=Math.floor(_maxTextureSize/shadowFrameExtents.y),_shadowMapSize.y=_viewportSize.y*shadowFrameExtents.y,shadow.mapSize.y=_viewportSize.y)),shadow.map===null||toVSM===!0||fromVSM===!0){let pars=this.type===VSMShadowMap?{}:{minFilter:NearestFilter,magFilter:NearestFilter};shadow.map!==null&&shadow.map.dispose(),shadow.map=new WebGLRenderTarget(_shadowMapSize.x,_shadowMapSize.y,pars),shadow.map.texture.name=light.name+`.shadowMap`,shadow.camera.updateProjectionMatrix()}renderer$1.setRenderTarget(shadow.map),renderer$1.clear();let viewportCount=shadow.getViewportCount();for(let vp=0;vp0||material.map&&material.alphaTest>0||material.alphaToCoverage===!0){let keyA=result.uuid,keyB=material.uuid,materialsForVariant=_materialCache[keyA];materialsForVariant===void 0&&(materialsForVariant={},_materialCache[keyA]=materialsForVariant);let cachedMaterial=materialsForVariant[keyB];cachedMaterial===void 0&&(cachedMaterial=result.clone(),materialsForVariant[keyB]=cachedMaterial,material.addEventListener(`dispose`,onMaterialDispose)),result=cachedMaterial}if(result.visible=material.visible,result.wireframe=material.wireframe,type===VSMShadowMap?result.side=material.shadowSide===null?material.side:material.shadowSide:result.side=material.shadowSide===null?shadowSide[material.side]:material.shadowSide,result.alphaMap=material.alphaMap,result.alphaTest=material.alphaToCoverage===!0?.5:material.alphaTest,result.map=material.map,result.clipShadows=material.clipShadows,result.clippingPlanes=material.clippingPlanes,result.clipIntersection=material.clipIntersection,result.displacementMap=material.displacementMap,result.displacementScale=material.displacementScale,result.displacementBias=material.displacementBias,result.wireframeLinewidth=material.wireframeLinewidth,result.linewidth=material.linewidth,light.isPointLight===!0&&result.isMeshDistanceMaterial===!0){let materialProperties=renderer$1.properties.get(result);materialProperties.light=light}return result}function renderObject(object$1,camera,shadowCamera,light,type){if(object$1.visible===!1)return;let visible=object$1.layers.test(camera.layers);if(visible&&(object$1.isMesh||object$1.isLine||object$1.isPoints)&&(object$1.castShadow||object$1.receiveShadow&&type===VSMShadowMap)&&(!object$1.frustumCulled||_frustum$2.intersectsObject(object$1))){object$1.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse,object$1.matrixWorld);let geometry=objects.update(object$1),material=object$1.material;if(Array.isArray(material)){let groups=geometry.groups;for(let k$3=0,kl=groups.length;k$3=2):(version$2=parseFloat(/^WebGL (\d)/.exec(glVersion)[1]),lineWidthAvailable=version$2>=1);let currentTextureSlot=null,currentBoundTextures={},scissorParam=gl.getParameter(gl.SCISSOR_BOX),viewportParam=gl.getParameter(gl.VIEWPORT),currentScissor=new Vector4().fromArray(scissorParam),currentViewport=new Vector4().fromArray(viewportParam);function createTexture(type,target$1,count$1,dimensions){let data$12=new Uint8Array(4),texture=gl.createTexture();gl.bindTexture(type,texture),gl.texParameteri(type,gl.TEXTURE_MIN_FILTER,gl.NEAREST),gl.texParameteri(type,gl.TEXTURE_MAG_FILTER,gl.NEAREST);for(let i=0;i`u`?!1:/OculusBrowser/g.test(navigator.userAgent),_imageDimensions=new Vector2,_videoTextures=new WeakMap,_canvas$1,_sources=new WeakMap,useOffscreenCanvas=!1;try{useOffscreenCanvas=typeof OffscreenCanvas<`u`&&new OffscreenCanvas(1,1).getContext(`2d`)!==null}catch{}function createCanvas(width,height){return useOffscreenCanvas?new OffscreenCanvas(width,height):createElementNS(`canvas`)}function resizeImage(image$1,needsNewCanvas,maxSize){let scale$1=1,dimensions=getDimensions$1(image$1);if((dimensions.width>maxSize||dimensions.height>maxSize)&&(scale$1=maxSize/Math.max(dimensions.width,dimensions.height)),scale$1<1)if(typeof HTMLImageElement<`u`&&image$1 instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&image$1 instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&image$1 instanceof ImageBitmap||typeof VideoFrame<`u`&&image$1 instanceof VideoFrame){let width=Math.floor(scale$1*dimensions.width),height=Math.floor(scale$1*dimensions.height);_canvas$1===void 0&&(_canvas$1=createCanvas(width,height));let canvas=needsNewCanvas?createCanvas(width,height):_canvas$1;canvas.width=width,canvas.height=height;let context$1=canvas.getContext(`2d`);return context$1.drawImage(image$1,0,0,width,height),console.warn(`THREE.WebGLRenderer: Texture has been resized from (`+dimensions.width+`x`+dimensions.height+`) to (`+width+`x`+height+`).`),canvas}else return`data`in image$1&&console.warn(`THREE.WebGLRenderer: Image in DataTexture is too big (`+dimensions.width+`x`+dimensions.height+`).`),image$1;return image$1}function textureNeedsGenerateMipmaps(texture){return texture.generateMipmaps}function generateMipmap(target$1){_gl.generateMipmap(target$1)}function getTargetType$1(texture){return texture.isWebGLCubeRenderTarget?_gl.TEXTURE_CUBE_MAP:texture.isWebGL3DRenderTarget?_gl.TEXTURE_3D:texture.isWebGLArrayRenderTarget||texture.isCompressedArrayTexture?_gl.TEXTURE_2D_ARRAY:_gl.TEXTURE_2D}function getInternalFormat(internalFormatName,glFormat,glType,colorSpace,forceLinearTransfer=!1){if(internalFormatName!==null){if(_gl[internalFormatName]!==void 0)return _gl[internalFormatName];console.warn(`THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '`+internalFormatName+`'`)}let internalFormat=glFormat;if(glFormat===_gl.RED&&(glType===_gl.FLOAT&&(internalFormat=_gl.R32F),glType===_gl.HALF_FLOAT&&(internalFormat=_gl.R16F),glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.R8)),glFormat===_gl.RED_INTEGER&&(glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.R8UI),glType===_gl.UNSIGNED_SHORT&&(internalFormat=_gl.R16UI),glType===_gl.UNSIGNED_INT&&(internalFormat=_gl.R32UI),glType===_gl.BYTE&&(internalFormat=_gl.R8I),glType===_gl.SHORT&&(internalFormat=_gl.R16I),glType===_gl.INT&&(internalFormat=_gl.R32I)),glFormat===_gl.RG&&(glType===_gl.FLOAT&&(internalFormat=_gl.RG32F),glType===_gl.HALF_FLOAT&&(internalFormat=_gl.RG16F),glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.RG8)),glFormat===_gl.RG_INTEGER&&(glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.RG8UI),glType===_gl.UNSIGNED_SHORT&&(internalFormat=_gl.RG16UI),glType===_gl.UNSIGNED_INT&&(internalFormat=_gl.RG32UI),glType===_gl.BYTE&&(internalFormat=_gl.RG8I),glType===_gl.SHORT&&(internalFormat=_gl.RG16I),glType===_gl.INT&&(internalFormat=_gl.RG32I)),glFormat===_gl.RGB_INTEGER&&(glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.RGB8UI),glType===_gl.UNSIGNED_SHORT&&(internalFormat=_gl.RGB16UI),glType===_gl.UNSIGNED_INT&&(internalFormat=_gl.RGB32UI),glType===_gl.BYTE&&(internalFormat=_gl.RGB8I),glType===_gl.SHORT&&(internalFormat=_gl.RGB16I),glType===_gl.INT&&(internalFormat=_gl.RGB32I)),glFormat===_gl.RGBA_INTEGER&&(glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.RGBA8UI),glType===_gl.UNSIGNED_SHORT&&(internalFormat=_gl.RGBA16UI),glType===_gl.UNSIGNED_INT&&(internalFormat=_gl.RGBA32UI),glType===_gl.BYTE&&(internalFormat=_gl.RGBA8I),glType===_gl.SHORT&&(internalFormat=_gl.RGBA16I),glType===_gl.INT&&(internalFormat=_gl.RGBA32I)),glFormat===_gl.RGB&&glType===_gl.UNSIGNED_INT_5_9_9_9_REV&&(internalFormat=_gl.RGB9_E5),glFormat===_gl.RGBA){let transfer$2=forceLinearTransfer?LinearTransfer:ColorManagement.getTransfer(colorSpace);glType===_gl.FLOAT&&(internalFormat=_gl.RGBA32F),glType===_gl.HALF_FLOAT&&(internalFormat=_gl.RGBA16F),glType===_gl.UNSIGNED_BYTE&&(internalFormat=transfer$2===SRGBTransfer?_gl.SRGB8_ALPHA8:_gl.RGBA8),glType===_gl.UNSIGNED_SHORT_4_4_4_4&&(internalFormat=_gl.RGBA4),glType===_gl.UNSIGNED_SHORT_5_5_5_1&&(internalFormat=_gl.RGB5_A1)}return(internalFormat===_gl.R16F||internalFormat===_gl.R32F||internalFormat===_gl.RG16F||internalFormat===_gl.RG32F||internalFormat===_gl.RGBA16F||internalFormat===_gl.RGBA32F)&&extensions.get(`EXT_color_buffer_float`),internalFormat}function getInternalDepthFormat(useStencil,depthType){let glInternalFormat;return useStencil?depthType===null||depthType===UnsignedIntType||depthType===UnsignedInt248Type?glInternalFormat=_gl.DEPTH24_STENCIL8:depthType===FloatType?glInternalFormat=_gl.DEPTH32F_STENCIL8:depthType===UnsignedShortType&&(glInternalFormat=_gl.DEPTH24_STENCIL8,console.warn(`DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.`)):depthType===null||depthType===UnsignedIntType||depthType===UnsignedInt248Type?glInternalFormat=_gl.DEPTH_COMPONENT24:depthType===FloatType?glInternalFormat=_gl.DEPTH_COMPONENT32F:depthType===UnsignedShortType&&(glInternalFormat=_gl.DEPTH_COMPONENT16),glInternalFormat}function getMipLevels(texture,image$1){return textureNeedsGenerateMipmaps(texture)===!0||texture.isFramebufferTexture&&texture.minFilter!==NearestFilter&&texture.minFilter!==LinearFilter?Math.log2(Math.max(image$1.width,image$1.height))+1:texture.mipmaps!==void 0&&texture.mipmaps.length>0?texture.mipmaps.length:texture.isCompressedTexture&&Array.isArray(texture.image)?image$1.mipmaps.length:1}function onTextureDispose(event){let texture=event.target;texture.removeEventListener(`dispose`,onTextureDispose),deallocateTexture(texture),texture.isVideoTexture&&_videoTextures.delete(texture)}function onRenderTargetDispose(event){let renderTarget=event.target;renderTarget.removeEventListener(`dispose`,onRenderTargetDispose),deallocateRenderTarget(renderTarget)}function deallocateTexture(texture){let textureProperties=properties.get(texture);if(textureProperties.__webglInit===void 0)return;let source=texture.source,webglTextures=_sources.get(source);if(webglTextures){let webglTexture=webglTextures[textureProperties.__cacheKey];webglTexture.usedTimes--,webglTexture.usedTimes===0&&deleteTexture(texture),Object.keys(webglTextures).length===0&&_sources.delete(source)}properties.remove(texture)}function deleteTexture(texture){let textureProperties=properties.get(texture);_gl.deleteTexture(textureProperties.__webglTexture);let source=texture.source,webglTextures=_sources.get(source);delete webglTextures[textureProperties.__cacheKey],info.memory.textures--}function deallocateRenderTarget(renderTarget){let renderTargetProperties=properties.get(renderTarget);if(renderTarget.depthTexture&&(renderTarget.depthTexture.dispose(),properties.remove(renderTarget.depthTexture)),renderTarget.isWebGLCubeRenderTarget)for(let i=0;i<6;i++){if(Array.isArray(renderTargetProperties.__webglFramebuffer[i]))for(let level=0;level=capabilities.maxTextures&&console.warn(`THREE.WebGLTextures: Trying to use `+textureUnit+` texture units while this GPU supports only `+capabilities.maxTextures),textureUnits+=1,textureUnit}function getTextureCacheKey(texture){let array$1=[];return array$1.push(texture.wrapS),array$1.push(texture.wrapT),array$1.push(texture.wrapR||0),array$1.push(texture.magFilter),array$1.push(texture.minFilter),array$1.push(texture.anisotropy),array$1.push(texture.internalFormat),array$1.push(texture.format),array$1.push(texture.type),array$1.push(texture.generateMipmaps),array$1.push(texture.premultiplyAlpha),array$1.push(texture.flipY),array$1.push(texture.unpackAlignment),array$1.push(texture.colorSpace),array$1.join()}function setTexture2D(texture,slot){let textureProperties=properties.get(texture);if(texture.isVideoTexture&&updateVideoTexture(texture),texture.isRenderTargetTexture===!1&&texture.isExternalTexture!==!0&&texture.version>0&&textureProperties.__version!==texture.version){let image$1=texture.image;if(image$1===null)console.warn(`THREE.WebGLRenderer: Texture marked for update but no image data found.`);else if(image$1.complete===!1)console.warn(`THREE.WebGLRenderer: Texture marked for update but image is incomplete`);else{uploadTexture(textureProperties,texture,slot);return}}else texture.isExternalTexture&&(textureProperties.__webglTexture=texture.sourceTexture?texture.sourceTexture:null);state.bindTexture(_gl.TEXTURE_2D,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture2DArray(texture,slot){let textureProperties=properties.get(texture);if(texture.isRenderTargetTexture===!1&&texture.version>0&&textureProperties.__version!==texture.version){uploadTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_2D_ARRAY,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture3D(texture,slot){let textureProperties=properties.get(texture);if(texture.isRenderTargetTexture===!1&&texture.version>0&&textureProperties.__version!==texture.version){uploadTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_3D,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTextureCube(texture,slot){let textureProperties=properties.get(texture);if(texture.version>0&&textureProperties.__version!==texture.version){uploadCubeTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}let wrappingToGL={[RepeatWrapping]:_gl.REPEAT,[ClampToEdgeWrapping]:_gl.CLAMP_TO_EDGE,[MirroredRepeatWrapping]:_gl.MIRRORED_REPEAT},filterToGL={[NearestFilter]:_gl.NEAREST,[NearestMipmapNearestFilter]:_gl.NEAREST_MIPMAP_NEAREST,[NearestMipmapLinearFilter]:_gl.NEAREST_MIPMAP_LINEAR,[LinearFilter]:_gl.LINEAR,[LinearMipmapNearestFilter]:_gl.LINEAR_MIPMAP_NEAREST,[LinearMipmapLinearFilter]:_gl.LINEAR_MIPMAP_LINEAR},compareToGL={[NeverCompare]:_gl.NEVER,[AlwaysCompare]:_gl.ALWAYS,[LessCompare]:_gl.LESS,[LessEqualCompare]:_gl.LEQUAL,[EqualCompare]:_gl.EQUAL,[GreaterEqualCompare]:_gl.GEQUAL,[GreaterCompare]:_gl.GREATER,[NotEqualCompare]:_gl.NOTEQUAL};function setTextureParameters(textureType,texture){if(texture.type===FloatType&&extensions.has(`OES_texture_float_linear`)===!1&&(texture.magFilter===LinearFilter||texture.magFilter===LinearMipmapNearestFilter||texture.magFilter===NearestMipmapLinearFilter||texture.magFilter===LinearMipmapLinearFilter||texture.minFilter===LinearFilter||texture.minFilter===LinearMipmapNearestFilter||texture.minFilter===NearestMipmapLinearFilter||texture.minFilter===LinearMipmapLinearFilter)&&console.warn(`THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.`),_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_S,wrappingToGL[texture.wrapS]),_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_T,wrappingToGL[texture.wrapT]),(textureType===_gl.TEXTURE_3D||textureType===_gl.TEXTURE_2D_ARRAY)&&_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_R,wrappingToGL[texture.wrapR]),_gl.texParameteri(textureType,_gl.TEXTURE_MAG_FILTER,filterToGL[texture.magFilter]),_gl.texParameteri(textureType,_gl.TEXTURE_MIN_FILTER,filterToGL[texture.minFilter]),texture.compareFunction&&(_gl.texParameteri(textureType,_gl.TEXTURE_COMPARE_MODE,_gl.COMPARE_REF_TO_TEXTURE),_gl.texParameteri(textureType,_gl.TEXTURE_COMPARE_FUNC,compareToGL[texture.compareFunction])),extensions.has(`EXT_texture_filter_anisotropic`)===!0){if(texture.magFilter===NearestFilter||texture.minFilter!==NearestMipmapLinearFilter&&texture.minFilter!==LinearMipmapLinearFilter||texture.type===FloatType&&extensions.has(`OES_texture_float_linear`)===!1)return;if(texture.anisotropy>1||properties.get(texture).__currentAnisotropy){let extension$1=extensions.get(`EXT_texture_filter_anisotropic`);_gl.texParameterf(textureType,extension$1.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(texture.anisotropy,capabilities.getMaxAnisotropy())),properties.get(texture).__currentAnisotropy=texture.anisotropy}}}function initTexture(textureProperties,texture){let forceUpload=!1;textureProperties.__webglInit===void 0&&(textureProperties.__webglInit=!0,texture.addEventListener(`dispose`,onTextureDispose));let source=texture.source,webglTextures=_sources.get(source);webglTextures===void 0&&(webglTextures={},_sources.set(source,webglTextures));let textureCacheKey=getTextureCacheKey(texture);if(textureCacheKey!==textureProperties.__cacheKey){webglTextures[textureCacheKey]===void 0&&(webglTextures[textureCacheKey]={texture:_gl.createTexture(),usedTimes:0},info.memory.textures++,forceUpload=!0),webglTextures[textureCacheKey].usedTimes++;let webglTexture=webglTextures[textureProperties.__cacheKey];webglTexture!==void 0&&(webglTextures[textureProperties.__cacheKey].usedTimes--,webglTexture.usedTimes===0&&deleteTexture(texture)),textureProperties.__cacheKey=textureCacheKey,textureProperties.__webglTexture=webglTextures[textureCacheKey].texture}return forceUpload}function getRow(index$1,rowLength,componentStride){return Math.floor(Math.floor(index$1/componentStride)/rowLength)}function updateTexture(texture,image$1,glFormat,glType){let componentStride=4,updateRanges=texture.updateRanges;if(updateRanges.length===0)state.texSubImage2D(_gl.TEXTURE_2D,0,0,0,image$1.width,image$1.height,glFormat,glType,image$1.data);else{updateRanges.sort((a$1,b$1)=>a$1.start-b$1.start);let mergeIndex=0;for(let i=1;i0){useTexStorage&&allocateMemory&&state.texStorage2D(_gl.TEXTURE_2D,levels$1,glInternalFormat,mipmaps[0].width,mipmaps[0].height);for(let i=0,il=mipmaps.length;i0){let layerByteLength=getByteLength(mipmap.width,mipmap.height,texture.format,texture.type);for(let layerIndex of texture.layerUpdates){let layerData=mipmap.data.subarray(layerIndex*layerByteLength/mipmap.data.BYTES_PER_ELEMENT,(layerIndex+1)*layerByteLength/mipmap.data.BYTES_PER_ELEMENT);state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,layerIndex,mipmap.width,mipmap.height,1,glFormat,layerData)}texture.clearLayerUpdates()}else state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,0,mipmap.width,mipmap.height,image$1.depth,glFormat,mipmap.data)}else state.compressedTexImage3D(_gl.TEXTURE_2D_ARRAY,i,glInternalFormat,mipmap.width,mipmap.height,image$1.depth,0,mipmap.data,0,0);else console.warn(`THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`);else useTexStorage?dataReady&&state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,0,mipmap.width,mipmap.height,image$1.depth,glFormat,glType,mipmap.data):state.texImage3D(_gl.TEXTURE_2D_ARRAY,i,glInternalFormat,mipmap.width,mipmap.height,image$1.depth,0,glFormat,glType,mipmap.data)}else{useTexStorage&&allocateMemory&&state.texStorage2D(_gl.TEXTURE_2D,levels$1,glInternalFormat,mipmaps[0].width,mipmaps[0].height);for(let i=0,il=mipmaps.length;i0){let layerByteLength=getByteLength(image$1.width,image$1.height,texture.format,texture.type);for(let layerIndex of texture.layerUpdates){let layerData=image$1.data.subarray(layerIndex*layerByteLength/image$1.data.BYTES_PER_ELEMENT,(layerIndex+1)*layerByteLength/image$1.data.BYTES_PER_ELEMENT);state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,0,0,0,layerIndex,image$1.width,image$1.height,1,glFormat,glType,layerData)}texture.clearLayerUpdates()}else state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,0,0,0,0,image$1.width,image$1.height,image$1.depth,glFormat,glType,image$1.data)}else state.texImage3D(_gl.TEXTURE_2D_ARRAY,0,glInternalFormat,image$1.width,image$1.height,image$1.depth,0,glFormat,glType,image$1.data);else if(texture.isData3DTexture)useTexStorage?(allocateMemory&&state.texStorage3D(_gl.TEXTURE_3D,levels$1,glInternalFormat,image$1.width,image$1.height,image$1.depth),dataReady&&state.texSubImage3D(_gl.TEXTURE_3D,0,0,0,0,image$1.width,image$1.height,image$1.depth,glFormat,glType,image$1.data)):state.texImage3D(_gl.TEXTURE_3D,0,glInternalFormat,image$1.width,image$1.height,image$1.depth,0,glFormat,glType,image$1.data);else if(texture.isFramebufferTexture){if(allocateMemory)if(useTexStorage)state.texStorage2D(_gl.TEXTURE_2D,levels$1,glInternalFormat,image$1.width,image$1.height);else{let width=image$1.width,height=image$1.height;for(let i=0;i>=1,height>>=1}}else if(mipmaps.length>0){if(useTexStorage&&allocateMemory){let dimensions=getDimensions$1(mipmaps[0]);state.texStorage2D(_gl.TEXTURE_2D,levels$1,glInternalFormat,dimensions.width,dimensions.height)}for(let i=0,il=mipmaps.length;i0&&levels$1++;let dimensions=getDimensions$1(cubeImage[0]);state.texStorage2D(_gl.TEXTURE_CUBE_MAP,levels$1,glInternalFormat,dimensions.width,dimensions.height)}for(let i=0;i<6;i++)if(isDataTexture){useTexStorage?dataReady&&state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,0,0,cubeImage[i].width,cubeImage[i].height,glFormat,glType,cubeImage[i].data):state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,glInternalFormat,cubeImage[i].width,cubeImage[i].height,0,glFormat,glType,cubeImage[i].data);for(let j$1=0;j$1>level),height=Math.max(1,renderTarget.height>>level);textureTarget===_gl.TEXTURE_3D||textureTarget===_gl.TEXTURE_2D_ARRAY?state.texImage3D(textureTarget,level,glInternalFormat,width,height,renderTarget.depth,0,glFormat,glType,null):state.texImage2D(textureTarget,level,glInternalFormat,width,height,0,glFormat,glType,null)}state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer),useMultisampledRTT(renderTarget)?multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,attachment,textureTarget,textureProperties.__webglTexture,0,getRenderTargetSamples(renderTarget)):(textureTarget===_gl.TEXTURE_2D||textureTarget>=_gl.TEXTURE_CUBE_MAP_POSITIVE_X&&textureTarget<=_gl.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&_gl.framebufferTexture2D(_gl.FRAMEBUFFER,attachment,textureTarget,textureProperties.__webglTexture,level),state.bindFramebuffer(_gl.FRAMEBUFFER,null)}function setupRenderBufferStorage(renderbuffer,renderTarget,isMultisample){if(_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer),renderTarget.depthBuffer){let depthTexture=renderTarget.depthTexture,depthType=depthTexture&&depthTexture.isDepthTexture?depthTexture.type:null,glInternalFormat=getInternalDepthFormat(renderTarget.stencilBuffer,depthType),glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT,samples=getRenderTargetSamples(renderTarget),isUseMultisampledRTT=useMultisampledRTT(renderTarget);isUseMultisampledRTT?multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER,samples,glInternalFormat,renderTarget.width,renderTarget.height):isMultisample?_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,samples,glInternalFormat,renderTarget.width,renderTarget.height):_gl.renderbufferStorage(_gl.RENDERBUFFER,glInternalFormat,renderTarget.width,renderTarget.height),_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}else{let textures=renderTarget.textures;for(let i=0;i{delete renderTargetProperties.__boundDepthTexture,delete renderTargetProperties.__depthDisposeCallback,depthTexture.removeEventListener(`dispose`,disposeEvent)};depthTexture.addEventListener(`dispose`,disposeEvent),renderTargetProperties.__depthDisposeCallback=disposeEvent}renderTargetProperties.__boundDepthTexture=depthTexture}if(renderTarget.depthTexture&&!renderTargetProperties.__autoAllocateDepthBuffer){if(isCube)throw Error(`target.depthTexture not supported in Cube render targets`);let mipmaps=renderTarget.texture.mipmaps;mipmaps&&mipmaps.length>0?setupDepthTexture(renderTargetProperties.__webglFramebuffer[0],renderTarget):setupDepthTexture(renderTargetProperties.__webglFramebuffer,renderTarget)}else if(isCube){renderTargetProperties.__webglDepthbuffer=[];for(let i=0;i<6;i++)if(state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[i]),renderTargetProperties.__webglDepthbuffer[i]===void 0)renderTargetProperties.__webglDepthbuffer[i]=_gl.createRenderbuffer(),setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i],renderTarget,!1);else{let glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT,renderbuffer=renderTargetProperties.__webglDepthbuffer[i];_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer),_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}}else{let mipmaps=renderTarget.texture.mipmaps;if(mipmaps&&mipmaps.length>0?state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[0]):state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer),renderTargetProperties.__webglDepthbuffer===void 0)renderTargetProperties.__webglDepthbuffer=_gl.createRenderbuffer(),setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer,renderTarget,!1);else{let glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT,renderbuffer=renderTargetProperties.__webglDepthbuffer;_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer),_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}}state.bindFramebuffer(_gl.FRAMEBUFFER,null)}function rebindTextures(renderTarget,colorTexture,depthTexture){let renderTargetProperties=properties.get(renderTarget);colorTexture!==void 0&&setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer,renderTarget,renderTarget.texture,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,0),depthTexture!==void 0&&setupDepthRenderbuffer(renderTarget)}function setupRenderTarget(renderTarget){let texture=renderTarget.texture,renderTargetProperties=properties.get(renderTarget),textureProperties=properties.get(texture);renderTarget.addEventListener(`dispose`,onRenderTargetDispose);let textures=renderTarget.textures,isCube=renderTarget.isWebGLCubeRenderTarget===!0,isMultipleRenderTargets=textures.length>1;if(isMultipleRenderTargets||(textureProperties.__webglTexture===void 0&&(textureProperties.__webglTexture=_gl.createTexture()),textureProperties.__version=texture.version,info.memory.textures++),isCube){renderTargetProperties.__webglFramebuffer=[];for(let i=0;i<6;i++)if(texture.mipmaps&&texture.mipmaps.length>0){renderTargetProperties.__webglFramebuffer[i]=[];for(let level=0;level0){renderTargetProperties.__webglFramebuffer=[];for(let level=0;level0&&useMultisampledRTT(renderTarget)===!1){renderTargetProperties.__webglMultisampledFramebuffer=_gl.createFramebuffer(),renderTargetProperties.__webglColorRenderbuffer=[],state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);for(let i=0;i0)for(let level=0;level0)for(let level=0;level0){if(useMultisampledRTT(renderTarget)===!1){let textures=renderTarget.textures,width=renderTarget.width,height=renderTarget.height,mask=_gl.COLOR_BUFFER_BIT,depthStyle=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT,renderTargetProperties=properties.get(renderTarget),isMultipleRenderTargets=textures.length>1;if(isMultipleRenderTargets)for(let i=0;i0?state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[0]):state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglFramebuffer);for(let i=0;i0&&extensions.has(`WEBGL_multisampled_render_to_texture`)===!0&&renderTargetProperties.__useRenderToTexture!==!1}function updateVideoTexture(texture){let frame$1=info.render.frame;_videoTextures.get(texture)!==frame$1&&(_videoTextures.set(texture,frame$1),texture.update())}function verifyColorSpace(texture,image$1){let colorSpace=texture.colorSpace,format$2=texture.format,type=texture.type;return texture.isCompressedTexture===!0||texture.isVideoTexture===!0||colorSpace!==LinearSRGBColorSpace&&colorSpace!==NoColorSpace&&(ColorManagement.getTransfer(colorSpace)===SRGBTransfer?(format$2!==RGBAFormat||type!==UnsignedByteType)&&console.warn(`THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.`):console.error(`THREE.WebGLTextures: Unsupported texture color space:`,colorSpace)),image$1}function getDimensions$1(image$1){return typeof HTMLImageElement<`u`&&image$1 instanceof HTMLImageElement?(_imageDimensions.width=image$1.naturalWidth||image$1.width,_imageDimensions.height=image$1.naturalHeight||image$1.height):typeof VideoFrame<`u`&&image$1 instanceof VideoFrame?(_imageDimensions.width=image$1.displayWidth,_imageDimensions.height=image$1.displayHeight):(_imageDimensions.width=image$1.width,_imageDimensions.height=image$1.height),_imageDimensions}this.allocateTextureUnit=allocateTextureUnit,this.resetTextureUnits=resetTextureUnits,this.setTexture2D=setTexture2D,this.setTexture2DArray=setTexture2DArray,this.setTexture3D=setTexture3D,this.setTextureCube=setTextureCube,this.rebindTextures=rebindTextures,this.setupRenderTarget=setupRenderTarget,this.updateRenderTargetMipmap=updateRenderTargetMipmap,this.updateMultisampleRenderTarget=updateMultisampleRenderTarget,this.setupDepthRenderbuffer=setupDepthRenderbuffer,this.setupFrameBufferTexture=setupFrameBufferTexture,this.useMultisampledRTT=useMultisampledRTT}function WebGLUtils(gl,extensions){function convert$2(p$4,colorSpace=NoColorSpace){let extension$1,transfer$2=ColorManagement.getTransfer(colorSpace);if(p$4===UnsignedByteType)return gl.UNSIGNED_BYTE;if(p$4===UnsignedShort4444Type)return gl.UNSIGNED_SHORT_4_4_4_4;if(p$4===UnsignedShort5551Type)return gl.UNSIGNED_SHORT_5_5_5_1;if(p$4===UnsignedInt5999Type)return gl.UNSIGNED_INT_5_9_9_9_REV;if(p$4===ByteType)return gl.BYTE;if(p$4===ShortType)return gl.SHORT;if(p$4===UnsignedShortType)return gl.UNSIGNED_SHORT;if(p$4===IntType)return gl.INT;if(p$4===UnsignedIntType)return gl.UNSIGNED_INT;if(p$4===FloatType)return gl.FLOAT;if(p$4===HalfFloatType)return gl.HALF_FLOAT;if(p$4===AlphaFormat)return gl.ALPHA;if(p$4===RGBFormat)return gl.RGB;if(p$4===RGBAFormat)return gl.RGBA;if(p$4===DepthFormat)return gl.DEPTH_COMPONENT;if(p$4===DepthStencilFormat)return gl.DEPTH_STENCIL;if(p$4===RedFormat)return gl.RED;if(p$4===RedIntegerFormat)return gl.RED_INTEGER;if(p$4===RGFormat)return gl.RG;if(p$4===RGIntegerFormat)return gl.RG_INTEGER;if(p$4===RGBAIntegerFormat)return gl.RGBA_INTEGER;if(p$4===RGB_S3TC_DXT1_Format||p$4===RGBA_S3TC_DXT1_Format||p$4===RGBA_S3TC_DXT3_Format||p$4===RGBA_S3TC_DXT5_Format)if(transfer$2===SRGBTransfer)if(extension$1=extensions.get(`WEBGL_compressed_texture_s3tc_srgb`),extension$1!==null){if(p$4===RGB_S3TC_DXT1_Format)return extension$1.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(p$4===RGBA_S3TC_DXT1_Format)return extension$1.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(p$4===RGBA_S3TC_DXT3_Format)return extension$1.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(p$4===RGBA_S3TC_DXT5_Format)return extension$1.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(extension$1=extensions.get(`WEBGL_compressed_texture_s3tc`),extension$1!==null){if(p$4===RGB_S3TC_DXT1_Format)return extension$1.COMPRESSED_RGB_S3TC_DXT1_EXT;if(p$4===RGBA_S3TC_DXT1_Format)return extension$1.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(p$4===RGBA_S3TC_DXT3_Format)return extension$1.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(p$4===RGBA_S3TC_DXT5_Format)return extension$1.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(p$4===RGB_PVRTC_4BPPV1_Format||p$4===RGB_PVRTC_2BPPV1_Format||p$4===RGBA_PVRTC_4BPPV1_Format||p$4===RGBA_PVRTC_2BPPV1_Format)if(extension$1=extensions.get(`WEBGL_compressed_texture_pvrtc`),extension$1!==null){if(p$4===RGB_PVRTC_4BPPV1_Format)return extension$1.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(p$4===RGB_PVRTC_2BPPV1_Format)return extension$1.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(p$4===RGBA_PVRTC_4BPPV1_Format)return extension$1.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(p$4===RGBA_PVRTC_2BPPV1_Format)return extension$1.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(p$4===RGB_ETC1_Format||p$4===RGB_ETC2_Format||p$4===RGBA_ETC2_EAC_Format)if(extension$1=extensions.get(`WEBGL_compressed_texture_etc`),extension$1!==null){if(p$4===RGB_ETC1_Format||p$4===RGB_ETC2_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ETC2:extension$1.COMPRESSED_RGB8_ETC2;if(p$4===RGBA_ETC2_EAC_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:extension$1.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(p$4===RGBA_ASTC_4x4_Format||p$4===RGBA_ASTC_5x4_Format||p$4===RGBA_ASTC_5x5_Format||p$4===RGBA_ASTC_6x5_Format||p$4===RGBA_ASTC_6x6_Format||p$4===RGBA_ASTC_8x5_Format||p$4===RGBA_ASTC_8x6_Format||p$4===RGBA_ASTC_8x8_Format||p$4===RGBA_ASTC_10x5_Format||p$4===RGBA_ASTC_10x6_Format||p$4===RGBA_ASTC_10x8_Format||p$4===RGBA_ASTC_10x10_Format||p$4===RGBA_ASTC_12x10_Format||p$4===RGBA_ASTC_12x12_Format)if(extension$1=extensions.get(`WEBGL_compressed_texture_astc`),extension$1!==null){if(p$4===RGBA_ASTC_4x4_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:extension$1.COMPRESSED_RGBA_ASTC_4x4_KHR;if(p$4===RGBA_ASTC_5x4_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:extension$1.COMPRESSED_RGBA_ASTC_5x4_KHR;if(p$4===RGBA_ASTC_5x5_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:extension$1.COMPRESSED_RGBA_ASTC_5x5_KHR;if(p$4===RGBA_ASTC_6x5_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:extension$1.COMPRESSED_RGBA_ASTC_6x5_KHR;if(p$4===RGBA_ASTC_6x6_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:extension$1.COMPRESSED_RGBA_ASTC_6x6_KHR;if(p$4===RGBA_ASTC_8x5_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:extension$1.COMPRESSED_RGBA_ASTC_8x5_KHR;if(p$4===RGBA_ASTC_8x6_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:extension$1.COMPRESSED_RGBA_ASTC_8x6_KHR;if(p$4===RGBA_ASTC_8x8_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:extension$1.COMPRESSED_RGBA_ASTC_8x8_KHR;if(p$4===RGBA_ASTC_10x5_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:extension$1.COMPRESSED_RGBA_ASTC_10x5_KHR;if(p$4===RGBA_ASTC_10x6_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:extension$1.COMPRESSED_RGBA_ASTC_10x6_KHR;if(p$4===RGBA_ASTC_10x8_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:extension$1.COMPRESSED_RGBA_ASTC_10x8_KHR;if(p$4===RGBA_ASTC_10x10_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:extension$1.COMPRESSED_RGBA_ASTC_10x10_KHR;if(p$4===RGBA_ASTC_12x10_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:extension$1.COMPRESSED_RGBA_ASTC_12x10_KHR;if(p$4===RGBA_ASTC_12x12_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:extension$1.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(p$4===RGBA_BPTC_Format||p$4===RGB_BPTC_SIGNED_Format||p$4===RGB_BPTC_UNSIGNED_Format)if(extension$1=extensions.get(`EXT_texture_compression_bptc`),extension$1!==null){if(p$4===RGBA_BPTC_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:extension$1.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(p$4===RGB_BPTC_SIGNED_Format)return extension$1.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(p$4===RGB_BPTC_UNSIGNED_Format)return extension$1.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(p$4===RED_RGTC1_Format||p$4===SIGNED_RED_RGTC1_Format||p$4===RED_GREEN_RGTC2_Format||p$4===SIGNED_RED_GREEN_RGTC2_Format)if(extension$1=extensions.get(`EXT_texture_compression_rgtc`),extension$1!==null){if(p$4===RGBA_BPTC_Format)return extension$1.COMPRESSED_RED_RGTC1_EXT;if(p$4===SIGNED_RED_RGTC1_Format)return extension$1.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(p$4===RED_GREEN_RGTC2_Format)return extension$1.COMPRESSED_RED_GREEN_RGTC2_EXT;if(p$4===SIGNED_RED_GREEN_RGTC2_Format)return extension$1.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return p$4===UnsignedInt248Type?gl.UNSIGNED_INT_24_8:gl[p$4]===void 0?null:gl[p$4]}return{convert:convert$2}}var ExternalTexture=class extends Texture{constructor(sourceTexture=null){super(),this.sourceTexture=sourceTexture,this.isExternalTexture=!0}};const _occlusion_vertex=` +}`;function WebGLShadowMap(renderer$1,objects,capabilities){let _frustum$2=new Frustum,_shadowMapSize=new Vector2,_viewportSize=new Vector2,_viewport=new Vector4,_depthMaterial=new MeshDepthMaterial({depthPacking:RGBADepthPacking}),_distanceMaterial=new MeshDistanceMaterial,_materialCache={},_maxTextureSize=capabilities.maxTextureSize,shadowSide={[FrontSide]:BackSide,[BackSide]:FrontSide,[DoubleSide]:DoubleSide},shadowMaterialVertical=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:vertex,fragmentShader:fragment}),shadowMaterialHorizontal=shadowMaterialVertical.clone();shadowMaterialHorizontal.defines.HORIZONTAL_PASS=1;let fullScreenTri=new BufferGeometry;fullScreenTri.setAttribute(`position`,new BufferAttribute(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let fullScreenMesh=new Mesh(fullScreenTri,shadowMaterialVertical),scope$1=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=PCFShadowMap;let _previousType=this.type;this.render=function(lights,scene,camera){if(scope$1.enabled===!1||scope$1.autoUpdate===!1&&scope$1.needsUpdate===!1||lights.length===0)return;let currentRenderTarget=renderer$1.getRenderTarget(),activeCubeFace=renderer$1.getActiveCubeFace(),activeMipmapLevel=renderer$1.getActiveMipmapLevel(),_state=renderer$1.state;_state.setBlending(NoBlending),_state.buffers.depth.getReversed()?_state.buffers.color.setClear(0,0,0,0):_state.buffers.color.setClear(1,1,1,1),_state.buffers.depth.setTest(!0),_state.setScissorTest(!1);let toVSM=_previousType!==VSMShadowMap&&this.type===VSMShadowMap,fromVSM=_previousType===VSMShadowMap&&this.type!==VSMShadowMap;for(let i=0,il=lights.length;i_maxTextureSize||_shadowMapSize.y>_maxTextureSize)&&(_shadowMapSize.x>_maxTextureSize&&(_viewportSize.x=Math.floor(_maxTextureSize/shadowFrameExtents.x),_shadowMapSize.x=_viewportSize.x*shadowFrameExtents.x,shadow.mapSize.x=_viewportSize.x),_shadowMapSize.y>_maxTextureSize&&(_viewportSize.y=Math.floor(_maxTextureSize/shadowFrameExtents.y),_shadowMapSize.y=_viewportSize.y*shadowFrameExtents.y,shadow.mapSize.y=_viewportSize.y)),shadow.map===null||toVSM===!0||fromVSM===!0){let pars=this.type===VSMShadowMap?{}:{minFilter:NearestFilter,magFilter:NearestFilter};shadow.map!==null&&shadow.map.dispose(),shadow.map=new WebGLRenderTarget(_shadowMapSize.x,_shadowMapSize.y,pars),shadow.map.texture.name=light.name+`.shadowMap`,shadow.camera.updateProjectionMatrix()}renderer$1.setRenderTarget(shadow.map),renderer$1.clear();let viewportCount=shadow.getViewportCount();for(let vp=0;vp0||material.map&&material.alphaTest>0||material.alphaToCoverage===!0){let keyA=result.uuid,keyB=material.uuid,materialsForVariant=_materialCache[keyA];materialsForVariant===void 0&&(materialsForVariant={},_materialCache[keyA]=materialsForVariant);let cachedMaterial=materialsForVariant[keyB];cachedMaterial===void 0&&(cachedMaterial=result.clone(),materialsForVariant[keyB]=cachedMaterial,material.addEventListener(`dispose`,onMaterialDispose)),result=cachedMaterial}if(result.visible=material.visible,result.wireframe=material.wireframe,type===VSMShadowMap?result.side=material.shadowSide===null?material.side:material.shadowSide:result.side=material.shadowSide===null?shadowSide[material.side]:material.shadowSide,result.alphaMap=material.alphaMap,result.alphaTest=material.alphaToCoverage===!0?.5:material.alphaTest,result.map=material.map,result.clipShadows=material.clipShadows,result.clippingPlanes=material.clippingPlanes,result.clipIntersection=material.clipIntersection,result.displacementMap=material.displacementMap,result.displacementScale=material.displacementScale,result.displacementBias=material.displacementBias,result.wireframeLinewidth=material.wireframeLinewidth,result.linewidth=material.linewidth,light.isPointLight===!0&&result.isMeshDistanceMaterial===!0){let materialProperties=renderer$1.properties.get(result);materialProperties.light=light}return result}function renderObject(object$1,camera,shadowCamera,light,type){if(object$1.visible===!1)return;let visible=object$1.layers.test(camera.layers);if(visible&&(object$1.isMesh||object$1.isLine||object$1.isPoints)&&(object$1.castShadow||object$1.receiveShadow&&type===VSMShadowMap)&&(!object$1.frustumCulled||_frustum$2.intersectsObject(object$1))){object$1.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse,object$1.matrixWorld);let geometry=objects.update(object$1),material=object$1.material;if(Array.isArray(material)){let groups=geometry.groups;for(let k$3=0,kl=groups.length;k$3=2):(version$2=parseFloat(/^WebGL (\d)/.exec(glVersion)[1]),lineWidthAvailable=version$2>=1);let currentTextureSlot=null,currentBoundTextures={},scissorParam=gl.getParameter(gl.SCISSOR_BOX),viewportParam=gl.getParameter(gl.VIEWPORT),currentScissor=new Vector4().fromArray(scissorParam),currentViewport=new Vector4().fromArray(viewportParam);function createTexture(type,target$1,count$2,dimensions){let data$12=new Uint8Array(4),texture=gl.createTexture();gl.bindTexture(type,texture),gl.texParameteri(type,gl.TEXTURE_MIN_FILTER,gl.NEAREST),gl.texParameteri(type,gl.TEXTURE_MAG_FILTER,gl.NEAREST);for(let i=0;i`u`?!1:/OculusBrowser/g.test(navigator.userAgent),_imageDimensions=new Vector2,_videoTextures=new WeakMap,_canvas$1,_sources=new WeakMap,useOffscreenCanvas=!1;try{useOffscreenCanvas=typeof OffscreenCanvas<`u`&&new OffscreenCanvas(1,1).getContext(`2d`)!==null}catch{}function createCanvas(width,height){return useOffscreenCanvas?new OffscreenCanvas(width,height):createElementNS(`canvas`)}function resizeImage(image$1,needsNewCanvas,maxSize){let scale$1=1,dimensions=getDimensions$1(image$1);if((dimensions.width>maxSize||dimensions.height>maxSize)&&(scale$1=maxSize/Math.max(dimensions.width,dimensions.height)),scale$1<1)if(typeof HTMLImageElement<`u`&&image$1 instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&image$1 instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&image$1 instanceof ImageBitmap||typeof VideoFrame<`u`&&image$1 instanceof VideoFrame){let width=Math.floor(scale$1*dimensions.width),height=Math.floor(scale$1*dimensions.height);_canvas$1===void 0&&(_canvas$1=createCanvas(width,height));let canvas=needsNewCanvas?createCanvas(width,height):_canvas$1;canvas.width=width,canvas.height=height;let context$1=canvas.getContext(`2d`);return context$1.drawImage(image$1,0,0,width,height),console.warn(`THREE.WebGLRenderer: Texture has been resized from (`+dimensions.width+`x`+dimensions.height+`) to (`+width+`x`+height+`).`),canvas}else return`data`in image$1&&console.warn(`THREE.WebGLRenderer: Image in DataTexture is too big (`+dimensions.width+`x`+dimensions.height+`).`),image$1;return image$1}function textureNeedsGenerateMipmaps(texture){return texture.generateMipmaps}function generateMipmap(target$1){_gl.generateMipmap(target$1)}function getTargetType$1(texture){return texture.isWebGLCubeRenderTarget?_gl.TEXTURE_CUBE_MAP:texture.isWebGL3DRenderTarget?_gl.TEXTURE_3D:texture.isWebGLArrayRenderTarget||texture.isCompressedArrayTexture?_gl.TEXTURE_2D_ARRAY:_gl.TEXTURE_2D}function getInternalFormat(internalFormatName,glFormat,glType,colorSpace,forceLinearTransfer=!1){if(internalFormatName!==null){if(_gl[internalFormatName]!==void 0)return _gl[internalFormatName];console.warn(`THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '`+internalFormatName+`'`)}let internalFormat=glFormat;if(glFormat===_gl.RED&&(glType===_gl.FLOAT&&(internalFormat=_gl.R32F),glType===_gl.HALF_FLOAT&&(internalFormat=_gl.R16F),glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.R8)),glFormat===_gl.RED_INTEGER&&(glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.R8UI),glType===_gl.UNSIGNED_SHORT&&(internalFormat=_gl.R16UI),glType===_gl.UNSIGNED_INT&&(internalFormat=_gl.R32UI),glType===_gl.BYTE&&(internalFormat=_gl.R8I),glType===_gl.SHORT&&(internalFormat=_gl.R16I),glType===_gl.INT&&(internalFormat=_gl.R32I)),glFormat===_gl.RG&&(glType===_gl.FLOAT&&(internalFormat=_gl.RG32F),glType===_gl.HALF_FLOAT&&(internalFormat=_gl.RG16F),glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.RG8)),glFormat===_gl.RG_INTEGER&&(glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.RG8UI),glType===_gl.UNSIGNED_SHORT&&(internalFormat=_gl.RG16UI),glType===_gl.UNSIGNED_INT&&(internalFormat=_gl.RG32UI),glType===_gl.BYTE&&(internalFormat=_gl.RG8I),glType===_gl.SHORT&&(internalFormat=_gl.RG16I),glType===_gl.INT&&(internalFormat=_gl.RG32I)),glFormat===_gl.RGB_INTEGER&&(glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.RGB8UI),glType===_gl.UNSIGNED_SHORT&&(internalFormat=_gl.RGB16UI),glType===_gl.UNSIGNED_INT&&(internalFormat=_gl.RGB32UI),glType===_gl.BYTE&&(internalFormat=_gl.RGB8I),glType===_gl.SHORT&&(internalFormat=_gl.RGB16I),glType===_gl.INT&&(internalFormat=_gl.RGB32I)),glFormat===_gl.RGBA_INTEGER&&(glType===_gl.UNSIGNED_BYTE&&(internalFormat=_gl.RGBA8UI),glType===_gl.UNSIGNED_SHORT&&(internalFormat=_gl.RGBA16UI),glType===_gl.UNSIGNED_INT&&(internalFormat=_gl.RGBA32UI),glType===_gl.BYTE&&(internalFormat=_gl.RGBA8I),glType===_gl.SHORT&&(internalFormat=_gl.RGBA16I),glType===_gl.INT&&(internalFormat=_gl.RGBA32I)),glFormat===_gl.RGB&&glType===_gl.UNSIGNED_INT_5_9_9_9_REV&&(internalFormat=_gl.RGB9_E5),glFormat===_gl.RGBA){let transfer$2=forceLinearTransfer?LinearTransfer:ColorManagement.getTransfer(colorSpace);glType===_gl.FLOAT&&(internalFormat=_gl.RGBA32F),glType===_gl.HALF_FLOAT&&(internalFormat=_gl.RGBA16F),glType===_gl.UNSIGNED_BYTE&&(internalFormat=transfer$2===SRGBTransfer?_gl.SRGB8_ALPHA8:_gl.RGBA8),glType===_gl.UNSIGNED_SHORT_4_4_4_4&&(internalFormat=_gl.RGBA4),glType===_gl.UNSIGNED_SHORT_5_5_5_1&&(internalFormat=_gl.RGB5_A1)}return(internalFormat===_gl.R16F||internalFormat===_gl.R32F||internalFormat===_gl.RG16F||internalFormat===_gl.RG32F||internalFormat===_gl.RGBA16F||internalFormat===_gl.RGBA32F)&&extensions.get(`EXT_color_buffer_float`),internalFormat}function getInternalDepthFormat(useStencil,depthType){let glInternalFormat;return useStencil?depthType===null||depthType===UnsignedIntType||depthType===UnsignedInt248Type?glInternalFormat=_gl.DEPTH24_STENCIL8:depthType===FloatType?glInternalFormat=_gl.DEPTH32F_STENCIL8:depthType===UnsignedShortType&&(glInternalFormat=_gl.DEPTH24_STENCIL8,console.warn(`DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.`)):depthType===null||depthType===UnsignedIntType||depthType===UnsignedInt248Type?glInternalFormat=_gl.DEPTH_COMPONENT24:depthType===FloatType?glInternalFormat=_gl.DEPTH_COMPONENT32F:depthType===UnsignedShortType&&(glInternalFormat=_gl.DEPTH_COMPONENT16),glInternalFormat}function getMipLevels(texture,image$1){return textureNeedsGenerateMipmaps(texture)===!0||texture.isFramebufferTexture&&texture.minFilter!==NearestFilter&&texture.minFilter!==LinearFilter?Math.log2(Math.max(image$1.width,image$1.height))+1:texture.mipmaps!==void 0&&texture.mipmaps.length>0?texture.mipmaps.length:texture.isCompressedTexture&&Array.isArray(texture.image)?image$1.mipmaps.length:1}function onTextureDispose(event){let texture=event.target;texture.removeEventListener(`dispose`,onTextureDispose),deallocateTexture(texture),texture.isVideoTexture&&_videoTextures.delete(texture)}function onRenderTargetDispose(event){let renderTarget=event.target;renderTarget.removeEventListener(`dispose`,onRenderTargetDispose),deallocateRenderTarget(renderTarget)}function deallocateTexture(texture){let textureProperties=properties.get(texture);if(textureProperties.__webglInit===void 0)return;let source=texture.source,webglTextures=_sources.get(source);if(webglTextures){let webglTexture=webglTextures[textureProperties.__cacheKey];webglTexture.usedTimes--,webglTexture.usedTimes===0&&deleteTexture(texture),Object.keys(webglTextures).length===0&&_sources.delete(source)}properties.remove(texture)}function deleteTexture(texture){let textureProperties=properties.get(texture);_gl.deleteTexture(textureProperties.__webglTexture);let source=texture.source,webglTextures=_sources.get(source);delete webglTextures[textureProperties.__cacheKey],info.memory.textures--}function deallocateRenderTarget(renderTarget){let renderTargetProperties=properties.get(renderTarget);if(renderTarget.depthTexture&&(renderTarget.depthTexture.dispose(),properties.remove(renderTarget.depthTexture)),renderTarget.isWebGLCubeRenderTarget)for(let i=0;i<6;i++){if(Array.isArray(renderTargetProperties.__webglFramebuffer[i]))for(let level=0;level=capabilities.maxTextures&&console.warn(`THREE.WebGLTextures: Trying to use `+textureUnit+` texture units while this GPU supports only `+capabilities.maxTextures),textureUnits+=1,textureUnit}function getTextureCacheKey(texture){let array$1=[];return array$1.push(texture.wrapS),array$1.push(texture.wrapT),array$1.push(texture.wrapR||0),array$1.push(texture.magFilter),array$1.push(texture.minFilter),array$1.push(texture.anisotropy),array$1.push(texture.internalFormat),array$1.push(texture.format),array$1.push(texture.type),array$1.push(texture.generateMipmaps),array$1.push(texture.premultiplyAlpha),array$1.push(texture.flipY),array$1.push(texture.unpackAlignment),array$1.push(texture.colorSpace),array$1.join()}function setTexture2D(texture,slot){let textureProperties=properties.get(texture);if(texture.isVideoTexture&&updateVideoTexture(texture),texture.isRenderTargetTexture===!1&&texture.isExternalTexture!==!0&&texture.version>0&&textureProperties.__version!==texture.version){let image$1=texture.image;if(image$1===null)console.warn(`THREE.WebGLRenderer: Texture marked for update but no image data found.`);else if(image$1.complete===!1)console.warn(`THREE.WebGLRenderer: Texture marked for update but image is incomplete`);else{uploadTexture(textureProperties,texture,slot);return}}else texture.isExternalTexture&&(textureProperties.__webglTexture=texture.sourceTexture?texture.sourceTexture:null);state.bindTexture(_gl.TEXTURE_2D,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture2DArray(texture,slot){let textureProperties=properties.get(texture);if(texture.isRenderTargetTexture===!1&&texture.version>0&&textureProperties.__version!==texture.version){uploadTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_2D_ARRAY,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTexture3D(texture,slot){let textureProperties=properties.get(texture);if(texture.isRenderTargetTexture===!1&&texture.version>0&&textureProperties.__version!==texture.version){uploadTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_3D,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}function setTextureCube(texture,slot){let textureProperties=properties.get(texture);if(texture.version>0&&textureProperties.__version!==texture.version){uploadCubeTexture(textureProperties,texture,slot);return}state.bindTexture(_gl.TEXTURE_CUBE_MAP,textureProperties.__webglTexture,_gl.TEXTURE0+slot)}let wrappingToGL={[RepeatWrapping]:_gl.REPEAT,[ClampToEdgeWrapping]:_gl.CLAMP_TO_EDGE,[MirroredRepeatWrapping]:_gl.MIRRORED_REPEAT},filterToGL={[NearestFilter]:_gl.NEAREST,[NearestMipmapNearestFilter]:_gl.NEAREST_MIPMAP_NEAREST,[NearestMipmapLinearFilter]:_gl.NEAREST_MIPMAP_LINEAR,[LinearFilter]:_gl.LINEAR,[LinearMipmapNearestFilter]:_gl.LINEAR_MIPMAP_NEAREST,[LinearMipmapLinearFilter]:_gl.LINEAR_MIPMAP_LINEAR},compareToGL={[NeverCompare]:_gl.NEVER,[AlwaysCompare]:_gl.ALWAYS,[LessCompare]:_gl.LESS,[LessEqualCompare]:_gl.LEQUAL,[EqualCompare]:_gl.EQUAL,[GreaterEqualCompare]:_gl.GEQUAL,[GreaterCompare]:_gl.GREATER,[NotEqualCompare]:_gl.NOTEQUAL};function setTextureParameters(textureType,texture){if(texture.type===FloatType&&extensions.has(`OES_texture_float_linear`)===!1&&(texture.magFilter===LinearFilter||texture.magFilter===LinearMipmapNearestFilter||texture.magFilter===NearestMipmapLinearFilter||texture.magFilter===LinearMipmapLinearFilter||texture.minFilter===LinearFilter||texture.minFilter===LinearMipmapNearestFilter||texture.minFilter===NearestMipmapLinearFilter||texture.minFilter===LinearMipmapLinearFilter)&&console.warn(`THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.`),_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_S,wrappingToGL[texture.wrapS]),_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_T,wrappingToGL[texture.wrapT]),(textureType===_gl.TEXTURE_3D||textureType===_gl.TEXTURE_2D_ARRAY)&&_gl.texParameteri(textureType,_gl.TEXTURE_WRAP_R,wrappingToGL[texture.wrapR]),_gl.texParameteri(textureType,_gl.TEXTURE_MAG_FILTER,filterToGL[texture.magFilter]),_gl.texParameteri(textureType,_gl.TEXTURE_MIN_FILTER,filterToGL[texture.minFilter]),texture.compareFunction&&(_gl.texParameteri(textureType,_gl.TEXTURE_COMPARE_MODE,_gl.COMPARE_REF_TO_TEXTURE),_gl.texParameteri(textureType,_gl.TEXTURE_COMPARE_FUNC,compareToGL[texture.compareFunction])),extensions.has(`EXT_texture_filter_anisotropic`)===!0){if(texture.magFilter===NearestFilter||texture.minFilter!==NearestMipmapLinearFilter&&texture.minFilter!==LinearMipmapLinearFilter||texture.type===FloatType&&extensions.has(`OES_texture_float_linear`)===!1)return;if(texture.anisotropy>1||properties.get(texture).__currentAnisotropy){let extension$1=extensions.get(`EXT_texture_filter_anisotropic`);_gl.texParameterf(textureType,extension$1.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(texture.anisotropy,capabilities.getMaxAnisotropy())),properties.get(texture).__currentAnisotropy=texture.anisotropy}}}function initTexture(textureProperties,texture){let forceUpload=!1;textureProperties.__webglInit===void 0&&(textureProperties.__webglInit=!0,texture.addEventListener(`dispose`,onTextureDispose));let source=texture.source,webglTextures=_sources.get(source);webglTextures===void 0&&(webglTextures={},_sources.set(source,webglTextures));let textureCacheKey=getTextureCacheKey(texture);if(textureCacheKey!==textureProperties.__cacheKey){webglTextures[textureCacheKey]===void 0&&(webglTextures[textureCacheKey]={texture:_gl.createTexture(),usedTimes:0},info.memory.textures++,forceUpload=!0),webglTextures[textureCacheKey].usedTimes++;let webglTexture=webglTextures[textureProperties.__cacheKey];webglTexture!==void 0&&(webglTextures[textureProperties.__cacheKey].usedTimes--,webglTexture.usedTimes===0&&deleteTexture(texture)),textureProperties.__cacheKey=textureCacheKey,textureProperties.__webglTexture=webglTextures[textureCacheKey].texture}return forceUpload}function getRow(index$1,rowLength,componentStride){return Math.floor(Math.floor(index$1/componentStride)/rowLength)}function updateTexture(texture,image$1,glFormat,glType){let componentStride=4,updateRanges=texture.updateRanges;if(updateRanges.length===0)state.texSubImage2D(_gl.TEXTURE_2D,0,0,0,image$1.width,image$1.height,glFormat,glType,image$1.data);else{updateRanges.sort((a$1,b$1)=>a$1.start-b$1.start);let mergeIndex=0;for(let i=1;i0){useTexStorage&&allocateMemory&&state.texStorage2D(_gl.TEXTURE_2D,levels$1,glInternalFormat,mipmaps[0].width,mipmaps[0].height);for(let i=0,il=mipmaps.length;i0){let layerByteLength=getByteLength(mipmap.width,mipmap.height,texture.format,texture.type);for(let layerIndex of texture.layerUpdates){let layerData=mipmap.data.subarray(layerIndex*layerByteLength/mipmap.data.BYTES_PER_ELEMENT,(layerIndex+1)*layerByteLength/mipmap.data.BYTES_PER_ELEMENT);state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,layerIndex,mipmap.width,mipmap.height,1,glFormat,layerData)}texture.clearLayerUpdates()}else state.compressedTexSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,0,mipmap.width,mipmap.height,image$1.depth,glFormat,mipmap.data)}else state.compressedTexImage3D(_gl.TEXTURE_2D_ARRAY,i,glInternalFormat,mipmap.width,mipmap.height,image$1.depth,0,mipmap.data,0,0);else console.warn(`THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`);else useTexStorage?dataReady&&state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,i,0,0,0,mipmap.width,mipmap.height,image$1.depth,glFormat,glType,mipmap.data):state.texImage3D(_gl.TEXTURE_2D_ARRAY,i,glInternalFormat,mipmap.width,mipmap.height,image$1.depth,0,glFormat,glType,mipmap.data)}else{useTexStorage&&allocateMemory&&state.texStorage2D(_gl.TEXTURE_2D,levels$1,glInternalFormat,mipmaps[0].width,mipmaps[0].height);for(let i=0,il=mipmaps.length;i0){let layerByteLength=getByteLength(image$1.width,image$1.height,texture.format,texture.type);for(let layerIndex of texture.layerUpdates){let layerData=image$1.data.subarray(layerIndex*layerByteLength/image$1.data.BYTES_PER_ELEMENT,(layerIndex+1)*layerByteLength/image$1.data.BYTES_PER_ELEMENT);state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,0,0,0,layerIndex,image$1.width,image$1.height,1,glFormat,glType,layerData)}texture.clearLayerUpdates()}else state.texSubImage3D(_gl.TEXTURE_2D_ARRAY,0,0,0,0,image$1.width,image$1.height,image$1.depth,glFormat,glType,image$1.data)}else state.texImage3D(_gl.TEXTURE_2D_ARRAY,0,glInternalFormat,image$1.width,image$1.height,image$1.depth,0,glFormat,glType,image$1.data);else if(texture.isData3DTexture)useTexStorage?(allocateMemory&&state.texStorage3D(_gl.TEXTURE_3D,levels$1,glInternalFormat,image$1.width,image$1.height,image$1.depth),dataReady&&state.texSubImage3D(_gl.TEXTURE_3D,0,0,0,0,image$1.width,image$1.height,image$1.depth,glFormat,glType,image$1.data)):state.texImage3D(_gl.TEXTURE_3D,0,glInternalFormat,image$1.width,image$1.height,image$1.depth,0,glFormat,glType,image$1.data);else if(texture.isFramebufferTexture){if(allocateMemory)if(useTexStorage)state.texStorage2D(_gl.TEXTURE_2D,levels$1,glInternalFormat,image$1.width,image$1.height);else{let width=image$1.width,height=image$1.height;for(let i=0;i>=1,height>>=1}}else if(mipmaps.length>0){if(useTexStorage&&allocateMemory){let dimensions=getDimensions$1(mipmaps[0]);state.texStorage2D(_gl.TEXTURE_2D,levels$1,glInternalFormat,dimensions.width,dimensions.height)}for(let i=0,il=mipmaps.length;i0&&levels$1++;let dimensions=getDimensions$1(cubeImage[0]);state.texStorage2D(_gl.TEXTURE_CUBE_MAP,levels$1,glInternalFormat,dimensions.width,dimensions.height)}for(let i=0;i<6;i++)if(isDataTexture){useTexStorage?dataReady&&state.texSubImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,0,0,cubeImage[i].width,cubeImage[i].height,glFormat,glType,cubeImage[i].data):state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,glInternalFormat,cubeImage[i].width,cubeImage[i].height,0,glFormat,glType,cubeImage[i].data);for(let j$1=0;j$1>level),height=Math.max(1,renderTarget.height>>level);textureTarget===_gl.TEXTURE_3D||textureTarget===_gl.TEXTURE_2D_ARRAY?state.texImage3D(textureTarget,level,glInternalFormat,width,height,renderTarget.depth,0,glFormat,glType,null):state.texImage2D(textureTarget,level,glInternalFormat,width,height,0,glFormat,glType,null)}state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer),useMultisampledRTT(renderTarget)?multisampledRTTExt.framebufferTexture2DMultisampleEXT(_gl.FRAMEBUFFER,attachment,textureTarget,textureProperties.__webglTexture,0,getRenderTargetSamples(renderTarget)):(textureTarget===_gl.TEXTURE_2D||textureTarget>=_gl.TEXTURE_CUBE_MAP_POSITIVE_X&&textureTarget<=_gl.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&_gl.framebufferTexture2D(_gl.FRAMEBUFFER,attachment,textureTarget,textureProperties.__webglTexture,level),state.bindFramebuffer(_gl.FRAMEBUFFER,null)}function setupRenderBufferStorage(renderbuffer,renderTarget,isMultisample){if(_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer),renderTarget.depthBuffer){let depthTexture=renderTarget.depthTexture,depthType=depthTexture&&depthTexture.isDepthTexture?depthTexture.type:null,glInternalFormat=getInternalDepthFormat(renderTarget.stencilBuffer,depthType),glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT,samples=getRenderTargetSamples(renderTarget),isUseMultisampledRTT=useMultisampledRTT(renderTarget);isUseMultisampledRTT?multisampledRTTExt.renderbufferStorageMultisampleEXT(_gl.RENDERBUFFER,samples,glInternalFormat,renderTarget.width,renderTarget.height):isMultisample?_gl.renderbufferStorageMultisample(_gl.RENDERBUFFER,samples,glInternalFormat,renderTarget.width,renderTarget.height):_gl.renderbufferStorage(_gl.RENDERBUFFER,glInternalFormat,renderTarget.width,renderTarget.height),_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}else{let textures=renderTarget.textures;for(let i=0;i{delete renderTargetProperties.__boundDepthTexture,delete renderTargetProperties.__depthDisposeCallback,depthTexture.removeEventListener(`dispose`,disposeEvent)};depthTexture.addEventListener(`dispose`,disposeEvent),renderTargetProperties.__depthDisposeCallback=disposeEvent}renderTargetProperties.__boundDepthTexture=depthTexture}if(renderTarget.depthTexture&&!renderTargetProperties.__autoAllocateDepthBuffer){if(isCube)throw Error(`target.depthTexture not supported in Cube render targets`);let mipmaps=renderTarget.texture.mipmaps;mipmaps&&mipmaps.length>0?setupDepthTexture(renderTargetProperties.__webglFramebuffer[0],renderTarget):setupDepthTexture(renderTargetProperties.__webglFramebuffer,renderTarget)}else if(isCube){renderTargetProperties.__webglDepthbuffer=[];for(let i=0;i<6;i++)if(state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[i]),renderTargetProperties.__webglDepthbuffer[i]===void 0)renderTargetProperties.__webglDepthbuffer[i]=_gl.createRenderbuffer(),setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i],renderTarget,!1);else{let glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT,renderbuffer=renderTargetProperties.__webglDepthbuffer[i];_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer),_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}}else{let mipmaps=renderTarget.texture.mipmaps;if(mipmaps&&mipmaps.length>0?state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[0]):state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglFramebuffer),renderTargetProperties.__webglDepthbuffer===void 0)renderTargetProperties.__webglDepthbuffer=_gl.createRenderbuffer(),setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer,renderTarget,!1);else{let glAttachmentType=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT,renderbuffer=renderTargetProperties.__webglDepthbuffer;_gl.bindRenderbuffer(_gl.RENDERBUFFER,renderbuffer),_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER,glAttachmentType,_gl.RENDERBUFFER,renderbuffer)}}state.bindFramebuffer(_gl.FRAMEBUFFER,null)}function rebindTextures(renderTarget,colorTexture,depthTexture){let renderTargetProperties=properties.get(renderTarget);colorTexture!==void 0&&setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer,renderTarget,renderTarget.texture,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_2D,0),depthTexture!==void 0&&setupDepthRenderbuffer(renderTarget)}function setupRenderTarget(renderTarget){let texture=renderTarget.texture,renderTargetProperties=properties.get(renderTarget),textureProperties=properties.get(texture);renderTarget.addEventListener(`dispose`,onRenderTargetDispose);let textures=renderTarget.textures,isCube=renderTarget.isWebGLCubeRenderTarget===!0,isMultipleRenderTargets=textures.length>1;if(isMultipleRenderTargets||(textureProperties.__webglTexture===void 0&&(textureProperties.__webglTexture=_gl.createTexture()),textureProperties.__version=texture.version,info.memory.textures++),isCube){renderTargetProperties.__webglFramebuffer=[];for(let i=0;i<6;i++)if(texture.mipmaps&&texture.mipmaps.length>0){renderTargetProperties.__webglFramebuffer[i]=[];for(let level=0;level0){renderTargetProperties.__webglFramebuffer=[];for(let level=0;level0&&useMultisampledRTT(renderTarget)===!1){renderTargetProperties.__webglMultisampledFramebuffer=_gl.createFramebuffer(),renderTargetProperties.__webglColorRenderbuffer=[],state.bindFramebuffer(_gl.FRAMEBUFFER,renderTargetProperties.__webglMultisampledFramebuffer);for(let i=0;i0)for(let level=0;level0)for(let level=0;level0){if(useMultisampledRTT(renderTarget)===!1){let textures=renderTarget.textures,width=renderTarget.width,height=renderTarget.height,mask=_gl.COLOR_BUFFER_BIT,depthStyle=renderTarget.stencilBuffer?_gl.DEPTH_STENCIL_ATTACHMENT:_gl.DEPTH_ATTACHMENT,renderTargetProperties=properties.get(renderTarget),isMultipleRenderTargets=textures.length>1;if(isMultipleRenderTargets)for(let i=0;i0?state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglFramebuffer[0]):state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER,renderTargetProperties.__webglFramebuffer);for(let i=0;i0&&extensions.has(`WEBGL_multisampled_render_to_texture`)===!0&&renderTargetProperties.__useRenderToTexture!==!1}function updateVideoTexture(texture){let frame$1=info.render.frame;_videoTextures.get(texture)!==frame$1&&(_videoTextures.set(texture,frame$1),texture.update())}function verifyColorSpace(texture,image$1){let colorSpace=texture.colorSpace,format$2=texture.format,type=texture.type;return texture.isCompressedTexture===!0||texture.isVideoTexture===!0||colorSpace!==LinearSRGBColorSpace&&colorSpace!==NoColorSpace&&(ColorManagement.getTransfer(colorSpace)===SRGBTransfer?(format$2!==RGBAFormat||type!==UnsignedByteType)&&console.warn(`THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.`):console.error(`THREE.WebGLTextures: Unsupported texture color space:`,colorSpace)),image$1}function getDimensions$1(image$1){return typeof HTMLImageElement<`u`&&image$1 instanceof HTMLImageElement?(_imageDimensions.width=image$1.naturalWidth||image$1.width,_imageDimensions.height=image$1.naturalHeight||image$1.height):typeof VideoFrame<`u`&&image$1 instanceof VideoFrame?(_imageDimensions.width=image$1.displayWidth,_imageDimensions.height=image$1.displayHeight):(_imageDimensions.width=image$1.width,_imageDimensions.height=image$1.height),_imageDimensions}this.allocateTextureUnit=allocateTextureUnit,this.resetTextureUnits=resetTextureUnits,this.setTexture2D=setTexture2D,this.setTexture2DArray=setTexture2DArray,this.setTexture3D=setTexture3D,this.setTextureCube=setTextureCube,this.rebindTextures=rebindTextures,this.setupRenderTarget=setupRenderTarget,this.updateRenderTargetMipmap=updateRenderTargetMipmap,this.updateMultisampleRenderTarget=updateMultisampleRenderTarget,this.setupDepthRenderbuffer=setupDepthRenderbuffer,this.setupFrameBufferTexture=setupFrameBufferTexture,this.useMultisampledRTT=useMultisampledRTT}function WebGLUtils(gl,extensions){function convert$2(p$4,colorSpace=NoColorSpace){let extension$1,transfer$2=ColorManagement.getTransfer(colorSpace);if(p$4===UnsignedByteType)return gl.UNSIGNED_BYTE;if(p$4===UnsignedShort4444Type)return gl.UNSIGNED_SHORT_4_4_4_4;if(p$4===UnsignedShort5551Type)return gl.UNSIGNED_SHORT_5_5_5_1;if(p$4===UnsignedInt5999Type)return gl.UNSIGNED_INT_5_9_9_9_REV;if(p$4===ByteType)return gl.BYTE;if(p$4===ShortType)return gl.SHORT;if(p$4===UnsignedShortType)return gl.UNSIGNED_SHORT;if(p$4===IntType)return gl.INT;if(p$4===UnsignedIntType)return gl.UNSIGNED_INT;if(p$4===FloatType)return gl.FLOAT;if(p$4===HalfFloatType)return gl.HALF_FLOAT;if(p$4===AlphaFormat)return gl.ALPHA;if(p$4===RGBFormat)return gl.RGB;if(p$4===RGBAFormat)return gl.RGBA;if(p$4===DepthFormat)return gl.DEPTH_COMPONENT;if(p$4===DepthStencilFormat)return gl.DEPTH_STENCIL;if(p$4===RedFormat)return gl.RED;if(p$4===RedIntegerFormat)return gl.RED_INTEGER;if(p$4===RGFormat)return gl.RG;if(p$4===RGIntegerFormat)return gl.RG_INTEGER;if(p$4===RGBAIntegerFormat)return gl.RGBA_INTEGER;if(p$4===RGB_S3TC_DXT1_Format||p$4===RGBA_S3TC_DXT1_Format||p$4===RGBA_S3TC_DXT3_Format||p$4===RGBA_S3TC_DXT5_Format)if(transfer$2===SRGBTransfer)if(extension$1=extensions.get(`WEBGL_compressed_texture_s3tc_srgb`),extension$1!==null){if(p$4===RGB_S3TC_DXT1_Format)return extension$1.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(p$4===RGBA_S3TC_DXT1_Format)return extension$1.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(p$4===RGBA_S3TC_DXT3_Format)return extension$1.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(p$4===RGBA_S3TC_DXT5_Format)return extension$1.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(extension$1=extensions.get(`WEBGL_compressed_texture_s3tc`),extension$1!==null){if(p$4===RGB_S3TC_DXT1_Format)return extension$1.COMPRESSED_RGB_S3TC_DXT1_EXT;if(p$4===RGBA_S3TC_DXT1_Format)return extension$1.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(p$4===RGBA_S3TC_DXT3_Format)return extension$1.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(p$4===RGBA_S3TC_DXT5_Format)return extension$1.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(p$4===RGB_PVRTC_4BPPV1_Format||p$4===RGB_PVRTC_2BPPV1_Format||p$4===RGBA_PVRTC_4BPPV1_Format||p$4===RGBA_PVRTC_2BPPV1_Format)if(extension$1=extensions.get(`WEBGL_compressed_texture_pvrtc`),extension$1!==null){if(p$4===RGB_PVRTC_4BPPV1_Format)return extension$1.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(p$4===RGB_PVRTC_2BPPV1_Format)return extension$1.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(p$4===RGBA_PVRTC_4BPPV1_Format)return extension$1.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(p$4===RGBA_PVRTC_2BPPV1_Format)return extension$1.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(p$4===RGB_ETC1_Format||p$4===RGB_ETC2_Format||p$4===RGBA_ETC2_EAC_Format)if(extension$1=extensions.get(`WEBGL_compressed_texture_etc`),extension$1!==null){if(p$4===RGB_ETC1_Format||p$4===RGB_ETC2_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ETC2:extension$1.COMPRESSED_RGB8_ETC2;if(p$4===RGBA_ETC2_EAC_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:extension$1.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(p$4===RGBA_ASTC_4x4_Format||p$4===RGBA_ASTC_5x4_Format||p$4===RGBA_ASTC_5x5_Format||p$4===RGBA_ASTC_6x5_Format||p$4===RGBA_ASTC_6x6_Format||p$4===RGBA_ASTC_8x5_Format||p$4===RGBA_ASTC_8x6_Format||p$4===RGBA_ASTC_8x8_Format||p$4===RGBA_ASTC_10x5_Format||p$4===RGBA_ASTC_10x6_Format||p$4===RGBA_ASTC_10x8_Format||p$4===RGBA_ASTC_10x10_Format||p$4===RGBA_ASTC_12x10_Format||p$4===RGBA_ASTC_12x12_Format)if(extension$1=extensions.get(`WEBGL_compressed_texture_astc`),extension$1!==null){if(p$4===RGBA_ASTC_4x4_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:extension$1.COMPRESSED_RGBA_ASTC_4x4_KHR;if(p$4===RGBA_ASTC_5x4_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:extension$1.COMPRESSED_RGBA_ASTC_5x4_KHR;if(p$4===RGBA_ASTC_5x5_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:extension$1.COMPRESSED_RGBA_ASTC_5x5_KHR;if(p$4===RGBA_ASTC_6x5_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:extension$1.COMPRESSED_RGBA_ASTC_6x5_KHR;if(p$4===RGBA_ASTC_6x6_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:extension$1.COMPRESSED_RGBA_ASTC_6x6_KHR;if(p$4===RGBA_ASTC_8x5_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:extension$1.COMPRESSED_RGBA_ASTC_8x5_KHR;if(p$4===RGBA_ASTC_8x6_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:extension$1.COMPRESSED_RGBA_ASTC_8x6_KHR;if(p$4===RGBA_ASTC_8x8_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:extension$1.COMPRESSED_RGBA_ASTC_8x8_KHR;if(p$4===RGBA_ASTC_10x5_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:extension$1.COMPRESSED_RGBA_ASTC_10x5_KHR;if(p$4===RGBA_ASTC_10x6_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:extension$1.COMPRESSED_RGBA_ASTC_10x6_KHR;if(p$4===RGBA_ASTC_10x8_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:extension$1.COMPRESSED_RGBA_ASTC_10x8_KHR;if(p$4===RGBA_ASTC_10x10_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:extension$1.COMPRESSED_RGBA_ASTC_10x10_KHR;if(p$4===RGBA_ASTC_12x10_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:extension$1.COMPRESSED_RGBA_ASTC_12x10_KHR;if(p$4===RGBA_ASTC_12x12_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:extension$1.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(p$4===RGBA_BPTC_Format||p$4===RGB_BPTC_SIGNED_Format||p$4===RGB_BPTC_UNSIGNED_Format)if(extension$1=extensions.get(`EXT_texture_compression_bptc`),extension$1!==null){if(p$4===RGBA_BPTC_Format)return transfer$2===SRGBTransfer?extension$1.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:extension$1.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(p$4===RGB_BPTC_SIGNED_Format)return extension$1.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(p$4===RGB_BPTC_UNSIGNED_Format)return extension$1.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(p$4===RED_RGTC1_Format||p$4===SIGNED_RED_RGTC1_Format||p$4===RED_GREEN_RGTC2_Format||p$4===SIGNED_RED_GREEN_RGTC2_Format)if(extension$1=extensions.get(`EXT_texture_compression_rgtc`),extension$1!==null){if(p$4===RGBA_BPTC_Format)return extension$1.COMPRESSED_RED_RGTC1_EXT;if(p$4===SIGNED_RED_RGTC1_Format)return extension$1.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(p$4===RED_GREEN_RGTC2_Format)return extension$1.COMPRESSED_RED_GREEN_RGTC2_EXT;if(p$4===SIGNED_RED_GREEN_RGTC2_Format)return extension$1.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return p$4===UnsignedInt248Type?gl.UNSIGNED_INT_24_8:gl[p$4]===void 0?null:gl[p$4]}return{convert:convert$2}}var ExternalTexture=class extends Texture{constructor(sourceTexture=null){super(),this.sourceTexture=sourceTexture,this.isExternalTexture=!0}};const _occlusion_vertex=` void main() { gl_Position = vec4( position, 1.0 ); @@ -3846,17 +3846,20 @@ 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} +}`;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)}function toReactive(objectRef){if(!isRef(objectRef))return reactive(objectRef);let proxy=new Proxy({},{get(_$1,p$4,receiver){return unref(Reflect.get(objectRef.value,p$4,receiver))},set(_$1,p$4,value$1){return isRef(objectRef.value[p$4])&&!isRef(value$1)?objectRef.value[p$4].value=value$1:objectRef.value[p$4]=value$1,!0},deleteProperty(_$1,p$4){return Reflect.deleteProperty(objectRef.value,p$4)},has(_$1,p$4){return Reflect.has(objectRef.value,p$4)},ownKeys(){return Object.keys(objectRef.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return reactive(proxy)}function reactiveComputed(fn$5){return toReactive(computed(fn$5))}function reactiveOmit(obj,...keys$3){let flatKeys=keys$3.flat(),predicate=flatKeys[0];return reactiveComputed(()=>typeof predicate==`function`?Object.fromEntries(Object.entries(toRefs(obj)).filter(([k$3,v])=>!predicate(toValue$1(v),k$3))):Object.fromEntries(Object.entries(toRefs(obj)).filter(e$4=>!flatKeys.includes(e$4[0]))))}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$2=-1;return toMatch(()=>(count$2+=1,count$2>=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-CTBzNlUY.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>__vitePreload(()=>import(`./home-4Khdv6MH.js`),[]),"/src/layouts/plain.vue":()=>__vitePreload(()=>import(`./plain-f1-XYGPE.js`),[]),"/src/layouts/settings.vue":()=>__vitePreload(()=>import(`./settings-Cc73OB2L.js`),__vite__mapDeps([3,1,2,4])),"/src/layouts/stage.vue":()=>__vitePreload(()=>import(`./stage-Bvsu22mO.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-ClYhdjun.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_-C6f1CqAg.js`),[])},{path:`/audio`,name:`/audio`,component:()=>__vitePreload(()=>import(`./audio-D_gw8_qs.js`),[])},{path:`/devtools`,children:[{path:`audio-record`,name:`/devtools/audio-record`,component:()=>__vitePreload(()=>import(`./audio-record-Fhs1ZD1c.js`),[])},{path:`background-gradient-blending`,name:`/devtools/background-gradient-blending`,component:()=>__vitePreload(()=>import(`./background-gradient-blending-XDN7GK5x.js`),__vite__mapDeps([13,4,14,15]))},{path:`background-remove`,name:`/devtools/background-remove`,component:()=>__vitePreload(()=>import(`./background-remove-BPFawsw0.js`),__vite__mapDeps([16,17,18]))},{path:`chat`,name:`/devtools/chat`,component:()=>__vitePreload(()=>import(`./chat-C0i2b9Lw.js`),[])},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>__vitePreload(()=>import(`./gesture-circle-D2vggVou.js`),__vite__mapDeps([19,12])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>__vitePreload(()=>import(`./image-Cr6BK5qs.js`),__vite__mapDeps([20,21]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>__vitePreload(()=>import(`./polaroid-Ctap1RD7.js`),__vite__mapDeps([22,7,8,9]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>__vitePreload(()=>import(`./vibrant-CyXFiZWx.js`),__vite__mapDeps([23,14,18]))}]},{path:`/queue`,name:`/queue`,component:()=>__vitePreload(()=>import(`./queue-D-thhmwX.js`),[])},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>__vitePreload(()=>import(`./settings-OjK1du8Y.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-CwVG5sxe.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-BU_uEtuV.js`),__vite__mapDeps([34,27]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>__vitePreload(()=>import(`./CardCreationDialog-BSWV6-8O.js`),__vite__mapDeps([35,28,29,30]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>__vitePreload(()=>import(`./CardDetailDialog-BLm7zRgk.js`),__vite__mapDeps([36,31,32,29]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>__vitePreload(()=>import(`./CardListItem-X7iklUlr.js`),__vite__mapDeps([37,33]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>__vitePreload(()=>import(`./DeleteCardDialog-CAT_oitI.js`),__vite__mapDeps([38,32,29]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>__vitePreload(()=>import(`./appearance-CK7NAy2u.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-DsJzj-Kq.js`),__vite__mapDeps([40,12,41])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>__vitePreload(()=>import(`./developer-BNL2hIKB.js`),__vite__mapDeps([42,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>__vitePreload(()=>import(`./general-CpymSjFJ.js`),__vite__mapDeps([43,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>__vitePreload(()=>import(`./memory-BptisQ8A.js`),__vite__mapDeps([44,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>__vitePreload(()=>import(`./models-DGVWZaRr.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-D1uvB1yJ.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-C1mosjsj.js`),__vite__mapDeps([48,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`hearing`,name:`/settings/modules/hearing`,component:()=>__vitePreload(()=>import(`./hearing-_QhzfMHP.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-3y9YURXG.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-DxB8blpY.js`),__vite__mapDeps([51,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>__vitePreload(()=>import(`./speech-_wcIRiZp.js`),__vite__mapDeps([52,12,10,53])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>__vitePreload(()=>import(`./providers-DlCWpqGP.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-CDh_4wmt.js`),__vite__mapDeps([55,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>__vitePreload(()=>import(`./anthropic-CM4lGj4P.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-BzOe3syr.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-CQCSOdn6.js`),__vite__mapDeps([58,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>__vitePreload(()=>import(`./deepseek-BUQnh-tD.js`),__vite__mapDeps([59,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>__vitePreload(()=>import(`./elevenlabs-X1PaqUDW.js`),__vite__mapDeps([60,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>__vitePreload(()=>import(`./featherless-ai-Spcctzbu.js`),__vite__mapDeps([61,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>__vitePreload(()=>import(`./fireworks-ai-734fhxoo.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-C7FbKjL1.js`),__vite__mapDeps([63,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`index-tts-vllm`,name:`/settings/providers/index-tts-vllm`,component:()=>__vitePreload(()=>import(`./index-tts-vllm-cHdeYFFK.js`),__vite__mapDeps([64,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>__vitePreload(()=>import(`./microsoft-speech-DNNo6YPJ.js`),__vite__mapDeps([65,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>__vitePreload(()=>import(`./mistral-ai-D4NFd2lk.js`),__vite__mapDeps([66,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>__vitePreload(()=>import(`./moonshot-ai-O9H_anWy.js`),__vite__mapDeps([67,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>__vitePreload(()=>import(`./novita-ai-D3qcyZ3I.js`),__vite__mapDeps([68,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>__vitePreload(()=>import(`./ollama-CYoWD53x.js`),__vite__mapDeps([69,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>__vitePreload(()=>import(`./openai-BaDAnGRp.js`),__vite__mapDeps([70,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>__vitePreload(()=>import(`./openai-audio-speech-BlXe47o4.js`),__vite__mapDeps([71,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>__vitePreload(()=>import(`./openai-audio-transcription-DRVPjEZB.js`),__vite__mapDeps([72,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>__vitePreload(()=>import(`./openrouter-ai-DIsInNVt.js`),__vite__mapDeps([73,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2`,name:`/settings/providers/player2`,component:()=>__vitePreload(()=>import(`./player2-C1AHVzFC.js`),__vite__mapDeps([74,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-speech`,name:`/settings/providers/player2-speech`,component:()=>__vitePreload(()=>import(`./player2-speech-bqrel8Cy.js`),__vite__mapDeps([75,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>__vitePreload(()=>import(`./together-ai-DmixiGRl.js`),__vite__mapDeps([76,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>__vitePreload(()=>import(`./volcengine-P5JJHh1K.js`),__vite__mapDeps([77,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>__vitePreload(()=>import(`./xai-CYO-rtmE.js`),__vite__mapDeps([78,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>__vitePreload(()=>import(`./scene-DtolI52J.js`),__vite__mapDeps([79,12,25,46])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`StageScenePage`,component:()=>__vitePreload(()=>import(`./stage-D82DzKH0.js`),__vite__mapDeps([80,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-DAxYSZzI.js`),__vite__mapDeps([81,10,53]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>__vitePreload(()=>import(`./delays-ClnSqQ-z.js`),__vite__mapDeps([82,10,53]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>__vitePreload(()=>import(`./emotions-UjFoSlJC.js`),__vite__mapDeps([83,10,53]))},{path:`messages`,name:`/test/queues/messages`,component:()=>__vitePreload(()=>import(`./messages-Cl2ZMDuq.js`),__vite__mapDeps([84,10,53]))}]}]}];var BidirectionalTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`BidirectionalTransition`,props:{fromClass:{},activeClass:{},toClass:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(Transition,{"enter-from-class":_ctx.fromClass,"enter-active-class":_ctx.activeClass,"enter-to-class":_ctx.toClass,"leave-from-class":_ctx.toClass,"leave-active-class":_ctx.activeClass,"leave-to-class":_ctx.fromClass},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`enter-from-class`,`enter-active-class`,`enter-to-class`,`leave-from-class`,`leave-active-class`,`leave-to-class`]))}}),BidirectionalTransition_default=BidirectionalTransition_vue_vue_type_script_setup_true_lang_default;const 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-UaFS1yzN.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>__vitePreload(()=>import(`./home-C2jtrSIW.js`),[]),"/src/layouts/plain.vue":()=>__vitePreload(()=>import(`./plain-BFyN07HS.js`),[]),"/src/layouts/settings.vue":()=>__vitePreload(()=>import(`./settings-BB0AtFTc.js`),__vite__mapDeps([3,1,2,4])),"/src/layouts/stage.vue":()=>__vitePreload(()=>import(`./stage-CioUItKt.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-m4rd-W8R.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_-B1JTxHeH.js`),[])},{path:`/audio`,name:`/audio`,component:()=>__vitePreload(()=>import(`./audio-C3Vjld8K.js`),[])},{path:`/devtools`,children:[{path:`audio-record`,name:`/devtools/audio-record`,component:()=>__vitePreload(()=>import(`./audio-record-DgRdKFoy.js`),[])},{path:`background-gradient-blending`,name:`/devtools/background-gradient-blending`,component:()=>__vitePreload(()=>import(`./background-gradient-blending-jSovSmMB.js`),__vite__mapDeps([13,4,14,15]))},{path:`background-remove`,name:`/devtools/background-remove`,component:()=>__vitePreload(()=>import(`./background-remove-DTJN32z8.js`),__vite__mapDeps([16,17,18]))},{path:`chat`,name:`/devtools/chat`,component:()=>__vitePreload(()=>import(`./chat-DVKZmgmM.js`),[])},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>__vitePreload(()=>import(`./gesture-circle-pkJOWcgA.js`),__vite__mapDeps([19,12])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>__vitePreload(()=>import(`./image-Di3k1Znc.js`),__vite__mapDeps([20,21]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>__vitePreload(()=>import(`./polaroid-jY86CfCa.js`),__vite__mapDeps([22,7,8,9]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>__vitePreload(()=>import(`./vibrant-LAlhuqlD.js`),__vite__mapDeps([23,14,18]))}]},{path:`/queue`,name:`/queue`,component:()=>__vitePreload(()=>import(`./queue-DzSVSIxS.js`),[])},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>__vitePreload(()=>import(`./settings-B1QJpBHt.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-Deid7cRS.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-DswUjQ7w.js`),__vite__mapDeps([34,27]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>__vitePreload(()=>import(`./CardCreationDialog-CYhEzkFt.js`),__vite__mapDeps([35,28,29,30]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>__vitePreload(()=>import(`./CardDetailDialog-B3nu2JGI.js`),__vite__mapDeps([36,31,32,29]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>__vitePreload(()=>import(`./CardListItem-1GFj18SB.js`),__vite__mapDeps([37,33]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>__vitePreload(()=>import(`./DeleteCardDialog-Dyob2QXx.js`),__vite__mapDeps([38,32,29]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>__vitePreload(()=>import(`./appearance-CgbkXuYz.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-Cg53Mdi1.js`),__vite__mapDeps([40,12,41])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>__vitePreload(()=>import(`./developer-DGJJ6tta.js`),__vite__mapDeps([42,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>__vitePreload(()=>import(`./general-BwshJ41f.js`),__vite__mapDeps([43,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>__vitePreload(()=>import(`./memory-CNpnR5Ql.js`),__vite__mapDeps([44,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>__vitePreload(()=>import(`./models-BkGZGThV.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-BE14UNWX.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-BuF1Ojbx.js`),__vite__mapDeps([48,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`hearing`,name:`/settings/modules/hearing`,component:()=>__vitePreload(()=>import(`./hearing-BaAcNIp6.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-DaVuCOPk.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-A4xwu6aD.js`),__vite__mapDeps([51,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>__vitePreload(()=>import(`./speech-Abc_vh4w.js`),__vite__mapDeps([52,12,10,53])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>__vitePreload(()=>import(`./providers-C2VzTNwI.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-7ap18Fo0.js`),__vite__mapDeps([55,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>__vitePreload(()=>import(`./anthropic-5AYt9HNX.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-C31WIx9s.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-DQ5b742r.js`),__vite__mapDeps([58,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>__vitePreload(()=>import(`./deepseek-ByVQlTAc.js`),__vite__mapDeps([59,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>__vitePreload(()=>import(`./elevenlabs-W4waKSIH.js`),__vite__mapDeps([60,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>__vitePreload(()=>import(`./featherless-ai-DibRGwb-.js`),__vite__mapDeps([61,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>__vitePreload(()=>import(`./fireworks-ai-LsH2mj56.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--KpWfIV-.js`),__vite__mapDeps([63,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`index-tts-vllm`,name:`/settings/providers/index-tts-vllm`,component:()=>__vitePreload(()=>import(`./index-tts-vllm-CZN3SzPx.js`),__vite__mapDeps([64,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>__vitePreload(()=>import(`./microsoft-speech-DxOqJ-JQ.js`),__vite__mapDeps([65,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>__vitePreload(()=>import(`./mistral-ai-DHDVQ-H_.js`),__vite__mapDeps([66,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>__vitePreload(()=>import(`./moonshot-ai-DUyvYdYh.js`),__vite__mapDeps([67,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>__vitePreload(()=>import(`./novita-ai-D-caW35N.js`),__vite__mapDeps([68,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>__vitePreload(()=>import(`./ollama-4wbi0n-k.js`),__vite__mapDeps([69,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>__vitePreload(()=>import(`./openai-BDPnuQYk.js`),__vite__mapDeps([70,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>__vitePreload(()=>import(`./openai-audio-speech-DDIxYC90.js`),__vite__mapDeps([71,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>__vitePreload(()=>import(`./openai-audio-transcription-CbLHW9aC.js`),__vite__mapDeps([72,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>__vitePreload(()=>import(`./openrouter-ai-Bp9JI8pa.js`),__vite__mapDeps([73,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2`,name:`/settings/providers/player2`,component:()=>__vitePreload(()=>import(`./player2--doz6X0m.js`),__vite__mapDeps([74,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-speech`,name:`/settings/providers/player2-speech`,component:()=>__vitePreload(()=>import(`./player2-speech-Cf4MI4jv.js`),__vite__mapDeps([75,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>__vitePreload(()=>import(`./together-ai-CsX6JpBs.js`),__vite__mapDeps([76,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>__vitePreload(()=>import(`./volcengine-Ghd4CBxy.js`),__vite__mapDeps([77,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>__vitePreload(()=>import(`./xai-n-qIhfM0.js`),__vite__mapDeps([78,12])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>__vitePreload(()=>import(`./scene-CRPN8LGX.js`),__vite__mapDeps([79,12,25,46])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`StageScenePage`,component:()=>__vitePreload(()=>import(`./stage-C6gN8EAr.js`),__vite__mapDeps([80,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-Cm2-SMhJ.js`),__vite__mapDeps([81,10,53]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>__vitePreload(()=>import(`./delays-DsBi38hN.js`),__vite__mapDeps([82,10,53]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>__vitePreload(()=>import(`./emotions-yTSpRcgw.js`),__vite__mapDeps([83,10,53]))},{path:`messages`,name:`/test/queues/messages`,component:()=>__vitePreload(()=>import(`./messages-DQjPeAXc.js`),__vite__mapDeps([84,10,53]))}]}]}];var BidirectionalTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`BidirectionalTransition`,props:{fromClass:{},activeClass:{},toClass:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(Transition,{"enter-from-class":_ctx.fromClass,"enter-active-class":_ctx.activeClass,"enter-to-class":_ctx.toClass,"leave-from-class":_ctx.toClass,"leave-active-class":_ctx.activeClass,"leave-to-class":_ctx.fromClass},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`enter-from-class`,`enter-active-class`,`enter-to-class`,`leave-from-class`,`leave-active-class`,`leave-to-class`]))}}),BidirectionalTransition_default=BidirectionalTransition_vue_vue_type_script_setup_true_lang_default;const 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}}let count$1=0;function useFocusGuards(){watchEffect(cleanupFn=>{if(!isClient$1)return;let edgeGuards=document.querySelectorAll(`[data-reka-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,edgeGuards[0]??createFocusGuard()),document.body.insertAdjacentElement(`beforeend`,edgeGuards[1]??createFocusGuard()),count$1++,cleanupFn(()=>{count$1===1&&document.querySelectorAll(`[data-reka-focus-guard]`).forEach(node$1=>node$1.remove()),count$1--})})}function createFocusGuard(){let element$3=document.createElement(`span`);return element$3.setAttribute(`data-reka-focus-guard`,``),element$3.tabIndex=0,element$3.style.outline=`none`,element$3.style.opacity=`0`,element$3.style.position=`fixed`,element$3.style.pointerEvents=`none`,element$3}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`,{gap:`1`,grid:``,"items-center":``,"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:`5`,"grid-col-span-2":``,"w-full":``},_hoisted_3$20=[`value`,`min`,`max`,`step`,`disabled`],_hoisted_4$16={bg:`neutral-100 dark:neutral-900`,"h-fit":``,"min-w-12":``,"inline-flex":``,"items-center":``,"rounded-md":``,px:`1.5`,py:`0.5`},_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":``,"font-mono":``,"outline-none":``,transition:`all duration-200 ease-in-out`,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-c1b3c1a7`]]);const _hoisted_1$36={"text-nowrap":``,"text-xs":``},_hoisted_2$25={"h-fit":``,"inline-flex":``,"items-center":``,text:`[12px]`,"gap-1":``},_hoisted_3$19=[`value`,`min`,`max`],_hoisted_4$15={"h-fit":``,"inline-flex":``,"items-center":``,text:`[12px]`,"gap-1":``},_hoisted_5$12=[`value`,`min`,`max`],_hoisted_6$11={"h-fit":``,"inline-flex":``,"items-center":``,text:`[12px]`,"gap-1":``},_hoisted_7$8=[`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`,{"h-fit":``,"w-full":``,"inline-flex":``,"items-center":``,"rounded-md":``,px:`1.5`,py:`0.5`,class:normalizeClass([isDragging.value===`x`?`bg-red-100/50 dark:bg-red-900/50`:`bg-neutral-100 dark:bg-neutral-900`]),transition:`colors duration-200 ease-in-out`},[createBaseVNode(`span`,_hoisted_2$25,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,"text-red-500":``,onMousedown:_cache$1[0]||=e$4=>startDrag(`x`,e$4)},`|`,32),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_3$19)])],2),createBaseVNode(`label`,{"h-fit":``,"inline-flex":``,"items-center":``,"rounded-md":``,px:`1.5`,py:`0.5`,class:normalizeClass([isDragging.value===`y`?`bg-blue-100/50 dark:bg-blue-900/50`:`bg-neutral-100 dark:bg-neutral-900`]),transition:`colors duration-200 ease-in-out`},[createBaseVNode(`span`,_hoisted_4$15,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,"text-blue-500":``,onMousedown:_cache$1[2]||=e$4=>startDrag(`y`,e$4)},`|`,32),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_5$12)])],2),createBaseVNode(`label`,{"h-fit":``,"inline-flex":``,"items-center":``,"rounded-md":``,px:`1.5`,py:`0.5`,class:normalizeClass([isDragging.value===`z`?`bg-green-100/50 dark:bg-green-900/50`:`bg-neutral-100 dark:bg-neutral-900`]),transition:`colors duration-200 ease-in-out`},[createBaseVNode(`span`,_hoisted_6$11,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,"text-green-500":``,onMousedown:_cache$1[4]||=e$4=>startDrag(`z`,e$4)},`|`,32),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_7$8)])],2)],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(;_iforceMount.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$54={key:0,d:`M0 0L6 6L12 0`},_hoisted_2$35={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$35)):(openBlock(),createElementBlock(`path`,_hoisted_1$54))])]),_: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[injectPopoverRootContext,providePopoverRootContext]=createContext(`PopoverRoot`);var PopoverRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PopoverRoot`,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:[`update:open`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,{modal}=toRefs(props),open$1=useVModel(props,`open`,emit$1,{defaultValue:props.defaultOpen,passive:props.open===void 0}),triggerElement=ref(),hasCustomAnchor=ref(!1);return providePopoverRootContext({contentId:``,triggerId:``,modal,open:open$1,onOpenChange:value$1=>{open$1.value=value$1},onOpenToggle:()=>{open$1.value=!open$1.value},triggerElement,hasCustomAnchor}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(PopperRoot_default),null,{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`,{open:unref(open$1),close:()=>open$1.value=!1})]),_:3}))}}),PopoverRoot_default=PopoverRoot_vue_vue_type_script_setup_true_lang_default,PopoverContentImpl_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PopoverContentImpl`,props:{trapFocus:{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`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,forwarded=useForwardProps(reactiveOmit(props,`trapFocus`,`disableOutsidePointerEvents`)),{forwardRef}=useForwardExpose(),rootContext=injectPopoverRootContext();return useFocusGuards(),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FocusScope_default),{"as-child":``,loop:``,trapped:_ctx.trapFocus,onMountAutoFocus:_cache$1[5]||=$event=>emits(`openAutoFocus`,$event),onUnmountAutoFocus:_cache$1[6]||=$event=>emits(`closeAutoFocus`,$event)},{default:withCtx(()=>[createVNode(unref(DismissableLayer_default),{"as-child":``,"disable-outside-pointer-events":_ctx.disableOutsidePointerEvents,onPointerDownOutside:_cache$1[0]||=$event=>emits(`pointerDownOutside`,$event),onInteractOutside:_cache$1[1]||=$event=>emits(`interactOutside`,$event),onEscapeKeyDown:_cache$1[2]||=$event=>emits(`escapeKeyDown`,$event),onFocusOutside:_cache$1[3]||=$event=>emits(`focusOutside`,$event),onDismiss:_cache$1[4]||=$event=>unref(rootContext).onOpenChange(!1)},{default:withCtx(()=>[createVNode(unref(PopperContent_default),mergeProps(unref(forwarded),{id:unref(rootContext).contentId,ref:unref(forwardRef),"data-state":unref(rootContext).open.value?`open`:`closed`,"aria-labelledby":unref(rootContext).triggerId,style:{"--reka-popover-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-popover-content-available-width":`var(--reka-popper-available-width)`,"--reka-popover-content-available-height":`var(--reka-popper-available-height)`,"--reka-popover-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-popover-trigger-height":`var(--reka-popper-anchor-height)`},role:`dialog`}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`id`,`data-state`,`aria-labelledby`])]),_:3},8,[`disable-outside-pointer-events`])]),_:3},8,[`trapped`]))}}),PopoverContentImpl_default=PopoverContentImpl_vue_vue_type_script_setup_true_lang_default,PopoverContentModal_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PopoverContentModal`,props:{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`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectPopoverRootContext(),isRightClickOutsideRef=ref(!1);useBodyScrollLock(!0);let forwarded=useForwardPropsEmits(props,emits),{forwardRef,currentElement}=useForwardExpose();return useHideOthers(currentElement),(_ctx,_cache$1)=>(openBlock(),createBlock(PopoverContentImpl_default,mergeProps(unref(forwarded),{ref:unref(forwardRef),"trap-focus":unref(rootContext).open.value,"disable-outside-pointer-events":``,onCloseAutoFocus:_cache$1[0]||=withModifiers(event=>{emits(`closeAutoFocus`,event),isRightClickOutsideRef.value||unref(rootContext).triggerElement.value?.focus()},[`prevent`]),onPointerDownOutside:_cache$1[1]||=event=>{emits(`pointerDownOutside`,event);let originalEvent=event.detail.originalEvent,ctrlLeftClick=originalEvent.button===0&&originalEvent.ctrlKey===!0,isRightClick=originalEvent.button===2||ctrlLeftClick;isRightClickOutsideRef.value=isRightClick},onFocusOutside:_cache$1[2]||=withModifiers(()=>{},[`prevent`])}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16,[`trap-focus`]))}}),PopoverContentModal_default=PopoverContentModal_vue_vue_type_script_setup_true_lang_default,PopoverContentNonModal_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PopoverContentNonModal`,props:{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`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectPopoverRootContext(),hasInteractedOutsideRef=ref(!1),hasPointerDownOutsideRef=ref(!1),forwarded=useForwardPropsEmits(props,emits);return(_ctx,_cache$1)=>(openBlock(),createBlock(PopoverContentImpl_default,mergeProps(unref(forwarded),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:_cache$1[0]||=event=>{emits(`closeAutoFocus`,event),event.defaultPrevented||(hasInteractedOutsideRef.value||unref(rootContext).triggerElement.value?.focus(),event.preventDefault()),hasInteractedOutsideRef.value=!1,hasPointerDownOutsideRef.value=!1},onInteractOutside:_cache$1[1]||=async event=>{emits(`interactOutside`,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))}}),PopoverContentNonModal_default=PopoverContentNonModal_vue_vue_type_script_setup_true_lang_default,PopoverContent_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PopoverContent`,props:{forceMount:{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`,`openAutoFocus`,`closeAutoFocus`],setup(__props,{emit:__emit}){let props=__props,emits=__emit,rootContext=injectPopoverRootContext(),forwarded=useForwardPropsEmits(props,emits),{forwardRef}=useForwardExpose();return rootContext.contentId||=useId(void 0,`reka-popover-content`),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(Presence_default),{present:_ctx.forceMount||unref(rootContext).open.value},{default:withCtx(()=>[unref(rootContext).modal.value?(openBlock(),createBlock(PopoverContentModal_default,mergeProps({key:0},unref(forwarded),{ref:unref(forwardRef)}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16)):(openBlock(),createBlock(PopoverContentNonModal_default,mergeProps({key:1},unref(forwarded),{ref:unref(forwardRef)}),{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),PopoverContent_default=PopoverContent_vue_vue_type_script_setup_true_lang_default,PopoverPortal_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PopoverPortal`,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))}}),PopoverPortal_default=PopoverPortal_vue_vue_type_script_setup_true_lang_default,PopoverTrigger_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PopoverTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(__props){let props=__props,rootContext=injectPopoverRootContext(),{forwardRef,currentElement:triggerElement}=useForwardExpose();return rootContext.triggerId||=useId(void 0,`reka-popover-trigger`),onMounted(()=>{rootContext.triggerElement.value=triggerElement.value}),(_ctx,_cache$1)=>(openBlock(),createBlock(resolveDynamicComponent(unref(rootContext).hasCustomAnchor.value?unref(Primitive):unref(PopperAnchor_default)),{"as-child":``},{default:withCtx(()=>[createVNode(unref(Primitive),{id:unref(rootContext).triggerId,ref:unref(forwardRef),type:_ctx.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":unref(rootContext).open.value,"aria-controls":unref(rootContext).contentId,"data-state":unref(rootContext).open.value?`open`:`closed`,as:_ctx.as,"as-child":props.asChild,onClick:unref(rootContext).onOpenToggle},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3},8,[`id`,`type`,`aria-expanded`,`aria-controls`,`data-state`,`as`,`as-child`,`onClick`])]),_:3}))}}),PopoverTrigger_default=PopoverTrigger_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$53={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$53,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$52={flex:`~ col gap-4`},_hoisted_2$34={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_3$27={flex:`1`},_hoisted_4$22={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_5$19={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$52,[createBaseVNode(`div`,_hoisted_2$34,[createBaseVNode(`div`,_hoisted_3$27,[createBaseVNode(`div`,_hoisted_4$22,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)])]),createBaseVNode(`div`,_hoisted_5$19,[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$51=[`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$51)),[[vModelDynamic,modelValue.value]])}}),Input_default=Input_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$50={"max-w-full":``},_hoisted_2$33={flex:`~ col gap-4`},_hoisted_3$26={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$21={key:0,class:`text-red-500`},_hoisted_5$18={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},_hoisted_6$17=[`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$50,[createBaseVNode(`label`,_hoisted_2$33,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$26,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$21,`*`))]),createBaseVNode(`div`,_hoisted_5$18,[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$17)),[[vModelText,modelValue.value]])])]))}}),FieldInput_default=FieldInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$49={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$49,[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$48={"max-w-full":``},_hoisted_2$32={flex:`~ col gap-2`},_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={flex:`~ col gap-2`},_hoisted_7$11=[`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$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)])])]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_6$16,[(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$11)]))),128))])),[[_directive_auto_animate]])])])}}}),FieldKeyValues_default=FieldKeyValues_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$47=[`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$47)),[[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$46={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_2$31={flex:`1`},_hoisted_3$24={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$19={class:`text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_5$16={"font-mono":``},_hoisted_6$15={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$46,[createBaseVNode(`div`,_hoisted_2$31,[createBaseVNode(`div`,_hoisted_3$24,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(_ctx.label),1)])]),createBaseVNode(`div`,_hoisted_4$19,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(_ctx.description),1)])])]),createBaseVNode(`span`,_hoisted_5$16,toDisplayString(props.formatValue?.(modelValue.value)||modelValue.value),1)]),createBaseVNode(`div`,_hoisted_6$15,[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$45={flex:`~ col gap-4`},_hoisted_2$30={class:`flex items-center gap-1 break-words text-sm font-medium`},_hoisted_3$23={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$45,[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$30,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)])]),createBaseVNode(`div`,_hoisted_3$23,[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$44={class:`max-w-full`},_hoisted_2$29={class:`flex flex-col gap-2`},_hoisted_3$22={class:`flex items-center gap-1 text-sm font-medium`},_hoisted_4$18={key:0,class:`text-red-500`},_hoisted_5$15={class:`text-nowrap text-xs text-neutral-500 dark:text-neutral-400`},_hoisted_6$14={class:`~ col gap-2`},_hoisted_7$10=[`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$44,[createBaseVNode(`label`,_hoisted_2$29,[createBaseVNode(`div`,null,[createBaseVNode(`div`,_hoisted_3$22,[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label),1)]),props.required===!1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$18,`*`))]),createBaseVNode(`div`,_hoisted_5$15,[renderSlot(_ctx.$slots,`description`,{},()=>[createTextVNode(toDisplayString(props.description),1)])])]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_6$14,[(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$10)]))),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$43=[`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$43)),[[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$42=[`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$42)),[[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$41={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$41,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$40=[`onClick`],_hoisted_2$28={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$28,[_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$40)]),default:withCtx(()=>[createBaseVNode(`div`,{gap:`1`,grid:``,"items-center":``,"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 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(;_i4)){if(coords$1.length===4){if(coords$1[3].type!==Tok.Alpha)return;coords$1[3]=coords$1[3].value}return coords$1.length===3&&coords$1.push({type:Tok.None,value:void 0}),coords$1.every(c$3=>c$3.type!==Tok.Alpha)?coords$1:void 0}}function parseModernSyntax(tokens,includeHue){tokens._i=0;let token=tokens[tokens._i++];if(!token||token.type!==Tok.Function)return;let coords$1=consumeCoords(tokens,includeHue);if(coords$1)return coords$1.unshift(token.value),coords$1}const parse$4=color$2=>{if(typeof color$2!=`string`)return;let tokens=tokenize(color$2),parsed=tokens?parseModernSyntax(tokens,!0):void 0,result,i=0,len=parsers.length;for(;ic$3===`transparent`?{mode:`rgb`,r:0,g:0,b:0,alpha:0}:void 0;var parseTransparent_default=parseTransparent;const lerp$2=(a$1,b$1,t$1)=>a$1+t$1*(b$1-a$1),get_classes=arr=>{let classes=[];for(let i=0;iarr=>{let classes=get_classes(arr);return t$1=>{let cls=t$1*classes.length,idx=t$1>=1?classes.length-1:Math.max(Math.floor(cls),0),pair=classes[idx];return pair===void 0?void 0:interpolator(pair[0],pair[1],cls-idx)}},interpolatorLinear=interpolatorPiecewise(lerp$2),fixupAlpha=arr=>{let some_defined=!1,res=arr.map(v=>v===void 0?1:(some_defined=!0,v));return some_defined?res:arr},definition$28={mode:`rgb`,channels:[`r`,`g`,`b`,`alpha`],parse:[parseRgb_default,parseHex_default,parseRgbLegacy_default,parseNamed_default,parseTransparent_default,`srgb`],serialize:`srgb`,interpolate:{r:interpolatorLinear,g:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}};var definition_default$23=definition$28;const linearize$2=(v=0)=>Math.abs(v)**(563/256)*Math.sign(v),convertA98ToXyz65=a98$1=>{let r$1=linearize$2(a98$1.r),g=linearize$2(a98$1.g),b$1=linearize$2(a98$1.b),res={mode:`xyz65`,x:.5766690429101305*r$1+.1855582379065463*g+.1882286462349947*b$1,y:.297344975250536*r$1+.6273635662554661*g+.0752914584939979*b$1,z:.0270313613864123*r$1+.0706888525358272*g+.9913375368376386*b$1};return a98$1.alpha!==void 0&&(res.alpha=a98$1.alpha),res};var convertA98ToXyz65_default=convertA98ToXyz65;const gamma$2=v=>Math.abs(v)**(256/563)*Math.sign(v),convertXyz65ToA98=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`a98`,r:gamma$2(x$1*2.0415879038107465-y*.5650069742788597-.3447313507783297*z$1),g:gamma$2(x$1*-.9692436362808798+y*1.8759675015077206+.0415550574071756*z$1),b:gamma$2(x$1*.0134442806320312-y*.1183623922310184+1.0151749943912058*z$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToA98_default=convertXyz65ToA98;const fn$3=(c$3=0)=>{let abs$2=Math.abs(c$3);return abs$2<=.04045?c$3/12.92:(Math.sign(c$3)||1)*((abs$2+.055)/1.055)**2.4},convertRgbToLrgb=({r:r$1,g,b:b$1,alpha:alpha$1})=>{let res={mode:`lrgb`,r:fn$3(r$1),g:fn$3(g),b:fn$3(b$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToLrgb_default=convertRgbToLrgb;const convertRgbToXyz65=rgb$2=>{let{r:r$1,g,b:b$1,alpha:alpha$1}=convertRgbToLrgb_default(rgb$2),res={mode:`xyz65`,x:.4123907992659593*r$1+.357584339383878*g+.1804807884018343*b$1,y:.2126390058715102*r$1+.715168678767756*g+.0721923153607337*b$1,z:.0193308187155918*r$1+.119194779794626*g+.9505321522496607*b$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToXyz65_default=convertRgbToXyz65;const fn$2=(c$3=0)=>{let abs$2=Math.abs(c$3);return abs$2>.0031308?(Math.sign(c$3)||1)*(1.055*abs$2**(1/2.4)-.055):c$3*12.92},convertLrgbToRgb=({r:r$1,g,b:b$1,alpha:alpha$1},mode=`rgb`)=>{let res={mode,r:fn$2(r$1),g:fn$2(g),b:fn$2(b$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLrgbToRgb_default=convertLrgbToRgb;const convertXyz65ToRgb=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res=convertLrgbToRgb_default({r:x$1*3.2409699419045226-y*1.537383177570094-.4986107602930034*z$1,g:x$1*-.9692436362808796+y*1.8759675015077204+.0415550574071756*z$1,b:x$1*.0556300796969936-y*.2039769588889765+1.0569715142428784*z$1});return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToRgb_default=convertXyz65ToRgb;const definition$27={...definition_default$23,mode:`a98`,parse:[`a98-rgb`],serialize:`a98-rgb`,fromMode:{rgb:color$2=>convertXyz65ToA98_default(convertRgbToXyz65_default(color$2)),xyz65:convertXyz65ToA98_default},toMode:{rgb:color$2=>convertXyz65ToRgb_default(convertA98ToXyz65_default(color$2)),xyz65:convertA98ToXyz65_default}};var definition_default=definition$27;const normalizeHue=hue$2=>(hue$2%=360)<0?hue$2+360:hue$2;var normalizeHue_default=normalizeHue;const hue$1=(hues,fn$5)=>hues.map((hue$2,idx,arr)=>{if(hue$2===void 0)return hue$2;let normalized=normalizeHue_default(hue$2);return idx===0||hues[idx-1]===void 0?normalized:fn$5(normalized-normalizeHue_default(arr[idx-1]))}).reduce((acc,curr)=>!acc.length||curr===void 0||acc[acc.length-1]===void 0?(acc.push(curr),acc):(acc.push(curr+acc[acc.length-1]),acc),[]),fixupHueShorter=arr=>hue$1(arr,d=>Math.abs(d)<=180?d:d-360*Math.sign(d)),M=[-.14861,1.78277,-.29227,-.90649,1.97294,0],degToRad$1=Math.PI/180,radToDeg$1=180/Math.PI;let DE=M[3]*M[4],BE=M[1]*M[4],BCAD=M[1]*M[2]-M[0]*M[3];const convertRgbToCubehelix=({r:r$1,g,b:b$1,alpha:alpha$1})=>{r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let l=(BCAD*b$1+r$1*DE-g*BE)/(BCAD+DE-BE),x$1=b$1-l,y=(M[4]*(g-l)-M[2]*x$1)/M[3],res={mode:`cubehelix`,l,s:l===0||l===1?void 0:Math.sqrt(x$1*x$1+y*y)/(M[4]*l*(1-l))};return res.s&&(res.h=Math.atan2(y,x$1)*radToDeg$1-120),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToCubehelix_default=convertRgbToCubehelix;const convertCubehelixToRgb=({h:h$1,s,l,alpha:alpha$1})=>{let res={mode:`rgb`};h$1=(h$1===void 0?0:h$1+120)*degToRad$1,l===void 0&&(l=0);let amp=s===void 0?0:s*l*(1-l),cosh=Math.cos(h$1),sinh=Math.sin(h$1);return res.r=l+amp*(M[0]*cosh+M[1]*sinh),res.g=l+amp*(M[2]*cosh+M[3]*sinh),res.b=l+amp*(M[4]*cosh+M[5]*sinh),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertCubehelixToRgb_default=convertCubehelixToRgb;const differenceHueSaturation=(std,smp)=>{if(std.h===void 0||smp.h===void 0||!std.s||!smp.s)return 0;let std_h=normalizeHue_default(std.h),smp_h=normalizeHue_default(smp.h),dH=Math.sin((smp_h-std_h+360)/2*Math.PI/180);return 2*Math.sqrt(std.s*smp.s)*dH},differenceHueNaive=(std,smp)=>{if(std.h===void 0||smp.h===void 0)return 0;let std_h=normalizeHue_default(std.h),smp_h=normalizeHue_default(smp.h);return Math.abs(smp_h-std_h)>180?std_h-(smp_h-360*Math.sign(smp_h-std_h)):smp_h-std_h},differenceHueChroma=(std,smp)=>{if(std.h===void 0||smp.h===void 0||!std.c||!smp.c)return 0;let std_h=normalizeHue_default(std.h),smp_h=normalizeHue_default(smp.h),dH=Math.sin((smp_h-std_h+360)/2*Math.PI/180);return 2*Math.sqrt(std.c*smp.c)*dH},averageAngle=val=>{let sum=val.reduce((sum$1,val$1)=>{if(val$1!==void 0){let rad=val$1*Math.PI/180;sum$1.sin+=Math.sin(rad),sum$1.cos+=Math.cos(rad)}return sum$1},{sin:0,cos:0}),angle=Math.atan2(sum.sin,sum.cos)*180/Math.PI;return angle<0?360+angle:angle},averageNumber=val=>{let a$1=val.filter(v=>v!==void 0);return a$1.length?a$1.reduce((sum,v)=>sum+v,0)/a$1.length:void 0},isfn=o=>typeof o==`function`;function average(colors,mode=`rgb`,overrides){let def$1=getMode(mode),cc$1=colors.map(converter_default(mode));return def$1.channels.reduce((res,ch)=>{let arr=cc$1.map(c$3=>c$3[ch]).filter(val=>val!==void 0);if(arr.length){let fn$5;fn$5=isfn(overrides)?overrides:overrides&&isfn(overrides[ch])?overrides[ch]:def$1.average&&isfn(def$1.average[ch])?def$1.average[ch]:averageNumber,res[ch]=fn$5(arr,ch)}return res},{mode})}const definition$26={mode:`cubehelix`,channels:[`h`,`s`,`l`,`alpha`],parse:[`--cubehelix`],serialize:`--cubehelix`,ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:convertRgbToCubehelix_default},toMode:{rgb:convertCubehelixToRgb_default},interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},s:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueSaturation},average:{h:averageAngle}};var definition_default$1=definition$26;const convertLabToLch=({l,a:a$1,b:b$1,alpha:alpha$1},mode=`lch`)=>{a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let c$3=Math.sqrt(a$1*a$1+b$1*b$1),res={mode,l,c:c$3};return c$3&&(res.h=normalizeHue_default(Math.atan2(b$1,a$1)*180/Math.PI)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLabToLch_default=convertLabToLch;const convertLchToLab=({l,c:c$3,h:h$1,alpha:alpha$1},mode=`lab`)=>{h$1===void 0&&(h$1=0);let res={mode,l,a:c$3?c$3*Math.cos(h$1/180*Math.PI):0,b:c$3?c$3*Math.sin(h$1/180*Math.PI):0};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLchToLab_default=convertLchToLab;const k$1=29**3/3**3,e$2=6**3/29**3,D50={X:.3457/.3585,Y:1,Z:.2958/.3585},D65={X:.3127/.329,Y:1,Z:.3583/.329},k$2=29**3/3**3,e$3=6**3/29**3;let fn$1=v=>v**3>e$2?v**3:(116*v-16)/k$1;const convertLab65ToXyz65=({l,a:a$1,b:b$1,alpha:alpha$1})=>{l===void 0&&(l=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let fy=(l+16)/116,fx=a$1/500+fy,fz=fy-b$1/200,res={mode:`xyz65`,x:fn$1(fx)*D65.X,y:fn$1(fy)*D65.Y,z:fn$1(fz)*D65.Z};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLab65ToXyz65_default=convertLab65ToXyz65;const convertLab65ToRgb=lab$1=>convertXyz65ToRgb_default(convertLab65ToXyz65_default(lab$1));var convertLab65ToRgb_default=convertLab65ToRgb;const f$1=value$1=>value$1>e$2?Math.cbrt(value$1):(k$1*value$1+16)/116,convertXyz65ToLab65=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let f0=f$1(x$1/D65.X),f1=f$1(y/D65.Y),f2=f$1(z$1/D65.Z),res={mode:`lab65`,l:116*f1-16,a:500*(f0-f1),b:200*(f1-f2)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToLab65_default=convertXyz65ToLab65;const convertRgbToLab65=rgb$2=>{let res=convertXyz65ToLab65_default(convertRgbToXyz65_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToLab65_default=convertRgbToLab65;const kE=1,kCH=1,θ=26/180*Math.PI,cosθ=Math.cos(θ),sinθ=Math.sin(θ),factor=100/Math.log(139/100),convertDlchToLab65=({l,c:c$3,h:h$1,alpha:alpha$1})=>{l===void 0&&(l=0),c$3===void 0&&(c$3=0),h$1===void 0&&(h$1=0);let res={mode:`lab65`,l:(Math.exp(l*kE/factor)-1)/.0039},G=(Math.exp(.0435*c$3*kCH*kE)-1)/.075,e$4=G*Math.cos(h$1/180*Math.PI-θ),f$2=G*Math.sin(h$1/180*Math.PI-θ);return res.a=e$4*cosθ-f$2/.83*sinθ,res.b=e$4*sinθ+f$2/.83*cosθ,alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertDlchToLab65_default=convertDlchToLab65;const convertLab65ToDlch=({l,a:a$1,b:b$1,alpha:alpha$1})=>{l===void 0&&(l=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let e$4=a$1*cosθ+b$1*sinθ,f$2=.83*(b$1*cosθ-a$1*sinθ),G=Math.sqrt(e$4*e$4+f$2*f$2),res={mode:`dlch`,l:factor/kE*Math.log(1+.0039*l),c:Math.log(1+.075*G)/(.0435*kCH*kE)};return res.c&&(res.h=normalizeHue_default((Math.atan2(f$2,e$4)+θ)/Math.PI*180)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLab65ToDlch_default=convertLab65ToDlch;const convertDlabToLab65=c$3=>convertDlchToLab65_default(convertLabToLch_default(c$3,`dlch`)),convertLab65ToDlab=c$3=>convertLchToLab_default(convertLab65ToDlch_default(c$3),`dlab`),definition$25={mode:`dlab`,parse:[`--din99o-lab`],serialize:`--din99o-lab`,toMode:{lab65:convertDlabToLab65,rgb:c$3=>convertLab65ToRgb_default(convertDlabToLab65(c$3))},fromMode:{lab65:convertLab65ToDlab,rgb:c$3=>convertLab65ToDlab(convertRgbToLab65_default(c$3))},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:interpolatorLinear,a:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$2=definition$25;const definition$24={mode:`dlch`,parse:[`--din99o-lch`],serialize:`--din99o-lch`,toMode:{lab65:convertDlchToLab65_default,dlab:c$3=>convertLchToLab_default(c$3,`dlab`),rgb:c$3=>convertLab65ToRgb_default(convertDlchToLab65_default(c$3))},fromMode:{lab65:convertLab65ToDlch_default,dlab:c$3=>convertLabToLch_default(c$3,`dlch`),rgb:c$3=>convertLab65ToDlch_default(convertRgbToLab65_default(c$3))},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:interpolatorLinear,c:interpolatorLinear,h:{use:interpolatorLinear,fixup:fixupHueShorter},alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$3=definition$24;function convertHsiToRgb({h:h$1,s,i,alpha:alpha$1}){h$1=normalizeHue_default(h$1===void 0?0:h$1),s===void 0&&(s=0),i===void 0&&(i=0);let f$2=Math.abs(h$1/60%2-1),res;switch(Math.floor(h$1/60)){case 0:res={r:i*(1+s*(3/(2-f$2)-1)),g:i*(1+s*(3*(1-f$2)/(2-f$2)-1)),b:i*(1-s)};break;case 1:res={r:i*(1+s*(3*(1-f$2)/(2-f$2)-1)),g:i*(1+s*(3/(2-f$2)-1)),b:i*(1-s)};break;case 2:res={r:i*(1-s),g:i*(1+s*(3/(2-f$2)-1)),b:i*(1+s*(3*(1-f$2)/(2-f$2)-1))};break;case 3:res={r:i*(1-s),g:i*(1+s*(3*(1-f$2)/(2-f$2)-1)),b:i*(1+s*(3/(2-f$2)-1))};break;case 4:res={r:i*(1+s*(3*(1-f$2)/(2-f$2)-1)),g:i*(1-s),b:i*(1+s*(3/(2-f$2)-1))};break;case 5:res={r:i*(1+s*(3/(2-f$2)-1)),g:i*(1-s),b:i*(1+s*(3*(1-f$2)/(2-f$2)-1))};break;default:res={r:i*(1-s),g:i*(1-s),b:i*(1-s)}}return res.mode=`rgb`,alpha$1!==void 0&&(res.alpha=alpha$1),res}function convertRgbToHsi({r:r$1,g,b:b$1,alpha:alpha$1}){r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let M$1=Math.max(r$1,g,b$1),m=Math.min(r$1,g,b$1),res={mode:`hsi`,s:r$1+g+b$1===0?0:1-3*m/(r$1+g+b$1),i:(r$1+g+b$1)/3};return M$1-m!==0&&(res.h=(M$1===r$1?(g-b$1)/(M$1-m)+(g{switch(unit){case`deg`:return+val;case`rad`:return val/Math.PI*180;case`grad`:return val/10*9;case`turn`:return val*360}};var hue_default=hueToDeg;const hsl_old=RegExp(`^hsla?\\(\\s*${hue}${c}${per}${c}${per}\\s*(?:,\\s*${num_per}\\s*)?\\)$`),parseHslLegacy=color$2=>{let match=color$2.match(hsl_old);if(!match)return;let res={mode:`hsl`};return match[3]===void 0?match[1]!==void 0&&match[2]!==void 0&&(res.h=hue_default(match[1],match[2])):res.h=+match[3],match[4]!==void 0&&(res.s=Math.min(Math.max(0,match[4]/100),1)),match[5]!==void 0&&(res.l=Math.min(Math.max(0,match[5]/100),1)),match[6]===void 0?match[7]!==void 0&&(res.alpha=Math.max(0,Math.min(1,+match[7]))):res.alpha=Math.max(0,Math.min(1,match[6]/100)),res};var parseHslLegacy_default=parseHslLegacy;function parseHsl(color$2,parsed){if(!parsed||parsed[0]!==`hsl`&&parsed[0]!==`hsla`)return;let res={mode:`hsl`},[,h$1,s,l,alpha$1]=parsed;if(h$1.type!==Tok.None){if(h$1.type===Tok.Percentage)return;res.h=h$1.value}if(s.type!==Tok.None){if(s.type===Tok.Hue)return;res.s=s.value/100}if(l.type!==Tok.None){if(l.type===Tok.Hue)return;res.l=l.value/100}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseHsl_default=parseHsl;const definition$22={mode:`hsl`,toMode:{rgb:convertHslToRgb},fromMode:{rgb:convertRgbToHsl},channels:[`h`,`s`,`l`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[parseHsl_default,parseHslLegacy_default],serialize:c$3=>`hsl(${c$3.h===void 0?`none`:c$3.h} ${c$3.s===void 0?`none`:c$3.s*100+`%`} ${c$3.l===void 0?`none`:c$3.l*100+`%`}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},s:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueSaturation},average:{h:averageAngle}};var definition_default$5=definition$22;function convertHsvToRgb({h:h$1,s,v,alpha:alpha$1}){h$1=normalizeHue_default(h$1===void 0?0:h$1),s===void 0&&(s=0),v===void 0&&(v=0);let f$2=Math.abs(h$1/60%2-1),res;switch(Math.floor(h$1/60)){case 0:res={r:v,g:v*(1-s*f$2),b:v*(1-s)};break;case 1:res={r:v*(1-s*f$2),g:v,b:v*(1-s)};break;case 2:res={r:v*(1-s),g:v,b:v*(1-s*f$2)};break;case 3:res={r:v*(1-s),g:v*(1-s*f$2),b:v};break;case 4:res={r:v*(1-s*f$2),g:v*(1-s),b:v};break;case 5:res={r:v,g:v*(1-s),b:v*(1-s*f$2)};break;default:res={r:v*(1-s),g:v*(1-s),b:v*(1-s)}}return res.mode=`rgb`,alpha$1!==void 0&&(res.alpha=alpha$1),res}function convertRgbToHsv({r:r$1,g,b:b$1,alpha:alpha$1}){r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let M$1=Math.max(r$1,g,b$1),m=Math.min(r$1,g,b$1),res={mode:`hsv`,s:M$1===0?0:1-m/M$1,v:M$1};return M$1-m!==0&&(res.h=(M$1===r$1?(g-b$1)/(M$1-m)+(g1){let s=w+b$1;w/=s,b$1/=s}return convertHsvToRgb({h:h$1,s:b$1===1?1:1-w/(1-b$1),v:1-b$1,alpha:alpha$1})}function convertRgbToHwb(rgba$1){let hsv$1=convertRgbToHsv(rgba$1);if(hsv$1===void 0)return;let s=hsv$1.s===void 0?0:hsv$1.s,v=hsv$1.v===void 0?0:hsv$1.v,res={mode:`hwb`,w:(1-s)*v,b:1-v};return hsv$1.h!==void 0&&(res.h=hsv$1.h),hsv$1.alpha!==void 0&&(res.alpha=hsv$1.alpha),res}function ParseHwb(color$2,parsed){if(!parsed||parsed[0]!==`hwb`)return;let res={mode:`hwb`},[,h$1,w,b$1,alpha$1]=parsed;if(h$1.type!==Tok.None){if(h$1.type===Tok.Percentage)return;res.h=h$1.value}if(w.type!==Tok.None){if(w.type===Tok.Hue)return;res.w=w.value/100}if(b$1.type!==Tok.None){if(b$1.type===Tok.Hue)return;res.b=b$1.value/100}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseHwb_default=ParseHwb;const definition$20={mode:`hwb`,toMode:{rgb:convertHwbToRgb},fromMode:{rgb:convertRgbToHwb},channels:[`h`,`w`,`b`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[parseHwb_default],serialize:c$3=>`hwb(${c$3.h===void 0?`none`:c$3.h} ${c$3.w===void 0?`none`:c$3.w*100+`%`} ${c$3.b===void 0?`none`:c$3.b*100+`%`}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},w:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueNaive},average:{h:averageAngle}};var definition_default$7=definition$20;const YW=203,M1=.1593017578125,M2=78.84375,C1=.8359375,C2=18.8515625,C3=18.6875;function transferPqDecode(v){if(v<0)return 0;let c$3=v**(1/M2);return 1e4*(Math.max(0,c$3-C1)/(C2-C3*c$3))**(1/M1)}function transferPqEncode(v){if(v<0)return 0;let c$3=(v/1e4)**M1;return((C1+C2*c$3)/(1+C3*c$3))**+M2}const toRel=c$3=>Math.max(c$3/YW,0),convertItpToXyz65=({i,t:t$1,p:p$4,alpha:alpha$1})=>{i===void 0&&(i=0),t$1===void 0&&(t$1=0),p$4===void 0&&(p$4=0);let l=transferPqDecode(i+.008609037037932761*t$1+.11102962500302593*p$4),m=transferPqDecode(i-.00860903703793275*t$1-.11102962500302599*p$4),s=transferPqDecode(i+.5600313357106791*t$1-.32062717498731885*p$4),res={mode:`xyz65`,x:toRel(2.070152218389422*l-1.3263473389671556*m+.2066510476294051*s),y:toRel(.3647385209748074*l+.680566024947227*m-.0453045459220346*s),z:toRel(-.049747207535812*l-.0492609666966138*m+1.1880659249923042*s)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertItpToXyz65_default=convertItpToXyz65;const toAbs=(c$3=0)=>Math.max(c$3*YW,0),convertXyz65ToItp=({x:x$1,y,z:z$1,alpha:alpha$1})=>{let absX=toAbs(x$1),absY=toAbs(y),absZ=toAbs(z$1),l=transferPqEncode(.3592832590121217*absX+.6976051147779502*absY-.0358915932320289*absZ),m=transferPqEncode(-.1920808463704995*absX+1.1004767970374323*absY+.0753748658519118*absZ),s=transferPqEncode(.0070797844607477*absX+.0748396662186366*absY+.8433265453898765*absZ),i=.5*l+.5*m,t$1=1.61376953125*l-3.323486328125*m+1.709716796875*s,p$4=4.378173828125*l-4.24560546875*m-.132568359375*s,res={mode:`itp`,i,t:t$1,p:p$4};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToItp_default=convertXyz65ToItp;const definition$19={mode:`itp`,channels:[`i`,`t`,`p`,`alpha`],parse:[`--ictcp`],serialize:`--ictcp`,toMode:{xyz65:convertItpToXyz65_default,rgb:color$2=>convertXyz65ToRgb_default(convertItpToXyz65_default(color$2))},fromMode:{xyz65:convertXyz65ToItp_default,rgb:color$2=>convertXyz65ToItp_default(convertRgbToXyz65_default(color$2))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:interpolatorLinear,t:interpolatorLinear,p:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$8=definition$19;const p$2=134.03437499999998,d0$1=16295499532821565e-27,jabPqEncode=v=>{if(v<0)return 0;let vn$3=(v/1e4)**M1;return((C1+C2*vn$3)/(1+C3*vn$3))**+p$2},abs$1=(v=0)=>Math.max(v*203,0),convertXyz65ToJab=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1=abs$1(x$1),y=abs$1(y),z$1=abs$1(z$1);let xp=1.15*x$1-.15*z$1,yp=.66*y+.34*x$1,l=jabPqEncode(.41478972*xp+.579999*yp+.014648*z$1),m=jabPqEncode(-.20151*xp+1.120649*yp+.0531008*z$1),s=jabPqEncode(-.0166008*xp+.2648*yp+.6684799*z$1),i=(l+m)/2,res={mode:`jab`,j:.44*i/(1-.56*i)-d0$1,a:3.524*l-4.066708*m+.542708*s,b:.199076*l+1.096799*m-1.295875*s};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToJab_default=convertXyz65ToJab;const p$1=134.03437499999998,d0=16295499532821565e-27,jabPqDecode=v=>{if(v<0)return 0;let vp=v**(1/p$1);return 1e4*((C1-vp)/(C3*vp-C2))**(1/M1)},rel=v=>v/203,convertJabToXyz65=({j:j$1,a:a$1,b:b$1,alpha:alpha$1})=>{j$1===void 0&&(j$1=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let i=(j$1+d0)/(.44+.56*(j$1+d0)),l=jabPqDecode(i+.13860504*a$1+.058047316*b$1),m=jabPqDecode(i-.13860504*a$1-.058047316*b$1),s=jabPqDecode(i-.096019242*a$1-.8118919*b$1),res={mode:`xyz65`,x:rel(1.661373024652174*l-.914523081304348*m+.23136208173913045*s),y:rel(-.3250758611844533*l+1.571847026732543*m-.21825383453227928*s),z:rel(-.090982811*l-.31272829*m+1.5227666*s)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertJabToXyz65_default=convertJabToXyz65;const convertRgbToJab=rgb$2=>{let res=convertXyz65ToJab_default(convertRgbToXyz65_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToJab_default=convertRgbToJab;const convertJabToRgb=color$2=>convertXyz65ToRgb_default(convertJabToXyz65_default(color$2));var convertJabToRgb_default=convertJabToRgb;const definition$18={mode:`jab`,channels:[`j`,`a`,`b`,`alpha`],parse:[`--jzazbz`],serialize:`--jzazbz`,fromMode:{rgb:convertRgbToJab_default,xyz65:convertXyz65ToJab_default},toMode:{rgb:convertJabToRgb_default,xyz65:convertJabToXyz65_default},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:interpolatorLinear,a:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$9=definition$18;const convertJabToJch=({j:j$1,a:a$1,b:b$1,alpha:alpha$1})=>{a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let c$3=Math.sqrt(a$1*a$1+b$1*b$1),res={mode:`jch`,j:j$1,c:c$3};return c$3&&(res.h=normalizeHue_default(Math.atan2(b$1,a$1)*180/Math.PI)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertJabToJch_default=convertJabToJch;const convertJchToJab=({j:j$1,c:c$3,h:h$1,alpha:alpha$1})=>{h$1===void 0&&(h$1=0);let res={mode:`jab`,j:j$1,a:c$3?c$3*Math.cos(h$1/180*Math.PI):0,b:c$3?c$3*Math.sin(h$1/180*Math.PI):0};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertJchToJab_default=convertJchToJab;const definition$17={mode:`jch`,parse:[`--jzczhz`],serialize:`--jzczhz`,toMode:{jab:convertJchToJab_default,rgb:c$3=>convertJabToRgb_default(convertJchToJab_default(c$3))},fromMode:{rgb:c$3=>convertJabToJch_default(convertRgbToJab_default(c$3)),jab:convertJabToJch_default},channels:[`j`,`c`,`h`,`alpha`],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},c:interpolatorLinear,j:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$10=definition$17;const k=29**3/3**3,e$1=6**3/29**3;let fn=v=>v**3>e$1?v**3:(116*v-16)/k;const convertLabToXyz50=({l,a:a$1,b:b$1,alpha:alpha$1})=>{l===void 0&&(l=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let fy=(l+16)/116,fx=a$1/500+fy,fz=fy-b$1/200,res={mode:`xyz50`,x:fn(fx)*D50.X,y:fn(fy)*D50.Y,z:fn(fz)*D50.Z};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLabToXyz50_default=convertLabToXyz50;const convertXyz50ToRgb=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res=convertLrgbToRgb_default({r:x$1*3.1341359569958707-y*1.6173863321612538-.4906619460083532*z$1,g:x$1*-.978795502912089+y*1.916254567259524+.03344273116131949*z$1,b:x$1*.07195537988411677-y*.2289768264158322+1.405386058324125*z$1});return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToRgb_default=convertXyz50ToRgb;const convertLabToRgb=lab$1=>convertXyz50ToRgb_default(convertLabToXyz50_default(lab$1));var convertLabToRgb_default=convertLabToRgb;const convertRgbToXyz50=rgb$2=>{let{r:r$1,g,b:b$1,alpha:alpha$1}=convertRgbToLrgb_default(rgb$2),res={mode:`xyz50`,x:.436065742824811*r$1+.3851514688337912*g+.14307845442264197*b$1,y:.22249319175623702*r$1+.7168870538238823*g+.06061979053616537*b$1,z:.013923904500943465*r$1+.09708128566574634*g+.7140993584005155*b$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToXyz50_default=convertRgbToXyz50;const f=value$1=>value$1>e$1?Math.cbrt(value$1):(k*value$1+16)/116,convertXyz50ToLab=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let f0=f(x$1/D50.X),f1=f(y/D50.Y),f2=f(z$1/D50.Z),res={mode:`lab`,l:116*f1-16,a:500*(f0-f1),b:200*(f1-f2)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToLab_default=convertXyz50ToLab;const convertRgbToLab=rgb$2=>{let res=convertXyz50ToLab_default(convertRgbToXyz50_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToLab_default=convertRgbToLab;function parseLab(color$2,parsed){if(!parsed||parsed[0]!==`lab`)return;let res={mode:`lab`},[,l,a$1,b$1,alpha$1]=parsed;if(!(l.type===Tok.Hue||a$1.type===Tok.Hue||b$1.type===Tok.Hue))return l.type!==Tok.None&&(res.l=Math.min(Math.max(0,l.value),100)),a$1.type!==Tok.None&&(res.a=a$1.type===Tok.Number?a$1.value:a$1.value*125/100),b$1.type!==Tok.None&&(res.b=b$1.type===Tok.Number?b$1.value:b$1.value*125/100),alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseLab_default=parseLab;const definition$16={mode:`lab`,toMode:{xyz50:convertLabToXyz50_default,rgb:convertLabToRgb_default},fromMode:{xyz50:convertXyz50ToLab_default,rgb:convertRgbToLab_default},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[parseLab_default],serialize:c$3=>`lab(${c$3.l===void 0?`none`:c$3.l} ${c$3.a===void 0?`none`:c$3.a} ${c$3.b===void 0?`none`:c$3.b}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,interpolate:{l:interpolatorLinear,a:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$11=definition$16;const definition$15={...definition_default$11,mode:`lab65`,parse:[`--lab-d65`],serialize:`--lab-d65`,toMode:{xyz65:convertLab65ToXyz65_default,rgb:convertLab65ToRgb_default},fromMode:{xyz65:convertXyz65ToLab65_default,rgb:convertRgbToLab65_default},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}};var definition_default$12=definition$15;function parseLch(color$2,parsed){if(!parsed||parsed[0]!==`lch`)return;let res={mode:`lch`},[,l,c$3,h$1,alpha$1]=parsed;if(l.type!==Tok.None){if(l.type===Tok.Hue)return;res.l=Math.min(Math.max(0,l.value),100)}if(c$3.type!==Tok.None&&(res.c=Math.max(0,c$3.type===Tok.Number?c$3.value:c$3.value*150/100)),h$1.type!==Tok.None){if(h$1.type===Tok.Percentage)return;res.h=h$1.value}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseLch_default=parseLch;const definition$14={mode:`lch`,toMode:{lab:convertLchToLab_default,rgb:c$3=>convertLabToRgb_default(convertLchToLab_default(c$3))},fromMode:{rgb:c$3=>convertLabToLch_default(convertRgbToLab_default(c$3)),lab:convertLabToLch_default},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[parseLch_default],serialize:c$3=>`lch(${c$3.l===void 0?`none`:c$3.l} ${c$3.c===void 0?`none`:c$3.c} ${c$3.h===void 0?`none`:c$3.h}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},c:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$13=definition$14;const definition$13={...definition_default$13,mode:`lch65`,parse:[`--lch-d65`],serialize:`--lch-d65`,toMode:{lab65:c$3=>convertLchToLab_default(c$3,`lab65`),rgb:c$3=>convertLab65ToRgb_default(convertLchToLab_default(c$3,`lab65`))},fromMode:{rgb:c$3=>convertLabToLch_default(convertRgbToLab65_default(c$3),`lch65`),lab65:c$3=>convertLabToLch_default(c$3,`lch65`)},ranges:{l:[0,100],c:[0,150],h:[0,360]}};var definition_default$14=definition$13;const convertLuvToLchuv=({l,u,v,alpha:alpha$1})=>{u===void 0&&(u=0),v===void 0&&(v=0);let c$3=Math.sqrt(u*u+v*v),res={mode:`lchuv`,l,c:c$3};return c$3&&(res.h=normalizeHue_default(Math.atan2(v,u)*180/Math.PI)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLuvToLchuv_default=convertLuvToLchuv;const convertLchuvToLuv=({l,c:c$3,h:h$1,alpha:alpha$1})=>{h$1===void 0&&(h$1=0);let res={mode:`luv`,l,u:c$3?c$3*Math.cos(h$1/180*Math.PI):0,v:c$3?c$3*Math.sin(h$1/180*Math.PI):0};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLchuvToLuv_default=convertLchuvToLuv;const u_fn$1=(x$1,y,z$1)=>4*x$1/(x$1+15*y+3*z$1),v_fn$1=(x$1,y,z$1)=>9*y/(x$1+15*y+3*z$1),un$1=u_fn$1(D50.X,D50.Y,D50.Z),vn$1=v_fn$1(D50.X,D50.Y,D50.Z),l_fn=value$1=>value$1<=e$1?k*value$1:116*Math.cbrt(value$1)-16,convertXyz50ToLuv=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let l=l_fn(y/D50.Y),u=u_fn$1(x$1,y,z$1),v=v_fn$1(x$1,y,z$1);!isFinite(u)||!isFinite(v)?l=u=v=0:(u=13*l*(u-un$1),v=13*l*(v-vn$1));let res={mode:`luv`,l,u,v};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToLuv_default=convertXyz50ToLuv;const u_fn=(x$1,y,z$1)=>4*x$1/(x$1+15*y+3*z$1),v_fn=(x$1,y,z$1)=>9*y/(x$1+15*y+3*z$1),un=u_fn(D50.X,D50.Y,D50.Z),vn=v_fn(D50.X,D50.Y,D50.Z),convertLuvToXyz50=({l,u,v,alpha:alpha$1})=>{if(l===void 0&&(l=0),l===0)return{mode:`xyz50`,x:0,y:0,z:0};u===void 0&&(u=0),v===void 0&&(v=0);let up=u/(13*l)+un,vp=v/(13*l)+vn,y=D50.Y*(l<=8?l/k:((l+16)/116)**3),x$1=y*(9*up)/(4*vp),z$1=y*(12-3*up-20*vp)/(4*vp),res={mode:`xyz50`,x:x$1,y,z:z$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLuvToXyz50_default=convertLuvToXyz50;const convertRgbToLchuv=rgb$2=>convertLuvToLchuv_default(convertXyz50ToLuv_default(convertRgbToXyz50_default(rgb$2))),convertLchuvToRgb=lchuv$1=>convertXyz50ToRgb_default(convertLuvToXyz50_default(convertLchuvToLuv_default(lchuv$1))),definition$12={mode:`lchuv`,toMode:{luv:convertLchuvToLuv_default,rgb:convertLchuvToRgb},fromMode:{rgb:convertRgbToLchuv,luv:convertLuvToLchuv_default},channels:[`l`,`c`,`h`,`alpha`],parse:[`--lchuv`],serialize:`--lchuv`,ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},c:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$15=definition$12;const definition$11={...definition_default$23,mode:`lrgb`,toMode:{rgb:convertLrgbToRgb_default},fromMode:{rgb:convertRgbToLrgb_default},parse:[`srgb-linear`],serialize:`srgb-linear`};var definition_default$16=definition$11;const definition$10={mode:`luv`,toMode:{xyz50:convertLuvToXyz50_default,rgb:luv$1=>convertXyz50ToRgb_default(convertLuvToXyz50_default(luv$1))},fromMode:{xyz50:convertXyz50ToLuv_default,rgb:rgb$2=>convertXyz50ToLuv_default(convertRgbToXyz50_default(rgb$2))},channels:[`l`,`u`,`v`,`alpha`],parse:[`--luv`],serialize:`--luv`,ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:interpolatorLinear,u:interpolatorLinear,v:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$17=definition$10;const convertLrgbToOklab=({r:r$1,g,b:b$1,alpha:alpha$1})=>{r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let L=Math.cbrt(.412221469470763*r$1+.5363325372617348*g+.0514459932675022*b$1),M$1=Math.cbrt(.2119034958178252*r$1+.6806995506452344*g+.1073969535369406*b$1),S=Math.cbrt(.0883024591900564*r$1+.2817188391361215*g+.6299787016738222*b$1),res={mode:`oklab`,l:.210454268309314*L+.7936177747023054*M$1-.0040720430116193*S,a:1.9779985324311684*L-2.42859224204858*M$1+.450593709617411*S,b:.0259040424655478*L+.7827717124575296*M$1-.8086757549230774*S};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLrgbToOklab_default=convertLrgbToOklab;const convertRgbToOklab=rgb$2=>{let res=convertLrgbToOklab_default(convertRgbToLrgb_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToOklab_default=convertRgbToOklab;const convertOklabToLrgb=({l,a:a$1,b:b$1,alpha:alpha$1})=>{l===void 0&&(l=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let L=(l+.3963377773761749*a$1+.2158037573099136*b$1)**3,M$1=(l-.1055613458156586*a$1-.0638541728258133*b$1)**3,S=(l-.0894841775298119*a$1-1.2914855480194092*b$1)**3,res={mode:`lrgb`,r:4.076741636075957*L-3.3077115392580616*M$1+.2309699031821044*S,g:-1.2684379732850317*L+2.6097573492876887*M$1-.3413193760026573*S,b:-.0041960761386756*L-.7034186179359362*M$1+1.7076146940746117*S};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertOklabToLrgb_default=convertOklabToLrgb;const convertOklabToRgb=c$3=>convertLrgbToRgb_default(convertOklabToLrgb_default(c$3));var convertOklabToRgb_default=convertOklabToRgb;function toe(x$1){let k_1=.206,k_2=.03,k_3=(1+k_1)/(1+k_2);return .5*(k_3*x$1-k_1+Math.sqrt((k_3*x$1-k_1)*(k_3*x$1-k_1)+4*k_2*k_3*x$1))}function toe_inv(x$1){let k_1=.206,k_2=.03,k_3=(1+k_1)/(1+k_2);return(x$1*x$1+k_1*x$1)/(k_3*(x$1+k_2))}function compute_max_saturation(a$1,b$1){let k0,k1,k2,k3,k4,wl,wm,ws;-1.88170328*a$1-.80936493*b$1>1?(k0=1.19086277,k1=1.76576728,k2=.59662641,k3=.75515197,k4=.56771245,wl=4.0767416621,wm=-3.3077115913,ws=.2309699292):1.81444104*a$1-1.19445276*b$1>1?(k0=.73956515,k1=-.45954404,k2=.08285427,k3=.1254107,k4=.14503204,wl=-1.2684380046,wm=2.6097574011,ws=-.3413193965):(k0=1.35733652,k1=-.00915799,k2=-1.1513021,k3=-.50559606,k4=.00692167,wl=-.0041960863,wm=-.7034186147,ws=1.707614701);let S=k0+k1*a$1+k2*b$1+k3*a$1*a$1+k4*a$1*b$1,k_l=.3963377774*a$1+.2158037573*b$1,k_m=-.1055613458*a$1-.0638541728*b$1,k_s=-.0894841775*a$1-1.291485548*b$1;{let l_=1+S*k_l,m_=1+S*k_m,s_=1+S*k_s,l=l_*l_*l_,m=m_*m_*m_,s=s_*s_*s_,l_dS=3*k_l*l_*l_,m_dS=3*k_m*m_*m_,s_dS=3*k_s*s_*s_,l_dS2=6*k_l*k_l*l_,m_dS2=6*k_m*k_m*m_,s_dS2=6*k_s*k_s*s_,f$2=wl*l+wm*m+ws*s,f1=wl*l_dS+wm*m_dS+ws*s_dS,f2=wl*l_dS2+wm*m_dS2+ws*s_dS2;S-=f$2*f1/(f1*f1-.5*f$2*f2)}return S}function find_cusp(a$1,b$1){let S_cusp=compute_max_saturation(a$1,b$1),rgb$2=convertOklabToLrgb_default({l:1,a:S_cusp*a$1,b:S_cusp*b$1}),L_cusp=Math.cbrt(1/Math.max(rgb$2.r,rgb$2.g,rgb$2.b)),C_cusp=L_cusp*S_cusp;return[L_cusp,C_cusp]}function find_gamut_intersection(a$1,b$1,L1,C1$1,L0,cusp=null){cusp||=find_cusp(a$1,b$1);let t$1;if((L1-L0)*cusp[1]-(cusp[0]-L0)*C1$1<=0)t$1=cusp[1]*L0/(C1$1*cusp[0]+cusp[1]*(L0-L1));else{t$1=cusp[1]*(L0-1)/(C1$1*(cusp[0]-1)+cusp[1]*(L0-L1));{let dL=L1-L0,dC=C1$1,k_l=.3963377774*a$1+.2158037573*b$1,k_m=-.1055613458*a$1-.0638541728*b$1,k_s=-.0894841775*a$1-1.291485548*b$1,l_dt=dL+dC*k_l,m_dt=dL+dC*k_m,s_dt=dL+dC*k_s;{let L=L0*(1-t$1)+t$1*L1,C$1=t$1*C1$1,l_=L+C$1*k_l,m_=L+C$1*k_m,s_=L+C$1*k_s,l=l_*l_*l_,m=m_*m_*m_,s=s_*s_*s_,ldt=3*l_dt*l_*l_,mdt=3*m_dt*m_*m_,sdt=3*s_dt*s_*s_,ldt2=6*l_dt*l_dt*l_,mdt2=6*m_dt*m_dt*m_,sdt2=6*s_dt*s_dt*s_,r$1=4.0767416621*l-3.3077115913*m+.2309699292*s-1,r1=4.0767416621*ldt-3.3077115913*mdt+.2309699292*sdt,r2=4.0767416621*ldt2-3.3077115913*mdt2+.2309699292*sdt2,u_r=r1/(r1*r1-.5*r$1*r2),t_r=-r$1*u_r,g=-1.2684380046*l+2.6097574011*m-.3413193965*s-1,g1=-1.2684380046*ldt+2.6097574011*mdt-.3413193965*sdt,g2=-1.2684380046*ldt2+2.6097574011*mdt2-.3413193965*sdt2,u_g=g1/(g1*g1-.5*g*g2),t_g=-g*u_g,b$2=-.0041960863*l-.7034186147*m+1.707614701*s-1,b1=-.0041960863*ldt-.7034186147*mdt+1.707614701*sdt,b2=-.0041960863*ldt2-.7034186147*mdt2+1.707614701*sdt2,u_b=b1/(b1*b1-.5*b$2*b2),t_b=-b$2*u_b;t_r=u_r>=0?t_r:1e6,t_g=u_g>=0?t_g:1e6,t_b=u_b>=0?t_b:1e6,t$1+=Math.min(t_r,Math.min(t_g,t_b))}}}return t$1}function get_ST_max(a_,b_,cusp=null){cusp||=find_cusp(a_,b_);let L=cusp[0],C$1=cusp[1];return[C$1/L,C$1/(1-L)]}function get_Cs(L,a_,b_){let cusp=find_cusp(a_,b_),C_max=find_gamut_intersection(a_,b_,L,1,L,cusp),ST_max=get_ST_max(a_,b_,cusp),S_mid=.11516993+1/(7.4477897+4.1590124*b_+a_*(-2.19557347+1.75198401*b_+a_*(-2.13704948-10.02301043*b_+a_*(-4.24894561+5.38770819*b_+4.69891013*a_)))),T_mid=.11239642+1/(1.6132032-.68124379*b_+a_*(.40370612+.90148123*b_+a_*(-.27087943+.6122399*b_+a_*(.00299215-.45399568*b_-.14661872*a_)))),k$3=C_max/Math.min(L*ST_max[0],(1-L)*ST_max[1]),C_a=L*S_mid,C_b=(1-L)*T_mid,C_mid=.9*k$3*Math.sqrt(Math.sqrt(1/(1/(C_a*C_a*C_a*C_a)+1/(C_b*C_b*C_b*C_b))));C_a=L*.4,C_b=(1-L)*.8;let C_0=Math.sqrt(1/(1/(C_a*C_a)+1/(C_b*C_b)));return[C_0,C_mid,C_max]}function convertOklabToOkhsl(lab$1){let l=lab$1.l===void 0?0:lab$1.l,a$1=lab$1.a===void 0?0:lab$1.a,b$1=lab$1.b===void 0?0:lab$1.b,ret={mode:`okhsl`,l:toe(l)};lab$1.alpha!==void 0&&(ret.alpha=lab$1.alpha);let c$3=Math.sqrt(a$1*a$1+b$1*b$1);if(!c$3)return ret.s=0,ret;let[C_0,C_mid,C_max]=get_Cs(l,a$1/c$3,b$1/c$3),s;if(c$3convertOklabToOkhsl(convertRgbToOklab_default(c$3))},toMode:{oklab:convertOkhslToOklab,rgb:c$3=>convertOklabToRgb_default(convertOkhslToOklab(c$3))}};var modeOkhsl_default=modeOkhsl;function convertOklabToOkhsv(lab$1){let l=lab$1.l===void 0?0:lab$1.l,a$1=lab$1.a===void 0?0:lab$1.a,b$1=lab$1.b===void 0?0:lab$1.b,c$3=Math.sqrt(a$1*a$1+b$1*b$1),a_=c$3?a$1/c$3:1,b_=c$3?b$1/c$3:1,[S_max,T]=get_ST_max(a_,b_),S_0=.5,k$3=1-S_0/S_max,t$1=T/(c$3+l*T),L_v=t$1*l,C_v=t$1*c$3,L_vt=toe_inv(L_v),C_vt=C_v*L_vt/L_v,rgb_scale=convertOklabToLrgb_default({l:L_vt,a:a_*C_vt,b:b_*C_vt}),scale_L=Math.cbrt(1/Math.max(rgb_scale.r,rgb_scale.g,rgb_scale.b,0));l/=scale_L,c$3=c$3/scale_L*toe(l)/l,l=toe(l);let ret={mode:`okhsv`,s:c$3?(S_0+T)*C_v/(T*S_0+T*k$3*C_v):0,v:l?l/L_v:0};return ret.s&&(ret.h=normalizeHue_default(Math.atan2(b$1,a$1)*180/Math.PI)),lab$1.alpha!==void 0&&(ret.alpha=lab$1.alpha),ret}function convertOkhsvToOklab(hsv$1){let ret={mode:`oklab`};hsv$1.alpha!==void 0&&(ret.alpha=hsv$1.alpha);let h$1=hsv$1.h===void 0?0:hsv$1.h,s=hsv$1.s===void 0?0:hsv$1.s,v=hsv$1.v===void 0?0:hsv$1.v,a_=Math.cos(h$1/180*Math.PI),b_=Math.sin(h$1/180*Math.PI),[S_max,T]=get_ST_max(a_,b_),S_0=.5,k$3=1-S_0/S_max,L_v=1-s*S_0/(S_0+T-T*k$3*s),C_v=s*T*S_0/(S_0+T-T*k$3*s),L_vt=toe_inv(L_v),C_vt=C_v*L_vt/L_v,rgb_scale=convertOklabToLrgb_default({l:L_vt,a:a_*C_vt,b:b_*C_vt}),scale_L=Math.cbrt(1/Math.max(rgb_scale.r,rgb_scale.g,rgb_scale.b,0)),L_new=toe_inv(v*L_v),C$1=C_v*L_new/L_v;return ret.l=L_new*scale_L,ret.a=C$1*a_*scale_L,ret.b=C$1*b_*scale_L,ret}const modeOkhsv={...definition_default$6,mode:`okhsv`,channels:[`h`,`s`,`v`,`alpha`],parse:[`--okhsv`],serialize:`--okhsv`,fromMode:{oklab:convertOklabToOkhsv,rgb:c$3=>convertOklabToOkhsv(convertRgbToOklab_default(c$3))},toMode:{oklab:convertOkhsvToOklab,rgb:c$3=>convertOklabToRgb_default(convertOkhsvToOklab(c$3))}};var modeOkhsv_default=modeOkhsv;function parseOklab(color$2,parsed){if(!parsed||parsed[0]!==`oklab`)return;let res={mode:`oklab`},[,l,a$1,b$1,alpha$1]=parsed;if(!(l.type===Tok.Hue||a$1.type===Tok.Hue||b$1.type===Tok.Hue))return l.type!==Tok.None&&(res.l=Math.min(Math.max(0,l.type===Tok.Number?l.value:l.value/100),1)),a$1.type!==Tok.None&&(res.a=a$1.type===Tok.Number?a$1.value:a$1.value*.4/100),b$1.type!==Tok.None&&(res.b=b$1.type===Tok.Number?b$1.value:b$1.value*.4/100),alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseOklab_default=parseOklab;const definition$9={...definition_default$11,mode:`oklab`,toMode:{lrgb:convertOklabToLrgb_default,rgb:convertOklabToRgb_default},fromMode:{lrgb:convertLrgbToOklab_default,rgb:convertRgbToOklab_default},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[parseOklab_default],serialize:c$3=>`oklab(${c$3.l===void 0?`none`:c$3.l} ${c$3.a===void 0?`none`:c$3.a} ${c$3.b===void 0?`none`:c$3.b}${c$3.alpha<1?` / ${c$3.alpha}`:``})`};var definition_default$18=definition$9;function parseOklch(color$2,parsed){if(!parsed||parsed[0]!==`oklch`)return;let res={mode:`oklch`},[,l,c$3,h$1,alpha$1]=parsed;if(l.type!==Tok.None){if(l.type===Tok.Hue)return;res.l=Math.min(Math.max(0,l.type===Tok.Number?l.value:l.value/100),1)}if(c$3.type!==Tok.None&&(res.c=Math.max(0,c$3.type===Tok.Number?c$3.value:c$3.value*.4/100)),h$1.type!==Tok.None){if(h$1.type===Tok.Percentage)return;res.h=h$1.value}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseOklch_default=parseOklch;const definition$8={...definition_default$13,mode:`oklch`,toMode:{oklab:c$3=>convertLchToLab_default(c$3,`oklab`),rgb:c$3=>convertOklabToRgb_default(convertLchToLab_default(c$3,`oklab`))},fromMode:{rgb:c$3=>convertLabToLch_default(convertRgbToOklab_default(c$3),`oklch`),oklab:c$3=>convertLabToLch_default(c$3,`oklch`)},parse:[parseOklch_default],serialize:c$3=>`oklch(${c$3.l===void 0?`none`:c$3.l} ${c$3.c===void 0?`none`:c$3.c} ${c$3.h===void 0?`none`:c$3.h}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}};var definition_default$19=definition$8;const convertP3ToXyz65=rgb$2=>{let{r:r$1,g,b:b$1,alpha:alpha$1}=convertRgbToLrgb_default(rgb$2),res={mode:`xyz65`,x:.486570948648216*r$1+.265667693169093*g+.1982172852343625*b$1,y:.2289745640697487*r$1+.6917385218365062*g+.079286914093745*b$1,z:0*r$1+.0451133818589026*g+1.043944368900976*b$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertP3ToXyz65_default=convertP3ToXyz65;const convertXyz65ToP3=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res=convertLrgbToRgb_default({r:x$1*2.4934969119414263-y*.9313836179191242-.402710784450717*z$1,g:x$1*-.8294889695615749+y*1.7626640603183465+.0236246858419436*z$1,b:x$1*.0358458302437845-y*.0761723892680418+.9568845240076871*z$1},`p3`);return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToP3_default=convertXyz65ToP3;const definition$7={...definition_default$23,mode:`p3`,parse:[`display-p3`],serialize:`display-p3`,fromMode:{rgb:color$2=>convertXyz65ToP3_default(convertRgbToXyz65_default(color$2)),xyz65:convertXyz65ToP3_default},toMode:{rgb:color$2=>convertXyz65ToRgb_default(convertP3ToXyz65_default(color$2)),xyz65:convertP3ToXyz65_default}};var definition_default$20=definition$7;const gamma$1=v=>{let abs$2=Math.abs(v);return abs$2>=1/512?Math.sign(v)*abs$2**(1/1.8):16*v},convertXyz50ToProphoto=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`prophoto`,r:gamma$1(x$1*1.3457868816471585-y*.2555720873797946-.0511018649755453*z$1),g:gamma$1(x$1*-.5446307051249019+y*1.5082477428451466+.0205274474364214*z$1),b:gamma$1(x$1*0+y*0+1.2119675456389452*z$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToProphoto_default=convertXyz50ToProphoto;const linearize$1=(v=0)=>{let abs$2=Math.abs(v);return abs$2>=16/512?Math.sign(v)*abs$2**1.8:v/16},convertProphotoToXyz50=prophoto$1=>{let r$1=linearize$1(prophoto$1.r),g=linearize$1(prophoto$1.g),b$1=linearize$1(prophoto$1.b),res={mode:`xyz50`,x:.7977666449006423*r$1+.1351812974005331*g+.0313477341283922*b$1,y:.2880748288194013*r$1+.7118352342418731*g+899369387256e-16*b$1,z:0*r$1+0*g+.8251046025104602*b$1};return prophoto$1.alpha!==void 0&&(res.alpha=prophoto$1.alpha),res};var convertProphotoToXyz50_default=convertProphotoToXyz50;const definition$6={...definition_default$23,mode:`prophoto`,parse:[`prophoto-rgb`],serialize:`prophoto-rgb`,fromMode:{xyz50:convertXyz50ToProphoto_default,rgb:color$2=>convertXyz50ToProphoto_default(convertRgbToXyz50_default(color$2))},toMode:{xyz50:convertProphotoToXyz50_default,rgb:color$2=>convertXyz50ToRgb_default(convertProphotoToXyz50_default(color$2))}};var definition_default$21=definition$6;const α$1=1.09929682680944,β$1=.018053968510807,gamma=v=>{let abs$2=Math.abs(v);return abs$2>β$1?(Math.sign(v)||1)*(α$1*abs$2**.45-(α$1-1)):4.5*v},convertXyz65ToRec2020=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`rec2020`,r:gamma(x$1*1.7166511879712683-y*.3556707837763925-.2533662813736599*z$1),g:gamma(x$1*-.6666843518324893+y*1.6164812366349395+.0157685458139111*z$1),b:gamma(x$1*.0176398574453108-y*.0427706132578085+.9421031212354739*z$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToRec2020_default=convertXyz65ToRec2020;const α=1.09929682680944,β=.018053968510807,linearize=(v=0)=>{let abs$2=Math.abs(v);return abs$2<β*4.5?v/4.5:(Math.sign(v)||1)*((abs$2+α-1)/α)**(1/.45)},convertRec2020ToXyz65=rec2020$1=>{let r$1=linearize(rec2020$1.r),g=linearize(rec2020$1.g),b$1=linearize(rec2020$1.b),res={mode:`xyz65`,x:.6369580483012911*r$1+.1446169035862083*g+.1688809751641721*b$1,y:.262700212011267*r$1+.6779980715188708*g+.059301716469862*b$1,z:0*r$1+.0280726930490874*g+1.0609850577107909*b$1};return rec2020$1.alpha!==void 0&&(res.alpha=rec2020$1.alpha),res};var convertRec2020ToXyz65_default=convertRec2020ToXyz65;const definition$5={...definition_default$23,mode:`rec2020`,fromMode:{xyz65:convertXyz65ToRec2020_default,rgb:color$2=>convertXyz65ToRec2020_default(convertRgbToXyz65_default(color$2))},toMode:{xyz65:convertRec2020ToXyz65_default,rgb:color$2=>convertXyz65ToRgb_default(convertRec2020ToXyz65_default(color$2))},parse:[`rec2020`],serialize:`rec2020`};var definition_default$22=definition$5;const bias=.0037930732552754493,bias_cbrt=Math.cbrt(bias),transfer$1=v=>Math.cbrt(v)-bias_cbrt,convertRgbToXyb=color$2=>{let{r:r$1,g,b:b$1,alpha:alpha$1}=convertRgbToLrgb_default(color$2),l=transfer$1(.3*r$1+.622*g+.078*b$1+bias),m=transfer$1(.23*r$1+.692*g+.078*b$1+bias),s=transfer$1(.2434226892454782*r$1+.2047674442449682*g+.5518098665095535*b$1+bias),res={mode:`xyb`,x:(l-m)/2,y:(l+m)/2,b:s-(l+m)/2};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToXyb_default=convertRgbToXyb;const transfer=v=>(v+bias_cbrt)**3,convertXybToRgb=({x:x$1,y,b:b$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),b$1===void 0&&(b$1=0);let l=transfer(x$1+y)-bias,m=transfer(y-x$1)-bias,s=transfer(b$1+y)-bias,res=convertLrgbToRgb_default({r:11.031566904639861*l-9.866943908131562*m-.16462299650829934*s,g:-3.2541473810744237*l+4.418770377582723*m-.16462299650829934*s,b:-3.6588512867136815*l+2.7129230459360922*m+1.9459282407775895*s});return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXybToRgb_default=convertXybToRgb;const definition$4={mode:`xyb`,channels:[`x`,`y`,`b`,`alpha`],parse:[`--xyb`],serialize:`--xyb`,toMode:{rgb:convertXybToRgb_default},fromMode:{rgb:convertRgbToXyb_default},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:interpolatorLinear,y:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$24=definition$4;const definition$3={mode:`xyz50`,parse:[`xyz-d50`],serialize:`xyz-d50`,toMode:{rgb:convertXyz50ToRgb_default,lab:convertXyz50ToLab_default},fromMode:{rgb:convertRgbToXyz50_default,lab:convertLabToXyz50_default},channels:[`x`,`y`,`z`,`alpha`],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:interpolatorLinear,y:interpolatorLinear,z:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$25=definition$3;const convertXyz65ToXyz50=xyz65$1=>{let{x:x$1,y,z:z$1,alpha:alpha$1}=xyz65$1;x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`xyz50`,x:1.0479298208405488*x$1+.0229467933410191*y-.0501922295431356*z$1,y:.0296278156881593*x$1+.990434484573249*y-.0170738250293851*z$1,z:-.0092430581525912*x$1+.0150551448965779*y+.7518742899580008*z$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToXyz50_default=convertXyz65ToXyz50;const convertXyz50ToXyz65=xyz50$1=>{let{x:x$1,y,z:z$1,alpha:alpha$1}=xyz50$1;x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`xyz65`,x:.9554734527042182*x$1-.0230985368742614*y+.0632593086610217*z$1,y:-.0283697069632081*x$1+1.0099954580058226*y+.021041398966943*z$1,z:.0123140016883199*x$1-.0205076964334779*y+1.3303659366080753*z$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToXyz65_default=convertXyz50ToXyz65;const definition$2={mode:`xyz65`,toMode:{rgb:convertXyz65ToRgb_default,xyz50:convertXyz65ToXyz50_default},fromMode:{rgb:convertRgbToXyz65_default,xyz50:convertXyz50ToXyz65_default},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:[`x`,`y`,`z`,`alpha`],parse:[`xyz`,`xyz-d65`],serialize:`xyz-d65`,interpolate:{x:interpolatorLinear,y:interpolatorLinear,z:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$26=definition$2;const convertRgbToYiq=({r:r$1,g,b:b$1,alpha:alpha$1})=>{r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let res={mode:`yiq`,y:.29889531*r$1+.58662247*g+.11448223*b$1,i:.59597799*r$1-.2741761*g-.32180189*b$1,q:.21147017*r$1-.52261711*g+.31114694*b$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToYiq_default=convertRgbToYiq;const convertYiqToRgb=({y,i,q,alpha:alpha$1})=>{y===void 0&&(y=0),i===void 0&&(i=0),q===void 0&&(q=0);let res={mode:`rgb`,r:y+.95608445*i+.6208885*q,g:y-.27137664*i-.6486059*q,b:y-1.10561724*i+1.70250126*q};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertYiqToRgb_default=convertYiqToRgb;const definition$1={mode:`yiq`,toMode:{rgb:convertYiqToRgb_default},fromMode:{rgb:convertRgbToYiq_default},channels:[`y`,`i`,`q`,`alpha`],parse:[`--yiq`],serialize:`--yiq`,ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:interpolatorLinear,i:interpolatorLinear,q:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$27=definition$1;const r=(value$1,precision)=>Math.round(value$1*(precision=10**precision))/precision,round$1=(precision=4)=>value$1=>typeof value$1==`number`?r(value$1,precision):value$1;var round_default=round$1;let twoDecimals=round_default(2);const clamp$1=value$1=>Math.max(0,Math.min(1,value$1||0)),fixup=value$1=>Math.round(clamp$1(value$1)*255),rgb$1=converter_default(`rgb`),hsl$1=converter_default(`hsl`),serializeHex=color$2=>{if(color$2===void 0)return;let r$1=fixup(color$2.r),g=fixup(color$2.g),b$1=fixup(color$2.b);return`#`+(1<<24|r$1<<16|g<<8|b$1).toString(16).slice(1)},formatCss=c$3=>{let color$2=_prepare_default(c$3);if(!color$2)return;let def$1=getMode(color$2.mode);if(!def$1.serialize||typeof def$1.serialize==`string`){let res=`color(${def$1.serialize||`--${color$2.mode}`} `;return def$1.channels.forEach((ch,i)=>{ch!==`alpha`&&(res+=(i?` `:``)+(color$2[ch]===void 0?`none`:color$2[ch]))}),color$2.alpha!==void 0&&color$2.alpha<1&&(res+=` / ${color$2.alpha}`),res+`)`}if(typeof def$1.serialize==`function`)return def$1.serialize(color$2)},formatHex=c$3=>serializeHex(rgb$1(c$3)),a98=useMode(definition_default),cubehelix=useMode(definition_default$1),dlab=useMode(definition_default$2),dlch=useMode(definition_default$3),hsi=useMode(definition_default$4),hsl=useMode(definition_default$5),hsv=useMode(definition_default$6),hwb=useMode(definition_default$7),itp=useMode(definition_default$8),jab=useMode(definition_default$9),jch=useMode(definition_default$10),lab=useMode(definition_default$11),lab65=useMode(definition_default$12),lch=useMode(definition_default$13),lch65=useMode(definition_default$14),lchuv=useMode(definition_default$15),lrgb=useMode(definition_default$16),luv=useMode(definition_default$17),okhsl=useMode(modeOkhsl_default),okhsv=useMode(modeOkhsv_default),oklab=useMode(definition_default$18),oklch=useMode(definition_default$19),p3=useMode(definition_default$20),prophoto=useMode(definition_default$21),rec2020=useMode(definition_default$22),rgb=useMode(definition_default$23),xyb=useMode(definition_default$24),xyz50=useMode(definition_default$25),xyz65=useMode(definition_default$26),yiq=useMode(definition_default$27);function colorToChromaticColor(color$2){return{color:color$2,withAlpha:alpha$1=>{let rgba$1=oklch(color$2);if(!rgba$1)throw Error(`Invalid color provided for alpha adjustment`);return colorToChromaticColor(oklch({mode:`oklch`,l:rgba$1.l,c:rgba$1.c,h:rgba$1.h,alpha:alpha$1}))},toHex:()=>formatHex(color$2),toCSS:()=>formatCss(color$2)}}function chromaticPaletteFrom(baseHue=200,baseChroma){let chroma=baseChroma??.18+Math.cos(baseHue*Math.PI/180)*.04,shadeConfig={50:{lightness:.95,chromaMultiplier:.3,mixWithWhite:.7},100:{lightness:.95,chromaMultiplier:.5,mixWithWhite:.2},200:{lightness:.9,chromaMultiplier:.6},300:{lightness:.85,chromaMultiplier:.75},400:{lightness:.74,chromaMultiplier:.85},500:{lightness:.62,chromaMultiplier:1},600:{lightness:.54,chromaMultiplier:1.15},700:{lightness:.49,chromaMultiplier:1.1},800:{lightness:.42,chromaMultiplier:.85},900:{lightness:.37,chromaMultiplier:.7},950:{lightness:.29,chromaMultiplier:.5}},shadeBy=(shade,alpha$1,hueOffset=0)=>{let config$1=shadeConfig[shade],adjustedHue=(baseHue+hueOffset)%360,adjustedChroma=chroma*config$1.chromaMultiplier,baseColor=oklch({mode:`oklch`,l:config$1.lightness,c:adjustedChroma,h:adjustedHue,alpha:alpha$1??1});if(config$1.mixWithWhite){let white=oklch({mode:`oklch`,l:1,c:0,h:0,alpha:alpha$1??1});return colorToChromaticColor(mixColors(baseColor,white,config$1.mixWithWhite))}return colorToChromaticColor(baseColor)};return{baseHue,chroma,getAllShades:(alpha$1,hueOffset=0)=>{let shades={};for(let shadeKey of Object.keys(shadeConfig)){let shade=Number.parseInt(shadeKey);shades[shade]=shadeBy(shade,alpha$1,hueOffset)}return shades},shadeBy}}function mixColors(color1,color2,ratio=.5){let c1=oklch(color1),c2=oklch(color2);if(!c1||!c2)throw Error(`Invalid colors provided for mixing`);return oklch({mode:`oklch`,l:c1.l*(1-ratio)+c2.l*ratio,c:c1.c*(1-ratio)+c2.c*ratio,h:mixHues(c1.h??0,c2.h??0,ratio)})}function mixHues(h1,h2,ratio){let diff=h2-h1;return diff>180&&(diff-=360),diff<-180&&(diff+=360),(h1+diff*ratio+360)%360}let Emotion=function(Emotion$1){return Emotion$1.Idle=`<|EMOTE_NEUTRAL|>`,Emotion$1.Happy=`<|EMOTE_HAPPY|>`,Emotion$1.Sad=`<|EMOTE_SAD|>`,Emotion$1.Angry=`<|EMOTE_ANGRY|>`,Emotion$1.Think=`<|EMOTE_THINK|>`,Emotion$1.Surprise=`<|EMOTE_SURPRISE|>`,Emotion$1.Awkward=`<|EMOTE_AWKWARD|>`,Emotion$1.Question=`<|EMOTE_QUESTION|>`,Emotion$1}({});const EMOTION_VALUES=Object.values(Emotion),EmotionHappyMotionName=`Happy`,EmotionSadMotionName=`Sad`,EmotionAngryMotionName=`Angry`,EmotionAwkwardMotionName=`Awkward`,EmotionThinkMotionName=`Think`,EmotionSurpriseMotionName=`Surprise`,EmotionQuestionMotionName=`Question`,EmotionNeutralMotionName=`Idle`,EMOTION_EmotionMotionName_value={[Emotion.Happy]:EmotionHappyMotionName,[Emotion.Sad]:EmotionSadMotionName,[Emotion.Angry]:EmotionAngryMotionName,[Emotion.Think]:EmotionThinkMotionName,[Emotion.Surprise]:EmotionSurpriseMotionName,[Emotion.Awkward]:EmotionAwkwardMotionName,[Emotion.Question]:EmotionQuestionMotionName,[Emotion.Idle]:EmotionNeutralMotionName},EMOTION_VRMExpressionName_value={[Emotion.Happy]:`happy`,[Emotion.Sad]:`sad`,[Emotion.Angry]:`angry`,[Emotion.Think]:void 0,[Emotion.Surprise]:`surprised`,[Emotion.Awkward]:void 0,[Emotion.Question]:void 0,[Emotion.Idle]:void 0},chromaticHue=Symbol(`@proj-airi/chromatic-hue`);function message(prefix,suffix){return{role:`system`,content:[prefix,EMOTION_VALUES.map(emotion=>`- ${emotion}`).join(` +`||chars[_i]===` `||chars[_i]===` `);)_i++;let alpha$1;if(is_num(chars)&&(alpha$1=num(chars),alpha$1.type!==Tok.Hue)){tokens.push({type:Tok.Alpha,value:alpha$1});continue}if(is_ident(chars)&&ident(chars)===`none`){tokens.push({type:Tok.Alpha,value:{type:Tok.None,value:void 0}});continue}return}if(/\d/.test(ch)){_i--,tokens.push(num(chars));continue}if(IdentStartCodePoint.test(ch)){_i--,tokens.push(identlike(chars));continue}return}return tokens}function parseColorSyntax(tokens){tokens._i=0;let token=tokens[tokens._i++];if(!token||token.type!==Tok.Function||token.value!==`color`||(token=tokens[tokens._i++],token.type!==Tok.Ident))return;let mode=colorProfiles[token.value];if(!mode)return;let res={mode},coords$1=consumeCoords(tokens,!1);if(!coords$1)return;let channels=getMode(mode).channels;for(let ii=0,c$3,ch;ii4)){if(coords$1.length===4){if(coords$1[3].type!==Tok.Alpha)return;coords$1[3]=coords$1[3].value}return coords$1.length===3&&coords$1.push({type:Tok.None,value:void 0}),coords$1.every(c$3=>c$3.type!==Tok.Alpha)?coords$1:void 0}}function parseModernSyntax(tokens,includeHue){tokens._i=0;let token=tokens[tokens._i++];if(!token||token.type!==Tok.Function)return;let coords$1=consumeCoords(tokens,includeHue);if(coords$1)return coords$1.unshift(token.value),coords$1}const parse$4=color$2=>{if(typeof color$2!=`string`)return;let tokens=tokenize(color$2),parsed=tokens?parseModernSyntax(tokens,!0):void 0,result,i=0,len=parsers.length;for(;ic$3===`transparent`?{mode:`rgb`,r:0,g:0,b:0,alpha:0}:void 0;var parseTransparent_default=parseTransparent;const lerp$2=(a$1,b$1,t$1)=>a$1+t$1*(b$1-a$1),get_classes=arr=>{let classes=[];for(let i=0;iarr=>{let classes=get_classes(arr);return t$1=>{let cls=t$1*classes.length,idx=t$1>=1?classes.length-1:Math.max(Math.floor(cls),0),pair=classes[idx];return pair===void 0?void 0:interpolator(pair[0],pair[1],cls-idx)}},interpolatorLinear=interpolatorPiecewise(lerp$2),fixupAlpha=arr=>{let some_defined=!1,res=arr.map(v=>v===void 0?1:(some_defined=!0,v));return some_defined?res:arr},definition$28={mode:`rgb`,channels:[`r`,`g`,`b`,`alpha`],parse:[parseRgb_default,parseHex_default,parseRgbLegacy_default,parseNamed_default,parseTransparent_default,`srgb`],serialize:`srgb`,interpolate:{r:interpolatorLinear,g:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}};var definition_default$23=definition$28;const linearize$2=(v=0)=>Math.abs(v)**(563/256)*Math.sign(v),convertA98ToXyz65=a98$1=>{let r$1=linearize$2(a98$1.r),g=linearize$2(a98$1.g),b$1=linearize$2(a98$1.b),res={mode:`xyz65`,x:.5766690429101305*r$1+.1855582379065463*g+.1882286462349947*b$1,y:.297344975250536*r$1+.6273635662554661*g+.0752914584939979*b$1,z:.0270313613864123*r$1+.0706888525358272*g+.9913375368376386*b$1};return a98$1.alpha!==void 0&&(res.alpha=a98$1.alpha),res};var convertA98ToXyz65_default=convertA98ToXyz65;const gamma$2=v=>Math.abs(v)**(256/563)*Math.sign(v),convertXyz65ToA98=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`a98`,r:gamma$2(x$1*2.0415879038107465-y*.5650069742788597-.3447313507783297*z$1),g:gamma$2(x$1*-.9692436362808798+y*1.8759675015077206+.0415550574071756*z$1),b:gamma$2(x$1*.0134442806320312-y*.1183623922310184+1.0151749943912058*z$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToA98_default=convertXyz65ToA98;const fn$3=(c$3=0)=>{let abs$2=Math.abs(c$3);return abs$2<=.04045?c$3/12.92:(Math.sign(c$3)||1)*((abs$2+.055)/1.055)**2.4},convertRgbToLrgb=({r:r$1,g,b:b$1,alpha:alpha$1})=>{let res={mode:`lrgb`,r:fn$3(r$1),g:fn$3(g),b:fn$3(b$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToLrgb_default=convertRgbToLrgb;const convertRgbToXyz65=rgb$2=>{let{r:r$1,g,b:b$1,alpha:alpha$1}=convertRgbToLrgb_default(rgb$2),res={mode:`xyz65`,x:.4123907992659593*r$1+.357584339383878*g+.1804807884018343*b$1,y:.2126390058715102*r$1+.715168678767756*g+.0721923153607337*b$1,z:.0193308187155918*r$1+.119194779794626*g+.9505321522496607*b$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToXyz65_default=convertRgbToXyz65;const fn$2=(c$3=0)=>{let abs$2=Math.abs(c$3);return abs$2>.0031308?(Math.sign(c$3)||1)*(1.055*abs$2**(1/2.4)-.055):c$3*12.92},convertLrgbToRgb=({r:r$1,g,b:b$1,alpha:alpha$1},mode=`rgb`)=>{let res={mode,r:fn$2(r$1),g:fn$2(g),b:fn$2(b$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLrgbToRgb_default=convertLrgbToRgb;const convertXyz65ToRgb=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res=convertLrgbToRgb_default({r:x$1*3.2409699419045226-y*1.537383177570094-.4986107602930034*z$1,g:x$1*-.9692436362808796+y*1.8759675015077204+.0415550574071756*z$1,b:x$1*.0556300796969936-y*.2039769588889765+1.0569715142428784*z$1});return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToRgb_default=convertXyz65ToRgb;const definition$27={...definition_default$23,mode:`a98`,parse:[`a98-rgb`],serialize:`a98-rgb`,fromMode:{rgb:color$2=>convertXyz65ToA98_default(convertRgbToXyz65_default(color$2)),xyz65:convertXyz65ToA98_default},toMode:{rgb:color$2=>convertXyz65ToRgb_default(convertA98ToXyz65_default(color$2)),xyz65:convertA98ToXyz65_default}};var definition_default=definition$27;const normalizeHue=hue$2=>(hue$2%=360)<0?hue$2+360:hue$2;var normalizeHue_default=normalizeHue;const hue$1=(hues,fn$5)=>hues.map((hue$2,idx,arr)=>{if(hue$2===void 0)return hue$2;let normalized=normalizeHue_default(hue$2);return idx===0||hues[idx-1]===void 0?normalized:fn$5(normalized-normalizeHue_default(arr[idx-1]))}).reduce((acc,curr)=>!acc.length||curr===void 0||acc[acc.length-1]===void 0?(acc.push(curr),acc):(acc.push(curr+acc[acc.length-1]),acc),[]),fixupHueShorter=arr=>hue$1(arr,d=>Math.abs(d)<=180?d:d-360*Math.sign(d)),M=[-.14861,1.78277,-.29227,-.90649,1.97294,0],degToRad$1=Math.PI/180,radToDeg$1=180/Math.PI;let DE=M[3]*M[4],BE=M[1]*M[4],BCAD=M[1]*M[2]-M[0]*M[3];const convertRgbToCubehelix=({r:r$1,g,b:b$1,alpha:alpha$1})=>{r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let l=(BCAD*b$1+r$1*DE-g*BE)/(BCAD+DE-BE),x$1=b$1-l,y=(M[4]*(g-l)-M[2]*x$1)/M[3],res={mode:`cubehelix`,l,s:l===0||l===1?void 0:Math.sqrt(x$1*x$1+y*y)/(M[4]*l*(1-l))};return res.s&&(res.h=Math.atan2(y,x$1)*radToDeg$1-120),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToCubehelix_default=convertRgbToCubehelix;const convertCubehelixToRgb=({h:h$1,s,l,alpha:alpha$1})=>{let res={mode:`rgb`};h$1=(h$1===void 0?0:h$1+120)*degToRad$1,l===void 0&&(l=0);let amp=s===void 0?0:s*l*(1-l),cosh=Math.cos(h$1),sinh=Math.sin(h$1);return res.r=l+amp*(M[0]*cosh+M[1]*sinh),res.g=l+amp*(M[2]*cosh+M[3]*sinh),res.b=l+amp*(M[4]*cosh+M[5]*sinh),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertCubehelixToRgb_default=convertCubehelixToRgb;const differenceHueSaturation=(std,smp)=>{if(std.h===void 0||smp.h===void 0||!std.s||!smp.s)return 0;let std_h=normalizeHue_default(std.h),smp_h=normalizeHue_default(smp.h),dH=Math.sin((smp_h-std_h+360)/2*Math.PI/180);return 2*Math.sqrt(std.s*smp.s)*dH},differenceHueNaive=(std,smp)=>{if(std.h===void 0||smp.h===void 0)return 0;let std_h=normalizeHue_default(std.h),smp_h=normalizeHue_default(smp.h);return Math.abs(smp_h-std_h)>180?std_h-(smp_h-360*Math.sign(smp_h-std_h)):smp_h-std_h},differenceHueChroma=(std,smp)=>{if(std.h===void 0||smp.h===void 0||!std.c||!smp.c)return 0;let std_h=normalizeHue_default(std.h),smp_h=normalizeHue_default(smp.h),dH=Math.sin((smp_h-std_h+360)/2*Math.PI/180);return 2*Math.sqrt(std.c*smp.c)*dH},averageAngle=val=>{let sum=val.reduce((sum$1,val$1)=>{if(val$1!==void 0){let rad=val$1*Math.PI/180;sum$1.sin+=Math.sin(rad),sum$1.cos+=Math.cos(rad)}return sum$1},{sin:0,cos:0}),angle=Math.atan2(sum.sin,sum.cos)*180/Math.PI;return angle<0?360+angle:angle},averageNumber=val=>{let a$1=val.filter(v=>v!==void 0);return a$1.length?a$1.reduce((sum,v)=>sum+v,0)/a$1.length:void 0},isfn=o=>typeof o==`function`;function average(colors,mode=`rgb`,overrides){let def$1=getMode(mode),cc$1=colors.map(converter_default(mode));return def$1.channels.reduce((res,ch)=>{let arr=cc$1.map(c$3=>c$3[ch]).filter(val=>val!==void 0);if(arr.length){let fn$5;fn$5=isfn(overrides)?overrides:overrides&&isfn(overrides[ch])?overrides[ch]:def$1.average&&isfn(def$1.average[ch])?def$1.average[ch]:averageNumber,res[ch]=fn$5(arr,ch)}return res},{mode})}const definition$26={mode:`cubehelix`,channels:[`h`,`s`,`l`,`alpha`],parse:[`--cubehelix`],serialize:`--cubehelix`,ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:convertRgbToCubehelix_default},toMode:{rgb:convertCubehelixToRgb_default},interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},s:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueSaturation},average:{h:averageAngle}};var definition_default$1=definition$26;const convertLabToLch=({l,a:a$1,b:b$1,alpha:alpha$1},mode=`lch`)=>{a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let c$3=Math.sqrt(a$1*a$1+b$1*b$1),res={mode,l,c:c$3};return c$3&&(res.h=normalizeHue_default(Math.atan2(b$1,a$1)*180/Math.PI)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLabToLch_default=convertLabToLch;const convertLchToLab=({l,c:c$3,h:h$1,alpha:alpha$1},mode=`lab`)=>{h$1===void 0&&(h$1=0);let res={mode,l,a:c$3?c$3*Math.cos(h$1/180*Math.PI):0,b:c$3?c$3*Math.sin(h$1/180*Math.PI):0};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLchToLab_default=convertLchToLab;const k$1=29**3/3**3,e$2=6**3/29**3,D50={X:.3457/.3585,Y:1,Z:.2958/.3585},D65={X:.3127/.329,Y:1,Z:.3583/.329},k$2=29**3/3**3,e$3=6**3/29**3;let fn$1=v=>v**3>e$2?v**3:(116*v-16)/k$1;const convertLab65ToXyz65=({l,a:a$1,b:b$1,alpha:alpha$1})=>{l===void 0&&(l=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let fy=(l+16)/116,fx=a$1/500+fy,fz=fy-b$1/200,res={mode:`xyz65`,x:fn$1(fx)*D65.X,y:fn$1(fy)*D65.Y,z:fn$1(fz)*D65.Z};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLab65ToXyz65_default=convertLab65ToXyz65;const convertLab65ToRgb=lab$1=>convertXyz65ToRgb_default(convertLab65ToXyz65_default(lab$1));var convertLab65ToRgb_default=convertLab65ToRgb;const f$1=value$1=>value$1>e$2?Math.cbrt(value$1):(k$1*value$1+16)/116,convertXyz65ToLab65=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let f0=f$1(x$1/D65.X),f1=f$1(y/D65.Y),f2=f$1(z$1/D65.Z),res={mode:`lab65`,l:116*f1-16,a:500*(f0-f1),b:200*(f1-f2)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToLab65_default=convertXyz65ToLab65;const convertRgbToLab65=rgb$2=>{let res=convertXyz65ToLab65_default(convertRgbToXyz65_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToLab65_default=convertRgbToLab65;const kE=1,kCH=1,θ=26/180*Math.PI,cosθ=Math.cos(θ),sinθ=Math.sin(θ),factor=100/Math.log(139/100),convertDlchToLab65=({l,c:c$3,h:h$1,alpha:alpha$1})=>{l===void 0&&(l=0),c$3===void 0&&(c$3=0),h$1===void 0&&(h$1=0);let res={mode:`lab65`,l:(Math.exp(l*kE/factor)-1)/.0039},G=(Math.exp(.0435*c$3*kCH*kE)-1)/.075,e$4=G*Math.cos(h$1/180*Math.PI-θ),f$2=G*Math.sin(h$1/180*Math.PI-θ);return res.a=e$4*cosθ-f$2/.83*sinθ,res.b=e$4*sinθ+f$2/.83*cosθ,alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertDlchToLab65_default=convertDlchToLab65;const convertLab65ToDlch=({l,a:a$1,b:b$1,alpha:alpha$1})=>{l===void 0&&(l=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let e$4=a$1*cosθ+b$1*sinθ,f$2=.83*(b$1*cosθ-a$1*sinθ),G=Math.sqrt(e$4*e$4+f$2*f$2),res={mode:`dlch`,l:factor/kE*Math.log(1+.0039*l),c:Math.log(1+.075*G)/(.0435*kCH*kE)};return res.c&&(res.h=normalizeHue_default((Math.atan2(f$2,e$4)+θ)/Math.PI*180)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLab65ToDlch_default=convertLab65ToDlch;const convertDlabToLab65=c$3=>convertDlchToLab65_default(convertLabToLch_default(c$3,`dlch`)),convertLab65ToDlab=c$3=>convertLchToLab_default(convertLab65ToDlch_default(c$3),`dlab`),definition$25={mode:`dlab`,parse:[`--din99o-lab`],serialize:`--din99o-lab`,toMode:{lab65:convertDlabToLab65,rgb:c$3=>convertLab65ToRgb_default(convertDlabToLab65(c$3))},fromMode:{lab65:convertLab65ToDlab,rgb:c$3=>convertLab65ToDlab(convertRgbToLab65_default(c$3))},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:interpolatorLinear,a:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$2=definition$25;const definition$24={mode:`dlch`,parse:[`--din99o-lch`],serialize:`--din99o-lch`,toMode:{lab65:convertDlchToLab65_default,dlab:c$3=>convertLchToLab_default(c$3,`dlab`),rgb:c$3=>convertLab65ToRgb_default(convertDlchToLab65_default(c$3))},fromMode:{lab65:convertLab65ToDlch_default,dlab:c$3=>convertLabToLch_default(c$3,`dlch`),rgb:c$3=>convertLab65ToDlch_default(convertRgbToLab65_default(c$3))},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:interpolatorLinear,c:interpolatorLinear,h:{use:interpolatorLinear,fixup:fixupHueShorter},alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$3=definition$24;function convertHsiToRgb({h:h$1,s,i,alpha:alpha$1}){h$1=normalizeHue_default(h$1===void 0?0:h$1),s===void 0&&(s=0),i===void 0&&(i=0);let f$2=Math.abs(h$1/60%2-1),res;switch(Math.floor(h$1/60)){case 0:res={r:i*(1+s*(3/(2-f$2)-1)),g:i*(1+s*(3*(1-f$2)/(2-f$2)-1)),b:i*(1-s)};break;case 1:res={r:i*(1+s*(3*(1-f$2)/(2-f$2)-1)),g:i*(1+s*(3/(2-f$2)-1)),b:i*(1-s)};break;case 2:res={r:i*(1-s),g:i*(1+s*(3/(2-f$2)-1)),b:i*(1+s*(3*(1-f$2)/(2-f$2)-1))};break;case 3:res={r:i*(1-s),g:i*(1+s*(3*(1-f$2)/(2-f$2)-1)),b:i*(1+s*(3/(2-f$2)-1))};break;case 4:res={r:i*(1+s*(3*(1-f$2)/(2-f$2)-1)),g:i*(1-s),b:i*(1+s*(3/(2-f$2)-1))};break;case 5:res={r:i*(1+s*(3/(2-f$2)-1)),g:i*(1-s),b:i*(1+s*(3*(1-f$2)/(2-f$2)-1))};break;default:res={r:i*(1-s),g:i*(1-s),b:i*(1-s)}}return res.mode=`rgb`,alpha$1!==void 0&&(res.alpha=alpha$1),res}function convertRgbToHsi({r:r$1,g,b:b$1,alpha:alpha$1}){r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let M$1=Math.max(r$1,g,b$1),m=Math.min(r$1,g,b$1),res={mode:`hsi`,s:r$1+g+b$1===0?0:1-3*m/(r$1+g+b$1),i:(r$1+g+b$1)/3};return M$1-m!==0&&(res.h=(M$1===r$1?(g-b$1)/(M$1-m)+(g{switch(unit){case`deg`:return+val;case`rad`:return val/Math.PI*180;case`grad`:return val/10*9;case`turn`:return val*360}};var hue_default=hueToDeg;const hsl_old=RegExp(`^hsla?\\(\\s*${hue}${c}${per}${c}${per}\\s*(?:,\\s*${num_per}\\s*)?\\)$`),parseHslLegacy=color$2=>{let match=color$2.match(hsl_old);if(!match)return;let res={mode:`hsl`};return match[3]===void 0?match[1]!==void 0&&match[2]!==void 0&&(res.h=hue_default(match[1],match[2])):res.h=+match[3],match[4]!==void 0&&(res.s=Math.min(Math.max(0,match[4]/100),1)),match[5]!==void 0&&(res.l=Math.min(Math.max(0,match[5]/100),1)),match[6]===void 0?match[7]!==void 0&&(res.alpha=Math.max(0,Math.min(1,+match[7]))):res.alpha=Math.max(0,Math.min(1,match[6]/100)),res};var parseHslLegacy_default=parseHslLegacy;function parseHsl(color$2,parsed){if(!parsed||parsed[0]!==`hsl`&&parsed[0]!==`hsla`)return;let res={mode:`hsl`},[,h$1,s,l,alpha$1]=parsed;if(h$1.type!==Tok.None){if(h$1.type===Tok.Percentage)return;res.h=h$1.value}if(s.type!==Tok.None){if(s.type===Tok.Hue)return;res.s=s.value/100}if(l.type!==Tok.None){if(l.type===Tok.Hue)return;res.l=l.value/100}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseHsl_default=parseHsl;const definition$22={mode:`hsl`,toMode:{rgb:convertHslToRgb},fromMode:{rgb:convertRgbToHsl},channels:[`h`,`s`,`l`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[parseHsl_default,parseHslLegacy_default],serialize:c$3=>`hsl(${c$3.h===void 0?`none`:c$3.h} ${c$3.s===void 0?`none`:c$3.s*100+`%`} ${c$3.l===void 0?`none`:c$3.l*100+`%`}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},s:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueSaturation},average:{h:averageAngle}};var definition_default$5=definition$22;function convertHsvToRgb({h:h$1,s,v,alpha:alpha$1}){h$1=normalizeHue_default(h$1===void 0?0:h$1),s===void 0&&(s=0),v===void 0&&(v=0);let f$2=Math.abs(h$1/60%2-1),res;switch(Math.floor(h$1/60)){case 0:res={r:v,g:v*(1-s*f$2),b:v*(1-s)};break;case 1:res={r:v*(1-s*f$2),g:v,b:v*(1-s)};break;case 2:res={r:v*(1-s),g:v,b:v*(1-s*f$2)};break;case 3:res={r:v*(1-s),g:v*(1-s*f$2),b:v};break;case 4:res={r:v*(1-s*f$2),g:v*(1-s),b:v};break;case 5:res={r:v,g:v*(1-s),b:v*(1-s*f$2)};break;default:res={r:v*(1-s),g:v*(1-s),b:v*(1-s)}}return res.mode=`rgb`,alpha$1!==void 0&&(res.alpha=alpha$1),res}function convertRgbToHsv({r:r$1,g,b:b$1,alpha:alpha$1}){r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let M$1=Math.max(r$1,g,b$1),m=Math.min(r$1,g,b$1),res={mode:`hsv`,s:M$1===0?0:1-m/M$1,v:M$1};return M$1-m!==0&&(res.h=(M$1===r$1?(g-b$1)/(M$1-m)+(g1){let s=w+b$1;w/=s,b$1/=s}return convertHsvToRgb({h:h$1,s:b$1===1?1:1-w/(1-b$1),v:1-b$1,alpha:alpha$1})}function convertRgbToHwb(rgba$1){let hsv$1=convertRgbToHsv(rgba$1);if(hsv$1===void 0)return;let s=hsv$1.s===void 0?0:hsv$1.s,v=hsv$1.v===void 0?0:hsv$1.v,res={mode:`hwb`,w:(1-s)*v,b:1-v};return hsv$1.h!==void 0&&(res.h=hsv$1.h),hsv$1.alpha!==void 0&&(res.alpha=hsv$1.alpha),res}function ParseHwb(color$2,parsed){if(!parsed||parsed[0]!==`hwb`)return;let res={mode:`hwb`},[,h$1,w,b$1,alpha$1]=parsed;if(h$1.type!==Tok.None){if(h$1.type===Tok.Percentage)return;res.h=h$1.value}if(w.type!==Tok.None){if(w.type===Tok.Hue)return;res.w=w.value/100}if(b$1.type!==Tok.None){if(b$1.type===Tok.Hue)return;res.b=b$1.value/100}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseHwb_default=ParseHwb;const definition$20={mode:`hwb`,toMode:{rgb:convertHwbToRgb},fromMode:{rgb:convertRgbToHwb},channels:[`h`,`w`,`b`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[parseHwb_default],serialize:c$3=>`hwb(${c$3.h===void 0?`none`:c$3.h} ${c$3.w===void 0?`none`:c$3.w*100+`%`} ${c$3.b===void 0?`none`:c$3.b*100+`%`}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},w:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueNaive},average:{h:averageAngle}};var definition_default$7=definition$20;const YW=203,M1=.1593017578125,M2=78.84375,C1=.8359375,C2=18.8515625,C3=18.6875;function transferPqDecode(v){if(v<0)return 0;let c$3=v**(1/M2);return 1e4*(Math.max(0,c$3-C1)/(C2-C3*c$3))**(1/M1)}function transferPqEncode(v){if(v<0)return 0;let c$3=(v/1e4)**M1;return((C1+C2*c$3)/(1+C3*c$3))**+M2}const toRel=c$3=>Math.max(c$3/YW,0),convertItpToXyz65=({i,t:t$1,p:p$4,alpha:alpha$1})=>{i===void 0&&(i=0),t$1===void 0&&(t$1=0),p$4===void 0&&(p$4=0);let l=transferPqDecode(i+.008609037037932761*t$1+.11102962500302593*p$4),m=transferPqDecode(i-.00860903703793275*t$1-.11102962500302599*p$4),s=transferPqDecode(i+.5600313357106791*t$1-.32062717498731885*p$4),res={mode:`xyz65`,x:toRel(2.070152218389422*l-1.3263473389671556*m+.2066510476294051*s),y:toRel(.3647385209748074*l+.680566024947227*m-.0453045459220346*s),z:toRel(-.049747207535812*l-.0492609666966138*m+1.1880659249923042*s)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertItpToXyz65_default=convertItpToXyz65;const toAbs=(c$3=0)=>Math.max(c$3*YW,0),convertXyz65ToItp=({x:x$1,y,z:z$1,alpha:alpha$1})=>{let absX=toAbs(x$1),absY=toAbs(y),absZ=toAbs(z$1),l=transferPqEncode(.3592832590121217*absX+.6976051147779502*absY-.0358915932320289*absZ),m=transferPqEncode(-.1920808463704995*absX+1.1004767970374323*absY+.0753748658519118*absZ),s=transferPqEncode(.0070797844607477*absX+.0748396662186366*absY+.8433265453898765*absZ),i=.5*l+.5*m,t$1=1.61376953125*l-3.323486328125*m+1.709716796875*s,p$4=4.378173828125*l-4.24560546875*m-.132568359375*s,res={mode:`itp`,i,t:t$1,p:p$4};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToItp_default=convertXyz65ToItp;const definition$19={mode:`itp`,channels:[`i`,`t`,`p`,`alpha`],parse:[`--ictcp`],serialize:`--ictcp`,toMode:{xyz65:convertItpToXyz65_default,rgb:color$2=>convertXyz65ToRgb_default(convertItpToXyz65_default(color$2))},fromMode:{xyz65:convertXyz65ToItp_default,rgb:color$2=>convertXyz65ToItp_default(convertRgbToXyz65_default(color$2))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:interpolatorLinear,t:interpolatorLinear,p:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$8=definition$19;const p$2=134.03437499999998,d0$1=16295499532821565e-27,jabPqEncode=v=>{if(v<0)return 0;let vn$3=(v/1e4)**M1;return((C1+C2*vn$3)/(1+C3*vn$3))**+p$2},abs$1=(v=0)=>Math.max(v*203,0),convertXyz65ToJab=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1=abs$1(x$1),y=abs$1(y),z$1=abs$1(z$1);let xp=1.15*x$1-.15*z$1,yp=.66*y+.34*x$1,l=jabPqEncode(.41478972*xp+.579999*yp+.014648*z$1),m=jabPqEncode(-.20151*xp+1.120649*yp+.0531008*z$1),s=jabPqEncode(-.0166008*xp+.2648*yp+.6684799*z$1),i=(l+m)/2,res={mode:`jab`,j:.44*i/(1-.56*i)-d0$1,a:3.524*l-4.066708*m+.542708*s,b:.199076*l+1.096799*m-1.295875*s};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToJab_default=convertXyz65ToJab;const p$1=134.03437499999998,d0=16295499532821565e-27,jabPqDecode=v=>{if(v<0)return 0;let vp=v**(1/p$1);return 1e4*((C1-vp)/(C3*vp-C2))**(1/M1)},rel=v=>v/203,convertJabToXyz65=({j:j$1,a:a$1,b:b$1,alpha:alpha$1})=>{j$1===void 0&&(j$1=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let i=(j$1+d0)/(.44+.56*(j$1+d0)),l=jabPqDecode(i+.13860504*a$1+.058047316*b$1),m=jabPqDecode(i-.13860504*a$1-.058047316*b$1),s=jabPqDecode(i-.096019242*a$1-.8118919*b$1),res={mode:`xyz65`,x:rel(1.661373024652174*l-.914523081304348*m+.23136208173913045*s),y:rel(-.3250758611844533*l+1.571847026732543*m-.21825383453227928*s),z:rel(-.090982811*l-.31272829*m+1.5227666*s)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertJabToXyz65_default=convertJabToXyz65;const convertRgbToJab=rgb$2=>{let res=convertXyz65ToJab_default(convertRgbToXyz65_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToJab_default=convertRgbToJab;const convertJabToRgb=color$2=>convertXyz65ToRgb_default(convertJabToXyz65_default(color$2));var convertJabToRgb_default=convertJabToRgb;const definition$18={mode:`jab`,channels:[`j`,`a`,`b`,`alpha`],parse:[`--jzazbz`],serialize:`--jzazbz`,fromMode:{rgb:convertRgbToJab_default,xyz65:convertXyz65ToJab_default},toMode:{rgb:convertJabToRgb_default,xyz65:convertJabToXyz65_default},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:interpolatorLinear,a:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$9=definition$18;const convertJabToJch=({j:j$1,a:a$1,b:b$1,alpha:alpha$1})=>{a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let c$3=Math.sqrt(a$1*a$1+b$1*b$1),res={mode:`jch`,j:j$1,c:c$3};return c$3&&(res.h=normalizeHue_default(Math.atan2(b$1,a$1)*180/Math.PI)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertJabToJch_default=convertJabToJch;const convertJchToJab=({j:j$1,c:c$3,h:h$1,alpha:alpha$1})=>{h$1===void 0&&(h$1=0);let res={mode:`jab`,j:j$1,a:c$3?c$3*Math.cos(h$1/180*Math.PI):0,b:c$3?c$3*Math.sin(h$1/180*Math.PI):0};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertJchToJab_default=convertJchToJab;const definition$17={mode:`jch`,parse:[`--jzczhz`],serialize:`--jzczhz`,toMode:{jab:convertJchToJab_default,rgb:c$3=>convertJabToRgb_default(convertJchToJab_default(c$3))},fromMode:{rgb:c$3=>convertJabToJch_default(convertRgbToJab_default(c$3)),jab:convertJabToJch_default},channels:[`j`,`c`,`h`,`alpha`],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},c:interpolatorLinear,j:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$10=definition$17;const k=29**3/3**3,e$1=6**3/29**3;let fn=v=>v**3>e$1?v**3:(116*v-16)/k;const convertLabToXyz50=({l,a:a$1,b:b$1,alpha:alpha$1})=>{l===void 0&&(l=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let fy=(l+16)/116,fx=a$1/500+fy,fz=fy-b$1/200,res={mode:`xyz50`,x:fn(fx)*D50.X,y:fn(fy)*D50.Y,z:fn(fz)*D50.Z};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLabToXyz50_default=convertLabToXyz50;const convertXyz50ToRgb=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res=convertLrgbToRgb_default({r:x$1*3.1341359569958707-y*1.6173863321612538-.4906619460083532*z$1,g:x$1*-.978795502912089+y*1.916254567259524+.03344273116131949*z$1,b:x$1*.07195537988411677-y*.2289768264158322+1.405386058324125*z$1});return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToRgb_default=convertXyz50ToRgb;const convertLabToRgb=lab$1=>convertXyz50ToRgb_default(convertLabToXyz50_default(lab$1));var convertLabToRgb_default=convertLabToRgb;const convertRgbToXyz50=rgb$2=>{let{r:r$1,g,b:b$1,alpha:alpha$1}=convertRgbToLrgb_default(rgb$2),res={mode:`xyz50`,x:.436065742824811*r$1+.3851514688337912*g+.14307845442264197*b$1,y:.22249319175623702*r$1+.7168870538238823*g+.06061979053616537*b$1,z:.013923904500943465*r$1+.09708128566574634*g+.7140993584005155*b$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToXyz50_default=convertRgbToXyz50;const f=value$1=>value$1>e$1?Math.cbrt(value$1):(k*value$1+16)/116,convertXyz50ToLab=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let f0=f(x$1/D50.X),f1=f(y/D50.Y),f2=f(z$1/D50.Z),res={mode:`lab`,l:116*f1-16,a:500*(f0-f1),b:200*(f1-f2)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToLab_default=convertXyz50ToLab;const convertRgbToLab=rgb$2=>{let res=convertXyz50ToLab_default(convertRgbToXyz50_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToLab_default=convertRgbToLab;function parseLab(color$2,parsed){if(!parsed||parsed[0]!==`lab`)return;let res={mode:`lab`},[,l,a$1,b$1,alpha$1]=parsed;if(!(l.type===Tok.Hue||a$1.type===Tok.Hue||b$1.type===Tok.Hue))return l.type!==Tok.None&&(res.l=Math.min(Math.max(0,l.value),100)),a$1.type!==Tok.None&&(res.a=a$1.type===Tok.Number?a$1.value:a$1.value*125/100),b$1.type!==Tok.None&&(res.b=b$1.type===Tok.Number?b$1.value:b$1.value*125/100),alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseLab_default=parseLab;const definition$16={mode:`lab`,toMode:{xyz50:convertLabToXyz50_default,rgb:convertLabToRgb_default},fromMode:{xyz50:convertXyz50ToLab_default,rgb:convertRgbToLab_default},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[parseLab_default],serialize:c$3=>`lab(${c$3.l===void 0?`none`:c$3.l} ${c$3.a===void 0?`none`:c$3.a} ${c$3.b===void 0?`none`:c$3.b}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,interpolate:{l:interpolatorLinear,a:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$11=definition$16;const definition$15={...definition_default$11,mode:`lab65`,parse:[`--lab-d65`],serialize:`--lab-d65`,toMode:{xyz65:convertLab65ToXyz65_default,rgb:convertLab65ToRgb_default},fromMode:{xyz65:convertXyz65ToLab65_default,rgb:convertRgbToLab65_default},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}};var definition_default$12=definition$15;function parseLch(color$2,parsed){if(!parsed||parsed[0]!==`lch`)return;let res={mode:`lch`},[,l,c$3,h$1,alpha$1]=parsed;if(l.type!==Tok.None){if(l.type===Tok.Hue)return;res.l=Math.min(Math.max(0,l.value),100)}if(c$3.type!==Tok.None&&(res.c=Math.max(0,c$3.type===Tok.Number?c$3.value:c$3.value*150/100)),h$1.type!==Tok.None){if(h$1.type===Tok.Percentage)return;res.h=h$1.value}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseLch_default=parseLch;const definition$14={mode:`lch`,toMode:{lab:convertLchToLab_default,rgb:c$3=>convertLabToRgb_default(convertLchToLab_default(c$3))},fromMode:{rgb:c$3=>convertLabToLch_default(convertRgbToLab_default(c$3)),lab:convertLabToLch_default},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[parseLch_default],serialize:c$3=>`lch(${c$3.l===void 0?`none`:c$3.l} ${c$3.c===void 0?`none`:c$3.c} ${c$3.h===void 0?`none`:c$3.h}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},c:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$13=definition$14;const definition$13={...definition_default$13,mode:`lch65`,parse:[`--lch-d65`],serialize:`--lch-d65`,toMode:{lab65:c$3=>convertLchToLab_default(c$3,`lab65`),rgb:c$3=>convertLab65ToRgb_default(convertLchToLab_default(c$3,`lab65`))},fromMode:{rgb:c$3=>convertLabToLch_default(convertRgbToLab65_default(c$3),`lch65`),lab65:c$3=>convertLabToLch_default(c$3,`lch65`)},ranges:{l:[0,100],c:[0,150],h:[0,360]}};var definition_default$14=definition$13;const convertLuvToLchuv=({l,u,v,alpha:alpha$1})=>{u===void 0&&(u=0),v===void 0&&(v=0);let c$3=Math.sqrt(u*u+v*v),res={mode:`lchuv`,l,c:c$3};return c$3&&(res.h=normalizeHue_default(Math.atan2(v,u)*180/Math.PI)),alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLuvToLchuv_default=convertLuvToLchuv;const convertLchuvToLuv=({l,c:c$3,h:h$1,alpha:alpha$1})=>{h$1===void 0&&(h$1=0);let res={mode:`luv`,l,u:c$3?c$3*Math.cos(h$1/180*Math.PI):0,v:c$3?c$3*Math.sin(h$1/180*Math.PI):0};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLchuvToLuv_default=convertLchuvToLuv;const u_fn$1=(x$1,y,z$1)=>4*x$1/(x$1+15*y+3*z$1),v_fn$1=(x$1,y,z$1)=>9*y/(x$1+15*y+3*z$1),un$1=u_fn$1(D50.X,D50.Y,D50.Z),vn$1=v_fn$1(D50.X,D50.Y,D50.Z),l_fn=value$1=>value$1<=e$1?k*value$1:116*Math.cbrt(value$1)-16,convertXyz50ToLuv=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let l=l_fn(y/D50.Y),u=u_fn$1(x$1,y,z$1),v=v_fn$1(x$1,y,z$1);!isFinite(u)||!isFinite(v)?l=u=v=0:(u=13*l*(u-un$1),v=13*l*(v-vn$1));let res={mode:`luv`,l,u,v};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToLuv_default=convertXyz50ToLuv;const u_fn=(x$1,y,z$1)=>4*x$1/(x$1+15*y+3*z$1),v_fn=(x$1,y,z$1)=>9*y/(x$1+15*y+3*z$1),un=u_fn(D50.X,D50.Y,D50.Z),vn=v_fn(D50.X,D50.Y,D50.Z),convertLuvToXyz50=({l,u,v,alpha:alpha$1})=>{if(l===void 0&&(l=0),l===0)return{mode:`xyz50`,x:0,y:0,z:0};u===void 0&&(u=0),v===void 0&&(v=0);let up=u/(13*l)+un,vp=v/(13*l)+vn,y=D50.Y*(l<=8?l/k:((l+16)/116)**3),x$1=y*(9*up)/(4*vp),z$1=y*(12-3*up-20*vp)/(4*vp),res={mode:`xyz50`,x:x$1,y,z:z$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLuvToXyz50_default=convertLuvToXyz50;const convertRgbToLchuv=rgb$2=>convertLuvToLchuv_default(convertXyz50ToLuv_default(convertRgbToXyz50_default(rgb$2))),convertLchuvToRgb=lchuv$1=>convertXyz50ToRgb_default(convertLuvToXyz50_default(convertLchuvToLuv_default(lchuv$1))),definition$12={mode:`lchuv`,toMode:{luv:convertLchuvToLuv_default,rgb:convertLchuvToRgb},fromMode:{rgb:convertRgbToLchuv,luv:convertLuvToLchuv_default},channels:[`l`,`c`,`h`,`alpha`],parse:[`--lchuv`],serialize:`--lchuv`,ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:interpolatorLinear,fixup:fixupHueShorter},c:interpolatorLinear,l:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}},difference:{h:differenceHueChroma},average:{h:averageAngle}};var definition_default$15=definition$12;const definition$11={...definition_default$23,mode:`lrgb`,toMode:{rgb:convertLrgbToRgb_default},fromMode:{rgb:convertRgbToLrgb_default},parse:[`srgb-linear`],serialize:`srgb-linear`};var definition_default$16=definition$11;const definition$10={mode:`luv`,toMode:{xyz50:convertLuvToXyz50_default,rgb:luv$1=>convertXyz50ToRgb_default(convertLuvToXyz50_default(luv$1))},fromMode:{xyz50:convertXyz50ToLuv_default,rgb:rgb$2=>convertXyz50ToLuv_default(convertRgbToXyz50_default(rgb$2))},channels:[`l`,`u`,`v`,`alpha`],parse:[`--luv`],serialize:`--luv`,ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:interpolatorLinear,u:interpolatorLinear,v:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$17=definition$10;const convertLrgbToOklab=({r:r$1,g,b:b$1,alpha:alpha$1})=>{r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let L=Math.cbrt(.412221469470763*r$1+.5363325372617348*g+.0514459932675022*b$1),M$1=Math.cbrt(.2119034958178252*r$1+.6806995506452344*g+.1073969535369406*b$1),S=Math.cbrt(.0883024591900564*r$1+.2817188391361215*g+.6299787016738222*b$1),res={mode:`oklab`,l:.210454268309314*L+.7936177747023054*M$1-.0040720430116193*S,a:1.9779985324311684*L-2.42859224204858*M$1+.450593709617411*S,b:.0259040424655478*L+.7827717124575296*M$1-.8086757549230774*S};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertLrgbToOklab_default=convertLrgbToOklab;const convertRgbToOklab=rgb$2=>{let res=convertLrgbToOklab_default(convertRgbToLrgb_default(rgb$2));return rgb$2.r===rgb$2.b&&rgb$2.b===rgb$2.g&&(res.a=res.b=0),res};var convertRgbToOklab_default=convertRgbToOklab;const convertOklabToLrgb=({l,a:a$1,b:b$1,alpha:alpha$1})=>{l===void 0&&(l=0),a$1===void 0&&(a$1=0),b$1===void 0&&(b$1=0);let L=(l+.3963377773761749*a$1+.2158037573099136*b$1)**3,M$1=(l-.1055613458156586*a$1-.0638541728258133*b$1)**3,S=(l-.0894841775298119*a$1-1.2914855480194092*b$1)**3,res={mode:`lrgb`,r:4.076741636075957*L-3.3077115392580616*M$1+.2309699031821044*S,g:-1.2684379732850317*L+2.6097573492876887*M$1-.3413193760026573*S,b:-.0041960761386756*L-.7034186179359362*M$1+1.7076146940746117*S};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertOklabToLrgb_default=convertOklabToLrgb;const convertOklabToRgb=c$3=>convertLrgbToRgb_default(convertOklabToLrgb_default(c$3));var convertOklabToRgb_default=convertOklabToRgb;function toe(x$1){let k_1=.206,k_2=.03,k_3=(1+k_1)/(1+k_2);return .5*(k_3*x$1-k_1+Math.sqrt((k_3*x$1-k_1)*(k_3*x$1-k_1)+4*k_2*k_3*x$1))}function toe_inv(x$1){let k_1=.206,k_2=.03,k_3=(1+k_1)/(1+k_2);return(x$1*x$1+k_1*x$1)/(k_3*(x$1+k_2))}function compute_max_saturation(a$1,b$1){let k0,k1,k2,k3,k4,wl,wm,ws;-1.88170328*a$1-.80936493*b$1>1?(k0=1.19086277,k1=1.76576728,k2=.59662641,k3=.75515197,k4=.56771245,wl=4.0767416621,wm=-3.3077115913,ws=.2309699292):1.81444104*a$1-1.19445276*b$1>1?(k0=.73956515,k1=-.45954404,k2=.08285427,k3=.1254107,k4=.14503204,wl=-1.2684380046,wm=2.6097574011,ws=-.3413193965):(k0=1.35733652,k1=-.00915799,k2=-1.1513021,k3=-.50559606,k4=.00692167,wl=-.0041960863,wm=-.7034186147,ws=1.707614701);let S=k0+k1*a$1+k2*b$1+k3*a$1*a$1+k4*a$1*b$1,k_l=.3963377774*a$1+.2158037573*b$1,k_m=-.1055613458*a$1-.0638541728*b$1,k_s=-.0894841775*a$1-1.291485548*b$1;{let l_=1+S*k_l,m_=1+S*k_m,s_=1+S*k_s,l=l_*l_*l_,m=m_*m_*m_,s=s_*s_*s_,l_dS=3*k_l*l_*l_,m_dS=3*k_m*m_*m_,s_dS=3*k_s*s_*s_,l_dS2=6*k_l*k_l*l_,m_dS2=6*k_m*k_m*m_,s_dS2=6*k_s*k_s*s_,f$2=wl*l+wm*m+ws*s,f1=wl*l_dS+wm*m_dS+ws*s_dS,f2=wl*l_dS2+wm*m_dS2+ws*s_dS2;S-=f$2*f1/(f1*f1-.5*f$2*f2)}return S}function find_cusp(a$1,b$1){let S_cusp=compute_max_saturation(a$1,b$1),rgb$2=convertOklabToLrgb_default({l:1,a:S_cusp*a$1,b:S_cusp*b$1}),L_cusp=Math.cbrt(1/Math.max(rgb$2.r,rgb$2.g,rgb$2.b)),C_cusp=L_cusp*S_cusp;return[L_cusp,C_cusp]}function find_gamut_intersection(a$1,b$1,L1,C1$1,L0,cusp=null){cusp||=find_cusp(a$1,b$1);let t$1;if((L1-L0)*cusp[1]-(cusp[0]-L0)*C1$1<=0)t$1=cusp[1]*L0/(C1$1*cusp[0]+cusp[1]*(L0-L1));else{t$1=cusp[1]*(L0-1)/(C1$1*(cusp[0]-1)+cusp[1]*(L0-L1));{let dL=L1-L0,dC=C1$1,k_l=.3963377774*a$1+.2158037573*b$1,k_m=-.1055613458*a$1-.0638541728*b$1,k_s=-.0894841775*a$1-1.291485548*b$1,l_dt=dL+dC*k_l,m_dt=dL+dC*k_m,s_dt=dL+dC*k_s;{let L=L0*(1-t$1)+t$1*L1,C$1=t$1*C1$1,l_=L+C$1*k_l,m_=L+C$1*k_m,s_=L+C$1*k_s,l=l_*l_*l_,m=m_*m_*m_,s=s_*s_*s_,ldt=3*l_dt*l_*l_,mdt=3*m_dt*m_*m_,sdt=3*s_dt*s_*s_,ldt2=6*l_dt*l_dt*l_,mdt2=6*m_dt*m_dt*m_,sdt2=6*s_dt*s_dt*s_,r$1=4.0767416621*l-3.3077115913*m+.2309699292*s-1,r1=4.0767416621*ldt-3.3077115913*mdt+.2309699292*sdt,r2=4.0767416621*ldt2-3.3077115913*mdt2+.2309699292*sdt2,u_r=r1/(r1*r1-.5*r$1*r2),t_r=-r$1*u_r,g=-1.2684380046*l+2.6097574011*m-.3413193965*s-1,g1=-1.2684380046*ldt+2.6097574011*mdt-.3413193965*sdt,g2=-1.2684380046*ldt2+2.6097574011*mdt2-.3413193965*sdt2,u_g=g1/(g1*g1-.5*g*g2),t_g=-g*u_g,b$2=-.0041960863*l-.7034186147*m+1.707614701*s-1,b1=-.0041960863*ldt-.7034186147*mdt+1.707614701*sdt,b2=-.0041960863*ldt2-.7034186147*mdt2+1.707614701*sdt2,u_b=b1/(b1*b1-.5*b$2*b2),t_b=-b$2*u_b;t_r=u_r>=0?t_r:1e6,t_g=u_g>=0?t_g:1e6,t_b=u_b>=0?t_b:1e6,t$1+=Math.min(t_r,Math.min(t_g,t_b))}}}return t$1}function get_ST_max(a_,b_,cusp=null){cusp||=find_cusp(a_,b_);let L=cusp[0],C$1=cusp[1];return[C$1/L,C$1/(1-L)]}function get_Cs(L,a_,b_){let cusp=find_cusp(a_,b_),C_max=find_gamut_intersection(a_,b_,L,1,L,cusp),ST_max=get_ST_max(a_,b_,cusp),S_mid=.11516993+1/(7.4477897+4.1590124*b_+a_*(-2.19557347+1.75198401*b_+a_*(-2.13704948-10.02301043*b_+a_*(-4.24894561+5.38770819*b_+4.69891013*a_)))),T_mid=.11239642+1/(1.6132032-.68124379*b_+a_*(.40370612+.90148123*b_+a_*(-.27087943+.6122399*b_+a_*(.00299215-.45399568*b_-.14661872*a_)))),k$3=C_max/Math.min(L*ST_max[0],(1-L)*ST_max[1]),C_a=L*S_mid,C_b=(1-L)*T_mid,C_mid=.9*k$3*Math.sqrt(Math.sqrt(1/(1/(C_a*C_a*C_a*C_a)+1/(C_b*C_b*C_b*C_b))));C_a=L*.4,C_b=(1-L)*.8;let C_0=Math.sqrt(1/(1/(C_a*C_a)+1/(C_b*C_b)));return[C_0,C_mid,C_max]}function convertOklabToOkhsl(lab$1){let l=lab$1.l===void 0?0:lab$1.l,a$1=lab$1.a===void 0?0:lab$1.a,b$1=lab$1.b===void 0?0:lab$1.b,ret={mode:`okhsl`,l:toe(l)};lab$1.alpha!==void 0&&(ret.alpha=lab$1.alpha);let c$3=Math.sqrt(a$1*a$1+b$1*b$1);if(!c$3)return ret.s=0,ret;let[C_0,C_mid,C_max]=get_Cs(l,a$1/c$3,b$1/c$3),s;if(c$3convertOklabToOkhsl(convertRgbToOklab_default(c$3))},toMode:{oklab:convertOkhslToOklab,rgb:c$3=>convertOklabToRgb_default(convertOkhslToOklab(c$3))}};var modeOkhsl_default=modeOkhsl;function convertOklabToOkhsv(lab$1){let l=lab$1.l===void 0?0:lab$1.l,a$1=lab$1.a===void 0?0:lab$1.a,b$1=lab$1.b===void 0?0:lab$1.b,c$3=Math.sqrt(a$1*a$1+b$1*b$1),a_=c$3?a$1/c$3:1,b_=c$3?b$1/c$3:1,[S_max,T]=get_ST_max(a_,b_),S_0=.5,k$3=1-S_0/S_max,t$1=T/(c$3+l*T),L_v=t$1*l,C_v=t$1*c$3,L_vt=toe_inv(L_v),C_vt=C_v*L_vt/L_v,rgb_scale=convertOklabToLrgb_default({l:L_vt,a:a_*C_vt,b:b_*C_vt}),scale_L=Math.cbrt(1/Math.max(rgb_scale.r,rgb_scale.g,rgb_scale.b,0));l/=scale_L,c$3=c$3/scale_L*toe(l)/l,l=toe(l);let ret={mode:`okhsv`,s:c$3?(S_0+T)*C_v/(T*S_0+T*k$3*C_v):0,v:l?l/L_v:0};return ret.s&&(ret.h=normalizeHue_default(Math.atan2(b$1,a$1)*180/Math.PI)),lab$1.alpha!==void 0&&(ret.alpha=lab$1.alpha),ret}function convertOkhsvToOklab(hsv$1){let ret={mode:`oklab`};hsv$1.alpha!==void 0&&(ret.alpha=hsv$1.alpha);let h$1=hsv$1.h===void 0?0:hsv$1.h,s=hsv$1.s===void 0?0:hsv$1.s,v=hsv$1.v===void 0?0:hsv$1.v,a_=Math.cos(h$1/180*Math.PI),b_=Math.sin(h$1/180*Math.PI),[S_max,T]=get_ST_max(a_,b_),S_0=.5,k$3=1-S_0/S_max,L_v=1-s*S_0/(S_0+T-T*k$3*s),C_v=s*T*S_0/(S_0+T-T*k$3*s),L_vt=toe_inv(L_v),C_vt=C_v*L_vt/L_v,rgb_scale=convertOklabToLrgb_default({l:L_vt,a:a_*C_vt,b:b_*C_vt}),scale_L=Math.cbrt(1/Math.max(rgb_scale.r,rgb_scale.g,rgb_scale.b,0)),L_new=toe_inv(v*L_v),C$1=C_v*L_new/L_v;return ret.l=L_new*scale_L,ret.a=C$1*a_*scale_L,ret.b=C$1*b_*scale_L,ret}const modeOkhsv={...definition_default$6,mode:`okhsv`,channels:[`h`,`s`,`v`,`alpha`],parse:[`--okhsv`],serialize:`--okhsv`,fromMode:{oklab:convertOklabToOkhsv,rgb:c$3=>convertOklabToOkhsv(convertRgbToOklab_default(c$3))},toMode:{oklab:convertOkhsvToOklab,rgb:c$3=>convertOklabToRgb_default(convertOkhsvToOklab(c$3))}};var modeOkhsv_default=modeOkhsv;function parseOklab(color$2,parsed){if(!parsed||parsed[0]!==`oklab`)return;let res={mode:`oklab`},[,l,a$1,b$1,alpha$1]=parsed;if(!(l.type===Tok.Hue||a$1.type===Tok.Hue||b$1.type===Tok.Hue))return l.type!==Tok.None&&(res.l=Math.min(Math.max(0,l.type===Tok.Number?l.value:l.value/100),1)),a$1.type!==Tok.None&&(res.a=a$1.type===Tok.Number?a$1.value:a$1.value*.4/100),b$1.type!==Tok.None&&(res.b=b$1.type===Tok.Number?b$1.value:b$1.value*.4/100),alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseOklab_default=parseOklab;const definition$9={...definition_default$11,mode:`oklab`,toMode:{lrgb:convertOklabToLrgb_default,rgb:convertOklabToRgb_default},fromMode:{lrgb:convertLrgbToOklab_default,rgb:convertRgbToOklab_default},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[parseOklab_default],serialize:c$3=>`oklab(${c$3.l===void 0?`none`:c$3.l} ${c$3.a===void 0?`none`:c$3.a} ${c$3.b===void 0?`none`:c$3.b}${c$3.alpha<1?` / ${c$3.alpha}`:``})`};var definition_default$18=definition$9;function parseOklch(color$2,parsed){if(!parsed||parsed[0]!==`oklch`)return;let res={mode:`oklch`},[,l,c$3,h$1,alpha$1]=parsed;if(l.type!==Tok.None){if(l.type===Tok.Hue)return;res.l=Math.min(Math.max(0,l.type===Tok.Number?l.value:l.value/100),1)}if(c$3.type!==Tok.None&&(res.c=Math.max(0,c$3.type===Tok.Number?c$3.value:c$3.value*.4/100)),h$1.type!==Tok.None){if(h$1.type===Tok.Percentage)return;res.h=h$1.value}return alpha$1.type!==Tok.None&&(res.alpha=Math.min(1,Math.max(0,alpha$1.type===Tok.Number?alpha$1.value:alpha$1.value/100))),res}var parseOklch_default=parseOklch;const definition$8={...definition_default$13,mode:`oklch`,toMode:{oklab:c$3=>convertLchToLab_default(c$3,`oklab`),rgb:c$3=>convertOklabToRgb_default(convertLchToLab_default(c$3,`oklab`))},fromMode:{rgb:c$3=>convertLabToLch_default(convertRgbToOklab_default(c$3),`oklch`),oklab:c$3=>convertLabToLch_default(c$3,`oklch`)},parse:[parseOklch_default],serialize:c$3=>`oklch(${c$3.l===void 0?`none`:c$3.l} ${c$3.c===void 0?`none`:c$3.c} ${c$3.h===void 0?`none`:c$3.h}${c$3.alpha<1?` / ${c$3.alpha}`:``})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}};var definition_default$19=definition$8;const convertP3ToXyz65=rgb$2=>{let{r:r$1,g,b:b$1,alpha:alpha$1}=convertRgbToLrgb_default(rgb$2),res={mode:`xyz65`,x:.486570948648216*r$1+.265667693169093*g+.1982172852343625*b$1,y:.2289745640697487*r$1+.6917385218365062*g+.079286914093745*b$1,z:0*r$1+.0451133818589026*g+1.043944368900976*b$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertP3ToXyz65_default=convertP3ToXyz65;const convertXyz65ToP3=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res=convertLrgbToRgb_default({r:x$1*2.4934969119414263-y*.9313836179191242-.402710784450717*z$1,g:x$1*-.8294889695615749+y*1.7626640603183465+.0236246858419436*z$1,b:x$1*.0358458302437845-y*.0761723892680418+.9568845240076871*z$1},`p3`);return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToP3_default=convertXyz65ToP3;const definition$7={...definition_default$23,mode:`p3`,parse:[`display-p3`],serialize:`display-p3`,fromMode:{rgb:color$2=>convertXyz65ToP3_default(convertRgbToXyz65_default(color$2)),xyz65:convertXyz65ToP3_default},toMode:{rgb:color$2=>convertXyz65ToRgb_default(convertP3ToXyz65_default(color$2)),xyz65:convertP3ToXyz65_default}};var definition_default$20=definition$7;const gamma$1=v=>{let abs$2=Math.abs(v);return abs$2>=1/512?Math.sign(v)*abs$2**(1/1.8):16*v},convertXyz50ToProphoto=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`prophoto`,r:gamma$1(x$1*1.3457868816471585-y*.2555720873797946-.0511018649755453*z$1),g:gamma$1(x$1*-.5446307051249019+y*1.5082477428451466+.0205274474364214*z$1),b:gamma$1(x$1*0+y*0+1.2119675456389452*z$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToProphoto_default=convertXyz50ToProphoto;const linearize$1=(v=0)=>{let abs$2=Math.abs(v);return abs$2>=16/512?Math.sign(v)*abs$2**1.8:v/16},convertProphotoToXyz50=prophoto$1=>{let r$1=linearize$1(prophoto$1.r),g=linearize$1(prophoto$1.g),b$1=linearize$1(prophoto$1.b),res={mode:`xyz50`,x:.7977666449006423*r$1+.1351812974005331*g+.0313477341283922*b$1,y:.2880748288194013*r$1+.7118352342418731*g+899369387256e-16*b$1,z:0*r$1+0*g+.8251046025104602*b$1};return prophoto$1.alpha!==void 0&&(res.alpha=prophoto$1.alpha),res};var convertProphotoToXyz50_default=convertProphotoToXyz50;const definition$6={...definition_default$23,mode:`prophoto`,parse:[`prophoto-rgb`],serialize:`prophoto-rgb`,fromMode:{xyz50:convertXyz50ToProphoto_default,rgb:color$2=>convertXyz50ToProphoto_default(convertRgbToXyz50_default(color$2))},toMode:{xyz50:convertProphotoToXyz50_default,rgb:color$2=>convertXyz50ToRgb_default(convertProphotoToXyz50_default(color$2))}};var definition_default$21=definition$6;const α$1=1.09929682680944,β$1=.018053968510807,gamma=v=>{let abs$2=Math.abs(v);return abs$2>β$1?(Math.sign(v)||1)*(α$1*abs$2**.45-(α$1-1)):4.5*v},convertXyz65ToRec2020=({x:x$1,y,z:z$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`rec2020`,r:gamma(x$1*1.7166511879712683-y*.3556707837763925-.2533662813736599*z$1),g:gamma(x$1*-.6666843518324893+y*1.6164812366349395+.0157685458139111*z$1),b:gamma(x$1*.0176398574453108-y*.0427706132578085+.9421031212354739*z$1)};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToRec2020_default=convertXyz65ToRec2020;const α=1.09929682680944,β=.018053968510807,linearize=(v=0)=>{let abs$2=Math.abs(v);return abs$2<β*4.5?v/4.5:(Math.sign(v)||1)*((abs$2+α-1)/α)**(1/.45)},convertRec2020ToXyz65=rec2020$1=>{let r$1=linearize(rec2020$1.r),g=linearize(rec2020$1.g),b$1=linearize(rec2020$1.b),res={mode:`xyz65`,x:.6369580483012911*r$1+.1446169035862083*g+.1688809751641721*b$1,y:.262700212011267*r$1+.6779980715188708*g+.059301716469862*b$1,z:0*r$1+.0280726930490874*g+1.0609850577107909*b$1};return rec2020$1.alpha!==void 0&&(res.alpha=rec2020$1.alpha),res};var convertRec2020ToXyz65_default=convertRec2020ToXyz65;const definition$5={...definition_default$23,mode:`rec2020`,fromMode:{xyz65:convertXyz65ToRec2020_default,rgb:color$2=>convertXyz65ToRec2020_default(convertRgbToXyz65_default(color$2))},toMode:{xyz65:convertRec2020ToXyz65_default,rgb:color$2=>convertXyz65ToRgb_default(convertRec2020ToXyz65_default(color$2))},parse:[`rec2020`],serialize:`rec2020`};var definition_default$22=definition$5;const bias=.0037930732552754493,bias_cbrt=Math.cbrt(bias),transfer$1=v=>Math.cbrt(v)-bias_cbrt,convertRgbToXyb=color$2=>{let{r:r$1,g,b:b$1,alpha:alpha$1}=convertRgbToLrgb_default(color$2),l=transfer$1(.3*r$1+.622*g+.078*b$1+bias),m=transfer$1(.23*r$1+.692*g+.078*b$1+bias),s=transfer$1(.2434226892454782*r$1+.2047674442449682*g+.5518098665095535*b$1+bias),res={mode:`xyb`,x:(l-m)/2,y:(l+m)/2,b:s-(l+m)/2};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToXyb_default=convertRgbToXyb;const transfer=v=>(v+bias_cbrt)**3,convertXybToRgb=({x:x$1,y,b:b$1,alpha:alpha$1})=>{x$1===void 0&&(x$1=0),y===void 0&&(y=0),b$1===void 0&&(b$1=0);let l=transfer(x$1+y)-bias,m=transfer(y-x$1)-bias,s=transfer(b$1+y)-bias,res=convertLrgbToRgb_default({r:11.031566904639861*l-9.866943908131562*m-.16462299650829934*s,g:-3.2541473810744237*l+4.418770377582723*m-.16462299650829934*s,b:-3.6588512867136815*l+2.7129230459360922*m+1.9459282407775895*s});return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXybToRgb_default=convertXybToRgb;const definition$4={mode:`xyb`,channels:[`x`,`y`,`b`,`alpha`],parse:[`--xyb`],serialize:`--xyb`,toMode:{rgb:convertXybToRgb_default},fromMode:{rgb:convertRgbToXyb_default},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:interpolatorLinear,y:interpolatorLinear,b:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$24=definition$4;const definition$3={mode:`xyz50`,parse:[`xyz-d50`],serialize:`xyz-d50`,toMode:{rgb:convertXyz50ToRgb_default,lab:convertXyz50ToLab_default},fromMode:{rgb:convertRgbToXyz50_default,lab:convertLabToXyz50_default},channels:[`x`,`y`,`z`,`alpha`],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:interpolatorLinear,y:interpolatorLinear,z:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$25=definition$3;const convertXyz65ToXyz50=xyz65$1=>{let{x:x$1,y,z:z$1,alpha:alpha$1}=xyz65$1;x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`xyz50`,x:1.0479298208405488*x$1+.0229467933410191*y-.0501922295431356*z$1,y:.0296278156881593*x$1+.990434484573249*y-.0170738250293851*z$1,z:-.0092430581525912*x$1+.0150551448965779*y+.7518742899580008*z$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz65ToXyz50_default=convertXyz65ToXyz50;const convertXyz50ToXyz65=xyz50$1=>{let{x:x$1,y,z:z$1,alpha:alpha$1}=xyz50$1;x$1===void 0&&(x$1=0),y===void 0&&(y=0),z$1===void 0&&(z$1=0);let res={mode:`xyz65`,x:.9554734527042182*x$1-.0230985368742614*y+.0632593086610217*z$1,y:-.0283697069632081*x$1+1.0099954580058226*y+.021041398966943*z$1,z:.0123140016883199*x$1-.0205076964334779*y+1.3303659366080753*z$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertXyz50ToXyz65_default=convertXyz50ToXyz65;const definition$2={mode:`xyz65`,toMode:{rgb:convertXyz65ToRgb_default,xyz50:convertXyz65ToXyz50_default},fromMode:{rgb:convertRgbToXyz65_default,xyz50:convertXyz50ToXyz65_default},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:[`x`,`y`,`z`,`alpha`],parse:[`xyz`,`xyz-d65`],serialize:`xyz-d65`,interpolate:{x:interpolatorLinear,y:interpolatorLinear,z:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$26=definition$2;const convertRgbToYiq=({r:r$1,g,b:b$1,alpha:alpha$1})=>{r$1===void 0&&(r$1=0),g===void 0&&(g=0),b$1===void 0&&(b$1=0);let res={mode:`yiq`,y:.29889531*r$1+.58662247*g+.11448223*b$1,i:.59597799*r$1-.2741761*g-.32180189*b$1,q:.21147017*r$1-.52261711*g+.31114694*b$1};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertRgbToYiq_default=convertRgbToYiq;const convertYiqToRgb=({y,i,q,alpha:alpha$1})=>{y===void 0&&(y=0),i===void 0&&(i=0),q===void 0&&(q=0);let res={mode:`rgb`,r:y+.95608445*i+.6208885*q,g:y-.27137664*i-.6486059*q,b:y-1.10561724*i+1.70250126*q};return alpha$1!==void 0&&(res.alpha=alpha$1),res};var convertYiqToRgb_default=convertYiqToRgb;const definition$1={mode:`yiq`,toMode:{rgb:convertYiqToRgb_default},fromMode:{rgb:convertRgbToYiq_default},channels:[`y`,`i`,`q`,`alpha`],parse:[`--yiq`],serialize:`--yiq`,ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:interpolatorLinear,i:interpolatorLinear,q:interpolatorLinear,alpha:{use:interpolatorLinear,fixup:fixupAlpha}}};var definition_default$27=definition$1;const r=(value$1,precision)=>Math.round(value$1*(precision=10**precision))/precision,round$1=(precision=4)=>value$1=>typeof value$1==`number`?r(value$1,precision):value$1;var round_default=round$1;let twoDecimals=round_default(2);const clamp$1=value$1=>Math.max(0,Math.min(1,value$1||0)),fixup=value$1=>Math.round(clamp$1(value$1)*255),rgb$1=converter_default(`rgb`),hsl$1=converter_default(`hsl`),serializeHex=color$2=>{if(color$2===void 0)return;let r$1=fixup(color$2.r),g=fixup(color$2.g),b$1=fixup(color$2.b);return`#`+(1<<24|r$1<<16|g<<8|b$1).toString(16).slice(1)},serializeHex8=color$2=>{if(color$2===void 0)return;let a$1=fixup(color$2.alpha===void 0?1:color$2.alpha);return serializeHex(color$2)+(256|a$1).toString(16).slice(1)},formatCss=c$3=>{let color$2=_prepare_default(c$3);if(!color$2)return;let def$1=getMode(color$2.mode);if(!def$1.serialize||typeof def$1.serialize==`string`){let res=`color(${def$1.serialize||`--${color$2.mode}`} `;return def$1.channels.forEach((ch,i)=>{ch!==`alpha`&&(res+=(i?` `:``)+(color$2[ch]===void 0?`none`:color$2[ch]))}),color$2.alpha!==void 0&&color$2.alpha<1&&(res+=` / ${color$2.alpha}`),res+`)`}if(typeof def$1.serialize==`function`)return def$1.serialize(color$2)},formatHex=c$3=>serializeHex(rgb$1(c$3)),formatHex8=c$3=>serializeHex8(rgb$1(c$3)),a98=useMode(definition_default),cubehelix=useMode(definition_default$1),dlab=useMode(definition_default$2),dlch=useMode(definition_default$3),hsi=useMode(definition_default$4),hsl=useMode(definition_default$5),hsv=useMode(definition_default$6),hwb=useMode(definition_default$7),itp=useMode(definition_default$8),jab=useMode(definition_default$9),jch=useMode(definition_default$10),lab=useMode(definition_default$11),lab65=useMode(definition_default$12),lch=useMode(definition_default$13),lch65=useMode(definition_default$14),lchuv=useMode(definition_default$15),lrgb=useMode(definition_default$16),luv=useMode(definition_default$17),okhsl=useMode(modeOkhsl_default),okhsv=useMode(modeOkhsv_default),oklab=useMode(definition_default$18),oklch=useMode(definition_default$19),p3=useMode(definition_default$20),prophoto=useMode(definition_default$21),rec2020=useMode(definition_default$22),rgb=useMode(definition_default$23),xyb=useMode(definition_default$24),xyz50=useMode(definition_default$25),xyz65=useMode(definition_default$26),yiq=useMode(definition_default$27),_hoisted_1$39={"grid-col-span-2":``,"font-mono":``,text:`[10px]`},_hoisted_2$27={class:`mt-2 space-y-2`,bg:`white/90 dark:neutral-900/90`,"rounded-xl":``,"p-1":``},_hoisted_3$21={class:`relative h-48 w-full select-none overflow-hidden rounded-lg`},_hoisted_4$17={class:`relative h-6 w-full select-none overflow-hidden rounded-lg`},_hoisted_5$14={key:0,class:`relative h-6 w-full select-none overflow-hidden rounded-lg`},_hoisted_6$13={class:`flex justify-center gap-2`},_hoisted_7$9={class:`flex gap-2`},_hoisted_8$6={key:0,class:`flex gap-2`},_hoisted_9$5=[`value`],_hoisted_10$5=[`value`],_hoisted_11$4=[`value`],_hoisted_12$4=[`value`],_hoisted_13$4=[`value`],_hoisted_14$3=[`value`],_hoisted_15$2=[`value`],_hoisted_16$2=[`value`],_hoisted_17$2=[`value`],_hoisted_18$1=[`value`];var ColorPicker_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ColorPicker`,props:mergeModels({alpha:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},{modelValue:{required:!1,default:`#000000`},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`),colorMapRef=ref(),hueSliderRef=ref(),alphaSliderRef=ref(),popoverRef=ref(),isOpen=ref(!1),isDragging=ref(!1),dragType=ref(null),colorSpace=ref(`hex`),hue$2=ref(0),saturation=ref(100),value$1=ref(50),alphaValue=ref(1);function hexToRgb(hex$2){let result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex$2);return result?{r:Number.parseInt(result[1],16)/255,g:Number.parseInt(result[2],16)/255,b:Number.parseInt(result[3],16)/255}:null}function parseColor(color$2){if(!color$2)return{h:0,s:0,v:0,a:1};let temp=document.createElement(`div`);temp.style.color=color$2,document.body.appendChild(temp);let computed$2=getComputedStyle(temp).color;document.body.removeChild(temp);let rgbMatch=computed$2.match(/rgba?\(([^)]+)\)/);if(rgbMatch){let values=rgbMatch[1].split(`,`).map(v=>Number.parseFloat(v.trim())),rgb$3={r:values[0]/255,g:values[1]/255,b:values[2]/255},hsv$1=convertRgbToHsv(rgb$3);return{h:hsv$1.h||0,s:(hsv$1.s||0)*100,v:(hsv$1.v||0)*100,a:values[3]===void 0?1:values[3]}}let rgb$2=hexToRgb(color$2);if(rgb$2){let hsv$1=convertRgbToHsv(rgb$2);return{h:hsv$1.h||0,s:(hsv$1.s||0)*100,v:(hsv$1.v||0)*100,a:1}}return{h:0,s:0,v:0,a:1}}let currentColorHsv=computed(()=>({h:hue$2.value,s:saturation.value/100,v:value$1.value/100})),currentColorRgb=computed(()=>{let rgb$2=convertHsvToRgb(currentColorHsv.value);return{r:Math.round(rgb$2.r*255),g:Math.round(rgb$2.g*255),b:Math.round(rgb$2.b*255)}}),currentColorHex=computed(()=>{let{r:r$1,g,b:b$1}=currentColorRgb.value,hex$2=((1<<24)+(r$1<<16)+(g<<8)+b$1).toString(16).slice(1);return`#${hex$2}`}),pickerPosition=computed(()=>({left:`${saturation.value/100*100}%`,top:`${100-value$1.value/100*100}%`})),huePosition=computed(()=>({left:`${hue$2.value/360*100}%`})),alphaPosition=computed(()=>({left:`${alphaValue.value*100}%`})),colorMapBackground=computed(()=>({background:`linear-gradient(to right, white, hsl(${hue$2.value}, 100%, 50%))`})),alphaSliderBackground=computed(()=>{let{r:r$1,g,b:b$1}=currentColorRgb.value;return{background:`linear-gradient(to right, transparent, rgb(${r$1}, ${g}, ${b$1}))`}});function updateColorFromMap(x$1,y){if(!colorMapRef.value)return;let rect=colorMapRef.value.getBoundingClientRect(),newSaturation=Math.max(0,Math.min(100,x$1/rect.width*100)),newValue=Math.max(0,Math.min(100,(rect.height-y)/rect.height*100));saturation.value=newSaturation,value$1.value=newValue}function updateHue(x$1){if(!hueSliderRef.value)return;let rect=hueSliderRef.value.getBoundingClientRect(),newHue=Math.max(0,Math.min(360,x$1/rect.width*360));hue$2.value=newHue}function updateAlpha(x$1){if(!alphaSliderRef.value)return;let rect=alphaSliderRef.value.getBoundingClientRect(),newAlpha=Math.max(0,Math.min(1,x$1/rect.width));alphaValue.value=newAlpha}function handleColorMapStart(event){if(props.disabled)return;isDragging.value=!0,dragType.value=`map`;let clientX=`touches`in event?event.touches[0].clientX:event.clientX,clientY=`touches`in event?event.touches[0].clientY:event.clientY,rect=colorMapRef.value.getBoundingClientRect();updateColorFromMap(clientX-rect.left,clientY-rect.top),event.preventDefault()}function handleHueStart(event){if(props.disabled)return;isDragging.value=!0,dragType.value=`hue`;let clientX=`touches`in event?event.touches[0].clientX:event.clientX,rect=hueSliderRef.value.getBoundingClientRect();updateHue(clientX-rect.left),event.preventDefault()}function handleAlphaStart(event){if(props.disabled)return;isDragging.value=!0,dragType.value=`alpha`;let clientX=`touches`in event?event.touches[0].clientX:event.clientX,rect=alphaSliderRef.value.getBoundingClientRect();updateAlpha(clientX-rect.left),event.preventDefault()}function handleGlobalMove(event){if(!isDragging.value)return;event.preventDefault();let clientX=`touches`in event?event.touches[0].clientX:event.clientX,clientY=`touches`in event?event.touches[0].clientY:event.clientY;switch(dragType.value){case`map`:{let rect=colorMapRef.value.getBoundingClientRect();updateColorFromMap(clientX-rect.left,clientY-rect.top);break}case`hue`:{let rect=hueSliderRef.value.getBoundingClientRect();updateHue(clientX-rect.left);break}case`alpha`:{let rect=alphaSliderRef.value.getBoundingClientRect();updateAlpha(clientX-rect.left);break}}}function handleGlobalEnd(){isDragging.value&&(isDragging.value=!1,dragType.value=null,document.body.style.cursor=``)}watch(modelValue,newValue=>{if(newValue&&!isDragging.value){let parsed=parseColor(newValue);hue$2.value=parsed.h,saturation.value=parsed.s,value$1.value=parsed.v,alphaValue.value=parsed.a}},{immediate:!0}),watch(isDragging,dragging=>{dragging?document.body.style.cursor=`none`:document.body.style.cursor=``}),onMounted(()=>{useEventListener(`mousemove`,handleGlobalMove,{passive:!1}),useEventListener(`mouseup`,handleGlobalEnd),useEventListener(`touchmove`,handleGlobalMove,{passive:!1}),useEventListener(`touchend`,handleGlobalEnd),useEventListener(`click`,event=>{isOpen.value&&popoverRef.value&&!popoverRef.value.contains(event.target)&&(isOpen.value=!1)})});function handleHexInput(hex$2){let parsed=parseColor(hex$2);hue$2.value=parsed.h,saturation.value=parsed.s,value$1.value=parsed.v,alphaValue.value=parsed.a,modelValue.value=hex$2}function handleRgbInput(channel,val){let rgb$2={...currentColorRgb.value};rgb$2[channel]=Math.max(0,Math.min(255,val));let hsv$1=convertRgbToHsv({r:rgb$2.r/255,g:rgb$2.g/255,b:rgb$2.b/255});hue$2.value=hsv$1.h||0,saturation.value=(hsv$1.s||0)*100,value$1.value=(hsv$1.v||0)*100}function handleHsvInput(channel,val){switch(channel){case`h`:hue$2.value=Math.max(0,Math.min(360,val));break;case`s`:saturation.value=Math.max(0,Math.min(100,val));break;case`v`:value$1.value=Math.max(0,Math.min(100,val));break}}function handleAlphaInput(val){alphaValue.value=Math.max(0,Math.min(1,val/100))}return watch([hue$2,saturation,value$1,alphaValue],()=>{let rgb$2=convertHsvToRgb({h:hue$2.value,s:saturation.value/100,v:value$1.value/100,alpha:alphaValue.value});modelValue.value=formatHex8(rgb$2)},{immediate:!0}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(PopoverRoot_default),null,{default:withCtx(()=>[createVNode(unref(PopoverTrigger_default),{class:`grid grid-col-span-3 grid-cols-3 h-fit items-center`},{default:withCtx(()=>[createBaseVNode(`div`,{style:normalizeStyle({backgroundColor:modelValue.value}),"grid-col-span-1":``,"min-h-5":``,"rounded-md":``},null,4),createBaseVNode(`div`,_hoisted_1$39,toDisplayString(modelValue.value),1)]),_:1}),createVNode(unref(PopoverPortal_default),null,{default:withCtx(()=>[createVNode(unref(PopoverContent_default),{align:`start`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_2$27,[createBaseVNode(`div`,_hoisted_3$21,[createBaseVNode(`div`,{ref_key:`colorMapRef`,ref:colorMapRef,class:`relative h-full w-full cursor-crosshair`,style:normalizeStyle([colorMapBackground.value,{cursor:isDragging.value&&dragType.value===`map`?`none`:`crosshair`}]),onMousedown:handleColorMapStart,onTouchstart:handleColorMapStart},[_cache$1[11]||=createBaseVNode(`div`,{class:`absolute inset-0`,style:{background:`linear-gradient(to bottom, transparent, black)`}},null,-1),createBaseVNode(`div`,{class:`pointer-events-none absolute h-4 w-4 border-2 border-white rounded-full shadow-lg transition-transform`,style:normalizeStyle([pickerPosition.value,{transform:`translate(-50%, -50%) ${isDragging.value&&dragType.value===`map`?`scale(1.2)`:`scale(1)`}`,backgroundColor:modelValue.value}])},null,4)],36)]),createBaseVNode(`div`,_hoisted_4$17,[createBaseVNode(`div`,{ref_key:`hueSliderRef`,ref:hueSliderRef,class:`hue-slider h-full w-full cursor-pointer`,style:normalizeStyle([{background:`linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)`},{cursor:isDragging.value&&dragType.value===`hue`?`none`:`pointer`}]),onMousedown:handleHueStart,onTouchstart:handleHueStart},[createBaseVNode(`div`,{class:`pointer-events-none absolute top-0 h-14 w-1 cursor-pointer cursor-col-resize appearance-none bg-white shadow-lg transition-colors,transform,width,height duration-200 hover:h-13 hover:w-2 hover:bg-neutral-800`,style:normalizeStyle([huePosition.value,{transform:`translateX(-50%) ${isDragging.value&&dragType.value===`hue`?`scaleY(1.2)`:`scaleY(1)`}`}])},null,4)],36)]),_ctx.alpha?(openBlock(),createElementBlock(`div`,_hoisted_5$14,[_cache$1[12]||=createBaseVNode(`div`,{class:`alpha-slider absolute inset-0 opacity-50`,style:{"background-image":`linear-gradient(45deg, #ccc 25%, transparent 25%), + linear-gradient(-45deg, #ccc 25%, transparent 25%), + linear-gradient(45deg, transparent 75%, #ccc 75%), + linear-gradient(-45deg, transparent 75%, #ccc 75%)`,"background-size":`8px 8px`,"background-position":`0 0, 0 4px, 4px -4px, -4px 0px`}},null,-1),createBaseVNode(`div`,{ref_key:`alphaSliderRef`,ref:alphaSliderRef,class:`relative h-full w-full cursor-pointer`,style:normalizeStyle([alphaSliderBackground.value,{cursor:isDragging.value&&dragType.value===`alpha`?`none`:`pointer`}]),onMousedown:handleAlphaStart,onTouchstart:handleAlphaStart},[createBaseVNode(`div`,{class:`pointer-events-none absolute top-0 h-14 w-1 cursor-pointer cursor-col-resize appearance-none bg-white shadow-lg transition-colors,transform,width,height duration-200 hover:h-13 hover:w-2 hover:bg-neutral-800`,style:normalizeStyle([alphaPosition.value,{transform:`translateX(-50%) ${isDragging.value&&dragType.value===`alpha`?`scaleY(1.2)`:`scaleY(1)`}`}])},null,4)],36)])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_6$13,[createBaseVNode(`div`,_hoisted_7$9,[withDirectives(createBaseVNode(`select`,{"onUpdate:modelValue":_cache$1[0]||=$event=>colorSpace.value=$event,class:`flex-shrink-0 border rounded-lg px-2 py-1 text-sm`},_cache$1[13]||=[createBaseVNode(`option`,{value:`hex`},` HEX `,-1),createBaseVNode(`option`,{value:`rgb`},` RGB `,-1),createBaseVNode(`option`,{value:`hsv`},` HSV `,-1)],512),[[vModelSelect,colorSpace.value]])]),colorSpace.value===`hex`?(openBlock(),createElementBlock(`div`,_hoisted_8$6,[createBaseVNode(`input`,{value:currentColorHex.value,class:`flex-1 border rounded-lg px-2 py-1 text-sm font-mono`,placeholder:`#000000`,onInput:_cache$1[1]||=$event=>handleHexInput(($event?.target).value)},null,40,_hoisted_9$5),_ctx.alpha?(openBlock(),createElementBlock(`input`,{key:0,type:`number`,value:Math.round(alphaValue.value*100),min:`0`,max:`100`,class:`w-16 border border-neutral-200 rounded-lg px-2 py-1 text-sm dark:border-neutral-700`,placeholder:`A%`,onInput:_cache$1[2]||=$event=>handleAlphaInput(Number(($event?.target).value))},null,40,_hoisted_10$5)):createCommentVNode(``,!0)])):colorSpace.value===`rgb`?(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`grid gap-2`,_ctx.alpha?`grid-cols-4`:`grid-cols-3`])},[createBaseVNode(`input`,{type:`number`,value:currentColorRgb.value.r,min:`0`,max:`255`,class:`border border-neutral-200 rounded-lg px-2 py-1 text-sm dark:border-neutral-700`,placeholder:`R`,onInput:_cache$1[3]||=$event=>handleRgbInput(`r`,Number(($event?.target).value))},null,40,_hoisted_11$4),createBaseVNode(`input`,{type:`number`,value:currentColorRgb.value.g,min:`0`,max:`255`,class:`border border-neutral-200 rounded-lg px-2 py-1 text-sm dark:border-neutral-700`,placeholder:`G`,onInput:_cache$1[4]||=$event=>handleRgbInput(`g`,Number(($event?.target).value))},null,40,_hoisted_12$4),createBaseVNode(`input`,{type:`number`,value:currentColorRgb.value.b,min:`0`,max:`255`,class:`border border-neutral-200 rounded-lg px-2 py-1 text-sm dark:border-neutral-700`,placeholder:`B`,onInput:_cache$1[5]||=$event=>handleRgbInput(`b`,Number(($event?.target).value))},null,40,_hoisted_13$4),_ctx.alpha?(openBlock(),createElementBlock(`input`,{key:0,type:`number`,value:Math.round(alphaValue.value*100),min:`0`,max:`100`,class:`border border-neutral-200 rounded-lg px-2 py-1 text-sm dark:border-neutral-700`,placeholder:`A%`,onInput:_cache$1[6]||=$event=>handleAlphaInput(Number(($event?.target).value))},null,40,_hoisted_14$3)):createCommentVNode(``,!0)],2)):colorSpace.value===`hsv`?(openBlock(),createElementBlock(`div`,{key:2,class:normalizeClass([`grid gap-2`,_ctx.alpha?`grid-cols-4`:`grid-cols-3`])},[createBaseVNode(`input`,{type:`number`,value:Math.round(hue$2.value),min:`0`,max:`360`,class:`border border-neutral-200 rounded-lg px-2 py-1 text-sm dark:border-neutral-700`,placeholder:`H°`,onInput:_cache$1[7]||=$event=>handleHsvInput(`h`,Number(($event?.target).value))},null,40,_hoisted_15$2),createBaseVNode(`input`,{type:`number`,value:Math.round(saturation.value),min:`0`,max:`100`,class:`border border-neutral-200 rounded-lg px-2 py-1 text-sm dark:border-neutral-700`,placeholder:`S%`,onInput:_cache$1[8]||=$event=>handleHsvInput(`s`,Number(($event?.target).value))},null,40,_hoisted_16$2),createBaseVNode(`input`,{type:`number`,value:Math.round(value$1.value),min:`0`,max:`100`,class:`border border-neutral-200 rounded-lg px-2 py-1 text-sm dark:border-neutral-700`,placeholder:`V%`,onInput:_cache$1[9]||=$event=>handleHsvInput(`v`,Number(($event?.target).value))},null,40,_hoisted_17$2),_ctx.alpha?(openBlock(),createElementBlock(`input`,{key:0,type:`number`,value:Math.round(alphaValue.value*100),min:`0`,max:`100`,class:`border border-neutral-200 rounded-lg px-2 py-1 text-sm dark:border-neutral-700`,placeholder:`A%`,onInput:_cache$1[10]||=$event=>handleAlphaInput(Number(($event?.target).value))},null,40,_hoisted_18$1)):createCommentVNode(``,!0)],2)):createCommentVNode(``,!0)])])]),_:1})]),_:1})]),_:1}))}}),ColorPicker_default=ColorPicker_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$38={"text-nowrap":``,"text-xs":``};var PropertyColor_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`PropertyColor`,props:mergeModels({label:{default:`Color Picker`}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode(`div`,null,[renderSlot(_ctx.$slots,`label`,{},()=>[createBaseVNode(`span`,_hoisted_1$38,toDisplayString(props.label),1)])]),_cache$1[1]||=createBaseVNode(`div`,null,null,-1),createVNode(ColorPicker_default,{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event},null,8,[`modelValue`])],64))}}),PropertyColor_default=PropertyColor_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$37={"text-nowrap":``,"text-xs":``},_hoisted_2$26={h:`5`,"grid-col-span-2":``,"w-full":``},_hoisted_3$20=[`value`,`min`,`max`,`step`,`disabled`],_hoisted_4$16={bg:`neutral-100 dark:neutral-900`,"h-fit":``,"min-w-12":``,"inline-flex":``,"items-center":``,"rounded-md":``,px:`1.5`,py:`0.5`},_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":``,"font-mono":``,"outline-none":``,transition:`all duration-200 ease-in-out`,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-c1b3c1a7`]]);const _hoisted_1$36={"text-nowrap":``,"text-xs":``},_hoisted_2$25={"h-fit":``,"inline-flex":``,"items-center":``,text:`[12px]`,"gap-1":``},_hoisted_3$19=[`value`,`min`,`max`],_hoisted_4$15={"h-fit":``,"inline-flex":``,"items-center":``,text:`[12px]`,"gap-1":``},_hoisted_5$12=[`value`,`min`,`max`],_hoisted_6$11={"h-fit":``,"inline-flex":``,"items-center":``,text:`[12px]`,"gap-1":``},_hoisted_7$8=[`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`,{"h-fit":``,"w-full":``,"inline-flex":``,"items-center":``,"rounded-md":``,px:`1.5`,py:`0.5`,class:normalizeClass([isDragging.value===`x`?`bg-red-100/50 dark:bg-red-900/50`:`bg-neutral-100 dark:bg-neutral-900`]),transition:`colors duration-200 ease-in-out`},[createBaseVNode(`span`,_hoisted_2$25,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,"text-red-500":``,onMousedown:_cache$1[0]||=e$4=>startDrag(`x`,e$4)},`|`,32),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_3$19)])],2),createBaseVNode(`label`,{"h-fit":``,"inline-flex":``,"items-center":``,"rounded-md":``,px:`1.5`,py:`0.5`,class:normalizeClass([isDragging.value===`y`?`bg-blue-100/50 dark:bg-blue-900/50`:`bg-neutral-100 dark:bg-neutral-900`]),transition:`colors duration-200 ease-in-out`},[createBaseVNode(`span`,_hoisted_4$15,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,"text-blue-500":``,onMousedown:_cache$1[2]||=e$4=>startDrag(`y`,e$4)},`|`,32),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_5$12)])],2),createBaseVNode(`label`,{"h-fit":``,"inline-flex":``,"items-center":``,"rounded-md":``,px:`1.5`,py:`0.5`,class:normalizeClass([isDragging.value===`z`?`bg-green-100/50 dark:bg-green-900/50`:`bg-neutral-100 dark:bg-neutral-900`]),transition:`colors duration-200 ease-in-out`},[createBaseVNode(`span`,_hoisted_6$11,[createBaseVNode(`span`,{"cursor-col-resize":``,"select-none":``,"text-green-500":``,onMousedown:_cache$1[4]||=e$4=>startDrag(`z`,e$4)},`|`,32),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_7$8)])],2)],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;function colorToChromaticColor(color$2){return{color:color$2,withAlpha:alpha$1=>{let rgba$1=oklch(color$2);if(!rgba$1)throw Error(`Invalid color provided for alpha adjustment`);return colorToChromaticColor(oklch({mode:`oklch`,l:rgba$1.l,c:rgba$1.c,h:rgba$1.h,alpha:alpha$1}))},toHex:()=>formatHex(color$2),toCSS:()=>formatCss(color$2)}}function chromaticPaletteFrom(baseHue=200,baseChroma){let chroma=baseChroma??.18+Math.cos(baseHue*Math.PI/180)*.04,shadeConfig={50:{lightness:.95,chromaMultiplier:.3,mixWithWhite:.7},100:{lightness:.95,chromaMultiplier:.5,mixWithWhite:.2},200:{lightness:.9,chromaMultiplier:.6},300:{lightness:.85,chromaMultiplier:.75},400:{lightness:.74,chromaMultiplier:.85},500:{lightness:.62,chromaMultiplier:1},600:{lightness:.54,chromaMultiplier:1.15},700:{lightness:.49,chromaMultiplier:1.1},800:{lightness:.42,chromaMultiplier:.85},900:{lightness:.37,chromaMultiplier:.7},950:{lightness:.29,chromaMultiplier:.5}},shadeBy=(shade,alpha$1,hueOffset=0)=>{let config$1=shadeConfig[shade],adjustedHue=(baseHue+hueOffset)%360,adjustedChroma=chroma*config$1.chromaMultiplier,baseColor=oklch({mode:`oklch`,l:config$1.lightness,c:adjustedChroma,h:adjustedHue,alpha:alpha$1??1});if(config$1.mixWithWhite){let white=oklch({mode:`oklch`,l:1,c:0,h:0,alpha:alpha$1??1});return colorToChromaticColor(mixColors(baseColor,white,config$1.mixWithWhite))}return colorToChromaticColor(baseColor)};return{baseHue,chroma,getAllShades:(alpha$1,hueOffset=0)=>{let shades={};for(let shadeKey of Object.keys(shadeConfig)){let shade=Number.parseInt(shadeKey);shades[shade]=shadeBy(shade,alpha$1,hueOffset)}return shades},shadeBy}}function mixColors(color1,color2,ratio=.5){let c1=oklch(color1),c2=oklch(color2);if(!c1||!c2)throw Error(`Invalid colors provided for mixing`);return oklch({mode:`oklch`,l:c1.l*(1-ratio)+c2.l*ratio,c:c1.c*(1-ratio)+c2.c*ratio,h:mixHues(c1.h??0,c2.h??0,ratio)})}function mixHues(h1,h2,ratio){let diff=h2-h1;return diff>180&&(diff-=360),diff<-180&&(diff+=360),(h1+diff*ratio+360)%360}let Emotion=function(Emotion$1){return Emotion$1.Idle=`<|EMOTE_NEUTRAL|>`,Emotion$1.Happy=`<|EMOTE_HAPPY|>`,Emotion$1.Sad=`<|EMOTE_SAD|>`,Emotion$1.Angry=`<|EMOTE_ANGRY|>`,Emotion$1.Think=`<|EMOTE_THINK|>`,Emotion$1.Surprise=`<|EMOTE_SURPRISE|>`,Emotion$1.Awkward=`<|EMOTE_AWKWARD|>`,Emotion$1.Question=`<|EMOTE_QUESTION|>`,Emotion$1}({});const EMOTION_VALUES=Object.values(Emotion),EmotionHappyMotionName=`Happy`,EmotionSadMotionName=`Sad`,EmotionAngryMotionName=`Angry`,EmotionAwkwardMotionName=`Awkward`,EmotionThinkMotionName=`Think`,EmotionSurpriseMotionName=`Surprise`,EmotionQuestionMotionName=`Question`,EmotionNeutralMotionName=`Idle`,EMOTION_EmotionMotionName_value={[Emotion.Happy]:EmotionHappyMotionName,[Emotion.Sad]:EmotionSadMotionName,[Emotion.Angry]:EmotionAngryMotionName,[Emotion.Think]:EmotionThinkMotionName,[Emotion.Surprise]:EmotionSurpriseMotionName,[Emotion.Awkward]:EmotionAwkwardMotionName,[Emotion.Question]:EmotionQuestionMotionName,[Emotion.Idle]:EmotionNeutralMotionName},EMOTION_VRMExpressionName_value={[Emotion.Happy]:`happy`,[Emotion.Sad]:`sad`,[Emotion.Angry]:`angry`,[Emotion.Think]:void 0,[Emotion.Surprise]:`surprised`,[Emotion.Awkward]:void 0,[Emotion.Question]:void 0,[Emotion.Idle]:void 0},chromaticHue=Symbol(`@proj-airi/chromatic-hue`);function message(prefix,suffix){return{role:`system`,content:[prefix,EMOTION_VALUES.map(emotion=>`- ${emotion}`).join(` `),suffix].join(` -`)}}var system_v2_default=message;const chromaticHueDefault=220.44,llmInferenceEndToken=`<|llm_inference_end|>`,_hoisted_1$32={key:0,class:`flex items-center justify-between`},_hoisted_2$22={class:`text-sm font-medium`},_hoisted_3$16={class:`text-xs text-neutral-500`},_hoisted_4$13={class:`h-full w-full`},_hoisted_5$10={id:`below-threshold-gradient`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},_hoisted_6$9=[`fill`],_hoisted_7$6=[`y`,`height`,`fill`],_hoisted_8$5=[`y1`,`y2`,`stroke`,`fill`],_hoisted_9$4=[`d`,`fill`],_hoisted_10$4=[`d`,`stroke`,`stroke-width`],_hoisted_11$3={key:0,class:`absolute left-2 top-2 flex items-center gap-1.5 border border-primary-200 rounded-md bg-primary-50 px-2 py-1 dark:border-primary-800 dark:bg-primary-900`},_hoisted_12$3={class:`text-xs text-primary-700 font-medium dark:text-primary-300`},_hoisted_13$3={key:1,class:`flex flex-wrap items-center justify-between text-xs text-neutral-500`},_hoisted_14$2={class:`flex items-center gap-3`},_hoisted_15$1={class:`flex items-center gap-1 text-nowrap`},_hoisted_16$1={class:`flex items-center gap-1 text-nowrap`},_hoisted_17$1={key:0,class:`text-nowrap`};var TimeSeriesChart_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TimeSeriesChart`,props:{history:{},currentValue:{},threshold:{default:null},isActive:{type:Boolean},title:{default:`Time Series`},colorsHue:{},lineColor:{},thresholdColor:{},activeColor:{},inactiveColor:{},subtitle:{default:`Recent data`},activeLabel:{default:`Active`},activeLegendLabel:{default:`Active state`},inactiveLegendLabel:{default:`Inactive state`},thresholdLabel:{default:`Threshold`},height:{default:80},lineWidth:{default:1.5},chartHeight:{},minDataPoints:{default:5},precision:{default:0},unit:{default:`%`},showHeader:{type:Boolean,default:!0},showThreshold:{type:Boolean,default:!0},showArea:{type:Boolean,default:!0},showThresholdAreas:{type:Boolean,default:!0},showCurrentValue:{type:Boolean,default:!0},showActiveIndicator:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},formatValue:{}},setup(__props){let props=__props,chartHeight=computed(()=>props.height),timeSeriesChartRef=ref(),chromaticHue$1=inject(chromaticHue,chromaticHueDefault),chromaticHueOrDefault=toRef(()=>props.colorsHue||chromaticHue$1||chromaticHueDefault),chromaticShades=computed(()=>chromaticPaletteFrom(chromaticHueOrDefault.value)),timeSeriesChartContainerBounding=useElementBounding(timeSeriesChartRef,{windowResize:!0});watch([chromaticHueOrDefault,timeSeriesChartRef],()=>{timeSeriesChartRef.value&&timeSeriesChartRef.value.style.setProperty(`--chromatic-hue`,chromaticHueOrDefault.value.toString())},{immediate:!0});let lineColorProps=toRef(()=>props.lineColor),lineColor=computed(()=>lineColorProps.value?lineColorProps.value:chromaticShades.value.shadeBy(500).toHex()),thresholdColorProps=toRef(()=>props.thresholdColor),thresholdColor=computed(()=>{if(!thresholdColorProps.value){let color$2=chromaticShades.value.shadeBy(500).withAlpha(.1).color;return`oklch(${color$2.l} ${color$2.c} ${color$2.h} / ${color$2.alpha})`}return thresholdColorProps.value}),activeColorProps=toRef(()=>props.activeColor),activeColor=computed(()=>activeColorProps.value?activeColorProps.value:chromaticShades.value.shadeBy(600).toHex()),inactiveColorProps=toRef(()=>props.inactiveColor),inactiveColor=computed(()=>inactiveColorProps.value?inactiveColorProps.value:chromaticShades.value.shadeBy(400).toHex()),componentId=Math.random().toString(36).substring(2,9),gridPatternId=`grid-${componentId}`,areaGradientId=`area-gradient-${componentId}`,thresholdGradientId=`threshold-gradient-${componentId}`,normalizedThreshold=computed(()=>props.threshold===null?0:Math.max(0,Math.min(1,props.threshold))),thresholdLineY=computed(()=>props.threshold===null?0:chartHeight.value-normalizedThreshold.value*chartHeight.value),smoothPath=computed(()=>{let history$1=props.history;if(history$1.length<2)return``;let width=timeSeriesChartContainerBounding.width.value,height=chartHeight.value,path=`M0,${height-history$1[0]*height}`;for(let i=1;i{let history$1=props.history;if(history$1.length<2)return``;let width=timeSeriesChartContainerBounding.width.value,height=chartHeight.value,path=`M0,${height} L0,${height-history$1[0]*height}`;for(let i=1;i_ctx.history.length>_ctx.minDataPoints?(openBlock(),createElementBlock(`div`,{key:0,ref_key:`timeSeriesChartRef`,ref:timeSeriesChartRef,class:`time-series-chart space-y-3`},[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$32,[createBaseVNode(`div`,_hoisted_2$22,toDisplayString(_ctx.title),1),createBaseVNode(`div`,_hoisted_3$16,toDisplayString(_ctx.subtitle),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`relative overflow-hidden border border-neutral-200 rounded-lg from-neutral-50 to-neutral-100 bg-gradient-to-b dark:border-neutral-800 dark:from-neutral-800 dark:to-neutral-900`,style:normalizeStyle({height:`${chartHeight.value}px`})},[(openBlock(),createElementBlock(`svg`,_hoisted_4$13,[createBaseVNode(`defs`,null,[createBaseVNode(`pattern`,{id:gridPatternId,width:`20`,height:`10`,patternUnits:`userSpaceOnUse`},_cache$1[0]||=[createBaseVNode(`path`,{d:`M 20 0 L 0 0 0 10`,fill:`none`,stroke:`rgb(156 163 175 / 0.1)`,"stroke-width":`0.5`},null,-1)]),createBaseVNode(`linearGradient`,{id:areaGradientId,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.3`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.15`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.05`)},null,4)]),createBaseVNode(`linearGradient`,{id:thresholdGradientId,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.3`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.15`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.05`)},null,4)]),createBaseVNode(`linearGradient`,_hoisted_5$10,[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.2`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.1`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.05`)},null,4)])]),createBaseVNode(`rect`,{width:`100%`,height:`100%`,fill:`url(#${gridPatternId})`},null,8,_hoisted_6$9),_ctx.showThreshold&&_ctx.threshold!==null?(openBlock(),createElementBlock(`rect`,{key:0,x:`0`,y:thresholdLineY.value,width:`100%`,height:chartHeight.value-thresholdLineY.value,fill:thresholdColor.value,class:`transition-all duration-300`},null,8,_hoisted_7$6)):createCommentVNode(``,!0),_ctx.showThreshold&&_ctx.threshold!==null?(openBlock(),createElementBlock(`line`,{key:1,x1:`0`,y1:thresholdLineY.value,x2:`100%`,y2:thresholdLineY.value,stroke:thresholdColor.value,"stroke-width":`1.5`,"stroke-dasharray":`4,4`,fill:thresholdColor.value,class:`transition-all duration-300`},null,8,_hoisted_8$5)):createCommentVNode(``,!0),dataAreaPath.value&&_ctx.showArea?(openBlock(),createElementBlock(`path`,{key:2,d:dataAreaPath.value,fill:`url(#${areaGradientId})`,class:`transition-all duration-75`},null,8,_hoisted_9$4)):createCommentVNode(``,!0),smoothPath.value?(openBlock(),createElementBlock(`path`,{key:3,d:smoothPath.value,fill:`none`,stroke:lineColor.value,"stroke-width":_ctx.lineWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`drop-shadow-sm transition-all duration-75`},null,8,_hoisted_10$4)):createCommentVNode(``,!0)])),_ctx.showCurrentValue?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`absolute right-2 top-2 border border-neutral-200 rounded-md bg-white px-2 py-1 shadow-sm transition-all duration-200 dark:border-neutral-700 dark:bg-neutral-800`,_ctx.isActive?`bg-primary-50 dark:bg-primary-900 border-primary-200 dark:border-primary-800`:``])},[createBaseVNode(`div`,{class:normalizeClass([`text-xs font-medium`,_ctx.isActive?`text-primary-700 dark:text-primary-300`:`text-neutral-600 dark:text-neutral-400`])},toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.currentValue):`${(_ctx.currentValue*100).toFixed(_ctx.precision)}${_ctx.unit}`),3)],2)):createCommentVNode(``,!0),createVNode(Transition,{name:`fade`},{default:withCtx(()=>[_ctx.isActive&&_ctx.showActiveIndicator?(openBlock(),createElementBlock(`div`,_hoisted_11$3,[_cache$1[1]||=createBaseVNode(`div`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-500`},null,-1),createBaseVNode(`span`,_hoisted_12$3,toDisplayString(_ctx.activeLabel),1)])):createCommentVNode(``,!0)]),_:1})],4),_ctx.showLegend?(openBlock(),createElementBlock(`div`,_hoisted_13$3,[createBaseVNode(`div`,_hoisted_14$2,[createBaseVNode(`span`,_hoisted_15$1,[createBaseVNode(`div`,{class:`h-2 w-2 rounded-full`,style:normalizeStyle({backgroundColor:activeColor.value})},null,4),createTextVNode(` `+toDisplayString(_ctx.activeLegendLabel),1)]),createBaseVNode(`span`,_hoisted_16$1,[createBaseVNode(`div`,{class:`h-2 w-2 rounded-full`,style:normalizeStyle({backgroundColor:inactiveColor.value})},null,4),createTextVNode(` `+toDisplayString(_ctx.inactiveLegendLabel),1)])]),_ctx.threshold===null?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_17$1,toDisplayString(_ctx.thresholdLabel)+`: `+toDisplayString((_ctx.threshold*100).toFixed(0))+`%`,1))])):createCommentVNode(``,!0)],512)):createCommentVNode(``,!0)}}),TimeSeriesChart_default=__plugin_vue_export_helper_default(TimeSeriesChart_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-6b4f300d`]]),Callout_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Callout`,props:{theme:{default:`primary`},label:{}},setup(__props){let props=__props,themeClasses={primary:{container:[`text-neutral-700/80 dark:text-neutral-300/80`,`bg-primary-50/60 dark:bg-primary-50/10 backdrop-blur-md`,`before:bg-primary-200 dark:bg-primary-900/10 before:content-[''] before:dark:bg-primary-900`],label:[`text-primary-500 dark:text-primary-400 font-semibold`]},lime:{container:[`text-neutral-700/80 dark:text-neutral-300/80`,`bg-lime-50/60 dark:bg-lime-50/10 backdrop-blur-md`,`before:bg-lime-200 dark:bg-lime-900/10 before:content-[''] before:dark:bg-lime-900`],label:[`text-lime-500 dark:text-lime-400 font-semibold`]},violet:{container:[`text-neutral-700/80 dark:text-neutral-300/80`,`bg-violet-50/60 dark:bg-violet-50/10 backdrop-blur-md`,`before:bg-violet-200 dark:bg-violet-900/10 before:content-[''] before:dark:bg-violet-900`],label:[`text-violet-500 dark:text-violet-400 font-semibold`]},orange:{container:[`text-neutral-700/80 dark:text-neutral-300/80`,`bg-orange-50/70 dark:bg-orange-50/10 backdrop-blur-md`,`before:bg-orange-200 dark:bg-orange-900/10 before:content-[''] before:dark:bg-orange-900`],label:[`text-orange-500 dark:text-orange-400 font-semibold`]}};return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{relative:``,"mb-4":``,flex:``,"flex-col":``,"gap-1":``,"overflow-hidden":``,"rounded-lg":``,py:`2.5`,pl:`6.5`,"pr-3":``,class:normalizeClass([...themeClasses[props.theme||`violet`].container,`before-position-absolute before:left-3 before:right-0 before:h-[calc(100%-2rem)] before:top-50% before:translate-y--50% before:w-1 before:rounded-full`])},[createBaseVNode(`div`,{text:`font-semibold`,class:normalizeClass([...themeClasses[props.theme||`violet`].label||[]])},[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label||`Callout`),1)])],2),renderSlot(_ctx.$slots,`default`)],2))}}),Callout_default=Callout_vue_vue_type_script_setup_true_lang_default;const __vite_import_meta_env__={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`},motionState={};var SubscriptionManager=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(value$1){return!Number.isNaN(Number.parseFloat(value$1))}var MotionValue=class{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new SubscriptionManager;stopAnimation;canTrackVelocity=!1;constructor(init){this.prev=this.current=init,this.canTrackVelocity=isFloat(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(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(init){return new MotionValue(init)}const{isArray:isArray$2}=Array;function useMotionValues(){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$2(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(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(v){return Array.isArray(v)}function underDampedSpring(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function criticallyDampedSpring(to$1){return{type:`spring`,stiffness:550,damping:to$1===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function overDampedSpring(to$1){return{type:`spring`,stiffness:550,damping:to$1===0?100:30,restDelta:.01,restSpeed:10}}function linearTween(){return{type:`keyframes`,ease:`linear`,duration:300}}function keyframes$1(values){return{type:`keyframes`,duration:800,values}}const defaultTransitions={default:overDampedSpring,x:underDampedSpring,y:underDampedSpring,z:underDampedSpring,rotate:underDampedSpring,rotateX:underDampedSpring,rotateY:underDampedSpring,rotateZ:underDampedSpring,scaleX:criticallyDampedSpring,scaleY:criticallyDampedSpring,scale:criticallyDampedSpring,backgroundColor:linearTween,color:linearTween,opacity:linearTween};function getDefaultTransition(valueKey,to$1){let transitionFactory;return transitionFactory=isKeyframesTarget(to$1)?keyframes$1:defaultTransitions[valueKey]||defaultTransitions.default,{to:to$1,...transitionFactory(to$1)}}const int$1={...number$4,transform:Math.round},valueTypes$1={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$1,filter,WebkitFilter:filter,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int$1},getValueType=key$2=>valueTypes$1[key$2];function getValueAsType(value$1,type){return type&&typeof value$1==`number`&&type.transform?type.transform(value$1):value$1}function getAnimatableNone(key$2,value$1){let defaultValueType=getValueType(key$2);return defaultValueType!==filter&&(defaultValueType=complex),defaultValueType.getAnimatableNone?defaultValueType.getAnimatableNone(value$1):void 0}const easingLookup={linear:linear$1,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate,bounceIn,bounceInOut,bounceOut};function easingDefinitionToFunction(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[definition$29];return definition$29}function isEasingArray(ease){return Array.isArray(ease)&&typeof ease[0]!=`number`}function isAnimatable(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(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({ease,times,delay,...transition}){let options$1={...transition};return times&&(options$1.offset=times),ease&&(options$1.ease=isEasingArray(ease)?ease.map(easingDefinitionToFunction):easingDefinitionToFunction(ease)),delay&&(options$1.elapsed=-delay),options$1}function getPopmotionAnimationOptions(transition,options$1,key$2){return Array.isArray(options$1.to)&&(transition.duration||=800),hydrateKeyframes(options$1),!isTransitionDefined(transition)&&(transition={...transition,...getDefaultTransition(key$2,options$1.to)}),{...options$1,...convertTransitionToAnimationOptions(transition)}}function isTransitionDefined({delay,repeat,repeatType,repeatDelay,from,...transition}){return!!Object.keys(transition).length}function getValueTransition(transition,key$2){return transition[key$2]||transition.default||transition}function getAnimation(key$2,value$1,target$1,transition,onComplete){let valueTransition=getValueTransition(transition,key$2),origin=valueTransition.from===null||valueTransition.from===void 0?value$1.get():valueTransition.from,isTargetAnimatable=isAnimatable(key$2,target$1);origin===`none`&&isTargetAnimatable&&typeof target$1==`string`&&(origin=getAnimatableNone(key$2,target$1));let isOriginAnimatable=isAnimatable(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(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(){let{motionValues,stop:stop$1,get}=useMotionValues(),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(key$2,motionValue,value$1,transition,onComplete);motionValue.start(animation)};return{motionValues,stop:stop$1,push:push$1}}function useMotionControls(motionProperties,variants={},{motionValues,push:push$1,stop:stop$1}=useMotionTransitions()){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(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$1=typeof window<`u`,supportsPointerEvents=()=>isBrowser$1&&(window.onpointerdown===null||__vite_import_meta_env__?.TEST),supportsTouchEvents=()=>isBrowser$1&&(window.ontouchstart===null||__vite_import_meta_env__?.TEST),supportsMouseEvents=()=>isBrowser$1&&(window.onmousedown===null||__vite_import_meta_env__?.TEST);function registerEventListeners({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()&&(useEventListener(target$1,`mousedown`,()=>tapped.value=!0),useEventListener(target$1,`mouseup`,()=>tapped.value=!1)),supportsPointerEvents()&&(useEventListener(target$1,`pointerdown`,()=>tapped.value=!0),useEventListener(target$1,`pointerup`,()=>tapped.value=!1)),supportsTouchEvents()&&(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({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({state,apply:apply$2}){watch(state,newVal=>{newVal&&apply$2(newVal)},{immediate:!0})}function registerVisibilityHooks({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(instance,options$1={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){options$1.lifeCycleHooks&®isterLifeCycleHooks(instance),options$1.syncVariants&®isterVariantsSync(instance),options$1.visibilityHooks&®isterVisibilityHooks(instance),options$1.eventListeners&®isterEventListeners(instance)}function reactiveStyle(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(key$2),valueAsType=getValueAsType(value$1,valueType);result[key$2]=valueAsType}style.value=result},{immediate:!0,deep:!0}),{state,style}}function usePermissiveTarget(target$1,onTarget){watch(()=>unrefElement(target$1),el=>{el&&onTarget(el)},{immediate:!0})}const translateAlias={x:`translateX`,y:`translateY`,z:`translateZ`};function reactiveTransform(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(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(key$2),valueAsType=getValueAsType(value$1,valueType);result+=`${translateAlias[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=[``,`X`,`Y`,`Z`],order$1=[`perspective`,`translate`,`scale`,`rotate`,`skew`],transformProps=[`transformPerspective`,`x`,`y`,`z`];order$1.forEach(operationKey=>{transformAxes.forEach(axesKey=>{let key$2=operationKey+axesKey;transformProps.push(key$2)})});const transformPropSet=new Set(transformProps);function isTransformProp(key$2){return transformPropSet.has(key$2)}const transformOriginProps=new Set([`originX`,`originY`,`originZ`]);function isTransformOriginProp(key$2){return transformOriginProps.has(key$2)}function splitValues(variant){let transform$2={},style={};return Object.entries(variant).forEach(([key$2,value$1])=>{isTransformProp(key$2)||isTransformOriginProp(key$2)?transform$2[key$2]=value$1:style[key$2]=value$1}),{transform:transform$2,style}}function variantToStyle(variant){let{transform:_transform,style:_style}=splitValues(variant),{transform:transform$2}=reactiveTransform(_transform),{style}=reactiveStyle(_style);return transform$2.value&&(style.value.transform=transform$2.value),style.value}function useElementStyle(target$1,onInit){let _cache$1,_target$1,{state,style}=reactiveStyle();return usePermissiveTarget(target$1,el=>{_target$1=el;for(let key$2 of Object.keys(valueTypes$1)){if(el.style[key$2]===null||el.style[key$2]===``||isTransformProp(key$2)||isTransformOriginProp(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(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(state,transform$2){Object.entries(parseTransform(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(target$1,onInit){let _cache$1,_target$1,{state,transform:transform$2}=reactiveTransform();return usePermissiveTarget(target$1,el=>{_target$1=el,el.style.transform&&stateFromTransform(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(obj){return Object.entries(obj)}function useMotionProperties(target$1,defaultValues){let motionProperties=reactive({}),apply$2=values=>Object.entries(values).forEach(([key$2,value$1])=>motionProperties[key$2]=value$1),{style}=useElementStyle(target$1,apply$2),{transform:transform$2}=useElementTransform(target$1,apply$2);return watch(motionProperties,newVal=>{objectEntries(newVal).forEach(([key$2,value$1])=>{let target2=isTransformProp(key$2)?transform$2:style;target2[key$2]&&target2[key$2]===value$1||(target2[key$2]=value$1)})},{immediate:!0,deep:!0}),usePermissiveTarget(target$1,()=>defaultValues&&apply$2(defaultValues)),{motionProperties,style,transform:transform$2}}function useMotionVariants(variants={}){let _variants=unref(variants),variant=ref(),state=computed(()=>{if(variant.value)return _variants[variant.value]});return{state,variant}}function useMotion(target$1,variants={},options$1){let{motionProperties}=useMotionProperties(target$1),{variant,state}=useMotionVariants(variants),controls=useMotionControls(motionProperties,variants),instance={target:target$1,variant,variants,state,motionProperties,...controls};return useMotionFeatures(instance,options$1),instance}const transitionKeys=[`delay`,`duration`],directivePropsKeys=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...transitionKeys];function isTransitionKey(val){return transitionKeys.includes(val)}function resolveVariants(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){if(!target$1||!target$1[key$2])continue;if(isTransitionKey(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(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[key$2]&&motionState[key$2].stop();let variantsObject=isPreset?structuredClone(toRaw(variants)||{}):variants||{},variantsRef=ref(variantsObject);typeof binding.value==`object`&&(variantsRef.value=binding.value),resolveVariants(node$1,variantsRef);let motionOptions={eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1},motionInstance=useMotion(el,variantsRef,motionOptions);el.motionInstance=motionInstance,key$2&&(motionState[key$2]=motionInstance)},mounted=(el,_binding,_node)=>{el.motionInstance&®isterVisibilityHooks(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(initial);return{style}}}}const fade={initial:{opacity:0},enter:{opacity:1}},fadeVisible={initial:{opacity:0},visible:{opacity:1}},fadeVisibleOnce={initial:{opacity:0},visibleOnce:{opacity:1}},pop={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},popVisible={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},popVisibleOnce={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},rollLeft={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleLeft={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceLeft={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollRight={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleRight={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceRight={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollTop={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleTop={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceTop={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollBottom={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleBottom={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceBottom={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},slideLeft={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},slideVisibleLeft={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceLeft={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},slideRight={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},slideVisibleRight={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceRight={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},slideTop={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},slideVisibleTop={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceTop={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},slideBottom={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},slideVisibleBottom={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceBottom={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},presets={__proto__:null,fade,fadeVisible,fadeVisibleOnce,pop,popVisible,popVisibleOnce,rollBottom,rollLeft,rollRight,rollTop,rollVisibleBottom,rollVisibleLeft,rollVisibleOnceBottom,rollVisibleOnceLeft,rollVisibleOnceRight,rollVisibleOnceTop,rollVisibleRight,rollVisibleTop,slideBottom,slideLeft,slideRight,slideTop,slideVisibleBottom,slideVisibleLeft,slideVisibleOnceBottom,slideVisibleOnceLeft,slideVisibleOnceRight,slideVisibleOnceTop,slideVisibleRight,slideVisibleTop};function slugify(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=Symbol(``),MotionComponentProps={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$3(val){return Object.prototype.toString.call(val)===`[object Object]`}function clone$1(v){if(Array.isArray(v))return v.map(clone$1);if(isObject$3(v)){let res={};for(let key$2 in v)res[key$2]=clone$1(v[key$2]);return res}return v}function setupMotionComponent(props){let instances=reactive({}),customPresets=inject(CUSTOM_PRESETS,{}),preset=computed(()=>props.preset==null?{}:customPresets!=null&&props.preset in customPresets?structuredClone(toRaw(customPresets)[props.preset]):props.preset in presets?structuredClone(presets[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$1(motionConfig.value),node$1.props);return node$1.props.onVnodeMounted=({el})=>{instances[index$1]=useMotion(el,elementMotionConfig)},node$1.props.onVnodeUpdated=({el})=>{let styles=variantToStyle(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=defineComponent({name:`Motion`,props:{...MotionComponentProps,is:{type:[String,Object],default:`div`}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent(props);return()=>{let style=variantToStyle(motionConfig.value.initial||{}),node$1=h(props.is,void 0,slots);return setNodeInstance(node$1,0,style),node$1}}}),MotionGroupComponent=defineComponent({name:`MotionGroup`,props:{...MotionComponentProps,is:{type:[String,Object],required:!1}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent(props);return()=>{let style=variantToStyle(motionConfig.value.initial||{}),nodes=slots.default?.()||[];for(let i=0;i{await apply$2(`initial`),await apply$2(`enter`)}),onUnmounted(async()=>{await apply$2(`leave`),finalizedDisableBackButton.value=!0}),watch([()=>props.title,()=>props.subtitle,route],async()=>{await apply$2(`leave`),await nextTick(),finalizedDisableBackButton.value=props.disableBackButton,title.value=props.title,subtitle.value=props.subtitle,await nextTick(),await apply$2(`initial`),await apply$2(`enter`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`pageHeaderRef`,ref:pageHeaderRef,style:{top:`env(safe-area-inset-top, 0px)`,right:`env(safe-area-inset-right, 0px)`,left:`env(safe-area-inset-left, 0px)`},sticky:``,"inset-x-0":``,"top-0":``,"z-99":``,"w-full":``,"pb-6":``,"pt-10":``,flex:`~ row items-center gap-2`,bg:`$bg-color`},[createBaseVNode(`button`,{onClick:_cache$1[0]||=$event=>unref(router$1).back()},[finalizedDisableBackButton.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,{key:0,"i-solar:alt-arrow-left-line-duotone":``,"text-2xl":``,class:normalizeClass({"pointer-events-none op-0":!_ctx.showBackButton})},null,2))]),createBaseVNode(`h1`,_hoisted_1$31,[subtitle.value?(openBlock(),createElementBlock(`div`,_hoisted_2$21,[createBaseVNode(`span`,_hoisted_3$15,toDisplayString(subtitle.value),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$12,toDisplayString(title.value),1)])],512))}}),PageHeader_default=PageHeader_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$30=[`onClick`],_hoisted_2$20={flex:``,"items-center":``,"gap-1.5":``};var Section_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Section`,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-3 py-2 outline-none transition-all duration-250 ease-in-out sm:px-4 sm:py-3`,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)},[createBaseVNode(`div`,_hoisted_2$20,[createBaseVNode(`div`,{class:normalizeClass(_ctx.icon),"size-6":``},null,2),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$30)]),default:withCtx(()=>[createBaseVNode(`div`,{grid:``,"gap-2":``,"p-4":``,class:normalizeClass(_ctx.innerClass)},[renderSlot(_ctx.$slots,`default`)],2)]),_:3},8,[`default`]))}}),Section_default=Section_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$29={"z-1":``,"flex-1":``},_hoisted_2$19={"text-lg":``,"font-normal":``,class:`menu-icon-item-title`,transition:`all ease-in-out duration-400`},_hoisted_3$14={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-item-description`,transition:`all ease-in-out duration-400`};var IconItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`IconItem`,props:{title:{},description:{},icon:{},iconTemplate:{type:Boolean},to:{}},setup(__props){return(_ctx,_cache$1)=>{let _component_RouterLink=resolveComponent(`RouterLink`);return openBlock(),createBlock(_component_RouterLink,{box:`border`,flex:`~ row`,bg:`neutral-50 dark:neutral-900`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-item`,transition:`all ease-in-out duration-400`,relative:``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,cursor:`pointer`,to:_ctx.to},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$29,[createBaseVNode(`div`,_hoisted_2$19,toDisplayString(_ctx.title),1),createBaseVNode(`div`,_hoisted_3$14,[createBaseVNode(`span`,null,toDisplayString(_ctx.description),1)])]),typeof _ctx.icon==`string`?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`menu-icon-item-icon`,[_ctx.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-24":``,"translate-y-4":``,text:`neutral-400/50 dark:neutral-600/50`},null,2)):createCommentVNode(``,!0),_ctx.iconTemplate?renderSlot(_ctx.$slots,`icon`,{key:1},void 0,!0):createCommentVNode(``,!0)]),_:3},8,[`to`])}}}),IconItem_default=__plugin_vue_export_helper_default(IconItem_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-d08788bb`]]);const _hoisted_1$28={flex:`~ col`,bg:`neutral-50 dark:neutral-800`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-status-item`,transition:`all ease-in-out duration-400`,"w-full":``,"cursor-pointer":``,"of-hidden":``,"rounded-xl":``},_hoisted_2$18={"z-1":``,"flex-1":``},_hoisted_3$13={"text-lg":``,"font-normal":``,class:`menu-icon-status-item-title`,transition:`all ease-in-out duration-400`},_hoisted_4$11={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-status-item-description`,transition:`all ease-in-out duration-400`},_hoisted_5$9=[`src`],_hoisted_6$8={"p-2":``},_hoisted_7$5={key:0,"size-3":``,bg:`green-500 dark:green-600`,"rounded-full":``},_hoisted_8$4={key:1,"size-3":``,bg:`neutral-400 dark:neutral-500`,"rounded-full":``};var IconStatusItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`IconStatusItem`,props:{title:{},description:{},icon:{},iconColor:{},iconImage:{},to:{},configured:{type:Boolean}},setup(__props){let props=__props;return(_ctx,_cache$1)=>{let _component_RouterLink=resolveComponent(`RouterLink`);return openBlock(),createElementBlock(`div`,_hoisted_1$28,[createVNode(_component_RouterLink,{flex:`~ row`,class:`menu-icon-status-item-link`,bg:`white dark:neutral-900`,transition:`all ease-in-out duration-400`,relative:``,"h-full":``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,to:props.to},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_2$18,[createBaseVNode(`div`,_hoisted_3$13,toDisplayString(props.title),1),createBaseVNode(`div`,_hoisted_4$11,[createBaseVNode(`span`,null,toDisplayString(props.description||``),1)])]),props.icon?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`menu-icon-status-item-icon`,[props.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):createCommentVNode(``,!0),props.iconColor?(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`menu-icon-status-item-icon-color`,[props.iconColor]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):createCommentVNode(``,!0),props.iconImage?(openBlock(),createElementBlock(`img`,{key:2,src:props.iconImage,class:`menu-icon-status-item-icon-image`,transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,"grayscale-100":``},null,8,_hoisted_5$9)):createCommentVNode(``,!0)]),_:1},8,[`to`]),createBaseVNode(`div`,_hoisted_6$8,[props.configured?(openBlock(),createElementBlock(`div`,_hoisted_7$5)):(openBlock(),createElementBlock(`div`,_hoisted_8$4))])])}}}),IconStatusItem_default=__plugin_vue_export_helper_default(IconStatusItem_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-93a9757f`]]);const _hoisted_1$27=[`checked`,`name`,`value`],_hoisted_2$17={class:`relative mr-3 mt-0.5 flex-shrink-0`},_hoisted_3$12={class:`w-full flex flex-col gap-2`},_hoisted_4$10={class:`flex items-center`},_hoisted_5$8={key:0,class:`relative`},_hoisted_6$7=[`title`],_hoisted_7$4={key:1,class:`mt-2`};var RadioCardDetail_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardDetail`,props:mergeModels({id:{},name:{},value:{},title:{},description:{},deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:``},customInputPlaceholder:{default:``},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`),isExpanded=ref(!1);function toggleExpansion(){isExpanded.value=!isExpanded.value}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{key:_ctx.id,class:normalizeClass([`form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]`,[modelValue.value===_ctx.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,modelValue.value===_ctx.value?`form_radio-card-detail-active`:``,_ctx.deprecated?`opacity-60`:``]]),transition:`all duration-200 ease-in-out`,border:`2 solid`},[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,checked:modelValue.value===_ctx.value,type:`radio`,name:_ctx.name,value:_ctx.value,class:`absolute opacity-0`},null,8,_hoisted_1$27),[[vModelRadio,modelValue.value]]),createBaseVNode(`div`,_hoisted_2$17,[createBaseVNode(`div`,{class:normalizeClass([`size-5 border-2 rounded-full transition-colors duration-200`,[modelValue.value===_ctx.value?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[createBaseVNode(`div`,{class:normalizeClass([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[modelValue.value===_ctx.value?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),createBaseVNode(`div`,_hoisted_3$12,[createBaseVNode(`div`,_hoisted_4$10,[createBaseVNode(`span`,{class:normalizeClass([`line-clamp-1 font-normal`,[modelValue.value===_ctx.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},toDisplayString(_ctx.title),3)]),_ctx.description?(openBlock(),createElementBlock(`div`,_hoisted_5$8,[createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[!isExpanded.value||!_ctx.showExpandCollapse?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`line-clamp-2 cursor-pointer text-xs`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),title:_ctx.description,onClick:withModifiers(toggleExpansion,[`prevent`])},toDisplayString(_ctx.description),11,_hoisted_6$7)):(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`cursor-pointer text-xs`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),onClick:withModifiers(toggleExpansion,[`prevent`])},toDisplayString(_ctx.description),3))]),_:1}),_ctx.showExpandCollapse&&_ctx.description.length>_ctx.expandCollapseThreshold?(openBlock(),createElementBlock(`button`,{key:0,class:`mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600`,onClick:withModifiers(toggleExpansion,[`prevent`])},[createBaseVNode(`span`,null,toDisplayString(isExpanded.value?`Show less`:`Show more`),1),createBaseVNode(`div`,{class:normalizeClass([{"rotate-180":isExpanded.value},`transition-transform duration-200`])},_cache$1[2]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``,"ml-0.5":``,"text-xs":``},null,-1)],2)])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),_ctx.showCustomInput&&modelValue.value===_ctx.value?(openBlock(),createElementBlock(`div`,_hoisted_7$4,[createVNode(unref(Input_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:_ctx.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0)])],2))}}),RadioCardDetail_default=__plugin_vue_export_helper_default(RadioCardDetail_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fb6236db`]]);const _hoisted_1$26={class:`flex items-center gap-1.5 font-medium`},_hoisted_2$16={class:`px-1 text-sm`};var Alert_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Alert`,props:{type:{}},setup(__props){let props=__props,containerClass=computed(()=>{switch(props.type){case`error`:return`border-solid border-2 border-red-200 bg-red-50 dark:border-red-800/30 dark:bg-red-900/20`;case`warning`:return`border-solid border-2 border-amber-200 bg-amber-50 dark:border-amber-800/30 dark:bg-amber-900/20`}return``}),iconClass=computed(()=>{switch(props.type){case`error`:return`i-solar:close-circle-bold-duotone text-red-500 dark:text-red-400`;case`warning`:return`i-solar:danger-circle-bold-duotone text-amber-500 dark:text-amber-400`}return``}),titleClass=computed(()=>{switch(props.type){case`error`:return`text-red-500 dark:text-red-400`;case`warning`:return`text-amber-500 dark:text-amber-400`}return``});return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`flex flex-col gap-3 rounded-xl px-2 pb-3 pt-2`,containerClass.value])},[createBaseVNode(`div`,_hoisted_1$26,[createBaseVNode(`div`,{class:normalizeClass([`text-2xl`,iconClass.value])},null,2),createBaseVNode(`div`,{class:normalizeClass(titleClass.value)},[renderSlot(_ctx.$slots,`title`)],2)]),createBaseVNode(`div`,_hoisted_2$16,[renderSlot(_ctx.$slots,`content`)])],2))}}),Alert_default=Alert_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$25={class:`radio-card-detail-many-select`},_hoisted_2$15={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},_hoisted_3$11=[`placeholder`],_hoisted_4$9={class:`mt-4 space-y-2`},_hoisted_5$7={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_6$6={class:`relative`};var RadioCardManySelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardManySelect`,props:mergeModels({items:{},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search...`},searchNoResultsTitle:{default:`No results found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} results`},customInputPlaceholder:{default:`Enter custom value`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},showMore:{type:Boolean,default:!0},listClass:{default:``}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`update:customValue`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,modelValue=useModel(__props,`modelValue`),searchQuery=ref(``),isListExpanded=ref(!1),customValue=ref(``),filteredItems=computed(()=>{if(!searchQuery.value)return props.items;let query=searchQuery.value.toLowerCase();return props.items.filter(item=>item.name.toLowerCase().includes(query)||item.description&&item.description.toLowerCase().includes(query))});function updateCustomValue(value$1){customValue.value=value$1,emit$1(`update:customValue`,value$1)}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$25,[_ctx.searchable?(openBlock(),createElementBlock(`div`,_hoisted_2$15,[_cache$1[4]||=createBaseVNode(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[createBaseVNode(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>searchQuery.value=$event,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:_ctx.searchPlaceholder},null,8,_hoisted_3$11),[[vModelText,searchQuery.value]])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$9,[searchQuery.value?(openBlock(),createElementBlock(`div`,_hoisted_5$7,toDisplayString(_ctx.searchResultsText.replace(`{count}`,filteredItems.value.length.toString()).replace(`{total}`,_ctx.items.length.toString())),1)):createCommentVNode(``,!0),searchQuery.value&&filteredItems.value.length===0?(openBlock(),createBlock(Alert_default,{key:1,type:`warning`},{title:withCtx(()=>[createTextVNode(toDisplayString(_ctx.searchNoResultsTitle),1)]),content:withCtx(()=>[createTextVNode(toDisplayString(_ctx.searchNoResultsDescription.replace(`{query}`,searchQuery.value)),1)]),_:1})):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_6$6,[createBaseVNode(`div`,{class:normalizeClass([`grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto pb-4 scrollbar-none`,[isListExpanded.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``,...props.listClass?typeof props.listClass==`string`?[props.listClass]:props.listClass:[`max-h-[calc(100dvh-7lh)]`]]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredItems.value,item=>(openBlock(),createBlock(RadioCardDetail_default,{id:item.id,key:item.id,modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,value:item.id,title:item.name,description:item.description,deprecated:item.deprecated,"show-expand-collapse":_ctx.showMore,"expand-collapse-threshold":100,"show-custom-input":item.customizable,"custom-input-value":customValue.value,"custom-input-placeholder":_ctx.customInputPlaceholder,name:`radio-card-detail-many-select`,class:`scroll-snap-align-start`,"onUpdate:customInputValue":_cache$1[2]||=$event=>updateCustomValue($event)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`deprecated`,`show-expand-collapse`,`show-custom-input`,`custom-input-value`,`custom-input-placeholder`]))),128))],2),createBaseVNode(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:normalizeClass([isListExpanded.value?`w-full`:`mt-4 w-full rounded-lg`])},[createBaseVNode(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:normalizeClass([isListExpanded.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:_cache$1[3]||=$event=>isListExpanded.value=!isListExpanded.value},[createBaseVNode(`span`,null,toDisplayString(isListExpanded.value?_ctx.collapseButtonText:_ctx.expandButtonText),1),createBaseVNode(`div`,{class:normalizeClass([isListExpanded.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-linear":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),RadioCardManySelect_default=__plugin_vue_export_helper_default(RadioCardManySelect_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-e9feb562`]]);const _hoisted_1$24=[`checked`,`name`,`value`],_hoisted_2$14={flex:`~ col`,"min-h-16":``,"w-full":``,"items-start":``,"justify-center":``,"pb-2":``,"pl-5":``,"pr-4":``,"pt-2":``};var RadioCardSimple_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardSimple`,props:mergeModels({id:{},name:{},value:{},title:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{key:_ctx.id,border:`2px solid`,class:normalizeClass([`form_radio-card-simple relative`,[modelValue.value===_ctx.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,modelValue.value===_ctx.value?`form_radio-card-simple-active`:``]]),transition:`all duration-200 ease-in-out`,flex:`~ col`,block:``,"min-w-50":``,"w-fit":``,"cursor-pointer":``,"items-start":``,"rounded-xl":``,"p-4":``,"text-left":``},[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,checked:modelValue.value===_ctx.value,type:`radio`,name:_ctx.name,value:_ctx.value,class:`absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400`},null,8,_hoisted_1$24),[[vModelRadio,modelValue.value]]),_cache$1[1]||=createBaseVNode(`div`,{class:`radio-circle absolute left-2 top-2 size-5 rounded-full`,border:`2 solid neutral-300 dark:neutral-600`,transition:`all duration-200 ease-in-out`},[createBaseVNode(`div`,{class:`radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2`,transition:`all duration-200 ease-in-out`,bg:`primary-500 dark:primary-400`})],-1),createBaseVNode(`div`,_hoisted_2$14,[createBaseVNode(`span`,{class:normalizeClass([`radio-item-name font-normal`,[modelValue.value===_ctx.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-500 dark:text-neutral-500`]]),text:`md`,transition:`all duration-200 ease-in-out`},toDisplayString(_ctx.title),3),_ctx.description?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`radio-item-description`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-400 dark:text-neutral-600`]]),transition:`all duration-200 ease-in-out`},toDisplayString(_ctx.description),3)):createCommentVNode(``,!0)]),_cache$1[2]||=createBaseVNode(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)],2))}}),RadioCardSimple_default=__plugin_vue_export_helper_default(RadioCardSimple_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-880ce73f`]]);const _hoisted_1$23={class:`p-3`},_hoisted_2$13={class:`flex items-start`},_hoisted_3$10=[`checked`,`name`,`value`],_hoisted_4$8={class:`relative mr-3 mt-0.5 flex-shrink-0`},_hoisted_5$6={key:0,class:`i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},_hoisted_6$5={key:1,class:`i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},_hoisted_7$3={key:1,class:`mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600`},_hoisted_8$3={class:`flex-1 cursor-pointer`},_hoisted_9$3={class:`flex items-center`},_hoisted_10$3={key:0,class:`mt-1 flex flex-wrap gap-1`},_hoisted_11$2={key:1,class:`mt-3`},_hoisted_12$2={relative:``},_hoisted_13$2={key:0,class:`h-16 px-3 pb-2`};var VoiceCard_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`VoiceCard`,props:mergeModels({name:{},voice:{},currentlyPlayingId:{},customInputPlaceholder:{default:`Enter custom voice name`},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:``},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:``},"custom-voice-nameModifiers":{}}),emits:mergeModels([`togglePlayback`],[`update:voice-id`,`update:custom-voice-name`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,voiceId=useModel(__props,`voice-id`),customVoiceName=useModel(__props,`custom-voice-name`);function getPreviewUrl(voice){return voice.previewURL||voice.preview_audio_url}function formatVoiceAttributes(voice){let attributes=[];if(voice.labels?.gender&&attributes.push(voice.labels.gender),voice.labels?.age&&attributes.push(voice.labels.age),voice.labels?.accent&&attributes.push(voice.labels.accent),voice.languages&&voice.languages.length>0){let languageNames=voice.languages.map(lang=>lang.name).join(`, `);attributes.push(languageNames)}return attributes}function togglePlayback(){emit$1(`togglePlayback`,props.voice)}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{border:`2px solid`,class:normalizeClass([`scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl`,[voiceId.value===props.voice.id?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,voiceId.value===props.voice.id?`form_voice-card-active`:``]]),transition:`all duration-200 ease-in-out`},[createBaseVNode(`div`,_hoisted_1$23,[createBaseVNode(`div`,_hoisted_2$13,[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>voiceId.value=$event,checked:voiceId.value===props.voice.id,type:`radio`,name:_ctx.name,value:props.voice.id,class:`absolute cursor-pointer opacity-0`},null,8,_hoisted_3$10),[[vModelRadio,voiceId.value]]),createBaseVNode(`div`,_hoisted_4$8,[createBaseVNode(`div`,{class:normalizeClass([`size-5 border-2 rounded-full transition-colors duration-200`,[voiceId.value===props.voice.id?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[createBaseVNode(`div`,{class:normalizeClass([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[voiceId.value===props.voice.id?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),getPreviewUrl(_ctx.voice)?(openBlock(),createElementBlock(`button`,{key:0,absolute:``,"right-0":``,top:`0`,"z-3":``,class:normalizeClass([`translate-x-[-50%] translate-y-[50%]`,[_ctx.currentlyPlayingId===_ctx.voice.id?`text-white dark:text-white`:``]]),onClick:togglePlayback},[_ctx.currentlyPlayingId===_ctx.voice.id?(openBlock(),createElementBlock(`div`,_hoisted_5$6)):(openBlock(),createElementBlock(`div`,_hoisted_6$5))],2)):(openBlock(),createElementBlock(`div`,_hoisted_7$3,` No preview available `)),createBaseVNode(`div`,_hoisted_8$3,[createBaseVNode(`div`,_hoisted_9$3,[createBaseVNode(`span`,{class:normalizeClass([`line-clamp-1 font-medium`,[voiceId.value===_ctx.voice.id?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},toDisplayString(_ctx.voice.name),3)]),formatVoiceAttributes(_ctx.voice).length>0?(openBlock(),createElementBlock(`div`,_hoisted_10$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(formatVoiceAttributes(_ctx.voice),(attribute,attrIndex)=>(openBlock(),createElementBlock(`span`,{key:attrIndex,class:normalizeClass([`inline-flex items-center rounded-md px-1.5 py-0.5 text-xs`,[voiceId.value===_ctx.voice.id?`bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400`:`bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300`]])},toDisplayString(attribute),3))),128))])):createCommentVNode(``,!0),_ctx.voice.customizable&&voiceId.value===_ctx.voice.id?(openBlock(),createElementBlock(`div`,_hoisted_11$2,[createVNode(unref(Input_default),{modelValue:customVoiceName.value,"onUpdate:modelValue":_cache$1[1]||=$event=>customVoiceName.value=$event,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:_ctx.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),_ctx.voice.description?(openBlock(),createElementBlock(`div`,{key:2,class:normalizeClass([`line-clamp-2 mt-1 text-xs`,[voiceId.value===_ctx.voice.id?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]])},toDisplayString(_ctx.voice.description),3)):createCommentVNode(``,!0)])])]),createBaseVNode(`div`,_hoisted_12$2,[createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[_ctx.showVisualizer&&_ctx.currentlyPlayingId===_ctx.voice.id&&_ctx.audioStream?(openBlock(),createElementBlock(`div`,_hoisted_13$2,[createVNode(unref(AudioSpectrum_default),{stream:_ctx.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:withCtx(({frequencies})=>[createVNode(unref(AudioSpectrumVisualizer_default),{frequencies,"bars-class":voiceId.value===_ctx.voice.id?`bg-primary-500 dark:bg-primary-400`:`bg-neutral-400 dark:bg-neutral-600`},null,8,[`frequencies`,`bars-class`])]),_:1},8,[`stream`])])):createCommentVNode(``,!0)]),_:1})])],2))}}),VoiceCard_default=__plugin_vue_export_helper_default(VoiceCard_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fd4023c4`]]);const _hoisted_1$22={class:`voice-preview-player`},_hoisted_2$12={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},_hoisted_3$9=[`placeholder`],_hoisted_4$7={class:`mt-4 space-y-2`},_hoisted_5$5={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_6$4={class:`relative`};var VoiceCardManySelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`VoiceCardManySelect`,props:mergeModels({voices:{},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search voices...`},searchNoResultsTitle:{default:`No voices found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} voices`},customInputPlaceholder:{default:`Enter custom voice name`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},playButtonText:{default:`Play sample`},pauseButtonText:{default:`Pause`},showVisualizer:{type:Boolean,default:!0},listClass:{default:``}},{"search-query":{required:!1,default:``},"search-queryModifiers":{},"voice-id":{required:!1,default:``},"voice-idModifiers":{}}),emits:[`update:search-query`,`update:voice-id`],setup(__props){let props=__props,isListExpanded=ref(!1),currentlyPlayingId=ref(),audioElements=ref(new Map),audioStreams=ref(new Map),audioContexts=ref(new Map),audioSources=ref(new Map),sharedAudioContext=ref(null);function initAudioContext(){return sharedAudioContext.value||=new(window.AudioContext||window.webkitAudioContext),sharedAudioContext.value}let searchQuery=useModel(__props,`search-query`),voiceId=useModel(__props,`voice-id`),filteredVoices=computed(()=>{if(!searchQuery.value)return props.voices;let query=searchQuery.value.toLowerCase();return props.voices.filter(voice=>{let nameMatch=voice.name.toLowerCase().includes(query),descMatch=voice.description&&voice.description.toLowerCase().includes(query),tagMatch=voice.tags&&voice.tags.some(tag=>tag.toLowerCase().includes(query)),labelMatch=voice.labels&&Object.values(voice.labels).some(value$1=>typeof value$1==`string`&&value$1.toLowerCase().includes(query)),langMatch=voice.languages&&voice.languages.some(lang=>lang.name.toLowerCase().includes(query)||lang.code.toLowerCase().includes(query));return nameMatch||descMatch||tagMatch||labelMatch||langMatch})});function getPreviewUrl(voice){return voice.previewURL||voice.preview_audio_url}function getAudioElement(voice){let previewUrl=getPreviewUrl(voice);if(!previewUrl)return null;if(audioElements.value.has(voice.id))return audioElements.value.get(voice.id)||null;let audio=new Audio(previewUrl);return audio.crossOrigin=`anonymous`,audio.preload=`auto`,audio.addEventListener(`ended`,()=>{if(currentlyPlayingId.value===voice.id){currentlyPlayingId.value=void 0;let stream=audioStreams.value.get(voice.id);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(voice.id))}}),audioElements.value.set(voice.id,audio),audio}function createAudioStream(audio,voiceId$1){try{if(audioStreams.value.has(voiceId$1))return audioStreams.value.get(voiceId$1)||null;let audioContext=initAudioContext();if(audioSources.value.has(voiceId$1)){let source$1=audioSources.value.get(voiceId$1),destination$1=audioContext.createMediaStreamDestination();source$1.connect(destination$1);let stream$1=destination$1.stream;return audioStreams.value.set(voiceId$1,stream$1),stream$1}let source=audioContext.createMediaElementSource(audio);audioSources.value.set(voiceId$1,source),source.connect(audioContext.destination);let destination=audioContext.createMediaStreamDestination();source.connect(destination);let stream=destination.stream;return audioStreams.value.set(voiceId$1,stream),stream}catch(error){return console.error(`Failed to create audio stream for visualizer:`,error),null}}function togglePlayback(voice){try{let previewUrl=getPreviewUrl(voice);if(!previewUrl)return;let audio=getAudioElement(voice);if(!audio)return;if(currentlyPlayingId.value===voice.id){audio.pause(),currentlyPlayingId.value=void 0;let stream=audioStreams.value.get(voice.id);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(voice.id));return}if(currentlyPlayingId.value){let currentAudio=audioElements.value.get(currentlyPlayingId.value);currentAudio&¤tAudio.pause();let stream=audioStreams.value.get(currentlyPlayingId.value);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(currentlyPlayingId.value))}props.showVisualizer&&!audioStreams.value.has(voice.id)&&createAudioStream(audio,voice.id),audio.currentTime=0,audio.play().catch(error=>{console.error(`Failed to play audio:`,error)}),currentlyPlayingId.value=voice.id}catch(err){console.error(err),currentlyPlayingId.value=void 0}}function cleanup(){audioElements.value.forEach(audio=>{audio.pause(),audio.src=``}),audioElements.value.clear(),audioStreams.value.forEach(stream=>{stream.getTracks().forEach(track$1=>track$1.stop())}),audioStreams.value.clear(),audioContexts.value.forEach(context$1=>{context$1.state!==`closed`&&context$1.close()}),audioContexts.value.clear(),audioSources.value.clear(),currentlyPlayingId.value=void 0}watch(searchQuery,()=>{if(currentlyPlayingId.value){let audio=audioElements.value.get(currentlyPlayingId.value);audio&&audio.pause();let stream=audioStreams.value.get(currentlyPlayingId.value);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(currentlyPlayingId.value)),currentlyPlayingId.value=void 0}}),onBeforeUnmount(cleanup);let customVoiceName=ref(``);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$22,[_ctx.searchable?(openBlock(),createElementBlock(`div`,_hoisted_2$12,[_cache$1[4]||=createBaseVNode(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[createBaseVNode(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>searchQuery.value=$event,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:_ctx.searchPlaceholder},null,8,_hoisted_3$9),[[vModelText,searchQuery.value]])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$7,[searchQuery.value?(openBlock(),createElementBlock(`div`,_hoisted_5$5,toDisplayString(_ctx.searchResultsText.replace(`{count}`,filteredVoices.value.length.toString()).replace(`{total}`,_ctx.voices.length.toString())),1)):createCommentVNode(``,!0),searchQuery.value&&filteredVoices.value.length===0?(openBlock(),createBlock(Alert_default,{key:1,type:`warning`},{title:withCtx(()=>[createTextVNode(toDisplayString(_ctx.searchNoResultsTitle),1)]),content:withCtx(()=>[createTextVNode(toDisplayString(_ctx.searchNoResultsDescription.replace(`{query}`,searchQuery.value)),1)]),_:1})):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_6$4,[createBaseVNode(`div`,{class:normalizeClass([`grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto scrollbar-none`,[isListExpanded.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``,...props.listClass?typeof props.listClass==`string`?[props.listClass]:props.listClass:[`max-h-[calc(100dvh-7lh)]`]]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredVoices.value,voice=>(openBlock(),createBlock(VoiceCard_default,{key:voice.id,"voice-id":voiceId.value,"onUpdate:voiceId":_cache$1[1]||=$event=>voiceId.value=$event,"custom-voice-name":customVoiceName.value,"onUpdate:customVoiceName":_cache$1[2]||=$event=>customVoiceName.value=$event,name:`voice`,voice,"currently-playing-id":currentlyPlayingId.value,"custom-input-placeholder":_ctx.customInputPlaceholder,"show-visualizer":_ctx.showVisualizer,"audio-stream":audioStreams.value.get(voice.id),onTogglePlayback:togglePlayback},null,8,[`voice-id`,`custom-voice-name`,`voice`,`currently-playing-id`,`custom-input-placeholder`,`show-visualizer`,`audio-stream`]))),128))],2),createBaseVNode(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:normalizeClass([isListExpanded.value?`w-full`:`mt-4 w-full rounded-lg`])},[createBaseVNode(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:normalizeClass([isListExpanded.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:_cache$1[3]||=$event=>isListExpanded.value=!isListExpanded.value},[createBaseVNode(`span`,null,toDisplayString(isListExpanded.value?_ctx.collapseButtonText:_ctx.expandButtonText),1),createBaseVNode(`div`,{class:normalizeClass([isListExpanded.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-linear":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),VoiceCardManySelect_default=__plugin_vue_export_helper_default(VoiceCardManySelect_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-43a4b028`]]);const _hoisted_1$21=[`disabled`],_hoisted_2$11={class:`flex flex-row items-center justify-center gap-2`},_hoisted_3$8={key:0,class:`w-4`},_hoisted_4$6={key:0,class:`i-svg-spinners:ring-resize h-4 w-4`},_hoisted_5$4={key:0};var Button_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Button`,props:{toggled:{type:Boolean,default:!1},icon:{},label:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:`primary`},size:{default:`md`},theme:{default:`default`},block:{type:Boolean,default:!1}},setup(__props){let props=__props,isDisabled=computed(()=>props.disabled||props.loading),variantClasses={primary:{default:{default:`bg-primary-500/15 hover:bg-primary-500/20 active:bg-primary-500/30 dark:bg-primary-700/30 dark:hover:bg-primary-700/40 dark:active:bg-primary-700/30 focus:ring-primary-300/60 dark:focus:ring-primary-600/30 border-2 border-solid border-primary-500/5 dark:border-primary-900/40 text-primary-950 dark:text-primary-100`}},secondary:{default:{default:`bg-neutral-100/55 hover:bg-neutral-400/20 active:bg-neutral-400/30 dark:bg-neutral-700/60 dark:hover:bg-neutral-700/80 dark:active:bg-neutral-700/60 focus:ring-neutral-300/30 dark:focus:ring-neutral-600/60 dark:focus:ring-neutral-600/30 border-2 border-solid border-neutral-300/30 dark:border-neutral-700/30 text-neutral-950 dark:text-neutral-100`}},"secondary-muted":{default:{default:`hover:bg-neutral-50/50 active:bg-neutral-50/90 hover:dark:bg-neutral-800/50 active:dark:bg-neutral-800/90 border-2 border-solid border-neutral-100/60 dark:border-neutral-800/30 focus:ring-neutral-300/30 dark:focus:ring-neutral-600/60 dark:focus:ring-neutral-600/30`,nonToggled:`bg-neutral-50/70 dark:bg-neutral-800/70 text-neutral-500 dark:text-neutral-400`,toggled:`bg-white/90 dark:bg-neutral-500/70 ring-neutral-300/30 dark:ring-neutral-600/60 ring-2 dark:ring-neutral-600/30 text-primary-500 dark:text-primary-100`}},danger:{default:{default:`bg-red-500/15 hover:bg-red-500/20 active:bg-red-500/30 dark:bg-red-700/30 dark:hover:bg-red-700/40 dark:active:bg-red-700/30 focus:ring-red-300/30 dark:focus:ring-red-600/60 dark:focus:ring-red-600/30 border-2 border-solid border-red-200/30 dark:border-red-900/30 text-red-950 dark:text-red-100`}}},sizeClasses={sm:`px-3 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`},baseClasses=computed(()=>[`rounded-lg font-medium outline-none`,`transition-all duration-200 ease-in-out`,`disabled:cursor-not-allowed disabled:opacity-50`,`backdrop-blur-md`,props.block?`w-full`:``,sizeClasses[props.size],variantClasses[props.variant][props.theme].default,props.toggled?variantClasses[props.variant][props.theme].toggled||``:variantClasses[props.variant][props.theme].nonToggled||``,{"opacity-50 cursor-not-allowed":isDisabled.value},`focus:ring-2`]);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`button`,{disabled:isDisabled.value,class:normalizeClass(baseClasses.value)},[createBaseVNode(`div`,_hoisted_2$11,[createVNode(unref(BidirectionalTransition_default),{"from-class":`opacity-0 mr-0! w-0!`,"active-class":`transition-[width,margin] ease-in-out overflow-hidden transition-100`},{default:withCtx(()=>[_ctx.loading||_ctx.icon?(openBlock(),createElementBlock(`div`,_hoisted_3$8,[_ctx.loading?(openBlock(),createElementBlock(`div`,_hoisted_4$6)):_ctx.icon?(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`h-4 w-4`,_ctx.icon])},null,2)):createCommentVNode(``,!0)])):createCommentVNode(``,!0)]),_:1}),_ctx.label?(openBlock(),createElementBlock(`span`,_hoisted_5$4,toDisplayString(_ctx.label),1)):renderSlot(_ctx.$slots,`default`,{key:1})])],10,_hoisted_1$21))}}),Button_default=Button_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$20={class:`whitespace-pre-wrap break-all`};var ErrorContainer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ErrorContainer`,props:{title:{},error:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(Alert_default,{type:`error`},{title:withCtx(()=>[createTextVNode(toDisplayString(_ctx.title),1)]),content:withCtx(()=>[createBaseVNode(`pre`,_hoisted_1$20,toDisplayString(String(_ctx.error)),1)]),_:1}))}}),ErrorContainer_default=ErrorContainer_vue_vue_type_script_setup_true_lang_default,Screen_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Screen`,setup(__props){let containerRef=ref(),breakpoints=useBreakpoints(breakpointsTailwind),{width,height}=useWindowSize(),containerElementBounding=useElementBounding(containerRef,{immediate:!0,windowResize:!0,reset:!0}),isMobile=computed(()=>breakpoints.between(`sm`,`md`).value||breakpoints.smaller(`sm`).value),isTablet=computed(()=>breakpoints.between(`md`,`lg`).value),isDesktop=computed(()=>breakpoints.greaterOrEqual(`lg`).value),canvasWidth=computed(()=>isDesktop.value?containerElementBounding.width.value:isMobile.value||isTablet.value?width.value-16:containerElementBounding.width.value),canvasHeight=ref(0);return watch([width,height,containerRef],()=>{let bounding=containerRef.value?.parentElement?.getBoundingClientRect();isDesktop.value||isMobile.value||isTablet.value?canvasHeight.value=bounding?.height||0:canvasHeight.value=600}),watch([containerElementBounding.width,containerElementBounding.height],()=>{isDesktop.value||isMobile.value||isTablet.value?canvasHeight.value=containerElementBounding.height.value:canvasHeight.value=600}),onMounted(async()=>{containerRef.value&&containerElementBounding.update()}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`containerRef`,ref:containerRef,"h-full":``,"w-full":``},[renderSlot(_ctx.$slots,`default`,{width:canvasWidth.value,height:canvasHeight.value})],512))}}),Screen_default=Screen_vue_vue_type_script_setup_true_lang_default,Skeleton_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Skeleton`,props:{animation:{default:`pulse`}},setup(__props){let props=__props;return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`skeleton`,props.animation===`none`?``:`skeleton-${props.animation}`]),bg:`neutral-200 dark:neutral-800`,overflow:`hidden`},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],2))}}),Skeleton_default=__plugin_vue_export_helper_default(Skeleton_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fa4a54cc`]]),CursorFloating_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`CursorFloating`,props:{intensity:{default:1.5}},setup(__props){let props=__props,cardRef=ref(null),transformStyle=ref(``),gradientPosition=ref(`50% 50%`),sparklePosition=ref(`50% 50%`),sparkleOpacity=ref(.5);function handleMouseMove(event){if(!cardRef.value)return;let card=cardRef.value,rect=card.getBoundingClientRect(),x$1=event.clientX-rect.left,y=event.clientY-rect.top,cardWidth=card.offsetWidth,cardHeight=card.offsetHeight,xPercent=Math.abs(Math.floor(100/cardWidth*x$1)-100),yPercent=Math.abs(Math.floor(100/cardHeight*y)-100),leftPos=50+(xPercent-50)/1.5,topPos=50+(yPercent-50)/1.5,sparkleX=50+(xPercent-50)/7,sparkleY=50+(yPercent-50)/7,rotateY=(leftPos-50)/1.5*.2*props.intensity,rotateX=(topPos-50)/2*-1*.2*props.intensity,pAngle=50-xPercent+(50-yPercent),opacity=.5+Math.abs(pAngle)*.008*props.intensity;transformStyle.value=`perspective(1200px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(${1+.015*props.intensity}, ${1+.015*props.intensity}, ${1+.015*props.intensity})`,gradientPosition.value=`${leftPos}% ${topPos}%`,sparklePosition.value=`${sparkleX}% ${sparkleY}%`,sparkleOpacity.value=opacity}function resetCard(){transformStyle.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`,gradientPosition.value=`50% 50%`,sparklePosition.value=`50% 50%`,sparkleOpacity.value=.5}return onMounted(()=>{transformStyle.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`cardRef`,ref:cardRef,class:`card-hover-effect`,style:normalizeStyle({transform:transformStyle.value,"--effect-intensity":_ctx.intensity}),onMousemove:handleMouseMove,onMouseleave:resetCard},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],36))}}),CursorFloating_default=__plugin_vue_export_helper_default(CursorFloating_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-24a7a9d5`]]);(function(){"use strict";var t$1;try{if(typeof document<`u`){var a$1=document.createElement(`style`);a$1.nonce=(t$1=document.head.querySelector(`meta[property=csp-nonce]`))?.content,a$1.appendChild(document.createTextNode(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}`)),document.head.appendChild(a$1)}}catch(r$1){console.error(`vite-plugin-css-injected-by-js`,r$1)}})();const rt=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const ut=e$4=>typeof e$4<`u`;function st(e$4){return JSON.parse(JSON.stringify(e$4))}function $e(e$4,n,s,i={}){var t$1,w,d;let{clone:v=!1,passive:D=!1,eventName:$,deep:T=!1,defaultValue:r$1,shouldEmit:l}=i,h$1=getCurrentInstance(),m=s||h$1?.emit||(t$1=h$1?.$emit)?.bind(h$1)||(d=(w=h$1?.proxy)?.$emit)?.bind(h$1?.proxy),u=$;n||=`modelValue`,u||=`update:${n.toString()}`;let L=a$1=>v?typeof v==`function`?v(a$1):st(a$1):a$1,H=()=>ut(e$4[n])?L(e$4[n]):r$1,p$4=a$1=>{l?l(a$1)&&m(u,a$1):m(u,a$1)};if(D){let a$1=H(),c$3=ref(a$1),f$2=!1;return watch(()=>e$4[n],y=>{f$2||(f$2=!0,c$3.value=L(y),nextTick(()=>f$2=!1))}),watch(c$3,y=>{!f$2&&(y!==e$4[n]||T)&&p$4(y)},{deep:T}),c$3}else return computed({get(){return H()},set(a$1){p$4(a$1)}})}const[ee,ct]=createContext(`DrawerRoot`),Ee=new WeakMap;function C(e$4,n,s=!1){if(!e$4||!(e$4 instanceof HTMLElement)||!n)return;let i={};Object.entries(n).forEach(([t$1,w])=>{if(t$1.startsWith(`--`)){e$4.style.setProperty(t$1,w);return}i[t$1]=e$4.style[t$1],e$4.style[t$1]=w}),!s&&Ee.set(e$4,i)}function dt$1(e$4,n){if(!e$4||!(e$4 instanceof HTMLElement))return;let s=Ee.get(e$4);s&&Object.entries(s).forEach(([i,t$1])=>{e$4.style[i]=t$1})}function ie(e$4,n){let s=window.getComputedStyle(e$4),i=s.transform||s.webkitTransform||s.mozTransform,t$1=i.match(/^matrix3d\((.+)\)$/);return t$1?Number.parseFloat(t$1[1].split(`, `)[_(n)?13:12]):(t$1=i.match(/^matrix\((.+)\)$/),t$1?Number.parseFloat(t$1[1].split(`, `)[_(n)?5:4]):null)}function vt(e$4){return 8*(Math.log(e$4+1)-2)}function _(e$4){switch(e$4){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e$4}}function de(e$4,n){if(!e$4)return()=>{};let s=e$4.style.cssText;return Object.assign(e$4.style,n),()=>{e$4.style.cssText=s}}function ft(...e$4){return(...n)=>{for(let s of e$4)typeof s==`function`&&s(...n)}}const O={DURATION:.5,EASE:[.32,.72,0,1]},_e=.4,pt=.25,gt=100,Be=8,re$1=16,Ce=26,Oe=`vaul-dragging`;function mt({activeSnapPoint:e$4,snapPoints:n,drawerRef:s,overlayRef:i,fadeFromIndex:t$1,onSnapPointChange:w,direction:d}){let v=ref(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function D(){v.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}onMounted(()=>{typeof window<`u`&&window.addEventListener(`resize`,D)}),onBeforeUnmount(()=>{typeof window<`u`&&window.removeEventListener(`resize`,D)});let $=computed(()=>(n.value&&e$4.value===n.value[n.value.length-1])??null),T=computed(()=>n.value&&n.value.length>0&&(t$1?.value||t$1?.value===0)&&!Number.isNaN(t$1?.value)&&n.value[t$1?.value??-1]===e$4.value||!n.value),r$1=computed(()=>{var p$4;return(p$4=n.value)?.findIndex(a$1=>a$1===e$4.value)??null}),l=computed(()=>{var p$4;return(p$4=n.value)?.map(a$1=>{let c$3=typeof a$1==`string`,f$2=0;if(c$3&&(f$2=Number.parseInt(a$1,10)),_(d.value)){let P=c$3?f$2:v.value?a$1*v.value.innerHeight:0;return v.value?d.value===`bottom`?v.value.innerHeight-P:-v.value.innerHeight+P:P}let y=c$3?f$2:v.value?a$1*v.value.innerWidth:0;return v.value?d.value===`right`?v.value.innerWidth-y:-v.value.innerWidth+y:y})??[]}),h$1=computed(()=>{var p$4;return r$1.value===null?null:(p$4=l.value)?.[r$1.value]}),m=p$4=>{var c$3,f$2,y,P;let a$1=(c$3=l.value)?.findIndex(x$1=>x$1===p$4)??null;nextTick(()=>{var x$1;w(a$1,l.value),C((x$1=s.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:_(d.value)?`translate3d(0, ${p$4}px, 0)`:`translate3d(${p$4}px, 0, 0)`})}),l.value&&a$1!==l.value.length-1&&a$1!==t$1?.value?C((f$2=i.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`0`}):C((y=i.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`1`}),e$4.value=a$1===null?null:(P=n.value)?.[a$1]??null};watch([e$4,l,n],()=>{var p$4;if(e$4.value){let a$1=(p$4=n.value)?.findIndex(c$3=>c$3===e$4.value)??-1;l.value&&a$1!==-1&&typeof l.value[a$1]==`number`&&m(l.value[a$1])}},{immediate:!0});function u({draggedDistance:p$4,closeDrawer:a$1,velocity:c$3,dismissible:f$2}){var j$1,G,z$1;if(t$1.value===void 0)return;let y=d.value===`bottom`||d.value===`right`?(h$1.value??0)-p$4:(h$1.value??0)+p$4,P=r$1.value===t$1.value-1,x$1=r$1.value===0,W=p$4>0;if(P&&C((j$1=i.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`}),c$3>2&&!W){f$2?a$1():m(l.value[0]);return}if(c$3>2&&W&&l&&n.value){m(l.value[n.value.length-1]);return}let te$1=(G=l.value)?.reduce((M$1,g)=>typeof M$1!=`number`||typeof g!=`number`?M$1:Math.abs(g-y)_e&&Math.abs(p$4)0&&$){m(l.value[((z$1=n.value)?.length??0)-1]);return}if(x$1&&M$1<0&&f$2&&a$1(),r$1.value===null)return;m(l.value[r$1.value+M$1]);return}m(te$1)}function L({draggedDistance:p$4}){var c$3;if(h$1.value===null)return;let a$1=d.value===`bottom`||d.value===`right`?h$1.value-p$4:h$1.value+p$4;(d.value===`bottom`||d.value===`right`)&&a$1l.value[l.value.length-1]||C((c$3=s.value)?.$el,{transform:_(d.value)?`translate3d(0, ${a$1}px, 0)`:`translate3d(${a$1}px, 0, 0)`})}function H(p$4,a$1){if(!n.value||typeof r$1.value!=`number`||!l.value||t$1.value===void 0)return null;let c$3=r$1.value===t$1.value-1;if(r$1.value>=t$1.value&&a$1)return 0;if(c$3&&!a$1)return 1;if(!T.value&&!c$3)return null;let y=c$3?r$1.value+1:r$1.value-1,P=c$3?l.value[y]-l.value[y-1]:l.value[y+1]-l.value[y],x$1=p$4/Math.abs(P);return c$3?1-x$1:x$1}return{isLastSnapPoint:$,shouldFade:T,getPercentageDragged:H,activeSnapPointIndex:r$1,onRelease:u,onDrag:L,snapPointsOffset:l}}function Te(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let Q=null;function wt(e$4){let{isOpen:n,modal:s,nested:i,hasBeenOpened:t$1,preventScrollRestoration:w,noBodyStyles:d}=e$4,v=ref(typeof window<`u`?window.location.href:``),D=ref(0);function $(){if(Te()&&Q===null&&n.value&&!d.value){Q={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};let{scrollX:r$1,innerHeight:l}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-D.value}px`,left:`${-r$1}px`,right:`0px`,height:`auto`}),setTimeout(()=>{requestAnimationFrame(()=>{let h$1=l-window.innerHeight;h$1&&D.value>=l&&(document.body.style.top=`-${D.value+h$1}px`)})},300)}}function T(){if(Te()&&Q!==null&&!d.value){let r$1=-Number.parseInt(document.body.style.top,10),l=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,Q),window.requestAnimationFrame(()=>{if(w.value&&v.value!==window.location.href){v.value=window.location.href;return}window.scrollTo(l,r$1)}),Q=null}}return onMounted(()=>{function r$1(){D.value=window.scrollY}r$1(),window.addEventListener(`scroll`,r$1),onUnmounted(()=>{window.removeEventListener(`scroll`,r$1)})}),watch([n,t$1,v],()=>{i.value||!t$1.value||(n.value?(window.matchMedia(`(display-mode: standalone)`).matches||$(),s.value||setTimeout(()=>{T()},500)):T())}),{restorePositionSetting:T}}function ht(e$4,n){return e$4&&e$4.value?e$4:n}function yt(e$4){let{emitDrag:n,emitRelease:s,emitClose:i,emitOpenChange:t$1,open:w,dismissible:d,nested:v,modal:D,shouldScaleBackground:$,setBackgroundColorOnScale:T,scrollLockTimeout:r$1,closeThreshold:l,activeSnapPoint:h$1,fadeFromIndex:m,direction:u,noBodyStyles:L,handleOnly:H,preventScrollRestoration:p$4}=e$4,a$1=ref(w.value??!1),c$3=ref(!1),f$2=ref(!1),y=ref(!1),P=ref(null),x$1=ref(null),W=ref(null),te$1=ref(null),V$1=ref(null),j$1=ref(!1),G=ref(null),z$1=ref(0),M$1=ref(!1);ref(0);let g=ref(null);ref(0);let pe$1=computed(()=>{var o;return(o=g.value)?.$el.getBoundingClientRect().height||0}),U=ht(e$4.snapPoints,ref(void 0)),Ne=computed(()=>{var o;return U&&((o=U.value)?.length??0)>0}),Ae=ref(null),{activeSnapPointIndex:ge,onRelease:xe,snapPointsOffset:He,onDrag:Ue,shouldFade:me,getPercentageDragged:Le$1}=mt({snapPoints:U,activeSnapPoint:h$1,drawerRef:g,fadeFromIndex:m,overlayRef:P,onSnapPointChange:Me$1,direction:u});function Me$1(o,R){U.value&&o===R.length-1&&(x$1.value=new Date)}wt({isOpen:a$1,modal:D,nested:v,hasBeenOpened:c$3,noBodyStyles:L,preventScrollRestoration:p$4});function ne$1(){return(window.innerWidth-Ce)/window.innerWidth}function we(o,R){var k$3;if(!o)return!1;let b$1=o,B=(k$3=window.getSelection())?.toString(),E=g.value?ie(g.value.$el,u.value):null,A=new Date;if(b$1.hasAttribute(`data-vaul-no-drag`)||b$1.closest(`[data-vaul-no-drag]`))return!1;if(u.value===`right`||u.value===`left`)return!0;if(x$1.value&&A.getTime()-x$1.value.getTime()<500)return!1;if(E!==null&&(u.value===`bottom`?E>0:E<0))return!0;if(B&&B.length>0)return!1;if(V$1.value&&A.getTime()-V$1.value.getTime()b$1.clientHeight){if(b$1.scrollTop!==0)return V$1.value=new Date,!1;if(b$1.getAttribute(`role`)===`dialog`)return!0}b$1=b$1.parentNode}return!0}function ke$1(o){!d.value&&!U.value||g.value&&!g.value.$el.contains(o.target)||(f$2.value=!0,W.value=new Date,o.target.setPointerCapture(o.pointerId),z$1.value=_(u.value)?o.clientY:o.clientX)}function Ie(o){var R,b$1,B,E,A,k$3;if(g.value&&f$2.value){let X$1=u.value===`bottom`||u.value===`right`?1:-1,ae=(z$1.value-(_(u.value)?o.clientY:o.clientX))*X$1,le$1=ae>0,ye$1=U.value&&!d.value&&!le$1;if(ye$1&&ge.value===0)return;let ce$1=Math.abs(ae),Se=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`),q=ce$1/pe$1.value,De=Le$1(ce$1,le$1);if(De!==null&&(q=De),ye$1&&q>=1||!j$1.value&&!we(o.target,le$1))return;if((R=g?.value)==null||R.$el.classList.add(Oe),j$1.value=!0,C((b$1=g.value)?.$el,{transition:`none`}),C((B=P.value)?.$el,{transition:`none`}),U.value&&Ue({draggedDistance:ae}),le$1&&!U.value){let Y$1=vt(ae),oe$1=Math.min(Y$1*-1,0)*X$1;C((E=g.value)?.$el,{transform:_(u.value)?`translate3d(0, ${oe$1}px, 0)`:`translate3d(${oe$1}px, 0, 0)`});return}let qe$1=1-q;if((me.value||m.value&&ge.value===m.value-1)&&(n(q),C((A=P.value)?.$el,{opacity:`${qe$1}`,transition:`none`},!0)),Se&&P.value&&$.value){let Y$1=Math.min(ne$1()+q*(1-ne$1()),1),oe$1=8-q*8,be$1=Math.max(0,14-q*14);C(Se,{borderRadius:`${oe$1}px`,transform:_(u.value)?`scale(${Y$1}) translate3d(0, ${be$1}px, 0)`:`scale(${Y$1}) translate3d(${be$1}px, 0, 0)`,transition:`none`},!0)}if(!U.value){let Y$1=ce$1*X$1;C((k$3=g.value)?.$el,{transform:_(u.value)?`translate3d(0, ${Y$1}px, 0)`:`translate3d(${Y$1}px, 0, 0)`})}}}function he$1(){var b$1;if(!g.value)return;let o=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`),R=ie(g.value.$el,u.value);C(g.value.$el,{transform:`translate3d(0, 0, 0)`,transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`}),C((b$1=P.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`1`}),$.value&&R&&R>0&&a$1.value&&C(o,{borderRadius:`${Be}px`,overflow:`hidden`,..._(u.value)?{transform:`scale(${ne$1()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${ne$1()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(`,`)})`},!0)}function K$1(o){g.value&&(i(),o||(a$1.value=!1),window.setTimeout(()=>{U.value&&(h$1.value=U.value[0])},O.DURATION*1e3))}watchEffect(()=>{if(!a$1.value&&$.value&&rt){let o=setTimeout(()=>{dt$1(document.body)},200);return()=>clearTimeout(o)}}),watch(w,()=>{a$1.value=w.value,w.value||K$1()});function We(o){if(!f$2.value||!g.value)return;g.value.$el.classList.remove(Oe),j$1.value=!1,f$2.value=!1,te$1.value=new Date;let R=ie(g.value.$el,u.value);if(!we(o.target,!1)||!R||Number.isNaN(R)||W.value===null)return;let b$1=te$1.value.getTime()-W.value.getTime(),B=z$1.value-(_(u.value)?o.clientY:o.clientX),E=Math.abs(B)/b$1;if(E>.05&&(y.value=!0,window.setTimeout(()=>{y.value=!1},200)),U.value){let k$3=u.value===`bottom`||u.value===`right`?1:-1;xe({draggedDistance:B*k$3,closeDrawer:K$1,velocity:E,dismissible:d.value}),s(!0);return}if(u.value===`bottom`||u.value===`right`?B>0:B<0){he$1(),s(!0);return}if(E>_e){K$1(),s(!1);return}let A=Math.min(g.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(R>=A*l.value){K$1(),s(!1);return}s(!0),he$1()}watch(a$1,o=>{o&&(x$1.value=new Date),t$1(o)},{immediate:!0});function Ve$1(o){var B,E;let R=o?(window.innerWidth-re$1)/window.innerWidth:1,b$1=o?-16:0;G.value&&window.clearTimeout(G.value),C((B=g.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:`scale(${R}) translate3d(0, ${b$1}px, 0)`}),!o&&(E=g.value)!=null&&E.$el&&(G.value=window.setTimeout(()=>{var k$3,X$1;let A=ie((k$3=g.value)?.$el,u.value);C((X$1=g.value)?.$el,{transition:`none`,transform:_(u.value)?`translate3d(0, ${A}px, 0)`:`translate3d(${A}px, 0, 0)`})},500))}function je(o){var A;if(o<0)return;let R=_(u.value)?window.innerHeight:window.innerWidth,b$1=(R-re$1)/R,B=b$1+o*(1-b$1),E=-16+o*re$1;C((A=g.value)?.$el,{transform:_(u.value)?`scale(${B}) translate3d(0, ${E}px, 0)`:`scale(${B}) translate3d(${E}px, 0, 0)`,transition:`none`})}function ze(o){var E;let R=_(u.value)?window.innerHeight:window.innerWidth,b$1=o?(R-re$1)/R:1,B=o?-16:0;o&&C((E=g.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:_(u.value)?`scale(${b$1}) translate3d(0, ${B}px, 0)`:`scale(${b$1}) translate3d(${B}px, 0, 0)`})}return{open:w,isOpen:a$1,modal:D,keyboardIsOpen:M$1,hasBeenOpened:c$3,drawerRef:g,drawerHeightRef:pe$1,overlayRef:P,handleRef:Ae,isDragging:f$2,dragStartTime:W,isAllowedToDrag:j$1,snapPoints:U,activeSnapPoint:h$1,hasSnapPoints:Ne,pointerStart:z$1,dismissible:d,snapPointsOffset:He,direction:u,shouldFade:me,fadeFromIndex:m,shouldScaleBackground:$,setBackgroundColorOnScale:T,onPress:ke$1,onDrag:Ie,onRelease:We,closeDrawer:K$1,onNestedDrag:je,onNestedRelease:ze,onNestedOpenChange:Ve$1,emitClose:i,emitDrag:n,emitRelease:s,emitOpenChange:t$1,nested:v,handleOnly:H,noBodyStyles:L}}const St=defineComponent({__name:`DrawerRoot`,props:{activeSnapPoint:{default:void 0},closeThreshold:{default:pt},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:gt},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:`bottom`},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:[`drag`,`release`,`close`,`update:open`,`update:activeSnapPoint`,`animationEnd`],setup(e$4,{expose:n,emit:s}){let i=e$4,t$1=s;useSlots();let w=computed(()=>i.fadeFromIndex??(i.snapPoints&&i.snapPoints.length-1)),d=$e(i,`open`,t$1,{defaultValue:i.defaultOpen,passive:i.open===void 0}),v=$e(i,`activeSnapPoint`,t$1,{passive:i.activeSnapPoint===void 0}),D={emitDrag:m=>t$1(`drag`,m),emitRelease:m=>t$1(`release`,m),emitClose:()=>t$1(`close`),emitOpenChange:m=>{t$1(`update:open`,m),setTimeout(()=>{t$1(`animationEnd`,m)},O.DURATION*1e3)}},{closeDrawer:$,hasBeenOpened:T,modal:r$1,isOpen:l}=ct(yt({...D,...toRefs(i),activeSnapPoint:v,fadeFromIndex:w,open:d}));function h$1(m){if(d.value!==void 0){D.emitOpenChange(m);return}l.value=m,m?T.value=!0:$()}return n({open:l}),(m,u)=>(openBlock(),createBlock(unref(DialogRoot_default),{open:unref(l),modal:unref(r$1),"onUpdate:open":h$1},{default:withCtx(()=>[renderSlot(m.$slots,`default`,{open:unref(l)})]),_:3},8,[`open`,`modal`]))}}),_t=defineComponent({__name:`DrawerRootNested`,props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:[`drag`,`release`,`close`,`update:open`,`update:activeSnapPoint`,`animationEnd`],setup(e$4,{emit:n}){let s=e$4,i=n,{onNestedDrag:t$1,onNestedOpenChange:w,onNestedRelease:d}=ee();function v(){w(!1)}function D(r$1){t$1(r$1)}function $(r$1){r$1&&w(r$1),i(`update:open`,r$1)}let T=useForwardPropsEmits(s,i);return(r$1,l)=>(openBlock(),createBlock(St,mergeProps(unref(T),{nested:``,onClose:v,onDrag:D,onRelease:unref(d),"onUpdate:open":$}),{default:withCtx(()=>[renderSlot(r$1.$slots,`default`)]),_:3},16,[`onRelease`]))}}),Bt=defineComponent({__name:`DrawerOverlay`,setup(e$4){let{overlayRef:n,hasSnapPoints:s,isOpen:i,shouldFade:t$1}=ee();return(w,d)=>(openBlock(),createBlock(unref(DialogOverlay_default),{ref_key:`overlayRef`,ref:n,"data-vaul-overlay":``,"data-vaul-snap-points":unref(i)&&unref(s)?`true`:`false`,"data-vaul-snap-points-overlay":unref(i)&&unref(t$1)?`true`:`false`},null,8,[`data-vaul-snap-points`,`data-vaul-snap-points-overlay`]))}}),Dt=()=>()=>{};function bt(){let{direction:e$4,isOpen:n,shouldScaleBackground:s,setBackgroundColorOnScale:i,noBodyStyles:t$1}=ee(),w=ref(null),d=ref(document.body.style.backgroundColor);function v(){return(window.innerWidth-Ce)/window.innerWidth}watchEffect(D=>{if(n.value&&s.value){w.value&&clearTimeout(w.value);let $=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!$)return;ft(i.value&&!t$1.value?de(document.body,{background:`black`}):Dt,de($,{transformOrigin:_(e$4.value)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(`,`)})`}));let T=de($,{borderRadius:`${Be}px`,overflow:`hidden`,..._(e$4.value)?{transform:`scale(${v()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${v()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});D(()=>{T(),w.value=window.setTimeout(()=>{d.value?document.body.style.background=d.value:document.body.style.removeProperty(`background`)},O.DURATION*1e3)})}},{flush:`pre`})}const Ct=defineComponent({__name:`DrawerContent`,setup(e$4){let{open:n,isOpen:s,snapPointsOffset:i,hasSnapPoints:t$1,drawerRef:w,onPress:d,onDrag:v,onRelease:D,modal:$,emitOpenChange:T,dismissible:r$1,keyboardIsOpen:l,closeDrawer:h$1,direction:m,handleOnly:u}=ee();bt();let L=ref(!1),H=computed(()=>i.value&&i.value.length>0?`${i.value[0]}px`:`0`);function p$4(f$2){if(!$.value||f$2.defaultPrevented){f$2.preventDefault();return}l.value&&=!1,r$1.value?T(!1):f$2.preventDefault()}function a$1(f$2){u.value||d(f$2)}function c$3(f$2){u.value||v(f$2)}return watchEffect(()=>{t$1.value&&window.requestAnimationFrame(()=>{L.value=!0})}),(f$2,y)=>(openBlock(),createBlock(unref(DialogContent_default),{ref_key:`drawerRef`,ref:w,"data-vaul-drawer":``,"data-vaul-drawer-direction":unref(m),"data-vaul-delayed-snap-points":L.value?`true`:`false`,"data-vaul-snap-points":unref(s)&&unref(t$1)?`true`:`false`,style:normalizeStyle({"--snap-point-height":H.value}),onPointerdown:a$1,onPointermove:c$3,onPointerup:unref(D),onPointerDownOutside:p$4,onOpenAutoFocus:y[0]||=withModifiers(()=>{},[`prevent`]),onEscapeKeyDown:y[1]||=P=>{unref(r$1)||P.preventDefault()}},{default:withCtx(()=>[renderSlot(f$2.$slots,`default`)]),_:3},8,[`data-vaul-drawer-direction`,`data-vaul-delayed-snap-points`,`data-vaul-snap-points`,`style`,`onPointerup`]))}}),$t=[`data-vaul-drawer-visible`],Ot={"data-vaul-handle-hitarea":``,"aria-hidden":`true`},Tt=250,Pt=120,Nt=defineComponent({__name:`DrawerHandle`,props:{preventCycle:{type:Boolean,default:!1}},setup(e$4){let n=e$4,{onPress:s,onDrag:i,handleRef:t$1,handleOnly:w,isOpen:d,snapPoints:v,activeSnapPoint:D,isDragging:$,dismissible:T,closeDrawer:r$1}=ee(),l=ref(null),h$1=ref(!1);function m(){if(h$1.value){H();return}window.setTimeout(()=>{u()},Pt)}function u(){if($.value||n.preventCycle||h$1.value){H();return}if(H(),!v.value||v.value.length===0){T.value||r$1();return}let c$3=D.value===v.value[v.value.length-1];if(c$3&&T.value){r$1();return}let f$2=v.value.findIndex(P=>P===D.value);if(f$2===-1)return;let y=c$3?0:f$2+1;D.value=v.value[y]}function L(){l.value=window.setTimeout(()=>{h$1.value=!0},Tt)}function H(){l.value&&window.clearTimeout(l.value),h$1.value=!1}function p$4(c$3){w.value&&s(c$3),L()}function a$1(c$3){w.value&&i(c$3)}return(c$3,f$2)=>(openBlock(),createElementBlock(`div`,{ref_key:`handleRef`,ref:t$1,"data-vaul-drawer-visible":unref(d)?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,onClick:m,onPointercancel:H,onPointerdown:p$4,onPointermove:a$1},[createBaseVNode(`span`,Ot,[renderSlot(c$3.$slots,`default`)])],40,$t))}});var Dialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Dialog`,props:{modelValue:{type:Boolean,default:!1,required:!1},modelModifiers:{}},emits:[`update:modelValue`],setup(__props){let showDialog=useModel(__props,`modelValue`),isDesktop=useMediaQuery(`(min-width: 768px)`),screenSafeArea=useScreenSafeArea();return useResizeObserver(document.documentElement,()=>screenSafeArea.update()),onMounted(()=>screenSafeArea.update()),(_ctx,_cache$1)=>unref(isDesktop)?(openBlock(),createBlock(unref(DialogRoot_default),{key:0,open:showDialog.value,"onUpdate:open":_cache$1[0]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[renderSlot(_ctx.$slots,`trigger`),createVNode(unref(DialogPortal_default),null,{default:withCtx(()=>[createVNode(unref(DialogOverlay_default),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-[9999] bg-black/50 backdrop-blur-sm`}),createVNode(unref(DialogContent_default),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-[9999] max-h-full max-w-2xl w-[92dvw] transform overflow-y-scroll rounded-2xl bg-white p-6 shadow-xl outline-none backdrop-blur-md scrollbar-none -translate-x-1/2 -translate-y-1/2 dark:bg-neutral-900`},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3})]),_:3})]),_:3},8,[`open`])):(openBlock(),createBlock(unref(St),{key:1,open:showDialog.value,"should-scale-background":``,"onUpdate:open":_cache$1[1]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(DialogPortal_default),null,{default:withCtx(()=>[createVNode(unref(Bt),{class:`fixed inset-0`}),createVNode(unref(Ct),{class:`fixed bottom-0 left-0 right-0 z-1000 mt-20 h-full max-h-[96%] flex flex-col rounded-t-2xl bg-neutral-50 px-4 pt-4 outline-none backdrop-blur-md dark:bg-neutral-900/95`,style:normalizeStyle({paddingBottom:`${Math.max(Number.parseFloat(unref(screenSafeArea).bottom.value.replace(`px`,``)),24)}px`})},{default:withCtx(()=>[createVNode(unref(Nt)),renderSlot(_ctx.$slots,`default`)]),_:3},8,[`style`])]),_:3})]),_:3},8,[`open`]))}}),Dialog_default=Dialog_vue_vue_type_script_setup_true_lang_default;function calculateVolumeWithLinearNormalize(analyser){let dataBuffer=new Uint8Array(analyser.frequencyBinCount);analyser.getByteFrequencyData(dataBuffer);let volumeVector=[];for(let i=0;i<700;i+=80)volumeVector.push(dataBuffer[i]);let volumeSum=dataBuffer.map(v=>v**1.2).map(v=>v*1.2).reduce((acc,cur)=>acc+cur,0);return volumeSum/dataBuffer.length/100}function calculateVolumeWithMinMaxNormalize(analyser){let dataBuffer=new Uint8Array(analyser.frequencyBinCount);analyser.getByteFrequencyData(dataBuffer);let volumeVector=[];for(let i=0;i<700;i+=80)volumeVector.push(dataBuffer[i]);let amplifiedVolumeVector=dataBuffer.map(v=>v**1.5),min$1=Math.min(...amplifiedVolumeVector),max$1=Math.max(...amplifiedVolumeVector),range$1=max$1-min$1,normalizedVolumeVector;normalizedVolumeVector=range$1===0?amplifiedVolumeVector.map(()=>0):amplifiedVolumeVector.map(v=>(v-min$1)/range$1);let volumeSum=normalizedVolumeVector.reduce((acc,cur)=>acc+cur,0);return volumeSum/dataBuffer.length}function calculateVolume(analyser,mode=`linear`){switch(mode){case`linear`:return calculateVolumeWithLinearNormalize(analyser);case`minmax`:return calculateVolumeWithMinMaxNormalize(analyser)}}const useAudioContext=defineStore(`audio-context`,()=>{let audioContext=ref(new AudioContext);return onUnmounted(async()=>{audioContext&&await audioContext.value.close()}),{audioContext,calculateVolume}});function useAudioDevice$1(requestPermission=!1){let devices=useDevicesList({constraints:{audio:!0},requestPermissions:requestPermission}),audioInputs=computed(()=>devices.audioInputs.value),selectedAudioInput=ref(devices.audioInputs.value.find(device=>device.deviceId===`default`)?.deviceId||``),deviceConstraints=computed(()=>({audio:{deviceId:{exact:selectedAudioInput.value},autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}})),{stream,stop:stopStream,start:startStream}=useUserMedia({constraints:deviceConstraints,enabled:!1,autoSwitch:!0});watch(audioInputs,()=>{!selectedAudioInput.value&&audioInputs.value.length>0&&(selectedAudioInput.value=audioInputs.value.find(input=>input.deviceId===`default`)?.deviceId||audioInputs.value[0].deviceId)});function askPermission(){devices.ensurePermissions().then(()=>nextTick()).then(()=>{audioInputs.value.length>0&&!selectedAudioInput.value&&(selectedAudioInput.value=audioInputs.value.find(input=>input.deviceId===`default`)?.deviceId||audioInputs.value[0].deviceId)}).catch(error=>{console.error(`Error ensuring permissions:`,error)})}return onMounted(()=>{requestPermission&&askPermission()}),{audioInputs,selectedAudioInput,stream,deviceConstraints,askPermission,startStream,stopStream}}const useSpeakingStore=defineStore(`character-speaking`,()=>{let nowSpeakingAvatarBorderOpacityMin=30,nowSpeakingAvatarBorderOpacityMax=100,mouthOpenSize=ref(0),nowSpeaking=ref(!1),nowSpeakingAvatarBorderOpacity=computed(()=>nowSpeaking.value?(nowSpeakingAvatarBorderOpacityMin+(nowSpeakingAvatarBorderOpacityMax-nowSpeakingAvatarBorderOpacityMin)*mouthOpenSize.value)/100:nowSpeakingAvatarBorderOpacityMin);return{mouthOpenSize,nowSpeaking,nowSpeakingAvatarBorderOpacity}});async function*readableStreamToAsyncIterator(res){let reader=res.getReader();try{for(;;){let{done,value:value$1}=await reader.read();if(done)return;yield value$1}}finally{reader.releaseLock()}}const isPlainObject$4=value$1=>value$1!=null&&Object.getPrototypeOf(value$1)===Object.prototype,merge$3=(defaults$1,user)=>{let merged={...defaults$1};if(!user)return merged;for(let[key$2,value$1]of Object.entries(user)){if(value$1===void 0)continue;if(isPlainObject$4(merged[key$2])&&isPlainObject$4(value$1)){merged[key$2]=merge$3(merged[key$2],value$1);continue}merged[key$2]=value$1}return merged},sleep$1=async delay=>new Promise(resolve$1=>setTimeout(resolve$1,delay)),base64abc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),getTypeName=value$1=>{let type=typeof value$1;return type===`object`?value$1===null?`null`:value$1?.constructor?.name??`object`:type},validateBinaryLike=source=>{if(typeof source==`string`)return new TextEncoder().encode(source);if(source instanceof Uint8Array)return source;if(source instanceof ArrayBuffer)return new Uint8Array(source);throw TypeError(`The input must be a Uint8Array, a string, or an ArrayBuffer. Received a value of the type ${getTypeName(source)}.`)},encodeBase64=data$12=>{let uint8=validateBinaryLike(data$12),result=``,i,l=uint8.length;for(i=2;i>2],result+=base64abc[(uint8[i-2]&3)<<4|uint8[i-1]>>4],result+=base64abc[(uint8[i-1]&15)<<2|uint8[i]>>6],result+=base64abc[uint8[i]&63];return i===l+1&&(result+=base64abc[uint8[i-2]>>2],result+=base64abc[(uint8[i-2]&3)<<4],result+=`==`),i===l&&(result+=base64abc[uint8[i-2]>>2],result+=base64abc[(uint8[i-2]&3)<<4|uint8[i-1]>>4],result+=base64abc[(uint8[i-1]&15)<<2],result+=`=`),result};function writeString$1(dataView,offset$2,string$4){for(let i=0;i{if(isRecording.value){let channelData=new Float32Array(e$4.inputBuffer.getChannelData(0));audioData.value.push(channelData)}},sourceNode.value.connect(processorNode.value),processorNode.value.connect(audioContext.value.destination)}catch(error){console.error(`Error starting audio recording:`,error),isRecording.value=!1}}}async function stopRecord(){if(!(!isRecording.value||!audioContext.value)){isRecording.value=!1;try{if(processorNode.value&&(processorNode.value.disconnect(),processorNode.value=void 0),sourceNode.value&&(sourceNode.value.disconnect(),sourceNode.value=void 0),audioData.value.length>0){recording.value=encodeWAV$1(audioData.value,audioContext.value.sampleRate);for(let hook of onStopRecordHooks.value)await hook(recording.value)}else recording.value=void 0;await audioContext.value.close(),audioContext.value=void 0}catch(error){console.error(`Error stopping audio recording:`,error)}return audioData.value}}return watch(mediaRef,()=>{isRecording.value&&stopRecord().then(()=>{mediaRef.value&&mediaRef.value.active&&startRecord()})}),{startRecord,stopRecord,onStopRecord,recording,isRecording}}function useAudioDevice(){let devices=useDevicesList({constraints:{audio:!0},requestPermissions:!0}),audioInputs=computed(()=>devices.audioInputs.value),selectedAudioInput=ref(devices.audioInputs.value[0]?.deviceId||``),deviceConstraints=computed(()=>({audio:{deviceId:{exact:selectedAudioInput.value},autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}})),{stream,stop:stopStream,start:startStream}=useUserMedia({constraints:deviceConstraints,enabled:!1,autoSwitch:!0});return watch(audioInputs,()=>{!selectedAudioInput.value&&audioInputs.value.length>0&&(selectedAudioInput.value=audioInputs.value[0]?.deviceId)}),onMounted(()=>{devices.ensurePermissions().then(()=>nextTick()).then(()=>{audioInputs.value.length>0&&!selectedAudioInput.value&&(selectedAudioInput.value=audioInputs.value.find(input=>input.deviceId===`default`)?.deviceId||audioInputs.value[0].deviceId)}).catch(error=>{console.error(`Error ensuring permissions:`,error)})}),{audioInputs,selectedAudioInput,stream,stopStream,startStream,deviceConstraints}}var States=function(States$1){return States$1.Literal=`literal`,States$1.Special=`special`,States$1}(States||{});function peek(array$1,index$1,offset$2){return index$1+offset$2<0||index$1+offset$2>=array$1.length-1?``:array$1[index$1+offset$2]}function useLlmmarkerParser(options$1){let state=States.Literal,buffer$1=``;return{async consume(textPart){for(let i=0;i`?(current+=peek(textPart,i,1),newState=States.Literal,i++):current===`<`?newState=States.Special:current===`>`&&(newState=States.Literal),state===States.Literal&&newState===States.Special?buffer$1!==``&&(await options$1.onLiteral?.(buffer$1),buffer$1=``):state===States.Special&&newState===States.Literal&&buffer$1!==``&&(buffer$1+=current,await options$1.onSpecial?.(buffer$1),buffer$1=``),state===States.Literal&&newState===States.Literal?(await options$1.onLiteral?.(current),buffer$1=``):state===States.Special&&newState===States.Literal?buffer$1=``:buffer$1+=current,state=newState}},async end(){buffer$1!==``&&(state===States.Literal?await options$1.onLiteral?.(buffer$1):buffer$1.endsWith(`|>`)&&await options$1.onSpecial?.(buffer$1))}}}const htmlVoidElements=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`];var Schema=class{constructor(property,normal,space$1){this.normal=normal,this.property=property,space$1&&(this.space=space$1)}};Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;function merge$4(definitions,space$1){let property={},normal={};for(let definition$29 of definitions)Object.assign(property,definition$29.property),Object.assign(normal,definition$29.normal);return new Schema(property,normal,space$1)}function normalize$1(value$1){return value$1.toLowerCase()}var Info=class{constructor(property,attribute){this.attribute=attribute,this.property=property}};Info.prototype.attribute=``,Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property=``,Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;var types_exports={};__export(types_exports,{boolean:()=>boolean$2,booleanish:()=>booleanish,commaOrSpaceSeparated:()=>commaOrSpaceSeparated,commaSeparated:()=>commaSeparated,number:()=>number$3,overloadedBoolean:()=>overloadedBoolean,spaceSeparated:()=>spaceSeparated});let powers=0;const boolean$2=increment(),booleanish=increment(),overloadedBoolean=increment(),number$3=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const checks=Object.keys(types_exports);var DefinedInfo=class extends Info{constructor(property,attribute,mask,space$1){let index$1=-1;if(super(property,attribute),mark$1(this,`space`,space$1),typeof mask==`number`)for(;++index$14&&normal.slice(0,4)===`data`&&valid.test(value$1)){if(value$1.charAt(4)===`-`){let rest=value$1.slice(5).replace(dash,camelcase);property=`data`+rest.charAt(0).toUpperCase()+rest.slice(1)}else{let rest=value$1.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!==`-`&&(dashes=`-`+dashes),value$1=`data`+dashes}}Type=DefinedInfo}return new Type(property,value$1)}function kebab($0){return`-`+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}const html$1=merge$4([aria,html$4,xlink,xmlns,xml],`html`),svg=merge$4([aria,svg$1,xlink,xmlns,xml],`svg`),own$7={}.hasOwnProperty;function zwitch(key$2,options$1){let settings=options$1||{};function one$3(value$1,...parameters){let fn$5=one$3.invalid,handlers$3=one$3.handlers;if(value$1&&own$7.call(value$1,key$2)){let id=String(value$1[key$2]);fn$5=own$7.call(handlers$3,id)?handlers$3[id]:one$3.unknown}if(fn$5)return fn$5.call(this,value$1,...parameters)}return one$3.handlers=settings.handlers||{},one$3.invalid=settings.invalid,one$3.unknown=settings.unknown,one$3}const defaultSubsetRegex=/["&'<>`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(value$1,options$1){if(value$1=value$1.replace(options$1.subset?charactersToExpressionCached(options$1.subset):defaultSubsetRegex,basic),options$1.subset||options$1.escapeOnly)return value$1;return value$1.replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic);function surrogate(pair,index$1,all$3){return options$1.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all$3.charCodeAt(index$1+2),options$1)}function basic(character,index$1,all$3){return options$1.format(character.charCodeAt(0),all$3.charCodeAt(index$1+1),options$1)}}function charactersToExpressionCached(subset$4){let cached$1=subsetToRegexCache.get(subset$4);return cached$1||(cached$1=charactersToExpression(subset$4),subsetToRegexCache.set(subset$4,cached$1)),cached$1}function charactersToExpression(subset$4){let groups=[],index$1=-1;for(;++index$1`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},dangerous=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],own$6={}.hasOwnProperty,characters={};let key$1;for(key$1 in characterEntitiesHtml4)own$6.call(characterEntitiesHtml4,key$1)&&(characters[characterEntitiesHtml4[key$1]]=key$1);const notAlphanumericRegex=/[^\dA-Za-z]/;function toNamed(code$1,next,omit$1,attribute){let character=String.fromCharCode(code$1);if(own$6.call(characters,character)){let name$2=characters[character],value$1=`&`+name$2;return omit$1&&characterEntitiesLegacy.includes(name$2)&&!dangerous.includes(name$2)&&(!attribute||next&&next!==61&¬AlphanumericRegex.test(String.fromCharCode(next)))?value$1:value$1+`;`}return``}function formatSmart(code$1,next,options$1){let numeric=toHexadecimal(code$1,next,options$1.omitOptionalSemicolons),named$1;if((options$1.useNamedReferences||options$1.useShortestReferences)&&(named$1=toNamed(code$1,next,options$1.omitOptionalSemicolons,options$1.attribute)),(options$1.useShortestReferences||!named$1)&&options$1.useShortestReferences){let decimal=toDecimal(code$1,next,options$1.omitOptionalSemicolons);decimal.length|^->||--!>|`],commentEntitySubset=[`<`,`>`];function comment$1(node$1,_1,_2,state){return state.settings.bogusComments?``:``;function encode($0){return stringifyEntities($0,Object.assign({},state.settings.characterReferences,{subset:commentEntitySubset}))}}function doctype$1(_1,_2,_3,state){return``}function ccount(value$1,character){let source=String(value$1);if(typeof character!=`string`)throw TypeError(`Expected character`);let count$1=0,index$1=source.indexOf(character);for(;index$1!==-1;)count$1++,index$1=source.indexOf(character,index$1+character.length);return count$1}function stringify(values,options$1){let settings=options$1||{},input=values[values.length-1]===``?[...values,``]:values;return input.join((settings.padRight?` `:``)+`,`+(settings.padLeft===!1?``:` `)).trim()}function stringify$1(values){return values.join(` `).trim()}const re=/[ \t\n\f\r]/g;function whitespace(thing){return typeof thing==`object`?thing.type===`text`?empty$1(thing.value):!1:empty$1(thing)}function empty$1(value$1){return value$1.replace(re,``)===``}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment$1){return sibling;function sibling(parent,index$1,includeWhitespace){let siblings$2=parent?parent.children:emptyChildren$1,offset$2=(index$1||0)+increment$1,next=siblings$2[offset$2];if(!includeWhitespace)for(;next&&whitespace(next);)offset$2+=increment$1,next=siblings$2[offset$2];return next}}const own$5={}.hasOwnProperty;function omission(handlers$3){return omit$1;function omit$1(node$1,index$1,parent){return own$5.call(handlers$3,node$1.tagName)&&handlers$3[node$1.tagName](node$1,index$1,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd,dt,head:headOrColgroupOrCaption,html:html$3,li,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr});function headOrColgroupOrCaption(_$1,index$1,parent){let next=siblingAfter(parent,index$1,!0);return!next||next.type!==`comment`&&!(next.type===`text`&&whitespace(next.value.charAt(0)))}function html$3(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function body$1(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function p(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return next?next.type===`element`&&(next.tagName===`address`||next.tagName===`article`||next.tagName===`aside`||next.tagName===`blockquote`||next.tagName===`details`||next.tagName===`div`||next.tagName===`dl`||next.tagName===`fieldset`||next.tagName===`figcaption`||next.tagName===`figure`||next.tagName===`footer`||next.tagName===`form`||next.tagName===`h1`||next.tagName===`h2`||next.tagName===`h3`||next.tagName===`h4`||next.tagName===`h5`||next.tagName===`h6`||next.tagName===`header`||next.tagName===`hgroup`||next.tagName===`hr`||next.tagName===`main`||next.tagName===`menu`||next.tagName===`nav`||next.tagName===`ol`||next.tagName===`p`||next.tagName===`pre`||next.tagName===`section`||next.tagName===`table`||next.tagName===`ul`):!parent||!(parent.type===`element`&&(parent.tagName===`a`||parent.tagName===`audio`||parent.tagName===`del`||parent.tagName===`ins`||parent.tagName===`map`||parent.tagName===`noscript`||parent.tagName===`video`))}function li(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`li`}function dt(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`))}function dd(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`)}function rubyElement(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`rp`||next.tagName===`rt`)}function optgroup(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`optgroup`}function option(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`option`||next.tagName===`optgroup`)}function thead(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`))}function tbody$1(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`)}function tfoot(_$1,index$1,parent){return!siblingAfter(parent,index$1)}function tr(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`tr`}function cells(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`td`||next.tagName===`th`)}const opening=omission({body,colgroup,head,html:html$2,tbody});function html$2(node$1){let head$1=siblingAfter(node$1,-1);return!head$1||head$1.type!==`comment`}function head(node$1){let seen$1=new Set;for(let child$1 of node$1.children)if(child$1.type===`element`&&(child$1.tagName===`base`||child$1.tagName===`title`)){if(seen$1.has(child$1.tagName))return!1;seen$1.add(child$1.tagName)}let child=node$1.children[0];return!child||child.type===`element`}function body(node$1){let head$1=siblingAfter(node$1,-1,!0);return!head$1||head$1.type!==`comment`&&!(head$1.type===`text`&&whitespace(head$1.value.charAt(0)))&&!(head$1.type===`element`&&(head$1.tagName===`meta`||head$1.tagName===`link`||head$1.tagName===`script`||head$1.tagName===`style`||head$1.tagName===`template`))}function colgroup(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1,!0);return parent&&previous$1&&previous$1.type===`element`&&previous$1.tagName===`colgroup`&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`col`)}function tbody(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1);return parent&&previous$1&&previous$1.type===`element`&&(previous$1.tagName===`thead`||previous$1.tagName===`tbody`)&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`tr`)}const constants={name:[[` +`)}}var system_v2_default=message;const chromaticHueDefault=220.44,llmInferenceEndToken=`<|llm_inference_end|>`,_hoisted_1$32={key:0,class:`flex items-center justify-between`},_hoisted_2$22={class:`text-sm font-medium`},_hoisted_3$16={class:`text-xs text-neutral-500`},_hoisted_4$13={class:`h-full w-full`},_hoisted_5$10={id:`below-threshold-gradient`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},_hoisted_6$9=[`fill`],_hoisted_7$6=[`y`,`height`,`fill`],_hoisted_8$5=[`y1`,`y2`,`stroke`,`fill`],_hoisted_9$4=[`d`,`fill`],_hoisted_10$4=[`d`,`stroke`,`stroke-width`],_hoisted_11$3={key:0,class:`absolute left-2 top-2 flex items-center gap-1.5 border border-primary-200 rounded-md bg-primary-50 px-2 py-1 dark:border-primary-800 dark:bg-primary-900`},_hoisted_12$3={class:`text-xs text-primary-700 font-medium dark:text-primary-300`},_hoisted_13$3={key:1,class:`flex flex-wrap items-center justify-between text-xs text-neutral-500`},_hoisted_14$2={class:`flex items-center gap-3`},_hoisted_15$1={class:`flex items-center gap-1 text-nowrap`},_hoisted_16$1={class:`flex items-center gap-1 text-nowrap`},_hoisted_17$1={key:0,class:`text-nowrap`};var TimeSeriesChart_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TimeSeriesChart`,props:{history:{},currentValue:{},threshold:{default:null},isActive:{type:Boolean},title:{default:`Time Series`},colorsHue:{},lineColor:{},thresholdColor:{},activeColor:{},inactiveColor:{},subtitle:{default:`Recent data`},activeLabel:{default:`Active`},activeLegendLabel:{default:`Active state`},inactiveLegendLabel:{default:`Inactive state`},thresholdLabel:{default:`Threshold`},height:{default:80},lineWidth:{default:1.5},chartHeight:{},minDataPoints:{default:5},precision:{default:0},unit:{default:`%`},showHeader:{type:Boolean,default:!0},showThreshold:{type:Boolean,default:!0},showArea:{type:Boolean,default:!0},showThresholdAreas:{type:Boolean,default:!0},showCurrentValue:{type:Boolean,default:!0},showActiveIndicator:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},formatValue:{}},setup(__props){let props=__props,chartHeight=computed(()=>props.height),timeSeriesChartRef=ref(),chromaticHue$1=inject(chromaticHue,chromaticHueDefault),chromaticHueOrDefault=toRef(()=>props.colorsHue||chromaticHue$1||chromaticHueDefault),chromaticShades=computed(()=>chromaticPaletteFrom(chromaticHueOrDefault.value)),timeSeriesChartContainerBounding=useElementBounding(timeSeriesChartRef,{windowResize:!0});watch([chromaticHueOrDefault,timeSeriesChartRef],()=>{timeSeriesChartRef.value&&timeSeriesChartRef.value.style.setProperty(`--chromatic-hue`,chromaticHueOrDefault.value.toString())},{immediate:!0});let lineColorProps=toRef(()=>props.lineColor),lineColor=computed(()=>lineColorProps.value?lineColorProps.value:chromaticShades.value.shadeBy(500).toHex()),thresholdColorProps=toRef(()=>props.thresholdColor),thresholdColor=computed(()=>{if(!thresholdColorProps.value){let color$2=chromaticShades.value.shadeBy(500).withAlpha(.1).color;return`oklch(${color$2.l} ${color$2.c} ${color$2.h} / ${color$2.alpha})`}return thresholdColorProps.value}),activeColorProps=toRef(()=>props.activeColor),activeColor=computed(()=>activeColorProps.value?activeColorProps.value:chromaticShades.value.shadeBy(600).toHex()),inactiveColorProps=toRef(()=>props.inactiveColor),inactiveColor=computed(()=>inactiveColorProps.value?inactiveColorProps.value:chromaticShades.value.shadeBy(400).toHex()),componentId=Math.random().toString(36).substring(2,9),gridPatternId=`grid-${componentId}`,areaGradientId=`area-gradient-${componentId}`,thresholdGradientId=`threshold-gradient-${componentId}`,normalizedThreshold=computed(()=>props.threshold===null?0:Math.max(0,Math.min(1,props.threshold))),thresholdLineY=computed(()=>props.threshold===null?0:chartHeight.value-normalizedThreshold.value*chartHeight.value),smoothPath=computed(()=>{let history$1=props.history;if(history$1.length<2)return``;let width=timeSeriesChartContainerBounding.width.value,height=chartHeight.value,path=`M0,${height-history$1[0]*height}`;for(let i=1;i{let history$1=props.history;if(history$1.length<2)return``;let width=timeSeriesChartContainerBounding.width.value,height=chartHeight.value,path=`M0,${height} L0,${height-history$1[0]*height}`;for(let i=1;i_ctx.history.length>_ctx.minDataPoints?(openBlock(),createElementBlock(`div`,{key:0,ref_key:`timeSeriesChartRef`,ref:timeSeriesChartRef,class:`time-series-chart space-y-3`},[_ctx.showHeader?(openBlock(),createElementBlock(`div`,_hoisted_1$32,[createBaseVNode(`div`,_hoisted_2$22,toDisplayString(_ctx.title),1),createBaseVNode(`div`,_hoisted_3$16,toDisplayString(_ctx.subtitle),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:`relative overflow-hidden border border-neutral-200 rounded-lg from-neutral-50 to-neutral-100 bg-gradient-to-b dark:border-neutral-800 dark:from-neutral-800 dark:to-neutral-900`,style:normalizeStyle({height:`${chartHeight.value}px`})},[(openBlock(),createElementBlock(`svg`,_hoisted_4$13,[createBaseVNode(`defs`,null,[createBaseVNode(`pattern`,{id:gridPatternId,width:`20`,height:`10`,patternUnits:`userSpaceOnUse`},_cache$1[0]||=[createBaseVNode(`path`,{d:`M 20 0 L 0 0 0 10`,fill:`none`,stroke:`rgb(156 163 175 / 0.1)`,"stroke-width":`0.5`},null,-1)]),createBaseVNode(`linearGradient`,{id:areaGradientId,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.3`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.15`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${lineColor.value};stop-opacity:0.05`)},null,4)]),createBaseVNode(`linearGradient`,{id:thresholdGradientId,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`},[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.3`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.15`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${activeColor.value};stop-opacity:0.05`)},null,4)]),createBaseVNode(`linearGradient`,_hoisted_5$10,[createBaseVNode(`stop`,{offset:`0%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.2`)},null,4),createBaseVNode(`stop`,{offset:`50%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.1`)},null,4),createBaseVNode(`stop`,{offset:`100%`,style:normalizeStyle(`stop-color:${thresholdColor.value};stop-opacity:0.05`)},null,4)])]),createBaseVNode(`rect`,{width:`100%`,height:`100%`,fill:`url(#${gridPatternId})`},null,8,_hoisted_6$9),_ctx.showThreshold&&_ctx.threshold!==null?(openBlock(),createElementBlock(`rect`,{key:0,x:`0`,y:thresholdLineY.value,width:`100%`,height:chartHeight.value-thresholdLineY.value,fill:thresholdColor.value,class:`transition-all duration-300`},null,8,_hoisted_7$6)):createCommentVNode(``,!0),_ctx.showThreshold&&_ctx.threshold!==null?(openBlock(),createElementBlock(`line`,{key:1,x1:`0`,y1:thresholdLineY.value,x2:`100%`,y2:thresholdLineY.value,stroke:thresholdColor.value,"stroke-width":`1.5`,"stroke-dasharray":`4,4`,fill:thresholdColor.value,class:`transition-all duration-300`},null,8,_hoisted_8$5)):createCommentVNode(``,!0),dataAreaPath.value&&_ctx.showArea?(openBlock(),createElementBlock(`path`,{key:2,d:dataAreaPath.value,fill:`url(#${areaGradientId})`,class:`transition-all duration-75`},null,8,_hoisted_9$4)):createCommentVNode(``,!0),smoothPath.value?(openBlock(),createElementBlock(`path`,{key:3,d:smoothPath.value,fill:`none`,stroke:lineColor.value,"stroke-width":_ctx.lineWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`drop-shadow-sm transition-all duration-75`},null,8,_hoisted_10$4)):createCommentVNode(``,!0)])),_ctx.showCurrentValue?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`absolute right-2 top-2 border border-neutral-200 rounded-md bg-white px-2 py-1 shadow-sm transition-all duration-200 dark:border-neutral-700 dark:bg-neutral-800`,_ctx.isActive?`bg-primary-50 dark:bg-primary-900 border-primary-200 dark:border-primary-800`:``])},[createBaseVNode(`div`,{class:normalizeClass([`text-xs font-medium`,_ctx.isActive?`text-primary-700 dark:text-primary-300`:`text-neutral-600 dark:text-neutral-400`])},toDisplayString(_ctx.formatValue?_ctx.formatValue(_ctx.currentValue):`${(_ctx.currentValue*100).toFixed(_ctx.precision)}${_ctx.unit}`),3)],2)):createCommentVNode(``,!0),createVNode(Transition,{name:`fade`},{default:withCtx(()=>[_ctx.isActive&&_ctx.showActiveIndicator?(openBlock(),createElementBlock(`div`,_hoisted_11$3,[_cache$1[1]||=createBaseVNode(`div`,{class:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-500`},null,-1),createBaseVNode(`span`,_hoisted_12$3,toDisplayString(_ctx.activeLabel),1)])):createCommentVNode(``,!0)]),_:1})],4),_ctx.showLegend?(openBlock(),createElementBlock(`div`,_hoisted_13$3,[createBaseVNode(`div`,_hoisted_14$2,[createBaseVNode(`span`,_hoisted_15$1,[createBaseVNode(`div`,{class:`h-2 w-2 rounded-full`,style:normalizeStyle({backgroundColor:activeColor.value})},null,4),createTextVNode(` `+toDisplayString(_ctx.activeLegendLabel),1)]),createBaseVNode(`span`,_hoisted_16$1,[createBaseVNode(`div`,{class:`h-2 w-2 rounded-full`,style:normalizeStyle({backgroundColor:inactiveColor.value})},null,4),createTextVNode(` `+toDisplayString(_ctx.inactiveLegendLabel),1)])]),_ctx.threshold===null?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_17$1,toDisplayString(_ctx.thresholdLabel)+`: `+toDisplayString((_ctx.threshold*100).toFixed(0))+`%`,1))])):createCommentVNode(``,!0)],512)):createCommentVNode(``,!0)}}),TimeSeriesChart_default=__plugin_vue_export_helper_default(TimeSeriesChart_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-6b4f300d`]]),Callout_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Callout`,props:{theme:{default:`primary`},label:{}},setup(__props){let props=__props,themeClasses={primary:{container:[`text-neutral-700/80 dark:text-neutral-300/80`,`bg-primary-50/60 dark:bg-primary-50/10 backdrop-blur-md`,`before:bg-primary-200 dark:bg-primary-900/10 before:content-[''] before:dark:bg-primary-900`],label:[`text-primary-500 dark:text-primary-400 font-semibold`]},lime:{container:[`text-neutral-700/80 dark:text-neutral-300/80`,`bg-lime-50/60 dark:bg-lime-50/10 backdrop-blur-md`,`before:bg-lime-200 dark:bg-lime-900/10 before:content-[''] before:dark:bg-lime-900`],label:[`text-lime-500 dark:text-lime-400 font-semibold`]},violet:{container:[`text-neutral-700/80 dark:text-neutral-300/80`,`bg-violet-50/60 dark:bg-violet-50/10 backdrop-blur-md`,`before:bg-violet-200 dark:bg-violet-900/10 before:content-[''] before:dark:bg-violet-900`],label:[`text-violet-500 dark:text-violet-400 font-semibold`]},orange:{container:[`text-neutral-700/80 dark:text-neutral-300/80`,`bg-orange-50/70 dark:bg-orange-50/10 backdrop-blur-md`,`before:bg-orange-200 dark:bg-orange-900/10 before:content-[''] before:dark:bg-orange-900`],label:[`text-orange-500 dark:text-orange-400 font-semibold`]}};return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{relative:``,"mb-4":``,flex:``,"flex-col":``,"gap-1":``,"overflow-hidden":``,"rounded-lg":``,py:`2.5`,pl:`6.5`,"pr-3":``,class:normalizeClass([...themeClasses[props.theme||`violet`].container,`before-position-absolute before:left-3 before:right-0 before:h-[calc(100%-2rem)] before:top-50% before:translate-y--50% before:w-1 before:rounded-full`])},[createBaseVNode(`div`,{text:`font-semibold`,class:normalizeClass([...themeClasses[props.theme||`violet`].label||[]])},[renderSlot(_ctx.$slots,`label`,{},()=>[createTextVNode(toDisplayString(props.label||`Callout`),1)])],2),renderSlot(_ctx.$slots,`default`)],2))}}),Callout_default=Callout_vue_vue_type_script_setup_true_lang_default;const __vite_import_meta_env__={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`},motionState={};var SubscriptionManager=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(value$1){return!Number.isNaN(Number.parseFloat(value$1))}var MotionValue=class{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new SubscriptionManager;stopAnimation;canTrackVelocity=!1;constructor(init){this.prev=this.current=init,this.canTrackVelocity=isFloat(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(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(init){return new MotionValue(init)}const{isArray:isArray$2}=Array;function useMotionValues(){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$2(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(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(v){return Array.isArray(v)}function underDampedSpring(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function criticallyDampedSpring(to$1){return{type:`spring`,stiffness:550,damping:to$1===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function overDampedSpring(to$1){return{type:`spring`,stiffness:550,damping:to$1===0?100:30,restDelta:.01,restSpeed:10}}function linearTween(){return{type:`keyframes`,ease:`linear`,duration:300}}function keyframes$1(values){return{type:`keyframes`,duration:800,values}}const defaultTransitions={default:overDampedSpring,x:underDampedSpring,y:underDampedSpring,z:underDampedSpring,rotate:underDampedSpring,rotateX:underDampedSpring,rotateY:underDampedSpring,rotateZ:underDampedSpring,scaleX:criticallyDampedSpring,scaleY:criticallyDampedSpring,scale:criticallyDampedSpring,backgroundColor:linearTween,color:linearTween,opacity:linearTween};function getDefaultTransition(valueKey,to$1){let transitionFactory;return transitionFactory=isKeyframesTarget(to$1)?keyframes$1:defaultTransitions[valueKey]||defaultTransitions.default,{to:to$1,...transitionFactory(to$1)}}const int$1={...number$4,transform:Math.round},valueTypes$1={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$1,filter,WebkitFilter:filter,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int$1},getValueType=key$2=>valueTypes$1[key$2];function getValueAsType(value$1,type){return type&&typeof value$1==`number`&&type.transform?type.transform(value$1):value$1}function getAnimatableNone(key$2,value$1){let defaultValueType=getValueType(key$2);return defaultValueType!==filter&&(defaultValueType=complex),defaultValueType.getAnimatableNone?defaultValueType.getAnimatableNone(value$1):void 0}const easingLookup={linear:linear$1,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate,bounceIn,bounceInOut,bounceOut};function easingDefinitionToFunction(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[definition$29];return definition$29}function isEasingArray(ease){return Array.isArray(ease)&&typeof ease[0]!=`number`}function isAnimatable(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(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({ease,times,delay,...transition}){let options$1={...transition};return times&&(options$1.offset=times),ease&&(options$1.ease=isEasingArray(ease)?ease.map(easingDefinitionToFunction):easingDefinitionToFunction(ease)),delay&&(options$1.elapsed=-delay),options$1}function getPopmotionAnimationOptions(transition,options$1,key$2){return Array.isArray(options$1.to)&&(transition.duration||=800),hydrateKeyframes(options$1),!isTransitionDefined(transition)&&(transition={...transition,...getDefaultTransition(key$2,options$1.to)}),{...options$1,...convertTransitionToAnimationOptions(transition)}}function isTransitionDefined({delay,repeat,repeatType,repeatDelay,from,...transition}){return!!Object.keys(transition).length}function getValueTransition(transition,key$2){return transition[key$2]||transition.default||transition}function getAnimation(key$2,value$1,target$1,transition,onComplete){let valueTransition=getValueTransition(transition,key$2),origin=valueTransition.from===null||valueTransition.from===void 0?value$1.get():valueTransition.from,isTargetAnimatable=isAnimatable(key$2,target$1);origin===`none`&&isTargetAnimatable&&typeof target$1==`string`&&(origin=getAnimatableNone(key$2,target$1));let isOriginAnimatable=isAnimatable(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(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(){let{motionValues,stop:stop$1,get}=useMotionValues(),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(key$2,motionValue,value$1,transition,onComplete);motionValue.start(animation)};return{motionValues,stop:stop$1,push:push$1}}function useMotionControls(motionProperties,variants={},{motionValues,push:push$1,stop:stop$1}=useMotionTransitions()){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(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$1=typeof window<`u`,supportsPointerEvents=()=>isBrowser$1&&(window.onpointerdown===null||__vite_import_meta_env__?.TEST),supportsTouchEvents=()=>isBrowser$1&&(window.ontouchstart===null||__vite_import_meta_env__?.TEST),supportsMouseEvents=()=>isBrowser$1&&(window.onmousedown===null||__vite_import_meta_env__?.TEST);function registerEventListeners({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()&&(useEventListener(target$1,`mousedown`,()=>tapped.value=!0),useEventListener(target$1,`mouseup`,()=>tapped.value=!1)),supportsPointerEvents()&&(useEventListener(target$1,`pointerdown`,()=>tapped.value=!0),useEventListener(target$1,`pointerup`,()=>tapped.value=!1)),supportsTouchEvents()&&(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({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({state,apply:apply$2}){watch(state,newVal=>{newVal&&apply$2(newVal)},{immediate:!0})}function registerVisibilityHooks({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(instance,options$1={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){options$1.lifeCycleHooks&®isterLifeCycleHooks(instance),options$1.syncVariants&®isterVariantsSync(instance),options$1.visibilityHooks&®isterVisibilityHooks(instance),options$1.eventListeners&®isterEventListeners(instance)}function reactiveStyle(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(key$2),valueAsType=getValueAsType(value$1,valueType);result[key$2]=valueAsType}style.value=result},{immediate:!0,deep:!0}),{state,style}}function usePermissiveTarget(target$1,onTarget){watch(()=>unrefElement(target$1),el=>{el&&onTarget(el)},{immediate:!0})}const translateAlias={x:`translateX`,y:`translateY`,z:`translateZ`};function reactiveTransform(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(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(key$2),valueAsType=getValueAsType(value$1,valueType);result+=`${translateAlias[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=[``,`X`,`Y`,`Z`],order$1=[`perspective`,`translate`,`scale`,`rotate`,`skew`],transformProps=[`transformPerspective`,`x`,`y`,`z`];order$1.forEach(operationKey=>{transformAxes.forEach(axesKey=>{let key$2=operationKey+axesKey;transformProps.push(key$2)})});const transformPropSet=new Set(transformProps);function isTransformProp(key$2){return transformPropSet.has(key$2)}const transformOriginProps=new Set([`originX`,`originY`,`originZ`]);function isTransformOriginProp(key$2){return transformOriginProps.has(key$2)}function splitValues(variant){let transform$2={},style={};return Object.entries(variant).forEach(([key$2,value$1])=>{isTransformProp(key$2)||isTransformOriginProp(key$2)?transform$2[key$2]=value$1:style[key$2]=value$1}),{transform:transform$2,style}}function variantToStyle(variant){let{transform:_transform,style:_style}=splitValues(variant),{transform:transform$2}=reactiveTransform(_transform),{style}=reactiveStyle(_style);return transform$2.value&&(style.value.transform=transform$2.value),style.value}function useElementStyle(target$1,onInit){let _cache$1,_target$1,{state,style}=reactiveStyle();return usePermissiveTarget(target$1,el=>{_target$1=el;for(let key$2 of Object.keys(valueTypes$1)){if(el.style[key$2]===null||el.style[key$2]===``||isTransformProp(key$2)||isTransformOriginProp(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(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(state,transform$2){Object.entries(parseTransform(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(target$1,onInit){let _cache$1,_target$1,{state,transform:transform$2}=reactiveTransform();return usePermissiveTarget(target$1,el=>{_target$1=el,el.style.transform&&stateFromTransform(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(obj){return Object.entries(obj)}function useMotionProperties(target$1,defaultValues){let motionProperties=reactive({}),apply$2=values=>Object.entries(values).forEach(([key$2,value$1])=>motionProperties[key$2]=value$1),{style}=useElementStyle(target$1,apply$2),{transform:transform$2}=useElementTransform(target$1,apply$2);return watch(motionProperties,newVal=>{objectEntries(newVal).forEach(([key$2,value$1])=>{let target2=isTransformProp(key$2)?transform$2:style;target2[key$2]&&target2[key$2]===value$1||(target2[key$2]=value$1)})},{immediate:!0,deep:!0}),usePermissiveTarget(target$1,()=>defaultValues&&apply$2(defaultValues)),{motionProperties,style,transform:transform$2}}function useMotionVariants(variants={}){let _variants=unref(variants),variant=ref(),state=computed(()=>{if(variant.value)return _variants[variant.value]});return{state,variant}}function useMotion(target$1,variants={},options$1){let{motionProperties}=useMotionProperties(target$1),{variant,state}=useMotionVariants(variants),controls=useMotionControls(motionProperties,variants),instance={target:target$1,variant,variants,state,motionProperties,...controls};return useMotionFeatures(instance,options$1),instance}const transitionKeys=[`delay`,`duration`],directivePropsKeys=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...transitionKeys];function isTransitionKey(val){return transitionKeys.includes(val)}function resolveVariants(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){if(!target$1||!target$1[key$2])continue;if(isTransitionKey(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(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[key$2]&&motionState[key$2].stop();let variantsObject=isPreset?structuredClone(toRaw(variants)||{}):variants||{},variantsRef=ref(variantsObject);typeof binding.value==`object`&&(variantsRef.value=binding.value),resolveVariants(node$1,variantsRef);let motionOptions={eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1},motionInstance=useMotion(el,variantsRef,motionOptions);el.motionInstance=motionInstance,key$2&&(motionState[key$2]=motionInstance)},mounted=(el,_binding,_node)=>{el.motionInstance&®isterVisibilityHooks(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(initial);return{style}}}}const fade={initial:{opacity:0},enter:{opacity:1}},fadeVisible={initial:{opacity:0},visible:{opacity:1}},fadeVisibleOnce={initial:{opacity:0},visibleOnce:{opacity:1}},pop={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},popVisible={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},popVisibleOnce={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},rollLeft={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleLeft={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceLeft={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollRight={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollVisibleRight={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceRight={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollTop={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleTop={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceTop={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollBottom={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleBottom={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleOnceBottom={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},slideLeft={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},slideVisibleLeft={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceLeft={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},slideRight={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},slideVisibleRight={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceRight={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},slideTop={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},slideVisibleTop={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceTop={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},slideBottom={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},slideVisibleBottom={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},slideVisibleOnceBottom={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},presets={__proto__:null,fade,fadeVisible,fadeVisibleOnce,pop,popVisible,popVisibleOnce,rollBottom,rollLeft,rollRight,rollTop,rollVisibleBottom,rollVisibleLeft,rollVisibleOnceBottom,rollVisibleOnceLeft,rollVisibleOnceRight,rollVisibleOnceTop,rollVisibleRight,rollVisibleTop,slideBottom,slideLeft,slideRight,slideTop,slideVisibleBottom,slideVisibleLeft,slideVisibleOnceBottom,slideVisibleOnceLeft,slideVisibleOnceRight,slideVisibleOnceTop,slideVisibleRight,slideVisibleTop};function slugify(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=Symbol(``),MotionComponentProps={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$3(val){return Object.prototype.toString.call(val)===`[object Object]`}function clone$1(v){if(Array.isArray(v))return v.map(clone$1);if(isObject$3(v)){let res={};for(let key$2 in v)res[key$2]=clone$1(v[key$2]);return res}return v}function setupMotionComponent(props){let instances=reactive({}),customPresets=inject(CUSTOM_PRESETS,{}),preset=computed(()=>props.preset==null?{}:customPresets!=null&&props.preset in customPresets?structuredClone(toRaw(customPresets)[props.preset]):props.preset in presets?structuredClone(presets[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$1(motionConfig.value),node$1.props);return node$1.props.onVnodeMounted=({el})=>{instances[index$1]=useMotion(el,elementMotionConfig)},node$1.props.onVnodeUpdated=({el})=>{let styles=variantToStyle(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=defineComponent({name:`Motion`,props:{...MotionComponentProps,is:{type:[String,Object],default:`div`}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent(props);return()=>{let style=variantToStyle(motionConfig.value.initial||{}),node$1=h(props.is,void 0,slots);return setNodeInstance(node$1,0,style),node$1}}}),MotionGroupComponent=defineComponent({name:`MotionGroup`,props:{...MotionComponentProps,is:{type:[String,Object],required:!1}},setup(props){let slots=useSlots(),{motionConfig,setNodeInstance}=setupMotionComponent(props);return()=>{let style=variantToStyle(motionConfig.value.initial||{}),nodes=slots.default?.()||[];for(let i=0;i{await apply$2(`initial`),await apply$2(`enter`)}),onUnmounted(async()=>{await apply$2(`leave`),finalizedDisableBackButton.value=!0}),watch([()=>props.title,()=>props.subtitle,route],async()=>{await apply$2(`leave`),await nextTick(),finalizedDisableBackButton.value=props.disableBackButton,title.value=props.title,subtitle.value=props.subtitle,await nextTick(),await apply$2(`initial`),await apply$2(`enter`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`pageHeaderRef`,ref:pageHeaderRef,style:{top:`env(safe-area-inset-top, 0px)`,right:`env(safe-area-inset-right, 0px)`,left:`env(safe-area-inset-left, 0px)`},sticky:``,"inset-x-0":``,"top-0":``,"z-99":``,"w-full":``,"pb-6":``,"pt-10":``,flex:`~ row items-center gap-2`,bg:`$bg-color`},[createBaseVNode(`button`,{onClick:_cache$1[0]||=$event=>unref(router$1).back()},[finalizedDisableBackButton.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,{key:0,"i-solar:alt-arrow-left-line-duotone":``,"text-2xl":``,class:normalizeClass({"pointer-events-none op-0":!_ctx.showBackButton})},null,2))]),createBaseVNode(`h1`,_hoisted_1$31,[subtitle.value?(openBlock(),createElementBlock(`div`,_hoisted_2$21,[createBaseVNode(`span`,_hoisted_3$15,toDisplayString(subtitle.value),1)])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$12,toDisplayString(title.value),1)])],512))}}),PageHeader_default=PageHeader_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$30=[`onClick`],_hoisted_2$20={flex:``,"items-center":``,"gap-1.5":``};var Section_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Section`,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-3 py-2 outline-none transition-all duration-250 ease-in-out sm:px-4 sm:py-3`,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)},[createBaseVNode(`div`,_hoisted_2$20,[createBaseVNode(`div`,{class:normalizeClass(_ctx.icon),"size-6":``},null,2),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$30)]),default:withCtx(()=>[createBaseVNode(`div`,{grid:``,"gap-2":``,"p-4":``,class:normalizeClass(_ctx.innerClass)},[renderSlot(_ctx.$slots,`default`)],2)]),_:3},8,[`default`]))}}),Section_default=Section_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$29={"z-1":``,"flex-1":``},_hoisted_2$19={"text-lg":``,"font-normal":``,class:`menu-icon-item-title`,transition:`all ease-in-out duration-400`},_hoisted_3$14={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-item-description`,transition:`all ease-in-out duration-400`};var IconItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`IconItem`,props:{title:{},description:{},icon:{},iconTemplate:{type:Boolean},to:{}},setup(__props){return(_ctx,_cache$1)=>{let _component_RouterLink=resolveComponent(`RouterLink`);return openBlock(),createBlock(_component_RouterLink,{box:`border`,flex:`~ row`,bg:`neutral-50 dark:neutral-900`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-item`,transition:`all ease-in-out duration-400`,relative:``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,cursor:`pointer`,to:_ctx.to},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$29,[createBaseVNode(`div`,_hoisted_2$19,toDisplayString(_ctx.title),1),createBaseVNode(`div`,_hoisted_3$14,[createBaseVNode(`span`,null,toDisplayString(_ctx.description),1)])]),typeof _ctx.icon==`string`?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`menu-icon-item-icon`,[_ctx.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-24":``,"translate-y-4":``,text:`neutral-400/50 dark:neutral-600/50`},null,2)):createCommentVNode(``,!0),_ctx.iconTemplate?renderSlot(_ctx.$slots,`icon`,{key:1},void 0,!0):createCommentVNode(``,!0)]),_:3},8,[`to`])}}}),IconItem_default=__plugin_vue_export_helper_default(IconItem_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-d08788bb`]]);const _hoisted_1$28={flex:`~ col`,bg:`neutral-50 dark:neutral-800`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-status-item`,transition:`all ease-in-out duration-400`,"w-full":``,"cursor-pointer":``,"of-hidden":``,"rounded-xl":``},_hoisted_2$18={"z-1":``,"flex-1":``},_hoisted_3$13={"text-lg":``,"font-normal":``,class:`menu-icon-status-item-title`,transition:`all ease-in-out duration-400`},_hoisted_4$11={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-status-item-description`,transition:`all ease-in-out duration-400`},_hoisted_5$9=[`src`],_hoisted_6$8={"p-2":``},_hoisted_7$5={key:0,"size-3":``,bg:`green-500 dark:green-600`,"rounded-full":``},_hoisted_8$4={key:1,"size-3":``,bg:`neutral-400 dark:neutral-500`,"rounded-full":``};var IconStatusItem_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`IconStatusItem`,props:{title:{},description:{},icon:{},iconColor:{},iconImage:{},to:{},configured:{type:Boolean}},setup(__props){let props=__props;return(_ctx,_cache$1)=>{let _component_RouterLink=resolveComponent(`RouterLink`);return openBlock(),createElementBlock(`div`,_hoisted_1$28,[createVNode(_component_RouterLink,{flex:`~ row`,class:`menu-icon-status-item-link`,bg:`white dark:neutral-900`,transition:`all ease-in-out duration-400`,relative:``,"h-full":``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,to:props.to},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_2$18,[createBaseVNode(`div`,_hoisted_3$13,toDisplayString(props.title),1),createBaseVNode(`div`,_hoisted_4$11,[createBaseVNode(`span`,null,toDisplayString(props.description||``),1)])]),props.icon?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`menu-icon-status-item-icon`,[props.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):createCommentVNode(``,!0),props.iconColor?(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`menu-icon-status-item-icon-color`,[props.iconColor]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):createCommentVNode(``,!0),props.iconImage?(openBlock(),createElementBlock(`img`,{key:2,src:props.iconImage,class:`menu-icon-status-item-icon-image`,transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,"grayscale-100":``},null,8,_hoisted_5$9)):createCommentVNode(``,!0)]),_:1},8,[`to`]),createBaseVNode(`div`,_hoisted_6$8,[props.configured?(openBlock(),createElementBlock(`div`,_hoisted_7$5)):(openBlock(),createElementBlock(`div`,_hoisted_8$4))])])}}}),IconStatusItem_default=__plugin_vue_export_helper_default(IconStatusItem_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-93a9757f`]]);const _hoisted_1$27=[`checked`,`name`,`value`],_hoisted_2$17={class:`relative mr-3 mt-0.5 flex-shrink-0`},_hoisted_3$12={class:`w-full flex flex-col gap-2`},_hoisted_4$10={class:`flex items-center`},_hoisted_5$8={key:0,class:`relative`},_hoisted_6$7=[`title`],_hoisted_7$4={key:1,class:`mt-2`};var RadioCardDetail_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardDetail`,props:mergeModels({id:{},name:{},value:{},title:{},description:{},deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:``},customInputPlaceholder:{default:``},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`),isExpanded=ref(!1);function toggleExpansion(){isExpanded.value=!isExpanded.value}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{key:_ctx.id,class:normalizeClass([`form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]`,[modelValue.value===_ctx.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,modelValue.value===_ctx.value?`form_radio-card-detail-active`:``,_ctx.deprecated?`opacity-60`:``]]),transition:`all duration-200 ease-in-out`,border:`2 solid`},[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,checked:modelValue.value===_ctx.value,type:`radio`,name:_ctx.name,value:_ctx.value,class:`absolute opacity-0`},null,8,_hoisted_1$27),[[vModelRadio,modelValue.value]]),createBaseVNode(`div`,_hoisted_2$17,[createBaseVNode(`div`,{class:normalizeClass([`size-5 border-2 rounded-full transition-colors duration-200`,[modelValue.value===_ctx.value?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[createBaseVNode(`div`,{class:normalizeClass([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[modelValue.value===_ctx.value?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),createBaseVNode(`div`,_hoisted_3$12,[createBaseVNode(`div`,_hoisted_4$10,[createBaseVNode(`span`,{class:normalizeClass([`line-clamp-1 font-normal`,[modelValue.value===_ctx.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},toDisplayString(_ctx.title),3)]),_ctx.description?(openBlock(),createElementBlock(`div`,_hoisted_5$8,[createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[!isExpanded.value||!_ctx.showExpandCollapse?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`line-clamp-2 cursor-pointer text-xs`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),title:_ctx.description,onClick:withModifiers(toggleExpansion,[`prevent`])},toDisplayString(_ctx.description),11,_hoisted_6$7)):(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`cursor-pointer text-xs`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),onClick:withModifiers(toggleExpansion,[`prevent`])},toDisplayString(_ctx.description),3))]),_:1}),_ctx.showExpandCollapse&&_ctx.description.length>_ctx.expandCollapseThreshold?(openBlock(),createElementBlock(`button`,{key:0,class:`mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600`,onClick:withModifiers(toggleExpansion,[`prevent`])},[createBaseVNode(`span`,null,toDisplayString(isExpanded.value?`Show less`:`Show more`),1),createBaseVNode(`div`,{class:normalizeClass([{"rotate-180":isExpanded.value},`transition-transform duration-200`])},_cache$1[2]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``,"ml-0.5":``,"text-xs":``},null,-1)],2)])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),_ctx.showCustomInput&&modelValue.value===_ctx.value?(openBlock(),createElementBlock(`div`,_hoisted_7$4,[createVNode(unref(Input_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:_ctx.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0)])],2))}}),RadioCardDetail_default=__plugin_vue_export_helper_default(RadioCardDetail_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fb6236db`]]);const _hoisted_1$26={class:`flex items-center gap-1.5 font-medium`},_hoisted_2$16={class:`px-1 text-sm`};var Alert_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Alert`,props:{type:{}},setup(__props){let props=__props,containerClass=computed(()=>{switch(props.type){case`error`:return`border-solid border-2 border-red-200 bg-red-50 dark:border-red-800/30 dark:bg-red-900/20`;case`warning`:return`border-solid border-2 border-amber-200 bg-amber-50 dark:border-amber-800/30 dark:bg-amber-900/20`}return``}),iconClass=computed(()=>{switch(props.type){case`error`:return`i-solar:close-circle-bold-duotone text-red-500 dark:text-red-400`;case`warning`:return`i-solar:danger-circle-bold-duotone text-amber-500 dark:text-amber-400`}return``}),titleClass=computed(()=>{switch(props.type){case`error`:return`text-red-500 dark:text-red-400`;case`warning`:return`text-amber-500 dark:text-amber-400`}return``});return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`flex flex-col gap-3 rounded-xl px-2 pb-3 pt-2`,containerClass.value])},[createBaseVNode(`div`,_hoisted_1$26,[createBaseVNode(`div`,{class:normalizeClass([`text-2xl`,iconClass.value])},null,2),createBaseVNode(`div`,{class:normalizeClass(titleClass.value)},[renderSlot(_ctx.$slots,`title`)],2)]),createBaseVNode(`div`,_hoisted_2$16,[renderSlot(_ctx.$slots,`content`)])],2))}}),Alert_default=Alert_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$25={class:`radio-card-detail-many-select`},_hoisted_2$15={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},_hoisted_3$11=[`placeholder`],_hoisted_4$9={class:`mt-4 space-y-2`},_hoisted_5$7={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_6$6={class:`relative`};var RadioCardManySelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardManySelect`,props:mergeModels({items:{},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search...`},searchNoResultsTitle:{default:`No results found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} results`},customInputPlaceholder:{default:`Enter custom value`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},showMore:{type:Boolean,default:!0},listClass:{default:``}},{modelValue:{required:!0},modelModifiers:{}}),emits:mergeModels([`update:customValue`],[`update:modelValue`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,modelValue=useModel(__props,`modelValue`),searchQuery=ref(``),isListExpanded=ref(!1),customValue=ref(``),filteredItems=computed(()=>{if(!searchQuery.value)return props.items;let query=searchQuery.value.toLowerCase();return props.items.filter(item=>item.name.toLowerCase().includes(query)||item.description&&item.description.toLowerCase().includes(query))});function updateCustomValue(value$1){customValue.value=value$1,emit$1(`update:customValue`,value$1)}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$25,[_ctx.searchable?(openBlock(),createElementBlock(`div`,_hoisted_2$15,[_cache$1[4]||=createBaseVNode(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[createBaseVNode(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>searchQuery.value=$event,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:_ctx.searchPlaceholder},null,8,_hoisted_3$11),[[vModelText,searchQuery.value]])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$9,[searchQuery.value?(openBlock(),createElementBlock(`div`,_hoisted_5$7,toDisplayString(_ctx.searchResultsText.replace(`{count}`,filteredItems.value.length.toString()).replace(`{total}`,_ctx.items.length.toString())),1)):createCommentVNode(``,!0),searchQuery.value&&filteredItems.value.length===0?(openBlock(),createBlock(Alert_default,{key:1,type:`warning`},{title:withCtx(()=>[createTextVNode(toDisplayString(_ctx.searchNoResultsTitle),1)]),content:withCtx(()=>[createTextVNode(toDisplayString(_ctx.searchNoResultsDescription.replace(`{query}`,searchQuery.value)),1)]),_:1})):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_6$6,[createBaseVNode(`div`,{class:normalizeClass([`grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto pb-4 scrollbar-none`,[isListExpanded.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``,...props.listClass?typeof props.listClass==`string`?[props.listClass]:props.listClass:[`max-h-[calc(100dvh-7lh)]`]]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredItems.value,item=>(openBlock(),createBlock(RadioCardDetail_default,{id:item.id,key:item.id,modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[1]||=$event=>modelValue.value=$event,value:item.id,title:item.name,description:item.description,deprecated:item.deprecated,"show-expand-collapse":_ctx.showMore,"expand-collapse-threshold":100,"show-custom-input":item.customizable,"custom-input-value":customValue.value,"custom-input-placeholder":_ctx.customInputPlaceholder,name:`radio-card-detail-many-select`,class:`scroll-snap-align-start`,"onUpdate:customInputValue":_cache$1[2]||=$event=>updateCustomValue($event)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`deprecated`,`show-expand-collapse`,`show-custom-input`,`custom-input-value`,`custom-input-placeholder`]))),128))],2),createBaseVNode(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:normalizeClass([isListExpanded.value?`w-full`:`mt-4 w-full rounded-lg`])},[createBaseVNode(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:normalizeClass([isListExpanded.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:_cache$1[3]||=$event=>isListExpanded.value=!isListExpanded.value},[createBaseVNode(`span`,null,toDisplayString(isListExpanded.value?_ctx.collapseButtonText:_ctx.expandButtonText),1),createBaseVNode(`div`,{class:normalizeClass([isListExpanded.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-linear":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),RadioCardManySelect_default=__plugin_vue_export_helper_default(RadioCardManySelect_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-e9feb562`]]);const _hoisted_1$24=[`checked`,`name`,`value`],_hoisted_2$14={flex:`~ col`,"min-h-16":``,"w-full":``,"items-start":``,"justify-center":``,"pb-2":``,"pl-5":``,"pr-4":``,"pt-2":``};var RadioCardSimple_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RadioCardSimple`,props:mergeModels({id:{},name:{},value:{},title:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{key:_ctx.id,border:`2px solid`,class:normalizeClass([`form_radio-card-simple relative`,[modelValue.value===_ctx.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,modelValue.value===_ctx.value?`form_radio-card-simple-active`:``]]),transition:`all duration-200 ease-in-out`,flex:`~ col`,block:``,"min-w-50":``,"w-fit":``,"cursor-pointer":``,"items-start":``,"rounded-xl":``,"p-4":``,"text-left":``},[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,checked:modelValue.value===_ctx.value,type:`radio`,name:_ctx.name,value:_ctx.value,class:`absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400`},null,8,_hoisted_1$24),[[vModelRadio,modelValue.value]]),_cache$1[1]||=createBaseVNode(`div`,{class:`radio-circle absolute left-2 top-2 size-5 rounded-full`,border:`2 solid neutral-300 dark:neutral-600`,transition:`all duration-200 ease-in-out`},[createBaseVNode(`div`,{class:`radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2`,transition:`all duration-200 ease-in-out`,bg:`primary-500 dark:primary-400`})],-1),createBaseVNode(`div`,_hoisted_2$14,[createBaseVNode(`span`,{class:normalizeClass([`radio-item-name font-normal`,[modelValue.value===_ctx.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-500 dark:text-neutral-500`]]),text:`md`,transition:`all duration-200 ease-in-out`},toDisplayString(_ctx.title),3),_ctx.description?(openBlock(),createElementBlock(`span`,{key:0,class:normalizeClass([`radio-item-description`,[modelValue.value===_ctx.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-400 dark:text-neutral-600`]]),transition:`all duration-200 ease-in-out`},toDisplayString(_ctx.description),3)):createCommentVNode(``,!0)]),_cache$1[2]||=createBaseVNode(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)],2))}}),RadioCardSimple_default=__plugin_vue_export_helper_default(RadioCardSimple_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-880ce73f`]]);const _hoisted_1$23={class:`p-3`},_hoisted_2$13={class:`flex items-start`},_hoisted_3$10=[`checked`,`name`,`value`],_hoisted_4$8={class:`relative mr-3 mt-0.5 flex-shrink-0`},_hoisted_5$6={key:0,class:`i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},_hoisted_6$5={key:1,class:`i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},_hoisted_7$3={key:1,class:`mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600`},_hoisted_8$3={class:`flex-1 cursor-pointer`},_hoisted_9$3={class:`flex items-center`},_hoisted_10$3={key:0,class:`mt-1 flex flex-wrap gap-1`},_hoisted_11$2={key:1,class:`mt-3`},_hoisted_12$2={relative:``},_hoisted_13$2={key:0,class:`h-16 px-3 pb-2`};var VoiceCard_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`VoiceCard`,props:mergeModels({name:{},voice:{},currentlyPlayingId:{},customInputPlaceholder:{default:`Enter custom voice name`},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:``},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:``},"custom-voice-nameModifiers":{}}),emits:mergeModels([`togglePlayback`],[`update:voice-id`,`update:custom-voice-name`]),setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,voiceId=useModel(__props,`voice-id`),customVoiceName=useModel(__props,`custom-voice-name`);function getPreviewUrl(voice){return voice.previewURL||voice.preview_audio_url}function formatVoiceAttributes(voice){let attributes=[];if(voice.labels?.gender&&attributes.push(voice.labels.gender),voice.labels?.age&&attributes.push(voice.labels.age),voice.labels?.accent&&attributes.push(voice.labels.accent),voice.languages&&voice.languages.length>0){let languageNames=voice.languages.map(lang=>lang.name).join(`, `);attributes.push(languageNames)}return attributes}function togglePlayback(){emit$1(`togglePlayback`,props.voice)}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`label`,{border:`2px solid`,class:normalizeClass([`scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl`,[voiceId.value===props.voice.id?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,voiceId.value===props.voice.id?`form_voice-card-active`:``]]),transition:`all duration-200 ease-in-out`},[createBaseVNode(`div`,_hoisted_1$23,[createBaseVNode(`div`,_hoisted_2$13,[withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>voiceId.value=$event,checked:voiceId.value===props.voice.id,type:`radio`,name:_ctx.name,value:props.voice.id,class:`absolute cursor-pointer opacity-0`},null,8,_hoisted_3$10),[[vModelRadio,voiceId.value]]),createBaseVNode(`div`,_hoisted_4$8,[createBaseVNode(`div`,{class:normalizeClass([`size-5 border-2 rounded-full transition-colors duration-200`,[voiceId.value===props.voice.id?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[createBaseVNode(`div`,{class:normalizeClass([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[voiceId.value===props.voice.id?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),getPreviewUrl(_ctx.voice)?(openBlock(),createElementBlock(`button`,{key:0,absolute:``,"right-0":``,top:`0`,"z-3":``,class:normalizeClass([`translate-x-[-50%] translate-y-[50%]`,[_ctx.currentlyPlayingId===_ctx.voice.id?`text-white dark:text-white`:``]]),onClick:togglePlayback},[_ctx.currentlyPlayingId===_ctx.voice.id?(openBlock(),createElementBlock(`div`,_hoisted_5$6)):(openBlock(),createElementBlock(`div`,_hoisted_6$5))],2)):(openBlock(),createElementBlock(`div`,_hoisted_7$3,` No preview available `)),createBaseVNode(`div`,_hoisted_8$3,[createBaseVNode(`div`,_hoisted_9$3,[createBaseVNode(`span`,{class:normalizeClass([`line-clamp-1 font-medium`,[voiceId.value===_ctx.voice.id?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},toDisplayString(_ctx.voice.name),3)]),formatVoiceAttributes(_ctx.voice).length>0?(openBlock(),createElementBlock(`div`,_hoisted_10$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(formatVoiceAttributes(_ctx.voice),(attribute,attrIndex)=>(openBlock(),createElementBlock(`span`,{key:attrIndex,class:normalizeClass([`inline-flex items-center rounded-md px-1.5 py-0.5 text-xs`,[voiceId.value===_ctx.voice.id?`bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400`:`bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300`]])},toDisplayString(attribute),3))),128))])):createCommentVNode(``,!0),_ctx.voice.customizable&&voiceId.value===_ctx.voice.id?(openBlock(),createElementBlock(`div`,_hoisted_11$2,[createVNode(unref(Input_default),{modelValue:customVoiceName.value,"onUpdate:modelValue":_cache$1[1]||=$event=>customVoiceName.value=$event,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:_ctx.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),_ctx.voice.description?(openBlock(),createElementBlock(`div`,{key:2,class:normalizeClass([`line-clamp-2 mt-1 text-xs`,[voiceId.value===_ctx.voice.id?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]])},toDisplayString(_ctx.voice.description),3)):createCommentVNode(``,!0)])])]),createBaseVNode(`div`,_hoisted_12$2,[createVNode(unref(TransitionVertical_default),null,{default:withCtx(()=>[_ctx.showVisualizer&&_ctx.currentlyPlayingId===_ctx.voice.id&&_ctx.audioStream?(openBlock(),createElementBlock(`div`,_hoisted_13$2,[createVNode(unref(AudioSpectrum_default),{stream:_ctx.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:withCtx(({frequencies})=>[createVNode(unref(AudioSpectrumVisualizer_default),{frequencies,"bars-class":voiceId.value===_ctx.voice.id?`bg-primary-500 dark:bg-primary-400`:`bg-neutral-400 dark:bg-neutral-600`},null,8,[`frequencies`,`bars-class`])]),_:1},8,[`stream`])])):createCommentVNode(``,!0)]),_:1})])],2))}}),VoiceCard_default=__plugin_vue_export_helper_default(VoiceCard_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fd4023c4`]]);const _hoisted_1$22={class:`voice-preview-player`},_hoisted_2$12={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},_hoisted_3$9=[`placeholder`],_hoisted_4$7={class:`mt-4 space-y-2`},_hoisted_5$5={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_6$4={class:`relative`};var VoiceCardManySelect_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`VoiceCardManySelect`,props:mergeModels({voices:{},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search voices...`},searchNoResultsTitle:{default:`No voices found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} voices`},customInputPlaceholder:{default:`Enter custom voice name`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},playButtonText:{default:`Play sample`},pauseButtonText:{default:`Pause`},showVisualizer:{type:Boolean,default:!0},listClass:{default:``}},{"search-query":{required:!1,default:``},"search-queryModifiers":{},"voice-id":{required:!1,default:``},"voice-idModifiers":{}}),emits:[`update:search-query`,`update:voice-id`],setup(__props){let props=__props,isListExpanded=ref(!1),currentlyPlayingId=ref(),audioElements=ref(new Map),audioStreams=ref(new Map),audioContexts=ref(new Map),audioSources=ref(new Map),sharedAudioContext=ref(null);function initAudioContext(){return sharedAudioContext.value||=new(window.AudioContext||window.webkitAudioContext),sharedAudioContext.value}let searchQuery=useModel(__props,`search-query`),voiceId=useModel(__props,`voice-id`),filteredVoices=computed(()=>{if(!searchQuery.value)return props.voices;let query=searchQuery.value.toLowerCase();return props.voices.filter(voice=>{let nameMatch=voice.name.toLowerCase().includes(query),descMatch=voice.description&&voice.description.toLowerCase().includes(query),tagMatch=voice.tags&&voice.tags.some(tag=>tag.toLowerCase().includes(query)),labelMatch=voice.labels&&Object.values(voice.labels).some(value$1=>typeof value$1==`string`&&value$1.toLowerCase().includes(query)),langMatch=voice.languages&&voice.languages.some(lang=>lang.name.toLowerCase().includes(query)||lang.code.toLowerCase().includes(query));return nameMatch||descMatch||tagMatch||labelMatch||langMatch})});function getPreviewUrl(voice){return voice.previewURL||voice.preview_audio_url}function getAudioElement(voice){let previewUrl=getPreviewUrl(voice);if(!previewUrl)return null;if(audioElements.value.has(voice.id))return audioElements.value.get(voice.id)||null;let audio=new Audio(previewUrl);return audio.crossOrigin=`anonymous`,audio.preload=`auto`,audio.addEventListener(`ended`,()=>{if(currentlyPlayingId.value===voice.id){currentlyPlayingId.value=void 0;let stream=audioStreams.value.get(voice.id);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(voice.id))}}),audioElements.value.set(voice.id,audio),audio}function createAudioStream(audio,voiceId$1){try{if(audioStreams.value.has(voiceId$1))return audioStreams.value.get(voiceId$1)||null;let audioContext=initAudioContext();if(audioSources.value.has(voiceId$1)){let source$1=audioSources.value.get(voiceId$1),destination$1=audioContext.createMediaStreamDestination();source$1.connect(destination$1);let stream$1=destination$1.stream;return audioStreams.value.set(voiceId$1,stream$1),stream$1}let source=audioContext.createMediaElementSource(audio);audioSources.value.set(voiceId$1,source),source.connect(audioContext.destination);let destination=audioContext.createMediaStreamDestination();source.connect(destination);let stream=destination.stream;return audioStreams.value.set(voiceId$1,stream),stream}catch(error){return console.error(`Failed to create audio stream for visualizer:`,error),null}}function togglePlayback(voice){try{let previewUrl=getPreviewUrl(voice);if(!previewUrl)return;let audio=getAudioElement(voice);if(!audio)return;if(currentlyPlayingId.value===voice.id){audio.pause(),currentlyPlayingId.value=void 0;let stream=audioStreams.value.get(voice.id);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(voice.id));return}if(currentlyPlayingId.value){let currentAudio=audioElements.value.get(currentlyPlayingId.value);currentAudio&¤tAudio.pause();let stream=audioStreams.value.get(currentlyPlayingId.value);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(currentlyPlayingId.value))}props.showVisualizer&&!audioStreams.value.has(voice.id)&&createAudioStream(audio,voice.id),audio.currentTime=0,audio.play().catch(error=>{console.error(`Failed to play audio:`,error)}),currentlyPlayingId.value=voice.id}catch(err){console.error(err),currentlyPlayingId.value=void 0}}function cleanup(){audioElements.value.forEach(audio=>{audio.pause(),audio.src=``}),audioElements.value.clear(),audioStreams.value.forEach(stream=>{stream.getTracks().forEach(track$1=>track$1.stop())}),audioStreams.value.clear(),audioContexts.value.forEach(context$1=>{context$1.state!==`closed`&&context$1.close()}),audioContexts.value.clear(),audioSources.value.clear(),currentlyPlayingId.value=void 0}watch(searchQuery,()=>{if(currentlyPlayingId.value){let audio=audioElements.value.get(currentlyPlayingId.value);audio&&audio.pause();let stream=audioStreams.value.get(currentlyPlayingId.value);stream&&(stream.getTracks().forEach(track$1=>track$1.stop()),audioStreams.value.delete(currentlyPlayingId.value)),currentlyPlayingId.value=void 0}}),onBeforeUnmount(cleanup);let customVoiceName=ref(``);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$22,[_ctx.searchable?(openBlock(),createElementBlock(`div`,_hoisted_2$12,[_cache$1[4]||=createBaseVNode(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[createBaseVNode(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),withDirectives(createBaseVNode(`input`,{"onUpdate:modelValue":_cache$1[0]||=$event=>searchQuery.value=$event,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:_ctx.searchPlaceholder},null,8,_hoisted_3$9),[[vModelText,searchQuery.value]])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_4$7,[searchQuery.value?(openBlock(),createElementBlock(`div`,_hoisted_5$5,toDisplayString(_ctx.searchResultsText.replace(`{count}`,filteredVoices.value.length.toString()).replace(`{total}`,_ctx.voices.length.toString())),1)):createCommentVNode(``,!0),searchQuery.value&&filteredVoices.value.length===0?(openBlock(),createBlock(Alert_default,{key:1,type:`warning`},{title:withCtx(()=>[createTextVNode(toDisplayString(_ctx.searchNoResultsTitle),1)]),content:withCtx(()=>[createTextVNode(toDisplayString(_ctx.searchNoResultsDescription.replace(`{query}`,searchQuery.value)),1)]),_:1})):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_6$4,[createBaseVNode(`div`,{class:normalizeClass([`grid auto-cols-[350px] grid-flow-col gap-4 overflow-x-auto scrollbar-none`,[isListExpanded.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``,...props.listClass?typeof props.listClass==`string`?[props.listClass]:props.listClass:[`max-h-[calc(100dvh-7lh)]`]]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredVoices.value,voice=>(openBlock(),createBlock(VoiceCard_default,{key:voice.id,"voice-id":voiceId.value,"onUpdate:voiceId":_cache$1[1]||=$event=>voiceId.value=$event,"custom-voice-name":customVoiceName.value,"onUpdate:customVoiceName":_cache$1[2]||=$event=>customVoiceName.value=$event,name:`voice`,voice,"currently-playing-id":currentlyPlayingId.value,"custom-input-placeholder":_ctx.customInputPlaceholder,"show-visualizer":_ctx.showVisualizer,"audio-stream":audioStreams.value.get(voice.id),onTogglePlayback:togglePlayback},null,8,[`voice-id`,`custom-voice-name`,`voice`,`currently-playing-id`,`custom-input-placeholder`,`show-visualizer`,`audio-stream`]))),128))],2),createBaseVNode(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:normalizeClass([isListExpanded.value?`w-full`:`mt-4 w-full rounded-lg`])},[createBaseVNode(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:normalizeClass([isListExpanded.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:_cache$1[3]||=$event=>isListExpanded.value=!isListExpanded.value},[createBaseVNode(`span`,null,toDisplayString(isListExpanded.value?_ctx.collapseButtonText:_ctx.expandButtonText),1),createBaseVNode(`div`,{class:normalizeClass([isListExpanded.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-linear":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),VoiceCardManySelect_default=__plugin_vue_export_helper_default(VoiceCardManySelect_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-43a4b028`]]);const _hoisted_1$21=[`disabled`],_hoisted_2$11={class:`flex flex-row items-center justify-center gap-2`},_hoisted_3$8={key:0,class:`w-4`},_hoisted_4$6={key:0,class:`i-svg-spinners:ring-resize h-4 w-4`},_hoisted_5$4={key:0};var Button_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Button`,props:{toggled:{type:Boolean,default:!1},icon:{},label:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:`primary`},size:{default:`md`},theme:{default:`default`},block:{type:Boolean,default:!1}},setup(__props){let props=__props,isDisabled=computed(()=>props.disabled||props.loading),variantClasses={primary:{default:{default:`bg-primary-500/15 hover:bg-primary-500/20 active:bg-primary-500/30 dark:bg-primary-700/30 dark:hover:bg-primary-700/40 dark:active:bg-primary-700/30 focus:ring-primary-300/60 dark:focus:ring-primary-600/30 border-2 border-solid border-primary-500/5 dark:border-primary-900/40 text-primary-950 dark:text-primary-100`}},secondary:{default:{default:`bg-neutral-100/55 hover:bg-neutral-400/20 active:bg-neutral-400/30 dark:bg-neutral-700/60 dark:hover:bg-neutral-700/80 dark:active:bg-neutral-700/60 focus:ring-neutral-300/30 dark:focus:ring-neutral-600/60 dark:focus:ring-neutral-600/30 border-2 border-solid border-neutral-300/30 dark:border-neutral-700/30 text-neutral-950 dark:text-neutral-100`}},"secondary-muted":{default:{default:`hover:bg-neutral-50/50 active:bg-neutral-50/90 hover:dark:bg-neutral-800/50 active:dark:bg-neutral-800/90 border-2 border-solid border-neutral-100/60 dark:border-neutral-800/30 focus:ring-neutral-300/30 dark:focus:ring-neutral-600/60 dark:focus:ring-neutral-600/30`,nonToggled:`bg-neutral-50/70 dark:bg-neutral-800/70 text-neutral-500 dark:text-neutral-400`,toggled:`bg-white/90 dark:bg-neutral-500/70 ring-neutral-300/30 dark:ring-neutral-600/60 ring-2 dark:ring-neutral-600/30 text-primary-500 dark:text-primary-100`}},danger:{default:{default:`bg-red-500/15 hover:bg-red-500/20 active:bg-red-500/30 dark:bg-red-700/30 dark:hover:bg-red-700/40 dark:active:bg-red-700/30 focus:ring-red-300/30 dark:focus:ring-red-600/60 dark:focus:ring-red-600/30 border-2 border-solid border-red-200/30 dark:border-red-900/30 text-red-950 dark:text-red-100`}}},sizeClasses={sm:`px-3 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`},baseClasses=computed(()=>[`rounded-lg font-medium outline-none`,`transition-all duration-200 ease-in-out`,`disabled:cursor-not-allowed disabled:opacity-50`,`backdrop-blur-md`,props.block?`w-full`:``,sizeClasses[props.size],variantClasses[props.variant][props.theme].default,props.toggled?variantClasses[props.variant][props.theme].toggled||``:variantClasses[props.variant][props.theme].nonToggled||``,{"opacity-50 cursor-not-allowed":isDisabled.value},`focus:ring-2`]);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`button`,{disabled:isDisabled.value,class:normalizeClass(baseClasses.value)},[createBaseVNode(`div`,_hoisted_2$11,[createVNode(unref(BidirectionalTransition_default),{"from-class":`opacity-0 mr-0! w-0!`,"active-class":`transition-[width,margin] ease-in-out overflow-hidden transition-100`},{default:withCtx(()=>[_ctx.loading||_ctx.icon?(openBlock(),createElementBlock(`div`,_hoisted_3$8,[_ctx.loading?(openBlock(),createElementBlock(`div`,_hoisted_4$6)):_ctx.icon?(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass([`h-4 w-4`,_ctx.icon])},null,2)):createCommentVNode(``,!0)])):createCommentVNode(``,!0)]),_:1}),_ctx.label?(openBlock(),createElementBlock(`span`,_hoisted_5$4,toDisplayString(_ctx.label),1)):renderSlot(_ctx.$slots,`default`,{key:1})])],10,_hoisted_1$21))}}),Button_default=Button_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$20={class:`whitespace-pre-wrap break-all`};var ErrorContainer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ErrorContainer`,props:{title:{},error:{}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createBlock(Alert_default,{type:`error`},{title:withCtx(()=>[createTextVNode(toDisplayString(_ctx.title),1)]),content:withCtx(()=>[createBaseVNode(`pre`,_hoisted_1$20,toDisplayString(String(_ctx.error)),1)]),_:1}))}}),ErrorContainer_default=ErrorContainer_vue_vue_type_script_setup_true_lang_default,Screen_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Screen`,setup(__props){let containerRef=ref(),breakpoints=useBreakpoints(breakpointsTailwind),{width,height}=useWindowSize(),containerElementBounding=useElementBounding(containerRef,{immediate:!0,windowResize:!0,reset:!0}),isMobile=computed(()=>breakpoints.between(`sm`,`md`).value||breakpoints.smaller(`sm`).value),isTablet=computed(()=>breakpoints.between(`md`,`lg`).value),isDesktop=computed(()=>breakpoints.greaterOrEqual(`lg`).value),canvasWidth=computed(()=>isDesktop.value?containerElementBounding.width.value:isMobile.value||isTablet.value?width.value-16:containerElementBounding.width.value),canvasHeight=ref(0);return watch([width,height,containerRef],()=>{let bounding=containerRef.value?.parentElement?.getBoundingClientRect();isDesktop.value||isMobile.value||isTablet.value?canvasHeight.value=bounding?.height||0:canvasHeight.value=600}),watch([containerElementBounding.width,containerElementBounding.height],()=>{isDesktop.value||isMobile.value||isTablet.value?canvasHeight.value=containerElementBounding.height.value:canvasHeight.value=600}),onMounted(async()=>{containerRef.value&&containerElementBounding.update()}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`containerRef`,ref:containerRef,"h-full":``,"w-full":``},[renderSlot(_ctx.$slots,`default`,{width:canvasWidth.value,height:canvasHeight.value})],512))}}),Screen_default=Screen_vue_vue_type_script_setup_true_lang_default,Skeleton_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Skeleton`,props:{animation:{default:`pulse`}},setup(__props){let props=__props;return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`skeleton`,props.animation===`none`?``:`skeleton-${props.animation}`]),bg:`neutral-200 dark:neutral-800`,overflow:`hidden`},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],2))}}),Skeleton_default=__plugin_vue_export_helper_default(Skeleton_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-fa4a54cc`]]),CursorFloating_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`CursorFloating`,props:{intensity:{default:1.5}},setup(__props){let props=__props,cardRef=ref(null),transformStyle=ref(``),gradientPosition=ref(`50% 50%`),sparklePosition=ref(`50% 50%`),sparkleOpacity=ref(.5);function handleMouseMove(event){if(!cardRef.value)return;let card=cardRef.value,rect=card.getBoundingClientRect(),x$1=event.clientX-rect.left,y=event.clientY-rect.top,cardWidth=card.offsetWidth,cardHeight=card.offsetHeight,xPercent=Math.abs(Math.floor(100/cardWidth*x$1)-100),yPercent=Math.abs(Math.floor(100/cardHeight*y)-100),leftPos=50+(xPercent-50)/1.5,topPos=50+(yPercent-50)/1.5,sparkleX=50+(xPercent-50)/7,sparkleY=50+(yPercent-50)/7,rotateY=(leftPos-50)/1.5*.2*props.intensity,rotateX=(topPos-50)/2*-1*.2*props.intensity,pAngle=50-xPercent+(50-yPercent),opacity=.5+Math.abs(pAngle)*.008*props.intensity;transformStyle.value=`perspective(1200px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(${1+.015*props.intensity}, ${1+.015*props.intensity}, ${1+.015*props.intensity})`,gradientPosition.value=`${leftPos}% ${topPos}%`,sparklePosition.value=`${sparkleX}% ${sparkleY}%`,sparkleOpacity.value=opacity}function resetCard(){transformStyle.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`,gradientPosition.value=`50% 50%`,sparklePosition.value=`50% 50%`,sparkleOpacity.value=.5}return onMounted(()=>{transformStyle.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{ref_key:`cardRef`,ref:cardRef,class:`card-hover-effect`,style:normalizeStyle({transform:transformStyle.value,"--effect-intensity":_ctx.intensity}),onMousemove:handleMouseMove,onMouseleave:resetCard},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],36))}}),CursorFloating_default=__plugin_vue_export_helper_default(CursorFloating_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-24a7a9d5`]]);(function(){"use strict";var t$1;try{if(typeof document<`u`){var a$1=document.createElement(`style`);a$1.nonce=(t$1=document.head.querySelector(`meta[property=csp-nonce]`))?.content,a$1.appendChild(document.createTextNode(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}`)),document.head.appendChild(a$1)}}catch(r$1){console.error(`vite-plugin-css-injected-by-js`,r$1)}})();const rt=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const ut=e$4=>typeof e$4<`u`;function st(e$4){return JSON.parse(JSON.stringify(e$4))}function $e(e$4,n,s,i={}){var t$1,w,d;let{clone:v=!1,passive:D=!1,eventName:$,deep:T=!1,defaultValue:r$1,shouldEmit:l}=i,h$1=getCurrentInstance(),m=s||h$1?.emit||(t$1=h$1?.$emit)?.bind(h$1)||(d=(w=h$1?.proxy)?.$emit)?.bind(h$1?.proxy),u=$;n||=`modelValue`,u||=`update:${n.toString()}`;let L=a$1=>v?typeof v==`function`?v(a$1):st(a$1):a$1,H=()=>ut(e$4[n])?L(e$4[n]):r$1,p$4=a$1=>{l?l(a$1)&&m(u,a$1):m(u,a$1)};if(D){let a$1=H(),c$3=ref(a$1),f$2=!1;return watch(()=>e$4[n],y=>{f$2||(f$2=!0,c$3.value=L(y),nextTick(()=>f$2=!1))}),watch(c$3,y=>{!f$2&&(y!==e$4[n]||T)&&p$4(y)},{deep:T}),c$3}else return computed({get(){return H()},set(a$1){p$4(a$1)}})}const[ee,ct]=createContext(`DrawerRoot`),Ee=new WeakMap;function C(e$4,n,s=!1){if(!e$4||!(e$4 instanceof HTMLElement)||!n)return;let i={};Object.entries(n).forEach(([t$1,w])=>{if(t$1.startsWith(`--`)){e$4.style.setProperty(t$1,w);return}i[t$1]=e$4.style[t$1],e$4.style[t$1]=w}),!s&&Ee.set(e$4,i)}function dt$1(e$4,n){if(!e$4||!(e$4 instanceof HTMLElement))return;let s=Ee.get(e$4);s&&Object.entries(s).forEach(([i,t$1])=>{e$4.style[i]=t$1})}function ie(e$4,n){let s=window.getComputedStyle(e$4),i=s.transform||s.webkitTransform||s.mozTransform,t$1=i.match(/^matrix3d\((.+)\)$/);return t$1?Number.parseFloat(t$1[1].split(`, `)[_(n)?13:12]):(t$1=i.match(/^matrix\((.+)\)$/),t$1?Number.parseFloat(t$1[1].split(`, `)[_(n)?5:4]):null)}function vt(e$4){return 8*(Math.log(e$4+1)-2)}function _(e$4){switch(e$4){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e$4}}function de(e$4,n){if(!e$4)return()=>{};let s=e$4.style.cssText;return Object.assign(e$4.style,n),()=>{e$4.style.cssText=s}}function ft(...e$4){return(...n)=>{for(let s of e$4)typeof s==`function`&&s(...n)}}const O={DURATION:.5,EASE:[.32,.72,0,1]},_e=.4,pt=.25,gt=100,Be=8,re$1=16,Ce=26,Oe=`vaul-dragging`;function mt({activeSnapPoint:e$4,snapPoints:n,drawerRef:s,overlayRef:i,fadeFromIndex:t$1,onSnapPointChange:w,direction:d}){let v=ref(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function D(){v.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}onMounted(()=>{typeof window<`u`&&window.addEventListener(`resize`,D)}),onBeforeUnmount(()=>{typeof window<`u`&&window.removeEventListener(`resize`,D)});let $=computed(()=>(n.value&&e$4.value===n.value[n.value.length-1])??null),T=computed(()=>n.value&&n.value.length>0&&(t$1?.value||t$1?.value===0)&&!Number.isNaN(t$1?.value)&&n.value[t$1?.value??-1]===e$4.value||!n.value),r$1=computed(()=>{var p$4;return(p$4=n.value)?.findIndex(a$1=>a$1===e$4.value)??null}),l=computed(()=>{var p$4;return(p$4=n.value)?.map(a$1=>{let c$3=typeof a$1==`string`,f$2=0;if(c$3&&(f$2=Number.parseInt(a$1,10)),_(d.value)){let P=c$3?f$2:v.value?a$1*v.value.innerHeight:0;return v.value?d.value===`bottom`?v.value.innerHeight-P:-v.value.innerHeight+P:P}let y=c$3?f$2:v.value?a$1*v.value.innerWidth:0;return v.value?d.value===`right`?v.value.innerWidth-y:-v.value.innerWidth+y:y})??[]}),h$1=computed(()=>{var p$4;return r$1.value===null?null:(p$4=l.value)?.[r$1.value]}),m=p$4=>{var c$3,f$2,y,P;let a$1=(c$3=l.value)?.findIndex(x$1=>x$1===p$4)??null;nextTick(()=>{var x$1;w(a$1,l.value),C((x$1=s.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:_(d.value)?`translate3d(0, ${p$4}px, 0)`:`translate3d(${p$4}px, 0, 0)`})}),l.value&&a$1!==l.value.length-1&&a$1!==t$1?.value?C((f$2=i.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`0`}):C((y=i.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`1`}),e$4.value=a$1===null?null:(P=n.value)?.[a$1]??null};watch([e$4,l,n],()=>{var p$4;if(e$4.value){let a$1=(p$4=n.value)?.findIndex(c$3=>c$3===e$4.value)??-1;l.value&&a$1!==-1&&typeof l.value[a$1]==`number`&&m(l.value[a$1])}},{immediate:!0});function u({draggedDistance:p$4,closeDrawer:a$1,velocity:c$3,dismissible:f$2}){var j$1,G,z$1;if(t$1.value===void 0)return;let y=d.value===`bottom`||d.value===`right`?(h$1.value??0)-p$4:(h$1.value??0)+p$4,P=r$1.value===t$1.value-1,x$1=r$1.value===0,W=p$4>0;if(P&&C((j$1=i.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`}),c$3>2&&!W){f$2?a$1():m(l.value[0]);return}if(c$3>2&&W&&l&&n.value){m(l.value[n.value.length-1]);return}let te$1=(G=l.value)?.reduce((M$1,g)=>typeof M$1!=`number`||typeof g!=`number`?M$1:Math.abs(g-y)_e&&Math.abs(p$4)0&&$){m(l.value[((z$1=n.value)?.length??0)-1]);return}if(x$1&&M$1<0&&f$2&&a$1(),r$1.value===null)return;m(l.value[r$1.value+M$1]);return}m(te$1)}function L({draggedDistance:p$4}){var c$3;if(h$1.value===null)return;let a$1=d.value===`bottom`||d.value===`right`?h$1.value-p$4:h$1.value+p$4;(d.value===`bottom`||d.value===`right`)&&a$1l.value[l.value.length-1]||C((c$3=s.value)?.$el,{transform:_(d.value)?`translate3d(0, ${a$1}px, 0)`:`translate3d(${a$1}px, 0, 0)`})}function H(p$4,a$1){if(!n.value||typeof r$1.value!=`number`||!l.value||t$1.value===void 0)return null;let c$3=r$1.value===t$1.value-1;if(r$1.value>=t$1.value&&a$1)return 0;if(c$3&&!a$1)return 1;if(!T.value&&!c$3)return null;let y=c$3?r$1.value+1:r$1.value-1,P=c$3?l.value[y]-l.value[y-1]:l.value[y+1]-l.value[y],x$1=p$4/Math.abs(P);return c$3?1-x$1:x$1}return{isLastSnapPoint:$,shouldFade:T,getPercentageDragged:H,activeSnapPointIndex:r$1,onRelease:u,onDrag:L,snapPointsOffset:l}}function Te(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let Q=null;function wt(e$4){let{isOpen:n,modal:s,nested:i,hasBeenOpened:t$1,preventScrollRestoration:w,noBodyStyles:d}=e$4,v=ref(typeof window<`u`?window.location.href:``),D=ref(0);function $(){if(Te()&&Q===null&&n.value&&!d.value){Q={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};let{scrollX:r$1,innerHeight:l}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-D.value}px`,left:`${-r$1}px`,right:`0px`,height:`auto`}),setTimeout(()=>{requestAnimationFrame(()=>{let h$1=l-window.innerHeight;h$1&&D.value>=l&&(document.body.style.top=`-${D.value+h$1}px`)})},300)}}function T(){if(Te()&&Q!==null&&!d.value){let r$1=-Number.parseInt(document.body.style.top,10),l=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,Q),window.requestAnimationFrame(()=>{if(w.value&&v.value!==window.location.href){v.value=window.location.href;return}window.scrollTo(l,r$1)}),Q=null}}return onMounted(()=>{function r$1(){D.value=window.scrollY}r$1(),window.addEventListener(`scroll`,r$1),onUnmounted(()=>{window.removeEventListener(`scroll`,r$1)})}),watch([n,t$1,v],()=>{i.value||!t$1.value||(n.value?(window.matchMedia(`(display-mode: standalone)`).matches||$(),s.value||setTimeout(()=>{T()},500)):T())}),{restorePositionSetting:T}}function ht(e$4,n){return e$4&&e$4.value?e$4:n}function yt(e$4){let{emitDrag:n,emitRelease:s,emitClose:i,emitOpenChange:t$1,open:w,dismissible:d,nested:v,modal:D,shouldScaleBackground:$,setBackgroundColorOnScale:T,scrollLockTimeout:r$1,closeThreshold:l,activeSnapPoint:h$1,fadeFromIndex:m,direction:u,noBodyStyles:L,handleOnly:H,preventScrollRestoration:p$4}=e$4,a$1=ref(w.value??!1),c$3=ref(!1),f$2=ref(!1),y=ref(!1),P=ref(null),x$1=ref(null),W=ref(null),te$1=ref(null),V$1=ref(null),j$1=ref(!1),G=ref(null),z$1=ref(0),M$1=ref(!1);ref(0);let g=ref(null);ref(0);let pe$1=computed(()=>{var o;return(o=g.value)?.$el.getBoundingClientRect().height||0}),U=ht(e$4.snapPoints,ref(void 0)),Ne=computed(()=>{var o;return U&&((o=U.value)?.length??0)>0}),Ae=ref(null),{activeSnapPointIndex:ge,onRelease:xe,snapPointsOffset:He,onDrag:Ue,shouldFade:me,getPercentageDragged:Le$1}=mt({snapPoints:U,activeSnapPoint:h$1,drawerRef:g,fadeFromIndex:m,overlayRef:P,onSnapPointChange:Me$1,direction:u});function Me$1(o,R){U.value&&o===R.length-1&&(x$1.value=new Date)}wt({isOpen:a$1,modal:D,nested:v,hasBeenOpened:c$3,noBodyStyles:L,preventScrollRestoration:p$4});function ne$1(){return(window.innerWidth-Ce)/window.innerWidth}function we(o,R){var k$3;if(!o)return!1;let b$1=o,B=(k$3=window.getSelection())?.toString(),E=g.value?ie(g.value.$el,u.value):null,A=new Date;if(b$1.hasAttribute(`data-vaul-no-drag`)||b$1.closest(`[data-vaul-no-drag]`))return!1;if(u.value===`right`||u.value===`left`)return!0;if(x$1.value&&A.getTime()-x$1.value.getTime()<500)return!1;if(E!==null&&(u.value===`bottom`?E>0:E<0))return!0;if(B&&B.length>0)return!1;if(V$1.value&&A.getTime()-V$1.value.getTime()b$1.clientHeight){if(b$1.scrollTop!==0)return V$1.value=new Date,!1;if(b$1.getAttribute(`role`)===`dialog`)return!0}b$1=b$1.parentNode}return!0}function ke$1(o){!d.value&&!U.value||g.value&&!g.value.$el.contains(o.target)||(f$2.value=!0,W.value=new Date,o.target.setPointerCapture(o.pointerId),z$1.value=_(u.value)?o.clientY:o.clientX)}function Ie(o){var R,b$1,B,E,A,k$3;if(g.value&&f$2.value){let X$1=u.value===`bottom`||u.value===`right`?1:-1,ae=(z$1.value-(_(u.value)?o.clientY:o.clientX))*X$1,le$1=ae>0,ye$1=U.value&&!d.value&&!le$1;if(ye$1&&ge.value===0)return;let ce$1=Math.abs(ae),Se=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`),q=ce$1/pe$1.value,De=Le$1(ce$1,le$1);if(De!==null&&(q=De),ye$1&&q>=1||!j$1.value&&!we(o.target,le$1))return;if((R=g?.value)==null||R.$el.classList.add(Oe),j$1.value=!0,C((b$1=g.value)?.$el,{transition:`none`}),C((B=P.value)?.$el,{transition:`none`}),U.value&&Ue({draggedDistance:ae}),le$1&&!U.value){let Y$1=vt(ae),oe$1=Math.min(Y$1*-1,0)*X$1;C((E=g.value)?.$el,{transform:_(u.value)?`translate3d(0, ${oe$1}px, 0)`:`translate3d(${oe$1}px, 0, 0)`});return}let qe$1=1-q;if((me.value||m.value&&ge.value===m.value-1)&&(n(q),C((A=P.value)?.$el,{opacity:`${qe$1}`,transition:`none`},!0)),Se&&P.value&&$.value){let Y$1=Math.min(ne$1()+q*(1-ne$1()),1),oe$1=8-q*8,be$1=Math.max(0,14-q*14);C(Se,{borderRadius:`${oe$1}px`,transform:_(u.value)?`scale(${Y$1}) translate3d(0, ${be$1}px, 0)`:`scale(${Y$1}) translate3d(${be$1}px, 0, 0)`,transition:`none`},!0)}if(!U.value){let Y$1=ce$1*X$1;C((k$3=g.value)?.$el,{transform:_(u.value)?`translate3d(0, ${Y$1}px, 0)`:`translate3d(${Y$1}px, 0, 0)`})}}}function he$1(){var b$1;if(!g.value)return;let o=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`),R=ie(g.value.$el,u.value);C(g.value.$el,{transform:`translate3d(0, 0, 0)`,transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`}),C((b$1=P.value)?.$el,{transition:`opacity ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,opacity:`1`}),$.value&&R&&R>0&&a$1.value&&C(o,{borderRadius:`${Be}px`,overflow:`hidden`,..._(u.value)?{transform:`scale(${ne$1()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${ne$1()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(`,`)})`},!0)}function K$1(o){g.value&&(i(),o||(a$1.value=!1),window.setTimeout(()=>{U.value&&(h$1.value=U.value[0])},O.DURATION*1e3))}watchEffect(()=>{if(!a$1.value&&$.value&&rt){let o=setTimeout(()=>{dt$1(document.body)},200);return()=>clearTimeout(o)}}),watch(w,()=>{a$1.value=w.value,w.value||K$1()});function We(o){if(!f$2.value||!g.value)return;g.value.$el.classList.remove(Oe),j$1.value=!1,f$2.value=!1,te$1.value=new Date;let R=ie(g.value.$el,u.value);if(!we(o.target,!1)||!R||Number.isNaN(R)||W.value===null)return;let b$1=te$1.value.getTime()-W.value.getTime(),B=z$1.value-(_(u.value)?o.clientY:o.clientX),E=Math.abs(B)/b$1;if(E>.05&&(y.value=!0,window.setTimeout(()=>{y.value=!1},200)),U.value){let k$3=u.value===`bottom`||u.value===`right`?1:-1;xe({draggedDistance:B*k$3,closeDrawer:K$1,velocity:E,dismissible:d.value}),s(!0);return}if(u.value===`bottom`||u.value===`right`?B>0:B<0){he$1(),s(!0);return}if(E>_e){K$1(),s(!1);return}let A=Math.min(g.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(R>=A*l.value){K$1(),s(!1);return}s(!0),he$1()}watch(a$1,o=>{o&&(x$1.value=new Date),t$1(o)},{immediate:!0});function Ve$1(o){var B,E;let R=o?(window.innerWidth-re$1)/window.innerWidth:1,b$1=o?-16:0;G.value&&window.clearTimeout(G.value),C((B=g.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:`scale(${R}) translate3d(0, ${b$1}px, 0)`}),!o&&(E=g.value)!=null&&E.$el&&(G.value=window.setTimeout(()=>{var k$3,X$1;let A=ie((k$3=g.value)?.$el,u.value);C((X$1=g.value)?.$el,{transition:`none`,transform:_(u.value)?`translate3d(0, ${A}px, 0)`:`translate3d(${A}px, 0, 0)`})},500))}function je(o){var A;if(o<0)return;let R=_(u.value)?window.innerHeight:window.innerWidth,b$1=(R-re$1)/R,B=b$1+o*(1-b$1),E=-16+o*re$1;C((A=g.value)?.$el,{transform:_(u.value)?`scale(${B}) translate3d(0, ${E}px, 0)`:`scale(${B}) translate3d(${E}px, 0, 0)`,transition:`none`})}function ze(o){var E;let R=_(u.value)?window.innerHeight:window.innerWidth,b$1=o?(R-re$1)/R:1,B=o?-16:0;o&&C((E=g.value)?.$el,{transition:`transform ${O.DURATION}s cubic-bezier(${O.EASE.join(`,`)})`,transform:_(u.value)?`scale(${b$1}) translate3d(0, ${B}px, 0)`:`scale(${b$1}) translate3d(${B}px, 0, 0)`})}return{open:w,isOpen:a$1,modal:D,keyboardIsOpen:M$1,hasBeenOpened:c$3,drawerRef:g,drawerHeightRef:pe$1,overlayRef:P,handleRef:Ae,isDragging:f$2,dragStartTime:W,isAllowedToDrag:j$1,snapPoints:U,activeSnapPoint:h$1,hasSnapPoints:Ne,pointerStart:z$1,dismissible:d,snapPointsOffset:He,direction:u,shouldFade:me,fadeFromIndex:m,shouldScaleBackground:$,setBackgroundColorOnScale:T,onPress:ke$1,onDrag:Ie,onRelease:We,closeDrawer:K$1,onNestedDrag:je,onNestedRelease:ze,onNestedOpenChange:Ve$1,emitClose:i,emitDrag:n,emitRelease:s,emitOpenChange:t$1,nested:v,handleOnly:H,noBodyStyles:L}}const St=defineComponent({__name:`DrawerRoot`,props:{activeSnapPoint:{default:void 0},closeThreshold:{default:pt},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:gt},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:`bottom`},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:[`drag`,`release`,`close`,`update:open`,`update:activeSnapPoint`,`animationEnd`],setup(e$4,{expose:n,emit:s}){let i=e$4,t$1=s;useSlots();let w=computed(()=>i.fadeFromIndex??(i.snapPoints&&i.snapPoints.length-1)),d=$e(i,`open`,t$1,{defaultValue:i.defaultOpen,passive:i.open===void 0}),v=$e(i,`activeSnapPoint`,t$1,{passive:i.activeSnapPoint===void 0}),D={emitDrag:m=>t$1(`drag`,m),emitRelease:m=>t$1(`release`,m),emitClose:()=>t$1(`close`),emitOpenChange:m=>{t$1(`update:open`,m),setTimeout(()=>{t$1(`animationEnd`,m)},O.DURATION*1e3)}},{closeDrawer:$,hasBeenOpened:T,modal:r$1,isOpen:l}=ct(yt({...D,...toRefs(i),activeSnapPoint:v,fadeFromIndex:w,open:d}));function h$1(m){if(d.value!==void 0){D.emitOpenChange(m);return}l.value=m,m?T.value=!0:$()}return n({open:l}),(m,u)=>(openBlock(),createBlock(unref(DialogRoot_default),{open:unref(l),modal:unref(r$1),"onUpdate:open":h$1},{default:withCtx(()=>[renderSlot(m.$slots,`default`,{open:unref(l)})]),_:3},8,[`open`,`modal`]))}}),_t=defineComponent({__name:`DrawerRootNested`,props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:[`drag`,`release`,`close`,`update:open`,`update:activeSnapPoint`,`animationEnd`],setup(e$4,{emit:n}){let s=e$4,i=n,{onNestedDrag:t$1,onNestedOpenChange:w,onNestedRelease:d}=ee();function v(){w(!1)}function D(r$1){t$1(r$1)}function $(r$1){r$1&&w(r$1),i(`update:open`,r$1)}let T=useForwardPropsEmits(s,i);return(r$1,l)=>(openBlock(),createBlock(St,mergeProps(unref(T),{nested:``,onClose:v,onDrag:D,onRelease:unref(d),"onUpdate:open":$}),{default:withCtx(()=>[renderSlot(r$1.$slots,`default`)]),_:3},16,[`onRelease`]))}}),Bt=defineComponent({__name:`DrawerOverlay`,setup(e$4){let{overlayRef:n,hasSnapPoints:s,isOpen:i,shouldFade:t$1}=ee();return(w,d)=>(openBlock(),createBlock(unref(DialogOverlay_default),{ref_key:`overlayRef`,ref:n,"data-vaul-overlay":``,"data-vaul-snap-points":unref(i)&&unref(s)?`true`:`false`,"data-vaul-snap-points-overlay":unref(i)&&unref(t$1)?`true`:`false`},null,8,[`data-vaul-snap-points`,`data-vaul-snap-points-overlay`]))}}),Dt=()=>()=>{};function bt(){let{direction:e$4,isOpen:n,shouldScaleBackground:s,setBackgroundColorOnScale:i,noBodyStyles:t$1}=ee(),w=ref(null),d=ref(document.body.style.backgroundColor);function v(){return(window.innerWidth-Ce)/window.innerWidth}watchEffect(D=>{if(n.value&&s.value){w.value&&clearTimeout(w.value);let $=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!$)return;ft(i.value&&!t$1.value?de(document.body,{background:`black`}):Dt,de($,{transformOrigin:_(e$4.value)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${O.DURATION}s`,transitionTimingFunction:`cubic-bezier(${O.EASE.join(`,`)})`}));let T=de($,{borderRadius:`${Be}px`,overflow:`hidden`,..._(e$4.value)?{transform:`scale(${v()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${v()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});D(()=>{T(),w.value=window.setTimeout(()=>{d.value?document.body.style.background=d.value:document.body.style.removeProperty(`background`)},O.DURATION*1e3)})}},{flush:`pre`})}const Ct=defineComponent({__name:`DrawerContent`,setup(e$4){let{open:n,isOpen:s,snapPointsOffset:i,hasSnapPoints:t$1,drawerRef:w,onPress:d,onDrag:v,onRelease:D,modal:$,emitOpenChange:T,dismissible:r$1,keyboardIsOpen:l,closeDrawer:h$1,direction:m,handleOnly:u}=ee();bt();let L=ref(!1),H=computed(()=>i.value&&i.value.length>0?`${i.value[0]}px`:`0`);function p$4(f$2){if(!$.value||f$2.defaultPrevented){f$2.preventDefault();return}l.value&&=!1,r$1.value?T(!1):f$2.preventDefault()}function a$1(f$2){u.value||d(f$2)}function c$3(f$2){u.value||v(f$2)}return watchEffect(()=>{t$1.value&&window.requestAnimationFrame(()=>{L.value=!0})}),(f$2,y)=>(openBlock(),createBlock(unref(DialogContent_default),{ref_key:`drawerRef`,ref:w,"data-vaul-drawer":``,"data-vaul-drawer-direction":unref(m),"data-vaul-delayed-snap-points":L.value?`true`:`false`,"data-vaul-snap-points":unref(s)&&unref(t$1)?`true`:`false`,style:normalizeStyle({"--snap-point-height":H.value}),onPointerdown:a$1,onPointermove:c$3,onPointerup:unref(D),onPointerDownOutside:p$4,onOpenAutoFocus:y[0]||=withModifiers(()=>{},[`prevent`]),onEscapeKeyDown:y[1]||=P=>{unref(r$1)||P.preventDefault()}},{default:withCtx(()=>[renderSlot(f$2.$slots,`default`)]),_:3},8,[`data-vaul-drawer-direction`,`data-vaul-delayed-snap-points`,`data-vaul-snap-points`,`style`,`onPointerup`]))}}),$t=[`data-vaul-drawer-visible`],Ot={"data-vaul-handle-hitarea":``,"aria-hidden":`true`},Tt=250,Pt=120,Nt=defineComponent({__name:`DrawerHandle`,props:{preventCycle:{type:Boolean,default:!1}},setup(e$4){let n=e$4,{onPress:s,onDrag:i,handleRef:t$1,handleOnly:w,isOpen:d,snapPoints:v,activeSnapPoint:D,isDragging:$,dismissible:T,closeDrawer:r$1}=ee(),l=ref(null),h$1=ref(!1);function m(){if(h$1.value){H();return}window.setTimeout(()=>{u()},Pt)}function u(){if($.value||n.preventCycle||h$1.value){H();return}if(H(),!v.value||v.value.length===0){T.value||r$1();return}let c$3=D.value===v.value[v.value.length-1];if(c$3&&T.value){r$1();return}let f$2=v.value.findIndex(P=>P===D.value);if(f$2===-1)return;let y=c$3?0:f$2+1;D.value=v.value[y]}function L(){l.value=window.setTimeout(()=>{h$1.value=!0},Tt)}function H(){l.value&&window.clearTimeout(l.value),h$1.value=!1}function p$4(c$3){w.value&&s(c$3),L()}function a$1(c$3){w.value&&i(c$3)}return(c$3,f$2)=>(openBlock(),createElementBlock(`div`,{ref_key:`handleRef`,ref:t$1,"data-vaul-drawer-visible":unref(d)?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,onClick:m,onPointercancel:H,onPointerdown:p$4,onPointermove:a$1},[createBaseVNode(`span`,Ot,[renderSlot(c$3.$slots,`default`)])],40,$t))}});var Dialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Dialog`,props:{modelValue:{type:Boolean,default:!1,required:!1},modelModifiers:{}},emits:[`update:modelValue`],setup(__props){let showDialog=useModel(__props,`modelValue`),isDesktop=useMediaQuery(`(min-width: 768px)`),screenSafeArea=useScreenSafeArea();return useResizeObserver(document.documentElement,()=>screenSafeArea.update()),onMounted(()=>screenSafeArea.update()),(_ctx,_cache$1)=>unref(isDesktop)?(openBlock(),createBlock(unref(DialogRoot_default),{key:0,open:showDialog.value,"onUpdate:open":_cache$1[0]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[renderSlot(_ctx.$slots,`trigger`),createVNode(unref(DialogPortal_default),null,{default:withCtx(()=>[createVNode(unref(DialogOverlay_default),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-[9999] bg-black/50 backdrop-blur-sm`}),createVNode(unref(DialogContent_default),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-[9999] max-h-full max-w-2xl w-[92dvw] transform overflow-y-scroll rounded-2xl bg-white p-6 shadow-xl outline-none backdrop-blur-md scrollbar-none -translate-x-1/2 -translate-y-1/2 dark:bg-neutral-900`},{default:withCtx(()=>[renderSlot(_ctx.$slots,`default`)]),_:3})]),_:3})]),_:3},8,[`open`])):(openBlock(),createBlock(unref(St),{key:1,open:showDialog.value,"should-scale-background":``,"onUpdate:open":_cache$1[1]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(DialogPortal_default),null,{default:withCtx(()=>[createVNode(unref(Bt),{class:`fixed inset-0`}),createVNode(unref(Ct),{class:`fixed bottom-0 left-0 right-0 z-1000 mt-20 h-full max-h-[96%] flex flex-col rounded-t-2xl bg-neutral-50 px-4 pt-4 outline-none backdrop-blur-md dark:bg-neutral-900/95`,style:normalizeStyle({paddingBottom:`${Math.max(Number.parseFloat(unref(screenSafeArea).bottom.value.replace(`px`,``)),24)}px`})},{default:withCtx(()=>[createVNode(unref(Nt)),renderSlot(_ctx.$slots,`default`)]),_:3},8,[`style`])]),_:3})]),_:3},8,[`open`]))}}),Dialog_default=Dialog_vue_vue_type_script_setup_true_lang_default;function calculateVolumeWithLinearNormalize(analyser){let dataBuffer=new Uint8Array(analyser.frequencyBinCount);analyser.getByteFrequencyData(dataBuffer);let volumeVector=[];for(let i=0;i<700;i+=80)volumeVector.push(dataBuffer[i]);let volumeSum=dataBuffer.map(v=>v**1.2).map(v=>v*1.2).reduce((acc,cur)=>acc+cur,0);return volumeSum/dataBuffer.length/100}function calculateVolumeWithMinMaxNormalize(analyser){let dataBuffer=new Uint8Array(analyser.frequencyBinCount);analyser.getByteFrequencyData(dataBuffer);let volumeVector=[];for(let i=0;i<700;i+=80)volumeVector.push(dataBuffer[i]);let amplifiedVolumeVector=dataBuffer.map(v=>v**1.5),min$1=Math.min(...amplifiedVolumeVector),max$1=Math.max(...amplifiedVolumeVector),range$1=max$1-min$1,normalizedVolumeVector;normalizedVolumeVector=range$1===0?amplifiedVolumeVector.map(()=>0):amplifiedVolumeVector.map(v=>(v-min$1)/range$1);let volumeSum=normalizedVolumeVector.reduce((acc,cur)=>acc+cur,0);return volumeSum/dataBuffer.length}function calculateVolume(analyser,mode=`linear`){switch(mode){case`linear`:return calculateVolumeWithLinearNormalize(analyser);case`minmax`:return calculateVolumeWithMinMaxNormalize(analyser)}}const useAudioContext=defineStore(`audio-context`,()=>{let audioContext=ref(new AudioContext);return onUnmounted(async()=>{audioContext&&await audioContext.value.close()}),{audioContext,calculateVolume}});function useAudioDevice$1(requestPermission=!1){let devices=useDevicesList({constraints:{audio:!0},requestPermissions:requestPermission}),audioInputs=computed(()=>devices.audioInputs.value),selectedAudioInput=ref(devices.audioInputs.value.find(device=>device.deviceId===`default`)?.deviceId||``),deviceConstraints=computed(()=>({audio:{deviceId:{exact:selectedAudioInput.value},autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}})),{stream,stop:stopStream,start:startStream}=useUserMedia({constraints:deviceConstraints,enabled:!1,autoSwitch:!0});watch(audioInputs,()=>{!selectedAudioInput.value&&audioInputs.value.length>0&&(selectedAudioInput.value=audioInputs.value.find(input=>input.deviceId===`default`)?.deviceId||audioInputs.value[0].deviceId)});function askPermission(){devices.ensurePermissions().then(()=>nextTick()).then(()=>{audioInputs.value.length>0&&!selectedAudioInput.value&&(selectedAudioInput.value=audioInputs.value.find(input=>input.deviceId===`default`)?.deviceId||audioInputs.value[0].deviceId)}).catch(error=>{console.error(`Error ensuring permissions:`,error)})}return onMounted(()=>{requestPermission&&askPermission()}),{audioInputs,selectedAudioInput,stream,deviceConstraints,askPermission,startStream,stopStream}}const useSpeakingStore=defineStore(`character-speaking`,()=>{let nowSpeakingAvatarBorderOpacityMin=30,nowSpeakingAvatarBorderOpacityMax=100,mouthOpenSize=ref(0),nowSpeaking=ref(!1),nowSpeakingAvatarBorderOpacity=computed(()=>nowSpeaking.value?(nowSpeakingAvatarBorderOpacityMin+(nowSpeakingAvatarBorderOpacityMax-nowSpeakingAvatarBorderOpacityMin)*mouthOpenSize.value)/100:nowSpeakingAvatarBorderOpacityMin);return{mouthOpenSize,nowSpeaking,nowSpeakingAvatarBorderOpacity}});async function*readableStreamToAsyncIterator(res){let reader=res.getReader();try{for(;;){let{done,value:value$1}=await reader.read();if(done)return;yield value$1}}finally{reader.releaseLock()}}const isPlainObject$4=value$1=>value$1!=null&&Object.getPrototypeOf(value$1)===Object.prototype,merge$3=(defaults$1,user)=>{let merged={...defaults$1};if(!user)return merged;for(let[key$2,value$1]of Object.entries(user)){if(value$1===void 0)continue;if(isPlainObject$4(merged[key$2])&&isPlainObject$4(value$1)){merged[key$2]=merge$3(merged[key$2],value$1);continue}merged[key$2]=value$1}return merged},sleep$1=async delay=>new Promise(resolve$1=>setTimeout(resolve$1,delay)),base64abc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),getTypeName=value$1=>{let type=typeof value$1;return type===`object`?value$1===null?`null`:value$1?.constructor?.name??`object`:type},validateBinaryLike=source=>{if(typeof source==`string`)return new TextEncoder().encode(source);if(source instanceof Uint8Array)return source;if(source instanceof ArrayBuffer)return new Uint8Array(source);throw TypeError(`The input must be a Uint8Array, a string, or an ArrayBuffer. Received a value of the type ${getTypeName(source)}.`)},encodeBase64=data$12=>{let uint8=validateBinaryLike(data$12),result=``,i,l=uint8.length;for(i=2;i>2],result+=base64abc[(uint8[i-2]&3)<<4|uint8[i-1]>>4],result+=base64abc[(uint8[i-1]&15)<<2|uint8[i]>>6],result+=base64abc[uint8[i]&63];return i===l+1&&(result+=base64abc[uint8[i-2]>>2],result+=base64abc[(uint8[i-2]&3)<<4],result+=`==`),i===l&&(result+=base64abc[uint8[i-2]>>2],result+=base64abc[(uint8[i-2]&3)<<4|uint8[i-1]>>4],result+=base64abc[(uint8[i-1]&15)<<2],result+=`=`),result};function writeString$1(dataView,offset$2,string$4){for(let i=0;i{if(isRecording.value){let channelData=new Float32Array(e$4.inputBuffer.getChannelData(0));audioData.value.push(channelData)}},sourceNode.value.connect(processorNode.value),processorNode.value.connect(audioContext.value.destination)}catch(error){console.error(`Error starting audio recording:`,error),isRecording.value=!1}}}async function stopRecord(){if(!(!isRecording.value||!audioContext.value)){isRecording.value=!1;try{if(processorNode.value&&(processorNode.value.disconnect(),processorNode.value=void 0),sourceNode.value&&(sourceNode.value.disconnect(),sourceNode.value=void 0),audioData.value.length>0){recording.value=encodeWAV$1(audioData.value,audioContext.value.sampleRate);for(let hook of onStopRecordHooks.value)await hook(recording.value)}else recording.value=void 0;await audioContext.value.close(),audioContext.value=void 0}catch(error){console.error(`Error stopping audio recording:`,error)}return audioData.value}}return watch(mediaRef,()=>{isRecording.value&&stopRecord().then(()=>{mediaRef.value&&mediaRef.value.active&&startRecord()})}),{startRecord,stopRecord,onStopRecord,recording,isRecording}}function useAudioDevice(){let devices=useDevicesList({constraints:{audio:!0},requestPermissions:!0}),audioInputs=computed(()=>devices.audioInputs.value),selectedAudioInput=ref(devices.audioInputs.value[0]?.deviceId||``),deviceConstraints=computed(()=>({audio:{deviceId:{exact:selectedAudioInput.value},autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}})),{stream,stop:stopStream,start:startStream}=useUserMedia({constraints:deviceConstraints,enabled:!1,autoSwitch:!0});return watch(audioInputs,()=>{!selectedAudioInput.value&&audioInputs.value.length>0&&(selectedAudioInput.value=audioInputs.value[0]?.deviceId)}),onMounted(()=>{devices.ensurePermissions().then(()=>nextTick()).then(()=>{audioInputs.value.length>0&&!selectedAudioInput.value&&(selectedAudioInput.value=audioInputs.value.find(input=>input.deviceId===`default`)?.deviceId||audioInputs.value[0].deviceId)}).catch(error=>{console.error(`Error ensuring permissions:`,error)})}),{audioInputs,selectedAudioInput,stream,stopStream,startStream,deviceConstraints}}var States=function(States$1){return States$1.Literal=`literal`,States$1.Special=`special`,States$1}(States||{});function peek(array$1,index$1,offset$2){return index$1+offset$2<0||index$1+offset$2>=array$1.length-1?``:array$1[index$1+offset$2]}function useLlmmarkerParser(options$1){let state=States.Literal,buffer$1=``;return{async consume(textPart){for(let i=0;i`?(current+=peek(textPart,i,1),newState=States.Literal,i++):current===`<`?newState=States.Special:current===`>`&&(newState=States.Literal),state===States.Literal&&newState===States.Special?buffer$1!==``&&(await options$1.onLiteral?.(buffer$1),buffer$1=``):state===States.Special&&newState===States.Literal&&buffer$1!==``&&(buffer$1+=current,await options$1.onSpecial?.(buffer$1),buffer$1=``),state===States.Literal&&newState===States.Literal?(await options$1.onLiteral?.(current),buffer$1=``):state===States.Special&&newState===States.Literal?buffer$1=``:buffer$1+=current,state=newState}},async end(){buffer$1!==``&&(state===States.Literal?await options$1.onLiteral?.(buffer$1):buffer$1.endsWith(`|>`)&&await options$1.onSpecial?.(buffer$1))}}}const htmlVoidElements=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`];var Schema=class{constructor(property,normal,space$1){this.normal=normal,this.property=property,space$1&&(this.space=space$1)}};Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;function merge$4(definitions,space$1){let property={},normal={};for(let definition$29 of definitions)Object.assign(property,definition$29.property),Object.assign(normal,definition$29.normal);return new Schema(property,normal,space$1)}function normalize$1(value$1){return value$1.toLowerCase()}var Info=class{constructor(property,attribute){this.attribute=attribute,this.property=property}};Info.prototype.attribute=``,Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property=``,Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;var types_exports={};__export(types_exports,{boolean:()=>boolean$2,booleanish:()=>booleanish,commaOrSpaceSeparated:()=>commaOrSpaceSeparated,commaSeparated:()=>commaSeparated,number:()=>number$3,overloadedBoolean:()=>overloadedBoolean,spaceSeparated:()=>spaceSeparated});let powers=0;const boolean$2=increment(),booleanish=increment(),overloadedBoolean=increment(),number$3=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const checks=Object.keys(types_exports);var DefinedInfo=class extends Info{constructor(property,attribute,mask,space$1){let index$1=-1;if(super(property,attribute),mark$1(this,`space`,space$1),typeof mask==`number`)for(;++index$14&&normal.slice(0,4)===`data`&&valid.test(value$1)){if(value$1.charAt(4)===`-`){let rest=value$1.slice(5).replace(dash,camelcase);property=`data`+rest.charAt(0).toUpperCase()+rest.slice(1)}else{let rest=value$1.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!==`-`&&(dashes=`-`+dashes),value$1=`data`+dashes}}Type=DefinedInfo}return new Type(property,value$1)}function kebab($0){return`-`+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}const html$1=merge$4([aria,html$4,xlink,xmlns,xml],`html`),svg=merge$4([aria,svg$1,xlink,xmlns,xml],`svg`),own$7={}.hasOwnProperty;function zwitch(key$2,options$1){let settings=options$1||{};function one$3(value$1,...parameters){let fn$5=one$3.invalid,handlers$3=one$3.handlers;if(value$1&&own$7.call(value$1,key$2)){let id=String(value$1[key$2]);fn$5=own$7.call(handlers$3,id)?handlers$3[id]:one$3.unknown}if(fn$5)return fn$5.call(this,value$1,...parameters)}return one$3.handlers=settings.handlers||{},one$3.invalid=settings.invalid,one$3.unknown=settings.unknown,one$3}const defaultSubsetRegex=/["&'<>`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(value$1,options$1){if(value$1=value$1.replace(options$1.subset?charactersToExpressionCached(options$1.subset):defaultSubsetRegex,basic),options$1.subset||options$1.escapeOnly)return value$1;return value$1.replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic);function surrogate(pair,index$1,all$3){return options$1.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all$3.charCodeAt(index$1+2),options$1)}function basic(character,index$1,all$3){return options$1.format(character.charCodeAt(0),all$3.charCodeAt(index$1+1),options$1)}}function charactersToExpressionCached(subset$4){let cached$1=subsetToRegexCache.get(subset$4);return cached$1||(cached$1=charactersToExpression(subset$4),subsetToRegexCache.set(subset$4,cached$1)),cached$1}function charactersToExpression(subset$4){let groups=[],index$1=-1;for(;++index$1`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},dangerous=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],own$6={}.hasOwnProperty,characters={};let key$1;for(key$1 in characterEntitiesHtml4)own$6.call(characterEntitiesHtml4,key$1)&&(characters[characterEntitiesHtml4[key$1]]=key$1);const notAlphanumericRegex=/[^\dA-Za-z]/;function toNamed(code$1,next,omit$1,attribute){let character=String.fromCharCode(code$1);if(own$6.call(characters,character)){let name$2=characters[character],value$1=`&`+name$2;return omit$1&&characterEntitiesLegacy.includes(name$2)&&!dangerous.includes(name$2)&&(!attribute||next&&next!==61&¬AlphanumericRegex.test(String.fromCharCode(next)))?value$1:value$1+`;`}return``}function formatSmart(code$1,next,options$1){let numeric=toHexadecimal(code$1,next,options$1.omitOptionalSemicolons),named$1;if((options$1.useNamedReferences||options$1.useShortestReferences)&&(named$1=toNamed(code$1,next,options$1.omitOptionalSemicolons,options$1.attribute)),(options$1.useShortestReferences||!named$1)&&options$1.useShortestReferences){let decimal=toDecimal(code$1,next,options$1.omitOptionalSemicolons);decimal.length|^->||--!>|`],commentEntitySubset=[`<`,`>`];function comment$1(node$1,_1,_2,state){return state.settings.bogusComments?``:``;function encode($0){return stringifyEntities($0,Object.assign({},state.settings.characterReferences,{subset:commentEntitySubset}))}}function doctype$1(_1,_2,_3,state){return``}function ccount(value$1,character){let source=String(value$1);if(typeof character!=`string`)throw TypeError(`Expected character`);let count$2=0,index$1=source.indexOf(character);for(;index$1!==-1;)count$2++,index$1=source.indexOf(character,index$1+character.length);return count$2}function stringify(values,options$1){let settings=options$1||{},input=values[values.length-1]===``?[...values,``]:values;return input.join((settings.padRight?` `:``)+`,`+(settings.padLeft===!1?``:` `)).trim()}function stringify$1(values){return values.join(` `).trim()}const re=/[ \t\n\f\r]/g;function whitespace(thing){return typeof thing==`object`?thing.type===`text`?empty$1(thing.value):!1:empty$1(thing)}function empty$1(value$1){return value$1.replace(re,``)===``}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment$1){return sibling;function sibling(parent,index$1,includeWhitespace){let siblings$2=parent?parent.children:emptyChildren$1,offset$2=(index$1||0)+increment$1,next=siblings$2[offset$2];if(!includeWhitespace)for(;next&&whitespace(next);)offset$2+=increment$1,next=siblings$2[offset$2];return next}}const own$5={}.hasOwnProperty;function omission(handlers$3){return omit$1;function omit$1(node$1,index$1,parent){return own$5.call(handlers$3,node$1.tagName)&&handlers$3[node$1.tagName](node$1,index$1,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd,dt,head:headOrColgroupOrCaption,html:html$3,li,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr});function headOrColgroupOrCaption(_$1,index$1,parent){let next=siblingAfter(parent,index$1,!0);return!next||next.type!==`comment`&&!(next.type===`text`&&whitespace(next.value.charAt(0)))}function html$3(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function body$1(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function p(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return next?next.type===`element`&&(next.tagName===`address`||next.tagName===`article`||next.tagName===`aside`||next.tagName===`blockquote`||next.tagName===`details`||next.tagName===`div`||next.tagName===`dl`||next.tagName===`fieldset`||next.tagName===`figcaption`||next.tagName===`figure`||next.tagName===`footer`||next.tagName===`form`||next.tagName===`h1`||next.tagName===`h2`||next.tagName===`h3`||next.tagName===`h4`||next.tagName===`h5`||next.tagName===`h6`||next.tagName===`header`||next.tagName===`hgroup`||next.tagName===`hr`||next.tagName===`main`||next.tagName===`menu`||next.tagName===`nav`||next.tagName===`ol`||next.tagName===`p`||next.tagName===`pre`||next.tagName===`section`||next.tagName===`table`||next.tagName===`ul`):!parent||!(parent.type===`element`&&(parent.tagName===`a`||parent.tagName===`audio`||parent.tagName===`del`||parent.tagName===`ins`||parent.tagName===`map`||parent.tagName===`noscript`||parent.tagName===`video`))}function li(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`li`}function dt(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`))}function dd(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`)}function rubyElement(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`rp`||next.tagName===`rt`)}function optgroup(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`optgroup`}function option(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`option`||next.tagName===`optgroup`)}function thead(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`))}function tbody$1(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`)}function tfoot(_$1,index$1,parent){return!siblingAfter(parent,index$1)}function tr(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`tr`}function cells(_$1,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`td`||next.tagName===`th`)}const opening=omission({body,colgroup,head,html:html$2,tbody});function html$2(node$1){let head$1=siblingAfter(node$1,-1);return!head$1||head$1.type!==`comment`}function head(node$1){let seen$1=new Set;for(let child$1 of node$1.children)if(child$1.type===`element`&&(child$1.tagName===`base`||child$1.tagName===`title`)){if(seen$1.has(child$1.tagName))return!1;seen$1.add(child$1.tagName)}let child=node$1.children[0];return!child||child.type===`element`}function body(node$1){let head$1=siblingAfter(node$1,-1,!0);return!head$1||head$1.type!==`comment`&&!(head$1.type===`text`&&whitespace(head$1.value.charAt(0)))&&!(head$1.type===`element`&&(head$1.tagName===`meta`||head$1.tagName===`link`||head$1.tagName===`script`||head$1.tagName===`style`||head$1.tagName===`template`))}function colgroup(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1,!0);return parent&&previous$1&&previous$1.type===`element`&&previous$1.tagName===`colgroup`&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`col`)}function tbody(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1);return parent&&previous$1&&previous$1.type===`element`&&(previous$1.tagName===`thead`||previous$1.tagName===`tbody`)&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`tr`)}const constants={name:[[` \f\r &/=>`.split(``),` \f\r "&'/=>\``.split(``)],[`\0 \f\r "&'/<=>`.split(``),`\0 @@ -3864,7 +3867,7 @@ function defineStore(id,setup,setupOptions){let options$1,isSetupStore=typeof se \f\r &>`.split(``),`\0 \f\r "&'<=>\``.split(``)],[`\0 \f\r "&'<=>\``.split(``),`\0 -\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function element$2(node$1,index$1,parent,state){let schema=state.schema,omit$1=schema.space===`svg`?!1:state.settings.omitOptionalTags,selfClosing=schema.space===`svg`?state.settings.closeEmptyElements:state.settings.voids.includes(node$1.tagName.toLowerCase()),parts=[],last;schema.space===`html`&&node$1.tagName===`svg`&&(state.schema=svg);let attributes=serializeAttributes(state,node$1.properties),content$2=state.all(schema.space===`html`&&node$1.tagName===`template`?node$1.content:node$1);return state.schema=schema,content$2&&(selfClosing=!1),(attributes||!omit$1||!opening(node$1,index$1,parent))&&(parts.push(`<`,node$1.tagName,attributes?` `+attributes:``),selfClosing&&(schema.space===`svg`||state.settings.closeSelfClosing)&&(last=attributes.charAt(attributes.length-1),(!state.settings.tightSelfClosing||last===`/`||last&&last!==`"`&&last!==`'`)&&parts.push(` `),parts.push(`/`)),parts.push(`>`)),parts.push(content$2),!selfClosing&&(!omit$1||!closing(node$1,index$1,parent))&&parts.push(``),parts.join(``)}function serializeAttributes(state,properties){let values=[],index$1=-1,key$2;if(properties){for(key$2 in properties)if(properties[key$2]!==null&&properties[key$2]!==void 0){let value$1=serializeAttribute(state,key$2,properties[key$2]);value$1&&values.push(value$1)}}for(;++index$1ccount(value$1,state.alternative)&&(quote=state.alternative),result=quote+stringifyEntities(value$1,Object.assign({},state.settings.characterReferences,{subset:(quote===`'`?constants.single:constants.double)[x$1][y],attribute:!0}))+quote),name$2+(result&&`=`+result))}const textEntitySubset=[`<`,`&`];function text$4(node$1,_$1,parent,state){return parent&&parent.type===`element`&&(parent.tagName===`script`||parent.tagName===`style`)?node$1.value:stringifyEntities(node$1.value,Object.assign({},state.settings.characterReferences,{subset:textEntitySubset}))}function raw$1(node$1,index$1,parent,state){return state.settings.allowDangerousHtml?node$1.value:text$4(node$1,index$1,parent,state)}function root$1(node$1,_1,_2,state){return state.all(node$1)}const handle=zwitch(`type`,{invalid,unknown:unknown$1,handlers:{comment:comment$1,doctype:doctype$1,element:element$2,raw:raw$1,root:root$1,text:text$4}});function invalid(node$1){throw Error("Expected node, not `"+node$1+"`")}function unknown$1(node_){let node$1=node_;throw Error("Cannot compile unknown node `"+node$1.type+"`")}const emptyOptions$2={},emptyCharacterReferences={},emptyChildren=[];function toHtml(tree,options$1){let options_=options$1||emptyOptions$2,quote=options_.quote||`"`,alternative=quote===`"`?`'`:`"`;if(quote!==`"`&"e!==`'`)throw Error("Invalid quote `"+quote+"`, expected `'` or `\"`");let state={one:one$2,all:all$2,settings:{omitOptionalTags:options_.omitOptionalTags||!1,allowParseErrors:options_.allowParseErrors||!1,allowDangerousCharacters:options_.allowDangerousCharacters||!1,quoteSmart:options_.quoteSmart||!1,preferUnquoted:options_.preferUnquoted||!1,tightAttributes:options_.tightAttributes||!1,upperDoctype:options_.upperDoctype||!1,tightDoctype:options_.tightDoctype||!1,bogusComments:options_.bogusComments||!1,tightCommaSeparatedLists:options_.tightCommaSeparatedLists||!1,tightSelfClosing:options_.tightSelfClosing||!1,collapseEmptyAttributes:options_.collapseEmptyAttributes||!1,allowDangerousHtml:options_.allowDangerousHtml||!1,voids:options_.voids||htmlVoidElements,characterReferences:options_.characterReferences||emptyCharacterReferences,closeSelfClosing:options_.closeSelfClosing||!1,closeEmptyElements:options_.closeEmptyElements||!1},schema:options_.space===`svg`?svg:html$1,quote,alternative};return state.one(Array.isArray(tree)?{type:`root`,children:tree}:tree,void 0,void 0)}function one$2(node$1,index$1,parent){return handle(node$1,index$1,parent,this)}function all$2(parent){let results=[],children=parent&&parent.children||emptyChildren,index$1=-1;for(;++index$1end?0:end+start:start>end?end:start,remove$3=remove$3>0?remove$3:0,items.length<1e4)parameters=Array.from(items),parameters.unshift(start,remove$3),list$2.splice(...parameters);else for(remove$3&&list$2.splice(start,remove$3);chunkStart0?(splice(list$2,list$2.length,0,items),list$2):items}const hasOwnProperty$1={}.hasOwnProperty;function combineExtensions(extensions){let all$3={},index$1=-1;for(;++index$113&&code$1<32||code$1>126&&code$1<160||code$1>55295&&code$1<57344||code$1>64975&&code$1<65008||(code$1&65535)==65535||(code$1&65535)==65534||code$1>1114111?`�`:String.fromCodePoint(code$1)}function normalizeIdentifier(value$1){return value$1.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}const asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(code$1){return code$1!==null&&(code$1<32||code$1===127)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(code$1){return code$1!==null&&code$1<-2}function markdownLineEndingOrSpace(code$1){return code$1!==null&&(code$1<0||code$1===32)}function markdownSpace(code$1){return code$1===-2||code$1===-1||code$1===32}const unicodePunctuation=regexCheck(/\p{P}|\p{S}/u),unicodeWhitespace=regexCheck(/\s/);function regexCheck(regex){return check$1;function check$1(code$1){return code$1!==null&&code$1>-1&®ex.test(String.fromCharCode(code$1))}}function normalizeUri(value$1){let result=[],index$1=-1,start=0,skip=0;for(;++index$155295&&code$1<57344){let next=value$1.charCodeAt(index$1+1);code$1<56320&&next>56319&&next<57344?(replace=String.fromCharCode(code$1,next),skip=1):replace=`�`}else replace=String.fromCharCode(code$1);replace&&(result.push(value$1.slice(start,index$1),encodeURIComponent(replace)),start=index$1+skip+1,replace=``),skip&&(index$1+=skip,skip=0)}return result.join(``)+value$1.slice(start)}function factorySpace(effects,ok$2,type,max$1){let limit=max$1?max$1-1:1/0,size$2=0;return start;function start(code$1){return markdownSpace(code$1)?(effects.enter(type),prefix(code$1)):ok$2(code$1)}function prefix(code$1){return markdownSpace(code$1)&&size$2++lineStartOffset))return;let indexBeforeExits=self$1.events.length,indexBeforeFlow=indexBeforeExits,seen$1,point$3;for(;indexBeforeFlow--;)if(self$1.events[indexBeforeFlow][0]===`exit`&&self$1.events[indexBeforeFlow][1].type===`chunkFlow`){if(seen$1){point$3=self$1.events[indexBeforeFlow][1].end;break}seen$1=!0}for(exitContainers(continued),index$1=indexBeforeExits;index$1size$2;){let entry=stack$1[index$1];self$1.containerState=entry[1],entry[0].exit.call(self$1,effects)}stack$1.length=size$2}function closeFlow(){childFlow.write([null]),childToken=void 0,childFlow=void 0,self$1.containerState._closeFlow=void 0}}function tokenizeContainer(effects,ok$2,nok){return factorySpace(effects,effects.attempt(this.parser.constructs.document,ok$2,nok),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function classifyCharacter(code$1){if(code$1===null||markdownLineEndingOrSpace(code$1)||unicodeWhitespace(code$1))return 1;if(unicodePunctuation(code$1))return 2}function resolveAll(constructs$1,events,context$1){let called=[],index$1=-1;for(;++index$11&&events[index$1][1].end.offset-events[index$1][1].start.offset>1?2:1;let start={...events[open$1][1].end},end={...events[index$1][1].start};movePoint(start,-use),movePoint(end,use),openingSequence={type:use>1?`strongSequence`:`emphasisSequence`,start,end:{...events[open$1][1].end}},closingSequence={type:use>1?`strongSequence`:`emphasisSequence`,start:{...events[index$1][1].start},end},text$5={type:use>1?`strongText`:`emphasisText`,start:{...events[open$1][1].end},end:{...events[index$1][1].start}},group={type:use>1?`strong`:`emphasis`,start:{...openingSequence.start},end:{...closingSequence.end}},events[open$1][1].end={...openingSequence.start},events[index$1][1].start={...closingSequence.end},nextEvents=[],events[open$1][1].end.offset-events[open$1][1].start.offset&&(nextEvents=push(nextEvents,[[`enter`,events[open$1][1],context$1],[`exit`,events[open$1][1],context$1]])),nextEvents=push(nextEvents,[[`enter`,group,context$1],[`enter`,openingSequence,context$1],[`exit`,openingSequence,context$1],[`enter`,text$5,context$1]]),nextEvents=push(nextEvents,resolveAll(context$1.parser.constructs.insideSpan.null,events.slice(open$1+1,index$1),context$1)),nextEvents=push(nextEvents,[[`exit`,text$5,context$1],[`enter`,closingSequence,context$1],[`exit`,closingSequence,context$1],[`exit`,group,context$1]]),events[index$1][1].end.offset-events[index$1][1].start.offset?(offset$2=2,nextEvents=push(nextEvents,[[`enter`,events[index$1][1],context$1],[`exit`,events[index$1][1],context$1]])):offset$2=0,splice(events,open$1-1,index$1-open$1+3,nextEvents),index$1=open$1+nextEvents.length-offset$2-2;break}}for(index$1=-1;++index$10&&markdownSpace(code$1)?factorySpace(effects,beforeContentChunk,`linePrefix`,initialPrefix+1)(code$1):beforeContentChunk(code$1)}function beforeContentChunk(code$1){return code$1===null||markdownLineEnding(code$1)?effects.check(nonLazyContinuation,atNonLazyBreak,after)(code$1):(effects.enter(`codeFlowValue`),contentChunk(code$1))}function contentChunk(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`codeFlowValue`),beforeContentChunk(code$1)):(effects.consume(code$1),contentChunk)}function after(code$1){return effects.exit(`codeFenced`),ok$2(code$1)}function tokenizeCloseStart(effects$1,ok$3,nok$1){let size$2=0;return startBefore;function startBefore(code$1){return effects$1.enter(`lineEnding`),effects$1.consume(code$1),effects$1.exit(`lineEnding`),start$1}function start$1(code$1){return effects$1.enter(`codeFencedFence`),markdownSpace(code$1)?factorySpace(effects$1,beforeSequenceClose,`linePrefix`,self$1.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(code$1):beforeSequenceClose(code$1)}function beforeSequenceClose(code$1){return code$1===marker?(effects$1.enter(`codeFencedFenceSequence`),sequenceClose(code$1)):nok$1(code$1)}function sequenceClose(code$1){return code$1===marker?(size$2++,effects$1.consume(code$1),sequenceClose):size$2>=sizeOpen?(effects$1.exit(`codeFencedFenceSequence`),markdownSpace(code$1)?factorySpace(effects$1,sequenceCloseAfter,`whitespace`)(code$1):sequenceCloseAfter(code$1)):nok$1(code$1)}function sequenceCloseAfter(code$1){return code$1===null||markdownLineEnding(code$1)?(effects$1.exit(`codeFencedFence`),ok$3(code$1)):nok$1(code$1)}}}function tokenizeNonLazyContinuation(effects,ok$2,nok){let self$1=this;return start;function start(code$1){return code$1===null?nok(code$1):(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),lineStart)}function lineStart(code$1){return self$1.parser.lazy[self$1.now().line]?nok(code$1):ok$2(code$1)}}const codeIndented={name:`codeIndented`,tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(effects,ok$2,nok){let self$1=this;return start;function start(code$1){return effects.enter(`codeIndented`),factorySpace(effects,afterPrefix,`linePrefix`,5)(code$1)}function afterPrefix(code$1){let tail=self$1.events[self$1.events.length-1];return tail&&tail[1].type===`linePrefix`&&tail[2].sliceSerialize(tail[1],!0).length>=4?atBreak(code$1):nok(code$1)}function atBreak(code$1){return code$1===null?after(code$1):markdownLineEnding(code$1)?effects.attempt(furtherStart,atBreak,after)(code$1):(effects.enter(`codeFlowValue`),inside(code$1))}function inside(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`codeFlowValue`),atBreak(code$1)):(effects.consume(code$1),inside)}function after(code$1){return effects.exit(`codeIndented`),ok$2(code$1)}}function tokenizeFurtherStart(effects,ok$2,nok){let self$1=this;return furtherStart$1;function furtherStart$1(code$1){return self$1.parser.lazy[self$1.now().line]?nok(code$1):markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),furtherStart$1):factorySpace(effects,afterPrefix,`linePrefix`,5)(code$1)}function afterPrefix(code$1){let tail=self$1.events[self$1.events.length-1];return tail&&tail[1].type===`linePrefix`&&tail[2].sliceSerialize(tail[1],!0).length>=4?ok$2(code$1):markdownLineEnding(code$1)?furtherStart$1(code$1):nok(code$1)}}const codeText={name:`codeText`,previous,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(events){let tailExitIndex=events.length-4,headEnterIndex=3,index$1,enter;if((events[headEnterIndex][1].type===`lineEnding`||events[headEnterIndex][1].type===`space`)&&(events[tailExitIndex][1].type===`lineEnding`||events[tailExitIndex][1].type===`space`)){for(index$1=headEnterIndex;++index$1=this.left.length+this.right.length)throw RangeError("Cannot access index `"+index$1+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return index$1this.left.length)return this.right.slice(this.right.length-stop$1+this.left.length,this.right.length-start+this.left.length).reverse();let list$2=this.left.slice(start);return list$2.push(...this.right.slice(this.right.length-stop$1+this.left.length).reverse()),list$2}splice(start,deleteCount,items){let count$1=deleteCount||0;this.setCursor(Math.trunc(start));let removed=this.right.splice(this.right.length-count$1,1/0);return items&&chunkedPush(this.left,items),removed.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(item){this.setCursor(1/0),this.left.push(item)}pushMany(items){this.setCursor(1/0),chunkedPush(this.left,items)}unshift(item){this.setCursor(0),this.right.push(item)}unshiftMany(items){this.setCursor(0),chunkedPush(this.right,items.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?ok$2(code$1):effects.interrupt(self$1.parser.constructs.flow,nok,ok$2)(code$1)}}function factoryDestination(effects,ok$2,nok,type,literalType,literalMarkerType,rawType,stringType,max$1){let limit=max$1||1/0,balance=0;return start;function start(code$1){return code$1===60?(effects.enter(type),effects.enter(literalType),effects.enter(literalMarkerType),effects.consume(code$1),effects.exit(literalMarkerType),enclosedBefore):code$1===null||code$1===32||code$1===41||asciiControl(code$1)?nok(code$1):(effects.enter(type),effects.enter(rawType),effects.enter(stringType),effects.enter(`chunkString`,{contentType:`string`}),raw$3(code$1))}function enclosedBefore(code$1){return code$1===62?(effects.enter(literalMarkerType),effects.consume(code$1),effects.exit(literalMarkerType),effects.exit(literalType),effects.exit(type),ok$2):(effects.enter(stringType),effects.enter(`chunkString`,{contentType:`string`}),enclosed(code$1))}function enclosed(code$1){return code$1===62?(effects.exit(`chunkString`),effects.exit(stringType),enclosedBefore(code$1)):code$1===null||code$1===60||markdownLineEnding(code$1)?nok(code$1):(effects.consume(code$1),code$1===92?enclosedEscape:enclosed)}function enclosedEscape(code$1){return code$1===60||code$1===62||code$1===92?(effects.consume(code$1),enclosed):enclosed(code$1)}function raw$3(code$1){return!balance&&(code$1===null||code$1===41||markdownLineEndingOrSpace(code$1))?(effects.exit(`chunkString`),effects.exit(stringType),effects.exit(rawType),effects.exit(type),ok$2(code$1)):balance999||code$1===null||code$1===91||code$1===93&&!seen$1||code$1===94&&!size$2&&`_hiddenFootnoteSupport`in self$1.parser.constructs?nok(code$1):code$1===93?(effects.exit(stringType),effects.enter(markerType),effects.consume(code$1),effects.exit(markerType),effects.exit(type),ok$2):markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),atBreak):(effects.enter(`chunkString`,{contentType:`string`}),labelInside(code$1))}function labelInside(code$1){return code$1===null||code$1===91||code$1===93||markdownLineEnding(code$1)||size$2++>999?(effects.exit(`chunkString`),atBreak(code$1)):(effects.consume(code$1),seen$1||=!markdownSpace(code$1),code$1===92?labelEscape:labelInside)}function labelEscape(code$1){return code$1===91||code$1===92||code$1===93?(effects.consume(code$1),size$2++,labelInside):labelInside(code$1)}}function factoryTitle(effects,ok$2,nok,type,markerType,stringType){let marker;return start;function start(code$1){return code$1===34||code$1===39||code$1===40?(effects.enter(type),effects.enter(markerType),effects.consume(code$1),effects.exit(markerType),marker=code$1===40?41:code$1,begin):nok(code$1)}function begin(code$1){return code$1===marker?(effects.enter(markerType),effects.consume(code$1),effects.exit(markerType),effects.exit(type),ok$2):(effects.enter(stringType),atBreak(code$1))}function atBreak(code$1){return code$1===marker?(effects.exit(stringType),begin(marker)):code$1===null?nok(code$1):markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),factorySpace(effects,atBreak,`linePrefix`)):(effects.enter(`chunkString`,{contentType:`string`}),inside(code$1))}function inside(code$1){return code$1===marker||code$1===null||markdownLineEnding(code$1)?(effects.exit(`chunkString`),atBreak(code$1)):(effects.consume(code$1),code$1===92?escape$1:inside)}function escape$1(code$1){return code$1===marker||code$1===92?(effects.consume(code$1),inside):inside(code$1)}}function factoryWhitespace(effects,ok$2){let seen$1;return start;function start(code$1){return markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),seen$1=!0,start):markdownSpace(code$1)?factorySpace(effects,start,seen$1?`linePrefix`:`lineSuffix`)(code$1):ok$2(code$1)}}const definition={name:`definition`,tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(effects,ok$2,nok){let self$1=this,identifier;return start;function start(code$1){return effects.enter(`definition`),before(code$1)}function before(code$1){return factoryLabel.call(self$1,effects,labelAfter,nok,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(code$1)}function labelAfter(code$1){return identifier=normalizeIdentifier(self$1.sliceSerialize(self$1.events[self$1.events.length-1][1]).slice(1,-1)),code$1===58?(effects.enter(`definitionMarker`),effects.consume(code$1),effects.exit(`definitionMarker`),markerAfter):nok(code$1)}function markerAfter(code$1){return markdownLineEndingOrSpace(code$1)?factoryWhitespace(effects,destinationBefore)(code$1):destinationBefore(code$1)}function destinationBefore(code$1){return factoryDestination(effects,destinationAfter,nok,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(code$1)}function destinationAfter(code$1){return effects.attempt(titleBefore,after,after)(code$1)}function after(code$1){return markdownSpace(code$1)?factorySpace(effects,afterWhitespace,`whitespace`)(code$1):afterWhitespace(code$1)}function afterWhitespace(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`definition`),self$1.parser.defined.push(identifier),ok$2(code$1)):nok(code$1)}}function tokenizeTitleBefore(effects,ok$2,nok){return titleBefore$1;function titleBefore$1(code$1){return markdownLineEndingOrSpace(code$1)?factoryWhitespace(effects,beforeMarker)(code$1):nok(code$1)}function beforeMarker(code$1){return factoryTitle(effects,titleAfter,nok,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(code$1)}function titleAfter(code$1){return markdownSpace(code$1)?factorySpace(effects,titleAfterOptionalWhitespace,`whitespace`)(code$1):titleAfterOptionalWhitespace(code$1)}function titleAfterOptionalWhitespace(code$1){return code$1===null||markdownLineEnding(code$1)?ok$2(code$1):nok(code$1)}}const hardBreakEscape={name:`hardBreakEscape`,tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(effects,ok$2,nok){return start;function start(code$1){return effects.enter(`hardBreakEscape`),effects.consume(code$1),after}function after(code$1){return markdownLineEnding(code$1)?(effects.exit(`hardBreakEscape`),ok$2(code$1)):nok(code$1)}}const headingAtx={name:`headingAtx`,resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(events,context$1){let contentEnd=events.length-2,contentStart=3,content$2,text$5;return events[contentStart][1].type===`whitespace`&&(contentStart+=2),contentEnd-2>contentStart&&events[contentEnd][1].type===`whitespace`&&(contentEnd-=2),events[contentEnd][1].type===`atxHeadingSequence`&&(contentStart===contentEnd-1||contentEnd-4>contentStart&&events[contentEnd-2][1].type===`whitespace`)&&(contentEnd-=contentStart+1===contentEnd?2:4),contentEnd>contentStart&&(content$2={type:`atxHeadingText`,start:events[contentStart][1].start,end:events[contentEnd][1].end},text$5={type:`chunkText`,start:events[contentStart][1].start,end:events[contentEnd][1].end,contentType:`text`},splice(events,contentStart,contentEnd-contentStart+1,[[`enter`,content$2,context$1],[`enter`,text$5,context$1],[`exit`,text$5,context$1],[`exit`,content$2,context$1]])),events}function tokenizeHeadingAtx(effects,ok$2,nok){let size$2=0;return start;function start(code$1){return effects.enter(`atxHeading`),before(code$1)}function before(code$1){return effects.enter(`atxHeadingSequence`),sequenceOpen(code$1)}function sequenceOpen(code$1){return code$1===35&&size$2++<6?(effects.consume(code$1),sequenceOpen):code$1===null||markdownLineEndingOrSpace(code$1)?(effects.exit(`atxHeadingSequence`),atBreak(code$1)):nok(code$1)}function atBreak(code$1){return code$1===35?(effects.enter(`atxHeadingSequence`),sequenceFurther(code$1)):code$1===null||markdownLineEnding(code$1)?(effects.exit(`atxHeading`),ok$2(code$1)):markdownSpace(code$1)?factorySpace(effects,atBreak,`whitespace`)(code$1):(effects.enter(`atxHeadingText`),data$12(code$1))}function sequenceFurther(code$1){return code$1===35?(effects.consume(code$1),sequenceFurther):(effects.exit(`atxHeadingSequence`),atBreak(code$1))}function data$12(code$1){return code$1===null||code$1===35||markdownLineEndingOrSpace(code$1)?(effects.exit(`atxHeadingText`),atBreak(code$1)):(effects.consume(code$1),data$12)}}const htmlBlockNames=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),htmlRawNames=[`pre`,`script`,`style`,`textarea`],htmlFlow={concrete:!0,name:`htmlFlow`,resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(events){let index$1=events.length;for(;index$1--&&!(events[index$1][0]===`enter`&&events[index$1][1].type===`htmlFlow`););return index$1>1&&events[index$1-2][1].type===`linePrefix`&&(events[index$1][1].start=events[index$1-2][1].start,events[index$1+1][1].start=events[index$1-2][1].start,events.splice(index$1-2,2)),events}function tokenizeHtmlFlow(effects,ok$2,nok){let self$1=this,marker,closingTag,buffer$1,index$1,markerB;return start;function start(code$1){return before(code$1)}function before(code$1){return effects.enter(`htmlFlow`),effects.enter(`htmlFlowData`),effects.consume(code$1),open$1}function open$1(code$1){return code$1===33?(effects.consume(code$1),declarationOpen):code$1===47?(effects.consume(code$1),closingTag=!0,tagCloseStart):code$1===63?(effects.consume(code$1),marker=3,self$1.interrupt?ok$2:continuationDeclarationInside):asciiAlpha(code$1)?(effects.consume(code$1),buffer$1=String.fromCharCode(code$1),tagName):nok(code$1)}function declarationOpen(code$1){return code$1===45?(effects.consume(code$1),marker=2,commentOpenInside):code$1===91?(effects.consume(code$1),marker=5,index$1=0,cdataOpenInside):asciiAlpha(code$1)?(effects.consume(code$1),marker=4,self$1.interrupt?ok$2:continuationDeclarationInside):nok(code$1)}function commentOpenInside(code$1){return code$1===45?(effects.consume(code$1),self$1.interrupt?ok$2:continuationDeclarationInside):nok(code$1)}function cdataOpenInside(code$1){let value$1=`CDATA[`;return code$1===value$1.charCodeAt(index$1++)?(effects.consume(code$1),index$1===6?self$1.interrupt?ok$2:continuation:cdataOpenInside):nok(code$1)}function tagCloseStart(code$1){return asciiAlpha(code$1)?(effects.consume(code$1),buffer$1=String.fromCharCode(code$1),tagName):nok(code$1)}function tagName(code$1){if(code$1===null||code$1===47||code$1===62||markdownLineEndingOrSpace(code$1)){let slash=code$1===47,name$2=buffer$1.toLowerCase();return!slash&&!closingTag&&htmlRawNames.includes(name$2)?(marker=1,self$1.interrupt?ok$2(code$1):continuation(code$1)):htmlBlockNames.includes(buffer$1.toLowerCase())?(marker=6,slash?(effects.consume(code$1),basicSelfClosing):self$1.interrupt?ok$2(code$1):continuation(code$1)):(marker=7,self$1.interrupt&&!self$1.parser.lazy[self$1.now().line]?nok(code$1):closingTag?completeClosingTagAfter(code$1):completeAttributeNameBefore(code$1))}return code$1===45||asciiAlphanumeric(code$1)?(effects.consume(code$1),buffer$1+=String.fromCharCode(code$1),tagName):nok(code$1)}function basicSelfClosing(code$1){return code$1===62?(effects.consume(code$1),self$1.interrupt?ok$2:continuation):nok(code$1)}function completeClosingTagAfter(code$1){return markdownSpace(code$1)?(effects.consume(code$1),completeClosingTagAfter):completeEnd(code$1)}function completeAttributeNameBefore(code$1){return code$1===47?(effects.consume(code$1),completeEnd):code$1===58||code$1===95||asciiAlpha(code$1)?(effects.consume(code$1),completeAttributeName):markdownSpace(code$1)?(effects.consume(code$1),completeAttributeNameBefore):completeEnd(code$1)}function completeAttributeName(code$1){return code$1===45||code$1===46||code$1===58||code$1===95||asciiAlphanumeric(code$1)?(effects.consume(code$1),completeAttributeName):completeAttributeNameAfter(code$1)}function completeAttributeNameAfter(code$1){return code$1===61?(effects.consume(code$1),completeAttributeValueBefore):markdownSpace(code$1)?(effects.consume(code$1),completeAttributeNameAfter):completeAttributeNameBefore(code$1)}function completeAttributeValueBefore(code$1){return code$1===null||code$1===60||code$1===61||code$1===62||code$1===96?nok(code$1):code$1===34||code$1===39?(effects.consume(code$1),markerB=code$1,completeAttributeValueQuoted):markdownSpace(code$1)?(effects.consume(code$1),completeAttributeValueBefore):completeAttributeValueUnquoted(code$1)}function completeAttributeValueQuoted(code$1){return code$1===markerB?(effects.consume(code$1),markerB=null,completeAttributeValueQuotedAfter):code$1===null||markdownLineEnding(code$1)?nok(code$1):(effects.consume(code$1),completeAttributeValueQuoted)}function completeAttributeValueUnquoted(code$1){return code$1===null||code$1===34||code$1===39||code$1===47||code$1===60||code$1===61||code$1===62||code$1===96||markdownLineEndingOrSpace(code$1)?completeAttributeNameAfter(code$1):(effects.consume(code$1),completeAttributeValueUnquoted)}function completeAttributeValueQuotedAfter(code$1){return code$1===47||code$1===62||markdownSpace(code$1)?completeAttributeNameBefore(code$1):nok(code$1)}function completeEnd(code$1){return code$1===62?(effects.consume(code$1),completeAfter):nok(code$1)}function completeAfter(code$1){return code$1===null||markdownLineEnding(code$1)?continuation(code$1):markdownSpace(code$1)?(effects.consume(code$1),completeAfter):nok(code$1)}function continuation(code$1){return code$1===45&&marker===2?(effects.consume(code$1),continuationCommentInside):code$1===60&&marker===1?(effects.consume(code$1),continuationRawTagOpen):code$1===62&&marker===4?(effects.consume(code$1),continuationClose):code$1===63&&marker===3?(effects.consume(code$1),continuationDeclarationInside):code$1===93&&marker===5?(effects.consume(code$1),continuationCdataInside):markdownLineEnding(code$1)&&(marker===6||marker===7)?(effects.exit(`htmlFlowData`),effects.check(blankLineBefore,continuationAfter,continuationStart)(code$1)):code$1===null||markdownLineEnding(code$1)?(effects.exit(`htmlFlowData`),continuationStart(code$1)):(effects.consume(code$1),continuation)}function continuationStart(code$1){return effects.check(nonLazyContinuationStart,continuationStartNonLazy,continuationAfter)(code$1)}function continuationStartNonLazy(code$1){return effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),continuationBefore}function continuationBefore(code$1){return code$1===null||markdownLineEnding(code$1)?continuationStart(code$1):(effects.enter(`htmlFlowData`),continuation(code$1))}function continuationCommentInside(code$1){return code$1===45?(effects.consume(code$1),continuationDeclarationInside):continuation(code$1)}function continuationRawTagOpen(code$1){return code$1===47?(effects.consume(code$1),buffer$1=``,continuationRawEndTag):continuation(code$1)}function continuationRawEndTag(code$1){if(code$1===62){let name$2=buffer$1.toLowerCase();return htmlRawNames.includes(name$2)?(effects.consume(code$1),continuationClose):continuation(code$1)}return asciiAlpha(code$1)&&buffer$1.length<8?(effects.consume(code$1),buffer$1+=String.fromCharCode(code$1),continuationRawEndTag):continuation(code$1)}function continuationCdataInside(code$1){return code$1===93?(effects.consume(code$1),continuationDeclarationInside):continuation(code$1)}function continuationDeclarationInside(code$1){return code$1===62?(effects.consume(code$1),continuationClose):code$1===45&&marker===2?(effects.consume(code$1),continuationDeclarationInside):continuation(code$1)}function continuationClose(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`htmlFlowData`),continuationAfter(code$1)):(effects.consume(code$1),continuationClose)}function continuationAfter(code$1){return effects.exit(`htmlFlow`),ok$2(code$1)}}function tokenizeNonLazyContinuationStart(effects,ok$2,nok){let self$1=this;return start;function start(code$1){return markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),after):nok(code$1)}function after(code$1){return self$1.parser.lazy[self$1.now().line]?nok(code$1):ok$2(code$1)}}function tokenizeBlankLineBefore(effects,ok$2,nok){return start;function start(code$1){return effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),effects.attempt(blankLine,ok$2,nok)}}const htmlText={name:`htmlText`,tokenize:tokenizeHtmlText};function tokenizeHtmlText(effects,ok$2,nok){let self$1=this,marker,index$1,returnState;return start;function start(code$1){return effects.enter(`htmlText`),effects.enter(`htmlTextData`),effects.consume(code$1),open$1}function open$1(code$1){return code$1===33?(effects.consume(code$1),declarationOpen):code$1===47?(effects.consume(code$1),tagCloseStart):code$1===63?(effects.consume(code$1),instruction$1):asciiAlpha(code$1)?(effects.consume(code$1),tagOpen):nok(code$1)}function declarationOpen(code$1){return code$1===45?(effects.consume(code$1),commentOpenInside):code$1===91?(effects.consume(code$1),index$1=0,cdataOpenInside):asciiAlpha(code$1)?(effects.consume(code$1),declaration):nok(code$1)}function commentOpenInside(code$1){return code$1===45?(effects.consume(code$1),commentEnd):nok(code$1)}function comment$2(code$1){return code$1===null?nok(code$1):code$1===45?(effects.consume(code$1),commentClose):markdownLineEnding(code$1)?(returnState=comment$2,lineEndingBefore(code$1)):(effects.consume(code$1),comment$2)}function commentClose(code$1){return code$1===45?(effects.consume(code$1),commentEnd):comment$2(code$1)}function commentEnd(code$1){return code$1===62?end(code$1):code$1===45?commentClose(code$1):comment$2(code$1)}function cdataOpenInside(code$1){let value$1=`CDATA[`;return code$1===value$1.charCodeAt(index$1++)?(effects.consume(code$1),index$1===6?cdata$1:cdataOpenInside):nok(code$1)}function cdata$1(code$1){return code$1===null?nok(code$1):code$1===93?(effects.consume(code$1),cdataClose):markdownLineEnding(code$1)?(returnState=cdata$1,lineEndingBefore(code$1)):(effects.consume(code$1),cdata$1)}function cdataClose(code$1){return code$1===93?(effects.consume(code$1),cdataEnd):cdata$1(code$1)}function cdataEnd(code$1){return code$1===62?end(code$1):code$1===93?(effects.consume(code$1),cdataEnd):cdata$1(code$1)}function declaration(code$1){return code$1===null||code$1===62?end(code$1):markdownLineEnding(code$1)?(returnState=declaration,lineEndingBefore(code$1)):(effects.consume(code$1),declaration)}function instruction$1(code$1){return code$1===null?nok(code$1):code$1===63?(effects.consume(code$1),instructionClose):markdownLineEnding(code$1)?(returnState=instruction$1,lineEndingBefore(code$1)):(effects.consume(code$1),instruction$1)}function instructionClose(code$1){return code$1===62?end(code$1):instruction$1(code$1)}function tagCloseStart(code$1){return asciiAlpha(code$1)?(effects.consume(code$1),tagClose):nok(code$1)}function tagClose(code$1){return code$1===45||asciiAlphanumeric(code$1)?(effects.consume(code$1),tagClose):tagCloseBetween(code$1)}function tagCloseBetween(code$1){return markdownLineEnding(code$1)?(returnState=tagCloseBetween,lineEndingBefore(code$1)):markdownSpace(code$1)?(effects.consume(code$1),tagCloseBetween):end(code$1)}function tagOpen(code$1){return code$1===45||asciiAlphanumeric(code$1)?(effects.consume(code$1),tagOpen):code$1===47||code$1===62||markdownLineEndingOrSpace(code$1)?tagOpenBetween(code$1):nok(code$1)}function tagOpenBetween(code$1){return code$1===47?(effects.consume(code$1),end):code$1===58||code$1===95||asciiAlpha(code$1)?(effects.consume(code$1),tagOpenAttributeName):markdownLineEnding(code$1)?(returnState=tagOpenBetween,lineEndingBefore(code$1)):markdownSpace(code$1)?(effects.consume(code$1),tagOpenBetween):end(code$1)}function tagOpenAttributeName(code$1){return code$1===45||code$1===46||code$1===58||code$1===95||asciiAlphanumeric(code$1)?(effects.consume(code$1),tagOpenAttributeName):tagOpenAttributeNameAfter(code$1)}function tagOpenAttributeNameAfter(code$1){return code$1===61?(effects.consume(code$1),tagOpenAttributeValueBefore):markdownLineEnding(code$1)?(returnState=tagOpenAttributeNameAfter,lineEndingBefore(code$1)):markdownSpace(code$1)?(effects.consume(code$1),tagOpenAttributeNameAfter):tagOpenBetween(code$1)}function tagOpenAttributeValueBefore(code$1){return code$1===null||code$1===60||code$1===61||code$1===62||code$1===96?nok(code$1):code$1===34||code$1===39?(effects.consume(code$1),marker=code$1,tagOpenAttributeValueQuoted):markdownLineEnding(code$1)?(returnState=tagOpenAttributeValueBefore,lineEndingBefore(code$1)):markdownSpace(code$1)?(effects.consume(code$1),tagOpenAttributeValueBefore):(effects.consume(code$1),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuoted(code$1){return code$1===marker?(effects.consume(code$1),marker=void 0,tagOpenAttributeValueQuotedAfter):code$1===null?nok(code$1):markdownLineEnding(code$1)?(returnState=tagOpenAttributeValueQuoted,lineEndingBefore(code$1)):(effects.consume(code$1),tagOpenAttributeValueQuoted)}function tagOpenAttributeValueUnquoted(code$1){return code$1===null||code$1===34||code$1===39||code$1===60||code$1===61||code$1===96?nok(code$1):code$1===47||code$1===62||markdownLineEndingOrSpace(code$1)?tagOpenBetween(code$1):(effects.consume(code$1),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuotedAfter(code$1){return code$1===47||code$1===62||markdownLineEndingOrSpace(code$1)?tagOpenBetween(code$1):nok(code$1)}function end(code$1){return code$1===62?(effects.consume(code$1),effects.exit(`htmlTextData`),effects.exit(`htmlText`),ok$2):nok(code$1)}function lineEndingBefore(code$1){return effects.exit(`htmlTextData`),effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),lineEndingAfter}function lineEndingAfter(code$1){return markdownSpace(code$1)?factorySpace(effects,lineEndingAfterPrefix,`linePrefix`,self$1.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(code$1):lineEndingAfterPrefix(code$1)}function lineEndingAfterPrefix(code$1){return effects.enter(`htmlTextData`),returnState(code$1)}}const labelEnd={name:`labelEnd`,resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(events){let index$1=-1,newEvents=[];for(;++index$1=3&&(code$1===null||markdownLineEnding(code$1))?(effects.exit(`thematicBreak`),ok$2(code$1)):nok(code$1)}function sequence(code$1){return code$1===marker?(effects.consume(code$1),size$2++,sequence):(effects.exit(`thematicBreakSequence`),markdownSpace(code$1)?factorySpace(effects,atBreak,`whitespace`)(code$1):atBreak(code$1))}}const list$1={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:`list`,tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent};function tokenizeListStart(effects,ok$2,nok){let self$1=this,tail=self$1.events[self$1.events.length-1],initialSize=tail&&tail[1].type===`linePrefix`?tail[2].sliceSerialize(tail[1],!0).length:0,size$2=0;return start;function start(code$1){let kind=self$1.containerState.type||(code$1===42||code$1===43||code$1===45?`listUnordered`:`listOrdered`);if(kind===`listUnordered`?!self$1.containerState.marker||code$1===self$1.containerState.marker:asciiDigit(code$1)){if(self$1.containerState.type||(self$1.containerState.type=kind,effects.enter(kind,{_container:!0})),kind===`listUnordered`)return effects.enter(`listItemPrefix`),code$1===42||code$1===45?effects.check(thematicBreak$1,nok,atMarker)(code$1):atMarker(code$1);if(!self$1.interrupt||code$1===49)return effects.enter(`listItemPrefix`),effects.enter(`listItemValue`),inside(code$1)}return nok(code$1)}function inside(code$1){return asciiDigit(code$1)&&++size$2<10?(effects.consume(code$1),inside):(!self$1.interrupt||size$2<2)&&(self$1.containerState.marker?code$1===self$1.containerState.marker:code$1===41||code$1===46)?(effects.exit(`listItemValue`),atMarker(code$1)):nok(code$1)}function atMarker(code$1){return effects.enter(`listItemMarker`),effects.consume(code$1),effects.exit(`listItemMarker`),self$1.containerState.marker=self$1.containerState.marker||code$1,effects.check(blankLine,self$1.interrupt?nok:onBlank,effects.attempt(listItemPrefixWhitespaceConstruct,endOfPrefix,otherPrefix))}function onBlank(code$1){return self$1.containerState.initialBlankLine=!0,initialSize++,endOfPrefix(code$1)}function otherPrefix(code$1){return markdownSpace(code$1)?(effects.enter(`listItemPrefixWhitespace`),effects.consume(code$1),effects.exit(`listItemPrefixWhitespace`),endOfPrefix):nok(code$1)}function endOfPrefix(code$1){return self$1.containerState.size=initialSize+self$1.sliceSerialize(effects.exit(`listItemPrefix`),!0).length,ok$2(code$1)}}function tokenizeListContinuation(effects,ok$2,nok){let self$1=this;return self$1.containerState._closeFlow=void 0,effects.check(blankLine,onBlank,notBlank);function onBlank(code$1){return self$1.containerState.furtherBlankLines=self$1.containerState.furtherBlankLines||self$1.containerState.initialBlankLine,factorySpace(effects,ok$2,`listItemIndent`,self$1.containerState.size+1)(code$1)}function notBlank(code$1){return self$1.containerState.furtherBlankLines||!markdownSpace(code$1)?(self$1.containerState.furtherBlankLines=void 0,self$1.containerState.initialBlankLine=void 0,notInCurrentItem(code$1)):(self$1.containerState.furtherBlankLines=void 0,self$1.containerState.initialBlankLine=void 0,effects.attempt(indentConstruct,ok$2,notInCurrentItem)(code$1))}function notInCurrentItem(code$1){return self$1.containerState._closeFlow=!0,self$1.interrupt=void 0,factorySpace(effects,effects.attempt(list$1,ok$2,nok),`linePrefix`,self$1.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(code$1)}}function tokenizeIndent(effects,ok$2,nok){let self$1=this;return factorySpace(effects,afterPrefix,`listItemIndent`,self$1.containerState.size+1);function afterPrefix(code$1){let tail=self$1.events[self$1.events.length-1];return tail&&tail[1].type===`listItemIndent`&&tail[2].sliceSerialize(tail[1],!0).length===self$1.containerState.size?ok$2(code$1):nok(code$1)}}function tokenizeListEnd(effects){effects.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(effects,ok$2,nok){let self$1=this;return factorySpace(effects,afterPrefix,`listItemPrefixWhitespace`,self$1.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function afterPrefix(code$1){let tail=self$1.events[self$1.events.length-1];return!markdownSpace(code$1)&&tail&&tail[1].type===`listItemPrefixWhitespace`?ok$2(code$1):nok(code$1)}}const setextUnderline={name:`setextUnderline`,resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(events,context$1){let index$1=events.length,content$2,text$5,definition$29;for(;index$1--;)if(events[index$1][0]===`enter`){if(events[index$1][1].type===`content`){content$2=index$1;break}events[index$1][1].type===`paragraph`&&(text$5=index$1)}else events[index$1][1].type===`content`&&events.splice(index$1,1),!definition$29&&events[index$1][1].type===`definition`&&(definition$29=index$1);let heading$1={type:`setextHeading`,start:{...events[text$5][1].start},end:{...events[events.length-1][1].end}};return events[text$5][1].type=`setextHeadingText`,definition$29?(events.splice(text$5,0,[`enter`,heading$1,context$1]),events.splice(definition$29+1,0,[`exit`,events[content$2][1],context$1]),events[content$2][1].end={...events[definition$29][1].end}):events[content$2][1]=heading$1,events.push([`exit`,heading$1,context$1]),events}function tokenizeSetextUnderline(effects,ok$2,nok){let self$1=this,marker;return start;function start(code$1){let index$1=self$1.events.length,paragraph$1;for(;index$1--;)if(self$1.events[index$1][1].type!==`lineEnding`&&self$1.events[index$1][1].type!==`linePrefix`&&self$1.events[index$1][1].type!==`content`){paragraph$1=self$1.events[index$1][1].type===`paragraph`;break}return!self$1.parser.lazy[self$1.now().line]&&(self$1.interrupt||paragraph$1)?(effects.enter(`setextHeadingLine`),marker=code$1,before(code$1)):nok(code$1)}function before(code$1){return effects.enter(`setextHeadingLineSequence`),inside(code$1)}function inside(code$1){return code$1===marker?(effects.consume(code$1),inside):(effects.exit(`setextHeadingLineSequence`),markdownSpace(code$1)?factorySpace(effects,after,`lineSuffix`)(code$1):after(code$1))}function after(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`setextHeadingLine`),ok$2(code$1)):nok(code$1)}}const flow={tokenize:initializeFlow};function initializeFlow(effects){let self$1=this,initial=effects.attempt(blankLine,atBlankEnding,effects.attempt(this.parser.constructs.flowInitial,afterConstruct,factorySpace(effects,effects.attempt(this.parser.constructs.flow,afterConstruct,effects.attempt(content$1,afterConstruct)),`linePrefix`)));return initial;function atBlankEnding(code$1){if(code$1===null){effects.consume(code$1);return}return effects.enter(`lineEndingBlank`),effects.consume(code$1),effects.exit(`lineEndingBlank`),self$1.currentConstruct=void 0,initial}function afterConstruct(code$1){if(code$1===null){effects.consume(code$1);return}return effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),self$1.currentConstruct=void 0,initial}}const resolver={resolveAll:createResolver()},string$2=initializeFactory(`string`),text$2=initializeFactory(`text`);function initializeFactory(field){return{resolveAll:createResolver(field===`text`?resolveAllLineSuffixes:void 0),tokenize:initializeText};function initializeText(effects){let self$1=this,constructs$1=this.parser.constructs[field],text$5=effects.attempt(constructs$1,start,notText);return start;function start(code$1){return atBreak(code$1)?text$5(code$1):notText(code$1)}function notText(code$1){if(code$1===null){effects.consume(code$1);return}return effects.enter(`data`),effects.consume(code$1),data$12}function data$12(code$1){return atBreak(code$1)?(effects.exit(`data`),text$5(code$1)):(effects.consume(code$1),data$12)}function atBreak(code$1){if(code$1===null)return!0;let list$2=constructs$1[code$1],index$1=-1;if(list$2)for(;++index$1attentionMarkers,contentInitial:()=>contentInitial,disable:()=>disable,document:()=>document$2,flow:()=>flow$1,flowInitial:()=>flowInitial,insideSpan:()=>insideSpan,string:()=>string$3,text:()=>text$3});const document$2={42:list$1,43:list$1,45:list$1,48:list$1,49:list$1,50:list$1,51:list$1,52:list$1,53:list$1,54:list$1,55:list$1,56:list$1,57:list$1,62:blockQuote},contentInitial={91:definition},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow$1={35:headingAtx,42:thematicBreak$1,45:[setextUnderline,thematicBreak$1],60:htmlFlow,61:setextUnderline,95:thematicBreak$1,96:codeFenced,126:codeFenced},string$3={38:characterReference,92:characterEscape},text$3={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]};function createTokenizer$1(parser,initialize,from){let point$3={_bufferIndex:-1,_index:0,line:from&&from.line||1,column:from&&from.column||1,offset:from&&from.offset||0},columnStart={},resolveAllConstructs=[],chunks=[],stack$1=[],consumed=!0,effects={attempt:constructFactory(onsuccessfulconstruct),check:constructFactory(onsuccessfulcheck),consume,enter,exit:exit$1,interrupt:constructFactory(onsuccessfulcheck,{interrupt:!0})},context$1={code:null,containerState:{},defineSkip,events:[],now:now$1,parser,previous:null,sliceSerialize,sliceStream,write},state=initialize.tokenize.call(context$1,effects),expectedCode;return initialize.resolveAll&&resolveAllConstructs.push(initialize),context$1;function write(slice){return chunks=push(chunks,slice),main(),chunks[chunks.length-1]===null?(addResult(initialize,0),context$1.events=resolveAll(resolveAllConstructs,context$1.events,context$1),context$1.events):[]}function sliceSerialize(token,expandTabs){return serializeChunks(sliceStream(token),expandTabs)}function sliceStream(token){return sliceChunks(chunks,token)}function now$1(){let{_bufferIndex,_index,line,column,offset:offset$2}=point$3;return{_bufferIndex,_index,line,column,offset:offset$2}}function defineSkip(value$1){columnStart[value$1.line]=value$1.column,accountForPotentialSkip()}function main(){let chunkIndex;for(;point$3._index-1){let head$1=view[0];typeof head$1==`string`?view[0]=head$1.slice(startBufferIndex):view.shift()}endBufferIndex>0&&view.push(chunks[endIndex].slice(0,endBufferIndex))}return view}function serializeChunks(chunks,expandTabs){let index$1=-1,result=[],atTab;for(;++index$1\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function element$2(node$1,index$1,parent,state){let schema=state.schema,omit$1=schema.space===`svg`?!1:state.settings.omitOptionalTags,selfClosing=schema.space===`svg`?state.settings.closeEmptyElements:state.settings.voids.includes(node$1.tagName.toLowerCase()),parts=[],last;schema.space===`html`&&node$1.tagName===`svg`&&(state.schema=svg);let attributes=serializeAttributes(state,node$1.properties),content$2=state.all(schema.space===`html`&&node$1.tagName===`template`?node$1.content:node$1);return state.schema=schema,content$2&&(selfClosing=!1),(attributes||!omit$1||!opening(node$1,index$1,parent))&&(parts.push(`<`,node$1.tagName,attributes?` `+attributes:``),selfClosing&&(schema.space===`svg`||state.settings.closeSelfClosing)&&(last=attributes.charAt(attributes.length-1),(!state.settings.tightSelfClosing||last===`/`||last&&last!==`"`&&last!==`'`)&&parts.push(` `),parts.push(`/`)),parts.push(`>`)),parts.push(content$2),!selfClosing&&(!omit$1||!closing(node$1,index$1,parent))&&parts.push(``),parts.join(``)}function serializeAttributes(state,properties){let values=[],index$1=-1,key$2;if(properties){for(key$2 in properties)if(properties[key$2]!==null&&properties[key$2]!==void 0){let value$1=serializeAttribute(state,key$2,properties[key$2]);value$1&&values.push(value$1)}}for(;++index$1ccount(value$1,state.alternative)&&(quote=state.alternative),result=quote+stringifyEntities(value$1,Object.assign({},state.settings.characterReferences,{subset:(quote===`'`?constants.single:constants.double)[x$1][y],attribute:!0}))+quote),name$2+(result&&`=`+result))}const textEntitySubset=[`<`,`&`];function text$4(node$1,_$1,parent,state){return parent&&parent.type===`element`&&(parent.tagName===`script`||parent.tagName===`style`)?node$1.value:stringifyEntities(node$1.value,Object.assign({},state.settings.characterReferences,{subset:textEntitySubset}))}function raw$1(node$1,index$1,parent,state){return state.settings.allowDangerousHtml?node$1.value:text$4(node$1,index$1,parent,state)}function root$1(node$1,_1,_2,state){return state.all(node$1)}const handle=zwitch(`type`,{invalid,unknown:unknown$1,handlers:{comment:comment$1,doctype:doctype$1,element:element$2,raw:raw$1,root:root$1,text:text$4}});function invalid(node$1){throw Error("Expected node, not `"+node$1+"`")}function unknown$1(node_){let node$1=node_;throw Error("Cannot compile unknown node `"+node$1.type+"`")}const emptyOptions$2={},emptyCharacterReferences={},emptyChildren=[];function toHtml(tree,options$1){let options_=options$1||emptyOptions$2,quote=options_.quote||`"`,alternative=quote===`"`?`'`:`"`;if(quote!==`"`&"e!==`'`)throw Error("Invalid quote `"+quote+"`, expected `'` or `\"`");let state={one:one$2,all:all$2,settings:{omitOptionalTags:options_.omitOptionalTags||!1,allowParseErrors:options_.allowParseErrors||!1,allowDangerousCharacters:options_.allowDangerousCharacters||!1,quoteSmart:options_.quoteSmart||!1,preferUnquoted:options_.preferUnquoted||!1,tightAttributes:options_.tightAttributes||!1,upperDoctype:options_.upperDoctype||!1,tightDoctype:options_.tightDoctype||!1,bogusComments:options_.bogusComments||!1,tightCommaSeparatedLists:options_.tightCommaSeparatedLists||!1,tightSelfClosing:options_.tightSelfClosing||!1,collapseEmptyAttributes:options_.collapseEmptyAttributes||!1,allowDangerousHtml:options_.allowDangerousHtml||!1,voids:options_.voids||htmlVoidElements,characterReferences:options_.characterReferences||emptyCharacterReferences,closeSelfClosing:options_.closeSelfClosing||!1,closeEmptyElements:options_.closeEmptyElements||!1},schema:options_.space===`svg`?svg:html$1,quote,alternative};return state.one(Array.isArray(tree)?{type:`root`,children:tree}:tree,void 0,void 0)}function one$2(node$1,index$1,parent){return handle(node$1,index$1,parent,this)}function all$2(parent){let results=[],children=parent&&parent.children||emptyChildren,index$1=-1;for(;++index$1end?0:end+start:start>end?end:start,remove$3=remove$3>0?remove$3:0,items.length<1e4)parameters=Array.from(items),parameters.unshift(start,remove$3),list$2.splice(...parameters);else for(remove$3&&list$2.splice(start,remove$3);chunkStart0?(splice(list$2,list$2.length,0,items),list$2):items}const hasOwnProperty$1={}.hasOwnProperty;function combineExtensions(extensions){let all$3={},index$1=-1;for(;++index$113&&code$1<32||code$1>126&&code$1<160||code$1>55295&&code$1<57344||code$1>64975&&code$1<65008||(code$1&65535)==65535||(code$1&65535)==65534||code$1>1114111?`�`:String.fromCodePoint(code$1)}function normalizeIdentifier(value$1){return value$1.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}const asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(code$1){return code$1!==null&&(code$1<32||code$1===127)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(code$1){return code$1!==null&&code$1<-2}function markdownLineEndingOrSpace(code$1){return code$1!==null&&(code$1<0||code$1===32)}function markdownSpace(code$1){return code$1===-2||code$1===-1||code$1===32}const unicodePunctuation=regexCheck(/\p{P}|\p{S}/u),unicodeWhitespace=regexCheck(/\s/);function regexCheck(regex){return check$1;function check$1(code$1){return code$1!==null&&code$1>-1&®ex.test(String.fromCharCode(code$1))}}function normalizeUri(value$1){let result=[],index$1=-1,start=0,skip=0;for(;++index$155295&&code$1<57344){let next=value$1.charCodeAt(index$1+1);code$1<56320&&next>56319&&next<57344?(replace=String.fromCharCode(code$1,next),skip=1):replace=`�`}else replace=String.fromCharCode(code$1);replace&&(result.push(value$1.slice(start,index$1),encodeURIComponent(replace)),start=index$1+skip+1,replace=``),skip&&(index$1+=skip,skip=0)}return result.join(``)+value$1.slice(start)}function factorySpace(effects,ok$2,type,max$1){let limit=max$1?max$1-1:1/0,size$2=0;return start;function start(code$1){return markdownSpace(code$1)?(effects.enter(type),prefix(code$1)):ok$2(code$1)}function prefix(code$1){return markdownSpace(code$1)&&size$2++lineStartOffset))return;let indexBeforeExits=self$1.events.length,indexBeforeFlow=indexBeforeExits,seen$1,point$3;for(;indexBeforeFlow--;)if(self$1.events[indexBeforeFlow][0]===`exit`&&self$1.events[indexBeforeFlow][1].type===`chunkFlow`){if(seen$1){point$3=self$1.events[indexBeforeFlow][1].end;break}seen$1=!0}for(exitContainers(continued),index$1=indexBeforeExits;index$1size$2;){let entry=stack$1[index$1];self$1.containerState=entry[1],entry[0].exit.call(self$1,effects)}stack$1.length=size$2}function closeFlow(){childFlow.write([null]),childToken=void 0,childFlow=void 0,self$1.containerState._closeFlow=void 0}}function tokenizeContainer(effects,ok$2,nok){return factorySpace(effects,effects.attempt(this.parser.constructs.document,ok$2,nok),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function classifyCharacter(code$1){if(code$1===null||markdownLineEndingOrSpace(code$1)||unicodeWhitespace(code$1))return 1;if(unicodePunctuation(code$1))return 2}function resolveAll(constructs$1,events,context$1){let called=[],index$1=-1;for(;++index$11&&events[index$1][1].end.offset-events[index$1][1].start.offset>1?2:1;let start={...events[open$1][1].end},end={...events[index$1][1].start};movePoint(start,-use),movePoint(end,use),openingSequence={type:use>1?`strongSequence`:`emphasisSequence`,start,end:{...events[open$1][1].end}},closingSequence={type:use>1?`strongSequence`:`emphasisSequence`,start:{...events[index$1][1].start},end},text$5={type:use>1?`strongText`:`emphasisText`,start:{...events[open$1][1].end},end:{...events[index$1][1].start}},group={type:use>1?`strong`:`emphasis`,start:{...openingSequence.start},end:{...closingSequence.end}},events[open$1][1].end={...openingSequence.start},events[index$1][1].start={...closingSequence.end},nextEvents=[],events[open$1][1].end.offset-events[open$1][1].start.offset&&(nextEvents=push(nextEvents,[[`enter`,events[open$1][1],context$1],[`exit`,events[open$1][1],context$1]])),nextEvents=push(nextEvents,[[`enter`,group,context$1],[`enter`,openingSequence,context$1],[`exit`,openingSequence,context$1],[`enter`,text$5,context$1]]),nextEvents=push(nextEvents,resolveAll(context$1.parser.constructs.insideSpan.null,events.slice(open$1+1,index$1),context$1)),nextEvents=push(nextEvents,[[`exit`,text$5,context$1],[`enter`,closingSequence,context$1],[`exit`,closingSequence,context$1],[`exit`,group,context$1]]),events[index$1][1].end.offset-events[index$1][1].start.offset?(offset$2=2,nextEvents=push(nextEvents,[[`enter`,events[index$1][1],context$1],[`exit`,events[index$1][1],context$1]])):offset$2=0,splice(events,open$1-1,index$1-open$1+3,nextEvents),index$1=open$1+nextEvents.length-offset$2-2;break}}for(index$1=-1;++index$10&&markdownSpace(code$1)?factorySpace(effects,beforeContentChunk,`linePrefix`,initialPrefix+1)(code$1):beforeContentChunk(code$1)}function beforeContentChunk(code$1){return code$1===null||markdownLineEnding(code$1)?effects.check(nonLazyContinuation,atNonLazyBreak,after)(code$1):(effects.enter(`codeFlowValue`),contentChunk(code$1))}function contentChunk(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`codeFlowValue`),beforeContentChunk(code$1)):(effects.consume(code$1),contentChunk)}function after(code$1){return effects.exit(`codeFenced`),ok$2(code$1)}function tokenizeCloseStart(effects$1,ok$3,nok$1){let size$2=0;return startBefore;function startBefore(code$1){return effects$1.enter(`lineEnding`),effects$1.consume(code$1),effects$1.exit(`lineEnding`),start$1}function start$1(code$1){return effects$1.enter(`codeFencedFence`),markdownSpace(code$1)?factorySpace(effects$1,beforeSequenceClose,`linePrefix`,self$1.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(code$1):beforeSequenceClose(code$1)}function beforeSequenceClose(code$1){return code$1===marker?(effects$1.enter(`codeFencedFenceSequence`),sequenceClose(code$1)):nok$1(code$1)}function sequenceClose(code$1){return code$1===marker?(size$2++,effects$1.consume(code$1),sequenceClose):size$2>=sizeOpen?(effects$1.exit(`codeFencedFenceSequence`),markdownSpace(code$1)?factorySpace(effects$1,sequenceCloseAfter,`whitespace`)(code$1):sequenceCloseAfter(code$1)):nok$1(code$1)}function sequenceCloseAfter(code$1){return code$1===null||markdownLineEnding(code$1)?(effects$1.exit(`codeFencedFence`),ok$3(code$1)):nok$1(code$1)}}}function tokenizeNonLazyContinuation(effects,ok$2,nok){let self$1=this;return start;function start(code$1){return code$1===null?nok(code$1):(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),lineStart)}function lineStart(code$1){return self$1.parser.lazy[self$1.now().line]?nok(code$1):ok$2(code$1)}}const codeIndented={name:`codeIndented`,tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(effects,ok$2,nok){let self$1=this;return start;function start(code$1){return effects.enter(`codeIndented`),factorySpace(effects,afterPrefix,`linePrefix`,5)(code$1)}function afterPrefix(code$1){let tail=self$1.events[self$1.events.length-1];return tail&&tail[1].type===`linePrefix`&&tail[2].sliceSerialize(tail[1],!0).length>=4?atBreak(code$1):nok(code$1)}function atBreak(code$1){return code$1===null?after(code$1):markdownLineEnding(code$1)?effects.attempt(furtherStart,atBreak,after)(code$1):(effects.enter(`codeFlowValue`),inside(code$1))}function inside(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`codeFlowValue`),atBreak(code$1)):(effects.consume(code$1),inside)}function after(code$1){return effects.exit(`codeIndented`),ok$2(code$1)}}function tokenizeFurtherStart(effects,ok$2,nok){let self$1=this;return furtherStart$1;function furtherStart$1(code$1){return self$1.parser.lazy[self$1.now().line]?nok(code$1):markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),furtherStart$1):factorySpace(effects,afterPrefix,`linePrefix`,5)(code$1)}function afterPrefix(code$1){let tail=self$1.events[self$1.events.length-1];return tail&&tail[1].type===`linePrefix`&&tail[2].sliceSerialize(tail[1],!0).length>=4?ok$2(code$1):markdownLineEnding(code$1)?furtherStart$1(code$1):nok(code$1)}}const codeText={name:`codeText`,previous,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(events){let tailExitIndex=events.length-4,headEnterIndex=3,index$1,enter;if((events[headEnterIndex][1].type===`lineEnding`||events[headEnterIndex][1].type===`space`)&&(events[tailExitIndex][1].type===`lineEnding`||events[tailExitIndex][1].type===`space`)){for(index$1=headEnterIndex;++index$1=this.left.length+this.right.length)throw RangeError("Cannot access index `"+index$1+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return index$1this.left.length)return this.right.slice(this.right.length-stop$1+this.left.length,this.right.length-start+this.left.length).reverse();let list$2=this.left.slice(start);return list$2.push(...this.right.slice(this.right.length-stop$1+this.left.length).reverse()),list$2}splice(start,deleteCount,items){let count$2=deleteCount||0;this.setCursor(Math.trunc(start));let removed=this.right.splice(this.right.length-count$2,1/0);return items&&chunkedPush(this.left,items),removed.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(item){this.setCursor(1/0),this.left.push(item)}pushMany(items){this.setCursor(1/0),chunkedPush(this.left,items)}unshift(item){this.setCursor(0),this.right.push(item)}unshiftMany(items){this.setCursor(0),chunkedPush(this.right,items.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?ok$2(code$1):effects.interrupt(self$1.parser.constructs.flow,nok,ok$2)(code$1)}}function factoryDestination(effects,ok$2,nok,type,literalType,literalMarkerType,rawType,stringType,max$1){let limit=max$1||1/0,balance=0;return start;function start(code$1){return code$1===60?(effects.enter(type),effects.enter(literalType),effects.enter(literalMarkerType),effects.consume(code$1),effects.exit(literalMarkerType),enclosedBefore):code$1===null||code$1===32||code$1===41||asciiControl(code$1)?nok(code$1):(effects.enter(type),effects.enter(rawType),effects.enter(stringType),effects.enter(`chunkString`,{contentType:`string`}),raw$3(code$1))}function enclosedBefore(code$1){return code$1===62?(effects.enter(literalMarkerType),effects.consume(code$1),effects.exit(literalMarkerType),effects.exit(literalType),effects.exit(type),ok$2):(effects.enter(stringType),effects.enter(`chunkString`,{contentType:`string`}),enclosed(code$1))}function enclosed(code$1){return code$1===62?(effects.exit(`chunkString`),effects.exit(stringType),enclosedBefore(code$1)):code$1===null||code$1===60||markdownLineEnding(code$1)?nok(code$1):(effects.consume(code$1),code$1===92?enclosedEscape:enclosed)}function enclosedEscape(code$1){return code$1===60||code$1===62||code$1===92?(effects.consume(code$1),enclosed):enclosed(code$1)}function raw$3(code$1){return!balance&&(code$1===null||code$1===41||markdownLineEndingOrSpace(code$1))?(effects.exit(`chunkString`),effects.exit(stringType),effects.exit(rawType),effects.exit(type),ok$2(code$1)):balance999||code$1===null||code$1===91||code$1===93&&!seen$1||code$1===94&&!size$2&&`_hiddenFootnoteSupport`in self$1.parser.constructs?nok(code$1):code$1===93?(effects.exit(stringType),effects.enter(markerType),effects.consume(code$1),effects.exit(markerType),effects.exit(type),ok$2):markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),atBreak):(effects.enter(`chunkString`,{contentType:`string`}),labelInside(code$1))}function labelInside(code$1){return code$1===null||code$1===91||code$1===93||markdownLineEnding(code$1)||size$2++>999?(effects.exit(`chunkString`),atBreak(code$1)):(effects.consume(code$1),seen$1||=!markdownSpace(code$1),code$1===92?labelEscape:labelInside)}function labelEscape(code$1){return code$1===91||code$1===92||code$1===93?(effects.consume(code$1),size$2++,labelInside):labelInside(code$1)}}function factoryTitle(effects,ok$2,nok,type,markerType,stringType){let marker;return start;function start(code$1){return code$1===34||code$1===39||code$1===40?(effects.enter(type),effects.enter(markerType),effects.consume(code$1),effects.exit(markerType),marker=code$1===40?41:code$1,begin):nok(code$1)}function begin(code$1){return code$1===marker?(effects.enter(markerType),effects.consume(code$1),effects.exit(markerType),effects.exit(type),ok$2):(effects.enter(stringType),atBreak(code$1))}function atBreak(code$1){return code$1===marker?(effects.exit(stringType),begin(marker)):code$1===null?nok(code$1):markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),factorySpace(effects,atBreak,`linePrefix`)):(effects.enter(`chunkString`,{contentType:`string`}),inside(code$1))}function inside(code$1){return code$1===marker||code$1===null||markdownLineEnding(code$1)?(effects.exit(`chunkString`),atBreak(code$1)):(effects.consume(code$1),code$1===92?escape$1:inside)}function escape$1(code$1){return code$1===marker||code$1===92?(effects.consume(code$1),inside):inside(code$1)}}function factoryWhitespace(effects,ok$2){let seen$1;return start;function start(code$1){return markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),seen$1=!0,start):markdownSpace(code$1)?factorySpace(effects,start,seen$1?`linePrefix`:`lineSuffix`)(code$1):ok$2(code$1)}}const definition={name:`definition`,tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(effects,ok$2,nok){let self$1=this,identifier;return start;function start(code$1){return effects.enter(`definition`),before(code$1)}function before(code$1){return factoryLabel.call(self$1,effects,labelAfter,nok,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(code$1)}function labelAfter(code$1){return identifier=normalizeIdentifier(self$1.sliceSerialize(self$1.events[self$1.events.length-1][1]).slice(1,-1)),code$1===58?(effects.enter(`definitionMarker`),effects.consume(code$1),effects.exit(`definitionMarker`),markerAfter):nok(code$1)}function markerAfter(code$1){return markdownLineEndingOrSpace(code$1)?factoryWhitespace(effects,destinationBefore)(code$1):destinationBefore(code$1)}function destinationBefore(code$1){return factoryDestination(effects,destinationAfter,nok,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(code$1)}function destinationAfter(code$1){return effects.attempt(titleBefore,after,after)(code$1)}function after(code$1){return markdownSpace(code$1)?factorySpace(effects,afterWhitespace,`whitespace`)(code$1):afterWhitespace(code$1)}function afterWhitespace(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`definition`),self$1.parser.defined.push(identifier),ok$2(code$1)):nok(code$1)}}function tokenizeTitleBefore(effects,ok$2,nok){return titleBefore$1;function titleBefore$1(code$1){return markdownLineEndingOrSpace(code$1)?factoryWhitespace(effects,beforeMarker)(code$1):nok(code$1)}function beforeMarker(code$1){return factoryTitle(effects,titleAfter,nok,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(code$1)}function titleAfter(code$1){return markdownSpace(code$1)?factorySpace(effects,titleAfterOptionalWhitespace,`whitespace`)(code$1):titleAfterOptionalWhitespace(code$1)}function titleAfterOptionalWhitespace(code$1){return code$1===null||markdownLineEnding(code$1)?ok$2(code$1):nok(code$1)}}const hardBreakEscape={name:`hardBreakEscape`,tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(effects,ok$2,nok){return start;function start(code$1){return effects.enter(`hardBreakEscape`),effects.consume(code$1),after}function after(code$1){return markdownLineEnding(code$1)?(effects.exit(`hardBreakEscape`),ok$2(code$1)):nok(code$1)}}const headingAtx={name:`headingAtx`,resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(events,context$1){let contentEnd=events.length-2,contentStart=3,content$2,text$5;return events[contentStart][1].type===`whitespace`&&(contentStart+=2),contentEnd-2>contentStart&&events[contentEnd][1].type===`whitespace`&&(contentEnd-=2),events[contentEnd][1].type===`atxHeadingSequence`&&(contentStart===contentEnd-1||contentEnd-4>contentStart&&events[contentEnd-2][1].type===`whitespace`)&&(contentEnd-=contentStart+1===contentEnd?2:4),contentEnd>contentStart&&(content$2={type:`atxHeadingText`,start:events[contentStart][1].start,end:events[contentEnd][1].end},text$5={type:`chunkText`,start:events[contentStart][1].start,end:events[contentEnd][1].end,contentType:`text`},splice(events,contentStart,contentEnd-contentStart+1,[[`enter`,content$2,context$1],[`enter`,text$5,context$1],[`exit`,text$5,context$1],[`exit`,content$2,context$1]])),events}function tokenizeHeadingAtx(effects,ok$2,nok){let size$2=0;return start;function start(code$1){return effects.enter(`atxHeading`),before(code$1)}function before(code$1){return effects.enter(`atxHeadingSequence`),sequenceOpen(code$1)}function sequenceOpen(code$1){return code$1===35&&size$2++<6?(effects.consume(code$1),sequenceOpen):code$1===null||markdownLineEndingOrSpace(code$1)?(effects.exit(`atxHeadingSequence`),atBreak(code$1)):nok(code$1)}function atBreak(code$1){return code$1===35?(effects.enter(`atxHeadingSequence`),sequenceFurther(code$1)):code$1===null||markdownLineEnding(code$1)?(effects.exit(`atxHeading`),ok$2(code$1)):markdownSpace(code$1)?factorySpace(effects,atBreak,`whitespace`)(code$1):(effects.enter(`atxHeadingText`),data$12(code$1))}function sequenceFurther(code$1){return code$1===35?(effects.consume(code$1),sequenceFurther):(effects.exit(`atxHeadingSequence`),atBreak(code$1))}function data$12(code$1){return code$1===null||code$1===35||markdownLineEndingOrSpace(code$1)?(effects.exit(`atxHeadingText`),atBreak(code$1)):(effects.consume(code$1),data$12)}}const htmlBlockNames=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),htmlRawNames=[`pre`,`script`,`style`,`textarea`],htmlFlow={concrete:!0,name:`htmlFlow`,resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(events){let index$1=events.length;for(;index$1--&&!(events[index$1][0]===`enter`&&events[index$1][1].type===`htmlFlow`););return index$1>1&&events[index$1-2][1].type===`linePrefix`&&(events[index$1][1].start=events[index$1-2][1].start,events[index$1+1][1].start=events[index$1-2][1].start,events.splice(index$1-2,2)),events}function tokenizeHtmlFlow(effects,ok$2,nok){let self$1=this,marker,closingTag,buffer$1,index$1,markerB;return start;function start(code$1){return before(code$1)}function before(code$1){return effects.enter(`htmlFlow`),effects.enter(`htmlFlowData`),effects.consume(code$1),open$1}function open$1(code$1){return code$1===33?(effects.consume(code$1),declarationOpen):code$1===47?(effects.consume(code$1),closingTag=!0,tagCloseStart):code$1===63?(effects.consume(code$1),marker=3,self$1.interrupt?ok$2:continuationDeclarationInside):asciiAlpha(code$1)?(effects.consume(code$1),buffer$1=String.fromCharCode(code$1),tagName):nok(code$1)}function declarationOpen(code$1){return code$1===45?(effects.consume(code$1),marker=2,commentOpenInside):code$1===91?(effects.consume(code$1),marker=5,index$1=0,cdataOpenInside):asciiAlpha(code$1)?(effects.consume(code$1),marker=4,self$1.interrupt?ok$2:continuationDeclarationInside):nok(code$1)}function commentOpenInside(code$1){return code$1===45?(effects.consume(code$1),self$1.interrupt?ok$2:continuationDeclarationInside):nok(code$1)}function cdataOpenInside(code$1){let value$1=`CDATA[`;return code$1===value$1.charCodeAt(index$1++)?(effects.consume(code$1),index$1===6?self$1.interrupt?ok$2:continuation:cdataOpenInside):nok(code$1)}function tagCloseStart(code$1){return asciiAlpha(code$1)?(effects.consume(code$1),buffer$1=String.fromCharCode(code$1),tagName):nok(code$1)}function tagName(code$1){if(code$1===null||code$1===47||code$1===62||markdownLineEndingOrSpace(code$1)){let slash=code$1===47,name$2=buffer$1.toLowerCase();return!slash&&!closingTag&&htmlRawNames.includes(name$2)?(marker=1,self$1.interrupt?ok$2(code$1):continuation(code$1)):htmlBlockNames.includes(buffer$1.toLowerCase())?(marker=6,slash?(effects.consume(code$1),basicSelfClosing):self$1.interrupt?ok$2(code$1):continuation(code$1)):(marker=7,self$1.interrupt&&!self$1.parser.lazy[self$1.now().line]?nok(code$1):closingTag?completeClosingTagAfter(code$1):completeAttributeNameBefore(code$1))}return code$1===45||asciiAlphanumeric(code$1)?(effects.consume(code$1),buffer$1+=String.fromCharCode(code$1),tagName):nok(code$1)}function basicSelfClosing(code$1){return code$1===62?(effects.consume(code$1),self$1.interrupt?ok$2:continuation):nok(code$1)}function completeClosingTagAfter(code$1){return markdownSpace(code$1)?(effects.consume(code$1),completeClosingTagAfter):completeEnd(code$1)}function completeAttributeNameBefore(code$1){return code$1===47?(effects.consume(code$1),completeEnd):code$1===58||code$1===95||asciiAlpha(code$1)?(effects.consume(code$1),completeAttributeName):markdownSpace(code$1)?(effects.consume(code$1),completeAttributeNameBefore):completeEnd(code$1)}function completeAttributeName(code$1){return code$1===45||code$1===46||code$1===58||code$1===95||asciiAlphanumeric(code$1)?(effects.consume(code$1),completeAttributeName):completeAttributeNameAfter(code$1)}function completeAttributeNameAfter(code$1){return code$1===61?(effects.consume(code$1),completeAttributeValueBefore):markdownSpace(code$1)?(effects.consume(code$1),completeAttributeNameAfter):completeAttributeNameBefore(code$1)}function completeAttributeValueBefore(code$1){return code$1===null||code$1===60||code$1===61||code$1===62||code$1===96?nok(code$1):code$1===34||code$1===39?(effects.consume(code$1),markerB=code$1,completeAttributeValueQuoted):markdownSpace(code$1)?(effects.consume(code$1),completeAttributeValueBefore):completeAttributeValueUnquoted(code$1)}function completeAttributeValueQuoted(code$1){return code$1===markerB?(effects.consume(code$1),markerB=null,completeAttributeValueQuotedAfter):code$1===null||markdownLineEnding(code$1)?nok(code$1):(effects.consume(code$1),completeAttributeValueQuoted)}function completeAttributeValueUnquoted(code$1){return code$1===null||code$1===34||code$1===39||code$1===47||code$1===60||code$1===61||code$1===62||code$1===96||markdownLineEndingOrSpace(code$1)?completeAttributeNameAfter(code$1):(effects.consume(code$1),completeAttributeValueUnquoted)}function completeAttributeValueQuotedAfter(code$1){return code$1===47||code$1===62||markdownSpace(code$1)?completeAttributeNameBefore(code$1):nok(code$1)}function completeEnd(code$1){return code$1===62?(effects.consume(code$1),completeAfter):nok(code$1)}function completeAfter(code$1){return code$1===null||markdownLineEnding(code$1)?continuation(code$1):markdownSpace(code$1)?(effects.consume(code$1),completeAfter):nok(code$1)}function continuation(code$1){return code$1===45&&marker===2?(effects.consume(code$1),continuationCommentInside):code$1===60&&marker===1?(effects.consume(code$1),continuationRawTagOpen):code$1===62&&marker===4?(effects.consume(code$1),continuationClose):code$1===63&&marker===3?(effects.consume(code$1),continuationDeclarationInside):code$1===93&&marker===5?(effects.consume(code$1),continuationCdataInside):markdownLineEnding(code$1)&&(marker===6||marker===7)?(effects.exit(`htmlFlowData`),effects.check(blankLineBefore,continuationAfter,continuationStart)(code$1)):code$1===null||markdownLineEnding(code$1)?(effects.exit(`htmlFlowData`),continuationStart(code$1)):(effects.consume(code$1),continuation)}function continuationStart(code$1){return effects.check(nonLazyContinuationStart,continuationStartNonLazy,continuationAfter)(code$1)}function continuationStartNonLazy(code$1){return effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),continuationBefore}function continuationBefore(code$1){return code$1===null||markdownLineEnding(code$1)?continuationStart(code$1):(effects.enter(`htmlFlowData`),continuation(code$1))}function continuationCommentInside(code$1){return code$1===45?(effects.consume(code$1),continuationDeclarationInside):continuation(code$1)}function continuationRawTagOpen(code$1){return code$1===47?(effects.consume(code$1),buffer$1=``,continuationRawEndTag):continuation(code$1)}function continuationRawEndTag(code$1){if(code$1===62){let name$2=buffer$1.toLowerCase();return htmlRawNames.includes(name$2)?(effects.consume(code$1),continuationClose):continuation(code$1)}return asciiAlpha(code$1)&&buffer$1.length<8?(effects.consume(code$1),buffer$1+=String.fromCharCode(code$1),continuationRawEndTag):continuation(code$1)}function continuationCdataInside(code$1){return code$1===93?(effects.consume(code$1),continuationDeclarationInside):continuation(code$1)}function continuationDeclarationInside(code$1){return code$1===62?(effects.consume(code$1),continuationClose):code$1===45&&marker===2?(effects.consume(code$1),continuationDeclarationInside):continuation(code$1)}function continuationClose(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`htmlFlowData`),continuationAfter(code$1)):(effects.consume(code$1),continuationClose)}function continuationAfter(code$1){return effects.exit(`htmlFlow`),ok$2(code$1)}}function tokenizeNonLazyContinuationStart(effects,ok$2,nok){let self$1=this;return start;function start(code$1){return markdownLineEnding(code$1)?(effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),after):nok(code$1)}function after(code$1){return self$1.parser.lazy[self$1.now().line]?nok(code$1):ok$2(code$1)}}function tokenizeBlankLineBefore(effects,ok$2,nok){return start;function start(code$1){return effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),effects.attempt(blankLine,ok$2,nok)}}const htmlText={name:`htmlText`,tokenize:tokenizeHtmlText};function tokenizeHtmlText(effects,ok$2,nok){let self$1=this,marker,index$1,returnState;return start;function start(code$1){return effects.enter(`htmlText`),effects.enter(`htmlTextData`),effects.consume(code$1),open$1}function open$1(code$1){return code$1===33?(effects.consume(code$1),declarationOpen):code$1===47?(effects.consume(code$1),tagCloseStart):code$1===63?(effects.consume(code$1),instruction$1):asciiAlpha(code$1)?(effects.consume(code$1),tagOpen):nok(code$1)}function declarationOpen(code$1){return code$1===45?(effects.consume(code$1),commentOpenInside):code$1===91?(effects.consume(code$1),index$1=0,cdataOpenInside):asciiAlpha(code$1)?(effects.consume(code$1),declaration):nok(code$1)}function commentOpenInside(code$1){return code$1===45?(effects.consume(code$1),commentEnd):nok(code$1)}function comment$2(code$1){return code$1===null?nok(code$1):code$1===45?(effects.consume(code$1),commentClose):markdownLineEnding(code$1)?(returnState=comment$2,lineEndingBefore(code$1)):(effects.consume(code$1),comment$2)}function commentClose(code$1){return code$1===45?(effects.consume(code$1),commentEnd):comment$2(code$1)}function commentEnd(code$1){return code$1===62?end(code$1):code$1===45?commentClose(code$1):comment$2(code$1)}function cdataOpenInside(code$1){let value$1=`CDATA[`;return code$1===value$1.charCodeAt(index$1++)?(effects.consume(code$1),index$1===6?cdata$1:cdataOpenInside):nok(code$1)}function cdata$1(code$1){return code$1===null?nok(code$1):code$1===93?(effects.consume(code$1),cdataClose):markdownLineEnding(code$1)?(returnState=cdata$1,lineEndingBefore(code$1)):(effects.consume(code$1),cdata$1)}function cdataClose(code$1){return code$1===93?(effects.consume(code$1),cdataEnd):cdata$1(code$1)}function cdataEnd(code$1){return code$1===62?end(code$1):code$1===93?(effects.consume(code$1),cdataEnd):cdata$1(code$1)}function declaration(code$1){return code$1===null||code$1===62?end(code$1):markdownLineEnding(code$1)?(returnState=declaration,lineEndingBefore(code$1)):(effects.consume(code$1),declaration)}function instruction$1(code$1){return code$1===null?nok(code$1):code$1===63?(effects.consume(code$1),instructionClose):markdownLineEnding(code$1)?(returnState=instruction$1,lineEndingBefore(code$1)):(effects.consume(code$1),instruction$1)}function instructionClose(code$1){return code$1===62?end(code$1):instruction$1(code$1)}function tagCloseStart(code$1){return asciiAlpha(code$1)?(effects.consume(code$1),tagClose):nok(code$1)}function tagClose(code$1){return code$1===45||asciiAlphanumeric(code$1)?(effects.consume(code$1),tagClose):tagCloseBetween(code$1)}function tagCloseBetween(code$1){return markdownLineEnding(code$1)?(returnState=tagCloseBetween,lineEndingBefore(code$1)):markdownSpace(code$1)?(effects.consume(code$1),tagCloseBetween):end(code$1)}function tagOpen(code$1){return code$1===45||asciiAlphanumeric(code$1)?(effects.consume(code$1),tagOpen):code$1===47||code$1===62||markdownLineEndingOrSpace(code$1)?tagOpenBetween(code$1):nok(code$1)}function tagOpenBetween(code$1){return code$1===47?(effects.consume(code$1),end):code$1===58||code$1===95||asciiAlpha(code$1)?(effects.consume(code$1),tagOpenAttributeName):markdownLineEnding(code$1)?(returnState=tagOpenBetween,lineEndingBefore(code$1)):markdownSpace(code$1)?(effects.consume(code$1),tagOpenBetween):end(code$1)}function tagOpenAttributeName(code$1){return code$1===45||code$1===46||code$1===58||code$1===95||asciiAlphanumeric(code$1)?(effects.consume(code$1),tagOpenAttributeName):tagOpenAttributeNameAfter(code$1)}function tagOpenAttributeNameAfter(code$1){return code$1===61?(effects.consume(code$1),tagOpenAttributeValueBefore):markdownLineEnding(code$1)?(returnState=tagOpenAttributeNameAfter,lineEndingBefore(code$1)):markdownSpace(code$1)?(effects.consume(code$1),tagOpenAttributeNameAfter):tagOpenBetween(code$1)}function tagOpenAttributeValueBefore(code$1){return code$1===null||code$1===60||code$1===61||code$1===62||code$1===96?nok(code$1):code$1===34||code$1===39?(effects.consume(code$1),marker=code$1,tagOpenAttributeValueQuoted):markdownLineEnding(code$1)?(returnState=tagOpenAttributeValueBefore,lineEndingBefore(code$1)):markdownSpace(code$1)?(effects.consume(code$1),tagOpenAttributeValueBefore):(effects.consume(code$1),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuoted(code$1){return code$1===marker?(effects.consume(code$1),marker=void 0,tagOpenAttributeValueQuotedAfter):code$1===null?nok(code$1):markdownLineEnding(code$1)?(returnState=tagOpenAttributeValueQuoted,lineEndingBefore(code$1)):(effects.consume(code$1),tagOpenAttributeValueQuoted)}function tagOpenAttributeValueUnquoted(code$1){return code$1===null||code$1===34||code$1===39||code$1===60||code$1===61||code$1===96?nok(code$1):code$1===47||code$1===62||markdownLineEndingOrSpace(code$1)?tagOpenBetween(code$1):(effects.consume(code$1),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuotedAfter(code$1){return code$1===47||code$1===62||markdownLineEndingOrSpace(code$1)?tagOpenBetween(code$1):nok(code$1)}function end(code$1){return code$1===62?(effects.consume(code$1),effects.exit(`htmlTextData`),effects.exit(`htmlText`),ok$2):nok(code$1)}function lineEndingBefore(code$1){return effects.exit(`htmlTextData`),effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),lineEndingAfter}function lineEndingAfter(code$1){return markdownSpace(code$1)?factorySpace(effects,lineEndingAfterPrefix,`linePrefix`,self$1.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(code$1):lineEndingAfterPrefix(code$1)}function lineEndingAfterPrefix(code$1){return effects.enter(`htmlTextData`),returnState(code$1)}}const labelEnd={name:`labelEnd`,resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(events){let index$1=-1,newEvents=[];for(;++index$1=3&&(code$1===null||markdownLineEnding(code$1))?(effects.exit(`thematicBreak`),ok$2(code$1)):nok(code$1)}function sequence(code$1){return code$1===marker?(effects.consume(code$1),size$2++,sequence):(effects.exit(`thematicBreakSequence`),markdownSpace(code$1)?factorySpace(effects,atBreak,`whitespace`)(code$1):atBreak(code$1))}}const list$1={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:`list`,tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent};function tokenizeListStart(effects,ok$2,nok){let self$1=this,tail=self$1.events[self$1.events.length-1],initialSize=tail&&tail[1].type===`linePrefix`?tail[2].sliceSerialize(tail[1],!0).length:0,size$2=0;return start;function start(code$1){let kind=self$1.containerState.type||(code$1===42||code$1===43||code$1===45?`listUnordered`:`listOrdered`);if(kind===`listUnordered`?!self$1.containerState.marker||code$1===self$1.containerState.marker:asciiDigit(code$1)){if(self$1.containerState.type||(self$1.containerState.type=kind,effects.enter(kind,{_container:!0})),kind===`listUnordered`)return effects.enter(`listItemPrefix`),code$1===42||code$1===45?effects.check(thematicBreak$1,nok,atMarker)(code$1):atMarker(code$1);if(!self$1.interrupt||code$1===49)return effects.enter(`listItemPrefix`),effects.enter(`listItemValue`),inside(code$1)}return nok(code$1)}function inside(code$1){return asciiDigit(code$1)&&++size$2<10?(effects.consume(code$1),inside):(!self$1.interrupt||size$2<2)&&(self$1.containerState.marker?code$1===self$1.containerState.marker:code$1===41||code$1===46)?(effects.exit(`listItemValue`),atMarker(code$1)):nok(code$1)}function atMarker(code$1){return effects.enter(`listItemMarker`),effects.consume(code$1),effects.exit(`listItemMarker`),self$1.containerState.marker=self$1.containerState.marker||code$1,effects.check(blankLine,self$1.interrupt?nok:onBlank,effects.attempt(listItemPrefixWhitespaceConstruct,endOfPrefix,otherPrefix))}function onBlank(code$1){return self$1.containerState.initialBlankLine=!0,initialSize++,endOfPrefix(code$1)}function otherPrefix(code$1){return markdownSpace(code$1)?(effects.enter(`listItemPrefixWhitespace`),effects.consume(code$1),effects.exit(`listItemPrefixWhitespace`),endOfPrefix):nok(code$1)}function endOfPrefix(code$1){return self$1.containerState.size=initialSize+self$1.sliceSerialize(effects.exit(`listItemPrefix`),!0).length,ok$2(code$1)}}function tokenizeListContinuation(effects,ok$2,nok){let self$1=this;return self$1.containerState._closeFlow=void 0,effects.check(blankLine,onBlank,notBlank);function onBlank(code$1){return self$1.containerState.furtherBlankLines=self$1.containerState.furtherBlankLines||self$1.containerState.initialBlankLine,factorySpace(effects,ok$2,`listItemIndent`,self$1.containerState.size+1)(code$1)}function notBlank(code$1){return self$1.containerState.furtherBlankLines||!markdownSpace(code$1)?(self$1.containerState.furtherBlankLines=void 0,self$1.containerState.initialBlankLine=void 0,notInCurrentItem(code$1)):(self$1.containerState.furtherBlankLines=void 0,self$1.containerState.initialBlankLine=void 0,effects.attempt(indentConstruct,ok$2,notInCurrentItem)(code$1))}function notInCurrentItem(code$1){return self$1.containerState._closeFlow=!0,self$1.interrupt=void 0,factorySpace(effects,effects.attempt(list$1,ok$2,nok),`linePrefix`,self$1.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(code$1)}}function tokenizeIndent(effects,ok$2,nok){let self$1=this;return factorySpace(effects,afterPrefix,`listItemIndent`,self$1.containerState.size+1);function afterPrefix(code$1){let tail=self$1.events[self$1.events.length-1];return tail&&tail[1].type===`listItemIndent`&&tail[2].sliceSerialize(tail[1],!0).length===self$1.containerState.size?ok$2(code$1):nok(code$1)}}function tokenizeListEnd(effects){effects.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(effects,ok$2,nok){let self$1=this;return factorySpace(effects,afterPrefix,`listItemPrefixWhitespace`,self$1.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function afterPrefix(code$1){let tail=self$1.events[self$1.events.length-1];return!markdownSpace(code$1)&&tail&&tail[1].type===`listItemPrefixWhitespace`?ok$2(code$1):nok(code$1)}}const setextUnderline={name:`setextUnderline`,resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(events,context$1){let index$1=events.length,content$2,text$5,definition$29;for(;index$1--;)if(events[index$1][0]===`enter`){if(events[index$1][1].type===`content`){content$2=index$1;break}events[index$1][1].type===`paragraph`&&(text$5=index$1)}else events[index$1][1].type===`content`&&events.splice(index$1,1),!definition$29&&events[index$1][1].type===`definition`&&(definition$29=index$1);let heading$1={type:`setextHeading`,start:{...events[text$5][1].start},end:{...events[events.length-1][1].end}};return events[text$5][1].type=`setextHeadingText`,definition$29?(events.splice(text$5,0,[`enter`,heading$1,context$1]),events.splice(definition$29+1,0,[`exit`,events[content$2][1],context$1]),events[content$2][1].end={...events[definition$29][1].end}):events[content$2][1]=heading$1,events.push([`exit`,heading$1,context$1]),events}function tokenizeSetextUnderline(effects,ok$2,nok){let self$1=this,marker;return start;function start(code$1){let index$1=self$1.events.length,paragraph$1;for(;index$1--;)if(self$1.events[index$1][1].type!==`lineEnding`&&self$1.events[index$1][1].type!==`linePrefix`&&self$1.events[index$1][1].type!==`content`){paragraph$1=self$1.events[index$1][1].type===`paragraph`;break}return!self$1.parser.lazy[self$1.now().line]&&(self$1.interrupt||paragraph$1)?(effects.enter(`setextHeadingLine`),marker=code$1,before(code$1)):nok(code$1)}function before(code$1){return effects.enter(`setextHeadingLineSequence`),inside(code$1)}function inside(code$1){return code$1===marker?(effects.consume(code$1),inside):(effects.exit(`setextHeadingLineSequence`),markdownSpace(code$1)?factorySpace(effects,after,`lineSuffix`)(code$1):after(code$1))}function after(code$1){return code$1===null||markdownLineEnding(code$1)?(effects.exit(`setextHeadingLine`),ok$2(code$1)):nok(code$1)}}const flow={tokenize:initializeFlow};function initializeFlow(effects){let self$1=this,initial=effects.attempt(blankLine,atBlankEnding,effects.attempt(this.parser.constructs.flowInitial,afterConstruct,factorySpace(effects,effects.attempt(this.parser.constructs.flow,afterConstruct,effects.attempt(content$1,afterConstruct)),`linePrefix`)));return initial;function atBlankEnding(code$1){if(code$1===null){effects.consume(code$1);return}return effects.enter(`lineEndingBlank`),effects.consume(code$1),effects.exit(`lineEndingBlank`),self$1.currentConstruct=void 0,initial}function afterConstruct(code$1){if(code$1===null){effects.consume(code$1);return}return effects.enter(`lineEnding`),effects.consume(code$1),effects.exit(`lineEnding`),self$1.currentConstruct=void 0,initial}}const resolver={resolveAll:createResolver()},string$2=initializeFactory(`string`),text$2=initializeFactory(`text`);function initializeFactory(field){return{resolveAll:createResolver(field===`text`?resolveAllLineSuffixes:void 0),tokenize:initializeText};function initializeText(effects){let self$1=this,constructs$1=this.parser.constructs[field],text$5=effects.attempt(constructs$1,start,notText);return start;function start(code$1){return atBreak(code$1)?text$5(code$1):notText(code$1)}function notText(code$1){if(code$1===null){effects.consume(code$1);return}return effects.enter(`data`),effects.consume(code$1),data$12}function data$12(code$1){return atBreak(code$1)?(effects.exit(`data`),text$5(code$1)):(effects.consume(code$1),data$12)}function atBreak(code$1){if(code$1===null)return!0;let list$2=constructs$1[code$1],index$1=-1;if(list$2)for(;++index$1attentionMarkers,contentInitial:()=>contentInitial,disable:()=>disable,document:()=>document$2,flow:()=>flow$1,flowInitial:()=>flowInitial,insideSpan:()=>insideSpan,string:()=>string$3,text:()=>text$3});const document$2={42:list$1,43:list$1,45:list$1,48:list$1,49:list$1,50:list$1,51:list$1,52:list$1,53:list$1,54:list$1,55:list$1,56:list$1,57:list$1,62:blockQuote},contentInitial={91:definition},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow$1={35:headingAtx,42:thematicBreak$1,45:[setextUnderline,thematicBreak$1],60:htmlFlow,61:setextUnderline,95:thematicBreak$1,96:codeFenced,126:codeFenced},string$3={38:characterReference,92:characterEscape},text$3={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]};function createTokenizer$1(parser,initialize,from){let point$3={_bufferIndex:-1,_index:0,line:from&&from.line||1,column:from&&from.column||1,offset:from&&from.offset||0},columnStart={},resolveAllConstructs=[],chunks=[],stack$1=[],consumed=!0,effects={attempt:constructFactory(onsuccessfulconstruct),check:constructFactory(onsuccessfulcheck),consume,enter,exit:exit$1,interrupt:constructFactory(onsuccessfulcheck,{interrupt:!0})},context$1={code:null,containerState:{},defineSkip,events:[],now:now$1,parser,previous:null,sliceSerialize,sliceStream,write},state=initialize.tokenize.call(context$1,effects),expectedCode;return initialize.resolveAll&&resolveAllConstructs.push(initialize),context$1;function write(slice){return chunks=push(chunks,slice),main(),chunks[chunks.length-1]===null?(addResult(initialize,0),context$1.events=resolveAll(resolveAllConstructs,context$1.events,context$1),context$1.events):[]}function sliceSerialize(token,expandTabs){return serializeChunks(sliceStream(token),expandTabs)}function sliceStream(token){return sliceChunks(chunks,token)}function now$1(){let{_bufferIndex,_index,line,column,offset:offset$2}=point$3;return{_bufferIndex,_index,line,column,offset:offset$2}}function defineSkip(value$1){columnStart[value$1.line]=value$1.column,accountForPotentialSkip()}function main(){let chunkIndex;for(;point$3._index-1){let head$1=view[0];typeof head$1==`string`?view[0]=head$1.slice(startBufferIndex):view.shift()}endBufferIndex>0&&view.push(chunks[endIndex].slice(0,endBufferIndex))}return view}function serializeChunks(chunks,expandTabs){let index$1=-1,result=[],atTab;for(;++index$10){let tail=context$1.tokenStack[context$1.tokenStack.length-1],handler=tail[1]||defaultOnError$1;handler.call(context$1,void 0,tail[0])}for(tree.position={start:point$1(events.length>0?events[0][1].start:{line:1,column:1,offset:0}),end:point$1(events.length>0?events[events.length-2][1].end:{line:1,column:1,offset:0})},index$1=-1;++index$1new Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),__async2$1=(__this,__arguments,generator)=>new Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),VRMExpression$1=class extends Object3D{constructor(expressionName){super(),this.weight=0,this.isBinary=!1,this.overrideBlink=`none`,this.overrideLookAt=`none`,this.overrideMouth=`none`,this._binds=[],this.name=`VRMExpression_${expressionName}`,this.expressionName=expressionName,this.type=`VRMExpression`,this.visible=!1}get binds(){return this._binds}get overrideBlinkAmount(){return this.overrideBlink===`block`?0.5?1:0:this.weight}addBind(bind){this._binds.push(bind)}deleteBind(bind){let index$1=this._binds.indexOf(bind);index$1>=0&&this._binds.splice(index$1,1)}applyWeight(options$1){var _a$2;let actualWeight=this.outputWeight;actualWeight*=(_a$2=options$1?.multiplier)??1,this.isBinary&&actualWeight<1&&(actualWeight=0),this._binds.forEach(bind=>bind.applyWeight(actualWeight))}clearAppliedWeight(){this._binds.forEach(bind=>bind.clearAppliedWeight())}};function extractPrimitivesInternal$1(gltf,nodeIndex,node$1){var _a$2,_b;let json=gltf.parser.json,schemaNode=(_a$2=json.nodes)?.[nodeIndex];if(schemaNode==null)return console.warn(`extractPrimitivesInternal: Attempt to use nodes[${nodeIndex}] of glTF but the node doesn't exist`),null;let meshIndex=schemaNode.mesh;if(meshIndex==null)return null;let schemaMesh=(_b=json.meshes)?.[meshIndex];if(schemaMesh==null)return console.warn(`extractPrimitivesInternal: Attempt to use meshes[${meshIndex}] of glTF but the mesh doesn't exist`),null;let primitiveCount=schemaMesh.primitives.length,primitives=[];return node$1.traverse(object$1=>{primitives.length{presetNameSet.has(name$2)&&(result[name$2]=expression)}),result}get customExpressionMap(){let result={},presetNameSet=new Set(Object.values(VRMExpressionPresetName$1));return Object.entries(this._expressionMap).forEach(([name$2,expression])=>{presetNameSet.has(name$2)||(result[name$2]=expression)}),result}copy(source){let expressions=this._expressions.concat();return expressions.forEach(expression=>{this.unregisterExpression(expression)}),source._expressions.forEach(expression=>{this.registerExpression(expression)}),this.blinkExpressionNames=source.blinkExpressionNames.concat(),this.lookAtExpressionNames=source.lookAtExpressionNames.concat(),this.mouthExpressionNames=source.mouthExpressionNames.concat(),this}clone(){return new _VRMExpressionManager().copy(this)}getExpression(name$2){var _a$2;return(_a$2=this._expressionMap[name$2])??null}registerExpression(expression){this._expressions.push(expression),this._expressionMap[expression.expressionName]=expression}unregisterExpression(expression){let index$1=this._expressions.indexOf(expression);index$1===-1&&console.warn(`VRMExpressionManager: The specified expressions is not registered`),this._expressions.splice(index$1,1),delete this._expressionMap[expression.expressionName]}getValue(name$2){var _a$2;let expression=this.getExpression(name$2);return(_a$2=expression?.weight)??null}setValue(name$2,weight){let expression=this.getExpression(name$2);expression&&(expression.weight=saturate$1(weight))}resetValues(){this._expressions.forEach(expression=>{expression.weight=0})}getExpressionTrackName(name$2){let expression=this.getExpression(name$2);return expression?`${expression.name}.weight`:null}update(){let weightMultipliers=this._calculateWeightMultipliers();this._expressions.forEach(expression=>{expression.clearAppliedWeight()}),this._expressions.forEach(expression=>{let multiplier=1,name$2=expression.expressionName;this.blinkExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.blink),this.lookAtExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.lookAt),this.mouthExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.mouth),expression.applyWeight({multiplier})})}_calculateWeightMultipliers(){let blink=1,lookAt=1,mouth=1;return this._expressions.forEach(expression=>{blink-=expression.overrideBlinkAmount,lookAt-=expression.overrideLookAtAmount,mouth-=expression.overrideMouthAmount}),blink=Math.max(0,blink),lookAt=Math.max(0,lookAt),mouth=Math.max(0,mouth),{blink,lookAt,mouth}}},VRMExpressionMaterialColorType$1={Color:`color`,EmissionColor:`emissionColor`,ShadeColor:`shadeColor`,MatcapColor:`matcapColor`,RimColor:`rimColor`,OutlineColor:`outlineColor`},v0ExpressionMaterialColorMap$1={_Color:VRMExpressionMaterialColorType$1.Color,_EmissionColor:VRMExpressionMaterialColorType$1.EmissionColor,_ShadeColor:VRMExpressionMaterialColorType$1.ShadeColor,_RimColor:VRMExpressionMaterialColorType$1.RimColor,_OutlineColor:VRMExpressionMaterialColorType$1.OutlineColor},_color$1=new Color,_VRMExpressionMaterialColorBind$1=class _VRMExpressionMaterialColorBind2{constructor({material,type,targetValue,targetAlpha}){this.material=material,this.type=type,this.targetValue=targetValue,this.targetAlpha=targetAlpha??1;let color$2=this._initColorBindState(),alpha$1=this._initAlphaBindState();this._state={color:color$2,alpha:alpha$1}}applyWeight(weight){let{color:color$2,alpha:alpha$1}=this._state;if(color$2!=null){let{propertyName,deltaValue}=color$2,target$1=this.material[propertyName];target$1?.add(_color$1.copy(deltaValue).multiplyScalar(weight))}if(alpha$1!=null){let{propertyName,deltaValue}=alpha$1,target$1=this.material[propertyName];target$1!=null&&(this.material[propertyName]+=deltaValue*weight)}}clearAppliedWeight(){let{color:color$2,alpha:alpha$1}=this._state;if(color$2!=null){let{propertyName,initialValue}=color$2,target$1=this.material[propertyName];target$1?.copy(initialValue)}if(alpha$1!=null){let{propertyName,initialValue}=alpha$1,target$1=this.material[propertyName];target$1!=null&&(this.material[propertyName]=initialValue)}}_initColorBindState(){var _a$2,_b,_c;let{material,type,targetValue}=this,propertyNameMap=this._getPropertyNameMap(),propertyName=(_b=(_a$2=propertyNameMap?.[type])?.[0])??null;if(propertyName==null)return console.warn(`Tried to add a material color bind to the material ${(_c=material.name)??`(no name)`}, the type ${type} but the material or the type is not supported.`),null;let target$1=material[propertyName],initialValue=target$1.clone(),deltaValue=new Color(targetValue.r-initialValue.r,targetValue.g-initialValue.g,targetValue.b-initialValue.b);return{propertyName,initialValue,deltaValue}}_initAlphaBindState(){var _a$2,_b,_c;let{material,type,targetAlpha}=this,propertyNameMap=this._getPropertyNameMap(),propertyName=(_b=(_a$2=propertyNameMap?.[type])?.[1])??null;if(propertyName==null&&targetAlpha!==1)return console.warn(`Tried to add a material alpha bind to the material ${(_c=material.name)??`(no name)`}, the type ${type} but the material or the type does not support alpha.`),null;if(propertyName==null)return null;let initialValue=material[propertyName],deltaValue=targetAlpha-initialValue;return{propertyName,initialValue,deltaValue}}_getPropertyNameMap(){var _a$2,_b;return(_b=(_a$2=Object.entries(_VRMExpressionMaterialColorBind2._propertyNameMapMap).find(([distinguisher])=>this.material[distinguisher]===!0))?.[1])??null}};_VRMExpressionMaterialColorBind$1._propertyNameMapMap={isMeshStandardMaterial:{color:[`color`,`opacity`],emissionColor:[`emissive`,null]},isMeshBasicMaterial:{color:[`color`,`opacity`]},isMToonMaterial:{color:[`color`,`opacity`],emissionColor:[`emissive`,null],outlineColor:[`outlineColorFactor`,null],matcapColor:[`matcapFactor`,null],rimColor:[`parametricRimColorFactor`,null],shadeColor:[`shadeColorFactor`,null]}};var VRMExpressionMaterialColorBind$1=_VRMExpressionMaterialColorBind$1,VRMExpressionMorphTargetBind$1=class{constructor({primitives,index:index$1,weight}){this.primitives=primitives,this.index=index$1,this.weight=weight}applyWeight(weight){this.primitives.forEach(mesh=>{var _a$2;(_a$2=mesh.morphTargetInfluences)?.[this.index]!=null&&(mesh.morphTargetInfluences[this.index]+=this.weight*weight)})}clearAppliedWeight(){this.primitives.forEach(mesh=>{var _a$2;(_a$2=mesh.morphTargetInfluences)?.[this.index]!=null&&(mesh.morphTargetInfluences[this.index]=0)})}},_v2$1=new Vector2,_VRMExpressionTextureTransformBind$1=class _VRMExpressionTextureTransformBind2{constructor({material,scale:scale$1,offset:offset$2}){var _a$2,_b;this.material=material,this.scale=scale$1,this.offset=offset$2;let propertyNames=(_a$2=Object.entries(_VRMExpressionTextureTransformBind2._propertyNamesMap).find(([distinguisher])=>material[distinguisher]===!0))?.[1];propertyNames==null?(console.warn(`Tried to add a texture transform bind to the material ${(_b=material.name)??`(no name)`} but the material is not supported.`),this._properties=[]):(this._properties=[],propertyNames.forEach(propertyName=>{var _a2;let texture=(_a2=material[propertyName])?.clone();if(!texture)return null;material[propertyName]=texture;let initialOffset=texture.offset.clone(),initialScale=texture.repeat.clone(),deltaOffset=offset$2.clone().sub(initialOffset),deltaScale=scale$1.clone().sub(initialScale);this._properties.push({name:propertyName,initialOffset,deltaOffset,initialScale,deltaScale})}))}applyWeight(weight){this._properties.forEach(property=>{let target$1=this.material[property.name];target$1!==void 0&&(target$1.offset.add(_v2$1.copy(property.deltaOffset).multiplyScalar(weight)),target$1.repeat.add(_v2$1.copy(property.deltaScale).multiplyScalar(weight)))})}clearAppliedWeight(){this._properties.forEach(property=>{let target$1=this.material[property.name];target$1!==void 0&&(target$1.offset.copy(property.initialOffset),target$1.repeat.copy(property.initialScale))})}};_VRMExpressionTextureTransformBind$1._propertyNamesMap={isMeshStandardMaterial:[`map`,`emissiveMap`,`bumpMap`,`normalMap`,`displacementMap`,`roughnessMap`,`metalnessMap`,`alphaMap`],isMeshBasicMaterial:[`map`,`specularMap`,`alphaMap`],isMToonMaterial:[`map`,`normalMap`,`emissiveMap`,`shadeMultiplyTexture`,`rimMultiplyTexture`,`outlineWidthMultiplyTexture`,`uvAnimationMaskTexture`]};var VRMExpressionTextureTransformBind$1=_VRMExpressionTextureTransformBind$1,POSSIBLE_SPEC_VERSIONS$1=new Set([`1.0`,`1.0-beta`]),_VRMExpressionLoaderPlugin$1=class _VRMExpressionLoaderPlugin2{get name(){return`VRMExpressionLoaderPlugin`}constructor(parser){this.parser=parser}afterRoot(gltf){return __async2$1(this,null,function*(){gltf.userData.vrmExpressionManager=yield this._import(gltf)})}_import(gltf){return __async2$1(this,null,function*(){let v1Result=yield this._v1Import(gltf);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf);return v0Result||null})}_v1Import(gltf){return __async2$1(this,null,function*(){var _a$2,_b;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS$1.has(specVersion))return console.warn(`VRMExpressionLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaExpressions=extension$1.expressions;if(!schemaExpressions)return null;let presetNameSet=new Set(Object.values(VRMExpressionPresetName$1)),nameSchemaExpressionMap=new Map;schemaExpressions.preset!=null&&Object.entries(schemaExpressions.preset).forEach(([name$2,schemaExpression])=>{if(schemaExpression!=null){if(!presetNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: Unknown preset name "${name$2}" detected. Ignoring the expression`);return}nameSchemaExpressionMap.set(name$2,schemaExpression)}}),schemaExpressions.custom!=null&&Object.entries(schemaExpressions.custom).forEach(([name$2,schemaExpression])=>{if(presetNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: Custom expression cannot have preset name "${name$2}". Ignoring the expression`);return}nameSchemaExpressionMap.set(name$2,schemaExpression)});let manager=new VRMExpressionManager$1;return yield Promise.all(Array.from(nameSchemaExpressionMap.entries()).map(_0=>__async2$1(this,[_0],function*([name$2,schemaExpression]){var _a2,_b2,_c,_d,_e$1,_f,_g;let expression=new VRMExpression$1(name$2);if(gltf.scene.add(expression),expression.isBinary=(_a2=schemaExpression.isBinary)??!1,expression.overrideBlink=(_b2=schemaExpression.overrideBlink)??`none`,expression.overrideLookAt=(_c=schemaExpression.overrideLookAt)??`none`,expression.overrideMouth=(_d=schemaExpression.overrideMouth)??`none`,(_e$1=schemaExpression.morphTargetBinds)==null||_e$1.forEach(bind=>__async2$1(this,null,function*(){var _a3;if(bind.node===void 0||bind.index===void 0)return;let primitives=yield gltfExtractPrimitivesFromNode$1(gltf,bind.node),morphTargetIndex=bind.index;if(!primitives.every(primitive=>Array.isArray(primitive.morphTargetInfluences)&&morphTargetIndex{let material=object$1.material;material&&(Array.isArray(material)?gltfMaterials.push(...material):gltfMaterials.push(material))}),(_f=schemaExpression.materialColorBinds)==null||_f.forEach(bind=>__async2$1(this,null,function*(){let materials=gltfMaterials.filter(material=>{var _a3;let materialIndex=(_a3=this.parser.associations.get(material))?.materials;return bind.material===materialIndex});materials.forEach(material=>{expression.addBind(new VRMExpressionMaterialColorBind$1({material,type:bind.type,targetValue:new Color().fromArray(bind.targetValue),targetAlpha:bind.targetValue[3]}))})})),(_g=schemaExpression.textureTransformBinds)==null||_g.forEach(bind=>__async2$1(this,null,function*(){let materials=gltfMaterials.filter(material=>{var _a3;let materialIndex=(_a3=this.parser.associations.get(material))?.materials;return bind.material===materialIndex});materials.forEach(material=>{var _a3,_b3;expression.addBind(new VRMExpressionTextureTransformBind$1({material,offset:new Vector2().fromArray((_a3=bind.offset)??[0,0]),scale:new Vector2().fromArray((_b3=bind.scale)??[1,1])}))})}))}manager.registerExpression(expression)}))),manager})}_v0Import(gltf){return __async2$1(this,null,function*(){var _a$2;let json=this.parser.json,vrmExt=(_a$2=json.extensions)?.VRM;if(!vrmExt)return null;let schemaBlendShape=vrmExt.blendShapeMaster;if(!schemaBlendShape)return null;let manager=new VRMExpressionManager$1,schemaBlendShapeGroups=schemaBlendShape.blendShapeGroups;if(!schemaBlendShapeGroups)return manager;let blendShapeNameSet=new Set;return yield Promise.all(schemaBlendShapeGroups.map(schemaGroup=>__async2$1(this,null,function*(){var _a2;let v0PresetName=schemaGroup.presetName,v1PresetName=v0PresetName!=null&&_VRMExpressionLoaderPlugin2.v0v1PresetNameMap[v0PresetName]||null,name$2=v1PresetName??schemaGroup.name;if(name$2==null){console.warn(`VRMExpressionLoaderPlugin: One of custom expressions has no name. Ignoring the expression`);return}if(blendShapeNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: An expression preset ${v0PresetName} has duplicated entries. Ignoring the expression`);return}blendShapeNameSet.add(name$2);let expression=new VRMExpression$1(name$2);gltf.scene.add(expression),expression.isBinary=(_a2=schemaGroup.isBinary)??!1,schemaGroup.binds&&schemaGroup.binds.forEach(bind=>__async2$1(this,null,function*(){var _a3;if(bind.mesh===void 0||bind.index===void 0)return;let nodesUsingMesh=[];(_a3=json.nodes)==null||_a3.forEach((node$1,i)=>{node$1.mesh===bind.mesh&&nodesUsingMesh.push(i)});let morphTargetIndex=bind.index;yield Promise.all(nodesUsingMesh.map(nodeIndex=>__async2$1(this,null,function*(){var _a4;let primitives=yield gltfExtractPrimitivesFromNode$1(gltf,nodeIndex);if(!primitives.every(primitive=>Array.isArray(primitive.morphTargetInfluences)&&morphTargetIndex{if(materialValue.materialName===void 0||materialValue.propertyName===void 0||materialValue.targetValue===void 0)return;let materials=[];gltf.scene.traverse(object$1=>{if(object$1.material){let material=object$1.material;Array.isArray(material)?materials.push(...material.filter(mtl=>(mtl.name===materialValue.materialName||mtl.name===materialValue.materialName+` (Outline)`)&&materials.indexOf(mtl)===-1)):material.name===materialValue.materialName&&materials.indexOf(material)===-1&&materials.push(material)}});let materialPropertyName=materialValue.propertyName;materials.forEach(material=>{if(materialPropertyName===`_MainTex_ST`){let scale$1=new Vector2(materialValue.targetValue[0],materialValue.targetValue[1]),offset$2=new Vector2(materialValue.targetValue[2],materialValue.targetValue[3]);offset$2.y=1-offset$2.y-scale$1.y,expression.addBind(new VRMExpressionTextureTransformBind$1({material,scale:scale$1,offset:offset$2}));return}let materialColorType=v0ExpressionMaterialColorMap$1[materialPropertyName];if(materialColorType){expression.addBind(new VRMExpressionMaterialColorBind$1({material,type:materialColorType,targetValue:new Color().fromArray(materialValue.targetValue),targetAlpha:materialValue.targetValue[3]}));return}console.warn(materialPropertyName+` is not supported`)})}),manager.registerExpression(expression)}))),manager})}};_VRMExpressionLoaderPlugin$1.v0v1PresetNameMap={a:`aa`,e:`ee`,i:`ih`,o:`oh`,u:`ou`,blink:`blink`,joy:`happy`,angry:`angry`,sorrow:`sad`,fun:`relaxed`,lookup:`lookUp`,lookdown:`lookDown`,lookleft:`lookLeft`,lookright:`lookRight`,blink_l:`blinkLeft`,blink_r:`blinkRight`,neutral:`neutral`};var _VRMFirstPerson$1=class _VRMFirstPerson2{constructor(humanoid,meshAnnotations){this._firstPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_FIRSTPERSON_ONLY_LAYER,this._thirdPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_THIRDPERSON_ONLY_LAYER,this._initializedLayers=!1,this.humanoid=humanoid,this.meshAnnotations=meshAnnotations}copy(source){if(this.humanoid!==source.humanoid)throw Error(`VRMFirstPerson: humanoid must be same in order to copy`);return this.meshAnnotations=source.meshAnnotations.map(annotation=>({meshes:annotation.meshes.concat(),type:annotation.type})),this}clone(){return new _VRMFirstPerson2(this.humanoid,this.meshAnnotations).copy(this)}get firstPersonOnlyLayer(){return this._firstPersonOnlyLayer}get thirdPersonOnlyLayer(){return this._thirdPersonOnlyLayer}setup({firstPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_FIRSTPERSON_ONLY_LAYER,thirdPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_THIRDPERSON_ONLY_LAYER}={}){this._initializedLayers||(this._firstPersonOnlyLayer=firstPersonOnlyLayer,this._thirdPersonOnlyLayer=thirdPersonOnlyLayer,this.meshAnnotations.forEach(item=>{item.meshes.forEach(mesh=>{item.type===`firstPersonOnly`?(mesh.layers.set(this._firstPersonOnlyLayer),mesh.traverse(child=>child.layers.set(this._firstPersonOnlyLayer))):item.type===`thirdPersonOnly`?(mesh.layers.set(this._thirdPersonOnlyLayer),mesh.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer))):item.type===`auto`&&this._createHeadlessModel(mesh)})}),this._initializedLayers=!0)}_excludeTriangles(triangles,bws,skinIndex,exclude){let count$1=0;if(bws!=null&&bws.length>0)for(let i=0;i0&&exclude.includes(skin0[0])||bw0[1]>0&&exclude.includes(skin0[1])||bw0[2]>0&&exclude.includes(skin0[2])||bw0[3]>0&&exclude.includes(skin0[3]))continue;let bw1=bws[b$1],skin1=skinIndex[b$1];if(bw1[0]>0&&exclude.includes(skin1[0])||bw1[1]>0&&exclude.includes(skin1[1])||bw1[2]>0&&exclude.includes(skin1[2])||bw1[3]>0&&exclude.includes(skin1[3]))continue;let bw2=bws[c$3],skin2=skinIndex[c$3];bw2[0]>0&&exclude.includes(skin2[0])||bw2[1]>0&&exclude.includes(skin2[1])||bw2[2]>0&&exclude.includes(skin2[2])||bw2[3]>0&&exclude.includes(skin2[3])||(triangles[count$1++]=a$1,triangles[count$1++]=b$1,triangles[count$1++]=c$3)}return count$1}_createErasedMesh(src,erasingBonesIndex){let dst=new SkinnedMesh(src.geometry.clone(),src.material);dst.name=`${src.name}(erase)`,dst.frustumCulled=src.frustumCulled,dst.layers.set(this._firstPersonOnlyLayer);let geometry=dst.geometry,skinIndexAttr=geometry.getAttribute(`skinIndex`),skinIndexAttrArray=skinIndexAttr instanceof GLBufferAttribute?[]:skinIndexAttr.array,skinIndex=[];for(let i=0;i{this._isEraseTarget(bone)&&eraseBoneIndexes.push(index$1)}),!eraseBoneIndexes.length){mesh.layers.enable(this._thirdPersonOnlyLayer),mesh.layers.enable(this._firstPersonOnlyLayer);return}mesh.layers.set(this._thirdPersonOnlyLayer);let newMesh=this._createErasedMesh(mesh,eraseBoneIndexes);parent.add(newMesh)}_createHeadlessModel(node$1){if(node$1.type===`Group`)if(node$1.layers.set(this._thirdPersonOnlyLayer),this._isEraseTarget(node$1))node$1.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer));else{let parent=new Group;parent.name=`_headless_${node$1.name}`,parent.layers.set(this._firstPersonOnlyLayer),node$1.parent.add(parent),node$1.children.filter(child=>child.type===`SkinnedMesh`).forEach(child=>{let skinnedMesh=child;this._createHeadlessModelForSkinnedMesh(parent,skinnedMesh)})}else if(node$1.type===`SkinnedMesh`){let skinnedMesh=node$1;this._createHeadlessModelForSkinnedMesh(node$1.parent,skinnedMesh)}else this._isEraseTarget(node$1)&&(node$1.layers.set(this._thirdPersonOnlyLayer),node$1.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer)))}_isEraseTarget(bone){return bone===this.humanoid.getRawBoneNode(`head`)?!0:bone.parent?this._isEraseTarget(bone.parent):!1}};_VRMFirstPerson$1.DEFAULT_FIRSTPERSON_ONLY_LAYER=9,_VRMFirstPerson$1.DEFAULT_THIRDPERSON_ONLY_LAYER=10,new Vector3,new Vector3,new Quaternion;var VRMHumanBoneParentMap$1={hips:null,spine:`hips`,chest:`spine`,upperChest:`chest`,neck:`upperChest`,head:`neck`,leftEye:`head`,rightEye:`head`,jaw:`head`,leftUpperLeg:`hips`,leftLowerLeg:`leftUpperLeg`,leftFoot:`leftLowerLeg`,leftToes:`leftFoot`,rightUpperLeg:`hips`,rightLowerLeg:`rightUpperLeg`,rightFoot:`rightLowerLeg`,rightToes:`rightFoot`,leftShoulder:`upperChest`,leftUpperArm:`leftShoulder`,leftLowerArm:`leftUpperArm`,leftHand:`leftLowerArm`,rightShoulder:`upperChest`,rightUpperArm:`rightShoulder`,rightLowerArm:`rightUpperArm`,rightHand:`rightLowerArm`,leftThumbMetacarpal:`leftHand`,leftThumbProximal:`leftThumbMetacarpal`,leftThumbDistal:`leftThumbProximal`,leftIndexProximal:`leftHand`,leftIndexIntermediate:`leftIndexProximal`,leftIndexDistal:`leftIndexIntermediate`,leftMiddleProximal:`leftHand`,leftMiddleIntermediate:`leftMiddleProximal`,leftMiddleDistal:`leftMiddleIntermediate`,leftRingProximal:`leftHand`,leftRingIntermediate:`leftRingProximal`,leftRingDistal:`leftRingIntermediate`,leftLittleProximal:`leftHand`,leftLittleIntermediate:`leftLittleProximal`,leftLittleDistal:`leftLittleIntermediate`,rightThumbMetacarpal:`rightHand`,rightThumbProximal:`rightThumbMetacarpal`,rightThumbDistal:`rightThumbProximal`,rightIndexProximal:`rightHand`,rightIndexIntermediate:`rightIndexProximal`,rightIndexDistal:`rightIndexIntermediate`,rightMiddleProximal:`rightHand`,rightMiddleIntermediate:`rightMiddleProximal`,rightMiddleDistal:`rightMiddleIntermediate`,rightRingProximal:`rightHand`,rightRingIntermediate:`rightRingProximal`,rightRingDistal:`rightRingIntermediate`,rightLittleProximal:`rightHand`,rightLittleIntermediate:`rightLittleProximal`,rightLittleDistal:`rightLittleIntermediate`};function quatInvertCompat$1(target$1){return target$1.invert?target$1.invert():target$1.inverse(),target$1}new Vector3,new Quaternion,new Vector3,new Quaternion,new Vector3,new Quaternion,new Quaternion,new Vector3,new Vector3;var SQRT_2_OVER_2$1=Math.sqrt(2)/2;new Quaternion(0,0,-SQRT_2_OVER_2$1,SQRT_2_OVER_2$1),new Vector3(0,1,0);var _position$1=new Vector3,_scale$1=new Vector3;function getWorldQuaternionLite$1(object$1,out){return object$1.matrixWorld.decompose(_position$1,out,_scale$1),out}function calcAzimuthAltitude$1(vector){return[Math.atan2(-vector.z,vector.x),Math.atan2(vector.y,Math.sqrt(vector.x*vector.x+vector.z*vector.z))]}function sanitizeAngle$1(angle){let roundTurn=Math.round(angle/2/Math.PI);return angle-2*Math.PI*roundTurn}var VEC3_POSITIVE_Z$1=new Vector3(0,0,1),_v3A5$1=new Vector3,_v3B3$1=new Vector3,_v3C$1=new Vector3,_quatA5$1=new Quaternion,_quatB2$1=new Quaternion,_quatC$1=new Quaternion,_quatD$1=new Quaternion,_eulerA$1=new Euler,_VRMLookAt$1=class _VRMLookAt2{constructor(humanoid,applier){this.offsetFromHeadBone=new Vector3,this.autoUpdate=!0,this.faceFront=new Vector3(0,0,1),this.humanoid=humanoid,this.applier=applier,this._yaw=0,this._pitch=0,this._needsUpdate=!0,this._restHeadWorldQuaternion=this.getLookAtWorldQuaternion(new Quaternion)}get yaw(){return this._yaw}set yaw(value$1){this._yaw=value$1,this._needsUpdate=!0}get pitch(){return this._pitch}set pitch(value$1){this._pitch=value$1,this._needsUpdate=!0}get euler(){return console.warn(`VRMLookAt: euler is deprecated. use getEuler() instead.`),this.getEuler(new Euler)}getEuler(target$1){return target$1.set(MathUtils.DEG2RAD*this._pitch,MathUtils.DEG2RAD*this._yaw,0,`YXZ`)}copy(source){if(this.humanoid!==source.humanoid)throw Error(`VRMLookAt: humanoid must be same in order to copy`);return this.offsetFromHeadBone.copy(source.offsetFromHeadBone),this.applier=source.applier,this.autoUpdate=source.autoUpdate,this.target=source.target,this.faceFront.copy(source.faceFront),this}clone(){return new _VRMLookAt2(this.humanoid,this.applier).copy(this)}reset(){this._yaw=0,this._pitch=0,this._needsUpdate=!0}getLookAtWorldPosition(target$1){let head$1=this.humanoid.getRawBoneNode(`head`);return target$1.copy(this.offsetFromHeadBone).applyMatrix4(head$1.matrixWorld)}getLookAtWorldQuaternion(target$1){let head$1=this.humanoid.getRawBoneNode(`head`);return getWorldQuaternionLite$1(head$1,target$1)}getFaceFrontQuaternion(target$1){if(this.faceFront.distanceToSquared(VEC3_POSITIVE_Z$1)<.01)return target$1.copy(this._restHeadWorldQuaternion).invert();let[faceFrontAzimuth,faceFrontAltitude]=calcAzimuthAltitude$1(this.faceFront);return _eulerA$1.set(0,.5*Math.PI+faceFrontAzimuth,faceFrontAltitude,`YZX`),target$1.setFromEuler(_eulerA$1).premultiply(_quatD$1.copy(this._restHeadWorldQuaternion).invert())}getLookAtWorldDirection(target$1){return this.getLookAtWorldQuaternion(_quatB2$1),this.getFaceFrontQuaternion(_quatC$1),target$1.copy(VEC3_POSITIVE_Z$1).applyQuaternion(_quatB2$1).applyQuaternion(_quatC$1).applyEuler(this.getEuler(_eulerA$1))}lookAt(position$2){let headRotDiffInv=_quatA5$1.copy(this._restHeadWorldQuaternion).multiply(quatInvertCompat$1(this.getLookAtWorldQuaternion(_quatB2$1))),headPos=this.getLookAtWorldPosition(_v3B3$1),lookAtDir=_v3C$1.copy(position$2).sub(headPos).applyQuaternion(headRotDiffInv).normalize(),[azimuthFrom,altitudeFrom]=calcAzimuthAltitude$1(this.faceFront),[azimuthTo,altitudeTo]=calcAzimuthAltitude$1(lookAtDir),yaw=sanitizeAngle$1(azimuthTo-azimuthFrom),pitch=sanitizeAngle$1(altitudeFrom-altitudeTo);this._yaw=MathUtils.RAD2DEG*yaw,this._pitch=MathUtils.RAD2DEG*pitch,this._needsUpdate=!0}update(delta){this.target!=null&&this.autoUpdate&&this.lookAt(this.target.getWorldPosition(_v3A5$1)),this._needsUpdate&&(this._needsUpdate=!1,this.applier.applyYawPitch(this._yaw,this._pitch))}};_VRMLookAt$1.EULER_ORDER=`YXZ`;var VRMLookAt$1=_VRMLookAt$1,VEC3_POSITIVE_Z2$1=new Vector3(0,0,1),_quatA6$1=new Quaternion,_quatB3$1=new Quaternion,_eulerA2$1=new Euler(0,0,0,`YXZ`),VRMLookAtBoneApplier$1=class{constructor(humanoid,rangeMapHorizontalInner,rangeMapHorizontalOuter,rangeMapVerticalDown,rangeMapVerticalUp){this.humanoid=humanoid,this.rangeMapHorizontalInner=rangeMapHorizontalInner,this.rangeMapHorizontalOuter=rangeMapHorizontalOuter,this.rangeMapVerticalDown=rangeMapVerticalDown,this.rangeMapVerticalUp=rangeMapVerticalUp,this.faceFront=new Vector3(0,0,1),this._restQuatLeftEye=new Quaternion,this._restQuatRightEye=new Quaternion,this._restLeftEyeParentWorldQuat=new Quaternion,this._restRightEyeParentWorldQuat=new Quaternion;let leftEye=this.humanoid.getRawBoneNode(`leftEye`),rightEye=this.humanoid.getRawBoneNode(`rightEye`);leftEye&&(this._restQuatLeftEye.copy(leftEye.quaternion),getWorldQuaternionLite$1(leftEye.parent,this._restLeftEyeParentWorldQuat)),rightEye&&(this._restQuatRightEye.copy(rightEye.quaternion),getWorldQuaternionLite$1(rightEye.parent,this._restRightEyeParentWorldQuat))}applyYawPitch(yaw,pitch){let leftEye=this.humanoid.getRawBoneNode(`leftEye`),rightEye=this.humanoid.getRawBoneNode(`rightEye`),leftEyeNormalized=this.humanoid.getNormalizedBoneNode(`leftEye`),rightEyeNormalized=this.humanoid.getNormalizedBoneNode(`rightEye`);leftEye&&(pitch<0?_eulerA2$1.x=-MathUtils.DEG2RAD*this.rangeMapVerticalDown.map(-pitch):_eulerA2$1.x=MathUtils.DEG2RAD*this.rangeMapVerticalUp.map(pitch),yaw<0?_eulerA2$1.y=-MathUtils.DEG2RAD*this.rangeMapHorizontalInner.map(-yaw):_eulerA2$1.y=MathUtils.DEG2RAD*this.rangeMapHorizontalOuter.map(yaw),_quatA6$1.setFromEuler(_eulerA2$1),this._getWorldFaceFrontQuat(_quatB3$1),leftEyeNormalized.quaternion.copy(_quatB3$1).multiply(_quatA6$1).multiply(_quatB3$1.invert()),_quatA6$1.copy(this._restLeftEyeParentWorldQuat),leftEye.quaternion.copy(leftEyeNormalized.quaternion).multiply(_quatA6$1).premultiply(_quatA6$1.invert()).multiply(this._restQuatLeftEye)),rightEye&&(pitch<0?_eulerA2$1.x=-MathUtils.DEG2RAD*this.rangeMapVerticalDown.map(-pitch):_eulerA2$1.x=MathUtils.DEG2RAD*this.rangeMapVerticalUp.map(pitch),yaw<0?_eulerA2$1.y=-MathUtils.DEG2RAD*this.rangeMapHorizontalOuter.map(-yaw):_eulerA2$1.y=MathUtils.DEG2RAD*this.rangeMapHorizontalInner.map(yaw),_quatA6$1.setFromEuler(_eulerA2$1),this._getWorldFaceFrontQuat(_quatB3$1),rightEyeNormalized.quaternion.copy(_quatB3$1).multiply(_quatA6$1).multiply(_quatB3$1.invert()),_quatA6$1.copy(this._restRightEyeParentWorldQuat),rightEye.quaternion.copy(rightEyeNormalized.quaternion).multiply(_quatA6$1).premultiply(_quatA6$1.invert()).multiply(this._restQuatRightEye))}lookAt(euler){console.warn(`VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.`);let yaw=MathUtils.RAD2DEG*euler.y,pitch=MathUtils.RAD2DEG*euler.x;this.applyYawPitch(yaw,pitch)}_getWorldFaceFrontQuat(target$1){if(this.faceFront.distanceToSquared(VEC3_POSITIVE_Z2$1)<.01)return target$1.identity();let[faceFrontAzimuth,faceFrontAltitude]=calcAzimuthAltitude$1(this.faceFront);return _eulerA2$1.set(0,.5*Math.PI+faceFrontAzimuth,faceFrontAltitude,`YZX`),target$1.setFromEuler(_eulerA2$1)}};VRMLookAtBoneApplier$1.type=`bone`;var VRMLookAtExpressionApplier$1=class{constructor(expressions,rangeMapHorizontalInner,rangeMapHorizontalOuter,rangeMapVerticalDown,rangeMapVerticalUp){this.expressions=expressions,this.rangeMapHorizontalInner=rangeMapHorizontalInner,this.rangeMapHorizontalOuter=rangeMapHorizontalOuter,this.rangeMapVerticalDown=rangeMapVerticalDown,this.rangeMapVerticalUp=rangeMapVerticalUp}applyYawPitch(yaw,pitch){pitch<0?(this.expressions.setValue(`lookDown`,0),this.expressions.setValue(`lookUp`,this.rangeMapVerticalUp.map(-pitch))):(this.expressions.setValue(`lookUp`,0),this.expressions.setValue(`lookDown`,this.rangeMapVerticalDown.map(pitch))),yaw<0?(this.expressions.setValue(`lookLeft`,0),this.expressions.setValue(`lookRight`,this.rangeMapHorizontalOuter.map(-yaw))):(this.expressions.setValue(`lookRight`,0),this.expressions.setValue(`lookLeft`,this.rangeMapHorizontalOuter.map(yaw)))}lookAt(euler){console.warn(`VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.`);let yaw=MathUtils.RAD2DEG*euler.y,pitch=MathUtils.RAD2DEG*euler.x;this.applyYawPitch(yaw,pitch)}};VRMLookAtExpressionApplier$1.type=`expression`;var RAD2DEG$1=180/Math.PI,_eulerA3=new Euler,VRMLookAtQuaternionProxy=class extends Object3D{constructor(lookAt){super(),this.vrmLookAt=lookAt,this.type=`VRMLookAtQuaternionProxy`;let prevRotationOnChangeCallback=this.rotation._onChangeCallback;this.rotation._onChange(()=>{prevRotationOnChangeCallback(),this._applyToLookAt()});let prevQuaternionOnChangeCallback=this.quaternion._onChangeCallback;this.quaternion._onChange(()=>{prevQuaternionOnChangeCallback(),this._applyToLookAt()})}_applyToLookAt(){_eulerA3.setFromQuaternion(this.quaternion,VRMLookAt$1.EULER_ORDER),this.vrmLookAt.yaw=RAD2DEG$1*_eulerA3.y,this.vrmLookAt.pitch=RAD2DEG$1*_eulerA3.x}};function createVRMAnimationHumanoidTracks(vrmAnimation,humanoid,metaVersion){var _a$2,_b;let translation=new Map,rotation=new Map;for(let[name$2,origTrack]of vrmAnimation.humanoidTracks.rotation.entries()){let nodeName=(_a$2=humanoid.getNormalizedBoneNode(name$2))?.name;if(nodeName!=null){let track$1=new QuaternionKeyframeTrack(`${nodeName}.quaternion`,origTrack.times,origTrack.values.map((v,i)=>metaVersion===`0`&&i%2==0?-v:v));rotation.set(name$2,track$1)}}for(let[name$2,origTrack]of vrmAnimation.humanoidTracks.translation.entries()){let nodeName=(_b=humanoid.getNormalizedBoneNode(name$2))?.name;if(nodeName!=null){let animationY=vrmAnimation.restHipsPosition.y,humanoidY=humanoid.normalizedRestPose.hips.position[1],scale$1=humanoidY/animationY,track$1=origTrack.clone();track$1.values=track$1.values.map((v,i)=>(metaVersion===`0`&&i%3!=1?-v:v)*scale$1),track$1.name=`${nodeName}.position`,translation.set(name$2,track$1)}}return{translation,rotation}}function createVRMAnimationExpressionTracks(vrmAnimation,expressionManager){let preset=new Map,custom=new Map;for(let[name$2,origTrack]of vrmAnimation.expressionTracks.preset.entries()){let trackName=expressionManager.getExpressionTrackName(name$2);if(trackName!=null){let track$1=origTrack.clone();track$1.name=trackName,preset.set(name$2,track$1)}}for(let[name$2,origTrack]of vrmAnimation.expressionTracks.custom.entries()){let trackName=expressionManager.getExpressionTrackName(name$2);if(trackName!=null){let track$1=origTrack.clone();track$1.name=trackName,custom.set(name$2,track$1)}}return{preset,custom}}function createVRMAnimationLookAtTrack(vrmAnimation,trackName){if(vrmAnimation.lookAtTrack==null)return null;let track$1=vrmAnimation.lookAtTrack.clone();return track$1.name=trackName,track$1}function createVRMAnimationClip(vrmAnimation,vrm){let tracks=[],humanoidTracks=createVRMAnimationHumanoidTracks(vrmAnimation,vrm.humanoid,vrm.meta.metaVersion);if(tracks.push(...humanoidTracks.translation.values()),tracks.push(...humanoidTracks.rotation.values()),vrm.expressionManager!=null){let expressionTracks=createVRMAnimationExpressionTracks(vrmAnimation,vrm.expressionManager);tracks.push(...expressionTracks.preset.values()),tracks.push(...expressionTracks.custom.values())}if(vrm.lookAt!=null){let proxy=vrm.scene.children.find(obj=>obj instanceof VRMLookAtQuaternionProxy);proxy==null?(console.warn(`createVRMAnimationClip: VRMLookAtQuaternionProxy is not found. Creating a new one automatically. To suppress this warning, create a VRMLookAtQuaternionProxy manually`),proxy=new VRMLookAtQuaternionProxy(vrm.lookAt),proxy.name=`VRMLookAtQuaternionProxy`,vrm.scene.add(proxy)):proxy.name===``&&(console.warn(`createVRMAnimationClip: VRMLookAtQuaternionProxy is found but its name is not set. Setting the name automatically. To suppress this warning, set the name manually`),proxy.name=`VRMLookAtQuaternionProxy`);let track$1=createVRMAnimationLookAtTrack(vrmAnimation,`${proxy.name}.quaternion`);track$1!=null&&tracks.push(track$1)}return new AnimationClip(`Clip`,vrmAnimation.duration,tracks)}var VRMAnimation=class{constructor(){this.duration=0,this.restHipsPosition=new Vector3,this.humanoidTracks={translation:new Map,rotation:new Map},this.expressionTracks={preset:new Map,custom:new Map},this.lookAtTrack=null}};function arrayChunk(array$1,every){let N$1=array$1.length,ret=[],current=[],remaining=0;for(let i=0;i{let defAnimation=defGltf.animations[iAnimation],animation=this._parseAnimation(clip,defAnimation,nodeMap,worldMatrixMap);return animation.restHipsPosition=restHipsPosition,animation});gltf.userData.vrmAnimations=animations$1})}_createNodeMap(defExtension){var _a$2,_b,_c,_d,_e$1;let humanoidIndexToName=new Map,expressionsIndexToName=new Map,humanBones=(_a$2=defExtension.humanoid)?.humanBones;humanBones&&Object.entries(humanBones).forEach(([name$2,bone])=>{let node$1=bone?.node;node$1!=null&&humanoidIndexToName.set(node$1,name$2)});let preset=(_b=defExtension.expressions)?.preset;preset&&Object.entries(preset).forEach(([name$2,expression])=>{let node$1=expression?.node;node$1!=null&&expressionsIndexToName.set(node$1,name$2)});let custom=(_c=defExtension.expressions)?.custom;custom&&Object.entries(custom).forEach(([name$2,expression])=>{let{node:node$1}=expression;expressionsIndexToName.set(node$1,name$2)});let lookAtIndex=(_e$1=(_d=defExtension.lookAt)?.node)??null;return{humanoidIndexToName,expressionsIndexToName,lookAtIndex}}_createBoneWorldMatrixMap(gltf,defExtension){return __async$1(this,null,function*(){var _a$2,_b;gltf.scene.updateWorldMatrix(!1,!0);let threeNodes=yield gltf.parser.getDependencies(`node`),worldMatrixMap=new Map;if(defExtension.humanoid==null)return worldMatrixMap;for(let[boneName,humanBone]of Object.entries(defExtension.humanoid.humanBones)){let node$1=humanBone?.node;if(node$1!=null){let threeNode=threeNodes[node$1];worldMatrixMap.set(boneName,threeNode.matrixWorld),boneName===`hips`&&worldMatrixMap.set(`hipsParent`,(_b=(_a$2=threeNode.parent)?.matrixWorld)??MAT4_IDENTITY)}}return worldMatrixMap})}_parseAnimation(animationClip,defAnimation,nodeMap,worldMatrixMap){let tracks=animationClip.tracks,defChannels=defAnimation.channels,result=new VRMAnimation;return result.duration=animationClip.duration,defChannels.forEach((channel,iChannel)=>{let{node:node$1,path}=channel.target,origTrack=tracks[iChannel];if(node$1==null)return;let boneName=nodeMap.humanoidIndexToName.get(node$1);if(boneName!=null){let parentBoneName=VRMHumanBoneParentMap$1[boneName];for(;parentBoneName!=null&&worldMatrixMap.get(parentBoneName)==null;)parentBoneName=VRMHumanBoneParentMap$1[parentBoneName];if(parentBoneName??=`hipsParent`,path===`translation`)if(boneName!==`hips`)console.warn(`The loading animation contains a translation track for ${boneName}, which is not permitted in the VRMC_vrm_animation spec. ignoring the track`);else{let hipsParentWorldMatrix=worldMatrixMap.get(`hipsParent`),trackValues=arrayChunk(origTrack.values,3).flatMap(v=>_v3A6$1.fromArray(v).applyMatrix4(hipsParentWorldMatrix).toArray()),track$1=origTrack.clone();track$1.values=new Float32Array(trackValues),result.humanoidTracks.translation.set(boneName,track$1)}else if(path===`rotation`){let worldMatrix=worldMatrixMap.get(boneName),parentWorldMatrix=worldMatrixMap.get(parentBoneName);worldMatrix.decompose(_v3A6$1,_quatA7$1,_v3A6$1),_quatA7$1.invert(),parentWorldMatrix.decompose(_v3A6$1,_quatB4$1,_v3A6$1);let trackValues=arrayChunk(origTrack.values,4).flatMap(q=>_quatC2$1.fromArray(q).premultiply(_quatB4$1).multiply(_quatA7$1).toArray()),track$1=origTrack.clone();track$1.values=new Float32Array(trackValues),result.humanoidTracks.rotation.set(boneName,track$1)}else throw Error(`Invalid path "${path}"`);return}let expressionName=nodeMap.expressionsIndexToName.get(node$1);if(expressionName!=null){if(path===`translation`){let times=origTrack.times,values=new Float32Array(origTrack.values.length/3);for(let i=0;inew Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),__async2$1=(__this,__arguments,generator)=>new Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),VRMExpression$1=class extends Object3D{constructor(expressionName){super(),this.weight=0,this.isBinary=!1,this.overrideBlink=`none`,this.overrideLookAt=`none`,this.overrideMouth=`none`,this._binds=[],this.name=`VRMExpression_${expressionName}`,this.expressionName=expressionName,this.type=`VRMExpression`,this.visible=!1}get binds(){return this._binds}get overrideBlinkAmount(){return this.overrideBlink===`block`?0.5?1:0:this.weight}addBind(bind){this._binds.push(bind)}deleteBind(bind){let index$1=this._binds.indexOf(bind);index$1>=0&&this._binds.splice(index$1,1)}applyWeight(options$1){var _a$2;let actualWeight=this.outputWeight;actualWeight*=(_a$2=options$1?.multiplier)??1,this.isBinary&&actualWeight<1&&(actualWeight=0),this._binds.forEach(bind=>bind.applyWeight(actualWeight))}clearAppliedWeight(){this._binds.forEach(bind=>bind.clearAppliedWeight())}};function extractPrimitivesInternal$1(gltf,nodeIndex,node$1){var _a$2,_b;let json=gltf.parser.json,schemaNode=(_a$2=json.nodes)?.[nodeIndex];if(schemaNode==null)return console.warn(`extractPrimitivesInternal: Attempt to use nodes[${nodeIndex}] of glTF but the node doesn't exist`),null;let meshIndex=schemaNode.mesh;if(meshIndex==null)return null;let schemaMesh=(_b=json.meshes)?.[meshIndex];if(schemaMesh==null)return console.warn(`extractPrimitivesInternal: Attempt to use meshes[${meshIndex}] of glTF but the mesh doesn't exist`),null;let primitiveCount=schemaMesh.primitives.length,primitives=[];return node$1.traverse(object$1=>{primitives.length{presetNameSet.has(name$2)&&(result[name$2]=expression)}),result}get customExpressionMap(){let result={},presetNameSet=new Set(Object.values(VRMExpressionPresetName$1));return Object.entries(this._expressionMap).forEach(([name$2,expression])=>{presetNameSet.has(name$2)||(result[name$2]=expression)}),result}copy(source){let expressions=this._expressions.concat();return expressions.forEach(expression=>{this.unregisterExpression(expression)}),source._expressions.forEach(expression=>{this.registerExpression(expression)}),this.blinkExpressionNames=source.blinkExpressionNames.concat(),this.lookAtExpressionNames=source.lookAtExpressionNames.concat(),this.mouthExpressionNames=source.mouthExpressionNames.concat(),this}clone(){return new _VRMExpressionManager().copy(this)}getExpression(name$2){var _a$2;return(_a$2=this._expressionMap[name$2])??null}registerExpression(expression){this._expressions.push(expression),this._expressionMap[expression.expressionName]=expression}unregisterExpression(expression){let index$1=this._expressions.indexOf(expression);index$1===-1&&console.warn(`VRMExpressionManager: The specified expressions is not registered`),this._expressions.splice(index$1,1),delete this._expressionMap[expression.expressionName]}getValue(name$2){var _a$2;let expression=this.getExpression(name$2);return(_a$2=expression?.weight)??null}setValue(name$2,weight){let expression=this.getExpression(name$2);expression&&(expression.weight=saturate$1(weight))}resetValues(){this._expressions.forEach(expression=>{expression.weight=0})}getExpressionTrackName(name$2){let expression=this.getExpression(name$2);return expression?`${expression.name}.weight`:null}update(){let weightMultipliers=this._calculateWeightMultipliers();this._expressions.forEach(expression=>{expression.clearAppliedWeight()}),this._expressions.forEach(expression=>{let multiplier=1,name$2=expression.expressionName;this.blinkExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.blink),this.lookAtExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.lookAt),this.mouthExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.mouth),expression.applyWeight({multiplier})})}_calculateWeightMultipliers(){let blink=1,lookAt=1,mouth=1;return this._expressions.forEach(expression=>{blink-=expression.overrideBlinkAmount,lookAt-=expression.overrideLookAtAmount,mouth-=expression.overrideMouthAmount}),blink=Math.max(0,blink),lookAt=Math.max(0,lookAt),mouth=Math.max(0,mouth),{blink,lookAt,mouth}}},VRMExpressionMaterialColorType$1={Color:`color`,EmissionColor:`emissionColor`,ShadeColor:`shadeColor`,MatcapColor:`matcapColor`,RimColor:`rimColor`,OutlineColor:`outlineColor`},v0ExpressionMaterialColorMap$1={_Color:VRMExpressionMaterialColorType$1.Color,_EmissionColor:VRMExpressionMaterialColorType$1.EmissionColor,_ShadeColor:VRMExpressionMaterialColorType$1.ShadeColor,_RimColor:VRMExpressionMaterialColorType$1.RimColor,_OutlineColor:VRMExpressionMaterialColorType$1.OutlineColor},_color$1=new Color,_VRMExpressionMaterialColorBind$1=class _VRMExpressionMaterialColorBind2{constructor({material,type,targetValue,targetAlpha}){this.material=material,this.type=type,this.targetValue=targetValue,this.targetAlpha=targetAlpha??1;let color$2=this._initColorBindState(),alpha$1=this._initAlphaBindState();this._state={color:color$2,alpha:alpha$1}}applyWeight(weight){let{color:color$2,alpha:alpha$1}=this._state;if(color$2!=null){let{propertyName,deltaValue}=color$2,target$1=this.material[propertyName];target$1?.add(_color$1.copy(deltaValue).multiplyScalar(weight))}if(alpha$1!=null){let{propertyName,deltaValue}=alpha$1,target$1=this.material[propertyName];target$1!=null&&(this.material[propertyName]+=deltaValue*weight)}}clearAppliedWeight(){let{color:color$2,alpha:alpha$1}=this._state;if(color$2!=null){let{propertyName,initialValue}=color$2,target$1=this.material[propertyName];target$1?.copy(initialValue)}if(alpha$1!=null){let{propertyName,initialValue}=alpha$1,target$1=this.material[propertyName];target$1!=null&&(this.material[propertyName]=initialValue)}}_initColorBindState(){var _a$2,_b,_c;let{material,type,targetValue}=this,propertyNameMap=this._getPropertyNameMap(),propertyName=(_b=(_a$2=propertyNameMap?.[type])?.[0])??null;if(propertyName==null)return console.warn(`Tried to add a material color bind to the material ${(_c=material.name)??`(no name)`}, the type ${type} but the material or the type is not supported.`),null;let target$1=material[propertyName],initialValue=target$1.clone(),deltaValue=new Color(targetValue.r-initialValue.r,targetValue.g-initialValue.g,targetValue.b-initialValue.b);return{propertyName,initialValue,deltaValue}}_initAlphaBindState(){var _a$2,_b,_c;let{material,type,targetAlpha}=this,propertyNameMap=this._getPropertyNameMap(),propertyName=(_b=(_a$2=propertyNameMap?.[type])?.[1])??null;if(propertyName==null&&targetAlpha!==1)return console.warn(`Tried to add a material alpha bind to the material ${(_c=material.name)??`(no name)`}, the type ${type} but the material or the type does not support alpha.`),null;if(propertyName==null)return null;let initialValue=material[propertyName],deltaValue=targetAlpha-initialValue;return{propertyName,initialValue,deltaValue}}_getPropertyNameMap(){var _a$2,_b;return(_b=(_a$2=Object.entries(_VRMExpressionMaterialColorBind2._propertyNameMapMap).find(([distinguisher])=>this.material[distinguisher]===!0))?.[1])??null}};_VRMExpressionMaterialColorBind$1._propertyNameMapMap={isMeshStandardMaterial:{color:[`color`,`opacity`],emissionColor:[`emissive`,null]},isMeshBasicMaterial:{color:[`color`,`opacity`]},isMToonMaterial:{color:[`color`,`opacity`],emissionColor:[`emissive`,null],outlineColor:[`outlineColorFactor`,null],matcapColor:[`matcapFactor`,null],rimColor:[`parametricRimColorFactor`,null],shadeColor:[`shadeColorFactor`,null]}};var VRMExpressionMaterialColorBind$1=_VRMExpressionMaterialColorBind$1,VRMExpressionMorphTargetBind$1=class{constructor({primitives,index:index$1,weight}){this.primitives=primitives,this.index=index$1,this.weight=weight}applyWeight(weight){this.primitives.forEach(mesh=>{var _a$2;(_a$2=mesh.morphTargetInfluences)?.[this.index]!=null&&(mesh.morphTargetInfluences[this.index]+=this.weight*weight)})}clearAppliedWeight(){this.primitives.forEach(mesh=>{var _a$2;(_a$2=mesh.morphTargetInfluences)?.[this.index]!=null&&(mesh.morphTargetInfluences[this.index]=0)})}},_v2$1=new Vector2,_VRMExpressionTextureTransformBind$1=class _VRMExpressionTextureTransformBind2{constructor({material,scale:scale$1,offset:offset$2}){var _a$2,_b;this.material=material,this.scale=scale$1,this.offset=offset$2;let propertyNames=(_a$2=Object.entries(_VRMExpressionTextureTransformBind2._propertyNamesMap).find(([distinguisher])=>material[distinguisher]===!0))?.[1];propertyNames==null?(console.warn(`Tried to add a texture transform bind to the material ${(_b=material.name)??`(no name)`} but the material is not supported.`),this._properties=[]):(this._properties=[],propertyNames.forEach(propertyName=>{var _a2;let texture=(_a2=material[propertyName])?.clone();if(!texture)return null;material[propertyName]=texture;let initialOffset=texture.offset.clone(),initialScale=texture.repeat.clone(),deltaOffset=offset$2.clone().sub(initialOffset),deltaScale=scale$1.clone().sub(initialScale);this._properties.push({name:propertyName,initialOffset,deltaOffset,initialScale,deltaScale})}))}applyWeight(weight){this._properties.forEach(property=>{let target$1=this.material[property.name];target$1!==void 0&&(target$1.offset.add(_v2$1.copy(property.deltaOffset).multiplyScalar(weight)),target$1.repeat.add(_v2$1.copy(property.deltaScale).multiplyScalar(weight)))})}clearAppliedWeight(){this._properties.forEach(property=>{let target$1=this.material[property.name];target$1!==void 0&&(target$1.offset.copy(property.initialOffset),target$1.repeat.copy(property.initialScale))})}};_VRMExpressionTextureTransformBind$1._propertyNamesMap={isMeshStandardMaterial:[`map`,`emissiveMap`,`bumpMap`,`normalMap`,`displacementMap`,`roughnessMap`,`metalnessMap`,`alphaMap`],isMeshBasicMaterial:[`map`,`specularMap`,`alphaMap`],isMToonMaterial:[`map`,`normalMap`,`emissiveMap`,`shadeMultiplyTexture`,`rimMultiplyTexture`,`outlineWidthMultiplyTexture`,`uvAnimationMaskTexture`]};var VRMExpressionTextureTransformBind$1=_VRMExpressionTextureTransformBind$1,POSSIBLE_SPEC_VERSIONS$1=new Set([`1.0`,`1.0-beta`]),_VRMExpressionLoaderPlugin$1=class _VRMExpressionLoaderPlugin2{get name(){return`VRMExpressionLoaderPlugin`}constructor(parser){this.parser=parser}afterRoot(gltf){return __async2$1(this,null,function*(){gltf.userData.vrmExpressionManager=yield this._import(gltf)})}_import(gltf){return __async2$1(this,null,function*(){let v1Result=yield this._v1Import(gltf);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf);return v0Result||null})}_v1Import(gltf){return __async2$1(this,null,function*(){var _a$2,_b;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS$1.has(specVersion))return console.warn(`VRMExpressionLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaExpressions=extension$1.expressions;if(!schemaExpressions)return null;let presetNameSet=new Set(Object.values(VRMExpressionPresetName$1)),nameSchemaExpressionMap=new Map;schemaExpressions.preset!=null&&Object.entries(schemaExpressions.preset).forEach(([name$2,schemaExpression])=>{if(schemaExpression!=null){if(!presetNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: Unknown preset name "${name$2}" detected. Ignoring the expression`);return}nameSchemaExpressionMap.set(name$2,schemaExpression)}}),schemaExpressions.custom!=null&&Object.entries(schemaExpressions.custom).forEach(([name$2,schemaExpression])=>{if(presetNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: Custom expression cannot have preset name "${name$2}". Ignoring the expression`);return}nameSchemaExpressionMap.set(name$2,schemaExpression)});let manager=new VRMExpressionManager$1;return yield Promise.all(Array.from(nameSchemaExpressionMap.entries()).map(_0=>__async2$1(this,[_0],function*([name$2,schemaExpression]){var _a2,_b2,_c,_d,_e$1,_f,_g;let expression=new VRMExpression$1(name$2);if(gltf.scene.add(expression),expression.isBinary=(_a2=schemaExpression.isBinary)??!1,expression.overrideBlink=(_b2=schemaExpression.overrideBlink)??`none`,expression.overrideLookAt=(_c=schemaExpression.overrideLookAt)??`none`,expression.overrideMouth=(_d=schemaExpression.overrideMouth)??`none`,(_e$1=schemaExpression.morphTargetBinds)==null||_e$1.forEach(bind=>__async2$1(this,null,function*(){var _a3;if(bind.node===void 0||bind.index===void 0)return;let primitives=yield gltfExtractPrimitivesFromNode$1(gltf,bind.node),morphTargetIndex=bind.index;if(!primitives.every(primitive=>Array.isArray(primitive.morphTargetInfluences)&&morphTargetIndex{let material=object$1.material;material&&(Array.isArray(material)?gltfMaterials.push(...material):gltfMaterials.push(material))}),(_f=schemaExpression.materialColorBinds)==null||_f.forEach(bind=>__async2$1(this,null,function*(){let materials=gltfMaterials.filter(material=>{var _a3;let materialIndex=(_a3=this.parser.associations.get(material))?.materials;return bind.material===materialIndex});materials.forEach(material=>{expression.addBind(new VRMExpressionMaterialColorBind$1({material,type:bind.type,targetValue:new Color().fromArray(bind.targetValue),targetAlpha:bind.targetValue[3]}))})})),(_g=schemaExpression.textureTransformBinds)==null||_g.forEach(bind=>__async2$1(this,null,function*(){let materials=gltfMaterials.filter(material=>{var _a3;let materialIndex=(_a3=this.parser.associations.get(material))?.materials;return bind.material===materialIndex});materials.forEach(material=>{var _a3,_b3;expression.addBind(new VRMExpressionTextureTransformBind$1({material,offset:new Vector2().fromArray((_a3=bind.offset)??[0,0]),scale:new Vector2().fromArray((_b3=bind.scale)??[1,1])}))})}))}manager.registerExpression(expression)}))),manager})}_v0Import(gltf){return __async2$1(this,null,function*(){var _a$2;let json=this.parser.json,vrmExt=(_a$2=json.extensions)?.VRM;if(!vrmExt)return null;let schemaBlendShape=vrmExt.blendShapeMaster;if(!schemaBlendShape)return null;let manager=new VRMExpressionManager$1,schemaBlendShapeGroups=schemaBlendShape.blendShapeGroups;if(!schemaBlendShapeGroups)return manager;let blendShapeNameSet=new Set;return yield Promise.all(schemaBlendShapeGroups.map(schemaGroup=>__async2$1(this,null,function*(){var _a2;let v0PresetName=schemaGroup.presetName,v1PresetName=v0PresetName!=null&&_VRMExpressionLoaderPlugin2.v0v1PresetNameMap[v0PresetName]||null,name$2=v1PresetName??schemaGroup.name;if(name$2==null){console.warn(`VRMExpressionLoaderPlugin: One of custom expressions has no name. Ignoring the expression`);return}if(blendShapeNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: An expression preset ${v0PresetName} has duplicated entries. Ignoring the expression`);return}blendShapeNameSet.add(name$2);let expression=new VRMExpression$1(name$2);gltf.scene.add(expression),expression.isBinary=(_a2=schemaGroup.isBinary)??!1,schemaGroup.binds&&schemaGroup.binds.forEach(bind=>__async2$1(this,null,function*(){var _a3;if(bind.mesh===void 0||bind.index===void 0)return;let nodesUsingMesh=[];(_a3=json.nodes)==null||_a3.forEach((node$1,i)=>{node$1.mesh===bind.mesh&&nodesUsingMesh.push(i)});let morphTargetIndex=bind.index;yield Promise.all(nodesUsingMesh.map(nodeIndex=>__async2$1(this,null,function*(){var _a4;let primitives=yield gltfExtractPrimitivesFromNode$1(gltf,nodeIndex);if(!primitives.every(primitive=>Array.isArray(primitive.morphTargetInfluences)&&morphTargetIndex{if(materialValue.materialName===void 0||materialValue.propertyName===void 0||materialValue.targetValue===void 0)return;let materials=[];gltf.scene.traverse(object$1=>{if(object$1.material){let material=object$1.material;Array.isArray(material)?materials.push(...material.filter(mtl=>(mtl.name===materialValue.materialName||mtl.name===materialValue.materialName+` (Outline)`)&&materials.indexOf(mtl)===-1)):material.name===materialValue.materialName&&materials.indexOf(material)===-1&&materials.push(material)}});let materialPropertyName=materialValue.propertyName;materials.forEach(material=>{if(materialPropertyName===`_MainTex_ST`){let scale$1=new Vector2(materialValue.targetValue[0],materialValue.targetValue[1]),offset$2=new Vector2(materialValue.targetValue[2],materialValue.targetValue[3]);offset$2.y=1-offset$2.y-scale$1.y,expression.addBind(new VRMExpressionTextureTransformBind$1({material,scale:scale$1,offset:offset$2}));return}let materialColorType=v0ExpressionMaterialColorMap$1[materialPropertyName];if(materialColorType){expression.addBind(new VRMExpressionMaterialColorBind$1({material,type:materialColorType,targetValue:new Color().fromArray(materialValue.targetValue),targetAlpha:materialValue.targetValue[3]}));return}console.warn(materialPropertyName+` is not supported`)})}),manager.registerExpression(expression)}))),manager})}};_VRMExpressionLoaderPlugin$1.v0v1PresetNameMap={a:`aa`,e:`ee`,i:`ih`,o:`oh`,u:`ou`,blink:`blink`,joy:`happy`,angry:`angry`,sorrow:`sad`,fun:`relaxed`,lookup:`lookUp`,lookdown:`lookDown`,lookleft:`lookLeft`,lookright:`lookRight`,blink_l:`blinkLeft`,blink_r:`blinkRight`,neutral:`neutral`};var _VRMFirstPerson$1=class _VRMFirstPerson2{constructor(humanoid,meshAnnotations){this._firstPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_FIRSTPERSON_ONLY_LAYER,this._thirdPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_THIRDPERSON_ONLY_LAYER,this._initializedLayers=!1,this.humanoid=humanoid,this.meshAnnotations=meshAnnotations}copy(source){if(this.humanoid!==source.humanoid)throw Error(`VRMFirstPerson: humanoid must be same in order to copy`);return this.meshAnnotations=source.meshAnnotations.map(annotation=>({meshes:annotation.meshes.concat(),type:annotation.type})),this}clone(){return new _VRMFirstPerson2(this.humanoid,this.meshAnnotations).copy(this)}get firstPersonOnlyLayer(){return this._firstPersonOnlyLayer}get thirdPersonOnlyLayer(){return this._thirdPersonOnlyLayer}setup({firstPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_FIRSTPERSON_ONLY_LAYER,thirdPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_THIRDPERSON_ONLY_LAYER}={}){this._initializedLayers||(this._firstPersonOnlyLayer=firstPersonOnlyLayer,this._thirdPersonOnlyLayer=thirdPersonOnlyLayer,this.meshAnnotations.forEach(item=>{item.meshes.forEach(mesh=>{item.type===`firstPersonOnly`?(mesh.layers.set(this._firstPersonOnlyLayer),mesh.traverse(child=>child.layers.set(this._firstPersonOnlyLayer))):item.type===`thirdPersonOnly`?(mesh.layers.set(this._thirdPersonOnlyLayer),mesh.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer))):item.type===`auto`&&this._createHeadlessModel(mesh)})}),this._initializedLayers=!0)}_excludeTriangles(triangles,bws,skinIndex,exclude){let count$2=0;if(bws!=null&&bws.length>0)for(let i=0;i0&&exclude.includes(skin0[0])||bw0[1]>0&&exclude.includes(skin0[1])||bw0[2]>0&&exclude.includes(skin0[2])||bw0[3]>0&&exclude.includes(skin0[3]))continue;let bw1=bws[b$1],skin1=skinIndex[b$1];if(bw1[0]>0&&exclude.includes(skin1[0])||bw1[1]>0&&exclude.includes(skin1[1])||bw1[2]>0&&exclude.includes(skin1[2])||bw1[3]>0&&exclude.includes(skin1[3]))continue;let bw2=bws[c$3],skin2=skinIndex[c$3];bw2[0]>0&&exclude.includes(skin2[0])||bw2[1]>0&&exclude.includes(skin2[1])||bw2[2]>0&&exclude.includes(skin2[2])||bw2[3]>0&&exclude.includes(skin2[3])||(triangles[count$2++]=a$1,triangles[count$2++]=b$1,triangles[count$2++]=c$3)}return count$2}_createErasedMesh(src,erasingBonesIndex){let dst=new SkinnedMesh(src.geometry.clone(),src.material);dst.name=`${src.name}(erase)`,dst.frustumCulled=src.frustumCulled,dst.layers.set(this._firstPersonOnlyLayer);let geometry=dst.geometry,skinIndexAttr=geometry.getAttribute(`skinIndex`),skinIndexAttrArray=skinIndexAttr instanceof GLBufferAttribute?[]:skinIndexAttr.array,skinIndex=[];for(let i=0;i{this._isEraseTarget(bone)&&eraseBoneIndexes.push(index$1)}),!eraseBoneIndexes.length){mesh.layers.enable(this._thirdPersonOnlyLayer),mesh.layers.enable(this._firstPersonOnlyLayer);return}mesh.layers.set(this._thirdPersonOnlyLayer);let newMesh=this._createErasedMesh(mesh,eraseBoneIndexes);parent.add(newMesh)}_createHeadlessModel(node$1){if(node$1.type===`Group`)if(node$1.layers.set(this._thirdPersonOnlyLayer),this._isEraseTarget(node$1))node$1.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer));else{let parent=new Group;parent.name=`_headless_${node$1.name}`,parent.layers.set(this._firstPersonOnlyLayer),node$1.parent.add(parent),node$1.children.filter(child=>child.type===`SkinnedMesh`).forEach(child=>{let skinnedMesh=child;this._createHeadlessModelForSkinnedMesh(parent,skinnedMesh)})}else if(node$1.type===`SkinnedMesh`){let skinnedMesh=node$1;this._createHeadlessModelForSkinnedMesh(node$1.parent,skinnedMesh)}else this._isEraseTarget(node$1)&&(node$1.layers.set(this._thirdPersonOnlyLayer),node$1.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer)))}_isEraseTarget(bone){return bone===this.humanoid.getRawBoneNode(`head`)?!0:bone.parent?this._isEraseTarget(bone.parent):!1}};_VRMFirstPerson$1.DEFAULT_FIRSTPERSON_ONLY_LAYER=9,_VRMFirstPerson$1.DEFAULT_THIRDPERSON_ONLY_LAYER=10,new Vector3,new Vector3,new Quaternion;var VRMHumanBoneParentMap$1={hips:null,spine:`hips`,chest:`spine`,upperChest:`chest`,neck:`upperChest`,head:`neck`,leftEye:`head`,rightEye:`head`,jaw:`head`,leftUpperLeg:`hips`,leftLowerLeg:`leftUpperLeg`,leftFoot:`leftLowerLeg`,leftToes:`leftFoot`,rightUpperLeg:`hips`,rightLowerLeg:`rightUpperLeg`,rightFoot:`rightLowerLeg`,rightToes:`rightFoot`,leftShoulder:`upperChest`,leftUpperArm:`leftShoulder`,leftLowerArm:`leftUpperArm`,leftHand:`leftLowerArm`,rightShoulder:`upperChest`,rightUpperArm:`rightShoulder`,rightLowerArm:`rightUpperArm`,rightHand:`rightLowerArm`,leftThumbMetacarpal:`leftHand`,leftThumbProximal:`leftThumbMetacarpal`,leftThumbDistal:`leftThumbProximal`,leftIndexProximal:`leftHand`,leftIndexIntermediate:`leftIndexProximal`,leftIndexDistal:`leftIndexIntermediate`,leftMiddleProximal:`leftHand`,leftMiddleIntermediate:`leftMiddleProximal`,leftMiddleDistal:`leftMiddleIntermediate`,leftRingProximal:`leftHand`,leftRingIntermediate:`leftRingProximal`,leftRingDistal:`leftRingIntermediate`,leftLittleProximal:`leftHand`,leftLittleIntermediate:`leftLittleProximal`,leftLittleDistal:`leftLittleIntermediate`,rightThumbMetacarpal:`rightHand`,rightThumbProximal:`rightThumbMetacarpal`,rightThumbDistal:`rightThumbProximal`,rightIndexProximal:`rightHand`,rightIndexIntermediate:`rightIndexProximal`,rightIndexDistal:`rightIndexIntermediate`,rightMiddleProximal:`rightHand`,rightMiddleIntermediate:`rightMiddleProximal`,rightMiddleDistal:`rightMiddleIntermediate`,rightRingProximal:`rightHand`,rightRingIntermediate:`rightRingProximal`,rightRingDistal:`rightRingIntermediate`,rightLittleProximal:`rightHand`,rightLittleIntermediate:`rightLittleProximal`,rightLittleDistal:`rightLittleIntermediate`};function quatInvertCompat$1(target$1){return target$1.invert?target$1.invert():target$1.inverse(),target$1}new Vector3,new Quaternion,new Vector3,new Quaternion,new Vector3,new Quaternion,new Quaternion,new Vector3,new Vector3;var SQRT_2_OVER_2$1=Math.sqrt(2)/2;new Quaternion(0,0,-SQRT_2_OVER_2$1,SQRT_2_OVER_2$1),new Vector3(0,1,0);var _position$1=new Vector3,_scale$1=new Vector3;function getWorldQuaternionLite$1(object$1,out){return object$1.matrixWorld.decompose(_position$1,out,_scale$1),out}function calcAzimuthAltitude$1(vector){return[Math.atan2(-vector.z,vector.x),Math.atan2(vector.y,Math.sqrt(vector.x*vector.x+vector.z*vector.z))]}function sanitizeAngle$1(angle){let roundTurn=Math.round(angle/2/Math.PI);return angle-2*Math.PI*roundTurn}var VEC3_POSITIVE_Z$1=new Vector3(0,0,1),_v3A5$1=new Vector3,_v3B3$1=new Vector3,_v3C$1=new Vector3,_quatA5$1=new Quaternion,_quatB2$1=new Quaternion,_quatC$1=new Quaternion,_quatD$1=new Quaternion,_eulerA$1=new Euler,_VRMLookAt$1=class _VRMLookAt2{constructor(humanoid,applier){this.offsetFromHeadBone=new Vector3,this.autoUpdate=!0,this.faceFront=new Vector3(0,0,1),this.humanoid=humanoid,this.applier=applier,this._yaw=0,this._pitch=0,this._needsUpdate=!0,this._restHeadWorldQuaternion=this.getLookAtWorldQuaternion(new Quaternion)}get yaw(){return this._yaw}set yaw(value$1){this._yaw=value$1,this._needsUpdate=!0}get pitch(){return this._pitch}set pitch(value$1){this._pitch=value$1,this._needsUpdate=!0}get euler(){return console.warn(`VRMLookAt: euler is deprecated. use getEuler() instead.`),this.getEuler(new Euler)}getEuler(target$1){return target$1.set(MathUtils.DEG2RAD*this._pitch,MathUtils.DEG2RAD*this._yaw,0,`YXZ`)}copy(source){if(this.humanoid!==source.humanoid)throw Error(`VRMLookAt: humanoid must be same in order to copy`);return this.offsetFromHeadBone.copy(source.offsetFromHeadBone),this.applier=source.applier,this.autoUpdate=source.autoUpdate,this.target=source.target,this.faceFront.copy(source.faceFront),this}clone(){return new _VRMLookAt2(this.humanoid,this.applier).copy(this)}reset(){this._yaw=0,this._pitch=0,this._needsUpdate=!0}getLookAtWorldPosition(target$1){let head$1=this.humanoid.getRawBoneNode(`head`);return target$1.copy(this.offsetFromHeadBone).applyMatrix4(head$1.matrixWorld)}getLookAtWorldQuaternion(target$1){let head$1=this.humanoid.getRawBoneNode(`head`);return getWorldQuaternionLite$1(head$1,target$1)}getFaceFrontQuaternion(target$1){if(this.faceFront.distanceToSquared(VEC3_POSITIVE_Z$1)<.01)return target$1.copy(this._restHeadWorldQuaternion).invert();let[faceFrontAzimuth,faceFrontAltitude]=calcAzimuthAltitude$1(this.faceFront);return _eulerA$1.set(0,.5*Math.PI+faceFrontAzimuth,faceFrontAltitude,`YZX`),target$1.setFromEuler(_eulerA$1).premultiply(_quatD$1.copy(this._restHeadWorldQuaternion).invert())}getLookAtWorldDirection(target$1){return this.getLookAtWorldQuaternion(_quatB2$1),this.getFaceFrontQuaternion(_quatC$1),target$1.copy(VEC3_POSITIVE_Z$1).applyQuaternion(_quatB2$1).applyQuaternion(_quatC$1).applyEuler(this.getEuler(_eulerA$1))}lookAt(position$2){let headRotDiffInv=_quatA5$1.copy(this._restHeadWorldQuaternion).multiply(quatInvertCompat$1(this.getLookAtWorldQuaternion(_quatB2$1))),headPos=this.getLookAtWorldPosition(_v3B3$1),lookAtDir=_v3C$1.copy(position$2).sub(headPos).applyQuaternion(headRotDiffInv).normalize(),[azimuthFrom,altitudeFrom]=calcAzimuthAltitude$1(this.faceFront),[azimuthTo,altitudeTo]=calcAzimuthAltitude$1(lookAtDir),yaw=sanitizeAngle$1(azimuthTo-azimuthFrom),pitch=sanitizeAngle$1(altitudeFrom-altitudeTo);this._yaw=MathUtils.RAD2DEG*yaw,this._pitch=MathUtils.RAD2DEG*pitch,this._needsUpdate=!0}update(delta){this.target!=null&&this.autoUpdate&&this.lookAt(this.target.getWorldPosition(_v3A5$1)),this._needsUpdate&&(this._needsUpdate=!1,this.applier.applyYawPitch(this._yaw,this._pitch))}};_VRMLookAt$1.EULER_ORDER=`YXZ`;var VRMLookAt$1=_VRMLookAt$1,VEC3_POSITIVE_Z2$1=new Vector3(0,0,1),_quatA6$1=new Quaternion,_quatB3$1=new Quaternion,_eulerA2$1=new Euler(0,0,0,`YXZ`),VRMLookAtBoneApplier$1=class{constructor(humanoid,rangeMapHorizontalInner,rangeMapHorizontalOuter,rangeMapVerticalDown,rangeMapVerticalUp){this.humanoid=humanoid,this.rangeMapHorizontalInner=rangeMapHorizontalInner,this.rangeMapHorizontalOuter=rangeMapHorizontalOuter,this.rangeMapVerticalDown=rangeMapVerticalDown,this.rangeMapVerticalUp=rangeMapVerticalUp,this.faceFront=new Vector3(0,0,1),this._restQuatLeftEye=new Quaternion,this._restQuatRightEye=new Quaternion,this._restLeftEyeParentWorldQuat=new Quaternion,this._restRightEyeParentWorldQuat=new Quaternion;let leftEye=this.humanoid.getRawBoneNode(`leftEye`),rightEye=this.humanoid.getRawBoneNode(`rightEye`);leftEye&&(this._restQuatLeftEye.copy(leftEye.quaternion),getWorldQuaternionLite$1(leftEye.parent,this._restLeftEyeParentWorldQuat)),rightEye&&(this._restQuatRightEye.copy(rightEye.quaternion),getWorldQuaternionLite$1(rightEye.parent,this._restRightEyeParentWorldQuat))}applyYawPitch(yaw,pitch){let leftEye=this.humanoid.getRawBoneNode(`leftEye`),rightEye=this.humanoid.getRawBoneNode(`rightEye`),leftEyeNormalized=this.humanoid.getNormalizedBoneNode(`leftEye`),rightEyeNormalized=this.humanoid.getNormalizedBoneNode(`rightEye`);leftEye&&(pitch<0?_eulerA2$1.x=-MathUtils.DEG2RAD*this.rangeMapVerticalDown.map(-pitch):_eulerA2$1.x=MathUtils.DEG2RAD*this.rangeMapVerticalUp.map(pitch),yaw<0?_eulerA2$1.y=-MathUtils.DEG2RAD*this.rangeMapHorizontalInner.map(-yaw):_eulerA2$1.y=MathUtils.DEG2RAD*this.rangeMapHorizontalOuter.map(yaw),_quatA6$1.setFromEuler(_eulerA2$1),this._getWorldFaceFrontQuat(_quatB3$1),leftEyeNormalized.quaternion.copy(_quatB3$1).multiply(_quatA6$1).multiply(_quatB3$1.invert()),_quatA6$1.copy(this._restLeftEyeParentWorldQuat),leftEye.quaternion.copy(leftEyeNormalized.quaternion).multiply(_quatA6$1).premultiply(_quatA6$1.invert()).multiply(this._restQuatLeftEye)),rightEye&&(pitch<0?_eulerA2$1.x=-MathUtils.DEG2RAD*this.rangeMapVerticalDown.map(-pitch):_eulerA2$1.x=MathUtils.DEG2RAD*this.rangeMapVerticalUp.map(pitch),yaw<0?_eulerA2$1.y=-MathUtils.DEG2RAD*this.rangeMapHorizontalOuter.map(-yaw):_eulerA2$1.y=MathUtils.DEG2RAD*this.rangeMapHorizontalInner.map(yaw),_quatA6$1.setFromEuler(_eulerA2$1),this._getWorldFaceFrontQuat(_quatB3$1),rightEyeNormalized.quaternion.copy(_quatB3$1).multiply(_quatA6$1).multiply(_quatB3$1.invert()),_quatA6$1.copy(this._restRightEyeParentWorldQuat),rightEye.quaternion.copy(rightEyeNormalized.quaternion).multiply(_quatA6$1).premultiply(_quatA6$1.invert()).multiply(this._restQuatRightEye))}lookAt(euler){console.warn(`VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.`);let yaw=MathUtils.RAD2DEG*euler.y,pitch=MathUtils.RAD2DEG*euler.x;this.applyYawPitch(yaw,pitch)}_getWorldFaceFrontQuat(target$1){if(this.faceFront.distanceToSquared(VEC3_POSITIVE_Z2$1)<.01)return target$1.identity();let[faceFrontAzimuth,faceFrontAltitude]=calcAzimuthAltitude$1(this.faceFront);return _eulerA2$1.set(0,.5*Math.PI+faceFrontAzimuth,faceFrontAltitude,`YZX`),target$1.setFromEuler(_eulerA2$1)}};VRMLookAtBoneApplier$1.type=`bone`;var VRMLookAtExpressionApplier$1=class{constructor(expressions,rangeMapHorizontalInner,rangeMapHorizontalOuter,rangeMapVerticalDown,rangeMapVerticalUp){this.expressions=expressions,this.rangeMapHorizontalInner=rangeMapHorizontalInner,this.rangeMapHorizontalOuter=rangeMapHorizontalOuter,this.rangeMapVerticalDown=rangeMapVerticalDown,this.rangeMapVerticalUp=rangeMapVerticalUp}applyYawPitch(yaw,pitch){pitch<0?(this.expressions.setValue(`lookDown`,0),this.expressions.setValue(`lookUp`,this.rangeMapVerticalUp.map(-pitch))):(this.expressions.setValue(`lookUp`,0),this.expressions.setValue(`lookDown`,this.rangeMapVerticalDown.map(pitch))),yaw<0?(this.expressions.setValue(`lookLeft`,0),this.expressions.setValue(`lookRight`,this.rangeMapHorizontalOuter.map(-yaw))):(this.expressions.setValue(`lookRight`,0),this.expressions.setValue(`lookLeft`,this.rangeMapHorizontalOuter.map(yaw)))}lookAt(euler){console.warn(`VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.`);let yaw=MathUtils.RAD2DEG*euler.y,pitch=MathUtils.RAD2DEG*euler.x;this.applyYawPitch(yaw,pitch)}};VRMLookAtExpressionApplier$1.type=`expression`;var RAD2DEG$1=180/Math.PI,_eulerA3=new Euler,VRMLookAtQuaternionProxy=class extends Object3D{constructor(lookAt){super(),this.vrmLookAt=lookAt,this.type=`VRMLookAtQuaternionProxy`;let prevRotationOnChangeCallback=this.rotation._onChangeCallback;this.rotation._onChange(()=>{prevRotationOnChangeCallback(),this._applyToLookAt()});let prevQuaternionOnChangeCallback=this.quaternion._onChangeCallback;this.quaternion._onChange(()=>{prevQuaternionOnChangeCallback(),this._applyToLookAt()})}_applyToLookAt(){_eulerA3.setFromQuaternion(this.quaternion,VRMLookAt$1.EULER_ORDER),this.vrmLookAt.yaw=RAD2DEG$1*_eulerA3.y,this.vrmLookAt.pitch=RAD2DEG$1*_eulerA3.x}};function createVRMAnimationHumanoidTracks(vrmAnimation,humanoid,metaVersion){var _a$2,_b;let translation=new Map,rotation=new Map;for(let[name$2,origTrack]of vrmAnimation.humanoidTracks.rotation.entries()){let nodeName=(_a$2=humanoid.getNormalizedBoneNode(name$2))?.name;if(nodeName!=null){let track$1=new QuaternionKeyframeTrack(`${nodeName}.quaternion`,origTrack.times,origTrack.values.map((v,i)=>metaVersion===`0`&&i%2==0?-v:v));rotation.set(name$2,track$1)}}for(let[name$2,origTrack]of vrmAnimation.humanoidTracks.translation.entries()){let nodeName=(_b=humanoid.getNormalizedBoneNode(name$2))?.name;if(nodeName!=null){let animationY=vrmAnimation.restHipsPosition.y,humanoidY=humanoid.normalizedRestPose.hips.position[1],scale$1=humanoidY/animationY,track$1=origTrack.clone();track$1.values=track$1.values.map((v,i)=>(metaVersion===`0`&&i%3!=1?-v:v)*scale$1),track$1.name=`${nodeName}.position`,translation.set(name$2,track$1)}}return{translation,rotation}}function createVRMAnimationExpressionTracks(vrmAnimation,expressionManager){let preset=new Map,custom=new Map;for(let[name$2,origTrack]of vrmAnimation.expressionTracks.preset.entries()){let trackName=expressionManager.getExpressionTrackName(name$2);if(trackName!=null){let track$1=origTrack.clone();track$1.name=trackName,preset.set(name$2,track$1)}}for(let[name$2,origTrack]of vrmAnimation.expressionTracks.custom.entries()){let trackName=expressionManager.getExpressionTrackName(name$2);if(trackName!=null){let track$1=origTrack.clone();track$1.name=trackName,custom.set(name$2,track$1)}}return{preset,custom}}function createVRMAnimationLookAtTrack(vrmAnimation,trackName){if(vrmAnimation.lookAtTrack==null)return null;let track$1=vrmAnimation.lookAtTrack.clone();return track$1.name=trackName,track$1}function createVRMAnimationClip(vrmAnimation,vrm){let tracks=[],humanoidTracks=createVRMAnimationHumanoidTracks(vrmAnimation,vrm.humanoid,vrm.meta.metaVersion);if(tracks.push(...humanoidTracks.translation.values()),tracks.push(...humanoidTracks.rotation.values()),vrm.expressionManager!=null){let expressionTracks=createVRMAnimationExpressionTracks(vrmAnimation,vrm.expressionManager);tracks.push(...expressionTracks.preset.values()),tracks.push(...expressionTracks.custom.values())}if(vrm.lookAt!=null){let proxy=vrm.scene.children.find(obj=>obj instanceof VRMLookAtQuaternionProxy);proxy==null?(console.warn(`createVRMAnimationClip: VRMLookAtQuaternionProxy is not found. Creating a new one automatically. To suppress this warning, create a VRMLookAtQuaternionProxy manually`),proxy=new VRMLookAtQuaternionProxy(vrm.lookAt),proxy.name=`VRMLookAtQuaternionProxy`,vrm.scene.add(proxy)):proxy.name===``&&(console.warn(`createVRMAnimationClip: VRMLookAtQuaternionProxy is found but its name is not set. Setting the name automatically. To suppress this warning, set the name manually`),proxy.name=`VRMLookAtQuaternionProxy`);let track$1=createVRMAnimationLookAtTrack(vrmAnimation,`${proxy.name}.quaternion`);track$1!=null&&tracks.push(track$1)}return new AnimationClip(`Clip`,vrmAnimation.duration,tracks)}var VRMAnimation=class{constructor(){this.duration=0,this.restHipsPosition=new Vector3,this.humanoidTracks={translation:new Map,rotation:new Map},this.expressionTracks={preset:new Map,custom:new Map},this.lookAtTrack=null}};function arrayChunk(array$1,every){let N$1=array$1.length,ret=[],current=[],remaining=0;for(let i=0;i{let defAnimation=defGltf.animations[iAnimation],animation=this._parseAnimation(clip,defAnimation,nodeMap,worldMatrixMap);return animation.restHipsPosition=restHipsPosition,animation});gltf.userData.vrmAnimations=animations$1})}_createNodeMap(defExtension){var _a$2,_b,_c,_d,_e$1;let humanoidIndexToName=new Map,expressionsIndexToName=new Map,humanBones=(_a$2=defExtension.humanoid)?.humanBones;humanBones&&Object.entries(humanBones).forEach(([name$2,bone])=>{let node$1=bone?.node;node$1!=null&&humanoidIndexToName.set(node$1,name$2)});let preset=(_b=defExtension.expressions)?.preset;preset&&Object.entries(preset).forEach(([name$2,expression])=>{let node$1=expression?.node;node$1!=null&&expressionsIndexToName.set(node$1,name$2)});let custom=(_c=defExtension.expressions)?.custom;custom&&Object.entries(custom).forEach(([name$2,expression])=>{let{node:node$1}=expression;expressionsIndexToName.set(node$1,name$2)});let lookAtIndex=(_e$1=(_d=defExtension.lookAt)?.node)??null;return{humanoidIndexToName,expressionsIndexToName,lookAtIndex}}_createBoneWorldMatrixMap(gltf,defExtension){return __async$1(this,null,function*(){var _a$2,_b;gltf.scene.updateWorldMatrix(!1,!0);let threeNodes=yield gltf.parser.getDependencies(`node`),worldMatrixMap=new Map;if(defExtension.humanoid==null)return worldMatrixMap;for(let[boneName,humanBone]of Object.entries(defExtension.humanoid.humanBones)){let node$1=humanBone?.node;if(node$1!=null){let threeNode=threeNodes[node$1];worldMatrixMap.set(boneName,threeNode.matrixWorld),boneName===`hips`&&worldMatrixMap.set(`hipsParent`,(_b=(_a$2=threeNode.parent)?.matrixWorld)??MAT4_IDENTITY)}}return worldMatrixMap})}_parseAnimation(animationClip,defAnimation,nodeMap,worldMatrixMap){let tracks=animationClip.tracks,defChannels=defAnimation.channels,result=new VRMAnimation;return result.duration=animationClip.duration,defChannels.forEach((channel,iChannel)=>{let{node:node$1,path}=channel.target,origTrack=tracks[iChannel];if(node$1==null)return;let boneName=nodeMap.humanoidIndexToName.get(node$1);if(boneName!=null){let parentBoneName=VRMHumanBoneParentMap$1[boneName];for(;parentBoneName!=null&&worldMatrixMap.get(parentBoneName)==null;)parentBoneName=VRMHumanBoneParentMap$1[parentBoneName];if(parentBoneName??=`hipsParent`,path===`translation`)if(boneName!==`hips`)console.warn(`The loading animation contains a translation track for ${boneName}, which is not permitted in the VRMC_vrm_animation spec. ignoring the track`);else{let hipsParentWorldMatrix=worldMatrixMap.get(`hipsParent`),trackValues=arrayChunk(origTrack.values,3).flatMap(v=>_v3A6$1.fromArray(v).applyMatrix4(hipsParentWorldMatrix).toArray()),track$1=origTrack.clone();track$1.values=new Float32Array(trackValues),result.humanoidTracks.translation.set(boneName,track$1)}else if(path===`rotation`){let worldMatrix=worldMatrixMap.get(boneName),parentWorldMatrix=worldMatrixMap.get(parentBoneName);worldMatrix.decompose(_v3A6$1,_quatA7$1,_v3A6$1),_quatA7$1.invert(),parentWorldMatrix.decompose(_v3A6$1,_quatB4$1,_v3A6$1);let trackValues=arrayChunk(origTrack.values,4).flatMap(q=>_quatC2$1.fromArray(q).premultiply(_quatB4$1).multiply(_quatA7$1).toArray()),track$1=origTrack.clone();track$1.values=new Float32Array(trackValues),result.humanoidTracks.rotation.set(boneName,track$1)}else throw Error(`Invalid path "${path}"`);return}let expressionName=nodeMap.expressionsIndexToName.get(node$1);if(expressionName!=null){if(path===`translation`){let times=origTrack.times,values=new Float32Array(origTrack.values.length/3);for(let i=0;inew Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),__async2=(__this,__arguments,generator)=>new Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),VRMExpression=class extends Object3D{constructor(expressionName){super(),this.weight=0,this.isBinary=!1,this.overrideBlink=`none`,this.overrideLookAt=`none`,this.overrideMouth=`none`,this._binds=[],this.name=`VRMExpression_${expressionName}`,this.expressionName=expressionName,this.type=`VRMExpression`,this.visible=!1}get binds(){return this._binds}get overrideBlinkAmount(){return this.overrideBlink===`block`?0.5?1:0:this.weight}addBind(bind){this._binds.push(bind)}deleteBind(bind){let index$1=this._binds.indexOf(bind);index$1>=0&&this._binds.splice(index$1,1)}applyWeight(options$1){var _a$2;let actualWeight=this.outputWeight;actualWeight*=(_a$2=options$1?.multiplier)??1,this.isBinary&&actualWeight<1&&(actualWeight=0),this._binds.forEach(bind=>bind.applyWeight(actualWeight))}clearAppliedWeight(){this._binds.forEach(bind=>bind.clearAppliedWeight())}};function extractPrimitivesInternal(gltf,nodeIndex,node$1){var _a$2,_b;let json=gltf.parser.json,schemaNode=(_a$2=json.nodes)?.[nodeIndex];if(schemaNode==null)return console.warn(`extractPrimitivesInternal: Attempt to use nodes[${nodeIndex}] of glTF but the node doesn't exist`),null;let meshIndex=schemaNode.mesh;if(meshIndex==null)return null;let schemaMesh=(_b=json.meshes)?.[meshIndex];if(schemaMesh==null)return console.warn(`extractPrimitivesInternal: Attempt to use meshes[${meshIndex}] of glTF but the mesh doesn't exist`),null;let primitiveCount=schemaMesh.primitives.length,primitives=[];return node$1.traverse(object$1=>{primitives.length{let result=extractPrimitivesInternal(gltf,index$1,node$1);result!=null&&map.set(index$1,result)}),map})}var VRMExpressionPresetName={Aa:`aa`,Ih:`ih`,Ou:`ou`,Ee:`ee`,Oh:`oh`,Blink:`blink`,Happy:`happy`,Angry:`angry`,Sad:`sad`,Relaxed:`relaxed`,LookUp:`lookUp`,Surprised:`surprised`,LookDown:`lookDown`,LookLeft:`lookLeft`,LookRight:`lookRight`,BlinkLeft:`blinkLeft`,BlinkRight:`blinkRight`,Neutral:`neutral`};function saturate(value$1){return Math.max(Math.min(value$1,1),0)}var VRMExpressionManager=class _VRMExpressionManager{constructor(){this.blinkExpressionNames=[`blink`,`blinkLeft`,`blinkRight`],this.lookAtExpressionNames=[`lookLeft`,`lookRight`,`lookUp`,`lookDown`],this.mouthExpressionNames=[`aa`,`ee`,`ih`,`oh`,`ou`],this._expressions=[],this._expressionMap={}}get expressions(){return this._expressions.concat()}get expressionMap(){return Object.assign({},this._expressionMap)}get presetExpressionMap(){let result={},presetNameSet=new Set(Object.values(VRMExpressionPresetName));return Object.entries(this._expressionMap).forEach(([name$2,expression])=>{presetNameSet.has(name$2)&&(result[name$2]=expression)}),result}get customExpressionMap(){let result={},presetNameSet=new Set(Object.values(VRMExpressionPresetName));return Object.entries(this._expressionMap).forEach(([name$2,expression])=>{presetNameSet.has(name$2)||(result[name$2]=expression)}),result}copy(source){let expressions=this._expressions.concat();return expressions.forEach(expression=>{this.unregisterExpression(expression)}),source._expressions.forEach(expression=>{this.registerExpression(expression)}),this.blinkExpressionNames=source.blinkExpressionNames.concat(),this.lookAtExpressionNames=source.lookAtExpressionNames.concat(),this.mouthExpressionNames=source.mouthExpressionNames.concat(),this}clone(){return new _VRMExpressionManager().copy(this)}getExpression(name$2){var _a$2;return(_a$2=this._expressionMap[name$2])??null}registerExpression(expression){this._expressions.push(expression),this._expressionMap[expression.expressionName]=expression}unregisterExpression(expression){let index$1=this._expressions.indexOf(expression);index$1===-1&&console.warn(`VRMExpressionManager: The specified expressions is not registered`),this._expressions.splice(index$1,1),delete this._expressionMap[expression.expressionName]}getValue(name$2){var _a$2;let expression=this.getExpression(name$2);return(_a$2=expression?.weight)??null}setValue(name$2,weight){let expression=this.getExpression(name$2);expression&&(expression.weight=saturate(weight))}resetValues(){this._expressions.forEach(expression=>{expression.weight=0})}getExpressionTrackName(name$2){let expression=this.getExpression(name$2);return expression?`${expression.name}.weight`:null}update(){let weightMultipliers=this._calculateWeightMultipliers();this._expressions.forEach(expression=>{expression.clearAppliedWeight()}),this._expressions.forEach(expression=>{let multiplier=1,name$2=expression.expressionName;this.blinkExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.blink),this.lookAtExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.lookAt),this.mouthExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.mouth),expression.applyWeight({multiplier})})}_calculateWeightMultipliers(){let blink=1,lookAt=1,mouth=1;return this._expressions.forEach(expression=>{blink-=expression.overrideBlinkAmount,lookAt-=expression.overrideLookAtAmount,mouth-=expression.overrideMouthAmount}),blink=Math.max(0,blink),lookAt=Math.max(0,lookAt),mouth=Math.max(0,mouth),{blink,lookAt,mouth}}},VRMExpressionMaterialColorType={Color:`color`,EmissionColor:`emissionColor`,ShadeColor:`shadeColor`,MatcapColor:`matcapColor`,RimColor:`rimColor`,OutlineColor:`outlineColor`},v0ExpressionMaterialColorMap={_Color:VRMExpressionMaterialColorType.Color,_EmissionColor:VRMExpressionMaterialColorType.EmissionColor,_ShadeColor:VRMExpressionMaterialColorType.ShadeColor,_RimColor:VRMExpressionMaterialColorType.RimColor,_OutlineColor:VRMExpressionMaterialColorType.OutlineColor},_color=new Color,_VRMExpressionMaterialColorBind=class _VRMExpressionMaterialColorBind2{constructor({material,type,targetValue,targetAlpha}){this.material=material,this.type=type,this.targetValue=targetValue,this.targetAlpha=targetAlpha??1;let color$2=this._initColorBindState(),alpha$1=this._initAlphaBindState();this._state={color:color$2,alpha:alpha$1}}applyWeight(weight){let{color:color$2,alpha:alpha$1}=this._state;if(color$2!=null){let{propertyName,deltaValue}=color$2,target$1=this.material[propertyName];target$1?.add(_color.copy(deltaValue).multiplyScalar(weight))}if(alpha$1!=null){let{propertyName,deltaValue}=alpha$1,target$1=this.material[propertyName];target$1!=null&&(this.material[propertyName]+=deltaValue*weight)}}clearAppliedWeight(){let{color:color$2,alpha:alpha$1}=this._state;if(color$2!=null){let{propertyName,initialValue}=color$2,target$1=this.material[propertyName];target$1?.copy(initialValue)}if(alpha$1!=null){let{propertyName,initialValue}=alpha$1,target$1=this.material[propertyName];target$1!=null&&(this.material[propertyName]=initialValue)}}_initColorBindState(){var _a$2,_b,_c;let{material,type,targetValue}=this,propertyNameMap=this._getPropertyNameMap(),propertyName=(_b=(_a$2=propertyNameMap?.[type])?.[0])??null;if(propertyName==null)return console.warn(`Tried to add a material color bind to the material ${(_c=material.name)??`(no name)`}, the type ${type} but the material or the type is not supported.`),null;let target$1=material[propertyName],initialValue=target$1.clone(),deltaValue=new Color(targetValue.r-initialValue.r,targetValue.g-initialValue.g,targetValue.b-initialValue.b);return{propertyName,initialValue,deltaValue}}_initAlphaBindState(){var _a$2,_b,_c;let{material,type,targetAlpha}=this,propertyNameMap=this._getPropertyNameMap(),propertyName=(_b=(_a$2=propertyNameMap?.[type])?.[1])??null;if(propertyName==null&&targetAlpha!==1)return console.warn(`Tried to add a material alpha bind to the material ${(_c=material.name)??`(no name)`}, the type ${type} but the material or the type does not support alpha.`),null;if(propertyName==null)return null;let initialValue=material[propertyName],deltaValue=targetAlpha-initialValue;return{propertyName,initialValue,deltaValue}}_getPropertyNameMap(){var _a$2,_b;return(_b=(_a$2=Object.entries(_VRMExpressionMaterialColorBind2._propertyNameMapMap).find(([distinguisher])=>this.material[distinguisher]===!0))?.[1])??null}};_VRMExpressionMaterialColorBind._propertyNameMapMap={isMeshStandardMaterial:{color:[`color`,`opacity`],emissionColor:[`emissive`,null]},isMeshBasicMaterial:{color:[`color`,`opacity`]},isMToonMaterial:{color:[`color`,`opacity`],emissionColor:[`emissive`,null],outlineColor:[`outlineColorFactor`,null],matcapColor:[`matcapFactor`,null],rimColor:[`parametricRimColorFactor`,null],shadeColor:[`shadeColorFactor`,null]}};var VRMExpressionMaterialColorBind=_VRMExpressionMaterialColorBind,VRMExpressionMorphTargetBind=class{constructor({primitives,index:index$1,weight}){this.primitives=primitives,this.index=index$1,this.weight=weight}applyWeight(weight){this.primitives.forEach(mesh=>{var _a$2;(_a$2=mesh.morphTargetInfluences)?.[this.index]!=null&&(mesh.morphTargetInfluences[this.index]+=this.weight*weight)})}clearAppliedWeight(){this.primitives.forEach(mesh=>{var _a$2;(_a$2=mesh.morphTargetInfluences)?.[this.index]!=null&&(mesh.morphTargetInfluences[this.index]=0)})}},_v2=new Vector2,_VRMExpressionTextureTransformBind=class _VRMExpressionTextureTransformBind2{constructor({material,scale:scale$1,offset:offset$2}){var _a$2,_b;this.material=material,this.scale=scale$1,this.offset=offset$2;let propertyNames=(_a$2=Object.entries(_VRMExpressionTextureTransformBind2._propertyNamesMap).find(([distinguisher])=>material[distinguisher]===!0))?.[1];propertyNames==null?(console.warn(`Tried to add a texture transform bind to the material ${(_b=material.name)??`(no name)`} but the material is not supported.`),this._properties=[]):(this._properties=[],propertyNames.forEach(propertyName=>{var _a2;let texture=(_a2=material[propertyName])?.clone();if(!texture)return null;material[propertyName]=texture;let initialOffset=texture.offset.clone(),initialScale=texture.repeat.clone(),deltaOffset=offset$2.clone().sub(initialOffset),deltaScale=scale$1.clone().sub(initialScale);this._properties.push({name:propertyName,initialOffset,deltaOffset,initialScale,deltaScale})}))}applyWeight(weight){this._properties.forEach(property=>{let target$1=this.material[property.name];target$1!==void 0&&(target$1.offset.add(_v2.copy(property.deltaOffset).multiplyScalar(weight)),target$1.repeat.add(_v2.copy(property.deltaScale).multiplyScalar(weight)))})}clearAppliedWeight(){this._properties.forEach(property=>{let target$1=this.material[property.name];target$1!==void 0&&(target$1.offset.copy(property.initialOffset),target$1.repeat.copy(property.initialScale))})}};_VRMExpressionTextureTransformBind._propertyNamesMap={isMeshStandardMaterial:[`map`,`emissiveMap`,`bumpMap`,`normalMap`,`displacementMap`,`roughnessMap`,`metalnessMap`,`alphaMap`],isMeshBasicMaterial:[`map`,`specularMap`,`alphaMap`],isMToonMaterial:[`map`,`normalMap`,`emissiveMap`,`shadeMultiplyTexture`,`rimMultiplyTexture`,`outlineWidthMultiplyTexture`,`uvAnimationMaskTexture`]};var VRMExpressionTextureTransformBind=_VRMExpressionTextureTransformBind,POSSIBLE_SPEC_VERSIONS=new Set([`1.0`,`1.0-beta`]),_VRMExpressionLoaderPlugin=class _VRMExpressionLoaderPlugin2{get name(){return`VRMExpressionLoaderPlugin`}constructor(parser){this.parser=parser}afterRoot(gltf){return __async2(this,null,function*(){gltf.userData.vrmExpressionManager=yield this._import(gltf)})}_import(gltf){return __async2(this,null,function*(){let v1Result=yield this._v1Import(gltf);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf);return v0Result||null})}_v1Import(gltf){return __async2(this,null,function*(){var _a$2,_b;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS.has(specVersion))return console.warn(`VRMExpressionLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaExpressions=extension$1.expressions;if(!schemaExpressions)return null;let presetNameSet=new Set(Object.values(VRMExpressionPresetName)),nameSchemaExpressionMap=new Map;schemaExpressions.preset!=null&&Object.entries(schemaExpressions.preset).forEach(([name$2,schemaExpression])=>{if(schemaExpression!=null){if(!presetNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: Unknown preset name "${name$2}" detected. Ignoring the expression`);return}nameSchemaExpressionMap.set(name$2,schemaExpression)}}),schemaExpressions.custom!=null&&Object.entries(schemaExpressions.custom).forEach(([name$2,schemaExpression])=>{if(presetNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: Custom expression cannot have preset name "${name$2}". Ignoring the expression`);return}nameSchemaExpressionMap.set(name$2,schemaExpression)});let manager=new VRMExpressionManager;return yield Promise.all(Array.from(nameSchemaExpressionMap.entries()).map(_0=>__async2(this,[_0],function*([name$2,schemaExpression]){var _a2,_b2,_c,_d,_e$1,_f,_g;let expression=new VRMExpression(name$2);if(gltf.scene.add(expression),expression.isBinary=(_a2=schemaExpression.isBinary)??!1,expression.overrideBlink=(_b2=schemaExpression.overrideBlink)??`none`,expression.overrideLookAt=(_c=schemaExpression.overrideLookAt)??`none`,expression.overrideMouth=(_d=schemaExpression.overrideMouth)??`none`,(_e$1=schemaExpression.morphTargetBinds)==null||_e$1.forEach(bind=>__async2(this,null,function*(){var _a3;if(bind.node===void 0||bind.index===void 0)return;let primitives=yield gltfExtractPrimitivesFromNode(gltf,bind.node),morphTargetIndex=bind.index;if(!primitives.every(primitive=>Array.isArray(primitive.morphTargetInfluences)&&morphTargetIndex{let material=object$1.material;material&&(Array.isArray(material)?gltfMaterials.push(...material):gltfMaterials.push(material))}),(_f=schemaExpression.materialColorBinds)==null||_f.forEach(bind=>__async2(this,null,function*(){let materials=gltfMaterials.filter(material=>{var _a3;let materialIndex=(_a3=this.parser.associations.get(material))?.materials;return bind.material===materialIndex});materials.forEach(material=>{expression.addBind(new VRMExpressionMaterialColorBind({material,type:bind.type,targetValue:new Color().fromArray(bind.targetValue),targetAlpha:bind.targetValue[3]}))})})),(_g=schemaExpression.textureTransformBinds)==null||_g.forEach(bind=>__async2(this,null,function*(){let materials=gltfMaterials.filter(material=>{var _a3;let materialIndex=(_a3=this.parser.associations.get(material))?.materials;return bind.material===materialIndex});materials.forEach(material=>{var _a3,_b3;expression.addBind(new VRMExpressionTextureTransformBind({material,offset:new Vector2().fromArray((_a3=bind.offset)??[0,0]),scale:new Vector2().fromArray((_b3=bind.scale)??[1,1])}))})}))}manager.registerExpression(expression)}))),manager})}_v0Import(gltf){return __async2(this,null,function*(){var _a$2;let json=this.parser.json,vrmExt=(_a$2=json.extensions)?.VRM;if(!vrmExt)return null;let schemaBlendShape=vrmExt.blendShapeMaster;if(!schemaBlendShape)return null;let manager=new VRMExpressionManager,schemaBlendShapeGroups=schemaBlendShape.blendShapeGroups;if(!schemaBlendShapeGroups)return manager;let blendShapeNameSet=new Set;return yield Promise.all(schemaBlendShapeGroups.map(schemaGroup=>__async2(this,null,function*(){var _a2;let v0PresetName=schemaGroup.presetName,v1PresetName=v0PresetName!=null&&_VRMExpressionLoaderPlugin2.v0v1PresetNameMap[v0PresetName]||null,name$2=v1PresetName??schemaGroup.name;if(name$2==null){console.warn(`VRMExpressionLoaderPlugin: One of custom expressions has no name. Ignoring the expression`);return}if(blendShapeNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: An expression preset ${v0PresetName} has duplicated entries. Ignoring the expression`);return}blendShapeNameSet.add(name$2);let expression=new VRMExpression(name$2);gltf.scene.add(expression),expression.isBinary=(_a2=schemaGroup.isBinary)??!1,schemaGroup.binds&&schemaGroup.binds.forEach(bind=>__async2(this,null,function*(){var _a3;if(bind.mesh===void 0||bind.index===void 0)return;let nodesUsingMesh=[];(_a3=json.nodes)==null||_a3.forEach((node$1,i)=>{node$1.mesh===bind.mesh&&nodesUsingMesh.push(i)});let morphTargetIndex=bind.index;yield Promise.all(nodesUsingMesh.map(nodeIndex=>__async2(this,null,function*(){var _a4;let primitives=yield gltfExtractPrimitivesFromNode(gltf,nodeIndex);if(!primitives.every(primitive=>Array.isArray(primitive.morphTargetInfluences)&&morphTargetIndex{if(materialValue.materialName===void 0||materialValue.propertyName===void 0||materialValue.targetValue===void 0)return;let materials=[];gltf.scene.traverse(object$1=>{if(object$1.material){let material=object$1.material;Array.isArray(material)?materials.push(...material.filter(mtl=>(mtl.name===materialValue.materialName||mtl.name===materialValue.materialName+` (Outline)`)&&materials.indexOf(mtl)===-1)):material.name===materialValue.materialName&&materials.indexOf(material)===-1&&materials.push(material)}});let materialPropertyName=materialValue.propertyName;materials.forEach(material=>{if(materialPropertyName===`_MainTex_ST`){let scale$1=new Vector2(materialValue.targetValue[0],materialValue.targetValue[1]),offset$2=new Vector2(materialValue.targetValue[2],materialValue.targetValue[3]);offset$2.y=1-offset$2.y-scale$1.y,expression.addBind(new VRMExpressionTextureTransformBind({material,scale:scale$1,offset:offset$2}));return}let materialColorType=v0ExpressionMaterialColorMap[materialPropertyName];if(materialColorType){expression.addBind(new VRMExpressionMaterialColorBind({material,type:materialColorType,targetValue:new Color().fromArray(materialValue.targetValue),targetAlpha:materialValue.targetValue[3]}));return}console.warn(materialPropertyName+` is not supported`)})}),manager.registerExpression(expression)}))),manager})}};_VRMExpressionLoaderPlugin.v0v1PresetNameMap={a:`aa`,e:`ee`,i:`ih`,o:`oh`,u:`ou`,blink:`blink`,joy:`happy`,angry:`angry`,sorrow:`sad`,fun:`relaxed`,lookup:`lookUp`,lookdown:`lookDown`,lookleft:`lookLeft`,lookright:`lookRight`,blink_l:`blinkLeft`,blink_r:`blinkRight`,neutral:`neutral`};var VRMExpressionLoaderPlugin=_VRMExpressionLoaderPlugin,_VRMFirstPerson=class _VRMFirstPerson2{constructor(humanoid,meshAnnotations){this._firstPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_FIRSTPERSON_ONLY_LAYER,this._thirdPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_THIRDPERSON_ONLY_LAYER,this._initializedLayers=!1,this.humanoid=humanoid,this.meshAnnotations=meshAnnotations}copy(source){if(this.humanoid!==source.humanoid)throw Error(`VRMFirstPerson: humanoid must be same in order to copy`);return this.meshAnnotations=source.meshAnnotations.map(annotation=>({meshes:annotation.meshes.concat(),type:annotation.type})),this}clone(){return new _VRMFirstPerson2(this.humanoid,this.meshAnnotations).copy(this)}get firstPersonOnlyLayer(){return this._firstPersonOnlyLayer}get thirdPersonOnlyLayer(){return this._thirdPersonOnlyLayer}setup({firstPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_FIRSTPERSON_ONLY_LAYER,thirdPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_THIRDPERSON_ONLY_LAYER}={}){this._initializedLayers||(this._firstPersonOnlyLayer=firstPersonOnlyLayer,this._thirdPersonOnlyLayer=thirdPersonOnlyLayer,this.meshAnnotations.forEach(item=>{item.meshes.forEach(mesh=>{item.type===`firstPersonOnly`?(mesh.layers.set(this._firstPersonOnlyLayer),mesh.traverse(child=>child.layers.set(this._firstPersonOnlyLayer))):item.type===`thirdPersonOnly`?(mesh.layers.set(this._thirdPersonOnlyLayer),mesh.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer))):item.type===`auto`&&this._createHeadlessModel(mesh)})}),this._initializedLayers=!0)}_excludeTriangles(triangles,bws,skinIndex,exclude){let count$1=0;if(bws!=null&&bws.length>0)for(let i=0;i0&&exclude.includes(skin0[0])||bw0[1]>0&&exclude.includes(skin0[1])||bw0[2]>0&&exclude.includes(skin0[2])||bw0[3]>0&&exclude.includes(skin0[3]))continue;let bw1=bws[b$1],skin1=skinIndex[b$1];if(bw1[0]>0&&exclude.includes(skin1[0])||bw1[1]>0&&exclude.includes(skin1[1])||bw1[2]>0&&exclude.includes(skin1[2])||bw1[3]>0&&exclude.includes(skin1[3]))continue;let bw2=bws[c$3],skin2=skinIndex[c$3];bw2[0]>0&&exclude.includes(skin2[0])||bw2[1]>0&&exclude.includes(skin2[1])||bw2[2]>0&&exclude.includes(skin2[2])||bw2[3]>0&&exclude.includes(skin2[3])||(triangles[count$1++]=a$1,triangles[count$1++]=b$1,triangles[count$1++]=c$3)}return count$1}_createErasedMesh(src,erasingBonesIndex){let dst=new SkinnedMesh(src.geometry.clone(),src.material);dst.name=`${src.name}(erase)`,dst.frustumCulled=src.frustumCulled,dst.layers.set(this._firstPersonOnlyLayer);let geometry=dst.geometry,skinIndexAttr=geometry.getAttribute(`skinIndex`),skinIndexAttrArray=skinIndexAttr instanceof GLBufferAttribute?[]:skinIndexAttr.array,skinIndex=[];for(let i=0;i{this._isEraseTarget(bone)&&eraseBoneIndexes.push(index$1)}),!eraseBoneIndexes.length){mesh.layers.enable(this._thirdPersonOnlyLayer),mesh.layers.enable(this._firstPersonOnlyLayer);return}mesh.layers.set(this._thirdPersonOnlyLayer);let newMesh=this._createErasedMesh(mesh,eraseBoneIndexes);parent.add(newMesh)}_createHeadlessModel(node$1){if(node$1.type===`Group`)if(node$1.layers.set(this._thirdPersonOnlyLayer),this._isEraseTarget(node$1))node$1.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer));else{let parent=new Group;parent.name=`_headless_${node$1.name}`,parent.layers.set(this._firstPersonOnlyLayer),node$1.parent.add(parent),node$1.children.filter(child=>child.type===`SkinnedMesh`).forEach(child=>{let skinnedMesh=child;this._createHeadlessModelForSkinnedMesh(parent,skinnedMesh)})}else if(node$1.type===`SkinnedMesh`){let skinnedMesh=node$1;this._createHeadlessModelForSkinnedMesh(node$1.parent,skinnedMesh)}else this._isEraseTarget(node$1)&&(node$1.layers.set(this._thirdPersonOnlyLayer),node$1.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer)))}_isEraseTarget(bone){return bone===this.humanoid.getRawBoneNode(`head`)?!0:bone.parent?this._isEraseTarget(bone.parent):!1}};_VRMFirstPerson.DEFAULT_FIRSTPERSON_ONLY_LAYER=9,_VRMFirstPerson.DEFAULT_THIRDPERSON_ONLY_LAYER=10;var VRMFirstPerson=_VRMFirstPerson,POSSIBLE_SPEC_VERSIONS2=new Set([`1.0`,`1.0-beta`]),VRMFirstPersonLoaderPlugin=class{get name(){return`VRMFirstPersonLoaderPlugin`}constructor(parser){this.parser=parser}afterRoot(gltf){return __async2(this,null,function*(){let vrmHumanoid=gltf.userData.vrmHumanoid;if(vrmHumanoid!==null){if(vrmHumanoid===void 0)throw Error(`VRMFirstPersonLoaderPlugin: vrmHumanoid is undefined. VRMHumanoidLoaderPlugin have to be used first`);gltf.userData.vrmFirstPerson=yield this._import(gltf,vrmHumanoid)}})}_import(gltf,humanoid){return __async2(this,null,function*(){if(humanoid==null)return null;let v1Result=yield this._v1Import(gltf,humanoid);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf,humanoid);return v0Result||null})}_v1Import(gltf,humanoid){return __async2(this,null,function*(){var _a$2,_b;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS2.has(specVersion))return console.warn(`VRMFirstPersonLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaFirstPerson=extension$1.firstPerson,meshAnnotations=[],nodePrimitivesMap=yield gltfExtractPrimitivesFromNodes(gltf);return Array.from(nodePrimitivesMap.entries()).forEach(([nodeIndex,primitives])=>{var _a2,_b2;let annotation=(_a2=schemaFirstPerson?.meshAnnotations)?.find(a$1=>a$1.node===nodeIndex);meshAnnotations.push({meshes:primitives,type:(_b2=annotation?.type)??`auto`})}),new VRMFirstPerson(humanoid,meshAnnotations)})}_v0Import(gltf,humanoid){return __async2(this,null,function*(){var _a$2;let json=this.parser.json,vrmExt=(_a$2=json.extensions)?.VRM;if(!vrmExt)return null;let schemaFirstPerson=vrmExt.firstPerson;if(!schemaFirstPerson)return null;let meshAnnotations=[],nodePrimitivesMap=yield gltfExtractPrimitivesFromNodes(gltf);return Array.from(nodePrimitivesMap.entries()).forEach(([nodeIndex,primitives])=>{let schemaNode=json.nodes[nodeIndex],flag=schemaFirstPerson.meshAnnotations?schemaFirstPerson.meshAnnotations.find(a$1=>a$1.mesh===schemaNode.mesh):void 0;meshAnnotations.push({meshes:primitives,type:this._convertV0FlagToV1Type(flag?.firstPersonFlag)})}),new VRMFirstPerson(humanoid,meshAnnotations)})}_convertV0FlagToV1Type(flag){return flag===`FirstPersonOnly`?`firstPersonOnly`:flag===`ThirdPersonOnly`?`thirdPersonOnly`:flag===`Both`?`both`:`auto`}},_v3A=new Vector3,_v3B=new Vector3,_quatA=new Quaternion,VRMHumanoidHelper=class extends Group{constructor(humanoid){super(),this.vrmHumanoid=humanoid,this._boneAxesMap=new Map,Object.values(humanoid.humanBones).forEach(bone=>{let helper=new AxesHelper(1);helper.matrixAutoUpdate=!1,helper.material.depthTest=!1,helper.material.depthWrite=!1,this.add(helper),this._boneAxesMap.set(bone,helper)})}dispose(){Array.from(this._boneAxesMap.values()).forEach(axes=>{axes.geometry.dispose(),axes.material.dispose()})}updateMatrixWorld(force){Array.from(this._boneAxesMap.entries()).forEach(([bone,axes])=>{bone.node.updateWorldMatrix(!0,!1),bone.node.matrixWorld.decompose(_v3A,_quatA,_v3B);let scale$1=_v3A.set(.1,.1,.1).divide(_v3B);axes.matrix.copy(bone.node.matrixWorld).scale(scale$1)}),super.updateMatrixWorld(force)}},VRMHumanBoneList=`hips.spine.chest.upperChest.neck.head.leftEye.rightEye.jaw.leftUpperLeg.leftLowerLeg.leftFoot.leftToes.rightUpperLeg.rightLowerLeg.rightFoot.rightToes.leftShoulder.leftUpperArm.leftLowerArm.leftHand.rightShoulder.rightUpperArm.rightLowerArm.rightHand.leftThumbMetacarpal.leftThumbProximal.leftThumbDistal.leftIndexProximal.leftIndexIntermediate.leftIndexDistal.leftMiddleProximal.leftMiddleIntermediate.leftMiddleDistal.leftRingProximal.leftRingIntermediate.leftRingDistal.leftLittleProximal.leftLittleIntermediate.leftLittleDistal.rightThumbMetacarpal.rightThumbProximal.rightThumbDistal.rightIndexProximal.rightIndexIntermediate.rightIndexDistal.rightMiddleProximal.rightMiddleIntermediate.rightMiddleDistal.rightRingProximal.rightRingIntermediate.rightRingDistal.rightLittleProximal.rightLittleIntermediate.rightLittleDistal`.split(`.`),VRMHumanBoneParentMap={hips:null,spine:`hips`,chest:`spine`,upperChest:`chest`,neck:`upperChest`,head:`neck`,leftEye:`head`,rightEye:`head`,jaw:`head`,leftUpperLeg:`hips`,leftLowerLeg:`leftUpperLeg`,leftFoot:`leftLowerLeg`,leftToes:`leftFoot`,rightUpperLeg:`hips`,rightLowerLeg:`rightUpperLeg`,rightFoot:`rightLowerLeg`,rightToes:`rightFoot`,leftShoulder:`upperChest`,leftUpperArm:`leftShoulder`,leftLowerArm:`leftUpperArm`,leftHand:`leftLowerArm`,rightShoulder:`upperChest`,rightUpperArm:`rightShoulder`,rightLowerArm:`rightUpperArm`,rightHand:`rightLowerArm`,leftThumbMetacarpal:`leftHand`,leftThumbProximal:`leftThumbMetacarpal`,leftThumbDistal:`leftThumbProximal`,leftIndexProximal:`leftHand`,leftIndexIntermediate:`leftIndexProximal`,leftIndexDistal:`leftIndexIntermediate`,leftMiddleProximal:`leftHand`,leftMiddleIntermediate:`leftMiddleProximal`,leftMiddleDistal:`leftMiddleIntermediate`,leftRingProximal:`leftHand`,leftRingIntermediate:`leftRingProximal`,leftRingDistal:`leftRingIntermediate`,leftLittleProximal:`leftHand`,leftLittleIntermediate:`leftLittleProximal`,leftLittleDistal:`leftLittleIntermediate`,rightThumbMetacarpal:`rightHand`,rightThumbProximal:`rightThumbMetacarpal`,rightThumbDistal:`rightThumbProximal`,rightIndexProximal:`rightHand`,rightIndexIntermediate:`rightIndexProximal`,rightIndexDistal:`rightIndexIntermediate`,rightMiddleProximal:`rightHand`,rightMiddleIntermediate:`rightMiddleProximal`,rightMiddleDistal:`rightMiddleIntermediate`,rightRingProximal:`rightHand`,rightRingIntermediate:`rightRingProximal`,rightRingDistal:`rightRingIntermediate`,rightLittleProximal:`rightHand`,rightLittleIntermediate:`rightLittleProximal`,rightLittleDistal:`rightLittleIntermediate`};function quatInvertCompat(target$1){return target$1.invert?target$1.invert():target$1.inverse(),target$1}var _v3A2=new Vector3,_quatA2=new Quaternion,VRMRig=class{constructor(humanBones){this.humanBones=humanBones,this.restPose=this.getAbsolutePose()}getAbsolutePose(){let pose={};return Object.keys(this.humanBones).forEach(vrmBoneNameString=>{let vrmBoneName=vrmBoneNameString,node$1=this.getBoneNode(vrmBoneName);node$1&&(_v3A2.copy(node$1.position),_quatA2.copy(node$1.quaternion),pose[vrmBoneName]={position:_v3A2.toArray(),rotation:_quatA2.toArray()})}),pose}getPose(){let pose={};return Object.keys(this.humanBones).forEach(boneNameString=>{let boneName=boneNameString,node$1=this.getBoneNode(boneName);if(!node$1)return;_v3A2.set(0,0,0),_quatA2.identity();let restState=this.restPose[boneName];restState?.position&&_v3A2.fromArray(restState.position).negate(),restState?.rotation&&quatInvertCompat(_quatA2.fromArray(restState.rotation)),_v3A2.add(node$1.position),_quatA2.premultiply(node$1.quaternion),pose[boneName]={position:_v3A2.toArray(),rotation:_quatA2.toArray()}}),pose}setPose(poseObject){Object.entries(poseObject).forEach(([boneNameString,state])=>{let boneName=boneNameString,node$1=this.getBoneNode(boneName);if(!node$1)return;let restState=this.restPose[boneName];restState&&(state?.position&&(node$1.position.fromArray(state.position),restState.position&&node$1.position.add(_v3A2.fromArray(restState.position))),state?.rotation&&(node$1.quaternion.fromArray(state.rotation),restState.rotation&&node$1.quaternion.multiply(_quatA2.fromArray(restState.rotation))))})}resetPose(){Object.entries(this.restPose).forEach(([boneName,rest])=>{let node$1=this.getBoneNode(boneName);node$1&&(rest?.position&&node$1.position.fromArray(rest.position),rest?.rotation&&node$1.quaternion.fromArray(rest.rotation))})}getBone(name$2){var _a$2;return(_a$2=this.humanBones[name$2])??void 0}getBoneNode(name$2){var _a$2,_b;return(_b=(_a$2=this.humanBones[name$2])?.node)??null}},_v3A3=new Vector3,_quatA3=new Quaternion,_boneWorldPos=new Vector3,VRMHumanoidRig=class _VRMHumanoidRig extends VRMRig{static _setupTransforms(modelRig){let root$3=new Object3D;root$3.name=`VRMHumanoidRig`;let boneWorldPositions={},boneWorldRotations={},boneRotations={},parentWorldRotations={};VRMHumanBoneList.forEach(boneName=>{var _a$2;let boneNode=modelRig.getBoneNode(boneName);if(boneNode){let boneWorldPosition=new Vector3,boneWorldRotation=new Quaternion;boneNode.updateWorldMatrix(!0,!1),boneNode.matrixWorld.decompose(boneWorldPosition,boneWorldRotation,_v3A3),boneWorldPositions[boneName]=boneWorldPosition,boneWorldRotations[boneName]=boneWorldRotation,boneRotations[boneName]=boneNode.quaternion.clone();let parentWorldRotation=new Quaternion;(_a$2=boneNode.parent)==null||_a$2.matrixWorld.decompose(_v3A3,parentWorldRotation,_v3A3),parentWorldRotations[boneName]=parentWorldRotation}});let rigBones={};return VRMHumanBoneList.forEach(boneName=>{var _a$2;let boneNode=modelRig.getBoneNode(boneName);if(boneNode){let boneWorldPosition=boneWorldPositions[boneName],currentBoneName=boneName,parentBoneWorldPosition;for(;parentBoneWorldPosition==null&&(currentBoneName=VRMHumanBoneParentMap[currentBoneName],currentBoneName!=null);)parentBoneWorldPosition=boneWorldPositions[currentBoneName];let rigBoneNode=new Object3D;rigBoneNode.name=`Normalized_`+boneNode.name;let parentRigBoneNode=currentBoneName?(_a$2=rigBones[currentBoneName])?.node:root$3;parentRigBoneNode.add(rigBoneNode),rigBoneNode.position.copy(boneWorldPosition),parentBoneWorldPosition&&rigBoneNode.position.sub(parentBoneWorldPosition),rigBones[boneName]={node:rigBoneNode}}}),{rigBones,root:root$3,parentWorldRotations,boneRotations}}constructor(humanoid){let{rigBones,root:root$3,parentWorldRotations,boneRotations}=_VRMHumanoidRig._setupTransforms(humanoid);super(rigBones),this.original=humanoid,this.root=root$3,this._parentWorldRotations=parentWorldRotations,this._boneRotations=boneRotations}update(){VRMHumanBoneList.forEach(boneName=>{let boneNode=this.original.getBoneNode(boneName);if(boneNode!=null){let rigBoneNode=this.getBoneNode(boneName),parentWorldRotation=this._parentWorldRotations[boneName],invParentWorldRotation=_quatA3.copy(parentWorldRotation).invert(),boneRotation=this._boneRotations[boneName];if(boneNode.quaternion.copy(rigBoneNode.quaternion).multiply(parentWorldRotation).premultiply(invParentWorldRotation).multiply(boneRotation),boneName===`hips`){let boneWorldPosition=rigBoneNode.getWorldPosition(_boneWorldPos);boneNode.parent.updateWorldMatrix(!0,!1);let parentWorldMatrix=boneNode.parent.matrixWorld,localPosition=boneWorldPosition.applyMatrix4(parentWorldMatrix.invert());boneNode.position.copy(localPosition)}}})}},VRMHumanoid=class _VRMHumanoid{get restPose(){return console.warn(`VRMHumanoid: restPose is deprecated. Use either rawRestPose or normalizedRestPose instead.`),this.rawRestPose}get rawRestPose(){return this._rawHumanBones.restPose}get normalizedRestPose(){return this._normalizedHumanBones.restPose}get humanBones(){return this._rawHumanBones.humanBones}get rawHumanBones(){return this._rawHumanBones.humanBones}get normalizedHumanBones(){return this._normalizedHumanBones.humanBones}get normalizedHumanBonesRoot(){return this._normalizedHumanBones.root}constructor(humanBones,options$1){var _a$2;this.autoUpdateHumanBones=(_a$2=options$1?.autoUpdateHumanBones)??!0,this._rawHumanBones=new VRMRig(humanBones),this._normalizedHumanBones=new VRMHumanoidRig(this._rawHumanBones)}copy(source){return this.autoUpdateHumanBones=source.autoUpdateHumanBones,this._rawHumanBones=new VRMRig(source.humanBones),this._normalizedHumanBones=new VRMHumanoidRig(this._rawHumanBones),this}clone(){return new _VRMHumanoid(this.humanBones,{autoUpdateHumanBones:this.autoUpdateHumanBones}).copy(this)}getAbsolutePose(){return console.warn(`VRMHumanoid: getAbsolutePose() is deprecated. Use either getRawAbsolutePose() or getNormalizedAbsolutePose() instead.`),this.getRawAbsolutePose()}getRawAbsolutePose(){return this._rawHumanBones.getAbsolutePose()}getNormalizedAbsolutePose(){return this._normalizedHumanBones.getAbsolutePose()}getPose(){return console.warn(`VRMHumanoid: getPose() is deprecated. Use either getRawPose() or getNormalizedPose() instead.`),this.getRawPose()}getRawPose(){return this._rawHumanBones.getPose()}getNormalizedPose(){return this._normalizedHumanBones.getPose()}setPose(poseObject){return console.warn(`VRMHumanoid: setPose() is deprecated. Use either setRawPose() or setNormalizedPose() instead.`),this.setRawPose(poseObject)}setRawPose(poseObject){return this._rawHumanBones.setPose(poseObject)}setNormalizedPose(poseObject){return this._normalizedHumanBones.setPose(poseObject)}resetPose(){return console.warn(`VRMHumanoid: resetPose() is deprecated. Use either resetRawPose() or resetNormalizedPose() instead.`),this.resetRawPose()}resetRawPose(){return this._rawHumanBones.resetPose()}resetNormalizedPose(){return this._normalizedHumanBones.resetPose()}getBone(name$2){return console.warn(`VRMHumanoid: getBone() is deprecated. Use either getRawBone() or getNormalizedBone() instead.`),this.getRawBone(name$2)}getRawBone(name$2){return this._rawHumanBones.getBone(name$2)}getNormalizedBone(name$2){return this._normalizedHumanBones.getBone(name$2)}getBoneNode(name$2){return console.warn(`VRMHumanoid: getBoneNode() is deprecated. Use either getRawBoneNode() or getNormalizedBoneNode() instead.`),this.getRawBoneNode(name$2)}getRawBoneNode(name$2){return this._rawHumanBones.getBoneNode(name$2)}getNormalizedBoneNode(name$2){return this._normalizedHumanBones.getBoneNode(name$2)}update(){this.autoUpdateHumanBones&&this._normalizedHumanBones.update()}},VRMRequiredHumanBoneName={Hips:`hips`,Spine:`spine`,Head:`head`,LeftUpperLeg:`leftUpperLeg`,LeftLowerLeg:`leftLowerLeg`,LeftFoot:`leftFoot`,RightUpperLeg:`rightUpperLeg`,RightLowerLeg:`rightLowerLeg`,RightFoot:`rightFoot`,LeftUpperArm:`leftUpperArm`,LeftLowerArm:`leftLowerArm`,LeftHand:`leftHand`,RightUpperArm:`rightUpperArm`,RightLowerArm:`rightLowerArm`,RightHand:`rightHand`},POSSIBLE_SPEC_VERSIONS3=new Set([`1.0`,`1.0-beta`]),thumbBoneNameMap={leftThumbProximal:`leftThumbMetacarpal`,leftThumbIntermediate:`leftThumbProximal`,rightThumbProximal:`rightThumbMetacarpal`,rightThumbIntermediate:`rightThumbProximal`},VRMHumanoidLoaderPlugin=class{get name(){return`VRMHumanoidLoaderPlugin`}constructor(parser,options$1){this.parser=parser,this.helperRoot=options$1?.helperRoot,this.autoUpdateHumanBones=options$1?.autoUpdateHumanBones}afterRoot(gltf){return __async2(this,null,function*(){gltf.userData.vrmHumanoid=yield this._import(gltf)})}_import(gltf){return __async2(this,null,function*(){let v1Result=yield this._v1Import(gltf);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf);return v0Result||null})}_v1Import(gltf){return __async2(this,null,function*(){var _a$2,_b;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS3.has(specVersion))return console.warn(`VRMHumanoidLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaHumanoid=extension$1.humanoid;if(!schemaHumanoid)return null;let existsPreviousThumbName=schemaHumanoid.humanBones.leftThumbIntermediate!=null||schemaHumanoid.humanBones.rightThumbIntermediate!=null,humanBones={};schemaHumanoid.humanBones!=null&&(yield Promise.all(Object.entries(schemaHumanoid.humanBones).map(_0=>__async2(this,[_0],function*([boneNameString,schemaHumanBone]){let boneName=boneNameString,index$1=schemaHumanBone.node;if(existsPreviousThumbName){let thumbBoneName=thumbBoneNameMap[boneName];thumbBoneName!=null&&(boneName=thumbBoneName)}let node$1=yield this.parser.getDependency(`node`,index$1);if(node$1==null){console.warn(`A glTF node bound to the humanoid bone ${boneName} (index = ${index$1}) does not exist`);return}humanBones[boneName]={node:node$1}}))));let humanoid=new VRMHumanoid(this._ensureRequiredBonesExist(humanBones),{autoUpdateHumanBones:this.autoUpdateHumanBones});if(gltf.scene.add(humanoid.normalizedHumanBonesRoot),this.helperRoot){let helper=new VRMHumanoidHelper(humanoid);this.helperRoot.add(helper),helper.renderOrder=this.helperRoot.renderOrder}return humanoid})}_v0Import(gltf){return __async2(this,null,function*(){var _a$2;let json=this.parser.json,vrmExt=(_a$2=json.extensions)?.VRM;if(!vrmExt)return null;let schemaHumanoid=vrmExt.humanoid;if(!schemaHumanoid)return null;let humanBones={};schemaHumanoid.humanBones!=null&&(yield Promise.all(schemaHumanoid.humanBones.map(bone=>__async2(this,null,function*(){let boneName=bone.bone,index$1=bone.node;if(boneName==null||index$1==null)return;let node$1=yield this.parser.getDependency(`node`,index$1);if(node$1==null){console.warn(`A glTF node bound to the humanoid bone ${boneName} (index = ${index$1}) does not exist`);return}let thumbBoneName=thumbBoneNameMap[boneName],newBoneName=thumbBoneName??boneName;if(humanBones[newBoneName]!=null){console.warn(`Multiple bone entries for ${newBoneName} detected (index = ${index$1}), ignoring duplicated entries.`);return}humanBones[newBoneName]={node:node$1}}))));let humanoid=new VRMHumanoid(this._ensureRequiredBonesExist(humanBones),{autoUpdateHumanBones:this.autoUpdateHumanBones});if(gltf.scene.add(humanoid.normalizedHumanBonesRoot),this.helperRoot){let helper=new VRMHumanoidHelper(humanoid);this.helperRoot.add(helper),helper.renderOrder=this.helperRoot.renderOrder}return humanoid})}_ensureRequiredBonesExist(humanBones){let missingRequiredBones=Object.values(VRMRequiredHumanBoneName).filter(requiredBoneName=>humanBones[requiredBoneName]==null);if(missingRequiredBones.length>0)throw Error(`VRMHumanoidLoaderPlugin: These humanoid bones are required but not exist: ${missingRequiredBones.join(`, `)}`);return humanBones}},FanBufferGeometry=class extends BufferGeometry{constructor(){super(),this._currentTheta=0,this._currentRadius=0,this.theta=0,this.radius=0,this._currentTheta=0,this._currentRadius=0,this._attrPos=new BufferAttribute(new Float32Array(195),3),this.setAttribute(`position`,this._attrPos),this._attrIndex=new BufferAttribute(new Uint16Array(189),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let shouldUpdateGeometry=!1;this._currentTheta!==this.theta&&(this._currentTheta=this.theta,shouldUpdateGeometry=!0),this._currentRadius!==this.radius&&(this._currentRadius=this.radius,shouldUpdateGeometry=!0),shouldUpdateGeometry&&this._buildPosition()}_buildPosition(){this._attrPos.setXYZ(0,0,0,0);for(let i=0;i<64;i++){let t$1=i/63*this._currentTheta;this._attrPos.setXYZ(i+1,this._currentRadius*Math.sin(t$1),0,this._currentRadius*Math.cos(t$1))}this._attrPos.needsUpdate=!0}_buildIndex(){for(let i=0;i<63;i++)this._attrIndex.setXYZ(i*3,0,i+1,i+2);this._attrIndex.needsUpdate=!0}},LineAndSphereBufferGeometry=class extends BufferGeometry{constructor(){super(),this.radius=0,this._currentRadius=0,this.tail=new Vector3,this._currentTail=new Vector3,this._attrPos=new BufferAttribute(new Float32Array(294),3),this.setAttribute(`position`,this._attrPos),this._attrIndex=new BufferAttribute(new Uint16Array(194),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let shouldUpdateGeometry=!1;this._currentRadius!==this.radius&&(this._currentRadius=this.radius,shouldUpdateGeometry=!0),this._currentTail.equals(this.tail)||(this._currentTail.copy(this.tail),shouldUpdateGeometry=!0),shouldUpdateGeometry&&this._buildPosition()}_buildPosition(){for(let i=0;i<32;i++){let t$1=i/16*Math.PI;this._attrPos.setXYZ(i,Math.cos(t$1),Math.sin(t$1),0),this._attrPos.setXYZ(32+i,0,Math.cos(t$1),Math.sin(t$1)),this._attrPos.setXYZ(64+i,Math.sin(t$1),0,Math.cos(t$1))}this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.setXYZ(96,0,0,0),this._attrPos.setXYZ(97,this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let i=0;i<32;i++){let i1=(i+1)%32;this._attrIndex.setXY(i*2,i,i1),this._attrIndex.setXY(64+i*2,32+i,32+i1),this._attrIndex.setXY(128+i*2,64+i,64+i1)}this._attrIndex.setXY(192,96,97),this._attrIndex.needsUpdate=!0}},_quatA4=new Quaternion,_quatB=new Quaternion,_v3A4=new Vector3,_v3B2=new Vector3,SQRT_2_OVER_2=Math.sqrt(2)/2,QUAT_XY_CW90=new Quaternion(0,0,-SQRT_2_OVER_2,SQRT_2_OVER_2),VEC3_POSITIVE_Y=new Vector3(0,1,0),VRMLookAtHelper=class extends Group{constructor(lookAt){super(),this.matrixAutoUpdate=!1,this.vrmLookAt=lookAt;{let geometry=new FanBufferGeometry;geometry.radius=.5;let material=new MeshBasicMaterial({color:65280,transparent:!0,opacity:.5,side:DoubleSide,depthTest:!1,depthWrite:!1});this._meshPitch=new Mesh(geometry,material),this.add(this._meshPitch)}{let geometry=new FanBufferGeometry;geometry.radius=.5;let material=new MeshBasicMaterial({color:16711680,transparent:!0,opacity:.5,side:DoubleSide,depthTest:!1,depthWrite:!1});this._meshYaw=new Mesh(geometry,material),this.add(this._meshYaw)}{let geometry=new LineAndSphereBufferGeometry;geometry.radius=.1;let material=new LineBasicMaterial({color:16777215,depthTest:!1,depthWrite:!1});this._lineTarget=new LineSegments(geometry,material),this._lineTarget.frustumCulled=!1,this.add(this._lineTarget)}}dispose(){this._meshYaw.geometry.dispose(),this._meshYaw.material.dispose(),this._meshPitch.geometry.dispose(),this._meshPitch.material.dispose(),this._lineTarget.geometry.dispose(),this._lineTarget.material.dispose()}updateMatrixWorld(force){let yaw=MathUtils.DEG2RAD*this.vrmLookAt.yaw;this._meshYaw.geometry.theta=yaw,this._meshYaw.geometry.update();let pitch=MathUtils.DEG2RAD*this.vrmLookAt.pitch;this._meshPitch.geometry.theta=pitch,this._meshPitch.geometry.update(),this.vrmLookAt.getLookAtWorldPosition(_v3A4),this.vrmLookAt.getLookAtWorldQuaternion(_quatA4),_quatA4.multiply(this.vrmLookAt.getFaceFrontQuaternion(_quatB)),this._meshYaw.position.copy(_v3A4),this._meshYaw.quaternion.copy(_quatA4),this._meshPitch.position.copy(_v3A4),this._meshPitch.quaternion.copy(_quatA4),this._meshPitch.quaternion.multiply(_quatB.setFromAxisAngle(VEC3_POSITIVE_Y,yaw)),this._meshPitch.quaternion.multiply(QUAT_XY_CW90);let{target:target$1,autoUpdate:autoUpdate$1}=this.vrmLookAt;target$1!=null&&autoUpdate$1&&(target$1.getWorldPosition(_v3B2).sub(_v3A4),this._lineTarget.geometry.tail.copy(_v3B2),this._lineTarget.geometry.update(),this._lineTarget.position.copy(_v3A4)),super.updateMatrixWorld(force)}},_position=new Vector3,_scale=new Vector3;function getWorldQuaternionLite(object$1,out){return object$1.matrixWorld.decompose(_position,out,_scale),out}function calcAzimuthAltitude(vector){return[Math.atan2(-vector.z,vector.x),Math.atan2(vector.y,Math.sqrt(vector.x*vector.x+vector.z*vector.z))]}function sanitizeAngle(angle){let roundTurn=Math.round(angle/2/Math.PI);return angle-2*Math.PI*roundTurn}var VEC3_POSITIVE_Z=new Vector3(0,0,1),_v3A5=new Vector3,_v3B3=new Vector3,_v3C=new Vector3,_quatA5=new Quaternion,_quatB2=new Quaternion,_quatC=new Quaternion,_quatD=new Quaternion,_eulerA=new Euler,_VRMLookAt=class _VRMLookAt2{constructor(humanoid,applier){this.offsetFromHeadBone=new Vector3,this.autoUpdate=!0,this.faceFront=new Vector3(0,0,1),this.humanoid=humanoid,this.applier=applier,this._yaw=0,this._pitch=0,this._needsUpdate=!0,this._restHeadWorldQuaternion=this.getLookAtWorldQuaternion(new Quaternion)}get yaw(){return this._yaw}set yaw(value$1){this._yaw=value$1,this._needsUpdate=!0}get pitch(){return this._pitch}set pitch(value$1){this._pitch=value$1,this._needsUpdate=!0}get euler(){return console.warn(`VRMLookAt: euler is deprecated. use getEuler() instead.`),this.getEuler(new Euler)}getEuler(target$1){return target$1.set(MathUtils.DEG2RAD*this._pitch,MathUtils.DEG2RAD*this._yaw,0,`YXZ`)}copy(source){if(this.humanoid!==source.humanoid)throw Error(`VRMLookAt: humanoid must be same in order to copy`);return this.offsetFromHeadBone.copy(source.offsetFromHeadBone),this.applier=source.applier,this.autoUpdate=source.autoUpdate,this.target=source.target,this.faceFront.copy(source.faceFront),this}clone(){return new _VRMLookAt2(this.humanoid,this.applier).copy(this)}reset(){this._yaw=0,this._pitch=0,this._needsUpdate=!0}getLookAtWorldPosition(target$1){let head$1=this.humanoid.getRawBoneNode(`head`);return target$1.copy(this.offsetFromHeadBone).applyMatrix4(head$1.matrixWorld)}getLookAtWorldQuaternion(target$1){let head$1=this.humanoid.getRawBoneNode(`head`);return getWorldQuaternionLite(head$1,target$1)}getFaceFrontQuaternion(target$1){if(this.faceFront.distanceToSquared(VEC3_POSITIVE_Z)<.01)return target$1.copy(this._restHeadWorldQuaternion).invert();let[faceFrontAzimuth,faceFrontAltitude]=calcAzimuthAltitude(this.faceFront);return _eulerA.set(0,.5*Math.PI+faceFrontAzimuth,faceFrontAltitude,`YZX`),target$1.setFromEuler(_eulerA).premultiply(_quatD.copy(this._restHeadWorldQuaternion).invert())}getLookAtWorldDirection(target$1){return this.getLookAtWorldQuaternion(_quatB2),this.getFaceFrontQuaternion(_quatC),target$1.copy(VEC3_POSITIVE_Z).applyQuaternion(_quatB2).applyQuaternion(_quatC).applyEuler(this.getEuler(_eulerA))}lookAt(position$2){let headRotDiffInv=_quatA5.copy(this._restHeadWorldQuaternion).multiply(quatInvertCompat(this.getLookAtWorldQuaternion(_quatB2))),headPos=this.getLookAtWorldPosition(_v3B3),lookAtDir=_v3C.copy(position$2).sub(headPos).applyQuaternion(headRotDiffInv).normalize(),[azimuthFrom,altitudeFrom]=calcAzimuthAltitude(this.faceFront),[azimuthTo,altitudeTo]=calcAzimuthAltitude(lookAtDir),yaw=sanitizeAngle(azimuthTo-azimuthFrom),pitch=sanitizeAngle(altitudeFrom-altitudeTo);this._yaw=MathUtils.RAD2DEG*yaw,this._pitch=MathUtils.RAD2DEG*pitch,this._needsUpdate=!0}update(delta){this.target!=null&&this.autoUpdate&&this.lookAt(this.target.getWorldPosition(_v3A5)),this._needsUpdate&&(this._needsUpdate=!1,this.applier.applyYawPitch(this._yaw,this._pitch))}};_VRMLookAt.EULER_ORDER=`YXZ`;var VRMLookAt=_VRMLookAt,VEC3_POSITIVE_Z2=new Vector3(0,0,1),_quatA6=new Quaternion,_quatB3=new Quaternion,_eulerA2=new Euler(0,0,0,`YXZ`),VRMLookAtBoneApplier=class{constructor(humanoid,rangeMapHorizontalInner,rangeMapHorizontalOuter,rangeMapVerticalDown,rangeMapVerticalUp){this.humanoid=humanoid,this.rangeMapHorizontalInner=rangeMapHorizontalInner,this.rangeMapHorizontalOuter=rangeMapHorizontalOuter,this.rangeMapVerticalDown=rangeMapVerticalDown,this.rangeMapVerticalUp=rangeMapVerticalUp,this.faceFront=new Vector3(0,0,1),this._restQuatLeftEye=new Quaternion,this._restQuatRightEye=new Quaternion,this._restLeftEyeParentWorldQuat=new Quaternion,this._restRightEyeParentWorldQuat=new Quaternion;let leftEye=this.humanoid.getRawBoneNode(`leftEye`),rightEye=this.humanoid.getRawBoneNode(`rightEye`);leftEye&&(this._restQuatLeftEye.copy(leftEye.quaternion),getWorldQuaternionLite(leftEye.parent,this._restLeftEyeParentWorldQuat)),rightEye&&(this._restQuatRightEye.copy(rightEye.quaternion),getWorldQuaternionLite(rightEye.parent,this._restRightEyeParentWorldQuat))}applyYawPitch(yaw,pitch){let leftEye=this.humanoid.getRawBoneNode(`leftEye`),rightEye=this.humanoid.getRawBoneNode(`rightEye`),leftEyeNormalized=this.humanoid.getNormalizedBoneNode(`leftEye`),rightEyeNormalized=this.humanoid.getNormalizedBoneNode(`rightEye`);leftEye&&(pitch<0?_eulerA2.x=-MathUtils.DEG2RAD*this.rangeMapVerticalDown.map(-pitch):_eulerA2.x=MathUtils.DEG2RAD*this.rangeMapVerticalUp.map(pitch),yaw<0?_eulerA2.y=-MathUtils.DEG2RAD*this.rangeMapHorizontalInner.map(-yaw):_eulerA2.y=MathUtils.DEG2RAD*this.rangeMapHorizontalOuter.map(yaw),_quatA6.setFromEuler(_eulerA2),this._getWorldFaceFrontQuat(_quatB3),leftEyeNormalized.quaternion.copy(_quatB3).multiply(_quatA6).multiply(_quatB3.invert()),_quatA6.copy(this._restLeftEyeParentWorldQuat),leftEye.quaternion.copy(leftEyeNormalized.quaternion).multiply(_quatA6).premultiply(_quatA6.invert()).multiply(this._restQuatLeftEye)),rightEye&&(pitch<0?_eulerA2.x=-MathUtils.DEG2RAD*this.rangeMapVerticalDown.map(-pitch):_eulerA2.x=MathUtils.DEG2RAD*this.rangeMapVerticalUp.map(pitch),yaw<0?_eulerA2.y=-MathUtils.DEG2RAD*this.rangeMapHorizontalOuter.map(-yaw):_eulerA2.y=MathUtils.DEG2RAD*this.rangeMapHorizontalInner.map(yaw),_quatA6.setFromEuler(_eulerA2),this._getWorldFaceFrontQuat(_quatB3),rightEyeNormalized.quaternion.copy(_quatB3).multiply(_quatA6).multiply(_quatB3.invert()),_quatA6.copy(this._restRightEyeParentWorldQuat),rightEye.quaternion.copy(rightEyeNormalized.quaternion).multiply(_quatA6).premultiply(_quatA6.invert()).multiply(this._restQuatRightEye))}lookAt(euler){console.warn(`VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.`);let yaw=MathUtils.RAD2DEG*euler.y,pitch=MathUtils.RAD2DEG*euler.x;this.applyYawPitch(yaw,pitch)}_getWorldFaceFrontQuat(target$1){if(this.faceFront.distanceToSquared(VEC3_POSITIVE_Z2)<.01)return target$1.identity();let[faceFrontAzimuth,faceFrontAltitude]=calcAzimuthAltitude(this.faceFront);return _eulerA2.set(0,.5*Math.PI+faceFrontAzimuth,faceFrontAltitude,`YZX`),target$1.setFromEuler(_eulerA2)}};VRMLookAtBoneApplier.type=`bone`;var VRMLookAtExpressionApplier=class{constructor(expressions,rangeMapHorizontalInner,rangeMapHorizontalOuter,rangeMapVerticalDown,rangeMapVerticalUp){this.expressions=expressions,this.rangeMapHorizontalInner=rangeMapHorizontalInner,this.rangeMapHorizontalOuter=rangeMapHorizontalOuter,this.rangeMapVerticalDown=rangeMapVerticalDown,this.rangeMapVerticalUp=rangeMapVerticalUp}applyYawPitch(yaw,pitch){pitch<0?(this.expressions.setValue(`lookDown`,0),this.expressions.setValue(`lookUp`,this.rangeMapVerticalUp.map(-pitch))):(this.expressions.setValue(`lookUp`,0),this.expressions.setValue(`lookDown`,this.rangeMapVerticalDown.map(pitch))),yaw<0?(this.expressions.setValue(`lookLeft`,0),this.expressions.setValue(`lookRight`,this.rangeMapHorizontalOuter.map(-yaw))):(this.expressions.setValue(`lookRight`,0),this.expressions.setValue(`lookLeft`,this.rangeMapHorizontalOuter.map(yaw)))}lookAt(euler){console.warn(`VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.`);let yaw=MathUtils.RAD2DEG*euler.y,pitch=MathUtils.RAD2DEG*euler.x;this.applyYawPitch(yaw,pitch)}};VRMLookAtExpressionApplier.type=`expression`;var VRMLookAtRangeMap=class{constructor(inputMaxValue,outputScale){this.inputMaxValue=inputMaxValue,this.outputScale=outputScale}map(src){return this.outputScale*saturate(src/this.inputMaxValue)}},POSSIBLE_SPEC_VERSIONS4=new Set([`1.0`,`1.0-beta`]),INPUT_MAX_VALUE_MINIMUM=.01,VRMLookAtLoaderPlugin=class{get name(){return`VRMLookAtLoaderPlugin`}constructor(parser,options$1){this.parser=parser,this.helperRoot=options$1?.helperRoot}afterRoot(gltf){return __async2(this,null,function*(){let vrmHumanoid=gltf.userData.vrmHumanoid;if(vrmHumanoid===null)return;if(vrmHumanoid===void 0)throw Error(`VRMLookAtLoaderPlugin: vrmHumanoid is undefined. VRMHumanoidLoaderPlugin have to be used first`);let vrmExpressionManager=gltf.userData.vrmExpressionManager;if(vrmExpressionManager!==null){if(vrmExpressionManager===void 0)throw Error(`VRMLookAtLoaderPlugin: vrmExpressionManager is undefined. VRMExpressionLoaderPlugin have to be used first`);gltf.userData.vrmLookAt=yield this._import(gltf,vrmHumanoid,vrmExpressionManager)}})}_import(gltf,humanoid,expressions){return __async2(this,null,function*(){if(humanoid==null||expressions==null)return null;let v1Result=yield this._v1Import(gltf,humanoid,expressions);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf,humanoid,expressions);return v0Result||null})}_v1Import(gltf,humanoid,expressions){return __async2(this,null,function*(){var _a$2,_b,_c;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS4.has(specVersion))return console.warn(`VRMLookAtLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaLookAt=extension$1.lookAt;if(!schemaLookAt)return null;let defaultOutputScale=schemaLookAt.type===`expression`?1:10,mapHI=this._v1ImportRangeMap(schemaLookAt.rangeMapHorizontalInner,defaultOutputScale),mapHO=this._v1ImportRangeMap(schemaLookAt.rangeMapHorizontalOuter,defaultOutputScale),mapVD=this._v1ImportRangeMap(schemaLookAt.rangeMapVerticalDown,defaultOutputScale),mapVU=this._v1ImportRangeMap(schemaLookAt.rangeMapVerticalUp,defaultOutputScale),applier;applier=schemaLookAt.type===`expression`?new VRMLookAtExpressionApplier(expressions,mapHI,mapHO,mapVD,mapVU):new VRMLookAtBoneApplier(humanoid,mapHI,mapHO,mapVD,mapVU);let lookAt=this._importLookAt(humanoid,applier);return lookAt.offsetFromHeadBone.fromArray((_c=schemaLookAt.offsetFromHeadBone)??[0,.06,0]),lookAt})}_v1ImportRangeMap(schemaRangeMap,defaultOutputScale){var _a$2,_b;let inputMaxValue=(_a$2=schemaRangeMap?.inputMaxValue)??90,outputScale=(_b=schemaRangeMap?.outputScale)??defaultOutputScale;return inputMaxValue(console.error(error),console.warn(`VRMMetaLoaderPlugin: Failed to load a thumbnail image`),null))})}},VRMCore=class{constructor(params){this.scene=params.scene,this.meta=params.meta,this.humanoid=params.humanoid,this.expressionManager=params.expressionManager,this.firstPerson=params.firstPerson,this.lookAt=params.lookAt}update(delta){this.humanoid.update(),this.lookAt&&this.lookAt.update(delta),this.expressionManager&&this.expressionManager.update()}},VRM=class extends VRMCore{constructor(params){super(params),this.materials=params.materials,this.springBoneManager=params.springBoneManager,this.nodeConstraintManager=params.nodeConstraintManager}update(delta){super.update(delta),this.nodeConstraintManager&&this.nodeConstraintManager.update(),this.springBoneManager&&this.springBoneManager.update(delta),this.materials&&this.materials.forEach(material=>{material.update&&material.update(delta)})}},__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(obj,key$2,value$1)=>key$2 in obj?__defProp(obj,key$2,{enumerable:!0,configurable:!0,writable:!0,value:value$1}):obj[key$2]=value$1,__spreadValues=(a$1,b$1)=>{for(var prop in b$1||={})__hasOwnProp.call(b$1,prop)&&__defNormalProp(a$1,prop,b$1[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b$1))__propIsEnum.call(b$1,prop)&&__defNormalProp(a$1,prop,b$1[prop]);return a$1},__async3=(__this,__arguments,generator)=>new Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),colorSpaceEncodingMap={"":3e3,srgb:3001};function setTextureColorSpace(texture,colorSpace){parseInt(REVISION,10)>=152?texture.colorSpace=colorSpace:texture.encoding=colorSpaceEncodingMap[colorSpace]}var GLTFMToonMaterialParamsAssignHelper=class{get pending(){return Promise.all(this._pendings)}constructor(parser,materialParams){this._parser=parser,this._materialParams=materialParams,this._pendings=[]}assignPrimitive(key$2,value$1){value$1!=null&&(this._materialParams[key$2]=value$1)}assignColor(key$2,value$1,convertSRGBToLinear){value$1!=null&&(this._materialParams[key$2]=new Color().fromArray(value$1),convertSRGBToLinear&&this._materialParams[key$2].convertSRGBToLinear())}assignTexture(key$2,texture,isColorTexture){return __async3(this,null,function*(){let promise=(()=>__async3(this,null,function*(){texture!=null&&(yield this._parser.assignTexture(this._materialParams,key$2,texture),isColorTexture&&setTextureColorSpace(this._materialParams[key$2],`srgb`))}))();return this._pendings.push(promise),promise})}assignTextureByIndex(key$2,textureIndex,isColorTexture){return __async3(this,null,function*(){return this.assignTexture(key$2,textureIndex==null?void 0:{index:textureIndex},isColorTexture)})}},mtoon_default=`// #define PHONG +var __async=(__this,__arguments,generator)=>new Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),__async2=(__this,__arguments,generator)=>new Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),VRMExpression=class extends Object3D{constructor(expressionName){super(),this.weight=0,this.isBinary=!1,this.overrideBlink=`none`,this.overrideLookAt=`none`,this.overrideMouth=`none`,this._binds=[],this.name=`VRMExpression_${expressionName}`,this.expressionName=expressionName,this.type=`VRMExpression`,this.visible=!1}get binds(){return this._binds}get overrideBlinkAmount(){return this.overrideBlink===`block`?0.5?1:0:this.weight}addBind(bind){this._binds.push(bind)}deleteBind(bind){let index$1=this._binds.indexOf(bind);index$1>=0&&this._binds.splice(index$1,1)}applyWeight(options$1){var _a$2;let actualWeight=this.outputWeight;actualWeight*=(_a$2=options$1?.multiplier)??1,this.isBinary&&actualWeight<1&&(actualWeight=0),this._binds.forEach(bind=>bind.applyWeight(actualWeight))}clearAppliedWeight(){this._binds.forEach(bind=>bind.clearAppliedWeight())}};function extractPrimitivesInternal(gltf,nodeIndex,node$1){var _a$2,_b;let json=gltf.parser.json,schemaNode=(_a$2=json.nodes)?.[nodeIndex];if(schemaNode==null)return console.warn(`extractPrimitivesInternal: Attempt to use nodes[${nodeIndex}] of glTF but the node doesn't exist`),null;let meshIndex=schemaNode.mesh;if(meshIndex==null)return null;let schemaMesh=(_b=json.meshes)?.[meshIndex];if(schemaMesh==null)return console.warn(`extractPrimitivesInternal: Attempt to use meshes[${meshIndex}] of glTF but the mesh doesn't exist`),null;let primitiveCount=schemaMesh.primitives.length,primitives=[];return node$1.traverse(object$1=>{primitives.length{let result=extractPrimitivesInternal(gltf,index$1,node$1);result!=null&&map.set(index$1,result)}),map})}var VRMExpressionPresetName={Aa:`aa`,Ih:`ih`,Ou:`ou`,Ee:`ee`,Oh:`oh`,Blink:`blink`,Happy:`happy`,Angry:`angry`,Sad:`sad`,Relaxed:`relaxed`,LookUp:`lookUp`,Surprised:`surprised`,LookDown:`lookDown`,LookLeft:`lookLeft`,LookRight:`lookRight`,BlinkLeft:`blinkLeft`,BlinkRight:`blinkRight`,Neutral:`neutral`};function saturate(value$1){return Math.max(Math.min(value$1,1),0)}var VRMExpressionManager=class _VRMExpressionManager{constructor(){this.blinkExpressionNames=[`blink`,`blinkLeft`,`blinkRight`],this.lookAtExpressionNames=[`lookLeft`,`lookRight`,`lookUp`,`lookDown`],this.mouthExpressionNames=[`aa`,`ee`,`ih`,`oh`,`ou`],this._expressions=[],this._expressionMap={}}get expressions(){return this._expressions.concat()}get expressionMap(){return Object.assign({},this._expressionMap)}get presetExpressionMap(){let result={},presetNameSet=new Set(Object.values(VRMExpressionPresetName));return Object.entries(this._expressionMap).forEach(([name$2,expression])=>{presetNameSet.has(name$2)&&(result[name$2]=expression)}),result}get customExpressionMap(){let result={},presetNameSet=new Set(Object.values(VRMExpressionPresetName));return Object.entries(this._expressionMap).forEach(([name$2,expression])=>{presetNameSet.has(name$2)||(result[name$2]=expression)}),result}copy(source){let expressions=this._expressions.concat();return expressions.forEach(expression=>{this.unregisterExpression(expression)}),source._expressions.forEach(expression=>{this.registerExpression(expression)}),this.blinkExpressionNames=source.blinkExpressionNames.concat(),this.lookAtExpressionNames=source.lookAtExpressionNames.concat(),this.mouthExpressionNames=source.mouthExpressionNames.concat(),this}clone(){return new _VRMExpressionManager().copy(this)}getExpression(name$2){var _a$2;return(_a$2=this._expressionMap[name$2])??null}registerExpression(expression){this._expressions.push(expression),this._expressionMap[expression.expressionName]=expression}unregisterExpression(expression){let index$1=this._expressions.indexOf(expression);index$1===-1&&console.warn(`VRMExpressionManager: The specified expressions is not registered`),this._expressions.splice(index$1,1),delete this._expressionMap[expression.expressionName]}getValue(name$2){var _a$2;let expression=this.getExpression(name$2);return(_a$2=expression?.weight)??null}setValue(name$2,weight){let expression=this.getExpression(name$2);expression&&(expression.weight=saturate(weight))}resetValues(){this._expressions.forEach(expression=>{expression.weight=0})}getExpressionTrackName(name$2){let expression=this.getExpression(name$2);return expression?`${expression.name}.weight`:null}update(){let weightMultipliers=this._calculateWeightMultipliers();this._expressions.forEach(expression=>{expression.clearAppliedWeight()}),this._expressions.forEach(expression=>{let multiplier=1,name$2=expression.expressionName;this.blinkExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.blink),this.lookAtExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.lookAt),this.mouthExpressionNames.indexOf(name$2)!==-1&&(multiplier*=weightMultipliers.mouth),expression.applyWeight({multiplier})})}_calculateWeightMultipliers(){let blink=1,lookAt=1,mouth=1;return this._expressions.forEach(expression=>{blink-=expression.overrideBlinkAmount,lookAt-=expression.overrideLookAtAmount,mouth-=expression.overrideMouthAmount}),blink=Math.max(0,blink),lookAt=Math.max(0,lookAt),mouth=Math.max(0,mouth),{blink,lookAt,mouth}}},VRMExpressionMaterialColorType={Color:`color`,EmissionColor:`emissionColor`,ShadeColor:`shadeColor`,MatcapColor:`matcapColor`,RimColor:`rimColor`,OutlineColor:`outlineColor`},v0ExpressionMaterialColorMap={_Color:VRMExpressionMaterialColorType.Color,_EmissionColor:VRMExpressionMaterialColorType.EmissionColor,_ShadeColor:VRMExpressionMaterialColorType.ShadeColor,_RimColor:VRMExpressionMaterialColorType.RimColor,_OutlineColor:VRMExpressionMaterialColorType.OutlineColor},_color=new Color,_VRMExpressionMaterialColorBind=class _VRMExpressionMaterialColorBind2{constructor({material,type,targetValue,targetAlpha}){this.material=material,this.type=type,this.targetValue=targetValue,this.targetAlpha=targetAlpha??1;let color$2=this._initColorBindState(),alpha$1=this._initAlphaBindState();this._state={color:color$2,alpha:alpha$1}}applyWeight(weight){let{color:color$2,alpha:alpha$1}=this._state;if(color$2!=null){let{propertyName,deltaValue}=color$2,target$1=this.material[propertyName];target$1?.add(_color.copy(deltaValue).multiplyScalar(weight))}if(alpha$1!=null){let{propertyName,deltaValue}=alpha$1,target$1=this.material[propertyName];target$1!=null&&(this.material[propertyName]+=deltaValue*weight)}}clearAppliedWeight(){let{color:color$2,alpha:alpha$1}=this._state;if(color$2!=null){let{propertyName,initialValue}=color$2,target$1=this.material[propertyName];target$1?.copy(initialValue)}if(alpha$1!=null){let{propertyName,initialValue}=alpha$1,target$1=this.material[propertyName];target$1!=null&&(this.material[propertyName]=initialValue)}}_initColorBindState(){var _a$2,_b,_c;let{material,type,targetValue}=this,propertyNameMap=this._getPropertyNameMap(),propertyName=(_b=(_a$2=propertyNameMap?.[type])?.[0])??null;if(propertyName==null)return console.warn(`Tried to add a material color bind to the material ${(_c=material.name)??`(no name)`}, the type ${type} but the material or the type is not supported.`),null;let target$1=material[propertyName],initialValue=target$1.clone(),deltaValue=new Color(targetValue.r-initialValue.r,targetValue.g-initialValue.g,targetValue.b-initialValue.b);return{propertyName,initialValue,deltaValue}}_initAlphaBindState(){var _a$2,_b,_c;let{material,type,targetAlpha}=this,propertyNameMap=this._getPropertyNameMap(),propertyName=(_b=(_a$2=propertyNameMap?.[type])?.[1])??null;if(propertyName==null&&targetAlpha!==1)return console.warn(`Tried to add a material alpha bind to the material ${(_c=material.name)??`(no name)`}, the type ${type} but the material or the type does not support alpha.`),null;if(propertyName==null)return null;let initialValue=material[propertyName],deltaValue=targetAlpha-initialValue;return{propertyName,initialValue,deltaValue}}_getPropertyNameMap(){var _a$2,_b;return(_b=(_a$2=Object.entries(_VRMExpressionMaterialColorBind2._propertyNameMapMap).find(([distinguisher])=>this.material[distinguisher]===!0))?.[1])??null}};_VRMExpressionMaterialColorBind._propertyNameMapMap={isMeshStandardMaterial:{color:[`color`,`opacity`],emissionColor:[`emissive`,null]},isMeshBasicMaterial:{color:[`color`,`opacity`]},isMToonMaterial:{color:[`color`,`opacity`],emissionColor:[`emissive`,null],outlineColor:[`outlineColorFactor`,null],matcapColor:[`matcapFactor`,null],rimColor:[`parametricRimColorFactor`,null],shadeColor:[`shadeColorFactor`,null]}};var VRMExpressionMaterialColorBind=_VRMExpressionMaterialColorBind,VRMExpressionMorphTargetBind=class{constructor({primitives,index:index$1,weight}){this.primitives=primitives,this.index=index$1,this.weight=weight}applyWeight(weight){this.primitives.forEach(mesh=>{var _a$2;(_a$2=mesh.morphTargetInfluences)?.[this.index]!=null&&(mesh.morphTargetInfluences[this.index]+=this.weight*weight)})}clearAppliedWeight(){this.primitives.forEach(mesh=>{var _a$2;(_a$2=mesh.morphTargetInfluences)?.[this.index]!=null&&(mesh.morphTargetInfluences[this.index]=0)})}},_v2=new Vector2,_VRMExpressionTextureTransformBind=class _VRMExpressionTextureTransformBind2{constructor({material,scale:scale$1,offset:offset$2}){var _a$2,_b;this.material=material,this.scale=scale$1,this.offset=offset$2;let propertyNames=(_a$2=Object.entries(_VRMExpressionTextureTransformBind2._propertyNamesMap).find(([distinguisher])=>material[distinguisher]===!0))?.[1];propertyNames==null?(console.warn(`Tried to add a texture transform bind to the material ${(_b=material.name)??`(no name)`} but the material is not supported.`),this._properties=[]):(this._properties=[],propertyNames.forEach(propertyName=>{var _a2;let texture=(_a2=material[propertyName])?.clone();if(!texture)return null;material[propertyName]=texture;let initialOffset=texture.offset.clone(),initialScale=texture.repeat.clone(),deltaOffset=offset$2.clone().sub(initialOffset),deltaScale=scale$1.clone().sub(initialScale);this._properties.push({name:propertyName,initialOffset,deltaOffset,initialScale,deltaScale})}))}applyWeight(weight){this._properties.forEach(property=>{let target$1=this.material[property.name];target$1!==void 0&&(target$1.offset.add(_v2.copy(property.deltaOffset).multiplyScalar(weight)),target$1.repeat.add(_v2.copy(property.deltaScale).multiplyScalar(weight)))})}clearAppliedWeight(){this._properties.forEach(property=>{let target$1=this.material[property.name];target$1!==void 0&&(target$1.offset.copy(property.initialOffset),target$1.repeat.copy(property.initialScale))})}};_VRMExpressionTextureTransformBind._propertyNamesMap={isMeshStandardMaterial:[`map`,`emissiveMap`,`bumpMap`,`normalMap`,`displacementMap`,`roughnessMap`,`metalnessMap`,`alphaMap`],isMeshBasicMaterial:[`map`,`specularMap`,`alphaMap`],isMToonMaterial:[`map`,`normalMap`,`emissiveMap`,`shadeMultiplyTexture`,`rimMultiplyTexture`,`outlineWidthMultiplyTexture`,`uvAnimationMaskTexture`]};var VRMExpressionTextureTransformBind=_VRMExpressionTextureTransformBind,POSSIBLE_SPEC_VERSIONS=new Set([`1.0`,`1.0-beta`]),_VRMExpressionLoaderPlugin=class _VRMExpressionLoaderPlugin2{get name(){return`VRMExpressionLoaderPlugin`}constructor(parser){this.parser=parser}afterRoot(gltf){return __async2(this,null,function*(){gltf.userData.vrmExpressionManager=yield this._import(gltf)})}_import(gltf){return __async2(this,null,function*(){let v1Result=yield this._v1Import(gltf);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf);return v0Result||null})}_v1Import(gltf){return __async2(this,null,function*(){var _a$2,_b;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS.has(specVersion))return console.warn(`VRMExpressionLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaExpressions=extension$1.expressions;if(!schemaExpressions)return null;let presetNameSet=new Set(Object.values(VRMExpressionPresetName)),nameSchemaExpressionMap=new Map;schemaExpressions.preset!=null&&Object.entries(schemaExpressions.preset).forEach(([name$2,schemaExpression])=>{if(schemaExpression!=null){if(!presetNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: Unknown preset name "${name$2}" detected. Ignoring the expression`);return}nameSchemaExpressionMap.set(name$2,schemaExpression)}}),schemaExpressions.custom!=null&&Object.entries(schemaExpressions.custom).forEach(([name$2,schemaExpression])=>{if(presetNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: Custom expression cannot have preset name "${name$2}". Ignoring the expression`);return}nameSchemaExpressionMap.set(name$2,schemaExpression)});let manager=new VRMExpressionManager;return yield Promise.all(Array.from(nameSchemaExpressionMap.entries()).map(_0=>__async2(this,[_0],function*([name$2,schemaExpression]){var _a2,_b2,_c,_d,_e$1,_f,_g;let expression=new VRMExpression(name$2);if(gltf.scene.add(expression),expression.isBinary=(_a2=schemaExpression.isBinary)??!1,expression.overrideBlink=(_b2=schemaExpression.overrideBlink)??`none`,expression.overrideLookAt=(_c=schemaExpression.overrideLookAt)??`none`,expression.overrideMouth=(_d=schemaExpression.overrideMouth)??`none`,(_e$1=schemaExpression.morphTargetBinds)==null||_e$1.forEach(bind=>__async2(this,null,function*(){var _a3;if(bind.node===void 0||bind.index===void 0)return;let primitives=yield gltfExtractPrimitivesFromNode(gltf,bind.node),morphTargetIndex=bind.index;if(!primitives.every(primitive=>Array.isArray(primitive.morphTargetInfluences)&&morphTargetIndex{let material=object$1.material;material&&(Array.isArray(material)?gltfMaterials.push(...material):gltfMaterials.push(material))}),(_f=schemaExpression.materialColorBinds)==null||_f.forEach(bind=>__async2(this,null,function*(){let materials=gltfMaterials.filter(material=>{var _a3;let materialIndex=(_a3=this.parser.associations.get(material))?.materials;return bind.material===materialIndex});materials.forEach(material=>{expression.addBind(new VRMExpressionMaterialColorBind({material,type:bind.type,targetValue:new Color().fromArray(bind.targetValue),targetAlpha:bind.targetValue[3]}))})})),(_g=schemaExpression.textureTransformBinds)==null||_g.forEach(bind=>__async2(this,null,function*(){let materials=gltfMaterials.filter(material=>{var _a3;let materialIndex=(_a3=this.parser.associations.get(material))?.materials;return bind.material===materialIndex});materials.forEach(material=>{var _a3,_b3;expression.addBind(new VRMExpressionTextureTransformBind({material,offset:new Vector2().fromArray((_a3=bind.offset)??[0,0]),scale:new Vector2().fromArray((_b3=bind.scale)??[1,1])}))})}))}manager.registerExpression(expression)}))),manager})}_v0Import(gltf){return __async2(this,null,function*(){var _a$2;let json=this.parser.json,vrmExt=(_a$2=json.extensions)?.VRM;if(!vrmExt)return null;let schemaBlendShape=vrmExt.blendShapeMaster;if(!schemaBlendShape)return null;let manager=new VRMExpressionManager,schemaBlendShapeGroups=schemaBlendShape.blendShapeGroups;if(!schemaBlendShapeGroups)return manager;let blendShapeNameSet=new Set;return yield Promise.all(schemaBlendShapeGroups.map(schemaGroup=>__async2(this,null,function*(){var _a2;let v0PresetName=schemaGroup.presetName,v1PresetName=v0PresetName!=null&&_VRMExpressionLoaderPlugin2.v0v1PresetNameMap[v0PresetName]||null,name$2=v1PresetName??schemaGroup.name;if(name$2==null){console.warn(`VRMExpressionLoaderPlugin: One of custom expressions has no name. Ignoring the expression`);return}if(blendShapeNameSet.has(name$2)){console.warn(`VRMExpressionLoaderPlugin: An expression preset ${v0PresetName} has duplicated entries. Ignoring the expression`);return}blendShapeNameSet.add(name$2);let expression=new VRMExpression(name$2);gltf.scene.add(expression),expression.isBinary=(_a2=schemaGroup.isBinary)??!1,schemaGroup.binds&&schemaGroup.binds.forEach(bind=>__async2(this,null,function*(){var _a3;if(bind.mesh===void 0||bind.index===void 0)return;let nodesUsingMesh=[];(_a3=json.nodes)==null||_a3.forEach((node$1,i)=>{node$1.mesh===bind.mesh&&nodesUsingMesh.push(i)});let morphTargetIndex=bind.index;yield Promise.all(nodesUsingMesh.map(nodeIndex=>__async2(this,null,function*(){var _a4;let primitives=yield gltfExtractPrimitivesFromNode(gltf,nodeIndex);if(!primitives.every(primitive=>Array.isArray(primitive.morphTargetInfluences)&&morphTargetIndex{if(materialValue.materialName===void 0||materialValue.propertyName===void 0||materialValue.targetValue===void 0)return;let materials=[];gltf.scene.traverse(object$1=>{if(object$1.material){let material=object$1.material;Array.isArray(material)?materials.push(...material.filter(mtl=>(mtl.name===materialValue.materialName||mtl.name===materialValue.materialName+` (Outline)`)&&materials.indexOf(mtl)===-1)):material.name===materialValue.materialName&&materials.indexOf(material)===-1&&materials.push(material)}});let materialPropertyName=materialValue.propertyName;materials.forEach(material=>{if(materialPropertyName===`_MainTex_ST`){let scale$1=new Vector2(materialValue.targetValue[0],materialValue.targetValue[1]),offset$2=new Vector2(materialValue.targetValue[2],materialValue.targetValue[3]);offset$2.y=1-offset$2.y-scale$1.y,expression.addBind(new VRMExpressionTextureTransformBind({material,scale:scale$1,offset:offset$2}));return}let materialColorType=v0ExpressionMaterialColorMap[materialPropertyName];if(materialColorType){expression.addBind(new VRMExpressionMaterialColorBind({material,type:materialColorType,targetValue:new Color().fromArray(materialValue.targetValue),targetAlpha:materialValue.targetValue[3]}));return}console.warn(materialPropertyName+` is not supported`)})}),manager.registerExpression(expression)}))),manager})}};_VRMExpressionLoaderPlugin.v0v1PresetNameMap={a:`aa`,e:`ee`,i:`ih`,o:`oh`,u:`ou`,blink:`blink`,joy:`happy`,angry:`angry`,sorrow:`sad`,fun:`relaxed`,lookup:`lookUp`,lookdown:`lookDown`,lookleft:`lookLeft`,lookright:`lookRight`,blink_l:`blinkLeft`,blink_r:`blinkRight`,neutral:`neutral`};var VRMExpressionLoaderPlugin=_VRMExpressionLoaderPlugin,_VRMFirstPerson=class _VRMFirstPerson2{constructor(humanoid,meshAnnotations){this._firstPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_FIRSTPERSON_ONLY_LAYER,this._thirdPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_THIRDPERSON_ONLY_LAYER,this._initializedLayers=!1,this.humanoid=humanoid,this.meshAnnotations=meshAnnotations}copy(source){if(this.humanoid!==source.humanoid)throw Error(`VRMFirstPerson: humanoid must be same in order to copy`);return this.meshAnnotations=source.meshAnnotations.map(annotation=>({meshes:annotation.meshes.concat(),type:annotation.type})),this}clone(){return new _VRMFirstPerson2(this.humanoid,this.meshAnnotations).copy(this)}get firstPersonOnlyLayer(){return this._firstPersonOnlyLayer}get thirdPersonOnlyLayer(){return this._thirdPersonOnlyLayer}setup({firstPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_FIRSTPERSON_ONLY_LAYER,thirdPersonOnlyLayer=_VRMFirstPerson2.DEFAULT_THIRDPERSON_ONLY_LAYER}={}){this._initializedLayers||(this._firstPersonOnlyLayer=firstPersonOnlyLayer,this._thirdPersonOnlyLayer=thirdPersonOnlyLayer,this.meshAnnotations.forEach(item=>{item.meshes.forEach(mesh=>{item.type===`firstPersonOnly`?(mesh.layers.set(this._firstPersonOnlyLayer),mesh.traverse(child=>child.layers.set(this._firstPersonOnlyLayer))):item.type===`thirdPersonOnly`?(mesh.layers.set(this._thirdPersonOnlyLayer),mesh.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer))):item.type===`auto`&&this._createHeadlessModel(mesh)})}),this._initializedLayers=!0)}_excludeTriangles(triangles,bws,skinIndex,exclude){let count$2=0;if(bws!=null&&bws.length>0)for(let i=0;i0&&exclude.includes(skin0[0])||bw0[1]>0&&exclude.includes(skin0[1])||bw0[2]>0&&exclude.includes(skin0[2])||bw0[3]>0&&exclude.includes(skin0[3]))continue;let bw1=bws[b$1],skin1=skinIndex[b$1];if(bw1[0]>0&&exclude.includes(skin1[0])||bw1[1]>0&&exclude.includes(skin1[1])||bw1[2]>0&&exclude.includes(skin1[2])||bw1[3]>0&&exclude.includes(skin1[3]))continue;let bw2=bws[c$3],skin2=skinIndex[c$3];bw2[0]>0&&exclude.includes(skin2[0])||bw2[1]>0&&exclude.includes(skin2[1])||bw2[2]>0&&exclude.includes(skin2[2])||bw2[3]>0&&exclude.includes(skin2[3])||(triangles[count$2++]=a$1,triangles[count$2++]=b$1,triangles[count$2++]=c$3)}return count$2}_createErasedMesh(src,erasingBonesIndex){let dst=new SkinnedMesh(src.geometry.clone(),src.material);dst.name=`${src.name}(erase)`,dst.frustumCulled=src.frustumCulled,dst.layers.set(this._firstPersonOnlyLayer);let geometry=dst.geometry,skinIndexAttr=geometry.getAttribute(`skinIndex`),skinIndexAttrArray=skinIndexAttr instanceof GLBufferAttribute?[]:skinIndexAttr.array,skinIndex=[];for(let i=0;i{this._isEraseTarget(bone)&&eraseBoneIndexes.push(index$1)}),!eraseBoneIndexes.length){mesh.layers.enable(this._thirdPersonOnlyLayer),mesh.layers.enable(this._firstPersonOnlyLayer);return}mesh.layers.set(this._thirdPersonOnlyLayer);let newMesh=this._createErasedMesh(mesh,eraseBoneIndexes);parent.add(newMesh)}_createHeadlessModel(node$1){if(node$1.type===`Group`)if(node$1.layers.set(this._thirdPersonOnlyLayer),this._isEraseTarget(node$1))node$1.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer));else{let parent=new Group;parent.name=`_headless_${node$1.name}`,parent.layers.set(this._firstPersonOnlyLayer),node$1.parent.add(parent),node$1.children.filter(child=>child.type===`SkinnedMesh`).forEach(child=>{let skinnedMesh=child;this._createHeadlessModelForSkinnedMesh(parent,skinnedMesh)})}else if(node$1.type===`SkinnedMesh`){let skinnedMesh=node$1;this._createHeadlessModelForSkinnedMesh(node$1.parent,skinnedMesh)}else this._isEraseTarget(node$1)&&(node$1.layers.set(this._thirdPersonOnlyLayer),node$1.traverse(child=>child.layers.set(this._thirdPersonOnlyLayer)))}_isEraseTarget(bone){return bone===this.humanoid.getRawBoneNode(`head`)?!0:bone.parent?this._isEraseTarget(bone.parent):!1}};_VRMFirstPerson.DEFAULT_FIRSTPERSON_ONLY_LAYER=9,_VRMFirstPerson.DEFAULT_THIRDPERSON_ONLY_LAYER=10;var VRMFirstPerson=_VRMFirstPerson,POSSIBLE_SPEC_VERSIONS2=new Set([`1.0`,`1.0-beta`]),VRMFirstPersonLoaderPlugin=class{get name(){return`VRMFirstPersonLoaderPlugin`}constructor(parser){this.parser=parser}afterRoot(gltf){return __async2(this,null,function*(){let vrmHumanoid=gltf.userData.vrmHumanoid;if(vrmHumanoid!==null){if(vrmHumanoid===void 0)throw Error(`VRMFirstPersonLoaderPlugin: vrmHumanoid is undefined. VRMHumanoidLoaderPlugin have to be used first`);gltf.userData.vrmFirstPerson=yield this._import(gltf,vrmHumanoid)}})}_import(gltf,humanoid){return __async2(this,null,function*(){if(humanoid==null)return null;let v1Result=yield this._v1Import(gltf,humanoid);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf,humanoid);return v0Result||null})}_v1Import(gltf,humanoid){return __async2(this,null,function*(){var _a$2,_b;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS2.has(specVersion))return console.warn(`VRMFirstPersonLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaFirstPerson=extension$1.firstPerson,meshAnnotations=[],nodePrimitivesMap=yield gltfExtractPrimitivesFromNodes(gltf);return Array.from(nodePrimitivesMap.entries()).forEach(([nodeIndex,primitives])=>{var _a2,_b2;let annotation=(_a2=schemaFirstPerson?.meshAnnotations)?.find(a$1=>a$1.node===nodeIndex);meshAnnotations.push({meshes:primitives,type:(_b2=annotation?.type)??`auto`})}),new VRMFirstPerson(humanoid,meshAnnotations)})}_v0Import(gltf,humanoid){return __async2(this,null,function*(){var _a$2;let json=this.parser.json,vrmExt=(_a$2=json.extensions)?.VRM;if(!vrmExt)return null;let schemaFirstPerson=vrmExt.firstPerson;if(!schemaFirstPerson)return null;let meshAnnotations=[],nodePrimitivesMap=yield gltfExtractPrimitivesFromNodes(gltf);return Array.from(nodePrimitivesMap.entries()).forEach(([nodeIndex,primitives])=>{let schemaNode=json.nodes[nodeIndex],flag=schemaFirstPerson.meshAnnotations?schemaFirstPerson.meshAnnotations.find(a$1=>a$1.mesh===schemaNode.mesh):void 0;meshAnnotations.push({meshes:primitives,type:this._convertV0FlagToV1Type(flag?.firstPersonFlag)})}),new VRMFirstPerson(humanoid,meshAnnotations)})}_convertV0FlagToV1Type(flag){return flag===`FirstPersonOnly`?`firstPersonOnly`:flag===`ThirdPersonOnly`?`thirdPersonOnly`:flag===`Both`?`both`:`auto`}},_v3A=new Vector3,_v3B=new Vector3,_quatA=new Quaternion,VRMHumanoidHelper=class extends Group{constructor(humanoid){super(),this.vrmHumanoid=humanoid,this._boneAxesMap=new Map,Object.values(humanoid.humanBones).forEach(bone=>{let helper=new AxesHelper(1);helper.matrixAutoUpdate=!1,helper.material.depthTest=!1,helper.material.depthWrite=!1,this.add(helper),this._boneAxesMap.set(bone,helper)})}dispose(){Array.from(this._boneAxesMap.values()).forEach(axes=>{axes.geometry.dispose(),axes.material.dispose()})}updateMatrixWorld(force){Array.from(this._boneAxesMap.entries()).forEach(([bone,axes])=>{bone.node.updateWorldMatrix(!0,!1),bone.node.matrixWorld.decompose(_v3A,_quatA,_v3B);let scale$1=_v3A.set(.1,.1,.1).divide(_v3B);axes.matrix.copy(bone.node.matrixWorld).scale(scale$1)}),super.updateMatrixWorld(force)}},VRMHumanBoneList=`hips.spine.chest.upperChest.neck.head.leftEye.rightEye.jaw.leftUpperLeg.leftLowerLeg.leftFoot.leftToes.rightUpperLeg.rightLowerLeg.rightFoot.rightToes.leftShoulder.leftUpperArm.leftLowerArm.leftHand.rightShoulder.rightUpperArm.rightLowerArm.rightHand.leftThumbMetacarpal.leftThumbProximal.leftThumbDistal.leftIndexProximal.leftIndexIntermediate.leftIndexDistal.leftMiddleProximal.leftMiddleIntermediate.leftMiddleDistal.leftRingProximal.leftRingIntermediate.leftRingDistal.leftLittleProximal.leftLittleIntermediate.leftLittleDistal.rightThumbMetacarpal.rightThumbProximal.rightThumbDistal.rightIndexProximal.rightIndexIntermediate.rightIndexDistal.rightMiddleProximal.rightMiddleIntermediate.rightMiddleDistal.rightRingProximal.rightRingIntermediate.rightRingDistal.rightLittleProximal.rightLittleIntermediate.rightLittleDistal`.split(`.`),VRMHumanBoneParentMap={hips:null,spine:`hips`,chest:`spine`,upperChest:`chest`,neck:`upperChest`,head:`neck`,leftEye:`head`,rightEye:`head`,jaw:`head`,leftUpperLeg:`hips`,leftLowerLeg:`leftUpperLeg`,leftFoot:`leftLowerLeg`,leftToes:`leftFoot`,rightUpperLeg:`hips`,rightLowerLeg:`rightUpperLeg`,rightFoot:`rightLowerLeg`,rightToes:`rightFoot`,leftShoulder:`upperChest`,leftUpperArm:`leftShoulder`,leftLowerArm:`leftUpperArm`,leftHand:`leftLowerArm`,rightShoulder:`upperChest`,rightUpperArm:`rightShoulder`,rightLowerArm:`rightUpperArm`,rightHand:`rightLowerArm`,leftThumbMetacarpal:`leftHand`,leftThumbProximal:`leftThumbMetacarpal`,leftThumbDistal:`leftThumbProximal`,leftIndexProximal:`leftHand`,leftIndexIntermediate:`leftIndexProximal`,leftIndexDistal:`leftIndexIntermediate`,leftMiddleProximal:`leftHand`,leftMiddleIntermediate:`leftMiddleProximal`,leftMiddleDistal:`leftMiddleIntermediate`,leftRingProximal:`leftHand`,leftRingIntermediate:`leftRingProximal`,leftRingDistal:`leftRingIntermediate`,leftLittleProximal:`leftHand`,leftLittleIntermediate:`leftLittleProximal`,leftLittleDistal:`leftLittleIntermediate`,rightThumbMetacarpal:`rightHand`,rightThumbProximal:`rightThumbMetacarpal`,rightThumbDistal:`rightThumbProximal`,rightIndexProximal:`rightHand`,rightIndexIntermediate:`rightIndexProximal`,rightIndexDistal:`rightIndexIntermediate`,rightMiddleProximal:`rightHand`,rightMiddleIntermediate:`rightMiddleProximal`,rightMiddleDistal:`rightMiddleIntermediate`,rightRingProximal:`rightHand`,rightRingIntermediate:`rightRingProximal`,rightRingDistal:`rightRingIntermediate`,rightLittleProximal:`rightHand`,rightLittleIntermediate:`rightLittleProximal`,rightLittleDistal:`rightLittleIntermediate`};function quatInvertCompat(target$1){return target$1.invert?target$1.invert():target$1.inverse(),target$1}var _v3A2=new Vector3,_quatA2=new Quaternion,VRMRig=class{constructor(humanBones){this.humanBones=humanBones,this.restPose=this.getAbsolutePose()}getAbsolutePose(){let pose={};return Object.keys(this.humanBones).forEach(vrmBoneNameString=>{let vrmBoneName=vrmBoneNameString,node$1=this.getBoneNode(vrmBoneName);node$1&&(_v3A2.copy(node$1.position),_quatA2.copy(node$1.quaternion),pose[vrmBoneName]={position:_v3A2.toArray(),rotation:_quatA2.toArray()})}),pose}getPose(){let pose={};return Object.keys(this.humanBones).forEach(boneNameString=>{let boneName=boneNameString,node$1=this.getBoneNode(boneName);if(!node$1)return;_v3A2.set(0,0,0),_quatA2.identity();let restState=this.restPose[boneName];restState?.position&&_v3A2.fromArray(restState.position).negate(),restState?.rotation&&quatInvertCompat(_quatA2.fromArray(restState.rotation)),_v3A2.add(node$1.position),_quatA2.premultiply(node$1.quaternion),pose[boneName]={position:_v3A2.toArray(),rotation:_quatA2.toArray()}}),pose}setPose(poseObject){Object.entries(poseObject).forEach(([boneNameString,state])=>{let boneName=boneNameString,node$1=this.getBoneNode(boneName);if(!node$1)return;let restState=this.restPose[boneName];restState&&(state?.position&&(node$1.position.fromArray(state.position),restState.position&&node$1.position.add(_v3A2.fromArray(restState.position))),state?.rotation&&(node$1.quaternion.fromArray(state.rotation),restState.rotation&&node$1.quaternion.multiply(_quatA2.fromArray(restState.rotation))))})}resetPose(){Object.entries(this.restPose).forEach(([boneName,rest])=>{let node$1=this.getBoneNode(boneName);node$1&&(rest?.position&&node$1.position.fromArray(rest.position),rest?.rotation&&node$1.quaternion.fromArray(rest.rotation))})}getBone(name$2){var _a$2;return(_a$2=this.humanBones[name$2])??void 0}getBoneNode(name$2){var _a$2,_b;return(_b=(_a$2=this.humanBones[name$2])?.node)??null}},_v3A3=new Vector3,_quatA3=new Quaternion,_boneWorldPos=new Vector3,VRMHumanoidRig=class _VRMHumanoidRig extends VRMRig{static _setupTransforms(modelRig){let root$3=new Object3D;root$3.name=`VRMHumanoidRig`;let boneWorldPositions={},boneWorldRotations={},boneRotations={},parentWorldRotations={};VRMHumanBoneList.forEach(boneName=>{var _a$2;let boneNode=modelRig.getBoneNode(boneName);if(boneNode){let boneWorldPosition=new Vector3,boneWorldRotation=new Quaternion;boneNode.updateWorldMatrix(!0,!1),boneNode.matrixWorld.decompose(boneWorldPosition,boneWorldRotation,_v3A3),boneWorldPositions[boneName]=boneWorldPosition,boneWorldRotations[boneName]=boneWorldRotation,boneRotations[boneName]=boneNode.quaternion.clone();let parentWorldRotation=new Quaternion;(_a$2=boneNode.parent)==null||_a$2.matrixWorld.decompose(_v3A3,parentWorldRotation,_v3A3),parentWorldRotations[boneName]=parentWorldRotation}});let rigBones={};return VRMHumanBoneList.forEach(boneName=>{var _a$2;let boneNode=modelRig.getBoneNode(boneName);if(boneNode){let boneWorldPosition=boneWorldPositions[boneName],currentBoneName=boneName,parentBoneWorldPosition;for(;parentBoneWorldPosition==null&&(currentBoneName=VRMHumanBoneParentMap[currentBoneName],currentBoneName!=null);)parentBoneWorldPosition=boneWorldPositions[currentBoneName];let rigBoneNode=new Object3D;rigBoneNode.name=`Normalized_`+boneNode.name;let parentRigBoneNode=currentBoneName?(_a$2=rigBones[currentBoneName])?.node:root$3;parentRigBoneNode.add(rigBoneNode),rigBoneNode.position.copy(boneWorldPosition),parentBoneWorldPosition&&rigBoneNode.position.sub(parentBoneWorldPosition),rigBones[boneName]={node:rigBoneNode}}}),{rigBones,root:root$3,parentWorldRotations,boneRotations}}constructor(humanoid){let{rigBones,root:root$3,parentWorldRotations,boneRotations}=_VRMHumanoidRig._setupTransforms(humanoid);super(rigBones),this.original=humanoid,this.root=root$3,this._parentWorldRotations=parentWorldRotations,this._boneRotations=boneRotations}update(){VRMHumanBoneList.forEach(boneName=>{let boneNode=this.original.getBoneNode(boneName);if(boneNode!=null){let rigBoneNode=this.getBoneNode(boneName),parentWorldRotation=this._parentWorldRotations[boneName],invParentWorldRotation=_quatA3.copy(parentWorldRotation).invert(),boneRotation=this._boneRotations[boneName];if(boneNode.quaternion.copy(rigBoneNode.quaternion).multiply(parentWorldRotation).premultiply(invParentWorldRotation).multiply(boneRotation),boneName===`hips`){let boneWorldPosition=rigBoneNode.getWorldPosition(_boneWorldPos);boneNode.parent.updateWorldMatrix(!0,!1);let parentWorldMatrix=boneNode.parent.matrixWorld,localPosition=boneWorldPosition.applyMatrix4(parentWorldMatrix.invert());boneNode.position.copy(localPosition)}}})}},VRMHumanoid=class _VRMHumanoid{get restPose(){return console.warn(`VRMHumanoid: restPose is deprecated. Use either rawRestPose or normalizedRestPose instead.`),this.rawRestPose}get rawRestPose(){return this._rawHumanBones.restPose}get normalizedRestPose(){return this._normalizedHumanBones.restPose}get humanBones(){return this._rawHumanBones.humanBones}get rawHumanBones(){return this._rawHumanBones.humanBones}get normalizedHumanBones(){return this._normalizedHumanBones.humanBones}get normalizedHumanBonesRoot(){return this._normalizedHumanBones.root}constructor(humanBones,options$1){var _a$2;this.autoUpdateHumanBones=(_a$2=options$1?.autoUpdateHumanBones)??!0,this._rawHumanBones=new VRMRig(humanBones),this._normalizedHumanBones=new VRMHumanoidRig(this._rawHumanBones)}copy(source){return this.autoUpdateHumanBones=source.autoUpdateHumanBones,this._rawHumanBones=new VRMRig(source.humanBones),this._normalizedHumanBones=new VRMHumanoidRig(this._rawHumanBones),this}clone(){return new _VRMHumanoid(this.humanBones,{autoUpdateHumanBones:this.autoUpdateHumanBones}).copy(this)}getAbsolutePose(){return console.warn(`VRMHumanoid: getAbsolutePose() is deprecated. Use either getRawAbsolutePose() or getNormalizedAbsolutePose() instead.`),this.getRawAbsolutePose()}getRawAbsolutePose(){return this._rawHumanBones.getAbsolutePose()}getNormalizedAbsolutePose(){return this._normalizedHumanBones.getAbsolutePose()}getPose(){return console.warn(`VRMHumanoid: getPose() is deprecated. Use either getRawPose() or getNormalizedPose() instead.`),this.getRawPose()}getRawPose(){return this._rawHumanBones.getPose()}getNormalizedPose(){return this._normalizedHumanBones.getPose()}setPose(poseObject){return console.warn(`VRMHumanoid: setPose() is deprecated. Use either setRawPose() or setNormalizedPose() instead.`),this.setRawPose(poseObject)}setRawPose(poseObject){return this._rawHumanBones.setPose(poseObject)}setNormalizedPose(poseObject){return this._normalizedHumanBones.setPose(poseObject)}resetPose(){return console.warn(`VRMHumanoid: resetPose() is deprecated. Use either resetRawPose() or resetNormalizedPose() instead.`),this.resetRawPose()}resetRawPose(){return this._rawHumanBones.resetPose()}resetNormalizedPose(){return this._normalizedHumanBones.resetPose()}getBone(name$2){return console.warn(`VRMHumanoid: getBone() is deprecated. Use either getRawBone() or getNormalizedBone() instead.`),this.getRawBone(name$2)}getRawBone(name$2){return this._rawHumanBones.getBone(name$2)}getNormalizedBone(name$2){return this._normalizedHumanBones.getBone(name$2)}getBoneNode(name$2){return console.warn(`VRMHumanoid: getBoneNode() is deprecated. Use either getRawBoneNode() or getNormalizedBoneNode() instead.`),this.getRawBoneNode(name$2)}getRawBoneNode(name$2){return this._rawHumanBones.getBoneNode(name$2)}getNormalizedBoneNode(name$2){return this._normalizedHumanBones.getBoneNode(name$2)}update(){this.autoUpdateHumanBones&&this._normalizedHumanBones.update()}},VRMRequiredHumanBoneName={Hips:`hips`,Spine:`spine`,Head:`head`,LeftUpperLeg:`leftUpperLeg`,LeftLowerLeg:`leftLowerLeg`,LeftFoot:`leftFoot`,RightUpperLeg:`rightUpperLeg`,RightLowerLeg:`rightLowerLeg`,RightFoot:`rightFoot`,LeftUpperArm:`leftUpperArm`,LeftLowerArm:`leftLowerArm`,LeftHand:`leftHand`,RightUpperArm:`rightUpperArm`,RightLowerArm:`rightLowerArm`,RightHand:`rightHand`},POSSIBLE_SPEC_VERSIONS3=new Set([`1.0`,`1.0-beta`]),thumbBoneNameMap={leftThumbProximal:`leftThumbMetacarpal`,leftThumbIntermediate:`leftThumbProximal`,rightThumbProximal:`rightThumbMetacarpal`,rightThumbIntermediate:`rightThumbProximal`},VRMHumanoidLoaderPlugin=class{get name(){return`VRMHumanoidLoaderPlugin`}constructor(parser,options$1){this.parser=parser,this.helperRoot=options$1?.helperRoot,this.autoUpdateHumanBones=options$1?.autoUpdateHumanBones}afterRoot(gltf){return __async2(this,null,function*(){gltf.userData.vrmHumanoid=yield this._import(gltf)})}_import(gltf){return __async2(this,null,function*(){let v1Result=yield this._v1Import(gltf);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf);return v0Result||null})}_v1Import(gltf){return __async2(this,null,function*(){var _a$2,_b;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS3.has(specVersion))return console.warn(`VRMHumanoidLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaHumanoid=extension$1.humanoid;if(!schemaHumanoid)return null;let existsPreviousThumbName=schemaHumanoid.humanBones.leftThumbIntermediate!=null||schemaHumanoid.humanBones.rightThumbIntermediate!=null,humanBones={};schemaHumanoid.humanBones!=null&&(yield Promise.all(Object.entries(schemaHumanoid.humanBones).map(_0=>__async2(this,[_0],function*([boneNameString,schemaHumanBone]){let boneName=boneNameString,index$1=schemaHumanBone.node;if(existsPreviousThumbName){let thumbBoneName=thumbBoneNameMap[boneName];thumbBoneName!=null&&(boneName=thumbBoneName)}let node$1=yield this.parser.getDependency(`node`,index$1);if(node$1==null){console.warn(`A glTF node bound to the humanoid bone ${boneName} (index = ${index$1}) does not exist`);return}humanBones[boneName]={node:node$1}}))));let humanoid=new VRMHumanoid(this._ensureRequiredBonesExist(humanBones),{autoUpdateHumanBones:this.autoUpdateHumanBones});if(gltf.scene.add(humanoid.normalizedHumanBonesRoot),this.helperRoot){let helper=new VRMHumanoidHelper(humanoid);this.helperRoot.add(helper),helper.renderOrder=this.helperRoot.renderOrder}return humanoid})}_v0Import(gltf){return __async2(this,null,function*(){var _a$2;let json=this.parser.json,vrmExt=(_a$2=json.extensions)?.VRM;if(!vrmExt)return null;let schemaHumanoid=vrmExt.humanoid;if(!schemaHumanoid)return null;let humanBones={};schemaHumanoid.humanBones!=null&&(yield Promise.all(schemaHumanoid.humanBones.map(bone=>__async2(this,null,function*(){let boneName=bone.bone,index$1=bone.node;if(boneName==null||index$1==null)return;let node$1=yield this.parser.getDependency(`node`,index$1);if(node$1==null){console.warn(`A glTF node bound to the humanoid bone ${boneName} (index = ${index$1}) does not exist`);return}let thumbBoneName=thumbBoneNameMap[boneName],newBoneName=thumbBoneName??boneName;if(humanBones[newBoneName]!=null){console.warn(`Multiple bone entries for ${newBoneName} detected (index = ${index$1}), ignoring duplicated entries.`);return}humanBones[newBoneName]={node:node$1}}))));let humanoid=new VRMHumanoid(this._ensureRequiredBonesExist(humanBones),{autoUpdateHumanBones:this.autoUpdateHumanBones});if(gltf.scene.add(humanoid.normalizedHumanBonesRoot),this.helperRoot){let helper=new VRMHumanoidHelper(humanoid);this.helperRoot.add(helper),helper.renderOrder=this.helperRoot.renderOrder}return humanoid})}_ensureRequiredBonesExist(humanBones){let missingRequiredBones=Object.values(VRMRequiredHumanBoneName).filter(requiredBoneName=>humanBones[requiredBoneName]==null);if(missingRequiredBones.length>0)throw Error(`VRMHumanoidLoaderPlugin: These humanoid bones are required but not exist: ${missingRequiredBones.join(`, `)}`);return humanBones}},FanBufferGeometry=class extends BufferGeometry{constructor(){super(),this._currentTheta=0,this._currentRadius=0,this.theta=0,this.radius=0,this._currentTheta=0,this._currentRadius=0,this._attrPos=new BufferAttribute(new Float32Array(195),3),this.setAttribute(`position`,this._attrPos),this._attrIndex=new BufferAttribute(new Uint16Array(189),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let shouldUpdateGeometry=!1;this._currentTheta!==this.theta&&(this._currentTheta=this.theta,shouldUpdateGeometry=!0),this._currentRadius!==this.radius&&(this._currentRadius=this.radius,shouldUpdateGeometry=!0),shouldUpdateGeometry&&this._buildPosition()}_buildPosition(){this._attrPos.setXYZ(0,0,0,0);for(let i=0;i<64;i++){let t$1=i/63*this._currentTheta;this._attrPos.setXYZ(i+1,this._currentRadius*Math.sin(t$1),0,this._currentRadius*Math.cos(t$1))}this._attrPos.needsUpdate=!0}_buildIndex(){for(let i=0;i<63;i++)this._attrIndex.setXYZ(i*3,0,i+1,i+2);this._attrIndex.needsUpdate=!0}},LineAndSphereBufferGeometry=class extends BufferGeometry{constructor(){super(),this.radius=0,this._currentRadius=0,this.tail=new Vector3,this._currentTail=new Vector3,this._attrPos=new BufferAttribute(new Float32Array(294),3),this.setAttribute(`position`,this._attrPos),this._attrIndex=new BufferAttribute(new Uint16Array(194),1),this.setIndex(this._attrIndex),this._buildIndex(),this.update()}update(){let shouldUpdateGeometry=!1;this._currentRadius!==this.radius&&(this._currentRadius=this.radius,shouldUpdateGeometry=!0),this._currentTail.equals(this.tail)||(this._currentTail.copy(this.tail),shouldUpdateGeometry=!0),shouldUpdateGeometry&&this._buildPosition()}_buildPosition(){for(let i=0;i<32;i++){let t$1=i/16*Math.PI;this._attrPos.setXYZ(i,Math.cos(t$1),Math.sin(t$1),0),this._attrPos.setXYZ(32+i,0,Math.cos(t$1),Math.sin(t$1)),this._attrPos.setXYZ(64+i,Math.sin(t$1),0,Math.cos(t$1))}this.scale(this._currentRadius,this._currentRadius,this._currentRadius),this.translate(this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.setXYZ(96,0,0,0),this._attrPos.setXYZ(97,this._currentTail.x,this._currentTail.y,this._currentTail.z),this._attrPos.needsUpdate=!0}_buildIndex(){for(let i=0;i<32;i++){let i1=(i+1)%32;this._attrIndex.setXY(i*2,i,i1),this._attrIndex.setXY(64+i*2,32+i,32+i1),this._attrIndex.setXY(128+i*2,64+i,64+i1)}this._attrIndex.setXY(192,96,97),this._attrIndex.needsUpdate=!0}},_quatA4=new Quaternion,_quatB=new Quaternion,_v3A4=new Vector3,_v3B2=new Vector3,SQRT_2_OVER_2=Math.sqrt(2)/2,QUAT_XY_CW90=new Quaternion(0,0,-SQRT_2_OVER_2,SQRT_2_OVER_2),VEC3_POSITIVE_Y=new Vector3(0,1,0),VRMLookAtHelper=class extends Group{constructor(lookAt){super(),this.matrixAutoUpdate=!1,this.vrmLookAt=lookAt;{let geometry=new FanBufferGeometry;geometry.radius=.5;let material=new MeshBasicMaterial({color:65280,transparent:!0,opacity:.5,side:DoubleSide,depthTest:!1,depthWrite:!1});this._meshPitch=new Mesh(geometry,material),this.add(this._meshPitch)}{let geometry=new FanBufferGeometry;geometry.radius=.5;let material=new MeshBasicMaterial({color:16711680,transparent:!0,opacity:.5,side:DoubleSide,depthTest:!1,depthWrite:!1});this._meshYaw=new Mesh(geometry,material),this.add(this._meshYaw)}{let geometry=new LineAndSphereBufferGeometry;geometry.radius=.1;let material=new LineBasicMaterial({color:16777215,depthTest:!1,depthWrite:!1});this._lineTarget=new LineSegments(geometry,material),this._lineTarget.frustumCulled=!1,this.add(this._lineTarget)}}dispose(){this._meshYaw.geometry.dispose(),this._meshYaw.material.dispose(),this._meshPitch.geometry.dispose(),this._meshPitch.material.dispose(),this._lineTarget.geometry.dispose(),this._lineTarget.material.dispose()}updateMatrixWorld(force){let yaw=MathUtils.DEG2RAD*this.vrmLookAt.yaw;this._meshYaw.geometry.theta=yaw,this._meshYaw.geometry.update();let pitch=MathUtils.DEG2RAD*this.vrmLookAt.pitch;this._meshPitch.geometry.theta=pitch,this._meshPitch.geometry.update(),this.vrmLookAt.getLookAtWorldPosition(_v3A4),this.vrmLookAt.getLookAtWorldQuaternion(_quatA4),_quatA4.multiply(this.vrmLookAt.getFaceFrontQuaternion(_quatB)),this._meshYaw.position.copy(_v3A4),this._meshYaw.quaternion.copy(_quatA4),this._meshPitch.position.copy(_v3A4),this._meshPitch.quaternion.copy(_quatA4),this._meshPitch.quaternion.multiply(_quatB.setFromAxisAngle(VEC3_POSITIVE_Y,yaw)),this._meshPitch.quaternion.multiply(QUAT_XY_CW90);let{target:target$1,autoUpdate:autoUpdate$1}=this.vrmLookAt;target$1!=null&&autoUpdate$1&&(target$1.getWorldPosition(_v3B2).sub(_v3A4),this._lineTarget.geometry.tail.copy(_v3B2),this._lineTarget.geometry.update(),this._lineTarget.position.copy(_v3A4)),super.updateMatrixWorld(force)}},_position=new Vector3,_scale=new Vector3;function getWorldQuaternionLite(object$1,out){return object$1.matrixWorld.decompose(_position,out,_scale),out}function calcAzimuthAltitude(vector){return[Math.atan2(-vector.z,vector.x),Math.atan2(vector.y,Math.sqrt(vector.x*vector.x+vector.z*vector.z))]}function sanitizeAngle(angle){let roundTurn=Math.round(angle/2/Math.PI);return angle-2*Math.PI*roundTurn}var VEC3_POSITIVE_Z=new Vector3(0,0,1),_v3A5=new Vector3,_v3B3=new Vector3,_v3C=new Vector3,_quatA5=new Quaternion,_quatB2=new Quaternion,_quatC=new Quaternion,_quatD=new Quaternion,_eulerA=new Euler,_VRMLookAt=class _VRMLookAt2{constructor(humanoid,applier){this.offsetFromHeadBone=new Vector3,this.autoUpdate=!0,this.faceFront=new Vector3(0,0,1),this.humanoid=humanoid,this.applier=applier,this._yaw=0,this._pitch=0,this._needsUpdate=!0,this._restHeadWorldQuaternion=this.getLookAtWorldQuaternion(new Quaternion)}get yaw(){return this._yaw}set yaw(value$1){this._yaw=value$1,this._needsUpdate=!0}get pitch(){return this._pitch}set pitch(value$1){this._pitch=value$1,this._needsUpdate=!0}get euler(){return console.warn(`VRMLookAt: euler is deprecated. use getEuler() instead.`),this.getEuler(new Euler)}getEuler(target$1){return target$1.set(MathUtils.DEG2RAD*this._pitch,MathUtils.DEG2RAD*this._yaw,0,`YXZ`)}copy(source){if(this.humanoid!==source.humanoid)throw Error(`VRMLookAt: humanoid must be same in order to copy`);return this.offsetFromHeadBone.copy(source.offsetFromHeadBone),this.applier=source.applier,this.autoUpdate=source.autoUpdate,this.target=source.target,this.faceFront.copy(source.faceFront),this}clone(){return new _VRMLookAt2(this.humanoid,this.applier).copy(this)}reset(){this._yaw=0,this._pitch=0,this._needsUpdate=!0}getLookAtWorldPosition(target$1){let head$1=this.humanoid.getRawBoneNode(`head`);return target$1.copy(this.offsetFromHeadBone).applyMatrix4(head$1.matrixWorld)}getLookAtWorldQuaternion(target$1){let head$1=this.humanoid.getRawBoneNode(`head`);return getWorldQuaternionLite(head$1,target$1)}getFaceFrontQuaternion(target$1){if(this.faceFront.distanceToSquared(VEC3_POSITIVE_Z)<.01)return target$1.copy(this._restHeadWorldQuaternion).invert();let[faceFrontAzimuth,faceFrontAltitude]=calcAzimuthAltitude(this.faceFront);return _eulerA.set(0,.5*Math.PI+faceFrontAzimuth,faceFrontAltitude,`YZX`),target$1.setFromEuler(_eulerA).premultiply(_quatD.copy(this._restHeadWorldQuaternion).invert())}getLookAtWorldDirection(target$1){return this.getLookAtWorldQuaternion(_quatB2),this.getFaceFrontQuaternion(_quatC),target$1.copy(VEC3_POSITIVE_Z).applyQuaternion(_quatB2).applyQuaternion(_quatC).applyEuler(this.getEuler(_eulerA))}lookAt(position$2){let headRotDiffInv=_quatA5.copy(this._restHeadWorldQuaternion).multiply(quatInvertCompat(this.getLookAtWorldQuaternion(_quatB2))),headPos=this.getLookAtWorldPosition(_v3B3),lookAtDir=_v3C.copy(position$2).sub(headPos).applyQuaternion(headRotDiffInv).normalize(),[azimuthFrom,altitudeFrom]=calcAzimuthAltitude(this.faceFront),[azimuthTo,altitudeTo]=calcAzimuthAltitude(lookAtDir),yaw=sanitizeAngle(azimuthTo-azimuthFrom),pitch=sanitizeAngle(altitudeFrom-altitudeTo);this._yaw=MathUtils.RAD2DEG*yaw,this._pitch=MathUtils.RAD2DEG*pitch,this._needsUpdate=!0}update(delta){this.target!=null&&this.autoUpdate&&this.lookAt(this.target.getWorldPosition(_v3A5)),this._needsUpdate&&(this._needsUpdate=!1,this.applier.applyYawPitch(this._yaw,this._pitch))}};_VRMLookAt.EULER_ORDER=`YXZ`;var VRMLookAt=_VRMLookAt,VEC3_POSITIVE_Z2=new Vector3(0,0,1),_quatA6=new Quaternion,_quatB3=new Quaternion,_eulerA2=new Euler(0,0,0,`YXZ`),VRMLookAtBoneApplier=class{constructor(humanoid,rangeMapHorizontalInner,rangeMapHorizontalOuter,rangeMapVerticalDown,rangeMapVerticalUp){this.humanoid=humanoid,this.rangeMapHorizontalInner=rangeMapHorizontalInner,this.rangeMapHorizontalOuter=rangeMapHorizontalOuter,this.rangeMapVerticalDown=rangeMapVerticalDown,this.rangeMapVerticalUp=rangeMapVerticalUp,this.faceFront=new Vector3(0,0,1),this._restQuatLeftEye=new Quaternion,this._restQuatRightEye=new Quaternion,this._restLeftEyeParentWorldQuat=new Quaternion,this._restRightEyeParentWorldQuat=new Quaternion;let leftEye=this.humanoid.getRawBoneNode(`leftEye`),rightEye=this.humanoid.getRawBoneNode(`rightEye`);leftEye&&(this._restQuatLeftEye.copy(leftEye.quaternion),getWorldQuaternionLite(leftEye.parent,this._restLeftEyeParentWorldQuat)),rightEye&&(this._restQuatRightEye.copy(rightEye.quaternion),getWorldQuaternionLite(rightEye.parent,this._restRightEyeParentWorldQuat))}applyYawPitch(yaw,pitch){let leftEye=this.humanoid.getRawBoneNode(`leftEye`),rightEye=this.humanoid.getRawBoneNode(`rightEye`),leftEyeNormalized=this.humanoid.getNormalizedBoneNode(`leftEye`),rightEyeNormalized=this.humanoid.getNormalizedBoneNode(`rightEye`);leftEye&&(pitch<0?_eulerA2.x=-MathUtils.DEG2RAD*this.rangeMapVerticalDown.map(-pitch):_eulerA2.x=MathUtils.DEG2RAD*this.rangeMapVerticalUp.map(pitch),yaw<0?_eulerA2.y=-MathUtils.DEG2RAD*this.rangeMapHorizontalInner.map(-yaw):_eulerA2.y=MathUtils.DEG2RAD*this.rangeMapHorizontalOuter.map(yaw),_quatA6.setFromEuler(_eulerA2),this._getWorldFaceFrontQuat(_quatB3),leftEyeNormalized.quaternion.copy(_quatB3).multiply(_quatA6).multiply(_quatB3.invert()),_quatA6.copy(this._restLeftEyeParentWorldQuat),leftEye.quaternion.copy(leftEyeNormalized.quaternion).multiply(_quatA6).premultiply(_quatA6.invert()).multiply(this._restQuatLeftEye)),rightEye&&(pitch<0?_eulerA2.x=-MathUtils.DEG2RAD*this.rangeMapVerticalDown.map(-pitch):_eulerA2.x=MathUtils.DEG2RAD*this.rangeMapVerticalUp.map(pitch),yaw<0?_eulerA2.y=-MathUtils.DEG2RAD*this.rangeMapHorizontalOuter.map(-yaw):_eulerA2.y=MathUtils.DEG2RAD*this.rangeMapHorizontalInner.map(yaw),_quatA6.setFromEuler(_eulerA2),this._getWorldFaceFrontQuat(_quatB3),rightEyeNormalized.quaternion.copy(_quatB3).multiply(_quatA6).multiply(_quatB3.invert()),_quatA6.copy(this._restRightEyeParentWorldQuat),rightEye.quaternion.copy(rightEyeNormalized.quaternion).multiply(_quatA6).premultiply(_quatA6.invert()).multiply(this._restQuatRightEye))}lookAt(euler){console.warn(`VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.`);let yaw=MathUtils.RAD2DEG*euler.y,pitch=MathUtils.RAD2DEG*euler.x;this.applyYawPitch(yaw,pitch)}_getWorldFaceFrontQuat(target$1){if(this.faceFront.distanceToSquared(VEC3_POSITIVE_Z2)<.01)return target$1.identity();let[faceFrontAzimuth,faceFrontAltitude]=calcAzimuthAltitude(this.faceFront);return _eulerA2.set(0,.5*Math.PI+faceFrontAzimuth,faceFrontAltitude,`YZX`),target$1.setFromEuler(_eulerA2)}};VRMLookAtBoneApplier.type=`bone`;var VRMLookAtExpressionApplier=class{constructor(expressions,rangeMapHorizontalInner,rangeMapHorizontalOuter,rangeMapVerticalDown,rangeMapVerticalUp){this.expressions=expressions,this.rangeMapHorizontalInner=rangeMapHorizontalInner,this.rangeMapHorizontalOuter=rangeMapHorizontalOuter,this.rangeMapVerticalDown=rangeMapVerticalDown,this.rangeMapVerticalUp=rangeMapVerticalUp}applyYawPitch(yaw,pitch){pitch<0?(this.expressions.setValue(`lookDown`,0),this.expressions.setValue(`lookUp`,this.rangeMapVerticalUp.map(-pitch))):(this.expressions.setValue(`lookUp`,0),this.expressions.setValue(`lookDown`,this.rangeMapVerticalDown.map(pitch))),yaw<0?(this.expressions.setValue(`lookLeft`,0),this.expressions.setValue(`lookRight`,this.rangeMapHorizontalOuter.map(-yaw))):(this.expressions.setValue(`lookRight`,0),this.expressions.setValue(`lookLeft`,this.rangeMapHorizontalOuter.map(yaw)))}lookAt(euler){console.warn(`VRMLookAtBoneApplier: lookAt() is deprecated. use apply() instead.`);let yaw=MathUtils.RAD2DEG*euler.y,pitch=MathUtils.RAD2DEG*euler.x;this.applyYawPitch(yaw,pitch)}};VRMLookAtExpressionApplier.type=`expression`;var VRMLookAtRangeMap=class{constructor(inputMaxValue,outputScale){this.inputMaxValue=inputMaxValue,this.outputScale=outputScale}map(src){return this.outputScale*saturate(src/this.inputMaxValue)}},POSSIBLE_SPEC_VERSIONS4=new Set([`1.0`,`1.0-beta`]),INPUT_MAX_VALUE_MINIMUM=.01,VRMLookAtLoaderPlugin=class{get name(){return`VRMLookAtLoaderPlugin`}constructor(parser,options$1){this.parser=parser,this.helperRoot=options$1?.helperRoot}afterRoot(gltf){return __async2(this,null,function*(){let vrmHumanoid=gltf.userData.vrmHumanoid;if(vrmHumanoid===null)return;if(vrmHumanoid===void 0)throw Error(`VRMLookAtLoaderPlugin: vrmHumanoid is undefined. VRMHumanoidLoaderPlugin have to be used first`);let vrmExpressionManager=gltf.userData.vrmExpressionManager;if(vrmExpressionManager!==null){if(vrmExpressionManager===void 0)throw Error(`VRMLookAtLoaderPlugin: vrmExpressionManager is undefined. VRMExpressionLoaderPlugin have to be used first`);gltf.userData.vrmLookAt=yield this._import(gltf,vrmHumanoid,vrmExpressionManager)}})}_import(gltf,humanoid,expressions){return __async2(this,null,function*(){if(humanoid==null||expressions==null)return null;let v1Result=yield this._v1Import(gltf,humanoid,expressions);if(v1Result)return v1Result;let v0Result=yield this._v0Import(gltf,humanoid,expressions);return v0Result||null})}_v1Import(gltf,humanoid,expressions){return __async2(this,null,function*(){var _a$2,_b,_c;let json=this.parser.json,isVRMUsed=(_a$2=json.extensionsUsed)?.indexOf(`VRMC_vrm`)!==-1;if(!isVRMUsed)return null;let extension$1=(_b=json.extensions)?.VRMC_vrm;if(!extension$1)return null;let specVersion=extension$1.specVersion;if(!POSSIBLE_SPEC_VERSIONS4.has(specVersion))return console.warn(`VRMLookAtLoaderPlugin: Unknown VRMC_vrm specVersion "${specVersion}"`),null;let schemaLookAt=extension$1.lookAt;if(!schemaLookAt)return null;let defaultOutputScale=schemaLookAt.type===`expression`?1:10,mapHI=this._v1ImportRangeMap(schemaLookAt.rangeMapHorizontalInner,defaultOutputScale),mapHO=this._v1ImportRangeMap(schemaLookAt.rangeMapHorizontalOuter,defaultOutputScale),mapVD=this._v1ImportRangeMap(schemaLookAt.rangeMapVerticalDown,defaultOutputScale),mapVU=this._v1ImportRangeMap(schemaLookAt.rangeMapVerticalUp,defaultOutputScale),applier;applier=schemaLookAt.type===`expression`?new VRMLookAtExpressionApplier(expressions,mapHI,mapHO,mapVD,mapVU):new VRMLookAtBoneApplier(humanoid,mapHI,mapHO,mapVD,mapVU);let lookAt=this._importLookAt(humanoid,applier);return lookAt.offsetFromHeadBone.fromArray((_c=schemaLookAt.offsetFromHeadBone)??[0,.06,0]),lookAt})}_v1ImportRangeMap(schemaRangeMap,defaultOutputScale){var _a$2,_b;let inputMaxValue=(_a$2=schemaRangeMap?.inputMaxValue)??90,outputScale=(_b=schemaRangeMap?.outputScale)??defaultOutputScale;return inputMaxValue(console.error(error),console.warn(`VRMMetaLoaderPlugin: Failed to load a thumbnail image`),null))})}},VRMCore=class{constructor(params){this.scene=params.scene,this.meta=params.meta,this.humanoid=params.humanoid,this.expressionManager=params.expressionManager,this.firstPerson=params.firstPerson,this.lookAt=params.lookAt}update(delta){this.humanoid.update(),this.lookAt&&this.lookAt.update(delta),this.expressionManager&&this.expressionManager.update()}},VRM=class extends VRMCore{constructor(params){super(params),this.materials=params.materials,this.springBoneManager=params.springBoneManager,this.nodeConstraintManager=params.nodeConstraintManager}update(delta){super.update(delta),this.nodeConstraintManager&&this.nodeConstraintManager.update(),this.springBoneManager&&this.springBoneManager.update(delta),this.materials&&this.materials.forEach(material=>{material.update&&material.update(delta)})}},__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(obj,key$2,value$1)=>key$2 in obj?__defProp(obj,key$2,{enumerable:!0,configurable:!0,writable:!0,value:value$1}):obj[key$2]=value$1,__spreadValues=(a$1,b$1)=>{for(var prop in b$1||={})__hasOwnProp.call(b$1,prop)&&__defNormalProp(a$1,prop,b$1[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b$1))__propIsEnum.call(b$1,prop)&&__defNormalProp(a$1,prop,b$1[prop]);return a$1},__async3=(__this,__arguments,generator)=>new Promise((resolve$1,reject)=>{var fulfilled=value$1=>{try{step(generator.next(value$1))}catch(e$4){reject(e$4)}},rejected=value$1=>{try{step(generator.throw(value$1))}catch(e$4){reject(e$4)}},step=x$1=>x$1.done?resolve$1(x$1.value):Promise.resolve(x$1.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),colorSpaceEncodingMap={"":3e3,srgb:3001};function setTextureColorSpace(texture,colorSpace){parseInt(REVISION,10)>=152?texture.colorSpace=colorSpace:texture.encoding=colorSpaceEncodingMap[colorSpace]}var GLTFMToonMaterialParamsAssignHelper=class{get pending(){return Promise.all(this._pendings)}constructor(parser,materialParams){this._parser=parser,this._materialParams=materialParams,this._pendings=[]}assignPrimitive(key$2,value$1){value$1!=null&&(this._materialParams[key$2]=value$1)}assignColor(key$2,value$1,convertSRGBToLinear){value$1!=null&&(this._materialParams[key$2]=new Color().fromArray(value$1),convertSRGBToLinear&&this._materialParams[key$2].convertSRGBToLinear())}assignTexture(key$2,texture,isColorTexture){return __async3(this,null,function*(){let promise=(()=>__async3(this,null,function*(){texture!=null&&(yield this._parser.assignTexture(this._materialParams,key$2,texture),isColorTexture&&setTextureColorSpace(this._materialParams[key$2],`srgb`))}))();return this._pendings.push(promise),promise})}assignTextureByIndex(key$2,textureIndex,isColorTexture){return __async3(this,null,function*(){return this.assignTexture(key$2,textureIndex==null?void 0:{index:textureIndex},isColorTexture)})}},mtoon_default=`// #define PHONG varying vec3 vViewPosition; @@ -4992,8 +4995,8 @@ void main() { * @pixiv/three-vrm-springbone is distributed under MIT License * https://github.com/pixiv/three-vrm/blob/release/LICENSE */ -function toTrianglesDrawMode(geometry,drawMode){if(drawMode===TrianglesDrawMode)return console.warn(`THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.`),geometry;if(drawMode===TriangleFanDrawMode||drawMode===TriangleStripDrawMode){let index$1=geometry.getIndex();if(index$1===null){let indices=[],position$2=geometry.getAttribute(`position`);if(position$2!==void 0){for(let i=0;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-BwfwC23N.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`effect`:return __vitePreload(()=>import(`./effect--zg3C1LQ-BmRGzHbw.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`sury`:return __vitePreload(()=>import(`./sury-s6Akl-oc-BIvMfvjZ.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`valibot`:return __vitePreload(()=>import(`./valibot-DBCeetIe-Dqxhpop2.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`zod`:return __vitePreload(()=>import(`./zod-Bw_60DVU-DKreLe0e.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(` +function toTrianglesDrawMode(geometry,drawMode){if(drawMode===TrianglesDrawMode)return console.warn(`THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.`),geometry;if(drawMode===TriangleFanDrawMode||drawMode===TriangleStripDrawMode){let index$1=geometry.getIndex();if(index$1===null){let indices=[],position$2=geometry.getAttribute(`position`);if(position$2!==void 0){for(let i=0;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$2=extensionDef.count,stride=extensionDef.byteStride,source=new Uint8Array(res,byteOffset,byteLength);return decoder.decodeGltfBufferAsync?decoder.decodeGltfBufferAsync(count$2,stride,source,extensionDef.mode,extensionDef.filter).then(function(res$1){return res$1.buffer}):decoder.ready.then(function(){let result=new ArrayBuffer(count$2*stride);return decoder.decodeGltfBuffer(new Uint8Array(result),count$2,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$2=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$2);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-BwfwC23N.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`effect`:return __vitePreload(()=>import(`./effect--zg3C1LQ-gF-vx9Va.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`sury`:return __vitePreload(()=>import(`./sury-s6Akl-oc-BuVXWdfG.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`valibot`:return __vitePreload(()=>import(`./valibot-DBCeetIe-YlZF0hjt.js`),[]).then(async({getToJsonSchemaFn:getToJsonSchemaFn2})=>getToJsonSchemaFn2());case`zod`:return __vitePreload(()=>import(`./zod-Bw_60DVU-BbjRq13c.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) { @@ -5073,7 +5076,7 @@ Coordinate axes are visualised. `},common:{fields:{field:{"api-key":{label:`API 密钥`}}},section:{advanced:{fields:{field:{headers:{description:`添加自定义 HTTP 标头`,key:{placeholder:`请求头名字`},label:`HTTP 请求头`,value:{placeholder:`请求头数值`}}}},title:`高级配置`},basic:{description:`基本设置`,title:`基础配置`},voice:{title:`声音配置`}}},description:`LLM,语音合成,语音识别服务来源等`,provider:{"app-local-audio-transcription":{title:`应用内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"app-local-audio-speech":{title:`应用内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-transcription":{title:`浏览器内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"browser-local-audio-speech":{title:`浏览器内(本地)`,description:`https://github.com/moeru-ai/xsai-transformers`},"alibaba-cloud-model-studio":{description:`bailian.console.aliyun.com`,title:`阿里百炼`},anthropic:{description:`anthropic.com`,title:`Anthropic | Claude`,helpinfo:{title:`开始之前`,description:{part1:`虽然 Anthropic 最近宣布他们正在提供对 OpenAI SDK 兼容性的 Beta 版支持`,part2:`(您可以在此处阅读更多信息)`,part3:`但由于实现细节附带`,part4:`与 OpenAI SDK 不一致,目前无法在浏览器中使用此提供程序。`,part5:`如果您确实需要使用此提供程序,则需要一个专用的代理后端,例如在`,part6:`上运行的Serverless Function,或者一些绕过 CORS 的服务,以绕过 CORS 限制。`}}},"cloudflare-workers-ai":{description:`Cloudflare.com`,fields:{field:{"account-id":{description:`Cloudflare 帐户 ID`,label:`Cloudflare Account ID`,placeholder:`请输入 Cloudflare Account ID`},"api-key":{placeholder:`请输入 Cloudflare Workers AI 的 API Key`}}},title:`Workers AI`},common:{fields:{field:{pitch:{description:`调节合成语音的音高(比如更尖锐或者更粗旷)`,label:`音高`},speed:{description:`调节说话的语速`,label:`语速`},volume:{description:`调节语音的响度`,label:`响度`}}}},deepseek:{description:`DeepSeek.com`,title:`深度求索 DeepSeek`},elevenlabs:{description:`Elevenlabs.io`,fields:{field:{"simularity-boost":{description:`声音相似性与依从性`,label:`相似度修正`},"speaker-boost":{description:`增强说话者的相似性`,label:`扬声器增强`},speed:{description:`语音生成速度`,label:`语速`},stability:{description:`语音稳定性和随机性`,label:`稳定性`},style:{description:`夸张的语音风格`,label:`风格`}}},playground:{buttons:{button:{"test-voice":{generating:`生成中...`,label:`测试声音`}}},fields:{field:{input:{placeholder:`输入用于测试发音的文本`},language:{description:`选择语音语言`,label:`语言`},voice:{description:`选择首选语音`,label:`声线`}}},title:`实验平台`,validation:{"error-missing-api-key":`需要填写 API Key 才能用哦!`}},title:`ElevenLabs (11labs)`},fireworks:{description:`Fireworks.ai`,title:`Fireworks.ai`},"microsoft-speech":{description:`speech.microsoft.com`,fields:{field:{region:{description:`服务 Endpoint 地区(比如亚太 eastasia 区域)`,label:`Endpoint 地区`}}},title:`Microsoft / Azure 语音服务`},mistral:{description:`mistral.ai`,title:`Mistral`},moonshot:{description:`Moonshot.ai`,title:`月之暗面`},novita:{description:`novita.ai`,title:`Novita`},ollama:{description:`ollama.ai`,title:`Ollama`},openai:{description:`OpenAi.com`,title:`OpenAI`},openrouter:{description:`OpenRouter.ai`,title:`OpenRouter`},perplexity:{description:`perplexity.ai`,title:`Perplexity`},player2:{description:`player2.game`,title:`Player2`},together:{description:`together.ai`,title:`Together.ai`},"google-generative-ai":{description:`gemini.google.com`,title:`Google Gemini`},featherless:{description:`featherless.ai`,title:`Featherless AI`},vllm:{description:`vllm.ai`,title:`vLLM`},volcengine:{description:`volcengine.com`,fields:{field:{appId:{description:`可在控制台获取的 App ID`,label:`App ID`}}},title:`火山引擎`},xai:{description:`X.AI`,title:`xAI`},transcriptions:{playground:{title:`实验平台`}}},title:`服务来源`},scene:{description:`配置角色所在环境`,title:`场景`},themes:{"color-scheme":{description:`更改舞台的配色方案`,title:`配色方案`},developer:{description:`为开发者提供的选项`,title:`开发者`},general:{description:`深色主题、语言等选项`,title:`通用`},description:`自定义你的舞台外观!`,sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:`强调色`,"rgb-on":{title:`RGB ON!`}}}},title:`配色`},developer:{title:`开发者`},"theme-presets":{presets:[{colors:[`AIRI 绿`],description:`默认的绿色主题,由 AIRI 为您带来!`,title:`默认颜色`},{colors:[`灰褐色`,`米色`,`灰白色`,`浅灰褐色`,`象牙色`,`橄榄灰`,`沙色`,`暖灰色`],description:`受乔治·莫兰迪绘画启发的柔和、低调的色调`,title:`Morandi 颜色`},{colors:[`天蓝色`,`薄雾色`,`沙色`,`苔藓绿`,`睡莲色`,`小麦色`,`板岩蓝`,`鼠尾草色`],description:`受克劳德·莫奈作品启发的印象派调色板`,title:`莫奈颜色`},{colors:[`棕褐色`,`暖灰褐色`,`赭色`,`咖啡色`,`青铜色`,`金色`,`芥末色`,`琥珀色`],description:`传统日本色彩调色板`,title:`日本颜色`},{colors:[`北欧蓝`,`冰色`,`峡湾色`,`钢铁色`,`冰川色`,`板岩色`,`云色`,`石头色`],description:`北欧极简主义配色方案`,title:`北欧颜色`},{colors:[`霞光红`,`枣红`,`黄栌`,`竹青`,`乌梅紫`,`缃色`,`青冥`,`赭石`],description:`中国传统色彩,源自古代纺织品、瓷器和绘画`,title:`中国传统颜色`}],title:`预设`}}},title:`外观`}},sections:{section:{general:{title:`通用`}}},theme:{title:`主题`,description:`切换 AIRI 的基础主题,亮色模式或暗色模式。 `},title:`设置`,voices:`声线`,vrm:{"change-model":{"from-file":`从文件加载`,"from-file-select":`选择`,"from-url":`从 URL 加载`,"from-url-confirm":`加载`,"from-url-placeholder":`输入 VRM 模型 URL`,title:`更换模型`},title:`VRM 设置`,"scale-and-position":{"model-info-title":`模型尺寸信息`,"model-info-x":`宽度(X轴)`,"model-info-y":`高度(Y轴)`,"model-info-z":`深度(Z轴)`,tips:`设定模型放置的空间坐标。 坐标轴已被可视化。 -`,scale:`缩放`,x:`X轴偏移`,y:`Y 轴偏移`,z:`Z轴偏移`,fov:`视角调整(度)`,"rotation-y":`模型朝向(Y轴旋转)`,"camera-distance":`相机距离(画面缩放)`,"eye-tracking-mode":{title:`模型注视方向`,options:{option:{camera:`相机`,mouse:`鼠标`,disabled:`禁用`}}}},"switch-to-vrm":{title:`想切换至Live2D虚拟形象?`,"change-to-vrm":`切换至Live2D虚拟形象设定页面`},"theme-color-from-model":{"button-extract":{title:`提取`}}}},settings_default=data$3,data$2={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`核心系统`,you:`你`}}},message:`说点什么...`,"select-a-audio-input":`选择一个音频输入设备`,"select-a-model":`选择一个模型`,"select-a-voice":`选择一个声线`,viewers:{"debug-menu":{emotions:`表情`,"emotions-btn":{angry:`😠 生气`,awkward:`😳 尴尬`,happy:`😄 开心`,neutral:`🙂 日常`,question:`🤔 疑问`,sad:`😫 难过`,surprised:`🤯 惊喜`,think:`🤨 思考`},vrm:{camera:`摄像机`,model:{title:`模型`}}}},waiting:`等待中`,operations:{"load-models":`加载模型`,"load-models-status":{loading:`模型加载中`,ready:`已就绪`}}},stage_default=data$2,data$1={"allow-visible-on-all-workspaces":{title:`跨桌面可见性`,description:`允许窗口在所有虚拟桌面中可见,仅限 macOS。`},pages:{modules:{"mcp-server":{description:`连接与管理 MCP 服务器和工具`,title:`MCP 服务器`}},themes:{sections:{section:{"window-shortcuts":{title:`键盘快捷键`}}},"window-shortcuts":{description:`修改窗口快捷方式`,title:`窗口快捷方式`,"toggle-move":{label:`切换移动状态`},"toggle-resize":{label:`调整大小`},"toggle-ignore-mouse-event":{label:`忽略鼠标事件`},"press-keys":`请按下按键...`}}}},settings_default$1=data$1,data={operations:{"load-models":`加载推理模型`,"load-models-status":{loading:`加载中`,ready:`已就绪`}}},stage_default$1=data,tamagotchi_default={stage:stage_default$1,settings:settings_default$1},zh_Hans_default={base:base_default,docs:docs_default,settings:settings_default,stage:stage_default,tamagotchi:tamagotchi_default},locales_default={en:en_default,"zh-Hans":zh_Hans_default};const languageRemap$1={"zh-CN":`zh-Hans`,"zh-TW":`zh-Hans`,"zh-HK":`zh-Hans`,"zh-Hant":`zh-Hans`,"en-US":`en`,"en-GB":`en`,"en-AU":`en`,en:`en`},DEFAULT_THEME_COLORS_HUE=220.44,convert=converter_default(`oklch`),getHueFrom=color$2=>color$2?convert(color$2)?.h:DEFAULT_THEME_COLORS_HUE,useSettings=defineStore(`settings`,()=>{let selectedAudioDevice=ref(),language=useLocalStorage(`settings/language`,``),stageView=useLocalStorage(`settings/stage/view/model-renderer`,`2d`),stageViewControlsEnabled=ref(!1),live2dDisableFocus=useLocalStorage(`settings/live2d/disable-focus`,!1),disableTransitions=useLocalStorage(`settings/disable-transitions`,!0),usePageSpecificTransitions=useLocalStorage(`settings/use-page-specific-transitions`,!0),themeColorsHue=useLocalStorage(`settings/theme/colors/hue`,DEFAULT_THEME_COLORS_HUE),themeColorsHueDynamic=useLocalStorage(`settings/theme/colors/hue-dynamic`,!1),allowVisibleOnAllWorkspaces=useLocalStorage(`settings/allow-visible-on-all-workspaces`,!0);function getLanguage(){let language$1=localStorage.getItem(`settings/language`);language$1||=navigator.language||`en`;let languages=Object.keys(locales_default);return languageRemap$1[language$1||`en`]!=null&&(language$1=languageRemap$1[language$1||`en`]),language$1&&languages.includes(language$1)?language$1:`en`}function setThemeColorsHue(hue$2=DEFAULT_THEME_COLORS_HUE){themeColorsHue.value=hue$2,themeColorsHueDynamic.value=!1}function applyPrimaryColorFrom(color$2){setThemeColorsHue(getHueFrom(color$2))}function isColorSelectedForPrimary(hexColor){if(themeColorsHueDynamic.value)return!1;let h$1=getHueFrom(hexColor);if(!h$1)return!1;let hueDifference=Math.abs(h$1-themeColorsHue.value);return hueDifference<.01||hueDifference>359.99}return onMounted(()=>{language.value=getLanguage()}),{disableTransitions,usePageSpecificTransitions,language,stageView,live2dDisableFocus,stageViewControlsEnabled,themeColorsHue,themeColorsHueDynamic,selectedAudioDevice,allowVisibleOnAllWorkspaces,setThemeColorsHue,applyPrimaryColorFrom,isColorSelectedForPrimary}}),useSettingsAudioDevice=defineStore(`settings-audio-devices`,()=>{let{audioInputs,deviceConstraints,selectedAudioInput:selectedAudioInputNonPersist,startStream,stopStream,stream,askPermission}=useAudioDevice$1(),selectedAudioInputPersist=useLocalStorage(`settings/audio/input`,selectedAudioInputNonPersist.value),selectedAudioInputEnabledPersist=useLocalStorage(`settings/audio/input-enabled`,!1);return watch(selectedAudioInputPersist,newValue=>{selectedAudioInputNonPersist.value=newValue}),watch(selectedAudioInputEnabledPersist,val=>{val?startStream():stopStream()}),onMounted(()=>{selectedAudioInputEnabledPersist.value&&selectedAudioInputPersist.value&&startStream(),selectedAudioInputNonPersist.value&&!selectedAudioInputEnabledPersist.value&&(selectedAudioInputPersist.value=selectedAudioInputNonPersist.value)}),{audioInputs,deviceConstraints,selectedAudioInput:selectedAudioInputPersist,enabled:selectedAudioInputEnabledPersist,stream,askPermission,startStream,stopStream}});var import_localforage=__toESM(require_localforage());const useVRM=defineStore(`vrm`,()=>{let indexedDbModelFile=ref(null);onMounted(async()=>{let file=await import_localforage.default.getItem(`assets-models-vrm`);file&&(indexedDbModelFile.value=file)});let modelFile=computed({get:()=>indexedDbModelFile.value,set:file=>{file?import_localforage.default.setItem(`assets-models-vrm`,file):import_localforage.default.removeItem(`assets-models-vrm`),indexedDbModelFile.value=file}}),defaultModelUrl=`/assets/vrm/models/AvatarSample-B/AvatarSample_B.vrm`,modelUrl=useLocalStorage(`settings/vrm/modelURL`,defaultModelUrl),scale$1=useLocalStorage(`settings/vrm/cameraScale`,1),modelSize=useLocalStorage(`settings/vrm/modelSize`,{x:0,y:0,z:0}),modelOrigin=useLocalStorage(`settings/vrm/modelOrigin`,{x:0,y:0,z:0}),modelOffset=useLocalStorage(`settings/vrm/modelOffset`,{x:0,y:0,z:0}),modelRotationY=useLocalStorage(`settings/vrm/modelRotationY`,0),cameraFOV=useLocalStorage(`settings/vrm/cameraFOV`,40),cameraPosition=useLocalStorage(`settings/vrm/camera-position`,{x:0,y:0,z:-1}),cameraDistance=useLocalStorage(`settings/vrm/cameraDistance`,0),directionalLightPosition=useLocalStorage(`settings/vrm/scenes/scene/directional-light/position`,{x:1,y:1,z:-10}),directionalLightTarget=useLocalStorage(`settings/vrm/scenes/scene/directional-light/target`,{x:0,y:0,z:0}),directionalLightRotation=useLocalStorage(`settings/vrm/scenes/scene/directional-light/rotation`,{x:0,y:0,z:0}),directionalLightIntensity=useLocalStorage(`settings/vrm/scenes/scene/directional-light/intensity`,1.8),directionalLightColor=useLocalStorage(`settings/vrm/scenes/scene/directional-light/color`,16777215),hemisphereLightPosition=useLocalStorage(`settings/vrm/scenes/scene/hemisphere-light/position`,{x:0,y:1,z:0}),hemisphereSkyColor=useLocalStorage(`settings/vrm/scenes/scene/hemisphere-light/sky-color`,16777215),hemisphereGroundColor=useLocalStorage(`settings/vrm/scenes/scene/hemisphere-light/ground-color`,0),hemisphereLightIntensity=useLocalStorage(`settings/vrm/scenes/scene/hemisphere-light/intensity`,1),ambientLightIntensity=useLocalStorage(`settings/vrm/scenes/scene/ambient-light/intensity`,2.3),ambientLightColor=useLocalStorage(`settings/vrm/scenes/scene/ambient-light/color`,16777215),lookAtTarget=useLocalStorage(`settings/vrm/lookAtTarget`,{x:0,y:0,z:0}),isTracking=useLocalStorage(`settings/vrm/isTracking`,!1),trackingMode=useLocalStorage(`settings/vrm/trackingMode`,`none`),eyeHeight=useLocalStorage(`settings/vrm/eyeHeight`,0);return{modelFile,modelUrl,modelSize,scale:scale$1,modelOrigin,modelOffset,modelRotationY,cameraFOV,cameraPosition,cameraDistance,directionalLightPosition,directionalLightTarget,directionalLightRotation,directionalLightIntensity,directionalLightColor,ambientLightIntensity,ambientLightColor,hemisphereLightPosition,hemisphereSkyColor,hemisphereGroundColor,hemisphereLightIntensity,lookAtTarget,isTracking,trackingMode,eyeHeight}});var onboarding_default=`/assets/onboarding-S2C4LIWw.avif`,ProviderAccountIdInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderAccountIdInput`,props:mergeModels({placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:props.label||`Account ID`,description:props.description||`Account ID`,placeholder:props.placeholder,required:props.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderAccountIdInput_default=ProviderAccountIdInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$19=[`onClick`],_hoisted_2$10={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_3$7={"mt-4":``};var ProviderAdvancedSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderAdvancedSettings`,props:{title:{},initialVisible:{type:Boolean}},setup(__props){let props=__props,visible=ref(props.initialVisible||!1);function toggleVisible(){visible.value=!visible.value}return(_ctx,_cache$1)=>(openBlock(),createBlock(Collapsable_default,{"w-full":``},{trigger:withCtx(slotProps=>[createBaseVNode(`button`,{transition:`all ease-in-out duration-250`,"w-full":``,flex:``,"items-center":``,"gap-1.5":``,"outline-none":``,class:`[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0`,onClick:()=>slotProps.setVisible(!slotProps.visible)&&toggleVisible()},[createBaseVNode(`h2`,_hoisted_2$10,[createBaseVNode(`span`,null,toDisplayString(_ctx.title||`Advanced`),1)]),createBaseVNode(`div`,{transform:``,transition:`transform duration-250`,class:normalizeClass({"rotate-180":slotProps.visible})},_cache$1[0]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``},null,-1)],2)],8,_hoisted_1$19)]),default:withCtx(()=>[createBaseVNode(`div`,_hoisted_3$7,[renderSlot(_ctx.$slots,`default`)])]),_:3}))}}),ProviderAdvancedSettings_default=ProviderAdvancedSettings_vue_vue_type_script_setup_true_lang_default,ProviderApiKeyInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderApiKeyInput`,props:mergeModels({providerName:{},placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,{t:t$1}=useI18n(),modelValue=useModel(__props,`modelValue`),computedDescription=computed(()=>props.description||`API Key for ${props.providerName}`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:_ctx.label||unref(t$1)(`settings.pages.providers.common.fields.field.api-key.label`),description:computedDescription.value,placeholder:_ctx.placeholder,required:_ctx.required,type:`password`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderApiKeyInput_default=ProviderApiKeyInput_vue_vue_type_script_setup_true_lang_default,ProviderBaseUrlInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderBaseUrlInput`,props:mergeModels({placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:props.label||`Base URL`,description:props.description||(props.required?`Base URL`:`Custom base URL (optional)`),placeholder:props.placeholder,required:props.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderBaseUrlInput_default=ProviderBaseUrlInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$18={flex:`~ col gap-6`},_hoisted_2$9={flex:`~ row`,"items-center":``,"justify-between":``},_hoisted_3$6={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_4$5={text:`neutral-400 dark:neutral-500`};var ProviderBasicSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderBasicSettings`,props:{title:{},description:{},onReset:{type:Function}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$18,[createBaseVNode(`div`,_hoisted_2$9,[createBaseVNode(`div`,null,[createBaseVNode(`h2`,_hoisted_3$6,toDisplayString(_ctx.title||`Basic`),1),createBaseVNode(`div`,_hoisted_4$5,[createBaseVNode(`span`,null,toDisplayString(_ctx.description||`Essential settings`),1)])]),_ctx.onReset?(openBlock(),createElementBlock(`button`,{key:0,title:`Reset settings`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-2":``,transition:`all duration-250 ease-in-out`,text:`neutral-500 dark:neutral-400`,bg:`transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700`,onClick:_cache$1[0]||=(...args)=>_ctx.onReset&&_ctx.onReset(...args)},_cache$1[1]||=[createBaseVNode(`div`,{"i-solar:refresh-bold-duotone":``,"text-xl":``},null,-1)])):createCommentVNode(``,!0)]),renderSlot(_ctx.$slots,`default`)]))}}),ProviderBasicSettings_default=ProviderBasicSettings_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$17={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-6`};var ProviderSettingsContainer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsContainer`,setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$17,[renderSlot(_ctx.$slots,`default`)]))}}),ProviderSettingsContainer_default=ProviderSettingsContainer_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$16={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``};var ProviderSettingsLayout2_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsLayout2`,props:{providerName:{},providerIcon:{},providerIconColor:{},onBack:{type:Function}},setup(__props){return(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$16,[createBaseVNode(`div`,{text:`60`,class:normalizeClass(_ctx.providerIcon||_ctx.providerIconColor)},null,2)])),[[_directive_motion]])],64)}}}),ProviderSettingsLayout2_default=ProviderSettingsLayout2_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$15={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``};var ProviderSettingsLayout_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsLayout`,props:{providerName:{},providerIcon:{},providerIconColor:{},onBack:{type:Function}},setup(__props){return(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$15,[createBaseVNode(`div`,{text:`60`,class:normalizeClass(_ctx.providerIcon||_ctx.providerIconColor)},null,2)])),[[_directive_motion]])],64)}}}),ProviderSettingsLayout_default=ProviderSettingsLayout_vue_vue_type_script_setup_true_lang_default; +`,scale:`缩放`,x:`X轴偏移`,y:`Y 轴偏移`,z:`Z轴偏移`,fov:`视角调整(度)`,"rotation-y":`模型朝向(Y轴旋转)`,"camera-distance":`相机距离(画面缩放)`,"eye-tracking-mode":{title:`模型注视方向`,options:{option:{camera:`相机`,mouse:`鼠标`,disabled:`禁用`}}}},"switch-to-vrm":{title:`想切换至Live2D虚拟形象?`,"change-to-vrm":`切换至Live2D虚拟形象设定页面`},"theme-color-from-model":{"button-extract":{title:`提取`}}}},settings_default=data$3,data$2={chat:{message:{"character-name":{airi:`AIRI`,"core-system":`核心系统`,you:`你`}}},message:`说点什么...`,"select-a-audio-input":`选择一个音频输入设备`,"select-a-model":`选择一个模型`,"select-a-voice":`选择一个声线`,viewers:{"debug-menu":{emotions:`表情`,"emotions-btn":{angry:`😠 生气`,awkward:`😳 尴尬`,happy:`😄 开心`,neutral:`🙂 日常`,question:`🤔 疑问`,sad:`😫 难过`,surprised:`🤯 惊喜`,think:`🤨 思考`},vrm:{camera:`摄像机`,model:{title:`模型`}}}},waiting:`等待中`,operations:{"load-models":`加载模型`,"load-models-status":{loading:`模型加载中`,ready:`已就绪`}}},stage_default=data$2,data$1={"allow-visible-on-all-workspaces":{title:`跨桌面可见性`,description:`允许窗口在所有虚拟桌面中可见,仅限 macOS。`},pages:{modules:{"mcp-server":{description:`连接与管理 MCP 服务器和工具`,title:`MCP 服务器`}},themes:{sections:{section:{"window-shortcuts":{title:`键盘快捷键`}}},"window-shortcuts":{description:`修改窗口快捷方式`,title:`窗口快捷方式`,"toggle-move":{label:`切换移动状态`},"toggle-resize":{label:`调整大小`},"toggle-ignore-mouse-event":{label:`忽略鼠标事件`},"press-keys":`请按下按键...`}}}},settings_default$1=data$1,data={operations:{"load-models":`加载推理模型`,"load-models-status":{loading:`加载中`,ready:`已就绪`}}},stage_default$1=data,tamagotchi_default={stage:stage_default$1,settings:settings_default$1},zh_Hans_default={base:base_default,docs:docs_default,settings:settings_default,stage:stage_default,tamagotchi:tamagotchi_default},locales_default={en:en_default,"zh-Hans":zh_Hans_default};const languageRemap$1={"zh-CN":`zh-Hans`,"zh-TW":`zh-Hans`,"zh-HK":`zh-Hans`,"zh-Hant":`zh-Hans`,"en-US":`en`,"en-GB":`en`,"en-AU":`en`,en:`en`},DEFAULT_THEME_COLORS_HUE=220.44,convert=converter_default(`oklch`),getHueFrom=color$2=>color$2?convert(color$2)?.h:DEFAULT_THEME_COLORS_HUE,useSettings=defineStore(`settings`,()=>{let selectedAudioDevice=ref(),language=useLocalStorage(`settings/language`,``),stageView=useLocalStorage(`settings/stage/view/model-renderer`,`2d`),stageViewControlsEnabled=ref(!1),live2dDisableFocus=useLocalStorage(`settings/live2d/disable-focus`,!1),disableTransitions=useLocalStorage(`settings/disable-transitions`,!0),usePageSpecificTransitions=useLocalStorage(`settings/use-page-specific-transitions`,!0),themeColorsHue=useLocalStorage(`settings/theme/colors/hue`,DEFAULT_THEME_COLORS_HUE),themeColorsHueDynamic=useLocalStorage(`settings/theme/colors/hue-dynamic`,!1),allowVisibleOnAllWorkspaces=useLocalStorage(`settings/allow-visible-on-all-workspaces`,!0);function getLanguage(){let language$1=localStorage.getItem(`settings/language`);language$1||=navigator.language||`en`;let languages=Object.keys(locales_default);return languageRemap$1[language$1||`en`]!=null&&(language$1=languageRemap$1[language$1||`en`]),language$1&&languages.includes(language$1)?language$1:`en`}function setThemeColorsHue(hue$2=DEFAULT_THEME_COLORS_HUE){themeColorsHue.value=hue$2,themeColorsHueDynamic.value=!1}function applyPrimaryColorFrom(color$2){setThemeColorsHue(getHueFrom(color$2))}function isColorSelectedForPrimary(hexColor){if(themeColorsHueDynamic.value)return!1;let h$1=getHueFrom(hexColor);if(!h$1)return!1;let hueDifference=Math.abs(h$1-themeColorsHue.value);return hueDifference<.01||hueDifference>359.99}return onMounted(()=>{language.value=getLanguage()}),{disableTransitions,usePageSpecificTransitions,language,stageView,live2dDisableFocus,stageViewControlsEnabled,themeColorsHue,themeColorsHueDynamic,selectedAudioDevice,allowVisibleOnAllWorkspaces,setThemeColorsHue,applyPrimaryColorFrom,isColorSelectedForPrimary}}),useSettingsAudioDevice=defineStore(`settings-audio-devices`,()=>{let{audioInputs,deviceConstraints,selectedAudioInput:selectedAudioInputNonPersist,startStream,stopStream,stream,askPermission}=useAudioDevice$1(),selectedAudioInputPersist=useLocalStorage(`settings/audio/input`,selectedAudioInputNonPersist.value),selectedAudioInputEnabledPersist=useLocalStorage(`settings/audio/input-enabled`,!1);return watch(selectedAudioInputPersist,newValue=>{selectedAudioInputNonPersist.value=newValue}),watch(selectedAudioInputEnabledPersist,val=>{val?startStream():stopStream()}),onMounted(()=>{selectedAudioInputEnabledPersist.value&&selectedAudioInputPersist.value&&startStream(),selectedAudioInputNonPersist.value&&!selectedAudioInputEnabledPersist.value&&(selectedAudioInputPersist.value=selectedAudioInputNonPersist.value)}),{audioInputs,deviceConstraints,selectedAudioInput:selectedAudioInputPersist,enabled:selectedAudioInputEnabledPersist,stream,askPermission,startStream,stopStream}});var import_localforage=__toESM(require_localforage());const useVRM=defineStore(`vrm`,()=>{let indexedDbModelFile=ref(null);onMounted(async()=>{let file=await import_localforage.default.getItem(`assets-models-vrm`);file&&(indexedDbModelFile.value=file)});let modelFile=computed({get:()=>indexedDbModelFile.value,set:file=>{file?import_localforage.default.setItem(`assets-models-vrm`,file):import_localforage.default.removeItem(`assets-models-vrm`),indexedDbModelFile.value=file}}),defaultModelUrl=`/assets/vrm/models/AvatarSample-B/AvatarSample_B.vrm`,modelUrl=useLocalStorage(`settings/vrm/modelURL`,defaultModelUrl),scale$1=useLocalStorage(`settings/vrm/cameraScale`,1),modelSize=useLocalStorage(`settings/vrm/modelSize`,{x:0,y:0,z:0}),modelOrigin=useLocalStorage(`settings/vrm/modelOrigin`,{x:0,y:0,z:0}),modelOffset=useLocalStorage(`settings/vrm/modelOffset`,{x:0,y:0,z:0}),modelRotationY=useLocalStorage(`settings/vrm/modelRotationY`,0),cameraFOV=useLocalStorage(`settings/vrm/cameraFOV`,40),cameraPosition=useLocalStorage(`settings/vrm/camera-position`,{x:0,y:0,z:-1}),cameraDistance=useLocalStorage(`settings/vrm/cameraDistance`,0),directionalLightPosition=useLocalStorage(`settings/vrm/scenes/scene/directional-light/position`,{x:1,y:1,z:-10}),directionalLightTarget=useLocalStorage(`settings/vrm/scenes/scene/directional-light/target`,{x:0,y:0,z:0}),directionalLightRotation=useLocalStorage(`settings/vrm/scenes/scene/directional-light/rotation`,{x:0,y:0,z:0}),directionalLightIntensity=useLocalStorage(`settings/vrm/scenes/scene/directional-light/intensity`,.6),directionalLightColor=useLocalStorage(`settings/vrm/scenes/scene/directional-light/color`,`#FFFFFF`),hemisphereLightPosition=useLocalStorage(`settings/vrm/scenes/scene/hemisphere-light/position`,{x:0,y:1,z:0}),hemisphereSkyColor=useLocalStorage(`settings/vrm/scenes/scene/hemisphere-light/sky-color`,`#FFFFFF`),hemisphereGroundColor=useLocalStorage(`settings/vrm/scenes/scene/hemisphere-light/ground-color`,`#000000`),hemisphereLightIntensity=useLocalStorage(`settings/vrm/scenes/scene/hemisphere-light/intensity`,2),ambientLightIntensity=useLocalStorage(`settings/vrm/scenes/scene/ambient-light/intensity`,0),ambientLightColor=useLocalStorage(`settings/vrm/scenes/scene/ambient-light/color`,`#FFFFFF`),lookAtTarget=useLocalStorage(`settings/vrm/lookAtTarget`,{x:0,y:0,z:0}),isTracking=useLocalStorage(`settings/vrm/isTracking`,!1),trackingMode=useLocalStorage(`settings/vrm/trackingMode`,`none`),eyeHeight=useLocalStorage(`settings/vrm/eyeHeight`,0);return{modelFile,modelUrl,modelSize,scale:scale$1,modelOrigin,modelOffset,modelRotationY,cameraFOV,cameraPosition,cameraDistance,directionalLightPosition,directionalLightTarget,directionalLightRotation,directionalLightIntensity,directionalLightColor,ambientLightIntensity,ambientLightColor,hemisphereLightPosition,hemisphereSkyColor,hemisphereGroundColor,hemisphereLightIntensity,lookAtTarget,isTracking,trackingMode,eyeHeight}});var onboarding_default=`/assets/onboarding-S2C4LIWw.avif`,ProviderAccountIdInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderAccountIdInput`,props:mergeModels({placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:props.label||`Account ID`,description:props.description||`Account ID`,placeholder:props.placeholder,required:props.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderAccountIdInput_default=ProviderAccountIdInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$19=[`onClick`],_hoisted_2$10={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_3$7={"mt-4":``};var ProviderAdvancedSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderAdvancedSettings`,props:{title:{},initialVisible:{type:Boolean}},setup(__props){let props=__props,visible=ref(props.initialVisible||!1);function toggleVisible(){visible.value=!visible.value}return(_ctx,_cache$1)=>(openBlock(),createBlock(Collapsable_default,{"w-full":``},{trigger:withCtx(slotProps=>[createBaseVNode(`button`,{transition:`all ease-in-out duration-250`,"w-full":``,flex:``,"items-center":``,"gap-1.5":``,"outline-none":``,class:`[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0`,onClick:()=>slotProps.setVisible(!slotProps.visible)&&toggleVisible()},[createBaseVNode(`h2`,_hoisted_2$10,[createBaseVNode(`span`,null,toDisplayString(_ctx.title||`Advanced`),1)]),createBaseVNode(`div`,{transform:``,transition:`transform duration-250`,class:normalizeClass({"rotate-180":slotProps.visible})},_cache$1[0]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-down-linear":``},null,-1)],2)],8,_hoisted_1$19)]),default:withCtx(()=>[createBaseVNode(`div`,_hoisted_3$7,[renderSlot(_ctx.$slots,`default`)])]),_:3}))}}),ProviderAdvancedSettings_default=ProviderAdvancedSettings_vue_vue_type_script_setup_true_lang_default,ProviderApiKeyInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderApiKeyInput`,props:mergeModels({providerName:{},placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,{t:t$1}=useI18n(),modelValue=useModel(__props,`modelValue`),computedDescription=computed(()=>props.description||`API Key for ${props.providerName}`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:_ctx.label||unref(t$1)(`settings.pages.providers.common.fields.field.api-key.label`),description:computedDescription.value,placeholder:_ctx.placeholder,required:_ctx.required,type:`password`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderApiKeyInput_default=ProviderApiKeyInput_vue_vue_type_script_setup_true_lang_default,ProviderBaseUrlInput_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderBaseUrlInput`,props:mergeModels({placeholder:{},required:{type:Boolean},label:{},description:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(__props){let props=__props,modelValue=useModel(__props,`modelValue`);return(_ctx,_cache$1)=>(openBlock(),createBlock(unref(FieldInput_default),{modelValue:modelValue.value,"onUpdate:modelValue":_cache$1[0]||=$event=>modelValue.value=$event,label:props.label||`Base URL`,description:props.description||(props.required?`Base URL`:`Custom base URL (optional)`),placeholder:props.placeholder,required:props.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ProviderBaseUrlInput_default=ProviderBaseUrlInput_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$18={flex:`~ col gap-6`},_hoisted_2$9={flex:`~ row`,"items-center":``,"justify-between":``},_hoisted_3$6={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_4$5={text:`neutral-400 dark:neutral-500`};var ProviderBasicSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderBasicSettings`,props:{title:{},description:{},onReset:{type:Function}},setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$18,[createBaseVNode(`div`,_hoisted_2$9,[createBaseVNode(`div`,null,[createBaseVNode(`h2`,_hoisted_3$6,toDisplayString(_ctx.title||`Basic`),1),createBaseVNode(`div`,_hoisted_4$5,[createBaseVNode(`span`,null,toDisplayString(_ctx.description||`Essential settings`),1)])]),_ctx.onReset?(openBlock(),createElementBlock(`button`,{key:0,title:`Reset settings`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-2":``,transition:`all duration-250 ease-in-out`,text:`neutral-500 dark:neutral-400`,bg:`transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700`,onClick:_cache$1[0]||=(...args)=>_ctx.onReset&&_ctx.onReset(...args)},_cache$1[1]||=[createBaseVNode(`div`,{"i-solar:refresh-bold-duotone":``,"text-xl":``},null,-1)])):createCommentVNode(``,!0)]),renderSlot(_ctx.$slots,`default`)]))}}),ProviderBasicSettings_default=ProviderBasicSettings_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$17={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-6`};var ProviderSettingsContainer_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsContainer`,setup(__props){return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$17,[renderSlot(_ctx.$slots,`default`)]))}}),ProviderSettingsContainer_default=ProviderSettingsContainer_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$16={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``};var ProviderSettingsLayout2_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsLayout2`,props:{providerName:{},providerIcon:{},providerIconColor:{},onBack:{type:Function}},setup(__props){return(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$16,[createBaseVNode(`div`,{text:`60`,class:normalizeClass(_ctx.providerIcon||_ctx.providerIconColor)},null,2)])),[[_directive_motion]])],64)}}}),ProviderSettingsLayout2_default=ProviderSettingsLayout2_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$15={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``};var ProviderSettingsLayout_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ProviderSettingsLayout`,props:{providerName:{},providerIcon:{},providerIconColor:{},onBack:{type:Function}},setup(__props){return(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$15,[createBaseVNode(`div`,{text:`60`,class:normalizeClass(_ctx.providerIcon||_ctx.providerIconColor)},null,2)])),[[_directive_motion]])],64)}}}),ProviderSettingsLayout_default=ProviderSettingsLayout_vue_vue_type_script_setup_true_lang_default; /** * anime.js - ESM * @version v4.1.2 @@ -5082,4 +5085,4 @@ Coordinate axes are visualised. * @copyright (c) 2025 Julian Garnier * @see https://animejs.com */ -const isBrowser=typeof window<`u`,win=isBrowser?window:null,doc=isBrowser?document:null,tweenTypes={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},valueTypes={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},tickModes={NONE:0,AUTO:1,FORCE:2},compositionTypes={replace:0,none:1,blend:2},isRegisteredTargetSymbol=Symbol(),isDomSymbol=Symbol(),isSvgSymbol=Symbol(),transformsSymbol=Symbol(),morphPointsSymbol=Symbol(),proxyTargetSymbol=Symbol(),minValue=1e-11,maxValue=1e12,K=1e3,maxFps=120,emptyString=``,shortTransforms=(()=>{let map=new Map;return map.set(`x`,`translateX`),map.set(`y`,`translateY`),map.set(`z`,`translateZ`),map})(),validTransforms=[`translateX`,`translateY`,`translateZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`skew`,`skewX`,`skewY`,`perspective`,`matrix`,`matrix3d`],transformsFragmentStrings=validTransforms.reduce((a$1,v)=>({...a$1,[v]:v+`(`}),{}),noop=()=>{},hexTestRgx=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,rgbExecRgx=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,rgbaExecRgx=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,hslExecRgx=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,hslaExecRgx=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,digitWithExponentRgx=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,unitsExecRgx=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,lowerCaseRgx=/([a-z])([A-Z])/g,transformsExecRgx=/(\w+)(\([^)]+\)+)/g,defaults={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:maxFps,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:K,delay:0,loopDelay:0,ease:`out(2)`,composition:compositionTypes.replace,modifier:v=>v,onBegin:noop,onBeforeUpdate:noop,onUpdate:noop,onLoop:noop,onPause:noop,onComplete:noop,onRender:noop},scope={current:null,root:doc},globals={defaults,precision:4,timeScale:1,tickThreshold:200},globalVersions={version:`4.1.2`,engine:null};isBrowser&&(win.AnimeJS||=[],win.AnimeJS.push(globalVersions));const toLowerCase=str=>str.replace(lowerCaseRgx,`$1-$2`).toLowerCase(),stringStartsWith=(str,sub)=>str.indexOf(sub)===0,now=Date.now,isArr=Array.isArray,isObj=a$1=>a$1&&a$1.constructor===Object,isNum=a$1=>typeof a$1==`number`&&!isNaN(a$1),isStr=a$1=>typeof a$1==`string`,isFnc=a$1=>typeof a$1==`function`,isUnd=a$1=>a$1===void 0,isNil=a$1=>isUnd(a$1)||a$1===null,isSvg=a$1=>isBrowser&&a$1 instanceof SVGElement,isHex=a$1=>hexTestRgx.test(a$1),isRgb=a$1=>stringStartsWith(a$1,`rgb`),isHsl=a$1=>stringStartsWith(a$1,`hsl`),isCol=a$1=>isHex(a$1)||isRgb(a$1)||isHsl(a$1),isKey=a$1=>!globals.defaults.hasOwnProperty(a$1),parseNumber=str=>isStr(str)?parseFloat(str):str,pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,abs=Math.abs,ceil=Math.ceil,floor=Math.floor,asin=Math.asin,PI=Math.PI,_round=Math.round,clamp=(v,min$1,max$1)=>vmax$1?max$1:v,powCache={},round=(v,decimalLength)=>{if(decimalLength<0)return v;if(!decimalLength)return _round(v);let p$4=powCache[decimalLength];return p$4||=powCache[decimalLength]=10**decimalLength,_round(v*p$4)/p$4},snap=(v,increment$1)=>isArr(increment$1)?increment$1.reduce((closest,cv)=>abs(cv-v)start+(end-start)*progress$1,random=(min$1,max$1,decimalLength)=>{let m=10**(decimalLength||0);return floor((Math.random()*(max$1-min$1+1/m)+min$1)*m)/m},shuffle=items=>{let m=items.length,t$1,i;for(;m;)i=random(0,--m),t$1=items[m],items[m]=items[i],items[i]=t$1;return items},clampInfinity=v=>v===1/0?maxValue:v===-1/0?-1e12:v,normalizeTime=v=>v<=minValue?minValue:clampInfinity(round(v,11)),cloneArray=a$1=>isArr(a$1)?[...a$1]:a$1,mergeObjects=(o1,o2)=>{let merged={...o1};for(let p$4 in o2){let o1p=o1[p$4];merged[p$4]=isUnd(o1p)?o2[p$4]:o1p}return merged},forEachChildren=(parent,callback,reverse,prevProp=`_prev`,nextProp=`_next`)=>{let next=parent._head,adjustedNextProp=nextProp;for(reverse&&(next=parent._tail,adjustedNextProp=prevProp);next;){let currentNext=next[adjustedNextProp];callback(next),next=currentNext}},removeChild=(parent,child,prevProp=`_prev`,nextProp=`_next`)=>{let prev=child[prevProp],next=child[nextProp];prev?prev[nextProp]=next:parent._head=next,next?next[prevProp]=prev:parent._tail=prev,child[prevProp]=null,child[nextProp]=null},addChild=(parent,child,sortMethod,prevProp=`_prev`,nextProp=`_next`)=>{let prev=parent._tail;for(;prev&&sortMethod&&sortMethod(prev,child);)prev=prev[prevProp];let next=prev?prev[nextProp]:parent._head;prev?prev[nextProp]=child:parent._head=child,next?next[prevProp]=child:parent._tail=child,child[prevProp]=prev,child[nextProp]=next},createRefreshable=constructor=>{let tracked;return(...args)=>{let currentIteration,currentIterationProgress,reversed,alternate;tracked&&(currentIteration=tracked.currentIteration,currentIterationProgress=tracked.iterationProgress,reversed=tracked.reversed,alternate=tracked._alternate,tracked.revert());let cleanup=constructor(...args);return cleanup&&!isFnc(cleanup)&&cleanup.revert&&(tracked=cleanup),isUnd(currentIterationProgress)||(tracked.currentIteration=currentIteration,tracked.iterationProgress=(alternate&¤tIteration%2?!reversed:reversed)?1-currentIterationProgress:currentIterationProgress),cleanup||noop}};var Clock=class{constructor(initTime=0){this.deltaTime=0,this._currentTime=initTime,this._elapsedTime=initTime,this._startTime=initTime,this._lastTime=initTime,this._scheduledTime=0,this._frameDuration=round(K/maxFps,0),this._fps=maxFps,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(frameRate){let previousFrameDuration=this._frameDuration,fr=+frameRate,fps=fr{let parent=tickable.parent,duration$2=tickable.duration,completed=tickable.completed,iterationDuration=tickable.iterationDuration,iterationCount=tickable.iterationCount,_currentIteration=tickable._currentIteration,_loopDelay=tickable._loopDelay,_reversed=tickable._reversed,_alternate=tickable._alternate,_hasChildren=tickable._hasChildren,tickableDelay=tickable._delay,tickablePrevAbsoluteTime=tickable._currentTime,tickableEndTime=tickableDelay+iterationDuration,tickableAbsoluteTime=time$2-tickableDelay,tickablePrevTime=clamp(tickablePrevAbsoluteTime,-tickableDelay,duration$2),tickableCurrentTime=clamp(tickableAbsoluteTime,-tickableDelay,duration$2),deltaTime=tickableAbsoluteTime-tickablePrevAbsoluteTime,isCurrentTimeAboveZero=tickableCurrentTime>0,isCurrentTimeEqualOrAboveDuration=tickableCurrentTime>=duration$2,isSetter=duration$2<=minValue,forcedTick=tickMode===tickModes.FORCE,isOdd=0,iterationElapsedTime=tickableAbsoluteTime,hasRendered=0;if(iterationCount>1){let currentIteration=~~(tickableCurrentTime/(iterationDuration+(isCurrentTimeEqualOrAboveDuration?0:_loopDelay)));tickable._currentIteration=clamp(currentIteration,0,iterationCount),isCurrentTimeEqualOrAboveDuration&&tickable._currentIteration--,isOdd=tickable._currentIteration%2,iterationElapsedTime=tickableCurrentTime%(iterationDuration+_loopDelay)||0}let isReversed=_reversed^(_alternate&&isOdd),_ease=tickable._ease,iterationTime=isCurrentTimeEqualOrAboveDuration?isReversed?0:duration$2:isReversed?iterationDuration-iterationElapsedTime:iterationElapsedTime;_ease&&(iterationTime=iterationDuration*_ease(iterationTime/iterationDuration)||0);let isRunningBackwards=(parent?parent.backwards:tickableAbsoluteTime=tickableDelay&&time$2<=tickableEndTime||time$2<=tickableDelay&&tickablePrevTime>tickableDelay||time$2>=tickableEndTime&&tickablePrevTime!==duration$2)||iterationTime>=tickableEndTime&&tickablePrevTime!==duration$2||iterationTime<=tickableDelay&&tickablePrevTime>0||time$2<=tickablePrevTime&&tickablePrevTime===duration$2&&completed||isCurrentTimeEqualOrAboveDuration&&!completed&&isSetter){if(isCurrentTimeAboveZero&&(tickable.computeDeltaTime(tickablePrevTime),muteCallbacks||tickable.onBeforeUpdate(tickable)),!_hasChildren){let forcedRender=forcedTick||(isRunningBackwards?deltaTime*-1:deltaTime)>=globals.tickThreshold,absoluteTime=tickable._offset+(parent?parent._offset:0)+tickableDelay+iterationTime,tween=tickable._head,tweenTarget,tweenStyle,tweenTargetTransforms,tweenTargetTransformsProperties,tweenTransformsNeedUpdate=0;for(;tween;){let tweenComposition=tween._composition,tweenCurrentTime=tween._currentTime,tweenChangeDuration=tween._changeDuration,tweenAbsEndTime=tween._absoluteStartTime+tween._changeDuration,tweenNextRep=tween._nextRep,tweenPrevRep=tween._prevRep,tweenHasComposition=tweenComposition!==compositionTypes.none;if((forcedRender||(tweenCurrentTime!==tweenChangeDuration||absoluteTime<=tweenAbsEndTime+(tweenNextRep?tweenNextRep._delay:0))&&(tweenCurrentTime!==0||absoluteTime>=tween._absoluteStartTime))&&(!tweenHasComposition||!tween._isOverridden&&(!tween._isOverlapped||absoluteTime<=tweenAbsEndTime)&&(!tweenNextRep||tweenNextRep._isOverridden||absoluteTime<=tweenNextRep._absoluteStartTime)&&(!tweenPrevRep||tweenPrevRep._isOverridden||absoluteTime>=tweenPrevRep._absoluteStartTime+tweenPrevRep._changeDuration+tween._delay))){let tweenNewTime=tween._currentTime=clamp(iterationTime-tween._startTime,0,tweenChangeDuration),tweenProgress=tween._ease(tweenNewTime/tween._updateDuration),tweenModifier=tween._modifier,tweenValueType=tween._valueType,tweenType=tween._tweenType,tweenIsObject=tweenType===tweenTypes.OBJECT,tweenIsNumber=tweenValueType===valueTypes.NUMBER,tweenPrecision=tweenIsNumber&&tweenIsObject||tweenProgress===0||tweenProgress===1?-1:globals.precision,value$1,number$5;if(tweenIsNumber)value$1=number$5=tweenModifier(round(interpolate(tween._fromNumber,tween._toNumber,tweenProgress),tweenPrecision));else if(tweenValueType===valueTypes.UNIT)number$5=tweenModifier(round(interpolate(tween._fromNumber,tween._toNumber,tweenProgress),tweenPrecision)),value$1=`${number$5}${tween._unit}`;else if(tweenValueType===valueTypes.COLOR){let fn$5=tween._fromNumbers,tn$1=tween._toNumbers,r$1=round(clamp(tweenModifier(interpolate(fn$5[0],tn$1[0],tweenProgress)),0,255),0),g=round(clamp(tweenModifier(interpolate(fn$5[1],tn$1[1],tweenProgress)),0,255),0),b$1=round(clamp(tweenModifier(interpolate(fn$5[2],tn$1[2],tweenProgress)),0,255),0),a$1=clamp(tweenModifier(round(interpolate(fn$5[3],tn$1[3],tweenProgress),tweenPrecision)),0,1);if(value$1=`rgba(${r$1},${g},${b$1},${a$1})`,tweenHasComposition){let ns=tween._numbers;ns[0]=r$1,ns[1]=g,ns[2]=b$1,ns[3]=a$1}}else if(tweenValueType===valueTypes.COMPLEX){value$1=tween._strings[0];for(let j$1=0,l=tween._toNumbers.length;j$1=duration$2&&!completed||isRunningBackwards&&tickableAbsoluteTime<=minValue&&completed)&&(tickable.onComplete(tickable),tickable.completed=!isRunningBackwards):isCurrentTimeAboveZero&&isCurrentTimeEqualOrAboveDuration?iterationCount===1/0?tickable._startTime+=tickable.duration:tickable._currentIteration>=iterationCount-1&&(tickable.paused=!0,!completed&&!_hasChildren&&(tickable.completed=!0,!muteCallbacks&&!(parent&&(isRunningBackwards||!parent.began))&&(tickable.onComplete(tickable),tickable._resolve(tickable)))):tickable.completed=!1,hasRendered},tick=(tickable,time$2,muteCallbacks,internalRender,tickMode)=>{let _currentIteration=tickable._currentIteration;if(render(tickable,time$2,muteCallbacks,internalRender,tickMode),tickable._hasChildren){let tl=tickable,tlIsRunningBackwards=tl.backwards,tlChildrenTime=internalRender?time$2:tl._iterationTime,tlCildrenTickTime=now(),tlChildrenHasRendered=0,tlChildrenHaveCompleted=!0;if(!internalRender&&tl._currentIteration!==_currentIteration){let tlIterationDuration=tl.iterationDuration;forEachChildren(tl,child=>{if(!tlIsRunningBackwards)!child.completed&&!child.backwards&&child._currentTime{let childTime=round((tlChildrenTime-child._offset)*child._speed,12),childTickMode=child._fps=tl.duration&&(tl.paused=!0,tl.completed||(tl.completed=!0,muteCallbacks||(tl.onComplete(tl),tl._resolve(tl))))}},additive={animation:null,update:noop},addAdditiveAnimation=lookups$1=>{let animation=additive.animation;return animation||(animation={duration:minValue,computeDeltaTime:noop,_offset:0,_delay:0,_head:null,_tail:null},additive.animation=animation,additive.update=()=>{lookups$1.forEach(propertyAnimation=>{for(let propertyName in propertyAnimation){let tweens=propertyAnimation[propertyName],lookupTween=tweens._head;if(lookupTween){let valueType=lookupTween._valueType,additiveValues=valueType===valueTypes.COMPLEX||valueType===valueTypes.COLOR?cloneArray(lookupTween._fromNumbers):null,additiveValue=lookupTween._fromNumber,tween=tweens._tail;for(;tween&&tween!==lookupTween;){if(additiveValues)for(let i=0,l=tween._numbers.length;iisBrowser?requestAnimationFrame:setImmediate)(),engineCancelMethod=(()=>isBrowser?cancelAnimationFrame:clearImmediate)();var Engine=class extends Clock{constructor(initTime){super(initTime),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=defaults,this.paused=!!(isBrowser&&doc.hidden),this.reqId=null}update(){let time$2=this._currentTime=now();if(this.requestTick(time$2)){this.computeDeltaTime(time$2);let engineSpeed=this._speed,engineFps=this._fps,activeTickable=this._head;for(;activeTickable;){let nextTickable=activeTickable._next;activeTickable.paused?(removeChild(this,activeTickable),this._hasChildren=!!this._tail,activeTickable._running=!1,activeTickable.completed&&!activeTickable._cancelled&&activeTickable.cancel()):tick(activeTickable,(time$2-activeTickable._startTime)*activeTickable._speed*engineSpeed,0,0,activeTickable._fpschild.resetTime()),this.wake()}get speed(){return this._speed*(globals.timeScale===1?1:K)}set speed(playbackRate){this._speed=playbackRate*globals.timeScale,forEachChildren(this,child=>child.speed=child._speed)}get timeUnit(){return globals.timeScale===1?`ms`:`s`}set timeUnit(unit){let secondsScale=.001,isSecond=unit===`s`,newScale=isSecond?secondsScale:1;if(globals.timeScale!==newScale){globals.timeScale=newScale,globals.tickThreshold=200*newScale;let scaleFactor=isSecond?secondsScale:K;this.defaults.duration*=scaleFactor,this._speed*=scaleFactor}}get precision(){return globals.precision}set precision(precision){globals.precision=precision}};const engine=(()=>{let engine$1=new Engine(now());return isBrowser&&(globalVersions.engine=engine$1,doc.addEventListener(`visibilitychange`,()=>{engine$1.pauseOnDocumentHidden&&(doc.hidden?engine$1.pause():engine$1.resume())})),engine$1})(),tickEngine=()=>{engine._head?(engine.reqId=engineTickMethod(tickEngine),engine.update()):engine.reqId=0},killEngine=()=>(engineCancelMethod(engine.reqId),engine.reqId=0,engine),parseInlineTransforms=(target$1,propName,animationInlineStyles)=>{let inlineTransforms=target$1.style.transform,inlinedStylesPropertyValue;if(inlineTransforms){let cachedTransforms=target$1[transformsSymbol],t$1;for(;t$1=transformsExecRgx.exec(inlineTransforms);){let inlinePropertyName=t$1[1],inlinePropertyValue=t$1[2].slice(1,-1);cachedTransforms[inlinePropertyName]=inlinePropertyValue,inlinePropertyName===propName&&(inlinedStylesPropertyValue=inlinePropertyValue,animationInlineStyles&&(animationInlineStyles[propName]=inlinePropertyValue))}}return inlineTransforms&&!isUnd(inlinedStylesPropertyValue)?inlinedStylesPropertyValue:stringStartsWith(propName,`scale`)?`1`:stringStartsWith(propName,`rotate`)||stringStartsWith(propName,`skew`)?`0deg`:`0px`};function getNodeList(v){let n=isStr(v)?scope.root.querySelectorAll(v):v;if(n instanceof NodeList||n instanceof HTMLCollection)return n}function parseTargets(targets){if(isNil(targets))return[];if(isArr(targets)){let flattened=targets.flat(1/0),parsed=[];for(let i=0,l=flattened.length;i{if(cssReservedProperties.includes(propertyName))return!1;if(el.getAttribute(propertyName)||propertyName in el){if(propertyName===`scale`){let elParentNode=el.parentNode;return elParentNode&&elParentNode.tagName===`filter`}return!0}},rgbToRgba=rgbValue=>{let rgba$1=rgbExecRgx.exec(rgbValue)||rgbaExecRgx.exec(rgbValue),a$1=isUnd(rgba$1[4])?1:+rgba$1[4];return[+rgba$1[1],+rgba$1[2],+rgba$1[3],a$1]},hexToRgba=hexValue=>{let hexLength=hexValue.length,isShort=hexLength===4||hexLength===5;return[+(`0x`+hexValue[1]+hexValue[isShort?1:2]),+(`0x`+hexValue[isShort?2:3]+hexValue[isShort?2:4]),+(`0x`+hexValue[isShort?3:5]+hexValue[isShort?3:6]),hexLength===5||hexLength===9?+((`0x`+hexValue[isShort?4:7]+hexValue[isShort?4:8])/255).toFixed(3):1]},hue2rgb=(p$4,q,t$1)=>(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),hslToRgba=hslValue=>{let hsla$1=hslExecRgx.exec(hslValue)||hslaExecRgx.exec(hslValue),h$1=hsla$1[1]/360,s=hsla$1[2]/100,l=hsla$1[3]/100,a$1=isUnd(hsla$1[4])?1:+hsla$1[4],r$1,g,b$1;if(s===0)r$1=g=b$1=l;else{let q=l<.5?l*(1+s):l+s-l*s,p$4=2*l-q;r$1=round(hue2rgb(p$4,q,h$1+1/3)*255,0),g=round(hue2rgb(p$4,q,h$1)*255,0),b$1=round(hue2rgb(p$4,q,h$1-1/3)*255,0)}return[r$1,g,b$1,a$1]},convertColorStringValuesToRgbaArray=colorString=>isRgb(colorString)?rgbToRgba(colorString):isHex(colorString)?hexToRgba(colorString):isHsl(colorString)?hslToRgba(colorString):[0,0,0,1],setValue=(targetValue,defaultValue)=>isUnd(targetValue)?defaultValue:targetValue,getFunctionValue=(value$1,target$1,index$1,total,store)=>{if(isFnc(value$1)){let func=()=>{let computed$2=value$1(target$1,index$1,total);return isNaN(+computed$2)?computed$2||0:+computed$2};return store&&(store.func=func),func()}else return value$1},getTweenType=(target$1,prop)=>target$1[isDomSymbol]?target$1[isSvgSymbol]&&isValidSVGAttribute(target$1,prop)?tweenTypes.ATTRIBUTE:validTransforms.includes(prop)||shortTransforms.get(prop)?tweenTypes.TRANSFORM:stringStartsWith(prop,`--`)?tweenTypes.CSS_VAR:prop in target$1.style?tweenTypes.CSS:prop in target$1?tweenTypes.OBJECT:tweenTypes.ATTRIBUTE:tweenTypes.OBJECT,getCSSValue=(target$1,propName,animationInlineStyles)=>{let inlineStyles=target$1.style[propName];inlineStyles&&animationInlineStyles&&(animationInlineStyles[propName]=inlineStyles);let value$1=inlineStyles||getComputedStyle(target$1[proxyTargetSymbol]||target$1).getPropertyValue(propName);return value$1===`auto`?`0`:value$1},getOriginalAnimatableValue=(target$1,propName,tweenType,animationInlineStyles)=>{let type=isUnd(tweenType)?getTweenType(target$1,propName):tweenType;return type===tweenTypes.OBJECT?target$1[propName]||0:type===tweenTypes.ATTRIBUTE?target$1.getAttribute(propName):type===tweenTypes.TRANSFORM?parseInlineTransforms(target$1,propName,animationInlineStyles):type===tweenTypes.CSS_VAR?getCSSValue(target$1,propName,animationInlineStyles).trimStart():getCSSValue(target$1,propName,animationInlineStyles)},getRelativeValue=(x$1,y,operator)=>operator===`-`?x$1-y:operator===`+`?x$1+y:x$1*y,createDecomposedValueTargetObject=()=>({t:valueTypes.NUMBER,n:0,u:null,o:null,d:null,s:null}),decomposeRawValue=(rawValue,targetObject)=>{if(targetObject.t=valueTypes.NUMBER,targetObject.n=0,targetObject.u=null,targetObject.o=null,targetObject.d=null,targetObject.s=null,!rawValue)return targetObject;let num$2=+rawValue;if(isNaN(num$2)){let str=rawValue;str[1]===`=`&&(targetObject.o=str[0],str=str.slice(2));let unitMatch=str.includes(` `)?!1:unitsExecRgx.exec(str);if(unitMatch)return targetObject.t=valueTypes.UNIT,targetObject.n=+unitMatch[1],targetObject.u=unitMatch[2],targetObject;if(targetObject.o)return targetObject.n=+str,targetObject;if(isCol(str))return targetObject.t=valueTypes.COLOR,targetObject.d=convertColorStringValuesToRgbaArray(str),targetObject;{let matchedNumbers=str.match(digitWithExponentRgx);return targetObject.t=valueTypes.COMPLEX,targetObject.d=matchedNumbers?matchedNumbers.map(Number):[],targetObject.s=str.split(digitWithExponentRgx)||[],targetObject}}else return targetObject.n=num$2,targetObject},decomposeTweenValue=(tween,targetObject)=>(targetObject.t=tween._valueType,targetObject.n=tween._toNumber,targetObject.u=tween._unit,targetObject.o=null,targetObject.d=cloneArray(tween._toNumbers),targetObject.s=cloneArray(tween._strings),targetObject),decomposedOriginalValue=createDecomposedValueTargetObject(),lookups={_rep:new WeakMap,_add:new Map},getTweenSiblings=(target$1,property,lookup=`_rep`)=>{let lookupMap=lookups[lookup],targetLookup=lookupMap.get(target$1);return targetLookup||(targetLookup={},lookupMap.set(target$1,targetLookup)),targetLookup[property]?targetLookup[property]:targetLookup[property]={_head:null,_tail:null}},addTweenSortMethod=(p$4,c$3)=>p$4._isOverridden||p$4._absoluteStartTime>c$3._absoluteStartTime,overrideTween=tween=>{tween._isOverlapped=1,tween._isOverridden=1,tween._changeDuration=minValue,tween._currentTime=minValue},composeTween=(tween,siblings$2)=>{let tweenCompositionType=tween._composition;if(tweenCompositionType===compositionTypes.replace){let tweenAbsStartTime=tween._absoluteStartTime;addChild(siblings$2,tween,addTweenSortMethod,`_prevRep`,`_nextRep`);let prevSibling=tween._prevRep;if(prevSibling){let prevParent=prevSibling.parent,prevAbsEndTime=prevSibling._absoluteStartTime+prevSibling._changeDuration;if(tween.parent.id!==prevParent.id&&prevParent.iterationCount>1&&prevAbsEndTime+(prevParent.duration-prevParent.iterationDuration)>tweenAbsStartTime){overrideTween(prevSibling);let prevPrevSibling=prevSibling._prevRep;for(;prevPrevSibling&&prevPrevSibling.parent.id===prevParent.id;)overrideTween(prevPrevSibling),prevPrevSibling=prevPrevSibling._prevRep}let absoluteUpdateStartTime=tweenAbsStartTime-tween._delay;if(prevAbsEndTime>absoluteUpdateStartTime){let prevChangeStartTime=prevSibling._startTime,prevTLOffset=prevAbsEndTime-(prevChangeStartTime+prevSibling._updateDuration);prevSibling._changeDuration=absoluteUpdateStartTime-prevTLOffset-prevChangeStartTime,prevSibling._currentTime=prevSibling._changeDuration,prevSibling._isOverlapped=1,prevSibling._changeDuration{t$1._isOverlapped||(pausePrevParentAnimation=!1)}),pausePrevParentAnimation){let prevParentTL=prevParent.parent;if(prevParentTL){let pausePrevParentTL=!0;forEachChildren(prevParentTL,a$1=>{a$1!==prevParent&&forEachChildren(a$1,t$1=>{t$1._isOverlapped||(pausePrevParentTL=!1)})}),pausePrevParentTL&&prevParentTL.cancel()}else prevParent.cancel()}}}else if(tweenCompositionType===compositionTypes.blend){let additiveTweenSiblings=getTweenSiblings(tween.target,tween.property,`_add`),additiveAnimation=addAdditiveAnimation(lookups._add),lookupTween=additiveTweenSiblings._head;lookupTween||(lookupTween={...tween},lookupTween._composition=compositionTypes.replace,lookupTween._updateDuration=minValue,lookupTween._startTime=0,lookupTween._numbers=cloneArray(tween._fromNumbers),lookupTween._number=0,lookupTween._next=null,lookupTween._prev=null,addChild(additiveTweenSiblings,lookupTween),addChild(additiveAnimation,lookupTween));let toNumber$1=tween._toNumber;if(tween._fromNumber=lookupTween._fromNumber-toNumber$1,tween._toNumber=0,tween._numbers=cloneArray(tween._fromNumbers),tween._number=0,lookupTween._fromNumber=toNumber$1,tween._toNumbers){let toNumbers=cloneArray(tween._toNumbers);toNumbers&&toNumbers.forEach((value$1,i)=>{tween._fromNumbers[i]=lookupTween._fromNumbers[i]-value$1,tween._toNumbers[i]=0}),lookupTween._fromNumbers=toNumbers}addChild(additiveTweenSiblings,tween,null,`_prevAdd`,`_nextAdd`)}return tween},removeTweenSliblings=tween=>{let tweenComposition=tween._composition;if(tweenComposition!==compositionTypes.none){let tweenTarget=tween.target,tweenProperty=tween.property,replaceTweensLookup=lookups._rep,replaceTargetProps=replaceTweensLookup.get(tweenTarget),tweenReplaceSiblings=replaceTargetProps[tweenProperty];if(removeChild(tweenReplaceSiblings,tween,`_prevRep`,`_nextRep`),tweenComposition===compositionTypes.blend){let addTweensLookup=lookups._add,addTargetProps=addTweensLookup.get(tweenTarget);if(!addTargetProps)return;let additiveTweenSiblings=addTargetProps[tweenProperty],additiveAnimation=additive.animation;removeChild(additiveTweenSiblings,tween,`_prevAdd`,`_nextAdd`);let lookupTween=additiveTweenSiblings._head;if(lookupTween&&lookupTween===additiveTweenSiblings._tail){removeChild(additiveTweenSiblings,lookupTween,`_prevAdd`,`_nextAdd`),removeChild(additiveAnimation,lookupTween);let shouldClean=!0;for(let prop in addTargetProps)if(addTargetProps[prop]._head){shouldClean=!1;break}shouldClean&&addTweensLookup.delete(tweenTarget)}}}return tween},resetTimerProperties=timer=>(timer.paused=!0,timer.began=!1,timer.completed=!1,timer),reviveTimer=timer=>timer._cancelled?(timer._hasChildren?forEachChildren(timer,reviveTimer):forEachChildren(timer,tween=>{tween._composition!==compositionTypes.none&&composeTween(tween,getTweenSiblings(tween.target,tween.property))}),timer._cancelled=0,timer):timer;let timerId=0;var Timer=class extends Clock{constructor(parameters={},parent=null,parentPosition=0){super(0);let{id,delay,duration:duration$2,reversed,alternate,loop,loopDelay,autoplay,frameRate,playbackRate,onComplete,onLoop,onPause,onBegin,onBeforeUpdate:onBeforeUpdate$1,onUpdate}=parameters;scope.current&&scope.current.register(this);let timerInitTime=parent?0:engine._elapsedTime,timerDefaults=parent?parent.defaults:globals.defaults,timerDelay=isFnc(delay)||isUnd(delay)?timerDefaults.delay:+delay,timerDuration=isFnc(duration$2)||isUnd(duration$2)?1/0:+duration$2,timerLoop=setValue(loop,timerDefaults.loop),timerLoopDelay=setValue(loopDelay,timerDefaults.loopDelay),timerIterationCount=timerLoop===!0||timerLoop===1/0||timerLoop<0?1/0:timerLoop+1,offsetPosition=0;if(parent)offsetPosition=parentPosition;else{let startTime=now();engine.paused&&(engine.requestTick(startTime),startTime=engine._elapsedTime),offsetPosition=startTime-engine._startTime}this.id=isUnd(id)?++timerId:id,this.parent=parent,this.duration=clampInfinity((timerDuration+timerLoopDelay)*timerIterationCount-timerLoopDelay)||minValue,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=onBegin||timerDefaults.onBegin,this.onBeforeUpdate=onBeforeUpdate$1||timerDefaults.onBeforeUpdate,this.onUpdate=onUpdate||timerDefaults.onUpdate,this.onLoop=onLoop||timerDefaults.onLoop,this.onPause=onPause||timerDefaults.onPause,this.onComplete=onComplete||timerDefaults.onComplete,this.iterationDuration=timerDuration,this.iterationCount=timerIterationCount,this._autoplay=parent?!1:setValue(autoplay,timerDefaults.autoplay),this._offset=offsetPosition,this._delay=timerDelay,this._loopDelay=timerLoopDelay,this._iterationTime=0,this._currentIteration=0,this._resolve=noop,this._running=!1,this._reversed=+setValue(reversed,timerDefaults.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=setValue(alternate,timerDefaults.alternate),this._prev=null,this._next=null,this._elapsedTime=timerInitTime,this._startTime=timerInitTime,this._lastTime=timerInitTime,this._fps=setValue(frameRate,timerDefaults.frameRate),this._speed=setValue(playbackRate,timerDefaults.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(cancelled){cancelled?this.cancel():this.reset(1).play()}get currentTime(){return clamp(round(this._currentTime,globals.precision),-this._delay,this.duration)}set currentTime(time$2){let paused=this.paused;this.pause().seek(+time$2),paused||this.resume()}get iterationCurrentTime(){return round(this._iterationTime,globals.precision)}set iterationCurrentTime(time$2){this.currentTime=this.iterationDuration*this._currentIteration+time$2}get progress(){return clamp(round(this._currentTime/this.duration,10),0,1)}set progress(progress$1){this.currentTime=this.duration*progress$1}get iterationProgress(){return clamp(round(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(progress$1){let iterationDuration=this.iterationDuration;this.currentTime=iterationDuration*this._currentIteration+iterationDuration*progress$1}get currentIteration(){return this._currentIteration}set currentIteration(iterationCount){this.currentTime=this.iterationDuration*clamp(+iterationCount,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(reverse){reverse?this.reverse():this.play()}get speed(){return super.speed}set speed(playbackRate){super.speed=playbackRate,this.resetTime()}reset(internalRender=0){return reviveTimer(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,tick(this,0,1,internalRender,tickModes.FORCE),resetTimerProperties(this),this._hasChildren&&forEachChildren(this,resetTimerProperties),this}init(internalRender=0){this.fps=this._fps,this.speed=this._speed,!internalRender&&this._hasChildren&&tick(this,this.duration,1,internalRender,tickModes.FORCE),this.reset(internalRender);let autoplay=this._autoplay;return autoplay===!0?this.resume():autoplay&&!isUnd(autoplay.linked)&&autoplay.link(this),this}resetTime(){let timeScale=1/(this._speed*engine._speed);return this._startTime=now()-(this._currentTime+this._delay)*timeScale,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=minValue&&!this._hasChildren?tick(this,minValue,0,0,tickModes.FORCE):(this._running||(addChild(engine,this),engine._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,engine.wake()),this):this}restart(){return this.reset(0).resume()}seek(time$2,muteCallbacks=0,internalRender=0){reviveTimer(this),this.completed=!1;let isPaused=this.paused;return this.paused=!0,tick(this,time$2+this._delay,~~muteCallbacks,~~internalRender,tickModes.AUTO),isPaused?this:this.resume()}alternate(){let reversed=this._reversed,count$1=this.iterationCount,duration$2=this.iterationDuration,iterations=count$1===1/0?floor(maxValue/duration$2):count$1;return this._reversed=+(this._alternate&&!(iterations%2)?reversed:!reversed),count$1===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(duration$2*iterations-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?forEachChildren(this,child=>child.cancel(),!0):forEachChildren(this,removeTweenSliblings),this._cancelled=1,this.pause()}stretch(newDuration){let currentDuration=this.duration,normlizedDuration=normalizeTime(newDuration);if(currentDuration===normlizedDuration)return this;let timeScale=newDuration/currentDuration,isSetter=newDuration<=minValue;return this.duration=isSetter?minValue:normlizedDuration,this.iterationDuration=isSetter?minValue:normalizeTime(this.iterationDuration*timeScale),this._offset*=timeScale,this._delay*=timeScale,this._loopDelay*=timeScale,this}revert(){tick(this,0,1,0,tickModes.AUTO);let ap=this._autoplay;return ap&&ap.linked&&ap.linked===this&&ap.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(callback=noop){let then=this.then,onResolve=()=>{this.then=null,callback(this),this.then=then,this._resolve=noop};return new Promise(r$1=>(this._resolve=()=>r$1(onResolve()),this.completed&&this._resolve(),this))}};const none=t$1=>t$1,calcBezier=(aT,aA1,aA2)=>(((1-3*aA2+3*aA1)*aT+(3*aA2-6*aA1))*aT+3*aA1)*aT,binarySubdivide=(aX,mX1,mX2)=>{let aA=0,aB=1,currentX,currentT,i=0;do currentT=aA+(aB-aA)/2,currentX=calcBezier(currentT,mX1,mX2)-aX,currentX>0?aB=currentT:aA=currentT;while(abs(currentX)>1e-7&&++i<100);return currentT},cubicBezier=(mX1=.5,mY1=0,mX2=.5,mY2=1)=>mX1===mY1&&mX2===mY2?none:t$1=>t$1===0||t$1===1?t$1:calcBezier(binarySubdivide(t$1,mX1,mX2),mY1,mY2),steps=(steps$2=10,fromStart)=>{let roundMethod=fromStart?ceil:floor;return t$1=>roundMethod(clamp(t$1,0,1)*steps$2)*(1/steps$2)},linear=(...args)=>{let argsLength=args.length;if(!argsLength)return none;let totalPoints=argsLength-1,firstArg=args[0],lastArg=args[totalPoints],xPoints=[0],yPoints=[parseNumber(firstArg)];for(let i=1;i{let values=[0],total=length-1;for(let i=1;it$1=>pow(t$1,+p$4),easeInFunctions={[emptyString]:easeInPower,Quad:easeInPower(2),Cubic:easeInPower(3),Quart:easeInPower(4),Quint:easeInPower(5),Sine:t$1=>1-cos(t$1*halfPI),Circ:t$1=>1-sqrt(1-t$1*t$1),Expo:t$1=>t$1?pow(2,10*t$1-10):0,Bounce:t$1=>{let pow2,b$1=4;for(;t$1<((pow2=pow(2,--b$1))-1)/11;);return 1/pow(4,3-b$1)-7.5625*pow((pow2*3-2)/22-t$1,2)},Back:(overshoot=1.70158)=>t$1=>(+overshoot+1)*t$1*t$1*t$1-+overshoot*t$1*t$1,Elastic:(amplitude=1,period=.3)=>{let a$1=clamp(+amplitude,1,10),p$4=clamp(+period,minValue,2),s=p$4/doublePI*asin(1/a$1),e$4=doublePI/p$4;return t$1=>t$1===0||t$1===1?t$1:-a$1*pow(2,-10*(1-t$1))*sin((1-t$1-s)*e$4)}},easeTypes={in:easeIn$1=>t$1=>easeIn$1(t$1),out:easeIn$1=>t$1=>1-easeIn$1(1-t$1),inOut:easeIn$1=>t$1=>t$1<.5?easeIn$1(t$1*2)/2:1-easeIn$1(t$1*-2+2)/2,outIn:easeIn$1=>t$1=>t$1<.5?(1-easeIn$1(1-t$1*2))/2:(easeIn$1(t$1*2-1)+1)/2},parseEaseString=(string$4,easesFunctions,easesLookups)=>{if(easesLookups[string$4])return easesLookups[string$4];if(string$4.indexOf(`(`)<=-1){let hasParams=easeTypes[string$4]||string$4.includes(`Back`)||string$4.includes(`Elastic`),parsedFn=hasParams?easesFunctions[string$4]():easesFunctions[string$4];return parsedFn?easesLookups[string$4]=parsedFn:none}else{let split=string$4.slice(0,-1).split(`(`),parsedFn=easesFunctions[split[0]];return parsedFn?easesLookups[string$4]=parsedFn(...split[1].split(`,`)):none}},eases=(()=>{let list$2={linear,irregular,steps,cubicBezier};for(let type in easeTypes)for(let name$2 in easeInFunctions){let easeIn$1=easeInFunctions[name$2],easeType=easeTypes[type];list$2[type+name$2]=name$2===emptyString||name$2===`Back`||name$2===`Elastic`?(a$1,b$1)=>easeType(easeIn$1(a$1,b$1)):easeType(easeIn$1)}return list$2})(),JSEasesLookups={linear:none},parseEasings=ease=>isFnc(ease)?ease:isStr(ease)?parseEaseString(ease,eases,JSEasesLookups):none,propertyNamesCache={},sanitizePropertyName=(propertyName,target$1,tweenType)=>{if(tweenType===tweenTypes.TRANSFORM){let t$1=shortTransforms.get(propertyName);return t$1||propertyName}else if(tweenType===tweenTypes.CSS||tweenType===tweenTypes.ATTRIBUTE&&isSvg(target$1)&&propertyName in target$1.style){let cachedPropertyName=propertyNamesCache[propertyName];if(cachedPropertyName)return cachedPropertyName;{let lowerCaseName=propertyName&&toLowerCase(propertyName);return propertyNamesCache[propertyName]=lowerCaseName,lowerCaseName}}else return propertyName},angleUnitsMap={deg:1,rad:180/PI,turn:360},convertedValuesCache={},convertValueUnit=(el,decomposedValue,unit,force=!1)=>{let currentUnit=decomposedValue.u,currentNumber=decomposedValue.n;if(decomposedValue.t===valueTypes.UNIT&¤tUnit===unit)return decomposedValue;let cachedKey=currentNumber+currentUnit+unit,cached$1=convertedValuesCache[cachedKey];if(!isUnd(cached$1)&&!force)decomposedValue.n=cached$1;else{let convertedValue;if(currentUnit in angleUnitsMap)convertedValue=currentNumber*angleUnitsMap[currentUnit]/angleUnitsMap[unit];else{let baseline=100,tempEl=el.cloneNode(),parentNode=el.parentNode,parentEl=parentNode&&parentNode!==doc?parentNode:doc.body;parentEl.appendChild(tempEl);let elStyle=tempEl.style;elStyle.width=baseline+currentUnit;let currentUnitWidth=tempEl.offsetWidth||baseline;elStyle.width=baseline+unit;let newUnitWidth=tempEl.offsetWidth||baseline,factor$1=currentUnitWidth/newUnitWidth;parentEl.removeChild(tempEl),convertedValue=factor$1*currentNumber}decomposedValue.n=convertedValue,convertedValuesCache[cachedKey]=convertedValue}return decomposedValue.t,valueTypes.UNIT,decomposedValue.u=unit,decomposedValue},cleanInlineStyles=renderable=>{if(renderable._hasChildren)forEachChildren(renderable,cleanInlineStyles,!0);else{let animation=renderable;animation.pause(),forEachChildren(animation,tween=>{let tweenProperty=tween.property,tweenTarget=tween.target;if(tweenTarget[isDomSymbol]){let targetStyle=tweenTarget.style,originalInlinedValue=animation._inlineStyles[tweenProperty];if(tween._tweenType===tweenTypes.TRANSFORM){let cachedTransforms=tweenTarget[transformsSymbol];if(isUnd(originalInlinedValue)||originalInlinedValue===emptyString?delete cachedTransforms[tweenProperty]:cachedTransforms[tweenProperty]=originalInlinedValue,tween._renderTransforms)if(!Object.keys(cachedTransforms).length)targetStyle.removeProperty(`transform`);else{let str=emptyString;for(let key$2 in cachedTransforms)str+=transformsFragmentStrings[key$2]+cachedTransforms[key$2]+`) `;targetStyle.transform=str}}else isUnd(originalInlinedValue)||originalInlinedValue===emptyString?targetStyle.removeProperty(tweenProperty):targetStyle[tweenProperty]=originalInlinedValue;animation._tail===tween&&animation.targets.forEach(t$1=>{t$1.getAttribute&&t$1.getAttribute(`style`)===emptyString&&t$1.removeAttribute(`style`)})}})}return renderable},fromTargetObject=createDecomposedValueTargetObject(),toTargetObject=createDecomposedValueTargetObject(),toFunctionStore={func:null},keyframesTargetArray=[null],fastSetValuesArray=[null,null],keyObjectTarget={to:null};let tweenId=0,keyframes,key;const generateKeyframes=(keyframes$4,parameters)=>{let properties={};if(isArr(keyframes$4)){let propertyNames=[].concat(...keyframes$4.map(key$2=>Object.keys(key$2))).filter(isKey);for(let i=0,l=propertyNames.length;i{let newKey={};for(let p$4 in key$2){let keyValue=key$2[p$4];isKey(p$4)?p$4===propName&&(newKey.to=keyValue):newKey[p$4]=keyValue}return newKey});properties[propName]=propArray}}else{let totalDuration=setValue(parameters.duration,globals.defaults.duration),keys$3=Object.keys(keyframes$4).map(key$2=>({o:parseFloat(key$2)/100,p:keyframes$4[key$2]})).sort((a$1,b$1)=>a$1.o-b$1.o);for(let name$2 in keys$3.forEach(key$2=>{let offset$2=key$2.o,prop=key$2.p;for(let name$2 in prop)if(isKey(name$2)){let propArray=properties[name$2];propArray||=properties[name$2]=[];let duration$2=offset$2*totalDuration,length=propArray.length,prevKey=propArray[length-1],keyObj={to:prop[name$2]},durProgress=0;for(let i=0;i=K?compositionTypes.none:isUnd(composition)?animDefaults.composition:composition,animInlineStyles={},absoluteOffsetTime=this._offset+(parent?parent._offset:0),iterationDuration=NaN,iterationDelay=NaN,animationAnimationLength=0,shouldTriggerRender=0;for(let targetIndex=0;targetIndex2&&isNotObjectValue?(keyframes=[],propValue.forEach((v,i)=>{i?i===1?(fastSetValuesArray[1]=v,keyframes.push(fastSetValuesArray)):keyframes.push(v):fastSetValuesArray[0]=v})):keyframes=propValue}else keyframesTargetArray[0]=propValue,keyframes=keyframesTargetArray;let siblings$2=null,prevTween=null,firstTweenChangeStartTime=NaN,lastTweenChangeEndTime=0,tweenIndex=0;for(let l=keyframes.length;tweenIndex1?getFunctionValue(tDuration,target$1,ti,tl)/l:tDuration),target$1,ti,tl),tweenDelay=getFunctionValue(setValue(key.delay,tweenIndex?0:tDelay),target$1,ti,tl),computedComposition=getFunctionValue(setValue(key.composition,tComposition),target$1,ti,tl),tweenComposition=isNum(computedComposition)?computedComposition:compositionTypes[computedComposition],tweenModifier=key.modifier||tModifier,hasFromvalue=!isUnd(tweenFromValue),hasToValue=!isUnd(tweenToValue),isFromToArray=isArr(tweenToValue),isFromToValue=isFromToArray||hasFromvalue&&hasToValue,tweenStartTime=prevTween?lastTweenChangeEndTime+tweenDelay:tweenDelay,absoluteStartTime=absoluteOffsetTime+tweenStartTime;!shouldTriggerRender&&(hasFromvalue||isFromToArray)&&(shouldTriggerRender=1);let prevSibling=prevTween;if(tweenComposition!==compositionTypes.none){siblings$2||=getTweenSiblings(target$1,propName);let nextSibling=siblings$2._head;for(;nextSibling&&!nextSibling._isOverridden&&nextSibling._absoluteStartTime<=absoluteStartTime;)if(prevSibling=nextSibling,nextSibling=nextSibling._nextRep,nextSibling&&nextSibling._absoluteStartTime>=absoluteStartTime)for(;nextSibling;)overrideTween(nextSibling),nextSibling=nextSibling._nextRep}if(isFromToValue?(decomposeRawValue(isFromToArray?getFunctionValue(tweenToValue[0],target$1,ti,tl):tweenFromValue,fromTargetObject),decomposeRawValue(isFromToArray?getFunctionValue(tweenToValue[1],target$1,ti,tl,toFunctionStore):tweenToValue,toTargetObject),fromTargetObject.t===valueTypes.NUMBER&&(prevSibling?prevSibling._valueType===valueTypes.UNIT&&(fromTargetObject.t=valueTypes.UNIT,fromTargetObject.u=prevSibling._unit):(decomposeRawValue(getOriginalAnimatableValue(target$1,propName,tweenType,animInlineStyles),decomposedOriginalValue),decomposedOriginalValue.t===valueTypes.UNIT&&(fromTargetObject.t=valueTypes.UNIT,fromTargetObject.u=decomposedOriginalValue.u)))):(hasToValue?decomposeRawValue(tweenToValue,toTargetObject):prevTween?decomposeTweenValue(prevTween,toTargetObject):decomposeRawValue(parent&&prevSibling&&prevSibling.parent.parent===parent?prevSibling._value:getOriginalAnimatableValue(target$1,propName,tweenType,animInlineStyles),toTargetObject),hasFromvalue?decomposeRawValue(tweenFromValue,fromTargetObject):prevTween?decomposeTweenValue(prevTween,fromTargetObject):decomposeRawValue(parent&&prevSibling&&prevSibling.parent.parent===parent?prevSibling._value:getOriginalAnimatableValue(target$1,propName,tweenType,animInlineStyles),fromTargetObject)),fromTargetObject.o&&(fromTargetObject.n=getRelativeValue(prevSibling?prevSibling._toNumber:decomposeRawValue(getOriginalAnimatableValue(target$1,propName,tweenType,animInlineStyles),decomposedOriginalValue).n,fromTargetObject.n,fromTargetObject.o)),toTargetObject.o&&(toTargetObject.n=getRelativeValue(fromTargetObject.n,toTargetObject.n,toTargetObject.o)),fromTargetObject.t!==toTargetObject.t){if(fromTargetObject.t===valueTypes.COMPLEX||toTargetObject.t===valueTypes.COMPLEX){let complexValue=fromTargetObject.t===valueTypes.COMPLEX?fromTargetObject:toTargetObject,notComplexValue=fromTargetObject.t===valueTypes.COMPLEX?toTargetObject:fromTargetObject;notComplexValue.t=valueTypes.COMPLEX,notComplexValue.s=cloneArray(complexValue.s),notComplexValue.d=complexValue.d.map(()=>notComplexValue.n)}else if(fromTargetObject.t===valueTypes.UNIT||toTargetObject.t===valueTypes.UNIT){let unitValue=fromTargetObject.t===valueTypes.UNIT?fromTargetObject:toTargetObject,notUnitValue=fromTargetObject.t===valueTypes.UNIT?toTargetObject:fromTargetObject;notUnitValue.t=valueTypes.UNIT,notUnitValue.u=unitValue.u}else if(fromTargetObject.t===valueTypes.COLOR||toTargetObject.t===valueTypes.COLOR){let colorValue=fromTargetObject.t===valueTypes.COLOR?fromTargetObject:toTargetObject,notColorValue=fromTargetObject.t===valueTypes.COLOR?toTargetObject:fromTargetObject;notColorValue.t=valueTypes.COLOR,notColorValue.s=colorValue.s,notColorValue.d=[0,0,0,1]}}if(fromTargetObject.u!==toTargetObject.u){let valueToConvert=toTargetObject.u?fromTargetObject:toTargetObject;valueToConvert=convertValueUnit(target$1,valueToConvert,toTargetObject.u?toTargetObject.u:fromTargetObject.u,!1)}if(toTargetObject.d&&fromTargetObject.d&&toTargetObject.d.length!==fromTargetObject.d.length){let longestValue=fromTargetObject.d.length>toTargetObject.d.length?fromTargetObject:toTargetObject,shortestValue=longestValue===fromTargetObject?toTargetObject:fromTargetObject;shortestValue.d=longestValue.d.map((_$1,i)=>isUnd(shortestValue.d[i])?0:shortestValue.d[i]),shortestValue.s=cloneArray(longestValue.s)}let tweenUpdateDuration=round(+tweenDuration||minValue,12),tween={parent:this,id:tweenId++,property:propName,target:target$1,_value:null,_func:toFunctionStore.func,_ease:parseEasings(tweenEasing),_fromNumbers:cloneArray(fromTargetObject.d),_toNumbers:cloneArray(toTargetObject.d),_strings:cloneArray(toTargetObject.s),_fromNumber:fromTargetObject.n,_toNumber:toTargetObject.n,_numbers:cloneArray(fromTargetObject.d),_number:fromTargetObject.n,_unit:toTargetObject.u,_modifier:tweenModifier,_currentTime:0,_startTime:tweenStartTime,_delay:+tweenDelay,_updateDuration:tweenUpdateDuration,_changeDuration:tweenUpdateDuration,_absoluteStartTime:absoluteStartTime,_tweenType:tweenType,_valueType:toTargetObject.t,_composition:tweenComposition,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};tweenComposition!==compositionTypes.none&&composeTween(tween,siblings$2),isNaN(firstTweenChangeStartTime)&&(firstTweenChangeStartTime=tween._startTime),lastTweenChangeEndTime=round(tweenStartTime+tweenUpdateDuration,12),prevTween=tween,animationAnimationLength++,addChild(this,tween)}(isNaN(iterationDelay)||firstTweenChangeStartTimeiterationDuration)&&(iterationDuration=lastTweenChangeEndTime),tweenType===tweenTypes.TRANSFORM&&(lastTransformGroupIndex=animationAnimationLength-tweenIndex,lastTransformGroupLength=animationAnimationLength)}if(!isNaN(lastTransformGroupIndex)){let i=0;forEachChildren(this,tween=>{i>=lastTransformGroupIndex&&i{additiveTween.id===tween.id&&(additiveTween._renderTransforms=1)})),i++})}}targetsLength||console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`),iterationDelay?(forEachChildren(this,tween=>{tween._startTime-tween._delay||(tween._delay-=iterationDelay),tween._startTime-=iterationDelay}),iterationDuration-=iterationDelay):iterationDelay=0,iterationDuration||(iterationDuration=minValue,this.iterationCount=0),this.targets=parsedTargets,this.duration=iterationDuration===minValue?minValue:clampInfinity((iterationDuration+this._loopDelay)*this.iterationCount-this._loopDelay)||minValue,this.onRender=onRender||animDefaults.onRender,this._ease=animEase,this._delay=iterationDelay,this.iterationDuration=iterationDuration,this._inlineStyles=animInlineStyles,!this._autoplay&&shouldTriggerRender&&this.onRender(this)}stretch(newDuration){let currentDuration=this.duration;if(currentDuration===normalizeTime(newDuration))return this;let timeScale=newDuration/currentDuration;return forEachChildren(this,tween=>{tween._updateDuration=normalizeTime(tween._updateDuration*timeScale),tween._changeDuration=normalizeTime(tween._changeDuration*timeScale),tween._currentTime*=timeScale,tween._startTime*=timeScale,tween._absoluteStartTime*=timeScale}),super.stretch(newDuration)}refresh(){return forEachChildren(this,tween=>{let tweenFunc=tween._func;if(tweenFunc){let ogValue=getOriginalAnimatableValue(tween.target,tween.property,tween._tweenType);decomposeRawValue(ogValue,decomposedOriginalValue),decomposeRawValue(tweenFunc(),toTargetObject),tween._fromNumbers=cloneArray(decomposedOriginalValue.d),tween._fromNumber=decomposedOriginalValue.n,tween._toNumbers=cloneArray(toTargetObject.d),tween._strings=cloneArray(toTargetObject.s),tween._toNumber=toTargetObject.o?getRelativeValue(decomposedOriginalValue.n,toTargetObject.n,toTargetObject.o):toTargetObject.n}}),this}revert(){return super.revert(),cleanInlineStyles(this)}then(callback){return super.then(callback)}};const animate=(targets,parameters)=>new JSAnimation(targets,parameters,null,0,!1).init(),transformsShorthands=[`x`,`y`,`z`],commonDefaultPXProperties=[`perspective`,`width`,`height`,`margin`,`padding`,`top`,`right`,`bottom`,`left`,`borderWidth`,`fontSize`,`borderRadius`,...transformsShorthands],WAAPIAnimationsLookups={_head:null,_tail:null},removeWAAPIAnimation=($el,property,parent)=>{let nextLookup=WAAPIAnimationsLookups._head;for(;nextLookup;){let next=nextLookup._next,matchTarget=nextLookup.$el===$el,matchProperty=!property||nextLookup.property===property,matchParent=!parent||nextLookup.parent===parent;if(matchTarget&&matchProperty&&matchParent){let anim=nextLookup.animation;try{anim.commitStyles()}catch{}anim.cancel(),removeChild(WAAPIAnimationsLookups,nextLookup);let lookupParent=nextLookup.parent;lookupParent&&(lookupParent._completed++,lookupParent.animations.length===lookupParent._completed&&(lookupParent.completed=!0,lookupParent.muteCallbacks||(lookupParent.paused=!0,lookupParent.onComplete(lookupParent),lookupParent._resolve(lookupParent))))}nextLookup=next}},sync=(callback=noop)=>new Timer({duration:1*globals.timeScale,onComplete:callback},null,0).resume();function getTargetValue(targetSelector,propName,unit){let targets=registerTargets(targetSelector);if(!targets.length)return;let[target$1]=targets,tweenType=getTweenType(target$1,propName),normalizePropName=sanitizePropertyName(propName,target$1,tweenType),originalValue=getOriginalAnimatableValue(target$1,normalizePropName);if(isUnd(unit))return originalValue;if(decomposeRawValue(originalValue,decomposedOriginalValue),decomposedOriginalValue.t===valueTypes.NUMBER||decomposedOriginalValue.t===valueTypes.UNIT){if(unit===!1)return decomposedOriginalValue.n;{let convertedValue=convertValueUnit(target$1,decomposedOriginalValue,unit,!1);return`${round(convertedValue.n,globals.precision)}${convertedValue.u}`}}}const setTargetValues=(targets,parameters)=>{if(!isUnd(parameters))return parameters.duration=minValue,parameters.composition=setValue(parameters.composition,compositionTypes.none),new JSAnimation(targets,parameters,null,0,!0).resume()},removeTargetsFromAnimation=(targetsArray,animation,propertyName)=>{let tweensMatchesTargets=!1;return forEachChildren(animation,tween=>{let tweenTarget=tween.target;if(targetsArray.includes(tweenTarget)){let tweenName=tween.property,tweenType=tween._tweenType,normalizePropName=sanitizePropertyName(propertyName,tweenTarget,tweenType);(!normalizePropName||normalizePropName&&normalizePropName===tweenName)&&(tween.parent._tail===tween&&tween._tweenType===tweenTypes.TRANSFORM&&tween._prev&&tween._prev._tweenType===tweenTypes.TRANSFORM&&(tween._prev._renderTransforms=1),removeChild(animation,tween),removeTweenSliblings(tween),tweensMatchesTargets=!0)}},!0),tweensMatchesTargets},remove=(targets,renderable,propertyName)=>{let targetsArray=parseTargets(targets),parent=renderable||engine,waapiAnimation=renderable&&renderable.controlAnimation&&renderable;for(let i=0,l=targetsArray.length;i{if(!child._hasChildren)if(removeMatches=removeTargetsFromAnimation(targetsArray,child,propertyName),removeMatches&&!child._head)child.cancel(),removeChild(parent,child);else{let childTLOffset=child._offset+child._delay,childDur=childTLOffset+child.duration;childDur>iterationDuration&&(iterationDuration=childDur)}child._head?remove(targets,child,propertyName):child._hasChildren=!1},!0),isUnd(parent.iterationDuration)||(parent.iterationDuration=iterationDuration)}else removeMatches=removeTargetsFromAnimation(targetsArray,parent,propertyName);return removeMatches&&!parent._head&&(parent._hasChildren=!1,parent.cancel&&parent.cancel()),targetsArray},keepTime=createRefreshable,randomPick=items=>items[random(0,items.length-1)],roundPad=(v,decimalLength)=>(+v).toFixed(decimalLength),padStart=(v,totalLength,padString)=>`${v}`.padStart(totalLength,padString),padEnd=(v,totalLength,padString)=>`${v}`.padEnd(totalLength,padString),wrap=(v,min$1,max$1)=>((v-min$1)%(max$1-min$1)+(max$1-min$1))%(max$1-min$1)+min$1,mapRange=(value$1,inLow,inHigh,outLow,outHigh)=>outLow+(value$1-inLow)/(inHigh-inLow)*(outHigh-outLow),degToRad=degrees$1=>degrees$1*PI/180,radToDeg=radians=>radians*180/PI,lerp=(start,end,amount,renderable)=>{let dt$3=K/globals.defaults.frameRate;if(renderable!==!1){let ticker=renderable||engine._hasChildren&&engine;ticker&&ticker.deltaTime&&(dt$3=ticker.deltaTime)}let t$1=1-Math.exp(-amount*dt$3*.1);return amount?amount===1?end:(1-t$1)*start+t$1*end:start},curry=(fn$5,last=0)=>(...args)=>last?v=>fn$5(...args,v):v=>fn$5(v,...args),chain=fn$5=>(...args)=>{let result=fn$5(...args);return new Proxy(noop,{apply:(_$1,__,[v])=>result(v),get:(_$1,prop)=>chain((...nextArgs)=>{let nextResult=utils[prop](...nextArgs);return v=>nextResult(result(v))})})},makeChainable=(fn$5,right=0)=>(...args)=>(args.lengthnew Promise(resolve$1=>{let source=audioContext.createBufferSource();source.buffer=ctx.data.audioBuffer,source.connect(audioContext.destination),nowSpeaking.value=!0,source.start(0),source.onended=()=>{nowSpeaking.value=!1,resolve$1()}})]});async function handleSpeechGeneration(ctx){speechGenerationIndex.value++;try{let input=ctx.data,res=await props.generateSpeech(input,props.voice,!1),audioBuffer=await audioContext.decodeAudioData(res);await audioQueue.add({audioBuffer,text:ctx.data})}catch(error){console.error(`Speech generation failed:`,error)}}let ttsQueue=useQueue({handlers:[handleSpeechGeneration]}),messageContentQueue=useMessageContentQueue(ttsQueue);async function testStreaming(){await messageContentQueue.add(props.text)}async function testChunking(){let chunks=[],stream=new ReadableStream({start(controller){controller.enqueue(new TextEncoder().encode(props.text)),controller.close()}});for await(let chunk of chunkTTSInput(stream.getReader(),{boost:1,minimumWords:4,maximumWords:12}))chunks.push(chunk);ttsInputChunks.value=chunks}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[_cache$1[4]||=createBaseVNode(`div`,{class:`flex items-center gap-1 text-sm font-medium`},` Streaming Playground `,-1),createBaseVNode(`div`,_hoisted_1$14,[createBaseVNode(`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":``,bg:`neutral-700 dark:neutral-300`,onClick:testChunking},_cache$1[1]||=[createBaseVNode(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[createBaseVNode(`div`,{"i-solar:round-double-alt-arrow-right-bold-duotone":``}),createBaseVNode(`span`,null,`Test chunking`)],-1)]),ttsInputChunks.value.length>0?(openBlock(),createElementBlock(`button`,{key:0,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":``,bg:`neutral-700 dark:neutral-300`,onClick:testStreaming},_cache$1[2]||=[createBaseVNode(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[createBaseVNode(`div`,{"i-solar:round-double-alt-arrow-right-bold-duotone":``}),createBaseVNode(`span`,null,`Test streaming`)],-1)])):createCommentVNode(``,!0)]),createBaseVNode(`div`,_hoisted_2$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ttsInputChunks.value,(chunk,i)=>(openBlock(),createElementBlock(`div`,{key:i,flex:`~ row gap-2 items-center`},[createBaseVNode(`div`,{flex:`~ row gap-2 items-center`,"rounded-xl":``,"px-2":``,"py-1.5":``,class:normalizeClass({"bg-neutral-100 dark:bg-neutral-800":speechGenerationIndex.value=i})},[createBaseVNode(`span`,_hoisted_3$5,toDisplayString(chunk.text),1),createBaseVNode(`span`,{"rounded-full":``,"px-2":``,"py-.5":``,"text-nowrap":``,"text-xs":``,b:`~ dashed`,class:normalizeClass({"b-green text-green":chunk.reason===`boost`,"b-orange text-orange":chunk.reason===`limit`,"b-red text-red":chunk.reason===`hard`,"b-purple text-purple":chunk.reason===`flush`})},toDisplayString(chunk.words)+` words, `+toDisplayString(chunk.reason),3)],2),createVNode(Transition,{css:!1,onEnter:_cache$1[0]||=el=>unref(animate)(el,{opacity:[0,1],translateX:[10,0],duration:200,ease:`inOut`})},{default:withCtx(()=>[speechGenerationIndex.value>=i?(openBlock(),createElementBlock(`div`,_hoisted_4$4,_cache$1[3]||=[createBaseVNode(`div`,{"i-solar-check-circle-line-duotone":``},null,-1),createBaseVNode(`div`,null,`Queued`,-1)])):createCommentVNode(``,!0)]),_:2},1024)]))),128))])],64))}}),SpeechStreamingPlayground_default=SpeechStreamingPlayground_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$13={"w-full":``,"rounded-xl":``},_hoisted_2$7={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},_hoisted_3$4={class:`inline-flex items-center gap-4`},_hoisted_4$3={flex:`~ col gap-4`},_hoisted_5$3=[`placeholder`],_hoisted_6$3=[`placeholder`],_hoisted_7$2={flex:`~ row`,"gap-4":``},_hoisted_8$2=[`disabled`],_hoisted_9$2={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_10$2={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_11$1={key:2,class:`mt-2 text-sm text-red-500`},_hoisted_12$1={key:3,class:`mt-2 text-sm text-red-500`},_hoisted_13$1={key:4,class:`mt-2 text-sm text-red-500`},_hoisted_14$1=[`src`];var SpeechPlayground_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SpeechPlayground`,props:{defaultText:{},availableVoices:{},generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(__props,{expose:__expose}){let props=__props,{t:t$1}=useI18n(),testText=ref(props.defaultText||`Hello! This is a test of the voice synthesis.`),isGenerating=ref(!1),audioUrl=ref(``),errorMessage=ref(``),audioPlayer=ref(null),useSSML=ref(!1),ssmlText=ref(``),selectedVoice=ref(``);watch(()=>props.availableVoices,newVoices=>{newVoices.length>0&&!selectedVoice.value&&(selectedVoice.value=newVoices[0]?.id||``)},{immediate:!0});let voiceOptions=computed(()=>props.availableVoices.map(voice=>({value:voice.id,label:voice.name})));async function handleGenerateTestSpeech(){if(!(!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value)){isGenerating.value=!0,errorMessage.value=``;try{audioUrl.value&&stopTestAudio();let input=useSSML.value?ssmlText.value:testText.value,response=await props.generateSpeech(input,selectedVoice.value,useSSML.value);audioUrl.value=URL.createObjectURL(new Blob([response])),setTimeout(()=>{audioPlayer.value&&audioPlayer.value.play()},100)}catch(error){console.error(`Error generating speech:`,error),errorMessage.value=error instanceof Error?error.message:`An unknown error occurred`}finally{isGenerating.value=!1}}}function stopTestAudio(){audioPlayer.value&&(audioPlayer.value.pause(),audioPlayer.value.currentTime=0),audioUrl.value&&(URL.revokeObjectURL(audioUrl.value),audioUrl.value=``)}return onUnmounted(()=>{audioUrl.value&&URL.revokeObjectURL(audioUrl.value)}),__expose({testText,ssmlText,useSSML,selectedVoice,isGenerating,audioUrl,errorMessage,audioPlayer,generateTestSpeech:handleGenerateTestSpeech,stopTestAudio}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$13,[createBaseVNode(`h2`,_hoisted_2$7,[createBaseVNode(`div`,_hoisted_3$4,[createVNode(unref(TestDummyMarker_default)),createBaseVNode(`div`,null,toDisplayString(unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),createBaseVNode(`div`,_hoisted_4$3,[createVNode(unref(FieldCheckbox_default),{modelValue:useSSML.value,"onUpdate:modelValue":_cache$1[0]||=$event=>useSSML.value=$event,label:unref(t$1)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label`),description:unref(t$1)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description`)},null,8,[`modelValue`,`label`,`description`]),useSSML.value?withDirectives((openBlock(),createElementBlock(`textarea`,{key:1,"onUpdate:modelValue":_cache$1[2]||=$event=>ssmlText.value=$event,placeholder:unref(t$1)(`settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-48":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"font-mono":``,"outline-none":``},null,8,_hoisted_6$3)),[[vModelText,ssmlText.value]]):withDirectives((openBlock(),createElementBlock(`textarea`,{key:0,"onUpdate:modelValue":_cache$1[1]||=$event=>testText.value=$event,placeholder:unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-24":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"outline-none":``},null,8,_hoisted_5$3)),[[vModelText,testText.value]]),createVNode(unref(FieldSelect_default),{modelValue:selectedVoice.value,"onUpdate:modelValue":_cache$1[3]||=$event=>selectedVoice.value=$event,class:`[&>div]:grid [&>div]:grid-cols-[4fr_2fr]`,options:voiceOptions.value,label:unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label`),description:unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description`),layout:`horizontal`},null,8,[`modelValue`,`options`,`label`,`description`]),createBaseVNode(`div`,_hoisted_7$2,[createBaseVNode(`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:isGenerating.value||!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value||!_ctx.apiKeyConfigured,class:normalizeClass({"opacity-50 cursor-not-allowed":isGenerating.value||!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value||!_ctx.apiKeyConfigured}),bg:`neutral-700 dark:neutral-300`,onClick:handleGenerateTestSpeech},[createBaseVNode(`div`,_hoisted_9$2,[_cache$1[4]||=createBaseVNode(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),createBaseVNode(`span`,null,toDisplayString(isGenerating.value?unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,_hoisted_8$2),audioUrl.value?(openBlock(),createElementBlock(`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:stopTestAudio},[createBaseVNode(`div`,_hoisted_10$2,[_cache$1[5]||=createBaseVNode(`div`,{"i-solar:stop-circle-bold-duotone":``},null,-1),createBaseVNode(`span`,null,toDisplayString(unref(t$1)(`settings.pages.modules.speech.sections.section.playground.buttons.stop.label`)),1)])])):createCommentVNode(``,!0)]),_ctx.apiKeyConfigured?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_11$1,toDisplayString(unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key`)),1)),selectedVoice.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_12$1,toDisplayString(unref(t$1)(`settings.pages.modules.speech.sections.section.playground.select-voice.required`)),1)),errorMessage.value?(openBlock(),createElementBlock(`div`,_hoisted_13$1,toDisplayString(errorMessage.value),1)):createCommentVNode(``,!0),audioUrl.value?(openBlock(),createElementBlock(`audio`,{key:5,ref_key:`audioPlayer`,ref:audioPlayer,src:audioUrl.value,controls:``,class:`mt-2 w-full`},null,8,_hoisted_14$1)):createCommentVNode(``,!0),createVNode(SpeechStreamingPlayground_default,{text:testText.value,voice:selectedVoice.value,"generate-speech":_ctx.generateSpeech},null,8,[`text`,`voice`,`generate-speech`])]),renderSlot(_ctx.$slots,`default`)]))}}),SpeechPlayground_default=SpeechPlayground_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$12={flex:`~ col md:row gap-6`},_hoisted_2$6={flex:`~ col gap-6`},_hoisted_3$3={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_4$2={flex:`~ col gap-4`},_hoisted_5$2={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},_hoisted_6$2={"w-full":``,"rounded-xl":``};var SpeechProviderSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SpeechProviderSettings`,props:{providerId:{},defaultModel:{},additionalSettings:{},placeholder:{}},setup(__props){let props=__props,{t:t$1}=useI18n(),router$1=useRouter(),providersStore=useProvidersStore(),speechStore=useSpeechStore(),{providers}=storeToRefs(providersStore),providerMetadata=computed(()=>providersStore.getProviderMetadata(props.providerId)),apiKey=computed({get:()=>providers.value[props.providerId]?.apiKey||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].apiKey=value$1}}),baseUrl=computed({get:()=>providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].baseUrl=value$1}}),voiceSettings=ref({});function initializeVoiceSettings(){providers.value[props.providerId]?.voiceSettings?voiceSettings.value={...providers.value[props.providerId].voiceSettings}:voiceSettings.value={pitch:0,speed:1,volume:0,...props.additionalSettings}}onMounted(()=>{providersStore.initializeProvider(props.providerId),apiKey.value=providers.value[props.providerId]?.apiKey||``,baseUrl.value=providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,initializeVoiceSettings(),providersStore.configuredProviders[props.providerId]&&speechStore.loadVoicesForProvider(props.providerId)});let debouncedUpdate=useDebounceFn(()=>{providers.value[props.providerId]={...providers.value[props.providerId],apiKey:apiKey.value,baseUrl:baseUrl.value||providerMetadata.value?.defaultOptions?.().baseUrl||``,voiceSettings:{...voiceSettings.value}}},1e3);watch([apiKey,baseUrl],debouncedUpdate),watch(voiceSettings,debouncedUpdate,{deep:!0});function handleResetVoiceSettings(){voiceSettings.value={...providerMetadata.value?.defaultOptions?.().voiceSettings||{}},debouncedUpdate()}return(_ctx,_cache$1)=>(openBlock(),createBlock(ProviderSettingsLayout2_default,{"provider-name":providerMetadata.value?.localizedName,"provider-icon":providerMetadata.value?.icon,"on-back":()=>unref(router$1).back()},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$12,[createVNode(unref(ProviderSettingsContainer_default),{class:`w-full md:w-[40%]`},{default:withCtx(()=>[createVNode(unref(ProviderBasicSettings_default),{title:unref(t$1)(`settings.pages.providers.common.section.basic.title`),description:unref(t$1)(`settings.pages.providers.common.section.basic.description`),"on-reset":handleResetVoiceSettings},{default:withCtx(()=>[createVNode(unref(ProviderApiKeyInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[0]||=$event=>apiKey.value=$event,"provider-name":providerMetadata.value?.localizedName,placeholder:props.placeholder||`API Key`},null,8,[`modelValue`,`provider-name`,`placeholder`]),renderSlot(_ctx.$slots,`basic-settings`)]),_:3},8,[`title`,`description`]),createBaseVNode(`div`,_hoisted_2$6,[createBaseVNode(`h2`,_hoisted_3$3,toDisplayString(unref(t$1)(`settings.pages.providers.common.section.voice.title`)),1),createBaseVNode(`div`,_hoisted_4$2,[renderSlot(_ctx.$slots,`voice-settings`)])]),createVNode(unref(ProviderAdvancedSettings_default),{title:unref(t$1)(`settings.pages.providers.common.section.advanced.title`)},{default:withCtx(()=>[createVNode(unref(ProviderBaseUrlInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[1]||=$event=>baseUrl.value=$event,placeholder:providerMetadata.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`]),renderSlot(_ctx.$slots,`advanced-settings`)]),_:3},8,[`title`])]),_:3}),createBaseVNode(`div`,_hoisted_5$2,[createBaseVNode(`div`,_hoisted_6$2,[renderSlot(_ctx.$slots,`playground`)])])])]),_:3},8,[`provider-name`,`provider-icon`,`on-back`]))}}),SpeechProviderSettings_default=SpeechProviderSettings_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$11={"w-full":``,"pt-1":``},_hoisted_2$5={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},_hoisted_3$2={class:`inline-flex items-center gap-4`},_hoisted_4$1={"mb-2":``},_hoisted_5$1=[`src`],_hoisted_6$1={key:0,class:`mt-2 text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_7$1={class:`space-y-3`},_hoisted_8$1={class:`space-y-3`},_hoisted_9$1={class:`flex items-center gap-3`},_hoisted_10$1={class:`text-sm font-medium`};var TranscriptionPlayground_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TranscriptionPlayground`,props:{generateTranscription:{type:Function},apiKeyConfigured:{type:Boolean}},setup(__props){let props=__props,{t:t$1}=useI18n(),{audioInputs,selectedAudioInput,stream,stopStream,startStream}=useAudioDevice(),speakingThreshold=ref(25),isMonitoring=ref(!1),isSpeaking=ref(!1),errorMessage=ref(``),audioContext=ref(),analyser=ref(),dataArray=ref(),animationFrame=ref(),volumeLevel=ref(0),audios=ref([]),audioCleanups=ref([]),audioURLs=computed(()=>audios.value.map(blob=>{let url=URL.createObjectURL(blob);return audioCleanups.value.push(()=>URL.revokeObjectURL(url)),url})),transcriptions=ref([]),{startRecord,stopRecord,onStopRecord}=useAudioRecorder(stream);async function setupAudioMonitoring(){try{await stopAudioMonitoring(),await startStream(),await until(stream).toBeTruthy(),audioContext.value=new AudioContext;let source=audioContext.value.createMediaStreamSource(stream.value);analyser.value=audioContext.value.createAnalyser(),analyser.value.fftSize=256,analyser.value.smoothingTimeConstant=.3,source.connect(analyser.value);let bufferLength=analyser.value.frequencyBinCount;dataArray.value=new Uint8Array(bufferLength),startAudioAnalysis()}catch(error){console.error(`Error setting up audio monitoring:`,error),errorMessage.value=error instanceof Error?error.message:String(error)}}async function stopAudioMonitoring(){animationFrame.value&&(cancelAnimationFrame(animationFrame.value),animationFrame.value=void 0),stream.value&&(stream.value.getTracks().forEach(track$1=>track$1.stop()),stream.value=void 0),audioContext.value&&(await audioContext.value.close(),audioContext.value=void 0),await stopRecord(),await stopStream(),analyser.value=void 0,dataArray.value=void 0,volumeLevel.value=0,isSpeaking.value=!1}function startAudioAnalysis(){let analyze=()=>{if(!analyser.value||!dataArray.value)return;analyser.value.getByteFrequencyData(dataArray.value);let sum=0;for(let i=0;ispeakingThreshold.value,animationFrame.value=requestAnimationFrame(analyze)};analyze()}watch(selectedAudioInput,async()=>{isMonitoring.value&&await setupAudioMonitoring()}),watch(audioInputs,()=>{!selectedAudioInput.value&&audioInputs.value.length>0&&(selectedAudioInput.value=audioInputs.value.find(input=>input.deviceId===`default`)?.deviceId||audioInputs.value[0].deviceId)});async function toggleMonitoring(){isMonitoring.value?(await stopAudioMonitoring(),await stopRecord(),isMonitoring.value=!1):(onStopRecord(async recording=>{try{if(recording&&recording.size>0){audios.value.push(recording);let res=await props.generateTranscription(new File([recording],`recording.wav`));transcriptions.value.push(res.text)}}catch(err){errorMessage.value=err instanceof Error?err.message:String(err),console.error(`Error generating transcription:`,errorMessage.value)}}),await setupAudioMonitoring(),await startRecord(),isMonitoring.value=!0)}let speakingIndicatorClass=computed(()=>isSpeaking.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`);return onUnmounted(()=>{stopAudioMonitoring()}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$11,[createBaseVNode(`h2`,_hoisted_2$5,[createBaseVNode(`div`,_hoisted_3$2,[createVNode(unref(TestDummyMarker_default)),createBaseVNode(`div`,null,toDisplayString(unref(t$1)(`settings.pages.providers.provider.transcriptions.playground.title`)),1)])]),createBaseVNode(`div`,_hoisted_4$1,[createVNode(unref(FieldSelect_default),{modelValue:unref(selectedAudioInput),"onUpdate:modelValue":_cache$1[0]||=$event=>isRef(selectedAudioInput)?selectedAudioInput.value=$event:null,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:unref(audioInputs).map(input=>({label:input.label||input.deviceId,value:input.deviceId})),placeholder:`Select an audio input device`,layout:`vertical`,"h-fit":``,"w-full":``},null,8,[`modelValue`,`options`])]),createVNode(unref(Button_default),{class:`my-4`,"w-full":``,onClick:toggleMonitoring},{default:withCtx(()=>[createTextVNode(toDisplayString(isMonitoring.value?`Stop Monitoring`:`Start Monitoring`),1)]),_:1}),createBaseVNode(`div`,null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(audioURLs.value,(audio,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,class:`mb-2`},[createBaseVNode(`audio`,{src:audio,controls:``,class:`w-full`},null,8,_hoisted_5$1),transcriptions.value[index$1]?(openBlock(),createElementBlock(`div`,_hoisted_6$1,toDisplayString(transcriptions.value[index$1]),1)):createCommentVNode(``,!0)]))),128))]),createBaseVNode(`div`,_hoisted_7$1,[createVNode(unref(LevelMeter_default),{level:volumeLevel.value,label:`Input Level`},null,8,[`level`]),createVNode(unref(ThresholdMeter_default),{value:volumeLevel.value/100,threshold:speakingThreshold.value/100,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`]),createBaseVNode(`div`,_hoisted_8$1,[createVNode(unref(FieldRange_default),{modelValue:speakingThreshold.value,"onUpdate:modelValue":_cache$1[1]||=$event=>speakingThreshold.value=$event,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:1,max:80,step:1,"format-value":value$1=>`${value$1}%`},null,8,[`modelValue`,`format-value`])]),createBaseVNode(`div`,_hoisted_9$1,[createBaseVNode(`div`,{class:normalizeClass([`h-4 w-4 rounded-full transition-all duration-200`,speakingIndicatorClass.value])},null,2),createBaseVNode(`span`,_hoisted_10$1,toDisplayString(isSpeaking.value?`Speaking Detected`:`Silence`),1)])])]))}}),TranscriptionPlayground_default=TranscriptionPlayground_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$10={flex:`~ col md:row gap-6`},_hoisted_2$4={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},_hoisted_3$1={"w-full":``,"rounded-xl":``};var TranscriptionProviderSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TranscriptionProviderSettings`,props:{providerId:{},defaultModel:{},additionalSettings:{},placeholder:{}},setup(__props){let props=__props,{t:t$1}=useI18n(),router$1=useRouter(),providersStore=useProvidersStore(),{providers}=storeToRefs(providersStore),providerMetadata=computed(()=>providersStore.getProviderMetadata(props.providerId)),apiKey=computed({get:()=>providers.value[props.providerId]?.apiKey||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].apiKey=value$1}}),baseUrl=computed({get:()=>providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].baseUrl=value$1}});return onMounted(()=>{providersStore.initializeProvider(props.providerId),apiKey.value=providers.value[props.providerId]?.apiKey||``,baseUrl.value=providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(ProviderSettingsLayout2_default),{"provider-name":providerMetadata.value?.localizedName,"provider-icon":providerMetadata.value?.icon,"on-back":()=>unref(router$1).back()},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$10,[createVNode(unref(ProviderSettingsContainer_default),{class:`w-full md:w-[40%]`},{default:withCtx(()=>[createVNode(unref(ProviderBasicSettings_default),{title:unref(t$1)(`settings.pages.providers.common.section.basic.title`),description:unref(t$1)(`settings.pages.providers.common.section.basic.description`)},{default:withCtx(()=>[createVNode(unref(ProviderApiKeyInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[0]||=$event=>apiKey.value=$event,"provider-name":providerMetadata.value?.localizedName,placeholder:props.placeholder||`API Key`},null,8,[`modelValue`,`provider-name`,`placeholder`]),renderSlot(_ctx.$slots,`basic-settings`)]),_:3},8,[`title`,`description`]),createVNode(unref(ProviderAdvancedSettings_default),{title:unref(t$1)(`settings.pages.providers.common.section.advanced.title`)},{default:withCtx(()=>[createVNode(unref(ProviderBaseUrlInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[1]||=$event=>baseUrl.value=$event,placeholder:providerMetadata.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`]),renderSlot(_ctx.$slots,`advanced-settings`)]),_:3},8,[`title`])]),_:3}),createBaseVNode(`div`,_hoisted_2$4,[createBaseVNode(`div`,_hoisted_3$1,[renderSlot(_ctx.$slots,`playground`)])])])]),_:3},8,[`provider-name`,`provider-icon`,`on-back`]))}}),TranscriptionProviderSettings_default=TranscriptionProviderSettings_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$9={"h-full":``,"w-full":``},_hoisted_2$3={key:0,"h-full":``,flex:``,"flex-col":``},_hoisted_3={class:`mb-2 text-center md:mb-8`,flex:``,"flex-1":``,"flex-col":``,"justify-center":``},_hoisted_4={initial:{opacity:0,scale:.5},visible:{opacity:1,scale:1},duration:500,class:`mb-1 flex justify-center md:mb-4 lg:pt-16 md:pt-8`},_hoisted_5=[`src`],_hoisted_6={initial:{opacity:0,y:10},visible:{opacity:1,y:0},duration:500,class:`mb-0 text-3xl text-neutral-800 font-bold md:mb-2 dark:text-neutral-100`},_hoisted_7={initial:{opacity:0,y:10},visible:{opacity:1,y:0},duration:500,delay:100,class:`text-sm text-neutral-600 md:text-lg dark:text-neutral-400`},_hoisted_8={key:1,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_9={sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_10={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_11={class:`flex-1 overflow-y-auto`},_hoisted_12={class:`grid grid-cols-1 gap-3 sm:grid-cols-2`},_hoisted_13={key:2,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_14={sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_15={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_16={key:0,"flex-1":``,"overflow-y-auto":``},_hoisted_17={class:`space-y-4`},_hoisted_18={key:0},_hoisted_19={key:1},_hoisted_20={key:2},_hoisted_21={key:0,class:`mt-4`},_hoisted_22={key:3,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_23={sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_24={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_25={"flex-1":``};var Onboarding_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Onboarding`,emits:[`configured`,`skipped`],setup(__props,{emit:__emit}){let emit$1=__emit,step=ref(1),direction=ref(`next`),{t:t$1}=useI18n(),providersStore=useProvidersStore(),{providers,allChatProvidersMetadata}=storeToRefs(providersStore),consciousnessStore=useConsciousnessStore(),{activeModel,activeProvider,modelSearchQuery,providerModels,isLoadingActiveProviderModels}=storeToRefs(consciousnessStore),popularProviders=computed(()=>{let popular=[`openai`,`anthropic`,`google-generative-ai`,`openrouter-ai`,`ollama`,`deepseek`,`player2`];return allChatProvidersMetadata.value.filter(provider=>popular.includes(provider.id)).sort((a$1,b$1)=>popular.indexOf(a$1.id)-popular.indexOf(b$1.id))}),selectedProviderId=ref(``),apiKey=ref(``),baseUrl=ref(``),accountId=ref(``),selectedProvider=computed(()=>allChatProvidersMetadata.value.find(p$4=>p$4.id===selectedProviderId.value)||null),isValidating=ref(!1),isValid=ref(!1),validationMessage=ref(``),needsApiKey=computed(()=>selectedProvider.value?selectedProvider.value.id!==`ollama`&&selectedProvider.value.id!==`player2`:!1),needsBaseUrl=computed(()=>selectedProvider.value?selectedProvider.value.id!==`cloudflare-workers-ai`:!1),canSave=computed(()=>!selectedProvider.value||needsApiKey.value&&!apiKey.value.trim()||needsBaseUrl.value&&!baseUrl.value.trim()||selectedProvider.value.id===`cloudflare-workers-ai`&&!accountId.value.trim()||!activeModel.value?!1:isValid.value);function selectProvider(provider){selectedProviderId.value=provider.id;let defaultOptions=provider.defaultOptions?.()||{};baseUrl.value=defaultOptions?.baseUrl||``,apiKey.value=``,accountId.value=``,isValid.value=!1,validationMessage.value=``}function getApiKeyPlaceholder(_providerId){let placeholders={openai:`sk-...`,anthropic:`sk-ant-...`,"google-generative-ai":`GEMINI_API_KEY`,"openrouter-ai":`sk-or-...`,deepseek:`sk-...`,xai:`xai-...`,"together-ai":`togetherapi-...`,"mistral-ai":`mis-...`,"moonshot-ai":`ms-...`,"fireworks-ai":`fw-...`,"featherless-ai":`fw-...`,"novita-ai":`nvt-...`};return placeholders[_providerId]||`API Key`}function getBaseUrlPlaceholder(_providerId){let defaultOptions=selectedProvider.value?.defaultOptions?.()||{};return defaultOptions?.baseUrl||`https://api.example.com/v1/`}async function validateConfiguration(){if(selectedProvider.value){isValidating.value=!0,validationMessage.value=t$1(`settings.dialogs.onboarding.validating`);try{let config$1={};needsApiKey.value&&(config$1.apiKey=apiKey.value.trim()),needsBaseUrl.value&&(config$1.baseUrl=baseUrl.value.trim()),selectedProvider.value.id===`cloudflare-workers-ai`&&(config$1.accountId=accountId.value.trim());let metadata=providersStore.getProviderMetadata(selectedProvider.value.id);isValid.value=await metadata.validators.validateProviderConfig(config$1),isValid.value?validationMessage.value=t$1(`settings.dialogs.onboarding.validationSuccess`):validationMessage.value=t$1(`settings.dialogs.onboarding.validationFailed`)}catch(error){isValid.value=!1,validationMessage.value=t$1(`settings.dialogs.onboarding.validationError`,{error:error instanceof Error?error.message:String(error)})}finally{isValidating.value=!1}}}let debouncedValidateConfiguration=useDebounceFn(()=>{selectedProvider.value&&(needsApiKey.value&&!apiKey.value.trim()||needsBaseUrl.value&&!baseUrl.value.trim()||selectedProvider.value.id===`cloudflare-workers-ai`&&!accountId.value.trim()||validateConfiguration())},500);watch([apiKey,baseUrl,accountId],()=>{selectedProvider.value&&(apiKey.value||baseUrl.value||accountId.value)&&debouncedValidateConfiguration()},{deep:!0});function handlePreviousStep(){step.value>1&&(direction.value=`previous`,step.value--)}function handleNextStep(){step.value<4?(direction.value=`next`,step.value++):handleSave()}async function handleFinishProviderConfiguration(){if(!selectedProvider.value)return;let config$1={};needsApiKey.value&&(config$1.apiKey=apiKey.value.trim()),needsBaseUrl.value&&(config$1.baseUrl=baseUrl.value.trim()),selectedProvider.value.id===`cloudflare-workers-ai`&&(config$1.accountId=accountId.value.trim()),providers.value[selectedProvider.value.id]={...providers.value[selectedProvider.value.id],...config$1},activeProvider.value=selectedProvider.value.id,await nextTick(),await consciousnessStore.loadModelsForProvider(selectedProvider.value.id),handleNextStep()}async function handleSave(){emit$1(`configured`)}return onMounted(()=>{popularProviders.value.length>0&&(selectedProviderId.value=popularProviders.value[0].id,selectProvider(popularProviders.value[0]))}),(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(`div`,_hoisted_1$9,[createVNode(Transition,{name:direction.value===`next`?`slide-next`:`slide-prev`,mode:`out-in`},{default:withCtx(()=>[step.value===1?(openBlock(),createElementBlock(`div`,_hoisted_2$3,[createBaseVNode(`div`,_hoisted_3,[withDirectives((openBlock(),createElementBlock(`div`,_hoisted_4,[createBaseVNode(`img`,{src:unref(onboarding_default),"max-h":`50`,"aspect-square":``,"h-auto":``,"w-auto":``,"object-cover":``},null,8,_hoisted_5)])),[[_directive_motion]]),withDirectives((openBlock(),createElementBlock(`h2`,_hoisted_6,[createTextVNode(toDisplayString(unref(t$1)(`settings.dialogs.onboarding.title`)),1)])),[[_directive_motion]]),withDirectives((openBlock(),createElementBlock(`p`,_hoisted_7,[createTextVNode(toDisplayString(unref(t$1)(`settings.dialogs.onboarding.description`)),1)])),[[_directive_motion]])]),withDirectives(createVNode(unref(Button_default),{initial:{opacity:0},visible:{opacity:1},duration:500,delay:200,label:unref(t$1)(`settings.dialogs.onboarding.start`),onClick:handleNextStep},null,8,[`label`]),[[_directive_motion]])])):step.value===2?(openBlock(),createElementBlock(`div`,_hoisted_8,[createBaseVNode(`div`,_hoisted_9,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[6]||=[createBaseVNode(`div`,{class:`i-solar:alt-arrow-left-line-duotone h-5 w-5`},null,-1)]),createBaseVNode(`h2`,_hoisted_10,toDisplayString(unref(t$1)(`settings.dialogs.onboarding.selectProvider`)),1),_cache$1[7]||=createBaseVNode(`div`,{class:`h-5 w-5`},null,-1)]),createBaseVNode(`div`,_hoisted_11,[createBaseVNode(`div`,_hoisted_12,[(openBlock(!0),createElementBlock(Fragment,null,renderList(popularProviders.value,provider=>(openBlock(),createBlock(unref(RadioCardDetail_default),{id:provider.id,key:provider.id,modelValue:selectedProviderId.value,"onUpdate:modelValue":_cache$1[0]||=$event=>selectedProviderId.value=$event,name:`provider-selection`,value:provider.id,title:provider.localizedName||provider.id,description:provider.localizedDescription||``,onClick:$event=>selectProvider(provider)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`onClick`]))),128))])]),createVNode(unref(Button_default),{label:unref(t$1)(`settings.dialogs.onboarding.next`),disabled:!selectedProviderId.value,onClick:handleNextStep},null,8,[`label`,`disabled`])])):step.value===3&&selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_13,[createBaseVNode(`div`,_hoisted_14,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[8]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-left-line-duotone":``,"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`h2`,_hoisted_15,toDisplayString(unref(t$1)(`settings.dialogs.onboarding.configureProvider`,{provider:selectedProvider.value.localizedName})),1),_cache$1[9]||=createBaseVNode(`div`,{"h-5":``,"w-5":``},null,-1)]),selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_16,[createVNode(unref(Callout_default),{label:`Keep your API keys and credentials safe!`,theme:`violet`},{default:withCtx(()=>_cache$1[10]||=[createBaseVNode(`div`,null,[createBaseVNode(`div`,null,` AIRI is running pure locally in your browser, and we will never steal your credentials for AI / LLM providers. But keep in mind that your API keys are sensitive information. Make sure to keep them safe and do not share them with anyone. `),createBaseVNode(`div`,null,[createTextVNode(` AIRI is open sourced at `),createBaseVNode(`div`,{"inline-flex":``,"translate-y-1":``,"items-center":``,"gap-1":``},[createBaseVNode(`div`,{"i-simple-icons:github":``,"inline-block":``}),createBaseVNode(`a`,{"decoration-underline":``,"decoration-dashed":``,href:`https://github.com/moeru-ai/airi`,target:`_blank`,rel:`noopener noreferrer`},`GitHub`)]),createTextVNode(`, if you want to check how we handle your credentials, feel free to inspect our code. `)])],-1)]),_:1,__:[10]}),createBaseVNode(`div`,_hoisted_17,[needsApiKey.value?(openBlock(),createElementBlock(`div`,_hoisted_18,[createVNode(unref(FieldInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[1]||=$event=>apiKey.value=$event,placeholder:getApiKeyPlaceholder(selectedProvider.value.id),type:`password`,label:`API Key`,description:`Enter your API key for the selected provider.`,required:``},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),needsBaseUrl.value?(openBlock(),createElementBlock(`div`,_hoisted_19,[createVNode(unref(FieldInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[2]||=$event=>baseUrl.value=$event,placeholder:getBaseUrlPlaceholder(selectedProvider.value.id),type:`text`,label:`Base URL`,description:`Enter the base URL for the provider's API.`},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),selectedProvider.value.id===`cloudflare-workers-ai`?(openBlock(),createElementBlock(`div`,_hoisted_20,[createVNode(unref(ProviderAccountIdInput_default),{modelValue:accountId.value,"onUpdate:modelValue":_cache$1[3]||=$event=>accountId.value=$event},null,8,[`modelValue`])])):createCommentVNode(``,!0)]),validationMessage.value?(openBlock(),createElementBlock(`div`,_hoisted_21,[createBaseVNode(`div`,{class:normalizeClass([`flex items-center rounded-lg p-3`,[isValidating.value?`bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300`:isValid.value?`bg-green-50 text-green-700 dark:bg-green-900/30 dark:text-green-300`:`bg-red-50 text-red-700 dark:bg-red-900/30 dark:text-red-300`]])},[createBaseVNode(`div`,{class:normalizeClass([`mr-2 text-lg`,[isValidating.value?`i-svg-spinners:3-dots-fade`:isValid.value?`i-solar:check-circle-bold-duotone`:`i-solar:danger-circle-bold-duotone`]])},null,2),createTextVNode(` `+toDisplayString(validationMessage.value),1)],2)])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),createVNode(unref(Button_default),{label:unref(t$1)(`settings.dialogs.onboarding.next`),disabled:!selectedProviderId.value,loading:unref(isLoadingActiveProviderModels),onClick:handleFinishProviderConfiguration},null,8,[`label`,`disabled`,`loading`])])):step.value===4&&selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_22,[createBaseVNode(`div`,_hoisted_23,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[11]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-left-line-duotone":``,"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`h2`,_hoisted_24,toDisplayString(unref(t$1)(`settings.dialogs.onboarding.select-model`)),1),_cache$1[12]||=createBaseVNode(`div`,{"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`div`,_hoisted_25,[createVNode(unref(RadioCardManySelect_default),{modelValue:unref(activeModel),"onUpdate:modelValue":_cache$1[4]||=$event=>isRef(activeModel)?activeModel.value=$event:null,"search-query":unref(modelSearchQuery),"onUpdate:searchQuery":_cache$1[5]||=$event=>isRef(modelSearchQuery)?modelSearchQuery.value=$event:null,items:unref(providerModels).sort((a$1,b$1)=>a$1.id===unref(activeModel)?-1:b$1.id===unref(activeModel)?1:0),searchable:!0,"search-placeholder":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:unref(modelSearchQuery)}),"search-results-text":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"list-class":`max-h-[calc(100dvh-17rem)] sm:max-h-120`},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`])]),createVNode(unref(Button_default),{variant:`primary`,disabled:!canSave.value,label:unref(t$1)(`settings.dialogs.onboarding.saveAndContinue`),onClick:handleSave},null,8,[`disabled`,`label`])])):createCommentVNode(``,!0)]),_:1},8,[`name`])])}}}),Onboarding_default=__plugin_vue_export_helper_default(Onboarding_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-181bca39`]]),OnboardingDialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`OnboardingDialog`,props:{modelValue:{type:Boolean,default:!1,required:!1},modelModifiers:{}},emits:mergeModels([`configured`,`skipped`],[`update:modelValue`]),setup(__props,{emit:__emit}){let emit$1=__emit,showDialog=useModel(__props,`modelValue`),isDesktop=useMediaQuery(`(min-width: 768px)`),screenSafeArea=useScreenSafeArea();return useResizeObserver(document.documentElement,()=>screenSafeArea.update()),onMounted(()=>screenSafeArea.update()),(_ctx,_cache$1)=>unref(isDesktop)?(openBlock(),createBlock(unref(DialogRoot_default),{key:0,open:showDialog.value,"onUpdate:open":_cache$1[2]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(DialogPortal_default),null,{default:withCtx(()=>[createVNode(unref(DialogOverlay_default),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-[9999] bg-black/50 backdrop-blur-sm`}),createVNode(unref(DialogContent_default),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-[9999] max-h-full max-w-2xl w-[92dvw] transform overflow-y-scroll rounded-2xl bg-white p-6 shadow-xl outline-none backdrop-blur-md scrollbar-none -translate-x-1/2 -translate-y-1/2 dark:bg-neutral-900`},{default:withCtx(()=>[createVNode(Onboarding_default,{onConfigured:_cache$1[0]||=$event=>emit$1(`configured`),onSkipped:_cache$1[1]||=$event=>emit$1(`skipped`)})]),_:1})]),_:1})]),_:1},8,[`open`])):(openBlock(),createBlock(unref(St),{key:1,open:showDialog.value,"should-scale-background":``,"onUpdate:open":_cache$1[5]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(DialogPortal_default),null,{default:withCtx(()=>[createVNode(unref(Bt),{class:`fixed inset-0`}),createVNode(unref(Ct),{class:`fixed bottom-0 left-0 right-0 z-1000 mt-20 h-full max-h-[96%] flex flex-col rounded-t-2xl bg-neutral-50 px-4 pt-4 outline-none backdrop-blur-md dark:bg-neutral-900/95`,style:normalizeStyle({paddingBottom:`${Math.max(Number.parseFloat(unref(screenSafeArea).bottom.value.replace(`px`,``)),24)}px`})},{default:withCtx(()=>[createVNode(unref(Nt)),createVNode(Onboarding_default,{onConfigured:_cache$1[3]||=$event=>emit$1(`configured`),onSkipped:_cache$1[4]||=$event=>emit$1(`skipped`)})]),_:1},8,[`style`])]),_:1})]),_:1},8,[`open`]))}}),OnboardingDialog_default=OnboardingDialog_vue_vue_type_script_setup_true_lang_default;const ToasterRootInjectionKey=Symbol(`ToasterRoot`);var ToasterRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ToasterRoot`,emits:[`close`],setup(__props,{emit:__emit}){let emits=__emit;return provide(ToasterRootInjectionKey,{close:id=>emits(`close`,id)}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`)}}),ToasterRoot_default=ToasterRoot_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$8={key:0,flex:``,"gap-2":``};var ColorPalette_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ColorPalette`,props:{colors:{}},setup(__props){let settings=useSettings();return(_ctx,_cache$1)=>_ctx.colors.length?(openBlock(),createElementBlock(`div`,_hoisted_1$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.colors,({hex:hex$2,name:name$2})=>(openBlock(),createBlock(unref(TooltipProvider_default),{key:hex$2||`default`},{default:withCtx(()=>[createVNode(unref(TooltipRoot_default),null,{default:withCtx(()=>[createVNode(unref(TooltipTrigger_default),{transition:`all ease-in-out duration-250`,"size-8":``,"cursor-pointer":``,"rounded-full":``,"bg-primary-500":``,style:normalizeStyle(hex$2?{background:hex$2}:{"--chromatic-hue":unref(DEFAULT_THEME_COLORS_HUE)}),class:normalizeClass(unref(settings).isColorSelectedForPrimary(hex$2)?`scale-120 md:scale-150 mx-1`:`hover:scale-110`),onClick:$event=>unref(settings).applyPrimaryColorFrom(hex$2)},null,8,[`style`,`class`,`onClick`]),createVNode(unref(TooltipPortal_default),null,{default:withCtx(()=>[createVNode(unref(TooltipContent_default),{bg:`white dark:neutral-800`,"rounded-lg":``,"px-3":``,"py-1.5":``,"text-sm":``,"shadow-md":``},{default:withCtx(()=>[createTextVNode(toDisplayString(name$2)+` `,1),createVNode(unref(TooltipArrow_default),{"fill-white":``,"dark:fill-neutral-800":``})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):createCommentVNode(``,!0)}}),ColorPalette_default=ColorPalette_vue_vue_type_script_setup_true_lang_default,ArrowTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ArrowTransition`,props:{stageTransition:{default:()=>({primaryColor:`#666`,secondaryColor:`#ccc`})}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value.secondaryColor||`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-3`,style:normalizeStyle({zIndex:stageTransition.value.zIndex||100})},null,4))}}),ArrowTransition_default=__plugin_vue_export_helper_default(ArrowTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-17464329`]]),BubbleWaveOutTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`BubbleWaveOutTransition`,props:{stageTransition:{}},setup(__props){let props=__props,colors=computed(()=>props.stageTransition?.colors||[`#eee`,`#ebcb8b`,`#c56370`,`#3f3b52`]);return onMounted(()=>{document.documentElement.style.setProperty(`--circle-expansion-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--circle-expansion-duration`,`${props.stageTransition?.duration||.4}s`),colors.value.forEach((color$2,index$1)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${index$1+1}`,color$2)})}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`circle-expansion-transition`,style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex||100})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(colors.value,(_$1,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1}))),128))],4))}}),BubbleWaveOutTransition_default=__plugin_vue_export_helper_default(BubbleWaveOutTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-4624be9e`]]),FantasyFallTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FantasyFallTransition`,props:{stageTransition:{}},setup(__props){let props=__props,direction=computed(()=>props.stageTransition?.direction||`up`),directionClass=computed(()=>`fantasy-fall-${direction.value}`);return onMounted(()=>{document.documentElement.style.setProperty(`--fantasy-fall-color`,props.stageTransition?.primaryColor||`#eee`),document.documentElement.style.setProperty(`--fantasy-fall-duration`,`${props.stageTransition?.duration||.6}s`),document.documentElement.style.setProperty(`--fantasy-fall-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--fantasy-fall-radius-sm`,`${props.stageTransition?.borderRadius?.sm||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-md`,`${props.stageTransition?.borderRadius?.md||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-lg`,`${props.stageTransition?.borderRadius?.lg||`50%`}`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`fantasy-fall-transition`,directionClass.value]),style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex??100})},null,6))}}),FantasyFallTransition_default=__plugin_vue_export_helper_default(FantasyFallTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-826171f5`]]),MultipleBlocksRevealTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`MultipleBlocksRevealTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor||`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-4`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},_cache$1[0]||=[createStaticVNode(`
`,5)],4))}}),MultipleBlocksRevealTransition_default=__plugin_vue_export_helper_default(MultipleBlocksRevealTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-4221f976`]]),SlideTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SlideTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor||`#ccc`);return watch([stageTransition,overlayColor1,overlayColor2],()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,overlayColor2.value)}),onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-1`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},null,4))}}),SlideTransition_default=__plugin_vue_export_helper_default(SlideTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-81c0af14`]]),SlopeSlideTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SlopeSlideTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor??`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor??`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-2`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},null,4))}}),SlopeSlideTransition_default=__plugin_vue_export_helper_default(SlopeSlideTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-9e8b66c8`]]),RectanglesRotateTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RectanglesRotateTransition`,props:{stageTransition:{}},setup(__props){let props=__props;return onMounted(()=>{document.documentElement.style.setProperty(`--rectangle-rotate-1-color`,props.stageTransition?.primaryColor||`#ebcb8b`),document.documentElement.style.setProperty(`--rectangle-rotate-2-color`,props.stageTransition?.secondaryColor||`#c56370`),document.documentElement.style.setProperty(`--rectangle-rotate-3-color`,props.stageTransition?.tertiaryColor||`#43445b`),document.documentElement.style.setProperty(`--rectangle-rotate-duration`,`${props.stageTransition?.duration||.6}s`),document.documentElement.style.setProperty(`--rectangle-rotate-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--rectangle-rotate-stagger`,`${props.stageTransition?.staggerDelay||.1}s`),document.documentElement.style.setProperty(`--rectangle-rotate-rotation`,`${props.stageTransition?.rotation||270}deg`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`rectangle-rotate-transition`,style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex??100})},_cache$1[0]||=[createBaseVNode(`div`,{class:`rectangle rectangle-rotate-1`},[createBaseVNode(`div`)],-1),createBaseVNode(`div`,{class:`rectangle rectangle-rotate-2`},[createBaseVNode(`div`)],-1),createBaseVNode(`div`,{class:`rectangle rectangle-rotate-3`},[createBaseVNode(`div`)],-1)],4))}}),RectanglesRotateTransition_default=__plugin_vue_export_helper_default(RectanglesRotateTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-45ea2f7f`]]),StageTransitionGroup_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`StageTransitionGroup`,props:{primaryColor:{},secondaryColor:{},tertiaryColor:{},colors:{},zIndex:{},disableTransitions:{type:Boolean},usePageSpecificTransitions:{type:Boolean}},setup(__props){let props=__props,router$1=useRouter(),showTransition=ref(!1),transitionStage=ref(),activeTransitionName=ref(``),activeStageTransitionParams=ref(),transitions=shallowRef({slide:{component:SlideTransition_default,duration:2700},"slope-slide":{component:SlopeSlideTransition_default,duration:2700},arrow:{component:ArrowTransition_default,duration:2700},"multiple-blocks-reveal":{component:MultipleBlocksRevealTransition_default,duration:2800},"fantasy-fall":{component:FantasyFallTransition_default,duration:2700},"rectangles-rotate":{component:RectanglesRotateTransition_default,duration:2700},"bubble-wave-out":{component:BubbleWaveOutTransition_default,duration:1e3}}),lifecycleHooks=ref([]);function addTransitionHook(hook){return lifecycleHooks.value.push(hook),()=>{let index$1=lifecycleHooks.value.indexOf(hook);index$1>=0&&lifecycleHooks.value.splice(index$1,1)}}async function triggerHooks(stage,data$12={}){transitionStage.value=stage;for(let hook of lifecycleHooks.value)try{await Promise.resolve(hook(stage,data$12))}catch(error){console.error(`Error in transition hook at stage "${stage}":`,error)}}async function triggerTransitionAsyncFn(params,next,resolve$1){if(params.name===`none`||!params.name){next(),resolve$1();return}let transition=transitions.value[params.name];if(!transition){console.error(`Transition ${params.name} not found`),next(),resolve$1();return}let navTiming=transition.nextDelay===void 0?transition.duration/3:transition.nextDelay,hasNavigated=!1,navigationHook=stage=>{stage===`navigation`&&!hasNavigated&&(hasNavigated=!0,next())},removeNavHook=addTransitionHook(navigationHook);try{await triggerHooks(`before-enter`,{transitionName:params.name}),showTransition.value&&(await triggerHooks(`before-leave`,{transitionName:activeTransitionName.value}),activeTransitionName.value=``,activeStageTransitionParams.value=void 0,showTransition.value=!1,await triggerHooks(`after-leave`,{transitionName:activeTransitionName.value}),await new Promise(r$1=>setTimeout(r$1,50))),activeTransitionName.value=params.name,activeStageTransitionParams.value=params,showTransition.value=!0,await triggerHooks(`enter-active`,{transitionName:name}),setTimeout(async()=>{await triggerHooks(`navigation`,{transitionName:params.name,config:transition}),hasNavigated||(hasNavigated=!0,next())},navTiming),setTimeout(async()=>{await triggerHooks(`after-enter`,{transitionName:params.name})},transition.duration),setTimeout(async()=>{await triggerHooks(`before-leave`,{transitionName:params.name})},transition.duration+10),setTimeout(async()=>{await triggerHooks(`leave-active`,{transitionName:params.name})},transition.duration+20);let totalDuration=transition.exitDuration??0;setTimeout(async()=>{showTransition.value=!1,activeTransitionName.value=``,activeStageTransitionParams.value=void 0,await triggerHooks(`after-leave`,{transitionName:params.name}),resolve$1()},transition.duration+totalDuration)}catch(error){console.error(error)}finally{removeNavHook(),setTimeout(()=>{hasNavigated||(hasNavigated=!0,next())},transition.duration*2)}}function triggerTransition(params,next){return new Promise(resolve$1=>{triggerTransitionAsyncFn(params,next,resolve$1)})}return router$1.beforeEach((to$1,_from,next)=>{if(props.disableTransitions){next();return}if(typeof to$1.meta.stageTransition!=`object`){next();return}let stageTransition=to$1.meta.stageTransition;if(props.usePageSpecificTransitions&&stageTransition.pageSpecificAvailable){next();return}props.primaryColor!==void 0&&(stageTransition.primaryColor=props.primaryColor),props.secondaryColor!==void 0&&(stageTransition.secondaryColor=props.secondaryColor),props.tertiaryColor!==void 0&&(stageTransition.tertiaryColor=props.tertiaryColor),props.colors!==void 0&&(stageTransition.colors=props.colors),props.zIndex!==void 0&&(stageTransition.zIndex=props.zIndex),triggerTransition(stageTransition,next)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),showTransition.value?(openBlock(),createElementBlock(Fragment,{key:0},[transitions.value[activeTransitionName.value]?(openBlock(),createBlock(resolveDynamicComponent(transitions.value[activeTransitionName.value].component),{key:0,"stage-transition":activeStageTransitionParams.value},null,8,[`stage-transition`])):createCommentVNode(``,!0)],64)):createCommentVNode(``,!0)],64))}}),StageTransitionGroup_default=StageTransitionGroup_vue_vue_type_script_setup_true_lang_default;let toastsCounter=1;var Observer=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=subscriber=>(this.subscribers.push(subscriber),()=>{let index$1=this.subscribers.indexOf(subscriber);this.subscribers.splice(index$1,1)});publish=data$12=>{this.subscribers.forEach(subscriber=>subscriber(data$12))};addToast=data$12=>{this.publish(data$12),this.toasts=[...this.toasts,data$12]};create=data$12=>{let{message:message$1,...rest}=data$12,id=typeof data$12.id==`number`||data$12.id&&data$12.id?.length>0?data$12.id:toastsCounter++,alreadyExists=this.toasts.find(toast$1=>toast$1.id===id),dismissible=data$12.dismissible===void 0?!0:data$12.dismissible;return this.dismissedToasts.has(id)&&this.dismissedToasts.delete(id),alreadyExists?this.toasts=this.toasts.map(toast$1=>toast$1.id===id?(this.publish({...toast$1,...data$12,id,title:message$1}),{...toast$1,...data$12,id,dismissible,title:message$1}):toast$1):this.addToast({title:message$1,...rest,dismissible,id}),id};dismiss=id=>(id?(this.dismissedToasts.add(id),requestAnimationFrame(()=>this.subscribers.forEach(subscriber=>subscriber({id,dismiss:!0})))):this.toasts.forEach(toast$1=>{this.subscribers.forEach(subscriber=>subscriber({id:toast$1.id,dismiss:!0}))}),id);message=(message$1,data$12)=>this.create({...data$12,message:message$1,type:`default`});error=(message$1,data$12)=>this.create({...data$12,type:`error`,message:message$1});success=(message$1,data$12)=>this.create({...data$12,type:`success`,message:message$1});info=(message$1,data$12)=>this.create({...data$12,type:`info`,message:message$1});warning=(message$1,data$12)=>this.create({...data$12,type:`warning`,message:message$1});loading=(message$1,data$12)=>this.create({...data$12,type:`loading`,message:message$1});promise=(promise,data$12)=>{if(!data$12)return;let id;data$12.loading!==void 0&&(id=this.create({...data$12,promise,type:`loading`,message:data$12.loading,description:typeof data$12.description==`function`?void 0:data$12.description}));let p$4=Promise.resolve(promise instanceof Function?promise():promise),shouldDismiss=id!==void 0,result,originalPromise=p$4.then(async response=>{result=[`resolve`,response];let isVueComponent=isVNode(response);if(isVueComponent)shouldDismiss=!1,this.create({id,type:`default`,message:response});else if(isHttpResponse(response)&&!response.ok){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(`HTTP error! status: ${response.status}`):data$12.error,description=typeof data$12.description==`function`?await data$12.description(`HTTP error! status: ${response.status}`):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id||``};this.create({id,type:`error`,description,...toastSettings})}else if(response instanceof Error){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(response):data$12.error,description=typeof data$12.description==`function`?await data$12.description(response):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id||``};this.create({id,type:`error`,description,...toastSettings})}else if(data$12.success!==void 0){shouldDismiss=!1;let promiseData=typeof data$12.success==`function`?await data$12.success(response):data$12.success,description=typeof data$12.description==`function`?await data$12.description(response):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id||``};this.create({id,type:`success`,description,...toastSettings})}}).catch(async error=>{if(result=[`reject`,error],data$12.error!==void 0){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(error):data$12.error,description=typeof data$12.description==`function`?await data$12.description(error):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id||``};this.create({id,type:`error`,description,...toastSettings})}}).finally(()=>{shouldDismiss&&(this.dismiss(id),id=void 0),data$12.finally?.()}),unwrap=()=>new Promise((resolve$1,reject)=>originalPromise.then(()=>result[0]===`reject`?reject(result[1]):resolve$1(result[1])).catch(reject));return typeof id!=`string`&&typeof id!=`number`?{unwrap}:Object.assign(id,{unwrap})};custom=(component,data$12)=>{let id=data$12?.id||toastsCounter++;return this.publish({component,id,...data$12}),id};getActiveToasts=()=>this.toasts.filter(toast$1=>!this.dismissedToasts.has(toast$1.id))};const ToastState=new Observer;function toastFunction(message$1,data$12){let id=data$12?.id||toastsCounter++;return ToastState.create({message:message$1,id,type:`default`,...data$12}),id}const isHttpResponse=data$12=>data$12&&typeof data$12==`object`&&`ok`in data$12&&typeof data$12.ok==`boolean`&&`status`in data$12&&typeof data$12.status==`number`,basicToast=toastFunction,getHistory=()=>ToastState.toasts,getToasts=()=>ToastState.getActiveToasts(),toast=Object.assign(basicToast,{success:ToastState.success,info:ToastState.info,warning:ToastState.warning,error:ToastState.error,custom:ToastState.custom,message:ToastState.message,promise:ToastState.promise,dismiss:ToastState.dismiss,loading:ToastState.loading},{getHistory,getToasts});function isAction(action){return action.label!==void 0}const VISIBLE_TOASTS_AMOUNT=3,VIEWPORT_OFFSET=`24px`,MOBILE_VIEWPORT_OFFSET=`16px`,TOAST_LIFETIME=4e3,TOAST_WIDTH=356,GAP=14,SWIPE_THRESHOLD=45,TIME_BEFORE_UNMOUNT=200;function useIsDocumentHidden(){let isDocumentHidden=ref(!1);return watchEffect(()=>{let callback=()=>{isDocumentHidden.value=document.hidden};return document.addEventListener(`visibilitychange`,callback),()=>window.removeEventListener(`visibilitychange`,callback)}),{isDocumentHidden}}function cn(...classes){return classes.filter(Boolean).join(` `)}function getDefaultSwipeDirections(position$2){let[y,x$1]=position$2.split(`-`),directions=[];return y&&directions.push(y),x$1&&directions.push(x$1),directions}function assignOffset(defaultOffset$1,mobileOffset){let styles={};return[defaultOffset$1,mobileOffset].forEach((offset$2,index$1)=>{let isMobile=index$1===1,prefix=isMobile?`--mobile-offset`:`--offset`,defaultValue=isMobile?MOBILE_VIEWPORT_OFFSET:VIEWPORT_OFFSET;function assignAll(offset$1$1){[`top`,`right`,`bottom`,`left`].forEach(key$2=>{styles[`${prefix}-${key$2}`]=typeof offset$1$1==`number`?`${offset$1$1}px`:offset$1$1})}typeof offset$2==`number`||typeof offset$2==`string`?assignAll(offset$2):typeof offset$2==`object`?[`top`,`right`,`bottom`,`left`].forEach(key$2=>{offset$2[key$2]===void 0?styles[`${prefix}-${key$2}`]=defaultValue:styles[`${prefix}-${key$2}`]=typeof offset$2[key$2]==`number`?`${offset$2[key$2]}px`:offset$2[key$2]}):assignAll(defaultValue)}),styles}const _hoisted_1$7=[`data-rich-colors`,`data-styled`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-invert`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`],_hoisted_2$2=[`aria-label`,`data-disabled`];var Toast_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Toast`,props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:[`update:heights`,`update:height`,`removeToast`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,swipeDirection=ref(null),swipeOutDirection=ref(null),mounted=ref(!1),removed=ref(!1),swiping=ref(!1),swipeOut=ref(!1),swiped=ref(!1),offsetBeforeRemove=ref(0),initialHeight=ref(0),remainingTime=ref(props.toast.duration||props.duration||TOAST_LIFETIME),dragStartTime=ref(null),toastRef=ref(null),isFront=computed(()=>props.index===0),isVisible=computed(()=>props.index+1<=props.visibleToasts),toastType=computed(()=>props.toast.type),dismissible=computed(()=>props.toast.dismissible!==!1),toastClass=computed(()=>props.toast.class||``),toastDescriptionClass=computed(()=>props.descriptionClass||``),heightIndex=computed(()=>{let currentPosition=props.toast.position||props.position,samePositionHeights=props.heights.filter(h$1=>h$1.position===currentPosition),index$1=samePositionHeights.findIndex(height=>height.toastId===props.toast.id);return index$1>=0?index$1:0}),toastsHeightBefore=computed(()=>{let currentPosition=props.toast.position||props.position,samePositionHeights=props.heights.filter(h$1=>h$1.position===currentPosition);return samePositionHeights.reduce((prev,curr,reducerIndex)=>reducerIndex>=heightIndex.value?prev:prev+curr.height,0)}),offset$2=computed(()=>heightIndex.value*props.gap+toastsHeightBefore.value||0),closeButton=computed(()=>props.toast.closeButton??props.closeButton),duration$2=computed(()=>props.toast.duration||props.duration||TOAST_LIFETIME),closeTimerStartTimeRef=ref(0),lastCloseTimerStartTimeRef=ref(0),pointerStartRef=ref(null),coords$1=computed(()=>props.position.split(`-`)),y=computed(()=>coords$1.value[0]),x$1=computed(()=>coords$1.value[1]),isStringOfTitle=computed(()=>typeof props.toast.title!=`string`),isStringOfDescription=computed(()=>typeof props.toast.description!=`string`),{isDocumentHidden}=useIsDocumentHidden(),disabled=computed(()=>toastType.value&&toastType.value===`loading`);onMounted(()=>{mounted.value=!0,remainingTime.value=duration$2.value}),watchEffect(async()=>{if(!mounted.value||!toastRef.value)return;await nextTick();let toastNode=toastRef.value,originalHeight=toastNode.style.height;toastNode.style.height=`auto`;let newHeight=toastNode.getBoundingClientRect().height;toastNode.style.height=originalHeight,initialHeight.value=newHeight,emit$1(`update:height`,{toastId:props.toast.id,height:newHeight,position:props.toast.position||props.position})});function deleteToast(){removed.value=!0,offsetBeforeRemove.value=offset$2.value,setTimeout(()=>{emit$1(`removeToast`,props.toast)},TIME_BEFORE_UNMOUNT)}function handleCloseToast(){if(disabled.value||!dismissible.value)return{};deleteToast(),props.toast.onDismiss?.(props.toast)}function onPointerDown(event){disabled.value||!dismissible.value||(dragStartTime.value=new Date,offsetBeforeRemove.value=offset$2.value,event.target.setPointerCapture(event.pointerId),event.target.tagName!==`BUTTON`&&(swiping.value=!0,pointerStartRef.value={x:event.clientX,y:event.clientY}))}function onPointerUp(){if(swipeOut.value||!dismissible.value)return;pointerStartRef.value=null;let swipeAmountX=Number(toastRef.value?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),swipeAmountY=Number(toastRef.value?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),timeTaken=new Date().getTime()-(dragStartTime.value?.getTime()||0),swipeAmount=swipeDirection.value===`x`?swipeAmountX:swipeAmountY,velocity=Math.abs(swipeAmount)/timeTaken;if(Math.abs(swipeAmount)>=SWIPE_THRESHOLD||velocity>.11){offsetBeforeRemove.value=offset$2.value,props.toast.onDismiss?.(props.toast),swipeDirection.value===`x`?swipeOutDirection.value=swipeAmountX>0?`right`:`left`:swipeOutDirection.value=swipeAmountY>0?`down`:`up`,deleteToast(),swipeOut.value=!0;return}else toastRef.value?.style.setProperty(`--swipe-amount-x`,`0px`),toastRef.value?.style.setProperty(`--swipe-amount-y`,`0px`);swiped.value=!1,swiping.value=!1,swipeDirection.value=null}function onPointerMove(event){if(!pointerStartRef.value||!dismissible.value)return;let isHighlighted=window?.getSelection()?.toString()?.length??!1;if(isHighlighted)return;let yDelta=event.clientY-pointerStartRef.value.y,xDelta=event.clientX-pointerStartRef.value.x,swipeDirections=props.swipeDirections??getDefaultSwipeDirections(props.position);!swipeDirection.value&&(Math.abs(xDelta)>1||Math.abs(yDelta)>1)&&(swipeDirection.value=Math.abs(xDelta)>Math.abs(yDelta)?`x`:`y`);let swipeAmount={x:0,y:0},getDampening=delta=>{let factor$1=Math.abs(delta)/20;return 1/(1.5+factor$1)};if(swipeDirection.value===`y`){if(swipeDirections.includes(`top`)||swipeDirections.includes(`bottom`))if(swipeDirections.includes(`top`)&&yDelta<0||swipeDirections.includes(`bottom`)&&yDelta>0)swipeAmount.y=yDelta;else{let dampenedDelta=yDelta*getDampening(yDelta);swipeAmount.y=Math.abs(dampenedDelta)0)swipeAmount.x=xDelta;else{let dampenedDelta=xDelta*getDampening(xDelta);swipeAmount.x=Math.abs(dampenedDelta)0||Math.abs(swipeAmount.y)>0)&&(swiped.value=!0),toastRef.value?.style.setProperty(`--swipe-amount-x`,`${swipeAmount.x}px`),toastRef.value?.style.setProperty(`--swipe-amount-y`,`${swipeAmount.y}px`)}onMounted(()=>{if(mounted.value=!0,!toastRef.value)return;let height=toastRef.value.getBoundingClientRect().height;initialHeight.value=height;let newHeights=[{toastId:props.toast.id,height,position:props.toast.position},...props.heights];emit$1(`update:heights`,newHeights)}),onBeforeUnmount(()=>{toastRef.value&&emit$1(`removeToast`,props.toast)}),watchEffect(onInvalidate=>{if(props.toast.promise&&toastType.value===`loading`||props.toast.duration===1/0||props.toast.type===`loading`)return;let timeoutId,pauseTimer=()=>{if(lastCloseTimerStartTimeRef.value{remainingTime.value!==1/0&&(closeTimerStartTimeRef.value=new Date().getTime(),timeoutId=setTimeout(()=>{props.toast.onAutoClose?.(props.toast),deleteToast()},remainingTime.value))};props.expanded||props.interacting||isDocumentHidden.value?pauseTimer():startTimer(),onInvalidate(()=>{clearTimeout(timeoutId)})}),watch(()=>props.toast.delete,value$1=>{value$1!==void 0&&value$1&&deleteToast()},{deep:!0});function handleDragEnd(){swiping.value=!1,swipeDirection.value=null,pointerStartRef.value=null}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`li`,{tabindex:`0`,ref_key:`toastRef`,ref:toastRef,class:normalizeClass(unref(cn)(props.class,toastClass.value,_ctx.classes?.toast,_ctx.toast.classes?.toast,_ctx.classes?.[toastType.value],_ctx.toast?.classes?.[toastType.value])),"data-sonner-toast":``,"data-rich-colors":_ctx.toast.richColors??_ctx.defaultRichColors,"data-styled":!(_ctx.toast.component||_ctx.toast?.unstyled||_ctx.unstyled),"data-mounted":mounted.value,"data-promise":!!_ctx.toast.promise,"data-swiped":swiped.value,"data-removed":removed.value,"data-visible":isVisible.value,"data-y-position":y.value,"data-x-position":x$1.value,"data-index":_ctx.index,"data-front":isFront.value,"data-swiping":swiping.value,"data-dismissible":dismissible.value,"data-type":toastType.value,"data-invert":_ctx.toast.invert||_ctx.invert,"data-swipe-out":swipeOut.value,"data-swipe-direction":swipeOutDirection.value,"data-expanded":!!(_ctx.expanded||_ctx.expandByDefault&&mounted.value),style:normalizeStyle({"--index":_ctx.index,"--toasts-before":_ctx.index,"--z-index":_ctx.toasts.length-_ctx.index,"--offset":`${removed.value?offsetBeforeRemove.value:offset$2.value}px`,"--initial-height":_ctx.expandByDefault?`auto`:`${initialHeight.value}px`,..._ctx.style,...props.toast.style}),onDragend:handleDragEnd,onPointerdown:onPointerDown,onPointerup:onPointerUp,onPointermove:onPointerMove},[closeButton.value&&!_ctx.toast.component&&toastType.value!==`loading`?(openBlock(),createElementBlock(`button`,{key:0,"aria-label":_ctx.closeButtonAriaLabel||`Close toast`,"data-disabled":disabled.value,"data-close-button":`true`,class:normalizeClass(unref(cn)(_ctx.classes?.closeButton,_ctx.toast?.classes?.closeButton)),onClick:handleCloseToast},[_ctx.icons?.close?(openBlock(),createBlock(resolveDynamicComponent(_ctx.icons?.close),{key:0})):renderSlot(_ctx.$slots,`close-icon`,{key:1})],10,_hoisted_2$2)):createCommentVNode(`v-if`,!0),_ctx.toast.component?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.component),mergeProps({key:1},_ctx.toast.componentProps,{onCloseToast:handleCloseToast}),null,16)):(openBlock(),createElementBlock(Fragment,{key:2},[toastType.value!==`default`||_ctx.toast.icon||_ctx.toast.promise?(openBlock(),createElementBlock(`div`,{key:0,"data-icon":``,class:normalizeClass(unref(cn)(_ctx.classes?.icon,_ctx.toast?.classes?.icon))},[_ctx.toast.icon?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.icon),{key:0})):(openBlock(),createElementBlock(Fragment,{key:1},[toastType.value===`loading`?renderSlot(_ctx.$slots,`loading-icon`,{key:0}):toastType.value===`success`?renderSlot(_ctx.$slots,`success-icon`,{key:1}):toastType.value===`error`?renderSlot(_ctx.$slots,`error-icon`,{key:2}):toastType.value===`warning`?renderSlot(_ctx.$slots,`warning-icon`,{key:3}):toastType.value===`info`?renderSlot(_ctx.$slots,`info-icon`,{key:4}):createCommentVNode(`v-if`,!0)],64))],2)):createCommentVNode(`v-if`,!0),createBaseVNode(`div`,{"data-content":``,class:normalizeClass(unref(cn)(_ctx.classes?.content,_ctx.toast?.classes?.content))},[createBaseVNode(`div`,{"data-title":``,class:normalizeClass(unref(cn)(_ctx.classes?.title,_ctx.toast.classes?.title))},[isStringOfTitle.value?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.title),normalizeProps(mergeProps({key:0},_ctx.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(_ctx.toast.title),1)],64))],2),_ctx.toast.description?(openBlock(),createElementBlock(`div`,{key:0,"data-description":``,class:normalizeClass(unref(cn)(_ctx.descriptionClass,toastDescriptionClass.value,_ctx.classes?.description,_ctx.toast.classes?.description))},[isStringOfDescription.value?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.description),normalizeProps(mergeProps({key:0},_ctx.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(_ctx.toast.description),1)],64))],2)):createCommentVNode(`v-if`,!0)],2),_ctx.toast.cancel?(openBlock(),createElementBlock(`button`,{key:1,style:normalizeStyle(_ctx.toast.cancelButtonStyle||_ctx.cancelButtonStyle),class:normalizeClass(unref(cn)(_ctx.classes?.cancelButton,_ctx.toast.classes?.cancelButton)),"data-button":``,"data-cancel":``,onClick:_cache$1[0]||=event=>{unref(isAction)(_ctx.toast.cancel)&&dismissible.value&&(_ctx.toast.cancel.onClick?.(event),deleteToast())}},toDisplayString(unref(isAction)(_ctx.toast.cancel)?_ctx.toast.cancel?.label:_ctx.toast.cancel),7)):createCommentVNode(`v-if`,!0),_ctx.toast.action?(openBlock(),createElementBlock(`button`,{key:2,style:normalizeStyle(_ctx.toast.actionButtonStyle||_ctx.actionButtonStyle),class:normalizeClass(unref(cn)(_ctx.classes?.actionButton,_ctx.toast.classes?.actionButton)),"data-button":``,"data-action":``,onClick:_cache$1[1]||=event=>{unref(isAction)(_ctx.toast.action)&&(_ctx.toast.action.onClick?.(event),!event.defaultPrevented&&deleteToast())}},toDisplayString(unref(isAction)(_ctx.toast.action)?_ctx.toast.action?.label:_ctx.toast.action),7)):createCommentVNode(`v-if`,!0)],64))],46,_hoisted_1$7))}}),Toast_default=Toast_vue_vue_type_script_setup_true_lang_default,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};const _sfc_main$4={},_hoisted_1$6={xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stoke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`};function _sfc_render$4(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$6,_cache$1[0]||=[createBaseVNode(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1),createBaseVNode(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1)])}var CloseIcon_default=export_helper_default(_sfc_main$4,[[`render`,_sfc_render$4]]);const _hoisted_1$5=[`data-visible`],_hoisted_2$1={class:`sonner-spinner`};var Loader_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Loader`,props:{visible:{type:Boolean}},setup(__props){let bars=Array(12).fill(0);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`sonner-loading-wrapper`,"data-visible":_ctx.visible},[createBaseVNode(`div`,_hoisted_2$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(bars),bar=>(openBlock(),createElementBlock(`div`,{key:`spinner-bar-${bar}`,class:`sonner-loading-bar`}))),128))])],8,_hoisted_1$5))}}),Loader_default=Loader_vue_vue_type_script_setup_true_lang_default;const _sfc_main$3={},_hoisted_1$4={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$3(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$4,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,"clip-rule":`evenodd`},null,-1)])}var SuccessIcon_default=export_helper_default(_sfc_main$3,[[`render`,_sfc_render$3]]);const _sfc_main$2={},_hoisted_1$3={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$2(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$3,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,"clip-rule":`evenodd`},null,-1)])}var InfoIcon_default=export_helper_default(_sfc_main$2,[[`render`,_sfc_render$2]]);const _sfc_main$1={},_hoisted_1$2={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$1(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$2,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,"clip-rule":`evenodd`},null,-1)])}var WarningIcon_default=export_helper_default(_sfc_main$1,[[`render`,_sfc_render$1]]);const _sfc_main={},_hoisted_1$1={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$1,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,"clip-rule":`evenodd`},null,-1)])}var ErrorIcon_default=export_helper_default(_sfc_main,[[`render`,_sfc_render]]);const _hoisted_1=[`aria-label`],_hoisted_2=[`data-sonner-theme`,`dir`,`data-theme`,`data-rich-colors`,`data-y-position`,`data-x-position`,`data-lifted`],isClient=typeof window<`u`&&typeof document<`u`;function getDocumentDirection(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let dirAttribute=document.documentElement.getAttribute(`dir`);return dirAttribute===`auto`||!dirAttribute?window.getComputedStyle(document.documentElement).direction:dirAttribute}var Toaster_vue_vue_type_script_setup_true_lang_default=defineComponent({name:`Toaster`,inheritAttrs:!1,__name:`Toaster`,props:{invert:{type:Boolean,default:!1},theme:{default:`light`},position:{default:`bottom-right`},hotkey:{default:()=>[`altKey`,`KeyT`]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:GAP},visibleToasts:{default:VISIBLE_TOASTS_AMOUNT},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:``},style:{},offset:{default:VIEWPORT_OFFSET},mobileOffset:{default:MOBILE_VIEWPORT_OFFSET},dir:{default:`auto`},swipeDirections:{},icons:{},containerAriaLabel:{default:`Notifications`}},setup(__props){let props=__props,attrs=useAttrs(),toasts=ref([]);function filteredToasts(pos,index$1){return toasts.value.filter(toast$1=>!toast$1.position&&index$1===0||toast$1.position===pos)}let possiblePositions=computed(()=>{let posList=toasts.value.filter(toast$1=>toast$1.position).map(toast$1=>toast$1.position);return posList.length>0?Array.from(new Set([props.position].concat(posList))):[props.position]}),toastsByPosition=computed(()=>{let result={};return possiblePositions.value.forEach(pos=>{result[pos]=toasts.value.filter(t$1=>t$1.position===pos)}),result}),heights=ref([]),expanded=ref(!1),interacting=ref(!1),actualTheme=ref(props.theme===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:props.theme),listRef=ref(null),lastFocusedElementRef=ref(null),isFocusWithinRef=ref(!1),hotkeyLabel=props.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``);function removeToast(toastToRemove){toasts.value.find(toast$1=>toast$1.id===toastToRemove.id)?.delete||ToastState.dismiss(toastToRemove.id),toasts.value=toasts.value.filter(({id})=>id!==toastToRemove.id),setTimeout(()=>{toasts.value.find(t$1=>t$1.id===toastToRemove.id)||(heights.value=heights.value.filter(h$1=>h$1.toastId!==toastToRemove.id))},TIME_BEFORE_UNMOUNT+50)}function onBlur(event){isFocusWithinRef.value&&!event.currentTarget?.contains?.(event.relatedTarget)&&(isFocusWithinRef.value=!1,lastFocusedElementRef.value&&(lastFocusedElementRef.value.focus({preventScroll:!0}),lastFocusedElementRef.value=null))}function onFocus(event){let isNotDismissible=event.target instanceof HTMLElement&&event.target.dataset.dismissible===`false`;isNotDismissible||isFocusWithinRef.value||(isFocusWithinRef.value=!0,lastFocusedElementRef.value=event.relatedTarget)}function onPointerDown(event){if(event.target){let isNotDismissible=event.target instanceof HTMLElement&&event.target.dataset.dismissible===`false`;if(isNotDismissible)return}interacting.value=!0}watchEffect(onInvalidate=>{let unsubscribe=ToastState.subscribe(toast$1=>{if(toast$1.dismiss){requestAnimationFrame(()=>{toasts.value=toasts.value.map(t$1=>t$1.id===toast$1.id?{...t$1,delete:!0}:t$1)});return}nextTick(()=>{let indexOfExistingToast=toasts.value.findIndex(t$1=>t$1.id===toast$1.id);indexOfExistingToast===-1?toasts.value=[toast$1,...toasts.value]:toasts.value=[...toasts.value.slice(0,indexOfExistingToast),{...toasts.value[indexOfExistingToast],...toast$1},...toasts.value.slice(indexOfExistingToast+1)]})});onInvalidate(unsubscribe)}),watchEffect(onInvalidate=>{if(typeof window>`u`)return;if(props.theme!==`system`){actualTheme.value=props.theme;return}let darkMediaQuery=window.matchMedia(`(prefers-color-scheme: dark)`),updateTheme=matches$1=>{actualTheme.value=matches$1?`dark`:`light`};updateTheme(darkMediaQuery.matches);let handler=event=>{updateTheme(event.matches)};try{darkMediaQuery.addEventListener(`change`,handler)}catch{darkMediaQuery.addListener(handler)}onInvalidate(()=>{try{darkMediaQuery.removeEventListener(`change`,handler)}catch{darkMediaQuery.removeListener(handler)}})}),watchEffect(()=>{listRef.value&&lastFocusedElementRef.value&&(lastFocusedElementRef.value.focus({preventScroll:!0}),lastFocusedElementRef.value=null,isFocusWithinRef.value=!1)}),watchEffect(()=>{toasts.value.length<=1&&(expanded.value=!1)}),watchEffect(onInvalidate=>{function handleKeyDown(event){let isHotkeyPressed=props.hotkey.every(key$2=>event[key$2]||event.code===key$2),listRefItem=Array.isArray(listRef.value)?listRef.value[0]:listRef.value;isHotkeyPressed&&(expanded.value=!0,listRefItem?.focus());let isItemActive=document.activeElement===listRef.value||listRefItem?.contains(document.activeElement);event.code===`Escape`&&isItemActive&&(expanded.value=!1)}isClient&&(document.addEventListener(`keydown`,handleKeyDown),onInvalidate(()=>{document.removeEventListener(`keydown`,handleKeyDown)}))});function handleMouseEnter(){expanded.value=!0}function handleMouseLeave(){interacting.value||(expanded.value=!1)}function handleDragEnd(){expanded.value=!1}function handlePointerUp(){interacting.value=!1}function updateHeights(h$1){heights.value=h$1}function updateHeight(h$1){let index$1=heights.value.findIndex(item=>item.toastId===h$1.toastId);if(index$1!==-1)heights.value[index$1]=h$1;else{let samePositionIndex=heights.value.findIndex(item=>item.position===h$1.position);samePositionIndex===-1?heights.value.unshift(h$1):heights.value.splice(samePositionIndex,0,h$1)}}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createCommentVNode(` Remove item from normal navigation flow, only available via hotkey `),createBaseVNode(`section`,{"aria-label":`${_ctx.containerAriaLabel} ${unref(hotkeyLabel)}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(possiblePositions.value,(pos,index$1)=>(openBlock(),createElementBlock(`ol`,mergeProps({key:pos,ref_for:!0,ref_key:`listRef`,ref:listRef,"data-sonner-toaster":``,"data-sonner-theme":actualTheme.value,class:props.class,dir:_ctx.dir===`auto`?getDocumentDirection():_ctx.dir,tabIndex:-1,"data-theme":_ctx.theme,"data-rich-colors":_ctx.richColors,"data-y-position":pos.split(`-`)[0],"data-x-position":pos.split(`-`)[1],"data-lifted":expanded.value&&toasts.value.length>1&&!_ctx.expand,style:{"--front-toast-height":`${heights.value[0]?.height||0}px`,"--width":`${unref(TOAST_WIDTH)}px`,"--gap":`${_ctx.gap}px`,..._ctx.style,...unref(attrs).style,...unref(assignOffset)(_ctx.offset,_ctx.mobileOffset)}},_ctx.$attrs,{onBlur,onFocus,onMouseenter:handleMouseEnter,onMousemove:handleMouseEnter,onMouseleave:handleMouseLeave,onDragend:handleDragEnd,onPointerdown:onPointerDown,onPointerup:handlePointerUp}),[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredToasts(pos,index$1),(toast$1,idx)=>(openBlock(),createBlock(Toast_default,{key:toast$1.id,heights:heights.value,icons:_ctx.icons,index:idx,toast:toast$1,defaultRichColors:_ctx.richColors,duration:_ctx.toastOptions?.duration??_ctx.duration,class:normalizeClass(_ctx.toastOptions?.class??``),descriptionClass:_ctx.toastOptions?.descriptionClass,invert:_ctx.invert,visibleToasts:_ctx.visibleToasts,closeButton:_ctx.toastOptions?.closeButton??_ctx.closeButton,interacting:interacting.value,position:pos,style:normalizeStyle(_ctx.toastOptions?.style),unstyled:_ctx.toastOptions?.unstyled,classes:_ctx.toastOptions?.classes,cancelButtonStyle:_ctx.toastOptions?.cancelButtonStyle,actionButtonStyle:_ctx.toastOptions?.actionButtonStyle,"close-button-aria-label":_ctx.toastOptions?.closeButtonAriaLabel,toasts:toastsByPosition.value[pos],expandByDefault:_ctx.expand,gap:_ctx.gap,expanded:expanded.value,swipeDirections:props.swipeDirections,"onUpdate:heights":updateHeights,"onUpdate:height":updateHeight,onRemoveToast:removeToast},{"close-icon":withCtx(()=>[renderSlot(_ctx.$slots,`close-icon`,{},()=>[createVNode(CloseIcon_default)])]),"loading-icon":withCtx(()=>[renderSlot(_ctx.$slots,`loading-icon`,{},()=>[createVNode(Loader_default,{visible:toast$1.type===`loading`},null,8,[`visible`])])]),"success-icon":withCtx(()=>[renderSlot(_ctx.$slots,`success-icon`,{},()=>[createVNode(SuccessIcon_default)])]),"error-icon":withCtx(()=>[renderSlot(_ctx.$slots,`error-icon`,{},()=>[createVNode(ErrorIcon_default)])]),"warning-icon":withCtx(()=>[renderSlot(_ctx.$slots,`warning-icon`,{},()=>[createVNode(WarningIcon_default)])]),"info-icon":withCtx(()=>[renderSlot(_ctx.$slots,`info-icon`,{},()=>[createVNode(InfoIcon_default)])]),_:2},1032,[`heights`,`icons`,`index`,`toast`,`defaultRichColors`,`duration`,`class`,`descriptionClass`,`invert`,`visibleToasts`,`closeButton`,`interacting`,`position`,`style`,`unstyled`,`classes`,`cancelButtonStyle`,`actionButtonStyle`,`close-button-aria-label`,`toasts`,`expandByDefault`,`gap`,`expanded`,`swipeDirections`]))),128))],16,_hoisted_2))),128))],8,_hoisted_1)],2112))}}),Toaster_default=Toaster_vue_vue_type_script_setup_true_lang_default;const usePWAStore=defineStore(`pwa`,()=>{ref([]);let breakpoints=useBreakpoints(breakpointsTailwind);breakpoints.smaller(`md`),onMounted(async()=>{})});var App_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`App`,setup(__props){usePWAStore();let i18n$1=useI18n(),settings=storeToRefs(useSettings()),onboardingStore=useOnboardingStore(),{shouldShowSetup}=storeToRefs(onboardingStore),isDark=useDark(),primaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 90%, oklch(90% 0 360))`),secondaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 90%, oklch(90% 0 360))`),tertiaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 90%, oklch(90% 0 360))`),colors=computed(()=>[primaryColor.value,secondaryColor.value,tertiaryColor.value,isDark.value?`#121212`:`#FFFFFF`]);watch(settings.language,()=>{i18n$1.locale.value=settings.language.value}),watch(settings.themeColorsHue,()=>{document.documentElement.style.setProperty(`--chromatic-hue`,settings.themeColorsHue.value.toString())},{immediate:!0}),watch(settings.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle(`dynamic-hue`,settings.themeColorsHueDynamic.value)},{immediate:!0}),onMounted(()=>{onboardingStore.initializeSetupCheck()});function handleSetupConfigured(){onboardingStore.markSetupCompleted()}function handleSetupSkipped(){onboardingStore.markSetupSkipped()}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(StageTransitionGroup_default),{"primary-color":primaryColor.value,"secondary-color":secondaryColor.value,"tertiary-color":tertiaryColor.value,colors:colors.value,"z-index":100,"disable-transitions":unref(settings).disableTransitions.value,"use-page-specific-transitions":unref(settings).usePageSpecificTransitions.value},{default:withCtx(()=>[createVNode(unref(RouterView),null,{default:withCtx(({Component})=>[(openBlock(),createBlock(KeepAlive,{include:/IndexScenePage|StageScenePage/},[(openBlock(),createBlock(resolveDynamicComponent(Component)))],1024))]),_:1})]),_:1},8,[`primary-color`,`secondary-color`,`tertiary-color`,`colors`,`disable-transitions`,`use-page-specific-transitions`]),createVNode(unref(ToasterRoot_default),{onClose:_cache$1[0]||=id=>unref(toast).dismiss(id)},{default:withCtx(()=>[createVNode(unref(Toaster_default))]),_:1}),createVNode(unref(OnboardingDialog_default),{modelValue:unref(shouldShowSetup),"onUpdate:modelValue":_cache$1[1]||=$event=>isRef(shouldShowSetup)?shouldShowSetup.value=$event:null,onConfigured:handleSetupConfigured,onSkipped:handleSetupSkipped},null,8,[`modelValue`])],64))}}),App_default=App_vue_vue_type_script_setup_true_lang_default;const languageRemap={"zh-CN":`zh-Hans`,"zh-TW":`zh-Hans`,"zh-HK":`zh-Hans`,"zh-Hant":`zh-Hans`,"en-US":`en`,"en-GB":`en`,"en-AU":`en`,en:`en`};function getLocale(){let language=localStorage.getItem(`settings/language`);language||=navigator.language||`en`;let languages=Object.keys(locales_default);return languageRemap[language||`en`]!=null&&(language=languageRemap[language||`en`]),language&&languages.includes(language)?language:`en`}const i18n=createI18n({legacy:!1,locale:getLocale(),fallbackLocale:`en`,messages:locales_default});var import_nprogress=__toESM(require_nprogress());const pinia=createPinia(),routeRecords=setupLayouts(routes);let router;router=createRouter({routes:routeRecords,history:createWebHashHistory()}),router.beforeEach((to$1,from)=>{to$1.path!==from.path&&import_nprogress.default.start()}),router.afterEach(()=>{import_nprogress.default.done()}),router.isReady().then(async()=>{}).catch(()=>{}),createApp(App_default).use(MotionPlugin).use(autoAnimatePlugin).use(router).use(pinia).use(i18n).use(mo).mount(`#app`);export{_jwt as $,useI18n as A,JSONSchemaGenerator as B,toJSONSchema as C,_array as D,_base64 as E,_base64url as F,_boolean as G,_check as H,_cidrv4 as I,_cidrv6 as J,_cuid as K,_cuid2 as L,_e164 as M,_email as N,_emoji as O,_endsWith as P,_gt as Q,_gte as R,_guid as S,_includes as T,_int as U,_ipv4 as V,_ipv6 as W,_isoDate as X,_isoDateTime as Y,_isoDuration as Z,_isoTime as _,$ZodNumber as a$,_ksuid as a1,_length as a2,_lowercase as a3,_lt as a4,_lte as a5,_maxLength as a6,_minLength as a7,_multipleOf as a8,_nanoid as a9,$ZodBase64URL as aA,$ZodBoolean as aB,$ZodCIDRv4 as aC,$ZodCIDRv6 as aD,$ZodCUID as aE,$ZodCUID2 as aF,$ZodCatch as aG,$ZodCustom as aH,$ZodDefault as aI,$ZodE164 as aJ,$ZodEmail as aK,$ZodEmoji as aL,$ZodEnum as aM,$ZodGUID as aN,$ZodIPv4 as aO,$ZodIPv6 as aP,$ZodISODate as aQ,$ZodISODateTime as aR,$ZodISODuration as aS,$ZodISOTime as aT,$ZodIntersection as aU,$ZodJWT as aV,$ZodKSUID as aW,$ZodNanoID as aX,$ZodNever as aY,$ZodNonOptional as aZ,$ZodNullable as a_,_never as aa,_normalize as ab,_number as ac,_overwrite as ad,_refine as ae,_regex as af,_startsWith as ag,_string as ah,_superRefine as ai,_toLowerCase as aj,_toUpperCase as ak,_trim as al,_ulid as am,_unknown as an,_uppercase as ao,_url as ap,_uuid as aq,_uuidv4 as ar,_uuidv6 as as,_uuidv7 as at,_xid as au,$ZodRegistry as av,globalRegistry as aw,registry as ax,$ZodArray as ay,$ZodBase64 as az,ColorPalette_default as b,randomSaccadeInterval as b$,$ZodNumberFormat as b0,$ZodObject as b1,$ZodOptional as b2,$ZodPipe as b3,$ZodPrefault as b4,$ZodReadonly as b5,$ZodString as b6,$ZodStringFormat as b7,$ZodTransform as b8,$ZodType as b9,$ZodCheckUpperCase as bA,_parse as bB,_parseAsync as bC,_safeParse as bD,_safeParseAsync as bE,safeParse$1 as bF,safeParseAsync$1 as bG,$ZodError as bH,$ZodRealError as bI,flattenError as bJ,formatError as bK,clone as bL,$ZodAsyncError as bM,$constructor as bN,config as bO,globalConfig as bP,missingDependenciesUrl as bQ,tryImport as bR,streamText as bS,useWhisper as bT,useVRMEmote as bU,loadVrm as bV,clipFromVRMAnimation as bW,loadVRMAnimation as bX,useBlink as bY,useIdleEyeSaccades as bZ,VRMUtils as b_,$ZodULID as ba,$ZodURL as bb,$ZodUUID as bc,$ZodUnion as bd,$ZodUnknown as be,$ZodXID as bf,isValidBase64 as bg,isValidBase64URL as bh,isValidJWT as bi,version as bj,Doc as bk,$ZodCheck as bl,$ZodCheckEndsWith as bm,$ZodCheckGreaterThan as bn,$ZodCheckIncludes as bo,$ZodCheckLengthEquals as bp,$ZodCheckLessThan as bq,$ZodCheckLowerCase as br,$ZodCheckMaxLength as bs,$ZodCheckMinLength as bt,$ZodCheckMultipleOf as bu,$ZodCheckNumberFormat as bv,$ZodCheckOverwrite as bw,$ZodCheckRegex as bx,$ZodCheckStartsWith as by,$ZodCheckStringFormat as bz,TranscriptionProviderSettings_default as c,useForwardPropsEmits as c$,lerp$1 as c0,randFloat as c1,useDelayMessageQueue as c2,useEmotionsMessageQueue as c3,useMessageContentQueue as c4,useQueue as c5,useMicVAD as c6,useMarkdown as c7,useAudioRecorder as c8,toWAVBase64 as c9,formatHex as cA,average as cB,ThresholdMeter_default as cC,TestDummyMarker_default as cD,LevelMeter_default as cE,PropertyPoint_default as cF,PropertyNumber_default as cG,Container_default as cH,Select_default as cI,RoundRange_default as cJ,ColorHueRange_default as cK,FieldValues_default as cL,FieldSelect_default as cM,FieldRange_default as cN,__plugin_vue_export_helper_default as cO,FieldKeyValues_default as cP,FieldInput_default as cQ,Input_default as cR,FieldCheckbox_default as cS,Checkbox_default as cT,DialogPortal_default as cU,Teleport_default as cV,DialogOverlay_default as cW,DialogContent_default as cX,DialogRoot_default as cY,injectDialogRootContext as cZ,Primitive as c_,sleep$1 as ca,merge$3 as cb,useAudioContext as cc,useSpeakingStore as cd,Dialog_default as ce,CursorFloating_default as cf,Skeleton_default as cg,Screen_default as ch,ErrorContainer_default as ci,Button_default as cj,VoiceCardManySelect_default as ck,RadioCardSimple_default as cl,RadioCardManySelect_default as cm,Alert_default as cn,IconStatusItem_default as co,IconItem_default as cp,Section_default as cq,PageHeader_default as cr,Callout_default as cs,TimeSeriesChart_default as ct,llmInferenceEndToken as cu,EMOTION_EmotionMotionName_value as cv,EMOTION_VRMExpressionName_value as cw,Emotion as cx,EmotionNeutralMotionName as cy,EmotionThinkMotionName as cz,TranscriptionPlayground_default as d,defineComponent as d$,useForwardExpose as d0,useEmitAsProps as d1,createContext as d2,RouterLink as d3,RouterView as d4,useRoute as d5,useRouter as d6,__vitePreload as d7,storeToRefs as d8,breakpointsTailwind as d9,MOUSE as dA,MathUtils as dB,PerspectiveCamera as dC,Plane as dD,Quaternion as dE,Ray as dF,Raycaster as dG,Spherical as dH,TOUCH as dI,Vector2 as dJ,Vector3 as dK,VectorKeyframeTrack as dL,Transition as dM,vModelCheckbox as dN,vModelSelect as dO,vModelText as dP,vShow as dQ,withModifiers as dR,Fragment as dS,KeepAlive as dT,computed as dU,createBaseVNode as dV,createBlock as dW,createCommentVNode as dX,createElementBlock as dY,createTextVNode as dZ,createVNode as d_,useBreakpoints as da,useClipboard as db,useDark as dc,useDevicesList as dd,useElementBounding as de,useFileDialog as df,useLocalStorage as dg,useMouse as dh,useObjectUrl as di,usePointer as dj,useResizeObserver as dk,useScreenSafeArea as dl,useUserMedia as dm,refDebounced as dn,refThrottled as do,until as dp,useDebounceFn as dq,watchDebounced as dr,defu as ds,Ee$1 as dt,Vn as du,io as dv,pe as dw,AnimationMixer as dx,Controls as dy,DirectionalLightHelper as dz,SpeechProviderSettings_default as e,guardReactiveProps as e0,inject as e1,mergeModels as e2,mergeProps as e3,nextTick as e4,onMounted as e5,onUnmounted as e6,openBlock as e7,renderList as e8,renderSlot as e9,resolveComponent as ea,resolveDirective as eb,useModel as ec,useTemplateRef as ed,watch as ee,withCtx as ef,withDirectives as eg,isRef as eh,ref as ei,shallowRef as ej,toRaw as ek,toRef as el,unref as em,normalizeClass as en,normalizeProps as eo,normalizeStyle as ep,toDisplayString as eq,__commonJSMin as er,__export as es,__require as et,__toDynamicImportESM as eu,__toESM as ev,SpeechPlayground_default as f,ProviderSettingsLayout_default as g,ProviderSettingsContainer_default as h,ProviderBasicSettings_default as i,ProviderBaseUrlInput_default as j,ProviderApiKeyInput_default as k,ProviderAdvancedSettings_default as l,ProviderAccountIdInput_default as m,useVRM as n,useSettings as o,useSettingsAudioDevice as p,useLive2d as q,require_localforage as r,useChatStore as s,useHearingStore as t,useAiriCardStore as u,useSpeechStore as v,generateSpeech as w,useConsciousnessStore as x,useProvidersStore as y,check as z}; \ No newline at end of file +const isBrowser=typeof window<`u`,win=isBrowser?window:null,doc=isBrowser?document:null,tweenTypes={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},valueTypes={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},tickModes={NONE:0,AUTO:1,FORCE:2},compositionTypes={replace:0,none:1,blend:2},isRegisteredTargetSymbol=Symbol(),isDomSymbol=Symbol(),isSvgSymbol=Symbol(),transformsSymbol=Symbol(),morphPointsSymbol=Symbol(),proxyTargetSymbol=Symbol(),minValue=1e-11,maxValue=1e12,K=1e3,maxFps=120,emptyString=``,shortTransforms=(()=>{let map=new Map;return map.set(`x`,`translateX`),map.set(`y`,`translateY`),map.set(`z`,`translateZ`),map})(),validTransforms=[`translateX`,`translateY`,`translateZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`skew`,`skewX`,`skewY`,`perspective`,`matrix`,`matrix3d`],transformsFragmentStrings=validTransforms.reduce((a$1,v)=>({...a$1,[v]:v+`(`}),{}),noop=()=>{},hexTestRgx=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,rgbExecRgx=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,rgbaExecRgx=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,hslExecRgx=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,hslaExecRgx=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,digitWithExponentRgx=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,unitsExecRgx=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,lowerCaseRgx=/([a-z])([A-Z])/g,transformsExecRgx=/(\w+)(\([^)]+\)+)/g,defaults={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:maxFps,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:K,delay:0,loopDelay:0,ease:`out(2)`,composition:compositionTypes.replace,modifier:v=>v,onBegin:noop,onBeforeUpdate:noop,onUpdate:noop,onLoop:noop,onPause:noop,onComplete:noop,onRender:noop},scope={current:null,root:doc},globals={defaults,precision:4,timeScale:1,tickThreshold:200},globalVersions={version:`4.1.2`,engine:null};isBrowser&&(win.AnimeJS||=[],win.AnimeJS.push(globalVersions));const toLowerCase=str=>str.replace(lowerCaseRgx,`$1-$2`).toLowerCase(),stringStartsWith=(str,sub)=>str.indexOf(sub)===0,now=Date.now,isArr=Array.isArray,isObj=a$1=>a$1&&a$1.constructor===Object,isNum=a$1=>typeof a$1==`number`&&!isNaN(a$1),isStr=a$1=>typeof a$1==`string`,isFnc=a$1=>typeof a$1==`function`,isUnd=a$1=>a$1===void 0,isNil=a$1=>isUnd(a$1)||a$1===null,isSvg=a$1=>isBrowser&&a$1 instanceof SVGElement,isHex=a$1=>hexTestRgx.test(a$1),isRgb=a$1=>stringStartsWith(a$1,`rgb`),isHsl=a$1=>stringStartsWith(a$1,`hsl`),isCol=a$1=>isHex(a$1)||isRgb(a$1)||isHsl(a$1),isKey=a$1=>!globals.defaults.hasOwnProperty(a$1),parseNumber=str=>isStr(str)?parseFloat(str):str,pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,abs=Math.abs,ceil=Math.ceil,floor=Math.floor,asin=Math.asin,PI=Math.PI,_round=Math.round,clamp=(v,min$1,max$1)=>vmax$1?max$1:v,powCache={},round=(v,decimalLength)=>{if(decimalLength<0)return v;if(!decimalLength)return _round(v);let p$4=powCache[decimalLength];return p$4||=powCache[decimalLength]=10**decimalLength,_round(v*p$4)/p$4},snap=(v,increment$1)=>isArr(increment$1)?increment$1.reduce((closest,cv)=>abs(cv-v)start+(end-start)*progress$1,random=(min$1,max$1,decimalLength)=>{let m=10**(decimalLength||0);return floor((Math.random()*(max$1-min$1+1/m)+min$1)*m)/m},shuffle=items=>{let m=items.length,t$1,i;for(;m;)i=random(0,--m),t$1=items[m],items[m]=items[i],items[i]=t$1;return items},clampInfinity=v=>v===1/0?maxValue:v===-1/0?-1e12:v,normalizeTime=v=>v<=minValue?minValue:clampInfinity(round(v,11)),cloneArray=a$1=>isArr(a$1)?[...a$1]:a$1,mergeObjects=(o1,o2)=>{let merged={...o1};for(let p$4 in o2){let o1p=o1[p$4];merged[p$4]=isUnd(o1p)?o2[p$4]:o1p}return merged},forEachChildren=(parent,callback,reverse,prevProp=`_prev`,nextProp=`_next`)=>{let next=parent._head,adjustedNextProp=nextProp;for(reverse&&(next=parent._tail,adjustedNextProp=prevProp);next;){let currentNext=next[adjustedNextProp];callback(next),next=currentNext}},removeChild=(parent,child,prevProp=`_prev`,nextProp=`_next`)=>{let prev=child[prevProp],next=child[nextProp];prev?prev[nextProp]=next:parent._head=next,next?next[prevProp]=prev:parent._tail=prev,child[prevProp]=null,child[nextProp]=null},addChild=(parent,child,sortMethod,prevProp=`_prev`,nextProp=`_next`)=>{let prev=parent._tail;for(;prev&&sortMethod&&sortMethod(prev,child);)prev=prev[prevProp];let next=prev?prev[nextProp]:parent._head;prev?prev[nextProp]=child:parent._head=child,next?next[prevProp]=child:parent._tail=child,child[prevProp]=prev,child[nextProp]=next},createRefreshable=constructor=>{let tracked;return(...args)=>{let currentIteration,currentIterationProgress,reversed,alternate;tracked&&(currentIteration=tracked.currentIteration,currentIterationProgress=tracked.iterationProgress,reversed=tracked.reversed,alternate=tracked._alternate,tracked.revert());let cleanup=constructor(...args);return cleanup&&!isFnc(cleanup)&&cleanup.revert&&(tracked=cleanup),isUnd(currentIterationProgress)||(tracked.currentIteration=currentIteration,tracked.iterationProgress=(alternate&¤tIteration%2?!reversed:reversed)?1-currentIterationProgress:currentIterationProgress),cleanup||noop}};var Clock=class{constructor(initTime=0){this.deltaTime=0,this._currentTime=initTime,this._elapsedTime=initTime,this._startTime=initTime,this._lastTime=initTime,this._scheduledTime=0,this._frameDuration=round(K/maxFps,0),this._fps=maxFps,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(frameRate){let previousFrameDuration=this._frameDuration,fr=+frameRate,fps=fr{let parent=tickable.parent,duration$2=tickable.duration,completed=tickable.completed,iterationDuration=tickable.iterationDuration,iterationCount=tickable.iterationCount,_currentIteration=tickable._currentIteration,_loopDelay=tickable._loopDelay,_reversed=tickable._reversed,_alternate=tickable._alternate,_hasChildren=tickable._hasChildren,tickableDelay=tickable._delay,tickablePrevAbsoluteTime=tickable._currentTime,tickableEndTime=tickableDelay+iterationDuration,tickableAbsoluteTime=time$2-tickableDelay,tickablePrevTime=clamp(tickablePrevAbsoluteTime,-tickableDelay,duration$2),tickableCurrentTime=clamp(tickableAbsoluteTime,-tickableDelay,duration$2),deltaTime=tickableAbsoluteTime-tickablePrevAbsoluteTime,isCurrentTimeAboveZero=tickableCurrentTime>0,isCurrentTimeEqualOrAboveDuration=tickableCurrentTime>=duration$2,isSetter=duration$2<=minValue,forcedTick=tickMode===tickModes.FORCE,isOdd=0,iterationElapsedTime=tickableAbsoluteTime,hasRendered=0;if(iterationCount>1){let currentIteration=~~(tickableCurrentTime/(iterationDuration+(isCurrentTimeEqualOrAboveDuration?0:_loopDelay)));tickable._currentIteration=clamp(currentIteration,0,iterationCount),isCurrentTimeEqualOrAboveDuration&&tickable._currentIteration--,isOdd=tickable._currentIteration%2,iterationElapsedTime=tickableCurrentTime%(iterationDuration+_loopDelay)||0}let isReversed=_reversed^(_alternate&&isOdd),_ease=tickable._ease,iterationTime=isCurrentTimeEqualOrAboveDuration?isReversed?0:duration$2:isReversed?iterationDuration-iterationElapsedTime:iterationElapsedTime;_ease&&(iterationTime=iterationDuration*_ease(iterationTime/iterationDuration)||0);let isRunningBackwards=(parent?parent.backwards:tickableAbsoluteTime=tickableDelay&&time$2<=tickableEndTime||time$2<=tickableDelay&&tickablePrevTime>tickableDelay||time$2>=tickableEndTime&&tickablePrevTime!==duration$2)||iterationTime>=tickableEndTime&&tickablePrevTime!==duration$2||iterationTime<=tickableDelay&&tickablePrevTime>0||time$2<=tickablePrevTime&&tickablePrevTime===duration$2&&completed||isCurrentTimeEqualOrAboveDuration&&!completed&&isSetter){if(isCurrentTimeAboveZero&&(tickable.computeDeltaTime(tickablePrevTime),muteCallbacks||tickable.onBeforeUpdate(tickable)),!_hasChildren){let forcedRender=forcedTick||(isRunningBackwards?deltaTime*-1:deltaTime)>=globals.tickThreshold,absoluteTime=tickable._offset+(parent?parent._offset:0)+tickableDelay+iterationTime,tween=tickable._head,tweenTarget,tweenStyle,tweenTargetTransforms,tweenTargetTransformsProperties,tweenTransformsNeedUpdate=0;for(;tween;){let tweenComposition=tween._composition,tweenCurrentTime=tween._currentTime,tweenChangeDuration=tween._changeDuration,tweenAbsEndTime=tween._absoluteStartTime+tween._changeDuration,tweenNextRep=tween._nextRep,tweenPrevRep=tween._prevRep,tweenHasComposition=tweenComposition!==compositionTypes.none;if((forcedRender||(tweenCurrentTime!==tweenChangeDuration||absoluteTime<=tweenAbsEndTime+(tweenNextRep?tweenNextRep._delay:0))&&(tweenCurrentTime!==0||absoluteTime>=tween._absoluteStartTime))&&(!tweenHasComposition||!tween._isOverridden&&(!tween._isOverlapped||absoluteTime<=tweenAbsEndTime)&&(!tweenNextRep||tweenNextRep._isOverridden||absoluteTime<=tweenNextRep._absoluteStartTime)&&(!tweenPrevRep||tweenPrevRep._isOverridden||absoluteTime>=tweenPrevRep._absoluteStartTime+tweenPrevRep._changeDuration+tween._delay))){let tweenNewTime=tween._currentTime=clamp(iterationTime-tween._startTime,0,tweenChangeDuration),tweenProgress=tween._ease(tweenNewTime/tween._updateDuration),tweenModifier=tween._modifier,tweenValueType=tween._valueType,tweenType=tween._tweenType,tweenIsObject=tweenType===tweenTypes.OBJECT,tweenIsNumber=tweenValueType===valueTypes.NUMBER,tweenPrecision=tweenIsNumber&&tweenIsObject||tweenProgress===0||tweenProgress===1?-1:globals.precision,value$1,number$5;if(tweenIsNumber)value$1=number$5=tweenModifier(round(interpolate(tween._fromNumber,tween._toNumber,tweenProgress),tweenPrecision));else if(tweenValueType===valueTypes.UNIT)number$5=tweenModifier(round(interpolate(tween._fromNumber,tween._toNumber,tweenProgress),tweenPrecision)),value$1=`${number$5}${tween._unit}`;else if(tweenValueType===valueTypes.COLOR){let fn$5=tween._fromNumbers,tn$1=tween._toNumbers,r$1=round(clamp(tweenModifier(interpolate(fn$5[0],tn$1[0],tweenProgress)),0,255),0),g=round(clamp(tweenModifier(interpolate(fn$5[1],tn$1[1],tweenProgress)),0,255),0),b$1=round(clamp(tweenModifier(interpolate(fn$5[2],tn$1[2],tweenProgress)),0,255),0),a$1=clamp(tweenModifier(round(interpolate(fn$5[3],tn$1[3],tweenProgress),tweenPrecision)),0,1);if(value$1=`rgba(${r$1},${g},${b$1},${a$1})`,tweenHasComposition){let ns=tween._numbers;ns[0]=r$1,ns[1]=g,ns[2]=b$1,ns[3]=a$1}}else if(tweenValueType===valueTypes.COMPLEX){value$1=tween._strings[0];for(let j$1=0,l=tween._toNumbers.length;j$1=duration$2&&!completed||isRunningBackwards&&tickableAbsoluteTime<=minValue&&completed)&&(tickable.onComplete(tickable),tickable.completed=!isRunningBackwards):isCurrentTimeAboveZero&&isCurrentTimeEqualOrAboveDuration?iterationCount===1/0?tickable._startTime+=tickable.duration:tickable._currentIteration>=iterationCount-1&&(tickable.paused=!0,!completed&&!_hasChildren&&(tickable.completed=!0,!muteCallbacks&&!(parent&&(isRunningBackwards||!parent.began))&&(tickable.onComplete(tickable),tickable._resolve(tickable)))):tickable.completed=!1,hasRendered},tick=(tickable,time$2,muteCallbacks,internalRender,tickMode)=>{let _currentIteration=tickable._currentIteration;if(render(tickable,time$2,muteCallbacks,internalRender,tickMode),tickable._hasChildren){let tl=tickable,tlIsRunningBackwards=tl.backwards,tlChildrenTime=internalRender?time$2:tl._iterationTime,tlCildrenTickTime=now(),tlChildrenHasRendered=0,tlChildrenHaveCompleted=!0;if(!internalRender&&tl._currentIteration!==_currentIteration){let tlIterationDuration=tl.iterationDuration;forEachChildren(tl,child=>{if(!tlIsRunningBackwards)!child.completed&&!child.backwards&&child._currentTime{let childTime=round((tlChildrenTime-child._offset)*child._speed,12),childTickMode=child._fps=tl.duration&&(tl.paused=!0,tl.completed||(tl.completed=!0,muteCallbacks||(tl.onComplete(tl),tl._resolve(tl))))}},additive={animation:null,update:noop},addAdditiveAnimation=lookups$1=>{let animation=additive.animation;return animation||(animation={duration:minValue,computeDeltaTime:noop,_offset:0,_delay:0,_head:null,_tail:null},additive.animation=animation,additive.update=()=>{lookups$1.forEach(propertyAnimation=>{for(let propertyName in propertyAnimation){let tweens=propertyAnimation[propertyName],lookupTween=tweens._head;if(lookupTween){let valueType=lookupTween._valueType,additiveValues=valueType===valueTypes.COMPLEX||valueType===valueTypes.COLOR?cloneArray(lookupTween._fromNumbers):null,additiveValue=lookupTween._fromNumber,tween=tweens._tail;for(;tween&&tween!==lookupTween;){if(additiveValues)for(let i=0,l=tween._numbers.length;iisBrowser?requestAnimationFrame:setImmediate)(),engineCancelMethod=(()=>isBrowser?cancelAnimationFrame:clearImmediate)();var Engine=class extends Clock{constructor(initTime){super(initTime),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=defaults,this.paused=!!(isBrowser&&doc.hidden),this.reqId=null}update(){let time$2=this._currentTime=now();if(this.requestTick(time$2)){this.computeDeltaTime(time$2);let engineSpeed=this._speed,engineFps=this._fps,activeTickable=this._head;for(;activeTickable;){let nextTickable=activeTickable._next;activeTickable.paused?(removeChild(this,activeTickable),this._hasChildren=!!this._tail,activeTickable._running=!1,activeTickable.completed&&!activeTickable._cancelled&&activeTickable.cancel()):tick(activeTickable,(time$2-activeTickable._startTime)*activeTickable._speed*engineSpeed,0,0,activeTickable._fpschild.resetTime()),this.wake()}get speed(){return this._speed*(globals.timeScale===1?1:K)}set speed(playbackRate){this._speed=playbackRate*globals.timeScale,forEachChildren(this,child=>child.speed=child._speed)}get timeUnit(){return globals.timeScale===1?`ms`:`s`}set timeUnit(unit){let secondsScale=.001,isSecond=unit===`s`,newScale=isSecond?secondsScale:1;if(globals.timeScale!==newScale){globals.timeScale=newScale,globals.tickThreshold=200*newScale;let scaleFactor=isSecond?secondsScale:K;this.defaults.duration*=scaleFactor,this._speed*=scaleFactor}}get precision(){return globals.precision}set precision(precision){globals.precision=precision}};const engine=(()=>{let engine$1=new Engine(now());return isBrowser&&(globalVersions.engine=engine$1,doc.addEventListener(`visibilitychange`,()=>{engine$1.pauseOnDocumentHidden&&(doc.hidden?engine$1.pause():engine$1.resume())})),engine$1})(),tickEngine=()=>{engine._head?(engine.reqId=engineTickMethod(tickEngine),engine.update()):engine.reqId=0},killEngine=()=>(engineCancelMethod(engine.reqId),engine.reqId=0,engine),parseInlineTransforms=(target$1,propName,animationInlineStyles)=>{let inlineTransforms=target$1.style.transform,inlinedStylesPropertyValue;if(inlineTransforms){let cachedTransforms=target$1[transformsSymbol],t$1;for(;t$1=transformsExecRgx.exec(inlineTransforms);){let inlinePropertyName=t$1[1],inlinePropertyValue=t$1[2].slice(1,-1);cachedTransforms[inlinePropertyName]=inlinePropertyValue,inlinePropertyName===propName&&(inlinedStylesPropertyValue=inlinePropertyValue,animationInlineStyles&&(animationInlineStyles[propName]=inlinePropertyValue))}}return inlineTransforms&&!isUnd(inlinedStylesPropertyValue)?inlinedStylesPropertyValue:stringStartsWith(propName,`scale`)?`1`:stringStartsWith(propName,`rotate`)||stringStartsWith(propName,`skew`)?`0deg`:`0px`};function getNodeList(v){let n=isStr(v)?scope.root.querySelectorAll(v):v;if(n instanceof NodeList||n instanceof HTMLCollection)return n}function parseTargets(targets){if(isNil(targets))return[];if(isArr(targets)){let flattened=targets.flat(1/0),parsed=[];for(let i=0,l=flattened.length;i{if(cssReservedProperties.includes(propertyName))return!1;if(el.getAttribute(propertyName)||propertyName in el){if(propertyName===`scale`){let elParentNode=el.parentNode;return elParentNode&&elParentNode.tagName===`filter`}return!0}},rgbToRgba=rgbValue=>{let rgba$1=rgbExecRgx.exec(rgbValue)||rgbaExecRgx.exec(rgbValue),a$1=isUnd(rgba$1[4])?1:+rgba$1[4];return[+rgba$1[1],+rgba$1[2],+rgba$1[3],a$1]},hexToRgba=hexValue=>{let hexLength=hexValue.length,isShort=hexLength===4||hexLength===5;return[+(`0x`+hexValue[1]+hexValue[isShort?1:2]),+(`0x`+hexValue[isShort?2:3]+hexValue[isShort?2:4]),+(`0x`+hexValue[isShort?3:5]+hexValue[isShort?3:6]),hexLength===5||hexLength===9?+((`0x`+hexValue[isShort?4:7]+hexValue[isShort?4:8])/255).toFixed(3):1]},hue2rgb=(p$4,q,t$1)=>(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),hslToRgba=hslValue=>{let hsla$1=hslExecRgx.exec(hslValue)||hslaExecRgx.exec(hslValue),h$1=hsla$1[1]/360,s=hsla$1[2]/100,l=hsla$1[3]/100,a$1=isUnd(hsla$1[4])?1:+hsla$1[4],r$1,g,b$1;if(s===0)r$1=g=b$1=l;else{let q=l<.5?l*(1+s):l+s-l*s,p$4=2*l-q;r$1=round(hue2rgb(p$4,q,h$1+1/3)*255,0),g=round(hue2rgb(p$4,q,h$1)*255,0),b$1=round(hue2rgb(p$4,q,h$1-1/3)*255,0)}return[r$1,g,b$1,a$1]},convertColorStringValuesToRgbaArray=colorString=>isRgb(colorString)?rgbToRgba(colorString):isHex(colorString)?hexToRgba(colorString):isHsl(colorString)?hslToRgba(colorString):[0,0,0,1],setValue=(targetValue,defaultValue)=>isUnd(targetValue)?defaultValue:targetValue,getFunctionValue=(value$1,target$1,index$1,total,store)=>{if(isFnc(value$1)){let func=()=>{let computed$2=value$1(target$1,index$1,total);return isNaN(+computed$2)?computed$2||0:+computed$2};return store&&(store.func=func),func()}else return value$1},getTweenType=(target$1,prop)=>target$1[isDomSymbol]?target$1[isSvgSymbol]&&isValidSVGAttribute(target$1,prop)?tweenTypes.ATTRIBUTE:validTransforms.includes(prop)||shortTransforms.get(prop)?tweenTypes.TRANSFORM:stringStartsWith(prop,`--`)?tweenTypes.CSS_VAR:prop in target$1.style?tweenTypes.CSS:prop in target$1?tweenTypes.OBJECT:tweenTypes.ATTRIBUTE:tweenTypes.OBJECT,getCSSValue=(target$1,propName,animationInlineStyles)=>{let inlineStyles=target$1.style[propName];inlineStyles&&animationInlineStyles&&(animationInlineStyles[propName]=inlineStyles);let value$1=inlineStyles||getComputedStyle(target$1[proxyTargetSymbol]||target$1).getPropertyValue(propName);return value$1===`auto`?`0`:value$1},getOriginalAnimatableValue=(target$1,propName,tweenType,animationInlineStyles)=>{let type=isUnd(tweenType)?getTweenType(target$1,propName):tweenType;return type===tweenTypes.OBJECT?target$1[propName]||0:type===tweenTypes.ATTRIBUTE?target$1.getAttribute(propName):type===tweenTypes.TRANSFORM?parseInlineTransforms(target$1,propName,animationInlineStyles):type===tweenTypes.CSS_VAR?getCSSValue(target$1,propName,animationInlineStyles).trimStart():getCSSValue(target$1,propName,animationInlineStyles)},getRelativeValue=(x$1,y,operator)=>operator===`-`?x$1-y:operator===`+`?x$1+y:x$1*y,createDecomposedValueTargetObject=()=>({t:valueTypes.NUMBER,n:0,u:null,o:null,d:null,s:null}),decomposeRawValue=(rawValue,targetObject)=>{if(targetObject.t=valueTypes.NUMBER,targetObject.n=0,targetObject.u=null,targetObject.o=null,targetObject.d=null,targetObject.s=null,!rawValue)return targetObject;let num$2=+rawValue;if(isNaN(num$2)){let str=rawValue;str[1]===`=`&&(targetObject.o=str[0],str=str.slice(2));let unitMatch=str.includes(` `)?!1:unitsExecRgx.exec(str);if(unitMatch)return targetObject.t=valueTypes.UNIT,targetObject.n=+unitMatch[1],targetObject.u=unitMatch[2],targetObject;if(targetObject.o)return targetObject.n=+str,targetObject;if(isCol(str))return targetObject.t=valueTypes.COLOR,targetObject.d=convertColorStringValuesToRgbaArray(str),targetObject;{let matchedNumbers=str.match(digitWithExponentRgx);return targetObject.t=valueTypes.COMPLEX,targetObject.d=matchedNumbers?matchedNumbers.map(Number):[],targetObject.s=str.split(digitWithExponentRgx)||[],targetObject}}else return targetObject.n=num$2,targetObject},decomposeTweenValue=(tween,targetObject)=>(targetObject.t=tween._valueType,targetObject.n=tween._toNumber,targetObject.u=tween._unit,targetObject.o=null,targetObject.d=cloneArray(tween._toNumbers),targetObject.s=cloneArray(tween._strings),targetObject),decomposedOriginalValue=createDecomposedValueTargetObject(),lookups={_rep:new WeakMap,_add:new Map},getTweenSiblings=(target$1,property,lookup=`_rep`)=>{let lookupMap=lookups[lookup],targetLookup=lookupMap.get(target$1);return targetLookup||(targetLookup={},lookupMap.set(target$1,targetLookup)),targetLookup[property]?targetLookup[property]:targetLookup[property]={_head:null,_tail:null}},addTweenSortMethod=(p$4,c$3)=>p$4._isOverridden||p$4._absoluteStartTime>c$3._absoluteStartTime,overrideTween=tween=>{tween._isOverlapped=1,tween._isOverridden=1,tween._changeDuration=minValue,tween._currentTime=minValue},composeTween=(tween,siblings$2)=>{let tweenCompositionType=tween._composition;if(tweenCompositionType===compositionTypes.replace){let tweenAbsStartTime=tween._absoluteStartTime;addChild(siblings$2,tween,addTweenSortMethod,`_prevRep`,`_nextRep`);let prevSibling=tween._prevRep;if(prevSibling){let prevParent=prevSibling.parent,prevAbsEndTime=prevSibling._absoluteStartTime+prevSibling._changeDuration;if(tween.parent.id!==prevParent.id&&prevParent.iterationCount>1&&prevAbsEndTime+(prevParent.duration-prevParent.iterationDuration)>tweenAbsStartTime){overrideTween(prevSibling);let prevPrevSibling=prevSibling._prevRep;for(;prevPrevSibling&&prevPrevSibling.parent.id===prevParent.id;)overrideTween(prevPrevSibling),prevPrevSibling=prevPrevSibling._prevRep}let absoluteUpdateStartTime=tweenAbsStartTime-tween._delay;if(prevAbsEndTime>absoluteUpdateStartTime){let prevChangeStartTime=prevSibling._startTime,prevTLOffset=prevAbsEndTime-(prevChangeStartTime+prevSibling._updateDuration);prevSibling._changeDuration=absoluteUpdateStartTime-prevTLOffset-prevChangeStartTime,prevSibling._currentTime=prevSibling._changeDuration,prevSibling._isOverlapped=1,prevSibling._changeDuration{t$1._isOverlapped||(pausePrevParentAnimation=!1)}),pausePrevParentAnimation){let prevParentTL=prevParent.parent;if(prevParentTL){let pausePrevParentTL=!0;forEachChildren(prevParentTL,a$1=>{a$1!==prevParent&&forEachChildren(a$1,t$1=>{t$1._isOverlapped||(pausePrevParentTL=!1)})}),pausePrevParentTL&&prevParentTL.cancel()}else prevParent.cancel()}}}else if(tweenCompositionType===compositionTypes.blend){let additiveTweenSiblings=getTweenSiblings(tween.target,tween.property,`_add`),additiveAnimation=addAdditiveAnimation(lookups._add),lookupTween=additiveTweenSiblings._head;lookupTween||(lookupTween={...tween},lookupTween._composition=compositionTypes.replace,lookupTween._updateDuration=minValue,lookupTween._startTime=0,lookupTween._numbers=cloneArray(tween._fromNumbers),lookupTween._number=0,lookupTween._next=null,lookupTween._prev=null,addChild(additiveTweenSiblings,lookupTween),addChild(additiveAnimation,lookupTween));let toNumber$1=tween._toNumber;if(tween._fromNumber=lookupTween._fromNumber-toNumber$1,tween._toNumber=0,tween._numbers=cloneArray(tween._fromNumbers),tween._number=0,lookupTween._fromNumber=toNumber$1,tween._toNumbers){let toNumbers=cloneArray(tween._toNumbers);toNumbers&&toNumbers.forEach((value$1,i)=>{tween._fromNumbers[i]=lookupTween._fromNumbers[i]-value$1,tween._toNumbers[i]=0}),lookupTween._fromNumbers=toNumbers}addChild(additiveTweenSiblings,tween,null,`_prevAdd`,`_nextAdd`)}return tween},removeTweenSliblings=tween=>{let tweenComposition=tween._composition;if(tweenComposition!==compositionTypes.none){let tweenTarget=tween.target,tweenProperty=tween.property,replaceTweensLookup=lookups._rep,replaceTargetProps=replaceTweensLookup.get(tweenTarget),tweenReplaceSiblings=replaceTargetProps[tweenProperty];if(removeChild(tweenReplaceSiblings,tween,`_prevRep`,`_nextRep`),tweenComposition===compositionTypes.blend){let addTweensLookup=lookups._add,addTargetProps=addTweensLookup.get(tweenTarget);if(!addTargetProps)return;let additiveTweenSiblings=addTargetProps[tweenProperty],additiveAnimation=additive.animation;removeChild(additiveTweenSiblings,tween,`_prevAdd`,`_nextAdd`);let lookupTween=additiveTweenSiblings._head;if(lookupTween&&lookupTween===additiveTweenSiblings._tail){removeChild(additiveTweenSiblings,lookupTween,`_prevAdd`,`_nextAdd`),removeChild(additiveAnimation,lookupTween);let shouldClean=!0;for(let prop in addTargetProps)if(addTargetProps[prop]._head){shouldClean=!1;break}shouldClean&&addTweensLookup.delete(tweenTarget)}}}return tween},resetTimerProperties=timer=>(timer.paused=!0,timer.began=!1,timer.completed=!1,timer),reviveTimer=timer=>timer._cancelled?(timer._hasChildren?forEachChildren(timer,reviveTimer):forEachChildren(timer,tween=>{tween._composition!==compositionTypes.none&&composeTween(tween,getTweenSiblings(tween.target,tween.property))}),timer._cancelled=0,timer):timer;let timerId=0;var Timer=class extends Clock{constructor(parameters={},parent=null,parentPosition=0){super(0);let{id,delay,duration:duration$2,reversed,alternate,loop,loopDelay,autoplay,frameRate,playbackRate,onComplete,onLoop,onPause,onBegin,onBeforeUpdate:onBeforeUpdate$1,onUpdate}=parameters;scope.current&&scope.current.register(this);let timerInitTime=parent?0:engine._elapsedTime,timerDefaults=parent?parent.defaults:globals.defaults,timerDelay=isFnc(delay)||isUnd(delay)?timerDefaults.delay:+delay,timerDuration=isFnc(duration$2)||isUnd(duration$2)?1/0:+duration$2,timerLoop=setValue(loop,timerDefaults.loop),timerLoopDelay=setValue(loopDelay,timerDefaults.loopDelay),timerIterationCount=timerLoop===!0||timerLoop===1/0||timerLoop<0?1/0:timerLoop+1,offsetPosition=0;if(parent)offsetPosition=parentPosition;else{let startTime=now();engine.paused&&(engine.requestTick(startTime),startTime=engine._elapsedTime),offsetPosition=startTime-engine._startTime}this.id=isUnd(id)?++timerId:id,this.parent=parent,this.duration=clampInfinity((timerDuration+timerLoopDelay)*timerIterationCount-timerLoopDelay)||minValue,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=onBegin||timerDefaults.onBegin,this.onBeforeUpdate=onBeforeUpdate$1||timerDefaults.onBeforeUpdate,this.onUpdate=onUpdate||timerDefaults.onUpdate,this.onLoop=onLoop||timerDefaults.onLoop,this.onPause=onPause||timerDefaults.onPause,this.onComplete=onComplete||timerDefaults.onComplete,this.iterationDuration=timerDuration,this.iterationCount=timerIterationCount,this._autoplay=parent?!1:setValue(autoplay,timerDefaults.autoplay),this._offset=offsetPosition,this._delay=timerDelay,this._loopDelay=timerLoopDelay,this._iterationTime=0,this._currentIteration=0,this._resolve=noop,this._running=!1,this._reversed=+setValue(reversed,timerDefaults.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=setValue(alternate,timerDefaults.alternate),this._prev=null,this._next=null,this._elapsedTime=timerInitTime,this._startTime=timerInitTime,this._lastTime=timerInitTime,this._fps=setValue(frameRate,timerDefaults.frameRate),this._speed=setValue(playbackRate,timerDefaults.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(cancelled){cancelled?this.cancel():this.reset(1).play()}get currentTime(){return clamp(round(this._currentTime,globals.precision),-this._delay,this.duration)}set currentTime(time$2){let paused=this.paused;this.pause().seek(+time$2),paused||this.resume()}get iterationCurrentTime(){return round(this._iterationTime,globals.precision)}set iterationCurrentTime(time$2){this.currentTime=this.iterationDuration*this._currentIteration+time$2}get progress(){return clamp(round(this._currentTime/this.duration,10),0,1)}set progress(progress$1){this.currentTime=this.duration*progress$1}get iterationProgress(){return clamp(round(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(progress$1){let iterationDuration=this.iterationDuration;this.currentTime=iterationDuration*this._currentIteration+iterationDuration*progress$1}get currentIteration(){return this._currentIteration}set currentIteration(iterationCount){this.currentTime=this.iterationDuration*clamp(+iterationCount,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(reverse){reverse?this.reverse():this.play()}get speed(){return super.speed}set speed(playbackRate){super.speed=playbackRate,this.resetTime()}reset(internalRender=0){return reviveTimer(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,tick(this,0,1,internalRender,tickModes.FORCE),resetTimerProperties(this),this._hasChildren&&forEachChildren(this,resetTimerProperties),this}init(internalRender=0){this.fps=this._fps,this.speed=this._speed,!internalRender&&this._hasChildren&&tick(this,this.duration,1,internalRender,tickModes.FORCE),this.reset(internalRender);let autoplay=this._autoplay;return autoplay===!0?this.resume():autoplay&&!isUnd(autoplay.linked)&&autoplay.link(this),this}resetTime(){let timeScale=1/(this._speed*engine._speed);return this._startTime=now()-(this._currentTime+this._delay)*timeScale,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=minValue&&!this._hasChildren?tick(this,minValue,0,0,tickModes.FORCE):(this._running||(addChild(engine,this),engine._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,engine.wake()),this):this}restart(){return this.reset(0).resume()}seek(time$2,muteCallbacks=0,internalRender=0){reviveTimer(this),this.completed=!1;let isPaused=this.paused;return this.paused=!0,tick(this,time$2+this._delay,~~muteCallbacks,~~internalRender,tickModes.AUTO),isPaused?this:this.resume()}alternate(){let reversed=this._reversed,count$2=this.iterationCount,duration$2=this.iterationDuration,iterations=count$2===1/0?floor(maxValue/duration$2):count$2;return this._reversed=+(this._alternate&&!(iterations%2)?reversed:!reversed),count$2===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(duration$2*iterations-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?forEachChildren(this,child=>child.cancel(),!0):forEachChildren(this,removeTweenSliblings),this._cancelled=1,this.pause()}stretch(newDuration){let currentDuration=this.duration,normlizedDuration=normalizeTime(newDuration);if(currentDuration===normlizedDuration)return this;let timeScale=newDuration/currentDuration,isSetter=newDuration<=minValue;return this.duration=isSetter?minValue:normlizedDuration,this.iterationDuration=isSetter?minValue:normalizeTime(this.iterationDuration*timeScale),this._offset*=timeScale,this._delay*=timeScale,this._loopDelay*=timeScale,this}revert(){tick(this,0,1,0,tickModes.AUTO);let ap=this._autoplay;return ap&&ap.linked&&ap.linked===this&&ap.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(callback=noop){let then=this.then,onResolve=()=>{this.then=null,callback(this),this.then=then,this._resolve=noop};return new Promise(r$1=>(this._resolve=()=>r$1(onResolve()),this.completed&&this._resolve(),this))}};const none=t$1=>t$1,calcBezier=(aT,aA1,aA2)=>(((1-3*aA2+3*aA1)*aT+(3*aA2-6*aA1))*aT+3*aA1)*aT,binarySubdivide=(aX,mX1,mX2)=>{let aA=0,aB=1,currentX,currentT,i=0;do currentT=aA+(aB-aA)/2,currentX=calcBezier(currentT,mX1,mX2)-aX,currentX>0?aB=currentT:aA=currentT;while(abs(currentX)>1e-7&&++i<100);return currentT},cubicBezier=(mX1=.5,mY1=0,mX2=.5,mY2=1)=>mX1===mY1&&mX2===mY2?none:t$1=>t$1===0||t$1===1?t$1:calcBezier(binarySubdivide(t$1,mX1,mX2),mY1,mY2),steps=(steps$2=10,fromStart)=>{let roundMethod=fromStart?ceil:floor;return t$1=>roundMethod(clamp(t$1,0,1)*steps$2)*(1/steps$2)},linear=(...args)=>{let argsLength=args.length;if(!argsLength)return none;let totalPoints=argsLength-1,firstArg=args[0],lastArg=args[totalPoints],xPoints=[0],yPoints=[parseNumber(firstArg)];for(let i=1;i{let values=[0],total=length-1;for(let i=1;it$1=>pow(t$1,+p$4),easeInFunctions={[emptyString]:easeInPower,Quad:easeInPower(2),Cubic:easeInPower(3),Quart:easeInPower(4),Quint:easeInPower(5),Sine:t$1=>1-cos(t$1*halfPI),Circ:t$1=>1-sqrt(1-t$1*t$1),Expo:t$1=>t$1?pow(2,10*t$1-10):0,Bounce:t$1=>{let pow2,b$1=4;for(;t$1<((pow2=pow(2,--b$1))-1)/11;);return 1/pow(4,3-b$1)-7.5625*pow((pow2*3-2)/22-t$1,2)},Back:(overshoot=1.70158)=>t$1=>(+overshoot+1)*t$1*t$1*t$1-+overshoot*t$1*t$1,Elastic:(amplitude=1,period=.3)=>{let a$1=clamp(+amplitude,1,10),p$4=clamp(+period,minValue,2),s=p$4/doublePI*asin(1/a$1),e$4=doublePI/p$4;return t$1=>t$1===0||t$1===1?t$1:-a$1*pow(2,-10*(1-t$1))*sin((1-t$1-s)*e$4)}},easeTypes={in:easeIn$1=>t$1=>easeIn$1(t$1),out:easeIn$1=>t$1=>1-easeIn$1(1-t$1),inOut:easeIn$1=>t$1=>t$1<.5?easeIn$1(t$1*2)/2:1-easeIn$1(t$1*-2+2)/2,outIn:easeIn$1=>t$1=>t$1<.5?(1-easeIn$1(1-t$1*2))/2:(easeIn$1(t$1*2-1)+1)/2},parseEaseString=(string$4,easesFunctions,easesLookups)=>{if(easesLookups[string$4])return easesLookups[string$4];if(string$4.indexOf(`(`)<=-1){let hasParams=easeTypes[string$4]||string$4.includes(`Back`)||string$4.includes(`Elastic`),parsedFn=hasParams?easesFunctions[string$4]():easesFunctions[string$4];return parsedFn?easesLookups[string$4]=parsedFn:none}else{let split=string$4.slice(0,-1).split(`(`),parsedFn=easesFunctions[split[0]];return parsedFn?easesLookups[string$4]=parsedFn(...split[1].split(`,`)):none}},eases=(()=>{let list$2={linear,irregular,steps,cubicBezier};for(let type in easeTypes)for(let name$2 in easeInFunctions){let easeIn$1=easeInFunctions[name$2],easeType=easeTypes[type];list$2[type+name$2]=name$2===emptyString||name$2===`Back`||name$2===`Elastic`?(a$1,b$1)=>easeType(easeIn$1(a$1,b$1)):easeType(easeIn$1)}return list$2})(),JSEasesLookups={linear:none},parseEasings=ease=>isFnc(ease)?ease:isStr(ease)?parseEaseString(ease,eases,JSEasesLookups):none,propertyNamesCache={},sanitizePropertyName=(propertyName,target$1,tweenType)=>{if(tweenType===tweenTypes.TRANSFORM){let t$1=shortTransforms.get(propertyName);return t$1||propertyName}else if(tweenType===tweenTypes.CSS||tweenType===tweenTypes.ATTRIBUTE&&isSvg(target$1)&&propertyName in target$1.style){let cachedPropertyName=propertyNamesCache[propertyName];if(cachedPropertyName)return cachedPropertyName;{let lowerCaseName=propertyName&&toLowerCase(propertyName);return propertyNamesCache[propertyName]=lowerCaseName,lowerCaseName}}else return propertyName},angleUnitsMap={deg:1,rad:180/PI,turn:360},convertedValuesCache={},convertValueUnit=(el,decomposedValue,unit,force=!1)=>{let currentUnit=decomposedValue.u,currentNumber=decomposedValue.n;if(decomposedValue.t===valueTypes.UNIT&¤tUnit===unit)return decomposedValue;let cachedKey=currentNumber+currentUnit+unit,cached$1=convertedValuesCache[cachedKey];if(!isUnd(cached$1)&&!force)decomposedValue.n=cached$1;else{let convertedValue;if(currentUnit in angleUnitsMap)convertedValue=currentNumber*angleUnitsMap[currentUnit]/angleUnitsMap[unit];else{let baseline=100,tempEl=el.cloneNode(),parentNode=el.parentNode,parentEl=parentNode&&parentNode!==doc?parentNode:doc.body;parentEl.appendChild(tempEl);let elStyle=tempEl.style;elStyle.width=baseline+currentUnit;let currentUnitWidth=tempEl.offsetWidth||baseline;elStyle.width=baseline+unit;let newUnitWidth=tempEl.offsetWidth||baseline,factor$1=currentUnitWidth/newUnitWidth;parentEl.removeChild(tempEl),convertedValue=factor$1*currentNumber}decomposedValue.n=convertedValue,convertedValuesCache[cachedKey]=convertedValue}return decomposedValue.t,valueTypes.UNIT,decomposedValue.u=unit,decomposedValue},cleanInlineStyles=renderable=>{if(renderable._hasChildren)forEachChildren(renderable,cleanInlineStyles,!0);else{let animation=renderable;animation.pause(),forEachChildren(animation,tween=>{let tweenProperty=tween.property,tweenTarget=tween.target;if(tweenTarget[isDomSymbol]){let targetStyle=tweenTarget.style,originalInlinedValue=animation._inlineStyles[tweenProperty];if(tween._tweenType===tweenTypes.TRANSFORM){let cachedTransforms=tweenTarget[transformsSymbol];if(isUnd(originalInlinedValue)||originalInlinedValue===emptyString?delete cachedTransforms[tweenProperty]:cachedTransforms[tweenProperty]=originalInlinedValue,tween._renderTransforms)if(!Object.keys(cachedTransforms).length)targetStyle.removeProperty(`transform`);else{let str=emptyString;for(let key$2 in cachedTransforms)str+=transformsFragmentStrings[key$2]+cachedTransforms[key$2]+`) `;targetStyle.transform=str}}else isUnd(originalInlinedValue)||originalInlinedValue===emptyString?targetStyle.removeProperty(tweenProperty):targetStyle[tweenProperty]=originalInlinedValue;animation._tail===tween&&animation.targets.forEach(t$1=>{t$1.getAttribute&&t$1.getAttribute(`style`)===emptyString&&t$1.removeAttribute(`style`)})}})}return renderable},fromTargetObject=createDecomposedValueTargetObject(),toTargetObject=createDecomposedValueTargetObject(),toFunctionStore={func:null},keyframesTargetArray=[null],fastSetValuesArray=[null,null],keyObjectTarget={to:null};let tweenId=0,keyframes,key;const generateKeyframes=(keyframes$4,parameters)=>{let properties={};if(isArr(keyframes$4)){let propertyNames=[].concat(...keyframes$4.map(key$2=>Object.keys(key$2))).filter(isKey);for(let i=0,l=propertyNames.length;i{let newKey={};for(let p$4 in key$2){let keyValue=key$2[p$4];isKey(p$4)?p$4===propName&&(newKey.to=keyValue):newKey[p$4]=keyValue}return newKey});properties[propName]=propArray}}else{let totalDuration=setValue(parameters.duration,globals.defaults.duration),keys$3=Object.keys(keyframes$4).map(key$2=>({o:parseFloat(key$2)/100,p:keyframes$4[key$2]})).sort((a$1,b$1)=>a$1.o-b$1.o);for(let name$2 in keys$3.forEach(key$2=>{let offset$2=key$2.o,prop=key$2.p;for(let name$2 in prop)if(isKey(name$2)){let propArray=properties[name$2];propArray||=properties[name$2]=[];let duration$2=offset$2*totalDuration,length=propArray.length,prevKey=propArray[length-1],keyObj={to:prop[name$2]},durProgress=0;for(let i=0;i=K?compositionTypes.none:isUnd(composition)?animDefaults.composition:composition,animInlineStyles={},absoluteOffsetTime=this._offset+(parent?parent._offset:0),iterationDuration=NaN,iterationDelay=NaN,animationAnimationLength=0,shouldTriggerRender=0;for(let targetIndex=0;targetIndex2&&isNotObjectValue?(keyframes=[],propValue.forEach((v,i)=>{i?i===1?(fastSetValuesArray[1]=v,keyframes.push(fastSetValuesArray)):keyframes.push(v):fastSetValuesArray[0]=v})):keyframes=propValue}else keyframesTargetArray[0]=propValue,keyframes=keyframesTargetArray;let siblings$2=null,prevTween=null,firstTweenChangeStartTime=NaN,lastTweenChangeEndTime=0,tweenIndex=0;for(let l=keyframes.length;tweenIndex1?getFunctionValue(tDuration,target$1,ti,tl)/l:tDuration),target$1,ti,tl),tweenDelay=getFunctionValue(setValue(key.delay,tweenIndex?0:tDelay),target$1,ti,tl),computedComposition=getFunctionValue(setValue(key.composition,tComposition),target$1,ti,tl),tweenComposition=isNum(computedComposition)?computedComposition:compositionTypes[computedComposition],tweenModifier=key.modifier||tModifier,hasFromvalue=!isUnd(tweenFromValue),hasToValue=!isUnd(tweenToValue),isFromToArray=isArr(tweenToValue),isFromToValue=isFromToArray||hasFromvalue&&hasToValue,tweenStartTime=prevTween?lastTweenChangeEndTime+tweenDelay:tweenDelay,absoluteStartTime=absoluteOffsetTime+tweenStartTime;!shouldTriggerRender&&(hasFromvalue||isFromToArray)&&(shouldTriggerRender=1);let prevSibling=prevTween;if(tweenComposition!==compositionTypes.none){siblings$2||=getTweenSiblings(target$1,propName);let nextSibling=siblings$2._head;for(;nextSibling&&!nextSibling._isOverridden&&nextSibling._absoluteStartTime<=absoluteStartTime;)if(prevSibling=nextSibling,nextSibling=nextSibling._nextRep,nextSibling&&nextSibling._absoluteStartTime>=absoluteStartTime)for(;nextSibling;)overrideTween(nextSibling),nextSibling=nextSibling._nextRep}if(isFromToValue?(decomposeRawValue(isFromToArray?getFunctionValue(tweenToValue[0],target$1,ti,tl):tweenFromValue,fromTargetObject),decomposeRawValue(isFromToArray?getFunctionValue(tweenToValue[1],target$1,ti,tl,toFunctionStore):tweenToValue,toTargetObject),fromTargetObject.t===valueTypes.NUMBER&&(prevSibling?prevSibling._valueType===valueTypes.UNIT&&(fromTargetObject.t=valueTypes.UNIT,fromTargetObject.u=prevSibling._unit):(decomposeRawValue(getOriginalAnimatableValue(target$1,propName,tweenType,animInlineStyles),decomposedOriginalValue),decomposedOriginalValue.t===valueTypes.UNIT&&(fromTargetObject.t=valueTypes.UNIT,fromTargetObject.u=decomposedOriginalValue.u)))):(hasToValue?decomposeRawValue(tweenToValue,toTargetObject):prevTween?decomposeTweenValue(prevTween,toTargetObject):decomposeRawValue(parent&&prevSibling&&prevSibling.parent.parent===parent?prevSibling._value:getOriginalAnimatableValue(target$1,propName,tweenType,animInlineStyles),toTargetObject),hasFromvalue?decomposeRawValue(tweenFromValue,fromTargetObject):prevTween?decomposeTweenValue(prevTween,fromTargetObject):decomposeRawValue(parent&&prevSibling&&prevSibling.parent.parent===parent?prevSibling._value:getOriginalAnimatableValue(target$1,propName,tweenType,animInlineStyles),fromTargetObject)),fromTargetObject.o&&(fromTargetObject.n=getRelativeValue(prevSibling?prevSibling._toNumber:decomposeRawValue(getOriginalAnimatableValue(target$1,propName,tweenType,animInlineStyles),decomposedOriginalValue).n,fromTargetObject.n,fromTargetObject.o)),toTargetObject.o&&(toTargetObject.n=getRelativeValue(fromTargetObject.n,toTargetObject.n,toTargetObject.o)),fromTargetObject.t!==toTargetObject.t){if(fromTargetObject.t===valueTypes.COMPLEX||toTargetObject.t===valueTypes.COMPLEX){let complexValue=fromTargetObject.t===valueTypes.COMPLEX?fromTargetObject:toTargetObject,notComplexValue=fromTargetObject.t===valueTypes.COMPLEX?toTargetObject:fromTargetObject;notComplexValue.t=valueTypes.COMPLEX,notComplexValue.s=cloneArray(complexValue.s),notComplexValue.d=complexValue.d.map(()=>notComplexValue.n)}else if(fromTargetObject.t===valueTypes.UNIT||toTargetObject.t===valueTypes.UNIT){let unitValue=fromTargetObject.t===valueTypes.UNIT?fromTargetObject:toTargetObject,notUnitValue=fromTargetObject.t===valueTypes.UNIT?toTargetObject:fromTargetObject;notUnitValue.t=valueTypes.UNIT,notUnitValue.u=unitValue.u}else if(fromTargetObject.t===valueTypes.COLOR||toTargetObject.t===valueTypes.COLOR){let colorValue=fromTargetObject.t===valueTypes.COLOR?fromTargetObject:toTargetObject,notColorValue=fromTargetObject.t===valueTypes.COLOR?toTargetObject:fromTargetObject;notColorValue.t=valueTypes.COLOR,notColorValue.s=colorValue.s,notColorValue.d=[0,0,0,1]}}if(fromTargetObject.u!==toTargetObject.u){let valueToConvert=toTargetObject.u?fromTargetObject:toTargetObject;valueToConvert=convertValueUnit(target$1,valueToConvert,toTargetObject.u?toTargetObject.u:fromTargetObject.u,!1)}if(toTargetObject.d&&fromTargetObject.d&&toTargetObject.d.length!==fromTargetObject.d.length){let longestValue=fromTargetObject.d.length>toTargetObject.d.length?fromTargetObject:toTargetObject,shortestValue=longestValue===fromTargetObject?toTargetObject:fromTargetObject;shortestValue.d=longestValue.d.map((_$1,i)=>isUnd(shortestValue.d[i])?0:shortestValue.d[i]),shortestValue.s=cloneArray(longestValue.s)}let tweenUpdateDuration=round(+tweenDuration||minValue,12),tween={parent:this,id:tweenId++,property:propName,target:target$1,_value:null,_func:toFunctionStore.func,_ease:parseEasings(tweenEasing),_fromNumbers:cloneArray(fromTargetObject.d),_toNumbers:cloneArray(toTargetObject.d),_strings:cloneArray(toTargetObject.s),_fromNumber:fromTargetObject.n,_toNumber:toTargetObject.n,_numbers:cloneArray(fromTargetObject.d),_number:fromTargetObject.n,_unit:toTargetObject.u,_modifier:tweenModifier,_currentTime:0,_startTime:tweenStartTime,_delay:+tweenDelay,_updateDuration:tweenUpdateDuration,_changeDuration:tweenUpdateDuration,_absoluteStartTime:absoluteStartTime,_tweenType:tweenType,_valueType:toTargetObject.t,_composition:tweenComposition,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};tweenComposition!==compositionTypes.none&&composeTween(tween,siblings$2),isNaN(firstTweenChangeStartTime)&&(firstTweenChangeStartTime=tween._startTime),lastTweenChangeEndTime=round(tweenStartTime+tweenUpdateDuration,12),prevTween=tween,animationAnimationLength++,addChild(this,tween)}(isNaN(iterationDelay)||firstTweenChangeStartTimeiterationDuration)&&(iterationDuration=lastTweenChangeEndTime),tweenType===tweenTypes.TRANSFORM&&(lastTransformGroupIndex=animationAnimationLength-tweenIndex,lastTransformGroupLength=animationAnimationLength)}if(!isNaN(lastTransformGroupIndex)){let i=0;forEachChildren(this,tween=>{i>=lastTransformGroupIndex&&i{additiveTween.id===tween.id&&(additiveTween._renderTransforms=1)})),i++})}}targetsLength||console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`),iterationDelay?(forEachChildren(this,tween=>{tween._startTime-tween._delay||(tween._delay-=iterationDelay),tween._startTime-=iterationDelay}),iterationDuration-=iterationDelay):iterationDelay=0,iterationDuration||(iterationDuration=minValue,this.iterationCount=0),this.targets=parsedTargets,this.duration=iterationDuration===minValue?minValue:clampInfinity((iterationDuration+this._loopDelay)*this.iterationCount-this._loopDelay)||minValue,this.onRender=onRender||animDefaults.onRender,this._ease=animEase,this._delay=iterationDelay,this.iterationDuration=iterationDuration,this._inlineStyles=animInlineStyles,!this._autoplay&&shouldTriggerRender&&this.onRender(this)}stretch(newDuration){let currentDuration=this.duration;if(currentDuration===normalizeTime(newDuration))return this;let timeScale=newDuration/currentDuration;return forEachChildren(this,tween=>{tween._updateDuration=normalizeTime(tween._updateDuration*timeScale),tween._changeDuration=normalizeTime(tween._changeDuration*timeScale),tween._currentTime*=timeScale,tween._startTime*=timeScale,tween._absoluteStartTime*=timeScale}),super.stretch(newDuration)}refresh(){return forEachChildren(this,tween=>{let tweenFunc=tween._func;if(tweenFunc){let ogValue=getOriginalAnimatableValue(tween.target,tween.property,tween._tweenType);decomposeRawValue(ogValue,decomposedOriginalValue),decomposeRawValue(tweenFunc(),toTargetObject),tween._fromNumbers=cloneArray(decomposedOriginalValue.d),tween._fromNumber=decomposedOriginalValue.n,tween._toNumbers=cloneArray(toTargetObject.d),tween._strings=cloneArray(toTargetObject.s),tween._toNumber=toTargetObject.o?getRelativeValue(decomposedOriginalValue.n,toTargetObject.n,toTargetObject.o):toTargetObject.n}}),this}revert(){return super.revert(),cleanInlineStyles(this)}then(callback){return super.then(callback)}};const animate=(targets,parameters)=>new JSAnimation(targets,parameters,null,0,!1).init(),transformsShorthands=[`x`,`y`,`z`],commonDefaultPXProperties=[`perspective`,`width`,`height`,`margin`,`padding`,`top`,`right`,`bottom`,`left`,`borderWidth`,`fontSize`,`borderRadius`,...transformsShorthands],WAAPIAnimationsLookups={_head:null,_tail:null},removeWAAPIAnimation=($el,property,parent)=>{let nextLookup=WAAPIAnimationsLookups._head;for(;nextLookup;){let next=nextLookup._next,matchTarget=nextLookup.$el===$el,matchProperty=!property||nextLookup.property===property,matchParent=!parent||nextLookup.parent===parent;if(matchTarget&&matchProperty&&matchParent){let anim=nextLookup.animation;try{anim.commitStyles()}catch{}anim.cancel(),removeChild(WAAPIAnimationsLookups,nextLookup);let lookupParent=nextLookup.parent;lookupParent&&(lookupParent._completed++,lookupParent.animations.length===lookupParent._completed&&(lookupParent.completed=!0,lookupParent.muteCallbacks||(lookupParent.paused=!0,lookupParent.onComplete(lookupParent),lookupParent._resolve(lookupParent))))}nextLookup=next}},sync=(callback=noop)=>new Timer({duration:1*globals.timeScale,onComplete:callback},null,0).resume();function getTargetValue(targetSelector,propName,unit){let targets=registerTargets(targetSelector);if(!targets.length)return;let[target$1]=targets,tweenType=getTweenType(target$1,propName),normalizePropName=sanitizePropertyName(propName,target$1,tweenType),originalValue=getOriginalAnimatableValue(target$1,normalizePropName);if(isUnd(unit))return originalValue;if(decomposeRawValue(originalValue,decomposedOriginalValue),decomposedOriginalValue.t===valueTypes.NUMBER||decomposedOriginalValue.t===valueTypes.UNIT){if(unit===!1)return decomposedOriginalValue.n;{let convertedValue=convertValueUnit(target$1,decomposedOriginalValue,unit,!1);return`${round(convertedValue.n,globals.precision)}${convertedValue.u}`}}}const setTargetValues=(targets,parameters)=>{if(!isUnd(parameters))return parameters.duration=minValue,parameters.composition=setValue(parameters.composition,compositionTypes.none),new JSAnimation(targets,parameters,null,0,!0).resume()},removeTargetsFromAnimation=(targetsArray,animation,propertyName)=>{let tweensMatchesTargets=!1;return forEachChildren(animation,tween=>{let tweenTarget=tween.target;if(targetsArray.includes(tweenTarget)){let tweenName=tween.property,tweenType=tween._tweenType,normalizePropName=sanitizePropertyName(propertyName,tweenTarget,tweenType);(!normalizePropName||normalizePropName&&normalizePropName===tweenName)&&(tween.parent._tail===tween&&tween._tweenType===tweenTypes.TRANSFORM&&tween._prev&&tween._prev._tweenType===tweenTypes.TRANSFORM&&(tween._prev._renderTransforms=1),removeChild(animation,tween),removeTweenSliblings(tween),tweensMatchesTargets=!0)}},!0),tweensMatchesTargets},remove=(targets,renderable,propertyName)=>{let targetsArray=parseTargets(targets),parent=renderable||engine,waapiAnimation=renderable&&renderable.controlAnimation&&renderable;for(let i=0,l=targetsArray.length;i{if(!child._hasChildren)if(removeMatches=removeTargetsFromAnimation(targetsArray,child,propertyName),removeMatches&&!child._head)child.cancel(),removeChild(parent,child);else{let childTLOffset=child._offset+child._delay,childDur=childTLOffset+child.duration;childDur>iterationDuration&&(iterationDuration=childDur)}child._head?remove(targets,child,propertyName):child._hasChildren=!1},!0),isUnd(parent.iterationDuration)||(parent.iterationDuration=iterationDuration)}else removeMatches=removeTargetsFromAnimation(targetsArray,parent,propertyName);return removeMatches&&!parent._head&&(parent._hasChildren=!1,parent.cancel&&parent.cancel()),targetsArray},keepTime=createRefreshable,randomPick=items=>items[random(0,items.length-1)],roundPad=(v,decimalLength)=>(+v).toFixed(decimalLength),padStart=(v,totalLength,padString)=>`${v}`.padStart(totalLength,padString),padEnd=(v,totalLength,padString)=>`${v}`.padEnd(totalLength,padString),wrap=(v,min$1,max$1)=>((v-min$1)%(max$1-min$1)+(max$1-min$1))%(max$1-min$1)+min$1,mapRange=(value$1,inLow,inHigh,outLow,outHigh)=>outLow+(value$1-inLow)/(inHigh-inLow)*(outHigh-outLow),degToRad=degrees$1=>degrees$1*PI/180,radToDeg=radians=>radians*180/PI,lerp=(start,end,amount,renderable)=>{let dt$3=K/globals.defaults.frameRate;if(renderable!==!1){let ticker=renderable||engine._hasChildren&&engine;ticker&&ticker.deltaTime&&(dt$3=ticker.deltaTime)}let t$1=1-Math.exp(-amount*dt$3*.1);return amount?amount===1?end:(1-t$1)*start+t$1*end:start},curry=(fn$5,last=0)=>(...args)=>last?v=>fn$5(...args,v):v=>fn$5(v,...args),chain=fn$5=>(...args)=>{let result=fn$5(...args);return new Proxy(noop,{apply:(_$1,__,[v])=>result(v),get:(_$1,prop)=>chain((...nextArgs)=>{let nextResult=utils[prop](...nextArgs);return v=>nextResult(result(v))})})},makeChainable=(fn$5,right=0)=>(...args)=>(args.lengthnew Promise(resolve$1=>{let source=audioContext.createBufferSource();source.buffer=ctx.data.audioBuffer,source.connect(audioContext.destination),nowSpeaking.value=!0,source.start(0),source.onended=()=>{nowSpeaking.value=!1,resolve$1()}})]});async function handleSpeechGeneration(ctx){speechGenerationIndex.value++;try{let input=ctx.data,res=await props.generateSpeech(input,props.voice,!1),audioBuffer=await audioContext.decodeAudioData(res);await audioQueue.add({audioBuffer,text:ctx.data})}catch(error){console.error(`Speech generation failed:`,error)}}let ttsQueue=useQueue({handlers:[handleSpeechGeneration]}),messageContentQueue=useMessageContentQueue(ttsQueue);async function testStreaming(){await messageContentQueue.add(props.text)}async function testChunking(){let chunks=[],stream=new ReadableStream({start(controller){controller.enqueue(new TextEncoder().encode(props.text)),controller.close()}});for await(let chunk of chunkTTSInput(stream.getReader(),{boost:1,minimumWords:4,maximumWords:12}))chunks.push(chunk);ttsInputChunks.value=chunks}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[_cache$1[4]||=createBaseVNode(`div`,{class:`flex items-center gap-1 text-sm font-medium`},` Streaming Playground `,-1),createBaseVNode(`div`,_hoisted_1$14,[createBaseVNode(`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":``,bg:`neutral-700 dark:neutral-300`,onClick:testChunking},_cache$1[1]||=[createBaseVNode(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[createBaseVNode(`div`,{"i-solar:round-double-alt-arrow-right-bold-duotone":``}),createBaseVNode(`span`,null,`Test chunking`)],-1)]),ttsInputChunks.value.length>0?(openBlock(),createElementBlock(`button`,{key:0,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":``,bg:`neutral-700 dark:neutral-300`,onClick:testStreaming},_cache$1[2]||=[createBaseVNode(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[createBaseVNode(`div`,{"i-solar:round-double-alt-arrow-right-bold-duotone":``}),createBaseVNode(`span`,null,`Test streaming`)],-1)])):createCommentVNode(``,!0)]),createBaseVNode(`div`,_hoisted_2$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ttsInputChunks.value,(chunk,i)=>(openBlock(),createElementBlock(`div`,{key:i,flex:`~ row gap-2 items-center`},[createBaseVNode(`div`,{flex:`~ row gap-2 items-center`,"rounded-xl":``,"px-2":``,"py-1.5":``,class:normalizeClass({"bg-neutral-100 dark:bg-neutral-800":speechGenerationIndex.value=i})},[createBaseVNode(`span`,_hoisted_3$5,toDisplayString(chunk.text),1),createBaseVNode(`span`,{"rounded-full":``,"px-2":``,"py-.5":``,"text-nowrap":``,"text-xs":``,b:`~ dashed`,class:normalizeClass({"b-green text-green":chunk.reason===`boost`,"b-orange text-orange":chunk.reason===`limit`,"b-red text-red":chunk.reason===`hard`,"b-purple text-purple":chunk.reason===`flush`})},toDisplayString(chunk.words)+` words, `+toDisplayString(chunk.reason),3)],2),createVNode(Transition,{css:!1,onEnter:_cache$1[0]||=el=>unref(animate)(el,{opacity:[0,1],translateX:[10,0],duration:200,ease:`inOut`})},{default:withCtx(()=>[speechGenerationIndex.value>=i?(openBlock(),createElementBlock(`div`,_hoisted_4$4,_cache$1[3]||=[createBaseVNode(`div`,{"i-solar-check-circle-line-duotone":``},null,-1),createBaseVNode(`div`,null,`Queued`,-1)])):createCommentVNode(``,!0)]),_:2},1024)]))),128))])],64))}}),SpeechStreamingPlayground_default=SpeechStreamingPlayground_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$13={"w-full":``,"rounded-xl":``},_hoisted_2$7={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},_hoisted_3$4={class:`inline-flex items-center gap-4`},_hoisted_4$3={flex:`~ col gap-4`},_hoisted_5$3=[`placeholder`],_hoisted_6$3=[`placeholder`],_hoisted_7$2={flex:`~ row`,"gap-4":``},_hoisted_8$2=[`disabled`],_hoisted_9$2={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_10$2={flex:`~ row`,"items-center":``,"gap-2":``},_hoisted_11$1={key:2,class:`mt-2 text-sm text-red-500`},_hoisted_12$1={key:3,class:`mt-2 text-sm text-red-500`},_hoisted_13$1={key:4,class:`mt-2 text-sm text-red-500`},_hoisted_14$1=[`src`];var SpeechPlayground_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SpeechPlayground`,props:{defaultText:{},availableVoices:{},generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(__props,{expose:__expose}){let props=__props,{t:t$1}=useI18n(),testText=ref(props.defaultText||`Hello! This is a test of the voice synthesis.`),isGenerating=ref(!1),audioUrl=ref(``),errorMessage=ref(``),audioPlayer=ref(null),useSSML=ref(!1),ssmlText=ref(``),selectedVoice=ref(``);watch(()=>props.availableVoices,newVoices=>{newVoices.length>0&&!selectedVoice.value&&(selectedVoice.value=newVoices[0]?.id||``)},{immediate:!0});let voiceOptions=computed(()=>props.availableVoices.map(voice=>({value:voice.id,label:voice.name})));async function handleGenerateTestSpeech(){if(!(!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value)){isGenerating.value=!0,errorMessage.value=``;try{audioUrl.value&&stopTestAudio();let input=useSSML.value?ssmlText.value:testText.value,response=await props.generateSpeech(input,selectedVoice.value,useSSML.value);audioUrl.value=URL.createObjectURL(new Blob([response])),setTimeout(()=>{audioPlayer.value&&audioPlayer.value.play()},100)}catch(error){console.error(`Error generating speech:`,error),errorMessage.value=error instanceof Error?error.message:`An unknown error occurred`}finally{isGenerating.value=!1}}}function stopTestAudio(){audioPlayer.value&&(audioPlayer.value.pause(),audioPlayer.value.currentTime=0),audioUrl.value&&(URL.revokeObjectURL(audioUrl.value),audioUrl.value=``)}return onUnmounted(()=>{audioUrl.value&&URL.revokeObjectURL(audioUrl.value)}),__expose({testText,ssmlText,useSSML,selectedVoice,isGenerating,audioUrl,errorMessage,audioPlayer,generateTestSpeech:handleGenerateTestSpeech,stopTestAudio}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$13,[createBaseVNode(`h2`,_hoisted_2$7,[createBaseVNode(`div`,_hoisted_3$4,[createVNode(unref(TestDummyMarker_default)),createBaseVNode(`div`,null,toDisplayString(unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),createBaseVNode(`div`,_hoisted_4$3,[createVNode(unref(FieldCheckbox_default),{modelValue:useSSML.value,"onUpdate:modelValue":_cache$1[0]||=$event=>useSSML.value=$event,label:unref(t$1)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label`),description:unref(t$1)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description`)},null,8,[`modelValue`,`label`,`description`]),useSSML.value?withDirectives((openBlock(),createElementBlock(`textarea`,{key:1,"onUpdate:modelValue":_cache$1[2]||=$event=>ssmlText.value=$event,placeholder:unref(t$1)(`settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-48":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"font-mono":``,"outline-none":``},null,8,_hoisted_6$3)),[[vModelText,ssmlText.value]]):withDirectives((openBlock(),createElementBlock(`textarea`,{key:0,"onUpdate:modelValue":_cache$1[1]||=$event=>testText.value=$event,placeholder:unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-24":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"outline-none":``},null,8,_hoisted_5$3)),[[vModelText,testText.value]]),createVNode(unref(FieldSelect_default),{modelValue:selectedVoice.value,"onUpdate:modelValue":_cache$1[3]||=$event=>selectedVoice.value=$event,class:`[&>div]:grid [&>div]:grid-cols-[4fr_2fr]`,options:voiceOptions.value,label:unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label`),description:unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description`),layout:`horizontal`},null,8,[`modelValue`,`options`,`label`,`description`]),createBaseVNode(`div`,_hoisted_7$2,[createBaseVNode(`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:isGenerating.value||!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value||!_ctx.apiKeyConfigured,class:normalizeClass({"opacity-50 cursor-not-allowed":isGenerating.value||!testText.value.trim()&&!useSSML.value||useSSML.value&&!ssmlText.value.trim()||!selectedVoice.value||!_ctx.apiKeyConfigured}),bg:`neutral-700 dark:neutral-300`,onClick:handleGenerateTestSpeech},[createBaseVNode(`div`,_hoisted_9$2,[_cache$1[4]||=createBaseVNode(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),createBaseVNode(`span`,null,toDisplayString(isGenerating.value?unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,_hoisted_8$2),audioUrl.value?(openBlock(),createElementBlock(`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:stopTestAudio},[createBaseVNode(`div`,_hoisted_10$2,[_cache$1[5]||=createBaseVNode(`div`,{"i-solar:stop-circle-bold-duotone":``},null,-1),createBaseVNode(`span`,null,toDisplayString(unref(t$1)(`settings.pages.modules.speech.sections.section.playground.buttons.stop.label`)),1)])])):createCommentVNode(``,!0)]),_ctx.apiKeyConfigured?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_11$1,toDisplayString(unref(t$1)(`settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key`)),1)),selectedVoice.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_12$1,toDisplayString(unref(t$1)(`settings.pages.modules.speech.sections.section.playground.select-voice.required`)),1)),errorMessage.value?(openBlock(),createElementBlock(`div`,_hoisted_13$1,toDisplayString(errorMessage.value),1)):createCommentVNode(``,!0),audioUrl.value?(openBlock(),createElementBlock(`audio`,{key:5,ref_key:`audioPlayer`,ref:audioPlayer,src:audioUrl.value,controls:``,class:`mt-2 w-full`},null,8,_hoisted_14$1)):createCommentVNode(``,!0),createVNode(SpeechStreamingPlayground_default,{text:testText.value,voice:selectedVoice.value,"generate-speech":_ctx.generateSpeech},null,8,[`text`,`voice`,`generate-speech`])]),renderSlot(_ctx.$slots,`default`)]))}}),SpeechPlayground_default=SpeechPlayground_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$12={flex:`~ col md:row gap-6`},_hoisted_2$6={flex:`~ col gap-6`},_hoisted_3$3={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},_hoisted_4$2={flex:`~ col gap-4`},_hoisted_5$2={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},_hoisted_6$2={"w-full":``,"rounded-xl":``};var SpeechProviderSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SpeechProviderSettings`,props:{providerId:{},defaultModel:{},additionalSettings:{},placeholder:{}},setup(__props){let props=__props,{t:t$1}=useI18n(),router$1=useRouter(),providersStore=useProvidersStore(),speechStore=useSpeechStore(),{providers}=storeToRefs(providersStore),providerMetadata=computed(()=>providersStore.getProviderMetadata(props.providerId)),apiKey=computed({get:()=>providers.value[props.providerId]?.apiKey||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].apiKey=value$1}}),baseUrl=computed({get:()=>providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].baseUrl=value$1}}),voiceSettings=ref({});function initializeVoiceSettings(){providers.value[props.providerId]?.voiceSettings?voiceSettings.value={...providers.value[props.providerId].voiceSettings}:voiceSettings.value={pitch:0,speed:1,volume:0,...props.additionalSettings}}onMounted(()=>{providersStore.initializeProvider(props.providerId),apiKey.value=providers.value[props.providerId]?.apiKey||``,baseUrl.value=providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,initializeVoiceSettings(),providersStore.configuredProviders[props.providerId]&&speechStore.loadVoicesForProvider(props.providerId)});let debouncedUpdate=useDebounceFn(()=>{providers.value[props.providerId]={...providers.value[props.providerId],apiKey:apiKey.value,baseUrl:baseUrl.value||providerMetadata.value?.defaultOptions?.().baseUrl||``,voiceSettings:{...voiceSettings.value}}},1e3);watch([apiKey,baseUrl],debouncedUpdate),watch(voiceSettings,debouncedUpdate,{deep:!0});function handleResetVoiceSettings(){voiceSettings.value={...providerMetadata.value?.defaultOptions?.().voiceSettings||{}},debouncedUpdate()}return(_ctx,_cache$1)=>(openBlock(),createBlock(ProviderSettingsLayout2_default,{"provider-name":providerMetadata.value?.localizedName,"provider-icon":providerMetadata.value?.icon,"on-back":()=>unref(router$1).back()},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$12,[createVNode(unref(ProviderSettingsContainer_default),{class:`w-full md:w-[40%]`},{default:withCtx(()=>[createVNode(unref(ProviderBasicSettings_default),{title:unref(t$1)(`settings.pages.providers.common.section.basic.title`),description:unref(t$1)(`settings.pages.providers.common.section.basic.description`),"on-reset":handleResetVoiceSettings},{default:withCtx(()=>[createVNode(unref(ProviderApiKeyInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[0]||=$event=>apiKey.value=$event,"provider-name":providerMetadata.value?.localizedName,placeholder:props.placeholder||`API Key`},null,8,[`modelValue`,`provider-name`,`placeholder`]),renderSlot(_ctx.$slots,`basic-settings`)]),_:3},8,[`title`,`description`]),createBaseVNode(`div`,_hoisted_2$6,[createBaseVNode(`h2`,_hoisted_3$3,toDisplayString(unref(t$1)(`settings.pages.providers.common.section.voice.title`)),1),createBaseVNode(`div`,_hoisted_4$2,[renderSlot(_ctx.$slots,`voice-settings`)])]),createVNode(unref(ProviderAdvancedSettings_default),{title:unref(t$1)(`settings.pages.providers.common.section.advanced.title`)},{default:withCtx(()=>[createVNode(unref(ProviderBaseUrlInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[1]||=$event=>baseUrl.value=$event,placeholder:providerMetadata.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`]),renderSlot(_ctx.$slots,`advanced-settings`)]),_:3},8,[`title`])]),_:3}),createBaseVNode(`div`,_hoisted_5$2,[createBaseVNode(`div`,_hoisted_6$2,[renderSlot(_ctx.$slots,`playground`)])])])]),_:3},8,[`provider-name`,`provider-icon`,`on-back`]))}}),SpeechProviderSettings_default=SpeechProviderSettings_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$11={"w-full":``,"pt-1":``},_hoisted_2$5={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},_hoisted_3$2={class:`inline-flex items-center gap-4`},_hoisted_4$1={"mb-2":``},_hoisted_5$1=[`src`],_hoisted_6$1={key:0,class:`mt-2 text-sm text-neutral-500 dark:text-neutral-400`},_hoisted_7$1={class:`space-y-3`},_hoisted_8$1={class:`space-y-3`},_hoisted_9$1={class:`flex items-center gap-3`},_hoisted_10$1={class:`text-sm font-medium`};var TranscriptionPlayground_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TranscriptionPlayground`,props:{generateTranscription:{type:Function},apiKeyConfigured:{type:Boolean}},setup(__props){let props=__props,{t:t$1}=useI18n(),{audioInputs,selectedAudioInput,stream,stopStream,startStream}=useAudioDevice(),speakingThreshold=ref(25),isMonitoring=ref(!1),isSpeaking=ref(!1),errorMessage=ref(``),audioContext=ref(),analyser=ref(),dataArray=ref(),animationFrame=ref(),volumeLevel=ref(0),audios=ref([]),audioCleanups=ref([]),audioURLs=computed(()=>audios.value.map(blob=>{let url=URL.createObjectURL(blob);return audioCleanups.value.push(()=>URL.revokeObjectURL(url)),url})),transcriptions=ref([]),{startRecord,stopRecord,onStopRecord}=useAudioRecorder(stream);async function setupAudioMonitoring(){try{await stopAudioMonitoring(),await startStream(),await until(stream).toBeTruthy(),audioContext.value=new AudioContext;let source=audioContext.value.createMediaStreamSource(stream.value);analyser.value=audioContext.value.createAnalyser(),analyser.value.fftSize=256,analyser.value.smoothingTimeConstant=.3,source.connect(analyser.value);let bufferLength=analyser.value.frequencyBinCount;dataArray.value=new Uint8Array(bufferLength),startAudioAnalysis()}catch(error){console.error(`Error setting up audio monitoring:`,error),errorMessage.value=error instanceof Error?error.message:String(error)}}async function stopAudioMonitoring(){animationFrame.value&&(cancelAnimationFrame(animationFrame.value),animationFrame.value=void 0),stream.value&&(stream.value.getTracks().forEach(track$1=>track$1.stop()),stream.value=void 0),audioContext.value&&(await audioContext.value.close(),audioContext.value=void 0),await stopRecord(),await stopStream(),analyser.value=void 0,dataArray.value=void 0,volumeLevel.value=0,isSpeaking.value=!1}function startAudioAnalysis(){let analyze=()=>{if(!analyser.value||!dataArray.value)return;analyser.value.getByteFrequencyData(dataArray.value);let sum=0;for(let i=0;ispeakingThreshold.value,animationFrame.value=requestAnimationFrame(analyze)};analyze()}watch(selectedAudioInput,async()=>{isMonitoring.value&&await setupAudioMonitoring()}),watch(audioInputs,()=>{!selectedAudioInput.value&&audioInputs.value.length>0&&(selectedAudioInput.value=audioInputs.value.find(input=>input.deviceId===`default`)?.deviceId||audioInputs.value[0].deviceId)});async function toggleMonitoring(){isMonitoring.value?(await stopAudioMonitoring(),await stopRecord(),isMonitoring.value=!1):(onStopRecord(async recording=>{try{if(recording&&recording.size>0){audios.value.push(recording);let res=await props.generateTranscription(new File([recording],`recording.wav`));transcriptions.value.push(res.text)}}catch(err){errorMessage.value=err instanceof Error?err.message:String(err),console.error(`Error generating transcription:`,errorMessage.value)}}),await setupAudioMonitoring(),await startRecord(),isMonitoring.value=!0)}let speakingIndicatorClass=computed(()=>isSpeaking.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`);return onUnmounted(()=>{stopAudioMonitoring()}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,_hoisted_1$11,[createBaseVNode(`h2`,_hoisted_2$5,[createBaseVNode(`div`,_hoisted_3$2,[createVNode(unref(TestDummyMarker_default)),createBaseVNode(`div`,null,toDisplayString(unref(t$1)(`settings.pages.providers.provider.transcriptions.playground.title`)),1)])]),createBaseVNode(`div`,_hoisted_4$1,[createVNode(unref(FieldSelect_default),{modelValue:unref(selectedAudioInput),"onUpdate:modelValue":_cache$1[0]||=$event=>isRef(selectedAudioInput)?selectedAudioInput.value=$event:null,label:`Audio Input Device`,description:`Select the audio input device for your hearing module.`,options:unref(audioInputs).map(input=>({label:input.label||input.deviceId,value:input.deviceId})),placeholder:`Select an audio input device`,layout:`vertical`,"h-fit":``,"w-full":``},null,8,[`modelValue`,`options`])]),createVNode(unref(Button_default),{class:`my-4`,"w-full":``,onClick:toggleMonitoring},{default:withCtx(()=>[createTextVNode(toDisplayString(isMonitoring.value?`Stop Monitoring`:`Start Monitoring`),1)]),_:1}),createBaseVNode(`div`,null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(audioURLs.value,(audio,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1,class:`mb-2`},[createBaseVNode(`audio`,{src:audio,controls:``,class:`w-full`},null,8,_hoisted_5$1),transcriptions.value[index$1]?(openBlock(),createElementBlock(`div`,_hoisted_6$1,toDisplayString(transcriptions.value[index$1]),1)):createCommentVNode(``,!0)]))),128))]),createBaseVNode(`div`,_hoisted_7$1,[createVNode(unref(LevelMeter_default),{level:volumeLevel.value,label:`Input Level`},null,8,[`level`]),createVNode(unref(ThresholdMeter_default),{value:volumeLevel.value/100,threshold:speakingThreshold.value/100,label:`Probability of Speech`,"below-label":`Silence`,"above-label":`Speech`,"threshold-label":`Detection threshold`},null,8,[`value`,`threshold`]),createBaseVNode(`div`,_hoisted_8$1,[createVNode(unref(FieldRange_default),{modelValue:speakingThreshold.value,"onUpdate:modelValue":_cache$1[1]||=$event=>speakingThreshold.value=$event,label:`Sensitivity`,description:`Adjust the threshold for speech detection`,min:1,max:80,step:1,"format-value":value$1=>`${value$1}%`},null,8,[`modelValue`,`format-value`])]),createBaseVNode(`div`,_hoisted_9$1,[createBaseVNode(`div`,{class:normalizeClass([`h-4 w-4 rounded-full transition-all duration-200`,speakingIndicatorClass.value])},null,2),createBaseVNode(`span`,_hoisted_10$1,toDisplayString(isSpeaking.value?`Speaking Detected`:`Silence`),1)])])]))}}),TranscriptionPlayground_default=TranscriptionPlayground_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$10={flex:`~ col md:row gap-6`},_hoisted_2$4={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},_hoisted_3$1={"w-full":``,"rounded-xl":``};var TranscriptionProviderSettings_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`TranscriptionProviderSettings`,props:{providerId:{},defaultModel:{},additionalSettings:{},placeholder:{}},setup(__props){let props=__props,{t:t$1}=useI18n(),router$1=useRouter(),providersStore=useProvidersStore(),{providers}=storeToRefs(providersStore),providerMetadata=computed(()=>providersStore.getProviderMetadata(props.providerId)),apiKey=computed({get:()=>providers.value[props.providerId]?.apiKey||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].apiKey=value$1}}),baseUrl=computed({get:()=>providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``,set:value$1=>{providers.value[props.providerId]||(providers.value[props.providerId]={}),providers.value[props.providerId].baseUrl=value$1}});return onMounted(()=>{providersStore.initializeProvider(props.providerId),apiKey.value=providers.value[props.providerId]?.apiKey||``,baseUrl.value=providers.value[props.providerId]?.baseUrl||providerMetadata.value?.defaultOptions?.().baseUrl||``}),(_ctx,_cache$1)=>(openBlock(),createBlock(unref(ProviderSettingsLayout2_default),{"provider-name":providerMetadata.value?.localizedName,"provider-icon":providerMetadata.value?.icon,"on-back":()=>unref(router$1).back()},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$10,[createVNode(unref(ProviderSettingsContainer_default),{class:`w-full md:w-[40%]`},{default:withCtx(()=>[createVNode(unref(ProviderBasicSettings_default),{title:unref(t$1)(`settings.pages.providers.common.section.basic.title`),description:unref(t$1)(`settings.pages.providers.common.section.basic.description`)},{default:withCtx(()=>[createVNode(unref(ProviderApiKeyInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[0]||=$event=>apiKey.value=$event,"provider-name":providerMetadata.value?.localizedName,placeholder:props.placeholder||`API Key`},null,8,[`modelValue`,`provider-name`,`placeholder`]),renderSlot(_ctx.$slots,`basic-settings`)]),_:3},8,[`title`,`description`]),createVNode(unref(ProviderAdvancedSettings_default),{title:unref(t$1)(`settings.pages.providers.common.section.advanced.title`)},{default:withCtx(()=>[createVNode(unref(ProviderBaseUrlInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[1]||=$event=>baseUrl.value=$event,placeholder:providerMetadata.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`]),renderSlot(_ctx.$slots,`advanced-settings`)]),_:3},8,[`title`])]),_:3}),createBaseVNode(`div`,_hoisted_2$4,[createBaseVNode(`div`,_hoisted_3$1,[renderSlot(_ctx.$slots,`playground`)])])])]),_:3},8,[`provider-name`,`provider-icon`,`on-back`]))}}),TranscriptionProviderSettings_default=TranscriptionProviderSettings_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$9={"h-full":``,"w-full":``},_hoisted_2$3={key:0,"h-full":``,flex:``,"flex-col":``},_hoisted_3={class:`mb-2 text-center md:mb-8`,flex:``,"flex-1":``,"flex-col":``,"justify-center":``},_hoisted_4={initial:{opacity:0,scale:.5},visible:{opacity:1,scale:1},duration:500,class:`mb-1 flex justify-center md:mb-4 lg:pt-16 md:pt-8`},_hoisted_5=[`src`],_hoisted_6={initial:{opacity:0,y:10},visible:{opacity:1,y:0},duration:500,class:`mb-0 text-3xl text-neutral-800 font-bold md:mb-2 dark:text-neutral-100`},_hoisted_7={initial:{opacity:0,y:10},visible:{opacity:1,y:0},duration:500,delay:100,class:`text-sm text-neutral-600 md:text-lg dark:text-neutral-400`},_hoisted_8={key:1,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_9={sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_10={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_11={class:`flex-1 overflow-y-auto`},_hoisted_12={class:`grid grid-cols-1 gap-3 sm:grid-cols-2`},_hoisted_13={key:2,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_14={sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_15={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_16={key:0,"flex-1":``,"overflow-y-auto":``},_hoisted_17={class:`space-y-4`},_hoisted_18={key:0},_hoisted_19={key:1},_hoisted_20={key:2},_hoisted_21={key:0,class:`mt-4`},_hoisted_22={key:3,"h-full":``,flex:``,"flex-col":``,"gap-4":``},_hoisted_23={sticky:``,"top-0":``,"z-100":``,flex:``,"flex-shrink-0":``,"items-center":``,"gap-2":``},_hoisted_24={class:`flex-1 text-center text-xl text-neutral-800 font-semibold md:text-left md:text-2xl dark:text-neutral-100`},_hoisted_25={"flex-1":``};var Onboarding_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Onboarding`,emits:[`configured`,`skipped`],setup(__props,{emit:__emit}){let emit$1=__emit,step=ref(1),direction=ref(`next`),{t:t$1}=useI18n(),providersStore=useProvidersStore(),{providers,allChatProvidersMetadata}=storeToRefs(providersStore),consciousnessStore=useConsciousnessStore(),{activeModel,activeProvider,modelSearchQuery,providerModels,isLoadingActiveProviderModels}=storeToRefs(consciousnessStore),popularProviders=computed(()=>{let popular=[`openai`,`anthropic`,`google-generative-ai`,`openrouter-ai`,`ollama`,`deepseek`,`player2`];return allChatProvidersMetadata.value.filter(provider=>popular.includes(provider.id)).sort((a$1,b$1)=>popular.indexOf(a$1.id)-popular.indexOf(b$1.id))}),selectedProviderId=ref(``),apiKey=ref(``),baseUrl=ref(``),accountId=ref(``),selectedProvider=computed(()=>allChatProvidersMetadata.value.find(p$4=>p$4.id===selectedProviderId.value)||null),isValidating=ref(!1),isValid=ref(!1),validationMessage=ref(``),needsApiKey=computed(()=>selectedProvider.value?selectedProvider.value.id!==`ollama`&&selectedProvider.value.id!==`player2`:!1),needsBaseUrl=computed(()=>selectedProvider.value?selectedProvider.value.id!==`cloudflare-workers-ai`:!1),canSave=computed(()=>!selectedProvider.value||needsApiKey.value&&!apiKey.value.trim()||needsBaseUrl.value&&!baseUrl.value.trim()||selectedProvider.value.id===`cloudflare-workers-ai`&&!accountId.value.trim()||!activeModel.value?!1:isValid.value);function selectProvider(provider){selectedProviderId.value=provider.id;let defaultOptions=provider.defaultOptions?.()||{};baseUrl.value=defaultOptions?.baseUrl||``,apiKey.value=``,accountId.value=``,isValid.value=!1,validationMessage.value=``}function getApiKeyPlaceholder(_providerId){let placeholders={openai:`sk-...`,anthropic:`sk-ant-...`,"google-generative-ai":`GEMINI_API_KEY`,"openrouter-ai":`sk-or-...`,deepseek:`sk-...`,xai:`xai-...`,"together-ai":`togetherapi-...`,"mistral-ai":`mis-...`,"moonshot-ai":`ms-...`,"fireworks-ai":`fw-...`,"featherless-ai":`fw-...`,"novita-ai":`nvt-...`};return placeholders[_providerId]||`API Key`}function getBaseUrlPlaceholder(_providerId){let defaultOptions=selectedProvider.value?.defaultOptions?.()||{};return defaultOptions?.baseUrl||`https://api.example.com/v1/`}async function validateConfiguration(){if(selectedProvider.value){isValidating.value=!0,validationMessage.value=t$1(`settings.dialogs.onboarding.validating`);try{let config$1={};needsApiKey.value&&(config$1.apiKey=apiKey.value.trim()),needsBaseUrl.value&&(config$1.baseUrl=baseUrl.value.trim()),selectedProvider.value.id===`cloudflare-workers-ai`&&(config$1.accountId=accountId.value.trim());let metadata=providersStore.getProviderMetadata(selectedProvider.value.id);isValid.value=await metadata.validators.validateProviderConfig(config$1),isValid.value?validationMessage.value=t$1(`settings.dialogs.onboarding.validationSuccess`):validationMessage.value=t$1(`settings.dialogs.onboarding.validationFailed`)}catch(error){isValid.value=!1,validationMessage.value=t$1(`settings.dialogs.onboarding.validationError`,{error:error instanceof Error?error.message:String(error)})}finally{isValidating.value=!1}}}let debouncedValidateConfiguration=useDebounceFn(()=>{selectedProvider.value&&(needsApiKey.value&&!apiKey.value.trim()||needsBaseUrl.value&&!baseUrl.value.trim()||selectedProvider.value.id===`cloudflare-workers-ai`&&!accountId.value.trim()||validateConfiguration())},500);watch([apiKey,baseUrl,accountId],()=>{selectedProvider.value&&(apiKey.value||baseUrl.value||accountId.value)&&debouncedValidateConfiguration()},{deep:!0});function handlePreviousStep(){step.value>1&&(direction.value=`previous`,step.value--)}function handleNextStep(){step.value<4?(direction.value=`next`,step.value++):handleSave()}async function handleFinishProviderConfiguration(){if(!selectedProvider.value)return;let config$1={};needsApiKey.value&&(config$1.apiKey=apiKey.value.trim()),needsBaseUrl.value&&(config$1.baseUrl=baseUrl.value.trim()),selectedProvider.value.id===`cloudflare-workers-ai`&&(config$1.accountId=accountId.value.trim()),providers.value[selectedProvider.value.id]={...providers.value[selectedProvider.value.id],...config$1},activeProvider.value=selectedProvider.value.id,await nextTick(),await consciousnessStore.loadModelsForProvider(selectedProvider.value.id),handleNextStep()}async function handleSave(){emit$1(`configured`)}return onMounted(()=>{popularProviders.value.length>0&&(selectedProviderId.value=popularProviders.value[0].id,selectProvider(popularProviders.value[0]))}),(_ctx,_cache$1)=>{let _directive_motion=resolveDirective(`motion`);return openBlock(),createElementBlock(`div`,_hoisted_1$9,[createVNode(Transition,{name:direction.value===`next`?`slide-next`:`slide-prev`,mode:`out-in`},{default:withCtx(()=>[step.value===1?(openBlock(),createElementBlock(`div`,_hoisted_2$3,[createBaseVNode(`div`,_hoisted_3,[withDirectives((openBlock(),createElementBlock(`div`,_hoisted_4,[createBaseVNode(`img`,{src:unref(onboarding_default),"max-h":`50`,"aspect-square":``,"h-auto":``,"w-auto":``,"object-cover":``},null,8,_hoisted_5)])),[[_directive_motion]]),withDirectives((openBlock(),createElementBlock(`h2`,_hoisted_6,[createTextVNode(toDisplayString(unref(t$1)(`settings.dialogs.onboarding.title`)),1)])),[[_directive_motion]]),withDirectives((openBlock(),createElementBlock(`p`,_hoisted_7,[createTextVNode(toDisplayString(unref(t$1)(`settings.dialogs.onboarding.description`)),1)])),[[_directive_motion]])]),withDirectives(createVNode(unref(Button_default),{initial:{opacity:0},visible:{opacity:1},duration:500,delay:200,label:unref(t$1)(`settings.dialogs.onboarding.start`),onClick:handleNextStep},null,8,[`label`]),[[_directive_motion]])])):step.value===2?(openBlock(),createElementBlock(`div`,_hoisted_8,[createBaseVNode(`div`,_hoisted_9,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[6]||=[createBaseVNode(`div`,{class:`i-solar:alt-arrow-left-line-duotone h-5 w-5`},null,-1)]),createBaseVNode(`h2`,_hoisted_10,toDisplayString(unref(t$1)(`settings.dialogs.onboarding.selectProvider`)),1),_cache$1[7]||=createBaseVNode(`div`,{class:`h-5 w-5`},null,-1)]),createBaseVNode(`div`,_hoisted_11,[createBaseVNode(`div`,_hoisted_12,[(openBlock(!0),createElementBlock(Fragment,null,renderList(popularProviders.value,provider=>(openBlock(),createBlock(unref(RadioCardDetail_default),{id:provider.id,key:provider.id,modelValue:selectedProviderId.value,"onUpdate:modelValue":_cache$1[0]||=$event=>selectedProviderId.value=$event,name:`provider-selection`,value:provider.id,title:provider.localizedName||provider.id,description:provider.localizedDescription||``,onClick:$event=>selectProvider(provider)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`onClick`]))),128))])]),createVNode(unref(Button_default),{label:unref(t$1)(`settings.dialogs.onboarding.next`),disabled:!selectedProviderId.value,onClick:handleNextStep},null,8,[`label`,`disabled`])])):step.value===3&&selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_13,[createBaseVNode(`div`,_hoisted_14,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[8]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-left-line-duotone":``,"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`h2`,_hoisted_15,toDisplayString(unref(t$1)(`settings.dialogs.onboarding.configureProvider`,{provider:selectedProvider.value.localizedName})),1),_cache$1[9]||=createBaseVNode(`div`,{"h-5":``,"w-5":``},null,-1)]),selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_16,[createVNode(unref(Callout_default),{label:`Keep your API keys and credentials safe!`,theme:`violet`},{default:withCtx(()=>_cache$1[10]||=[createBaseVNode(`div`,null,[createBaseVNode(`div`,null,` AIRI is running pure locally in your browser, and we will never steal your credentials for AI / LLM providers. But keep in mind that your API keys are sensitive information. Make sure to keep them safe and do not share them with anyone. `),createBaseVNode(`div`,null,[createTextVNode(` AIRI is open sourced at `),createBaseVNode(`div`,{"inline-flex":``,"translate-y-1":``,"items-center":``,"gap-1":``},[createBaseVNode(`div`,{"i-simple-icons:github":``,"inline-block":``}),createBaseVNode(`a`,{"decoration-underline":``,"decoration-dashed":``,href:`https://github.com/moeru-ai/airi`,target:`_blank`,rel:`noopener noreferrer`},`GitHub`)]),createTextVNode(`, if you want to check how we handle your credentials, feel free to inspect our code. `)])],-1)]),_:1,__:[10]}),createBaseVNode(`div`,_hoisted_17,[needsApiKey.value?(openBlock(),createElementBlock(`div`,_hoisted_18,[createVNode(unref(FieldInput_default),{modelValue:apiKey.value,"onUpdate:modelValue":_cache$1[1]||=$event=>apiKey.value=$event,placeholder:getApiKeyPlaceholder(selectedProvider.value.id),type:`password`,label:`API Key`,description:`Enter your API key for the selected provider.`,required:``},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),needsBaseUrl.value?(openBlock(),createElementBlock(`div`,_hoisted_19,[createVNode(unref(FieldInput_default),{modelValue:baseUrl.value,"onUpdate:modelValue":_cache$1[2]||=$event=>baseUrl.value=$event,placeholder:getBaseUrlPlaceholder(selectedProvider.value.id),type:`text`,label:`Base URL`,description:`Enter the base URL for the provider's API.`},null,8,[`modelValue`,`placeholder`])])):createCommentVNode(``,!0),selectedProvider.value.id===`cloudflare-workers-ai`?(openBlock(),createElementBlock(`div`,_hoisted_20,[createVNode(unref(ProviderAccountIdInput_default),{modelValue:accountId.value,"onUpdate:modelValue":_cache$1[3]||=$event=>accountId.value=$event},null,8,[`modelValue`])])):createCommentVNode(``,!0)]),validationMessage.value?(openBlock(),createElementBlock(`div`,_hoisted_21,[createBaseVNode(`div`,{class:normalizeClass([`flex items-center rounded-lg p-3`,[isValidating.value?`bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300`:isValid.value?`bg-green-50 text-green-700 dark:bg-green-900/30 dark:text-green-300`:`bg-red-50 text-red-700 dark:bg-red-900/30 dark:text-red-300`]])},[createBaseVNode(`div`,{class:normalizeClass([`mr-2 text-lg`,[isValidating.value?`i-svg-spinners:3-dots-fade`:isValid.value?`i-solar:check-circle-bold-duotone`:`i-solar:danger-circle-bold-duotone`]])},null,2),createTextVNode(` `+toDisplayString(validationMessage.value),1)],2)])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),createVNode(unref(Button_default),{label:unref(t$1)(`settings.dialogs.onboarding.next`),disabled:!selectedProviderId.value,loading:unref(isLoadingActiveProviderModels),onClick:handleFinishProviderConfiguration},null,8,[`label`,`disabled`,`loading`])])):step.value===4&&selectedProvider.value?(openBlock(),createElementBlock(`div`,_hoisted_22,[createBaseVNode(`div`,_hoisted_23,[createBaseVNode(`button`,{"outline-none":``,onClick:handlePreviousStep},_cache$1[11]||=[createBaseVNode(`div`,{"i-solar:alt-arrow-left-line-duotone":``,"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`h2`,_hoisted_24,toDisplayString(unref(t$1)(`settings.dialogs.onboarding.select-model`)),1),_cache$1[12]||=createBaseVNode(`div`,{"h-5":``,"w-5":``},null,-1)]),createBaseVNode(`div`,_hoisted_25,[createVNode(unref(RadioCardManySelect_default),{modelValue:unref(activeModel),"onUpdate:modelValue":_cache$1[4]||=$event=>isRef(activeModel)?activeModel.value=$event:null,"search-query":unref(modelSearchQuery),"onUpdate:searchQuery":_cache$1[5]||=$event=>isRef(modelSearchQuery)?modelSearchQuery.value=$event:null,items:unref(providerModels).sort((a$1,b$1)=>a$1.id===unref(activeModel)?-1:b$1.id===unref(activeModel)?1:0),searchable:!0,"search-placeholder":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:unref(modelSearchQuery)}),"search-results-text":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":unref(t$1)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"list-class":`max-h-[calc(100dvh-17rem)] sm:max-h-120`},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`])]),createVNode(unref(Button_default),{variant:`primary`,disabled:!canSave.value,label:unref(t$1)(`settings.dialogs.onboarding.saveAndContinue`),onClick:handleSave},null,8,[`disabled`,`label`])])):createCommentVNode(``,!0)]),_:1},8,[`name`])])}}}),Onboarding_default=__plugin_vue_export_helper_default(Onboarding_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-181bca39`]]),OnboardingDialog_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`OnboardingDialog`,props:{modelValue:{type:Boolean,default:!1,required:!1},modelModifiers:{}},emits:mergeModels([`configured`,`skipped`],[`update:modelValue`]),setup(__props,{emit:__emit}){let emit$1=__emit,showDialog=useModel(__props,`modelValue`),isDesktop=useMediaQuery(`(min-width: 768px)`),screenSafeArea=useScreenSafeArea();return useResizeObserver(document.documentElement,()=>screenSafeArea.update()),onMounted(()=>screenSafeArea.update()),(_ctx,_cache$1)=>unref(isDesktop)?(openBlock(),createBlock(unref(DialogRoot_default),{key:0,open:showDialog.value,"onUpdate:open":_cache$1[2]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(DialogPortal_default),null,{default:withCtx(()=>[createVNode(unref(DialogOverlay_default),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-[9999] bg-black/50 backdrop-blur-sm`}),createVNode(unref(DialogContent_default),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-[9999] max-h-full max-w-2xl w-[92dvw] transform overflow-y-scroll rounded-2xl bg-white p-6 shadow-xl outline-none backdrop-blur-md scrollbar-none -translate-x-1/2 -translate-y-1/2 dark:bg-neutral-900`},{default:withCtx(()=>[createVNode(Onboarding_default,{onConfigured:_cache$1[0]||=$event=>emit$1(`configured`),onSkipped:_cache$1[1]||=$event=>emit$1(`skipped`)})]),_:1})]),_:1})]),_:1},8,[`open`])):(openBlock(),createBlock(unref(St),{key:1,open:showDialog.value,"should-scale-background":``,"onUpdate:open":_cache$1[5]||=value$1=>showDialog.value=value$1},{default:withCtx(()=>[createVNode(unref(DialogPortal_default),null,{default:withCtx(()=>[createVNode(unref(Bt),{class:`fixed inset-0`}),createVNode(unref(Ct),{class:`fixed bottom-0 left-0 right-0 z-1000 mt-20 h-full max-h-[96%] flex flex-col rounded-t-2xl bg-neutral-50 px-4 pt-4 outline-none backdrop-blur-md dark:bg-neutral-900/95`,style:normalizeStyle({paddingBottom:`${Math.max(Number.parseFloat(unref(screenSafeArea).bottom.value.replace(`px`,``)),24)}px`})},{default:withCtx(()=>[createVNode(unref(Nt)),createVNode(Onboarding_default,{onConfigured:_cache$1[3]||=$event=>emit$1(`configured`),onSkipped:_cache$1[4]||=$event=>emit$1(`skipped`)})]),_:1},8,[`style`])]),_:1})]),_:1},8,[`open`]))}}),OnboardingDialog_default=OnboardingDialog_vue_vue_type_script_setup_true_lang_default;const ToasterRootInjectionKey=Symbol(`ToasterRoot`);var ToasterRoot_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ToasterRoot`,emits:[`close`],setup(__props,{emit:__emit}){let emits=__emit;return provide(ToasterRootInjectionKey,{close:id=>emits(`close`,id)}),(_ctx,_cache$1)=>renderSlot(_ctx.$slots,`default`)}}),ToasterRoot_default=ToasterRoot_vue_vue_type_script_setup_true_lang_default;const _hoisted_1$8={key:0,flex:``,"gap-2":``};var ColorPalette_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ColorPalette`,props:{colors:{}},setup(__props){let settings=useSettings();return(_ctx,_cache$1)=>_ctx.colors.length?(openBlock(),createElementBlock(`div`,_hoisted_1$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(_ctx.colors,({hex:hex$2,name:name$2})=>(openBlock(),createBlock(unref(TooltipProvider_default),{key:hex$2||`default`},{default:withCtx(()=>[createVNode(unref(TooltipRoot_default),null,{default:withCtx(()=>[createVNode(unref(TooltipTrigger_default),{transition:`all ease-in-out duration-250`,"size-8":``,"cursor-pointer":``,"rounded-full":``,"bg-primary-500":``,style:normalizeStyle(hex$2?{background:hex$2}:{"--chromatic-hue":unref(DEFAULT_THEME_COLORS_HUE)}),class:normalizeClass(unref(settings).isColorSelectedForPrimary(hex$2)?`scale-120 md:scale-150 mx-1`:`hover:scale-110`),onClick:$event=>unref(settings).applyPrimaryColorFrom(hex$2)},null,8,[`style`,`class`,`onClick`]),createVNode(unref(TooltipPortal_default),null,{default:withCtx(()=>[createVNode(unref(TooltipContent_default),{bg:`white dark:neutral-800`,"rounded-lg":``,"px-3":``,"py-1.5":``,"text-sm":``,"shadow-md":``},{default:withCtx(()=>[createTextVNode(toDisplayString(name$2)+` `,1),createVNode(unref(TooltipArrow_default),{"fill-white":``,"dark:fill-neutral-800":``})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):createCommentVNode(``,!0)}}),ColorPalette_default=ColorPalette_vue_vue_type_script_setup_true_lang_default,ArrowTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`ArrowTransition`,props:{stageTransition:{default:()=>({primaryColor:`#666`,secondaryColor:`#ccc`})}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value.secondaryColor||`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-3`,style:normalizeStyle({zIndex:stageTransition.value.zIndex||100})},null,4))}}),ArrowTransition_default=__plugin_vue_export_helper_default(ArrowTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-17464329`]]),BubbleWaveOutTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`BubbleWaveOutTransition`,props:{stageTransition:{}},setup(__props){let props=__props,colors=computed(()=>props.stageTransition?.colors||[`#eee`,`#ebcb8b`,`#c56370`,`#3f3b52`]);return onMounted(()=>{document.documentElement.style.setProperty(`--circle-expansion-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--circle-expansion-duration`,`${props.stageTransition?.duration||.4}s`),colors.value.forEach((color$2,index$1)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${index$1+1}`,color$2)})}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`circle-expansion-transition`,style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex||100})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(colors.value,(_$1,index$1)=>(openBlock(),createElementBlock(`div`,{key:index$1}))),128))],4))}}),BubbleWaveOutTransition_default=__plugin_vue_export_helper_default(BubbleWaveOutTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-4624be9e`]]),FantasyFallTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`FantasyFallTransition`,props:{stageTransition:{}},setup(__props){let props=__props,direction=computed(()=>props.stageTransition?.direction||`up`),directionClass=computed(()=>`fantasy-fall-${direction.value}`);return onMounted(()=>{document.documentElement.style.setProperty(`--fantasy-fall-color`,props.stageTransition?.primaryColor||`#eee`),document.documentElement.style.setProperty(`--fantasy-fall-duration`,`${props.stageTransition?.duration||.6}s`),document.documentElement.style.setProperty(`--fantasy-fall-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--fantasy-fall-radius-sm`,`${props.stageTransition?.borderRadius?.sm||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-md`,`${props.stageTransition?.borderRadius?.md||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-lg`,`${props.stageTransition?.borderRadius?.lg||`50%`}`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass([`fantasy-fall-transition`,directionClass.value]),style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex??100})},null,6))}}),FantasyFallTransition_default=__plugin_vue_export_helper_default(FantasyFallTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-826171f5`]]),MultipleBlocksRevealTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`MultipleBlocksRevealTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor||`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-4`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},_cache$1[0]||=[createStaticVNode(`
`,5)],4))}}),MultipleBlocksRevealTransition_default=__plugin_vue_export_helper_default(MultipleBlocksRevealTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-4221f976`]]),SlideTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SlideTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor||`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor||`#ccc`);return watch([stageTransition,overlayColor1,overlayColor2],()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,overlayColor2.value)}),onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-1`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},null,4))}}),SlideTransition_default=__plugin_vue_export_helper_default(SlideTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-81c0af14`]]),SlopeSlideTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`SlopeSlideTransition`,props:{stageTransition:{}},setup(__props){let props=__props,stageTransition=computed(()=>props.stageTransition),overlayColor1=computed(()=>stageTransition.value?.primaryColor??`#666`),overlayColor2=computed(()=>stageTransition.value?.secondaryColor??`#ccc`);return onMounted(()=>{document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-1`,overlayColor1.value),document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-2`,overlayColor2.value)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`stage-transition-2`,style:normalizeStyle({zIndex:stageTransition.value?.zIndex??100})},null,4))}}),SlopeSlideTransition_default=__plugin_vue_export_helper_default(SlopeSlideTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-9e8b66c8`]]),RectanglesRotateTransition_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`RectanglesRotateTransition`,props:{stageTransition:{}},setup(__props){let props=__props;return onMounted(()=>{document.documentElement.style.setProperty(`--rectangle-rotate-1-color`,props.stageTransition?.primaryColor||`#ebcb8b`),document.documentElement.style.setProperty(`--rectangle-rotate-2-color`,props.stageTransition?.secondaryColor||`#c56370`),document.documentElement.style.setProperty(`--rectangle-rotate-3-color`,props.stageTransition?.tertiaryColor||`#43445b`),document.documentElement.style.setProperty(`--rectangle-rotate-duration`,`${props.stageTransition?.duration||.6}s`),document.documentElement.style.setProperty(`--rectangle-rotate-delay`,`${props.stageTransition?.delay||0}s`),document.documentElement.style.setProperty(`--rectangle-rotate-stagger`,`${props.stageTransition?.staggerDelay||.1}s`),document.documentElement.style.setProperty(`--rectangle-rotate-rotation`,`${props.stageTransition?.rotation||270}deg`)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`rectangle-rotate-transition`,style:normalizeStyle({zIndex:_ctx.stageTransition?.zIndex??100})},_cache$1[0]||=[createBaseVNode(`div`,{class:`rectangle rectangle-rotate-1`},[createBaseVNode(`div`)],-1),createBaseVNode(`div`,{class:`rectangle rectangle-rotate-2`},[createBaseVNode(`div`)],-1),createBaseVNode(`div`,{class:`rectangle rectangle-rotate-3`},[createBaseVNode(`div`)],-1)],4))}}),RectanglesRotateTransition_default=__plugin_vue_export_helper_default(RectanglesRotateTransition_vue_vue_type_script_setup_true_lang_default,[[`__scopeId`,`data-v-45ea2f7f`]]),StageTransitionGroup_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`StageTransitionGroup`,props:{primaryColor:{},secondaryColor:{},tertiaryColor:{},colors:{},zIndex:{},disableTransitions:{type:Boolean},usePageSpecificTransitions:{type:Boolean}},setup(__props){let props=__props,router$1=useRouter(),showTransition=ref(!1),transitionStage=ref(),activeTransitionName=ref(``),activeStageTransitionParams=ref(),transitions=shallowRef({slide:{component:SlideTransition_default,duration:2700},"slope-slide":{component:SlopeSlideTransition_default,duration:2700},arrow:{component:ArrowTransition_default,duration:2700},"multiple-blocks-reveal":{component:MultipleBlocksRevealTransition_default,duration:2800},"fantasy-fall":{component:FantasyFallTransition_default,duration:2700},"rectangles-rotate":{component:RectanglesRotateTransition_default,duration:2700},"bubble-wave-out":{component:BubbleWaveOutTransition_default,duration:1e3}}),lifecycleHooks=ref([]);function addTransitionHook(hook){return lifecycleHooks.value.push(hook),()=>{let index$1=lifecycleHooks.value.indexOf(hook);index$1>=0&&lifecycleHooks.value.splice(index$1,1)}}async function triggerHooks(stage,data$12={}){transitionStage.value=stage;for(let hook of lifecycleHooks.value)try{await Promise.resolve(hook(stage,data$12))}catch(error){console.error(`Error in transition hook at stage "${stage}":`,error)}}async function triggerTransitionAsyncFn(params,next,resolve$1){if(params.name===`none`||!params.name){next(),resolve$1();return}let transition=transitions.value[params.name];if(!transition){console.error(`Transition ${params.name} not found`),next(),resolve$1();return}let navTiming=transition.nextDelay===void 0?transition.duration/3:transition.nextDelay,hasNavigated=!1,navigationHook=stage=>{stage===`navigation`&&!hasNavigated&&(hasNavigated=!0,next())},removeNavHook=addTransitionHook(navigationHook);try{await triggerHooks(`before-enter`,{transitionName:params.name}),showTransition.value&&(await triggerHooks(`before-leave`,{transitionName:activeTransitionName.value}),activeTransitionName.value=``,activeStageTransitionParams.value=void 0,showTransition.value=!1,await triggerHooks(`after-leave`,{transitionName:activeTransitionName.value}),await new Promise(r$1=>setTimeout(r$1,50))),activeTransitionName.value=params.name,activeStageTransitionParams.value=params,showTransition.value=!0,await triggerHooks(`enter-active`,{transitionName:name}),setTimeout(async()=>{await triggerHooks(`navigation`,{transitionName:params.name,config:transition}),hasNavigated||(hasNavigated=!0,next())},navTiming),setTimeout(async()=>{await triggerHooks(`after-enter`,{transitionName:params.name})},transition.duration),setTimeout(async()=>{await triggerHooks(`before-leave`,{transitionName:params.name})},transition.duration+10),setTimeout(async()=>{await triggerHooks(`leave-active`,{transitionName:params.name})},transition.duration+20);let totalDuration=transition.exitDuration??0;setTimeout(async()=>{showTransition.value=!1,activeTransitionName.value=``,activeStageTransitionParams.value=void 0,await triggerHooks(`after-leave`,{transitionName:params.name}),resolve$1()},transition.duration+totalDuration)}catch(error){console.error(error)}finally{removeNavHook(),setTimeout(()=>{hasNavigated||(hasNavigated=!0,next())},transition.duration*2)}}function triggerTransition(params,next){return new Promise(resolve$1=>{triggerTransitionAsyncFn(params,next,resolve$1)})}return router$1.beforeEach((to$1,_from,next)=>{if(props.disableTransitions){next();return}if(typeof to$1.meta.stageTransition!=`object`){next();return}let stageTransition=to$1.meta.stageTransition;if(props.usePageSpecificTransitions&&stageTransition.pageSpecificAvailable){next();return}props.primaryColor!==void 0&&(stageTransition.primaryColor=props.primaryColor),props.secondaryColor!==void 0&&(stageTransition.secondaryColor=props.secondaryColor),props.tertiaryColor!==void 0&&(stageTransition.tertiaryColor=props.tertiaryColor),props.colors!==void 0&&(stageTransition.colors=props.colors),props.zIndex!==void 0&&(stageTransition.zIndex=props.zIndex),triggerTransition(stageTransition,next)}),(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[renderSlot(_ctx.$slots,`default`),showTransition.value?(openBlock(),createElementBlock(Fragment,{key:0},[transitions.value[activeTransitionName.value]?(openBlock(),createBlock(resolveDynamicComponent(transitions.value[activeTransitionName.value].component),{key:0,"stage-transition":activeStageTransitionParams.value},null,8,[`stage-transition`])):createCommentVNode(``,!0)],64)):createCommentVNode(``,!0)],64))}}),StageTransitionGroup_default=StageTransitionGroup_vue_vue_type_script_setup_true_lang_default;let toastsCounter=1;var Observer=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=subscriber=>(this.subscribers.push(subscriber),()=>{let index$1=this.subscribers.indexOf(subscriber);this.subscribers.splice(index$1,1)});publish=data$12=>{this.subscribers.forEach(subscriber=>subscriber(data$12))};addToast=data$12=>{this.publish(data$12),this.toasts=[...this.toasts,data$12]};create=data$12=>{let{message:message$1,...rest}=data$12,id=typeof data$12.id==`number`||data$12.id&&data$12.id?.length>0?data$12.id:toastsCounter++,alreadyExists=this.toasts.find(toast$1=>toast$1.id===id),dismissible=data$12.dismissible===void 0?!0:data$12.dismissible;return this.dismissedToasts.has(id)&&this.dismissedToasts.delete(id),alreadyExists?this.toasts=this.toasts.map(toast$1=>toast$1.id===id?(this.publish({...toast$1,...data$12,id,title:message$1}),{...toast$1,...data$12,id,dismissible,title:message$1}):toast$1):this.addToast({title:message$1,...rest,dismissible,id}),id};dismiss=id=>(id?(this.dismissedToasts.add(id),requestAnimationFrame(()=>this.subscribers.forEach(subscriber=>subscriber({id,dismiss:!0})))):this.toasts.forEach(toast$1=>{this.subscribers.forEach(subscriber=>subscriber({id:toast$1.id,dismiss:!0}))}),id);message=(message$1,data$12)=>this.create({...data$12,message:message$1,type:`default`});error=(message$1,data$12)=>this.create({...data$12,type:`error`,message:message$1});success=(message$1,data$12)=>this.create({...data$12,type:`success`,message:message$1});info=(message$1,data$12)=>this.create({...data$12,type:`info`,message:message$1});warning=(message$1,data$12)=>this.create({...data$12,type:`warning`,message:message$1});loading=(message$1,data$12)=>this.create({...data$12,type:`loading`,message:message$1});promise=(promise,data$12)=>{if(!data$12)return;let id;data$12.loading!==void 0&&(id=this.create({...data$12,promise,type:`loading`,message:data$12.loading,description:typeof data$12.description==`function`?void 0:data$12.description}));let p$4=Promise.resolve(promise instanceof Function?promise():promise),shouldDismiss=id!==void 0,result,originalPromise=p$4.then(async response=>{result=[`resolve`,response];let isVueComponent=isVNode(response);if(isVueComponent)shouldDismiss=!1,this.create({id,type:`default`,message:response});else if(isHttpResponse(response)&&!response.ok){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(`HTTP error! status: ${response.status}`):data$12.error,description=typeof data$12.description==`function`?await data$12.description(`HTTP error! status: ${response.status}`):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id||``};this.create({id,type:`error`,description,...toastSettings})}else if(response instanceof Error){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(response):data$12.error,description=typeof data$12.description==`function`?await data$12.description(response):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id||``};this.create({id,type:`error`,description,...toastSettings})}else if(data$12.success!==void 0){shouldDismiss=!1;let promiseData=typeof data$12.success==`function`?await data$12.success(response):data$12.success,description=typeof data$12.description==`function`?await data$12.description(response):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id||``};this.create({id,type:`success`,description,...toastSettings})}}).catch(async error=>{if(result=[`reject`,error],data$12.error!==void 0){shouldDismiss=!1;let promiseData=typeof data$12.error==`function`?await data$12.error(error):data$12.error,description=typeof data$12.description==`function`?await data$12.description(error):data$12.description,isExtendedResult=typeof promiseData==`object`&&!isVNode(promiseData),toastSettings=isExtendedResult?promiseData:{message:promiseData||``,id:id||``};this.create({id,type:`error`,description,...toastSettings})}}).finally(()=>{shouldDismiss&&(this.dismiss(id),id=void 0),data$12.finally?.()}),unwrap=()=>new Promise((resolve$1,reject)=>originalPromise.then(()=>result[0]===`reject`?reject(result[1]):resolve$1(result[1])).catch(reject));return typeof id!=`string`&&typeof id!=`number`?{unwrap}:Object.assign(id,{unwrap})};custom=(component,data$12)=>{let id=data$12?.id||toastsCounter++;return this.publish({component,id,...data$12}),id};getActiveToasts=()=>this.toasts.filter(toast$1=>!this.dismissedToasts.has(toast$1.id))};const ToastState=new Observer;function toastFunction(message$1,data$12){let id=data$12?.id||toastsCounter++;return ToastState.create({message:message$1,id,type:`default`,...data$12}),id}const isHttpResponse=data$12=>data$12&&typeof data$12==`object`&&`ok`in data$12&&typeof data$12.ok==`boolean`&&`status`in data$12&&typeof data$12.status==`number`,basicToast=toastFunction,getHistory=()=>ToastState.toasts,getToasts=()=>ToastState.getActiveToasts(),toast=Object.assign(basicToast,{success:ToastState.success,info:ToastState.info,warning:ToastState.warning,error:ToastState.error,custom:ToastState.custom,message:ToastState.message,promise:ToastState.promise,dismiss:ToastState.dismiss,loading:ToastState.loading},{getHistory,getToasts});function isAction(action){return action.label!==void 0}const VISIBLE_TOASTS_AMOUNT=3,VIEWPORT_OFFSET=`24px`,MOBILE_VIEWPORT_OFFSET=`16px`,TOAST_LIFETIME=4e3,TOAST_WIDTH=356,GAP=14,SWIPE_THRESHOLD=45,TIME_BEFORE_UNMOUNT=200;function useIsDocumentHidden(){let isDocumentHidden=ref(!1);return watchEffect(()=>{let callback=()=>{isDocumentHidden.value=document.hidden};return document.addEventListener(`visibilitychange`,callback),()=>window.removeEventListener(`visibilitychange`,callback)}),{isDocumentHidden}}function cn(...classes){return classes.filter(Boolean).join(` `)}function getDefaultSwipeDirections(position$2){let[y,x$1]=position$2.split(`-`),directions=[];return y&&directions.push(y),x$1&&directions.push(x$1),directions}function assignOffset(defaultOffset$1,mobileOffset){let styles={};return[defaultOffset$1,mobileOffset].forEach((offset$2,index$1)=>{let isMobile=index$1===1,prefix=isMobile?`--mobile-offset`:`--offset`,defaultValue=isMobile?MOBILE_VIEWPORT_OFFSET:VIEWPORT_OFFSET;function assignAll(offset$1$1){[`top`,`right`,`bottom`,`left`].forEach(key$2=>{styles[`${prefix}-${key$2}`]=typeof offset$1$1==`number`?`${offset$1$1}px`:offset$1$1})}typeof offset$2==`number`||typeof offset$2==`string`?assignAll(offset$2):typeof offset$2==`object`?[`top`,`right`,`bottom`,`left`].forEach(key$2=>{offset$2[key$2]===void 0?styles[`${prefix}-${key$2}`]=defaultValue:styles[`${prefix}-${key$2}`]=typeof offset$2[key$2]==`number`?`${offset$2[key$2]}px`:offset$2[key$2]}):assignAll(defaultValue)}),styles}const _hoisted_1$7=[`data-rich-colors`,`data-styled`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-invert`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`],_hoisted_2$2=[`aria-label`,`data-disabled`];var Toast_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Toast`,props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:[`update:heights`,`update:height`,`removeToast`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,swipeDirection=ref(null),swipeOutDirection=ref(null),mounted=ref(!1),removed=ref(!1),swiping=ref(!1),swipeOut=ref(!1),swiped=ref(!1),offsetBeforeRemove=ref(0),initialHeight=ref(0),remainingTime=ref(props.toast.duration||props.duration||TOAST_LIFETIME),dragStartTime=ref(null),toastRef=ref(null),isFront=computed(()=>props.index===0),isVisible=computed(()=>props.index+1<=props.visibleToasts),toastType=computed(()=>props.toast.type),dismissible=computed(()=>props.toast.dismissible!==!1),toastClass=computed(()=>props.toast.class||``),toastDescriptionClass=computed(()=>props.descriptionClass||``),heightIndex=computed(()=>{let currentPosition=props.toast.position||props.position,samePositionHeights=props.heights.filter(h$1=>h$1.position===currentPosition),index$1=samePositionHeights.findIndex(height=>height.toastId===props.toast.id);return index$1>=0?index$1:0}),toastsHeightBefore=computed(()=>{let currentPosition=props.toast.position||props.position,samePositionHeights=props.heights.filter(h$1=>h$1.position===currentPosition);return samePositionHeights.reduce((prev,curr,reducerIndex)=>reducerIndex>=heightIndex.value?prev:prev+curr.height,0)}),offset$2=computed(()=>heightIndex.value*props.gap+toastsHeightBefore.value||0),closeButton=computed(()=>props.toast.closeButton??props.closeButton),duration$2=computed(()=>props.toast.duration||props.duration||TOAST_LIFETIME),closeTimerStartTimeRef=ref(0),lastCloseTimerStartTimeRef=ref(0),pointerStartRef=ref(null),coords$1=computed(()=>props.position.split(`-`)),y=computed(()=>coords$1.value[0]),x$1=computed(()=>coords$1.value[1]),isStringOfTitle=computed(()=>typeof props.toast.title!=`string`),isStringOfDescription=computed(()=>typeof props.toast.description!=`string`),{isDocumentHidden}=useIsDocumentHidden(),disabled=computed(()=>toastType.value&&toastType.value===`loading`);onMounted(()=>{mounted.value=!0,remainingTime.value=duration$2.value}),watchEffect(async()=>{if(!mounted.value||!toastRef.value)return;await nextTick();let toastNode=toastRef.value,originalHeight=toastNode.style.height;toastNode.style.height=`auto`;let newHeight=toastNode.getBoundingClientRect().height;toastNode.style.height=originalHeight,initialHeight.value=newHeight,emit$1(`update:height`,{toastId:props.toast.id,height:newHeight,position:props.toast.position||props.position})});function deleteToast(){removed.value=!0,offsetBeforeRemove.value=offset$2.value,setTimeout(()=>{emit$1(`removeToast`,props.toast)},TIME_BEFORE_UNMOUNT)}function handleCloseToast(){if(disabled.value||!dismissible.value)return{};deleteToast(),props.toast.onDismiss?.(props.toast)}function onPointerDown(event){disabled.value||!dismissible.value||(dragStartTime.value=new Date,offsetBeforeRemove.value=offset$2.value,event.target.setPointerCapture(event.pointerId),event.target.tagName!==`BUTTON`&&(swiping.value=!0,pointerStartRef.value={x:event.clientX,y:event.clientY}))}function onPointerUp(){if(swipeOut.value||!dismissible.value)return;pointerStartRef.value=null;let swipeAmountX=Number(toastRef.value?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),swipeAmountY=Number(toastRef.value?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),timeTaken=new Date().getTime()-(dragStartTime.value?.getTime()||0),swipeAmount=swipeDirection.value===`x`?swipeAmountX:swipeAmountY,velocity=Math.abs(swipeAmount)/timeTaken;if(Math.abs(swipeAmount)>=SWIPE_THRESHOLD||velocity>.11){offsetBeforeRemove.value=offset$2.value,props.toast.onDismiss?.(props.toast),swipeDirection.value===`x`?swipeOutDirection.value=swipeAmountX>0?`right`:`left`:swipeOutDirection.value=swipeAmountY>0?`down`:`up`,deleteToast(),swipeOut.value=!0;return}else toastRef.value?.style.setProperty(`--swipe-amount-x`,`0px`),toastRef.value?.style.setProperty(`--swipe-amount-y`,`0px`);swiped.value=!1,swiping.value=!1,swipeDirection.value=null}function onPointerMove(event){if(!pointerStartRef.value||!dismissible.value)return;let isHighlighted=window?.getSelection()?.toString()?.length??!1;if(isHighlighted)return;let yDelta=event.clientY-pointerStartRef.value.y,xDelta=event.clientX-pointerStartRef.value.x,swipeDirections=props.swipeDirections??getDefaultSwipeDirections(props.position);!swipeDirection.value&&(Math.abs(xDelta)>1||Math.abs(yDelta)>1)&&(swipeDirection.value=Math.abs(xDelta)>Math.abs(yDelta)?`x`:`y`);let swipeAmount={x:0,y:0},getDampening=delta=>{let factor$1=Math.abs(delta)/20;return 1/(1.5+factor$1)};if(swipeDirection.value===`y`){if(swipeDirections.includes(`top`)||swipeDirections.includes(`bottom`))if(swipeDirections.includes(`top`)&&yDelta<0||swipeDirections.includes(`bottom`)&&yDelta>0)swipeAmount.y=yDelta;else{let dampenedDelta=yDelta*getDampening(yDelta);swipeAmount.y=Math.abs(dampenedDelta)0)swipeAmount.x=xDelta;else{let dampenedDelta=xDelta*getDampening(xDelta);swipeAmount.x=Math.abs(dampenedDelta)0||Math.abs(swipeAmount.y)>0)&&(swiped.value=!0),toastRef.value?.style.setProperty(`--swipe-amount-x`,`${swipeAmount.x}px`),toastRef.value?.style.setProperty(`--swipe-amount-y`,`${swipeAmount.y}px`)}onMounted(()=>{if(mounted.value=!0,!toastRef.value)return;let height=toastRef.value.getBoundingClientRect().height;initialHeight.value=height;let newHeights=[{toastId:props.toast.id,height,position:props.toast.position},...props.heights];emit$1(`update:heights`,newHeights)}),onBeforeUnmount(()=>{toastRef.value&&emit$1(`removeToast`,props.toast)}),watchEffect(onInvalidate=>{if(props.toast.promise&&toastType.value===`loading`||props.toast.duration===1/0||props.toast.type===`loading`)return;let timeoutId,pauseTimer=()=>{if(lastCloseTimerStartTimeRef.value{remainingTime.value!==1/0&&(closeTimerStartTimeRef.value=new Date().getTime(),timeoutId=setTimeout(()=>{props.toast.onAutoClose?.(props.toast),deleteToast()},remainingTime.value))};props.expanded||props.interacting||isDocumentHidden.value?pauseTimer():startTimer(),onInvalidate(()=>{clearTimeout(timeoutId)})}),watch(()=>props.toast.delete,value$1=>{value$1!==void 0&&value$1&&deleteToast()},{deep:!0});function handleDragEnd(){swiping.value=!1,swipeDirection.value=null,pointerStartRef.value=null}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`li`,{tabindex:`0`,ref_key:`toastRef`,ref:toastRef,class:normalizeClass(unref(cn)(props.class,toastClass.value,_ctx.classes?.toast,_ctx.toast.classes?.toast,_ctx.classes?.[toastType.value],_ctx.toast?.classes?.[toastType.value])),"data-sonner-toast":``,"data-rich-colors":_ctx.toast.richColors??_ctx.defaultRichColors,"data-styled":!(_ctx.toast.component||_ctx.toast?.unstyled||_ctx.unstyled),"data-mounted":mounted.value,"data-promise":!!_ctx.toast.promise,"data-swiped":swiped.value,"data-removed":removed.value,"data-visible":isVisible.value,"data-y-position":y.value,"data-x-position":x$1.value,"data-index":_ctx.index,"data-front":isFront.value,"data-swiping":swiping.value,"data-dismissible":dismissible.value,"data-type":toastType.value,"data-invert":_ctx.toast.invert||_ctx.invert,"data-swipe-out":swipeOut.value,"data-swipe-direction":swipeOutDirection.value,"data-expanded":!!(_ctx.expanded||_ctx.expandByDefault&&mounted.value),style:normalizeStyle({"--index":_ctx.index,"--toasts-before":_ctx.index,"--z-index":_ctx.toasts.length-_ctx.index,"--offset":`${removed.value?offsetBeforeRemove.value:offset$2.value}px`,"--initial-height":_ctx.expandByDefault?`auto`:`${initialHeight.value}px`,..._ctx.style,...props.toast.style}),onDragend:handleDragEnd,onPointerdown:onPointerDown,onPointerup:onPointerUp,onPointermove:onPointerMove},[closeButton.value&&!_ctx.toast.component&&toastType.value!==`loading`?(openBlock(),createElementBlock(`button`,{key:0,"aria-label":_ctx.closeButtonAriaLabel||`Close toast`,"data-disabled":disabled.value,"data-close-button":`true`,class:normalizeClass(unref(cn)(_ctx.classes?.closeButton,_ctx.toast?.classes?.closeButton)),onClick:handleCloseToast},[_ctx.icons?.close?(openBlock(),createBlock(resolveDynamicComponent(_ctx.icons?.close),{key:0})):renderSlot(_ctx.$slots,`close-icon`,{key:1})],10,_hoisted_2$2)):createCommentVNode(`v-if`,!0),_ctx.toast.component?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.component),mergeProps({key:1},_ctx.toast.componentProps,{onCloseToast:handleCloseToast}),null,16)):(openBlock(),createElementBlock(Fragment,{key:2},[toastType.value!==`default`||_ctx.toast.icon||_ctx.toast.promise?(openBlock(),createElementBlock(`div`,{key:0,"data-icon":``,class:normalizeClass(unref(cn)(_ctx.classes?.icon,_ctx.toast?.classes?.icon))},[_ctx.toast.icon?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.icon),{key:0})):(openBlock(),createElementBlock(Fragment,{key:1},[toastType.value===`loading`?renderSlot(_ctx.$slots,`loading-icon`,{key:0}):toastType.value===`success`?renderSlot(_ctx.$slots,`success-icon`,{key:1}):toastType.value===`error`?renderSlot(_ctx.$slots,`error-icon`,{key:2}):toastType.value===`warning`?renderSlot(_ctx.$slots,`warning-icon`,{key:3}):toastType.value===`info`?renderSlot(_ctx.$slots,`info-icon`,{key:4}):createCommentVNode(`v-if`,!0)],64))],2)):createCommentVNode(`v-if`,!0),createBaseVNode(`div`,{"data-content":``,class:normalizeClass(unref(cn)(_ctx.classes?.content,_ctx.toast?.classes?.content))},[createBaseVNode(`div`,{"data-title":``,class:normalizeClass(unref(cn)(_ctx.classes?.title,_ctx.toast.classes?.title))},[isStringOfTitle.value?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.title),normalizeProps(mergeProps({key:0},_ctx.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(_ctx.toast.title),1)],64))],2),_ctx.toast.description?(openBlock(),createElementBlock(`div`,{key:0,"data-description":``,class:normalizeClass(unref(cn)(_ctx.descriptionClass,toastDescriptionClass.value,_ctx.classes?.description,_ctx.toast.classes?.description))},[isStringOfDescription.value?(openBlock(),createBlock(resolveDynamicComponent(_ctx.toast.description),normalizeProps(mergeProps({key:0},_ctx.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(_ctx.toast.description),1)],64))],2)):createCommentVNode(`v-if`,!0)],2),_ctx.toast.cancel?(openBlock(),createElementBlock(`button`,{key:1,style:normalizeStyle(_ctx.toast.cancelButtonStyle||_ctx.cancelButtonStyle),class:normalizeClass(unref(cn)(_ctx.classes?.cancelButton,_ctx.toast.classes?.cancelButton)),"data-button":``,"data-cancel":``,onClick:_cache$1[0]||=event=>{unref(isAction)(_ctx.toast.cancel)&&dismissible.value&&(_ctx.toast.cancel.onClick?.(event),deleteToast())}},toDisplayString(unref(isAction)(_ctx.toast.cancel)?_ctx.toast.cancel?.label:_ctx.toast.cancel),7)):createCommentVNode(`v-if`,!0),_ctx.toast.action?(openBlock(),createElementBlock(`button`,{key:2,style:normalizeStyle(_ctx.toast.actionButtonStyle||_ctx.actionButtonStyle),class:normalizeClass(unref(cn)(_ctx.classes?.actionButton,_ctx.toast.classes?.actionButton)),"data-button":``,"data-action":``,onClick:_cache$1[1]||=event=>{unref(isAction)(_ctx.toast.action)&&(_ctx.toast.action.onClick?.(event),!event.defaultPrevented&&deleteToast())}},toDisplayString(unref(isAction)(_ctx.toast.action)?_ctx.toast.action?.label:_ctx.toast.action),7)):createCommentVNode(`v-if`,!0)],64))],46,_hoisted_1$7))}}),Toast_default=Toast_vue_vue_type_script_setup_true_lang_default,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};const _sfc_main$4={},_hoisted_1$6={xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stoke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`};function _sfc_render$4(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$6,_cache$1[0]||=[createBaseVNode(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1),createBaseVNode(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1)])}var CloseIcon_default=export_helper_default(_sfc_main$4,[[`render`,_sfc_render$4]]);const _hoisted_1$5=[`data-visible`],_hoisted_2$1={class:`sonner-spinner`};var Loader_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Loader`,props:{visible:{type:Boolean}},setup(__props){let bars=Array(12).fill(0);return(_ctx,_cache$1)=>(openBlock(),createElementBlock(`div`,{class:`sonner-loading-wrapper`,"data-visible":_ctx.visible},[createBaseVNode(`div`,_hoisted_2$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(bars),bar=>(openBlock(),createElementBlock(`div`,{key:`spinner-bar-${bar}`,class:`sonner-loading-bar`}))),128))])],8,_hoisted_1$5))}}),Loader_default=Loader_vue_vue_type_script_setup_true_lang_default;const _sfc_main$3={},_hoisted_1$4={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$3(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$4,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,"clip-rule":`evenodd`},null,-1)])}var SuccessIcon_default=export_helper_default(_sfc_main$3,[[`render`,_sfc_render$3]]);const _sfc_main$2={},_hoisted_1$3={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$2(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$3,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,"clip-rule":`evenodd`},null,-1)])}var InfoIcon_default=export_helper_default(_sfc_main$2,[[`render`,_sfc_render$2]]);const _sfc_main$1={},_hoisted_1$2={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render$1(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$2,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,"clip-rule":`evenodd`},null,-1)])}var WarningIcon_default=export_helper_default(_sfc_main$1,[[`render`,_sfc_render$1]]);const _sfc_main={},_hoisted_1$1={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function _sfc_render(_ctx,_cache$1){return openBlock(),createElementBlock(`svg`,_hoisted_1$1,_cache$1[0]||=[createBaseVNode(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,"clip-rule":`evenodd`},null,-1)])}var ErrorIcon_default=export_helper_default(_sfc_main,[[`render`,_sfc_render]]);const _hoisted_1=[`aria-label`],_hoisted_2=[`data-sonner-theme`,`dir`,`data-theme`,`data-rich-colors`,`data-y-position`,`data-x-position`,`data-lifted`],isClient=typeof window<`u`&&typeof document<`u`;function getDocumentDirection(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let dirAttribute=document.documentElement.getAttribute(`dir`);return dirAttribute===`auto`||!dirAttribute?window.getComputedStyle(document.documentElement).direction:dirAttribute}var Toaster_vue_vue_type_script_setup_true_lang_default=defineComponent({name:`Toaster`,inheritAttrs:!1,__name:`Toaster`,props:{invert:{type:Boolean,default:!1},theme:{default:`light`},position:{default:`bottom-right`},hotkey:{default:()=>[`altKey`,`KeyT`]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:GAP},visibleToasts:{default:VISIBLE_TOASTS_AMOUNT},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:``},style:{},offset:{default:VIEWPORT_OFFSET},mobileOffset:{default:MOBILE_VIEWPORT_OFFSET},dir:{default:`auto`},swipeDirections:{},icons:{},containerAriaLabel:{default:`Notifications`}},setup(__props){let props=__props,attrs=useAttrs(),toasts=ref([]);function filteredToasts(pos,index$1){return toasts.value.filter(toast$1=>!toast$1.position&&index$1===0||toast$1.position===pos)}let possiblePositions=computed(()=>{let posList=toasts.value.filter(toast$1=>toast$1.position).map(toast$1=>toast$1.position);return posList.length>0?Array.from(new Set([props.position].concat(posList))):[props.position]}),toastsByPosition=computed(()=>{let result={};return possiblePositions.value.forEach(pos=>{result[pos]=toasts.value.filter(t$1=>t$1.position===pos)}),result}),heights=ref([]),expanded=ref(!1),interacting=ref(!1),actualTheme=ref(props.theme===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:props.theme),listRef=ref(null),lastFocusedElementRef=ref(null),isFocusWithinRef=ref(!1),hotkeyLabel=props.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``);function removeToast(toastToRemove){toasts.value.find(toast$1=>toast$1.id===toastToRemove.id)?.delete||ToastState.dismiss(toastToRemove.id),toasts.value=toasts.value.filter(({id})=>id!==toastToRemove.id),setTimeout(()=>{toasts.value.find(t$1=>t$1.id===toastToRemove.id)||(heights.value=heights.value.filter(h$1=>h$1.toastId!==toastToRemove.id))},TIME_BEFORE_UNMOUNT+50)}function onBlur(event){isFocusWithinRef.value&&!event.currentTarget?.contains?.(event.relatedTarget)&&(isFocusWithinRef.value=!1,lastFocusedElementRef.value&&(lastFocusedElementRef.value.focus({preventScroll:!0}),lastFocusedElementRef.value=null))}function onFocus(event){let isNotDismissible=event.target instanceof HTMLElement&&event.target.dataset.dismissible===`false`;isNotDismissible||isFocusWithinRef.value||(isFocusWithinRef.value=!0,lastFocusedElementRef.value=event.relatedTarget)}function onPointerDown(event){if(event.target){let isNotDismissible=event.target instanceof HTMLElement&&event.target.dataset.dismissible===`false`;if(isNotDismissible)return}interacting.value=!0}watchEffect(onInvalidate=>{let unsubscribe=ToastState.subscribe(toast$1=>{if(toast$1.dismiss){requestAnimationFrame(()=>{toasts.value=toasts.value.map(t$1=>t$1.id===toast$1.id?{...t$1,delete:!0}:t$1)});return}nextTick(()=>{let indexOfExistingToast=toasts.value.findIndex(t$1=>t$1.id===toast$1.id);indexOfExistingToast===-1?toasts.value=[toast$1,...toasts.value]:toasts.value=[...toasts.value.slice(0,indexOfExistingToast),{...toasts.value[indexOfExistingToast],...toast$1},...toasts.value.slice(indexOfExistingToast+1)]})});onInvalidate(unsubscribe)}),watchEffect(onInvalidate=>{if(typeof window>`u`)return;if(props.theme!==`system`){actualTheme.value=props.theme;return}let darkMediaQuery=window.matchMedia(`(prefers-color-scheme: dark)`),updateTheme=matches$1=>{actualTheme.value=matches$1?`dark`:`light`};updateTheme(darkMediaQuery.matches);let handler=event=>{updateTheme(event.matches)};try{darkMediaQuery.addEventListener(`change`,handler)}catch{darkMediaQuery.addListener(handler)}onInvalidate(()=>{try{darkMediaQuery.removeEventListener(`change`,handler)}catch{darkMediaQuery.removeListener(handler)}})}),watchEffect(()=>{listRef.value&&lastFocusedElementRef.value&&(lastFocusedElementRef.value.focus({preventScroll:!0}),lastFocusedElementRef.value=null,isFocusWithinRef.value=!1)}),watchEffect(()=>{toasts.value.length<=1&&(expanded.value=!1)}),watchEffect(onInvalidate=>{function handleKeyDown(event){let isHotkeyPressed=props.hotkey.every(key$2=>event[key$2]||event.code===key$2),listRefItem=Array.isArray(listRef.value)?listRef.value[0]:listRef.value;isHotkeyPressed&&(expanded.value=!0,listRefItem?.focus());let isItemActive=document.activeElement===listRef.value||listRefItem?.contains(document.activeElement);event.code===`Escape`&&isItemActive&&(expanded.value=!1)}isClient&&(document.addEventListener(`keydown`,handleKeyDown),onInvalidate(()=>{document.removeEventListener(`keydown`,handleKeyDown)}))});function handleMouseEnter(){expanded.value=!0}function handleMouseLeave(){interacting.value||(expanded.value=!1)}function handleDragEnd(){expanded.value=!1}function handlePointerUp(){interacting.value=!1}function updateHeights(h$1){heights.value=h$1}function updateHeight(h$1){let index$1=heights.value.findIndex(item=>item.toastId===h$1.toastId);if(index$1!==-1)heights.value[index$1]=h$1;else{let samePositionIndex=heights.value.findIndex(item=>item.position===h$1.position);samePositionIndex===-1?heights.value.unshift(h$1):heights.value.splice(samePositionIndex,0,h$1)}}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createCommentVNode(` Remove item from normal navigation flow, only available via hotkey `),createBaseVNode(`section`,{"aria-label":`${_ctx.containerAriaLabel} ${unref(hotkeyLabel)}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(possiblePositions.value,(pos,index$1)=>(openBlock(),createElementBlock(`ol`,mergeProps({key:pos,ref_for:!0,ref_key:`listRef`,ref:listRef,"data-sonner-toaster":``,"data-sonner-theme":actualTheme.value,class:props.class,dir:_ctx.dir===`auto`?getDocumentDirection():_ctx.dir,tabIndex:-1,"data-theme":_ctx.theme,"data-rich-colors":_ctx.richColors,"data-y-position":pos.split(`-`)[0],"data-x-position":pos.split(`-`)[1],"data-lifted":expanded.value&&toasts.value.length>1&&!_ctx.expand,style:{"--front-toast-height":`${heights.value[0]?.height||0}px`,"--width":`${unref(TOAST_WIDTH)}px`,"--gap":`${_ctx.gap}px`,..._ctx.style,...unref(attrs).style,...unref(assignOffset)(_ctx.offset,_ctx.mobileOffset)}},_ctx.$attrs,{onBlur,onFocus,onMouseenter:handleMouseEnter,onMousemove:handleMouseEnter,onMouseleave:handleMouseLeave,onDragend:handleDragEnd,onPointerdown:onPointerDown,onPointerup:handlePointerUp}),[(openBlock(!0),createElementBlock(Fragment,null,renderList(filteredToasts(pos,index$1),(toast$1,idx)=>(openBlock(),createBlock(Toast_default,{key:toast$1.id,heights:heights.value,icons:_ctx.icons,index:idx,toast:toast$1,defaultRichColors:_ctx.richColors,duration:_ctx.toastOptions?.duration??_ctx.duration,class:normalizeClass(_ctx.toastOptions?.class??``),descriptionClass:_ctx.toastOptions?.descriptionClass,invert:_ctx.invert,visibleToasts:_ctx.visibleToasts,closeButton:_ctx.toastOptions?.closeButton??_ctx.closeButton,interacting:interacting.value,position:pos,style:normalizeStyle(_ctx.toastOptions?.style),unstyled:_ctx.toastOptions?.unstyled,classes:_ctx.toastOptions?.classes,cancelButtonStyle:_ctx.toastOptions?.cancelButtonStyle,actionButtonStyle:_ctx.toastOptions?.actionButtonStyle,"close-button-aria-label":_ctx.toastOptions?.closeButtonAriaLabel,toasts:toastsByPosition.value[pos],expandByDefault:_ctx.expand,gap:_ctx.gap,expanded:expanded.value,swipeDirections:props.swipeDirections,"onUpdate:heights":updateHeights,"onUpdate:height":updateHeight,onRemoveToast:removeToast},{"close-icon":withCtx(()=>[renderSlot(_ctx.$slots,`close-icon`,{},()=>[createVNode(CloseIcon_default)])]),"loading-icon":withCtx(()=>[renderSlot(_ctx.$slots,`loading-icon`,{},()=>[createVNode(Loader_default,{visible:toast$1.type===`loading`},null,8,[`visible`])])]),"success-icon":withCtx(()=>[renderSlot(_ctx.$slots,`success-icon`,{},()=>[createVNode(SuccessIcon_default)])]),"error-icon":withCtx(()=>[renderSlot(_ctx.$slots,`error-icon`,{},()=>[createVNode(ErrorIcon_default)])]),"warning-icon":withCtx(()=>[renderSlot(_ctx.$slots,`warning-icon`,{},()=>[createVNode(WarningIcon_default)])]),"info-icon":withCtx(()=>[renderSlot(_ctx.$slots,`info-icon`,{},()=>[createVNode(InfoIcon_default)])]),_:2},1032,[`heights`,`icons`,`index`,`toast`,`defaultRichColors`,`duration`,`class`,`descriptionClass`,`invert`,`visibleToasts`,`closeButton`,`interacting`,`position`,`style`,`unstyled`,`classes`,`cancelButtonStyle`,`actionButtonStyle`,`close-button-aria-label`,`toasts`,`expandByDefault`,`gap`,`expanded`,`swipeDirections`]))),128))],16,_hoisted_2))),128))],8,_hoisted_1)],2112))}}),Toaster_default=Toaster_vue_vue_type_script_setup_true_lang_default;const usePWAStore=defineStore(`pwa`,()=>{ref([]);let breakpoints=useBreakpoints(breakpointsTailwind);breakpoints.smaller(`md`),onMounted(async()=>{})});var App_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`App`,setup(__props){usePWAStore();let i18n$1=useI18n(),settings=storeToRefs(useSettings()),onboardingStore=useOnboardingStore(),{shouldShowSetup}=storeToRefs(onboardingStore),isDark=useDark(),primaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 90%, oklch(90% 0 360))`),secondaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 90%, oklch(90% 0 360))`),tertiaryColor=computed(()=>isDark.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 90%, oklch(90% 0 360))`),colors=computed(()=>[primaryColor.value,secondaryColor.value,tertiaryColor.value,isDark.value?`#121212`:`#FFFFFF`]);watch(settings.language,()=>{i18n$1.locale.value=settings.language.value}),watch(settings.themeColorsHue,()=>{document.documentElement.style.setProperty(`--chromatic-hue`,settings.themeColorsHue.value.toString())},{immediate:!0}),watch(settings.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle(`dynamic-hue`,settings.themeColorsHueDynamic.value)},{immediate:!0}),onMounted(()=>{onboardingStore.initializeSetupCheck()});function handleSetupConfigured(){onboardingStore.markSetupCompleted()}function handleSetupSkipped(){onboardingStore.markSetupSkipped()}return(_ctx,_cache$1)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(StageTransitionGroup_default),{"primary-color":primaryColor.value,"secondary-color":secondaryColor.value,"tertiary-color":tertiaryColor.value,colors:colors.value,"z-index":100,"disable-transitions":unref(settings).disableTransitions.value,"use-page-specific-transitions":unref(settings).usePageSpecificTransitions.value},{default:withCtx(()=>[createVNode(unref(RouterView),null,{default:withCtx(({Component})=>[(openBlock(),createBlock(KeepAlive,{include:/IndexScenePage|StageScenePage/},[(openBlock(),createBlock(resolveDynamicComponent(Component)))],1024))]),_:1})]),_:1},8,[`primary-color`,`secondary-color`,`tertiary-color`,`colors`,`disable-transitions`,`use-page-specific-transitions`]),createVNode(unref(ToasterRoot_default),{onClose:_cache$1[0]||=id=>unref(toast).dismiss(id)},{default:withCtx(()=>[createVNode(unref(Toaster_default))]),_:1}),createVNode(unref(OnboardingDialog_default),{modelValue:unref(shouldShowSetup),"onUpdate:modelValue":_cache$1[1]||=$event=>isRef(shouldShowSetup)?shouldShowSetup.value=$event:null,onConfigured:handleSetupConfigured,onSkipped:handleSetupSkipped},null,8,[`modelValue`])],64))}}),App_default=App_vue_vue_type_script_setup_true_lang_default;const languageRemap={"zh-CN":`zh-Hans`,"zh-TW":`zh-Hans`,"zh-HK":`zh-Hans`,"zh-Hant":`zh-Hans`,"en-US":`en`,"en-GB":`en`,"en-AU":`en`,en:`en`};function getLocale(){let language=localStorage.getItem(`settings/language`);language||=navigator.language||`en`;let languages=Object.keys(locales_default);return languageRemap[language||`en`]!=null&&(language=languageRemap[language||`en`]),language&&languages.includes(language)?language:`en`}const i18n=createI18n({legacy:!1,locale:getLocale(),fallbackLocale:`en`,messages:locales_default});var import_nprogress=__toESM(require_nprogress());const pinia=createPinia(),routeRecords=setupLayouts(routes);let router;router=createRouter({routes:routeRecords,history:createWebHashHistory()}),router.beforeEach((to$1,from)=>{to$1.path!==from.path&&import_nprogress.default.start()}),router.afterEach(()=>{import_nprogress.default.done()}),router.isReady().then(async()=>{}).catch(()=>{}),createApp(App_default).use(MotionPlugin).use(autoAnimatePlugin).use(router).use(pinia).use(i18n).use(mo).mount(`#app`);export{_jwt as $,useI18n as A,JSONSchemaGenerator as B,toJSONSchema as C,_array as D,_base64 as E,_base64url as F,_boolean as G,_check as H,_cidrv4 as I,_cidrv6 as J,_cuid as K,_cuid2 as L,_e164 as M,_email as N,_emoji as O,_endsWith as P,_gt as Q,_gte as R,_guid as S,_includes as T,_int as U,_ipv4 as V,_ipv6 as W,_isoDate as X,_isoDateTime as Y,_isoDuration as Z,_isoTime as _,$ZodNumber as a$,_ksuid as a1,_length as a2,_lowercase as a3,_lt as a4,_lte as a5,_maxLength as a6,_minLength as a7,_multipleOf as a8,_nanoid as a9,$ZodBase64URL as aA,$ZodBoolean as aB,$ZodCIDRv4 as aC,$ZodCIDRv6 as aD,$ZodCUID as aE,$ZodCUID2 as aF,$ZodCatch as aG,$ZodCustom as aH,$ZodDefault as aI,$ZodE164 as aJ,$ZodEmail as aK,$ZodEmoji as aL,$ZodEnum as aM,$ZodGUID as aN,$ZodIPv4 as aO,$ZodIPv6 as aP,$ZodISODate as aQ,$ZodISODateTime as aR,$ZodISODuration as aS,$ZodISOTime as aT,$ZodIntersection as aU,$ZodJWT as aV,$ZodKSUID as aW,$ZodNanoID as aX,$ZodNever as aY,$ZodNonOptional as aZ,$ZodNullable as a_,_never as aa,_normalize as ab,_number as ac,_overwrite as ad,_refine as ae,_regex as af,_startsWith as ag,_string as ah,_superRefine as ai,_toLowerCase as aj,_toUpperCase as ak,_trim as al,_ulid as am,_unknown as an,_uppercase as ao,_url as ap,_uuid as aq,_uuidv4 as ar,_uuidv6 as as,_uuidv7 as at,_xid as au,$ZodRegistry as av,globalRegistry as aw,registry as ax,$ZodArray as ay,$ZodBase64 as az,ColorPalette_default as b,randomSaccadeInterval as b$,$ZodNumberFormat as b0,$ZodObject as b1,$ZodOptional as b2,$ZodPipe as b3,$ZodPrefault as b4,$ZodReadonly as b5,$ZodString as b6,$ZodStringFormat as b7,$ZodTransform as b8,$ZodType as b9,$ZodCheckUpperCase as bA,_parse as bB,_parseAsync as bC,_safeParse as bD,_safeParseAsync as bE,safeParse$1 as bF,safeParseAsync$1 as bG,$ZodError as bH,$ZodRealError as bI,flattenError as bJ,formatError as bK,clone as bL,$ZodAsyncError as bM,$constructor as bN,config as bO,globalConfig as bP,missingDependenciesUrl as bQ,tryImport as bR,streamText as bS,useWhisper as bT,useVRMEmote as bU,loadVrm as bV,clipFromVRMAnimation as bW,loadVRMAnimation as bX,useBlink as bY,useIdleEyeSaccades as bZ,VRMUtils as b_,$ZodULID as ba,$ZodURL as bb,$ZodUUID as bc,$ZodUnion as bd,$ZodUnknown as be,$ZodXID as bf,isValidBase64 as bg,isValidBase64URL as bh,isValidJWT as bi,version as bj,Doc as bk,$ZodCheck as bl,$ZodCheckEndsWith as bm,$ZodCheckGreaterThan as bn,$ZodCheckIncludes as bo,$ZodCheckLengthEquals as bp,$ZodCheckLessThan as bq,$ZodCheckLowerCase as br,$ZodCheckMaxLength as bs,$ZodCheckMinLength as bt,$ZodCheckMultipleOf as bu,$ZodCheckNumberFormat as bv,$ZodCheckOverwrite as bw,$ZodCheckRegex as bx,$ZodCheckStartsWith as by,$ZodCheckStringFormat as bz,TranscriptionProviderSettings_default as c,Primitive as c$,lerp$1 as c0,randFloat as c1,useDelayMessageQueue as c2,useEmotionsMessageQueue as c3,useMessageContentQueue as c4,useQueue as c5,useMicVAD as c6,useMarkdown as c7,useAudioRecorder as c8,toWAVBase64 as c9,ThresholdMeter_default as cA,TestDummyMarker_default as cB,LevelMeter_default as cC,PropertyPoint_default as cD,PropertyNumber_default as cE,PropertyColor_default as cF,formatHex as cG,average as cH,Container_default as cI,Select_default as cJ,RoundRange_default as cK,ColorHueRange_default as cL,FieldValues_default as cM,FieldSelect_default as cN,FieldRange_default as cO,__plugin_vue_export_helper_default as cP,FieldKeyValues_default as cQ,FieldInput_default as cR,Input_default as cS,FieldCheckbox_default as cT,Checkbox_default as cU,DialogPortal_default as cV,Teleport_default as cW,DialogOverlay_default as cX,DialogContent_default as cY,DialogRoot_default as cZ,injectDialogRootContext as c_,sleep$1 as ca,merge$3 as cb,useAudioContext as cc,useSpeakingStore as cd,Dialog_default as ce,CursorFloating_default as cf,Skeleton_default as cg,Screen_default as ch,ErrorContainer_default as ci,Button_default as cj,VoiceCardManySelect_default as ck,RadioCardSimple_default as cl,RadioCardManySelect_default as cm,Alert_default as cn,IconStatusItem_default as co,IconItem_default as cp,Section_default as cq,PageHeader_default as cr,Callout_default as cs,TimeSeriesChart_default as ct,llmInferenceEndToken as cu,EMOTION_EmotionMotionName_value as cv,EMOTION_VRMExpressionName_value as cw,Emotion as cx,EmotionNeutralMotionName as cy,EmotionThinkMotionName as cz,TranscriptionPlayground_default as d,createVNode as d$,useForwardPropsEmits as d0,useForwardExpose as d1,useEmitAsProps as d2,createContext as d3,RouterLink as d4,RouterView as d5,useRoute as d6,useRouter as d7,__vitePreload as d8,storeToRefs as d9,DirectionalLightHelper as dA,MOUSE as dB,MathUtils as dC,PerspectiveCamera as dD,Plane as dE,Quaternion as dF,Ray as dG,Raycaster as dH,Spherical as dI,TOUCH as dJ,Vector2 as dK,Vector3 as dL,VectorKeyframeTrack as dM,Transition as dN,vModelCheckbox as dO,vModelSelect as dP,vModelText as dQ,vShow as dR,withModifiers as dS,Fragment as dT,KeepAlive as dU,computed as dV,createBaseVNode as dW,createBlock as dX,createCommentVNode as dY,createElementBlock as dZ,createTextVNode as d_,breakpointsTailwind as da,useBreakpoints as db,useClipboard as dc,useDark as dd,useDevicesList as de,useElementBounding as df,useFileDialog as dg,useLocalStorage as dh,useMouse as di,useObjectUrl as dj,usePointer as dk,useResizeObserver as dl,useScreenSafeArea as dm,useUserMedia as dn,refDebounced as do,refThrottled as dp,until as dq,useDebounceFn as dr,watchDebounced as ds,defu as dt,Ee$1 as du,Vn as dv,io as dw,pe as dx,AnimationMixer as dy,Controls as dz,SpeechProviderSettings_default as e,defineComponent as e0,guardReactiveProps as e1,inject as e2,mergeModels as e3,mergeProps as e4,nextTick as e5,onMounted as e6,onUnmounted as e7,openBlock as e8,renderList as e9,renderSlot as ea,resolveComponent as eb,resolveDirective as ec,useModel as ed,useTemplateRef as ee,watch as ef,withCtx as eg,withDirectives as eh,isRef as ei,ref as ej,shallowRef as ek,toRaw as el,toRef as em,unref as en,normalizeClass as eo,normalizeProps as ep,normalizeStyle as eq,toDisplayString as er,__commonJSMin as es,__export as et,__require as eu,__toDynamicImportESM as ev,__toESM as ew,SpeechPlayground_default as f,ProviderSettingsLayout_default as g,ProviderSettingsContainer_default as h,ProviderBasicSettings_default as i,ProviderBaseUrlInput_default as j,ProviderApiKeyInput_default as k,ProviderAdvancedSettings_default as l,ProviderAccountIdInput_default as m,useVRM as n,useSettings as o,useSettingsAudioDevice as p,useLive2d as q,require_localforage as r,useChatStore as s,useHearingStore as t,useAiriCardStore as u,useSpeechStore as v,generateSpeech as w,useConsciousnessStore as x,useProvidersStore as y,check as z}; \ No newline at end of file diff --git a/assets/index-CdrV4-fw.css b/assets/index-CdrV4-fw.css deleted file mode 100644 index 6ce3fcaa82159c93cae7438f4a379c0192074ab8..0000000000000000000000000000000000000000 --- a/assets/index-CdrV4-fw.css +++ /dev/null @@ -1 +0,0 @@ -.form_input-range[data-v-3a236ac7]{--height:2em;min-height:var(--height);appearance:none;--thumb-width:4px;--thumb-height:var(--height);--thumb-box-shadow:0 0 0px #e6e6e6;--thumb-border:none;--thumb-border-radius:999px;--thumb-background:oklch(80% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-hover:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-active:oklch(70% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--track-height:calc(var(--height) - var(--track-value-padding)*2);--track-box-shadow:none;--track-border:solid 2px #eee;--track-border-radius:6px;--track-background:#eee9;--track-background-hover:#eee9;--track-background-active:#eee9;--track-value-background:#fff;--track-value-background-hover:#fff;--track-value-background-active:#fff;--track-value-padding:2px;background:0 0;border-radius:4px;transition:background-color .2s}.dark .form_input-range[data-v-3a236ac7]{--thumb-background:oklch(70% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-hover:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--thumb-background-active:oklch(80% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0));--track-border:solid 2px #2c2c2c;--track-background:#2c2c2cb3;--track-background-hover:#2c2c2cb3;--track-background-active:#2c2c2cb3;--track-value-background:#a4a4a4;--track-value-background-hover:#a4a4a4;--track-value-background-active:#a4a4a4}.form_input-range.slider-progress[data-v-3a236ac7]{--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min))/var(--range));--sx:calc(.5*0em + var(--ratio)*(100% - 0em))}.form_input-range[data-v-3a236ac7]:focus{outline:none}.form_input-range[data-v-3a236ac7]::-webkit-slider-thumb{appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:calc(var(--track-height)*.5 - var(--thumb-height)*.5 - 2px);margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-3a236ac7]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:var(--track-box-shadow);cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out;position:relative}.form_input-range[data-v-3a236ac7]::-webkit-slider-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width)*1.6);transform:scaleY(1.2)}.form_input-range[data-v-3a236ac7]:hover::-webkit-slider-runnable-track{background:var(--track-background-hover)}.form_input-range[data-v-3a236ac7]::-webkit-slider-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-3a236ac7]:active::-webkit-slider-runnable-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-3a236ac7]::-webkit-slider-runnable-track{margin-right:calc(0 - var(--track-value-padding));background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-3a236ac7]:hover::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover))0/var(--sx)100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-3a236ac7]:active::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active))0/var(--sx)100% no-repeat,var(--track-background-active)}.form_input-range[data-v-3a236ac7]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding));border:none;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-3a236ac7]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding)*2)}.form_input-range[data-v-3a236ac7]::-moz-range-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width)*1.6);transform:scaleY(1.2)}.form_input-range[data-v-3a236ac7]:hover::-moz-range-track{background:var(--track-background-hover)}.form_input-range[data-v-3a236ac7]::-moz-range-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-3a236ac7]:active::-moz-range-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-3a236ac7]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-3a236ac7]:hover::-moz-range-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover))0/var(--sx)100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-3a236ac7]:active::-moz-range-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active))0/var(--sx)100% no-repeat,var(--track-background-active)}.form_input-range[data-v-3a236ac7]::-ms-fill-upper{background:0 0;border-color:#0000}.form_input-range[data-v-3a236ac7]::-ms-fill-lower{background:0 0;border-color:#0000}.form_input-range[data-v-3a236ac7]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));box-sizing:border-box;cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}.form_input-range[data-v-3a236ac7]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-3a236ac7]::-ms-thumb:hover{background:var(--thumb-background-hover);width:calc(var(--thumb-width)*1.6);transform:scaleY(1.2)}.form_input-range[data-v-3a236ac7]:hover::-ms-track{background:var(--track-background-hover)}.form_input-range[data-v-3a236ac7]::-ms-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-3a236ac7]:active::-ms-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-3a236ac7]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius)0 0 var(--track-border-radius);background:var(--track-value-background);margin:0;margin-left:calc(var(--track-value-padding));margin-right:calc(0 - var(--track-value-padding));border:none;border-right-width:0}.form_input-range.slider-progress[data-v-3a236ac7]:hover::-ms-fill-lower{background:var(--track-value-background-hover)}.form_input-range.slider-progress[data-v-3a236ac7]:active::-ms-fill-lower{background:var(--track-value-background-active)}.color-hue-range[data-v-3d01d2fa]{appearance:none;background:linear-gradient(90deg,#ffb2cb,#ffba76,#bedf0d,#00efd2,#90d7ff,#d8bfff,#ffb2cb);background:linear-gradient(90deg,lab(80.0841% 65.3995 .860357),lab(81.7178% 42.879 86.4545),lab(84.2289% -27.648 80.2367),lab(85.1086% -71.1664 -.472653),lab(82.2823% -19.2763 -62.1951),lab(79.7314% 41.9269 -62.2558),lab(80.0841% 65.3994 .860381));border-radius:.5rem;height:2.5rem}.color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(115 115 115/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity));background-color:rgb(38 38 38/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb:hover{width:.5rem;height:3.25rem}.dark .color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(255 255 255/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity));background-color:rgb(212 212 212/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark .color-hue-range[data-v-3d01d2fa]::-webkit-slider-thumb:hover{width:.5rem;height:3.25rem}.color-hue-range[data-v-3d01d2fa]::-moz-range-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(115 115 115/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity));background-color:rgb(38 38 38/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.color-hue-range[data-v-3d01d2fa]::-moz-range-thumb:hover{width:.5rem;height:3.25rem}.dark .color-hue-range[data-v-3d01d2fa]::-moz-range-thumb{cursor:pointer;cursor:col-resize;appearance:none;--un-border-opacity:1;border-width:2px;border-color:rgb(255 255 255/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity));background-color:rgb(212 212 212/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);width:.25rem;height:3rem;box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-radius:.375rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dark .color-hue-range[data-v-3d01d2fa]::-moz-range-thumb:hover{width:.5rem;height:3.25rem}.form_input-round-range[data-v-ac8cc218]{--height:2em;min-height:var(--height);appearance:none;--thumb-width:var(--height);--thumb-height:var(--height);--thumb-box-shadow:none;--thumb-border:none;--thumb-border-radius:0px;--thumb-background:transparent;--track-height:calc(var(--height) - var(--track-value-padding)*2);--track-box-shadow:0 0 12px -2px #00000038;--track-border:none;--track-border-radius:10px;--track-background:#0006;--track-value-background:#fff;--track-value-padding:0px;background:0 0;border-radius:4px;transition:background-color .2s}[data-direction=vertical].form_input-round-range[data-v-ac8cc218]{transform:rotate(180deg)}.dark .form_input-round-range[data-v-ac8cc218]{--thumb-background:#eee;--track-border:none;--track-background:#636363b3;--track-box-shadow:0 0 12px -2px #00000038;--track-value-background:#eee}.form_input-round-range.slider-progress[data-v-ac8cc218]{--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min))/var(--range));--sx:calc(.5*0em + var(--ratio)*(100% - 0em))}.form_input-round-range[data-v-ac8cc218]:focus{outline:none}.form_input-round-range[data-v-ac8cc218]::-webkit-slider-thumb{appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}[data-direction=vertical][data-v-ac8cc218]::-webkit-slider-thumb{cursor:ns-resize}.form_input-round-range[data-v-ac8cc218]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);box-shadow:var(--track-box-shadow);cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out;position:relative;overflow:hidden}[data-direction=vertical][data-v-ac8cc218]::-webkit-slider-runnable-track{cursor:ns-resize}.form_input-round-range.slider-progress[data-v-ac8cc218]::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}[data-direction=vertical].form_input-round-range.slider-progress[data-v-ac8cc218]::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background)var(--sx),var(--track-background)var(--sx))no-repeat}.form_input-round-range[data-v-ac8cc218]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding));border:none;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}[data-direction=vertical][data-v-ac8cc218]::-moz-range-thumb{cursor:ns-resize}.form_input-round-range[data-v-ac8cc218]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding)*2);overflow:hidden}[data-direction=vertical][data-v-ac8cc218]::-moz-range-track{cursor:ns-resize}.form_input-round-range.slider-progress[data-v-ac8cc218]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background))0/var(--sx)100% no-repeat,var(--track-background)}[data-direction=vertical].form_input-round-range.slider-progress[data-v-ac8cc218]::-moz-range-track{background:linear-gradient(var(--track-value-background)var(--sx),var(--track-background)var(--sx))no-repeat}.form_input-round-range[data-v-ac8cc218]::-ms-fill-upper{background:0 0;border-color:#0000}.form_input-round-range[data-v-ac8cc218]::-ms-fill-lower{background:0 0;border-color:#0000}.form_input-round-range[data-v-ac8cc218]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);box-sizing:border-box;cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s cubic-bezier(.165,.84,.44,1),width .2s cubic-bezier(.165,.84,.44,1)}[data-direction=vertical][data-v-ac8cc218]::-ms-thumb{cursor:ns-resize}.form_input-round-range[data-v-ac8cc218]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize;overflow:hidden}[data-direction=vertical][data-v-ac8cc218]::-ms-track{cursor:ns-resize}.form_input-round-range.slider-progress[data-v-ac8cc218]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius)0 0 var(--track-border-radius);background:var(--track-value-background);border:none;border-right-width:0;margin:0}.range-slider[data-v-c1b3c1a7]{--range:calc(var(--max) - var(--min));--ratio:calc((var(--value) - var(--min))/var(--range));--progress:calc(var(--ratio)*100%);--progress-color:#cccccc87;--track-color:#f5f5f5bf;transition:all .2s ease-in-out}.range-slider[data-v-c1b3c1a7]:hover{--progress-color:#5f5f5f87}.dark .range-slider[data-v-c1b3c1a7]{--progress-color:#979797cc;--track-color:#171717}.range-slider[data-v-c1b3c1a7]::-webkit-slider-runnable-track{background:linear-gradient(to right,var(--progress-color)0%,var(--progress-color)var(--progress),var(--track-color)var(--progress),var(--track-color)100%);cursor:col-resize;border-radius:6px;height:100%;transition:all .2s ease-in-out}.range-slider[data-v-c1b3c1a7]::-webkit-slider-thumb{appearance:none;cursor:col-resize;background:0 0;border:none;width:2px;height:100%;transition:all .2s}.range-slider[data-v-c1b3c1a7]::-webkit-slider-thumb:hover{background:#fff0;width:6px}.range-slider[data-v-c1b3c1a7]::-moz-range-track{background:linear-gradient(to right,#c6c6c6 0%,#c6c6c6 var(--progress),#ececec var(--progress),#ececec 100%);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);cursor:col-resize;border:none;border-radius:6px;height:100%}.dark .range-slider[data-v-c1b3c1a7]::-moz-range-track{background:linear-gradient(to right,#979797cc 0%,#979797cc var(--progress),#171717 var(--progress),#171717 100%)}.range-slider[data-v-c1b3c1a7]::-moz-range-thumb{cursor:col-resize;background:0 0;border:none;border-radius:0;width:2px;height:100%;transition:all .2s}.range-slider[data-v-c1b3c1a7]::-moz-range-thumb:hover{background:#fff0;width:6px}.range-slider[data-v-c1b3c1a7]:disabled{opacity:.5;pointer-events:none}.volumed[data-v-d8ce56aa]{transform-style:preserve-3d;width:fit-content;height:fit-content}.test-dummy-flat[data-v-28f8c660]{display:inline-block;position:relative}.test-dummy-flat .marker[data-v-28f8c660]{background:conic-gradient(#ffeb3b 0deg 90deg,#000 90deg 180deg,#ffeb3b 180deg 270deg,#000 270deg 360deg);border-radius:50%;position:absolute;inset:0;box-shadow:0 4px 12px #b9b9b933}.dark .test-dummy-flat .marker[data-v-28f8c660]{box-shadow:0 4px 12px #0003}.fade-enter-active[data-v-6b4f300d],.fade-leave-active[data-v-6b4f300d]{transition:opacity .2s}.fade-enter-from[data-v-6b4f300d],.fade-leave-to[data-v-6b4f300d]{opacity:0}.fade-enter-to[data-v-6b4f300d],.fade-leave-from[data-v-6b4f300d]{opacity:1}.menu-icon-item[data-v-d08788bb]{position:relative;overflow:hidden}.menu-icon-item[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:-1;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 30%,#0000 50%);mask-image:linear-gradient(120deg,#fff 30%,#0000 50%)}.dark .menu-icon-item[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-item[data-v-d08788bb]:hover:before,.menu-icon-item._hover[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .menu-icon-item[data-v-d08788bb]:hover:before,.dark .menu-icon-item._hover[data-v-d08788bb]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-item[data-v-d08788bb]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.6;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-item[data-v-d08788bb]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-item[data-v-d08788bb]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.25}.dark .menu-icon-item[data-v-d08788bb]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-item-icon[data-v-d08788bb]{opacity:.5}.menu-icon-item:hover .menu-icon-item-title[data-v-d08788bb],.menu-icon-item._hover .menu-icon-item-title[data-v-d08788bb]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-item:hover .menu-icon-item-description[data-v-d08788bb],.menu-icon-item._hover .menu-icon-item-description[data-v-d08788bb]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-item:hover .menu-icon-item-icon[data-v-d08788bb],.menu-icon-item._hover .menu-icon-item-icon[data-v-d08788bb]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-item:hover .menu-icon-item-title[data-v-d08788bb],.dark .menu-icon-item._hover .menu-icon-item-title[data-v-d08788bb]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-item:hover .menu-icon-item-description[data-v-d08788bb],.dark .menu-icon-item._hover .menu-icon-item-description[data-v-d08788bb]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-item:hover .menu-icon-item-icon[data-v-d08788bb],.dark .menu-icon-item._hover .menu-icon-item-icon[data-v-d08788bb]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item[data-v-93a9757f]{position:relative;overflow:hidden}.menu-icon-status-item[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .menu-icon-status-item[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-status-item[data-v-93a9757f]:hover:before,.menu-icon-status-item._hover[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:50%}.dark .menu-icon-status-item[data-v-93a9757f]:hover:before,.dark .menu-icon-status-item._hover[data-v-93a9757f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-status-item-link[data-v-93a9757f]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-status-item-link[data-v-93a9757f]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-status-item-link[data-v-93a9757f]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.4}.dark .menu-icon-status-item-link[data-v-93a9757f]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-status-item-icon-color[data-v-93a9757f]{opacity:.5}.menu-icon-status-item:hover .menu-icon-status-item-title[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-title[data-v-93a9757f]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item:hover .menu-icon-status-item-description[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-description[data-v-93a9757f]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-93a9757f],.menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-93a9757f],.menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-93a9757f]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-status-item:hover .menu-icon-status-item-title[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-title[data-v-93a9757f]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-status-item:hover .menu-icon-status-item-description[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-description[data-v-93a9757f]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-93a9757f],.dark .menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-93a9757f],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-93a9757f]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.form_radio-card-detail[data-v-fb6236db]{position:relative;overflow:hidden}.form_radio-card-detail[data-v-fb6236db]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-detail[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-detail[data-v-fb6236db]:hover:before,.form_radio-card-detail._hover[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-detail[data-v-fb6236db]:hover:before,.dark .form_radio-card-detail._hover[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-detail-active[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-detail-active[data-v-fb6236db]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-e9feb562]::-webkit-search-cancel-button{display:none}.form_radio-card-simple[data-v-880ce73f]{position:relative;overflow:hidden}.form_radio-card-simple[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-simple[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-simple[data-v-880ce73f]:hover:before,.form_radio-card-simple._hover[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-simple[data-v-880ce73f]:hover:before,.dark .form_radio-card-simple._hover[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-simple-active[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-simple-active[data-v-880ce73f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_voice-card[data-v-fd4023c4]{flex-direction:column;display:flex;position:relative;overflow:hidden}.form_voice-card[data-v-fd4023c4]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_voice-card[data-v-fd4023c4]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_voice-card[data-v-fd4023c4]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_voice-card[data-v-fd4023c4]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-43a4b028]::-webkit-search-cancel-button{display:none}.voice-card[data-v-43a4b028]{flex-direction:column;display:flex;position:relative;overflow:hidden}.voice-card[data-v-43a4b028]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;inset:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .voice-card[data-v-43a4b028]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.voice-card[data-v-43a4b028]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .voice-card[data-v-43a4b028]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.skeleton[data-v-fa4a54cc]{transition:all .2s ease-in-out;position:relative}.skeleton-pulse[data-v-fa4a54cc]{animation:2s ease-in-out .5s infinite skeleton-pulse-fa4a54cc}@keyframes skeleton-pulse-fa4a54cc{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.skeleton-wave[data-v-fa4a54cc]:after{content:"";border-radius:inherit;background:linear-gradient(90deg,#0000,#fff,#0000);animation:2s ease-in-out infinite skeleton-wave-fa4a54cc;position:absolute;inset:0;transform:translate(-100%)}.dark .skeleton-wave[data-v-fa4a54cc]:after{background:linear-gradient(90deg,#0000,#ffffff1a,#0000)}@keyframes skeleton-wave-fa4a54cc{0%{opacity:0;transform:translate(-100%)}60%{opacity:1;transform:translate(100%)}to{opacity:0;transform:translate(100%)}}.card-hover-effect[data-v-24a7a9d5]{transform-style:preserve-3d;transform-origin:50%;will-change:transform;transition:transform .3s cubic-bezier(.23,1,.32,1)}.card-hover-effect[data-v-24a7a9d5]:before,.card-hover-effect[data-v-24a7a9d5]:after{content:"";pointer-events:none;background-repeat:no-repeat;transition:all .33s;position:absolute;inset:0}.card-hover-effect[data-v-24a7a9d5]:before{background-position:var(--card-position-x)var(--card-position-y);background-size:300% 300%;background-image:linear-gradient(115deg,transparent 0%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))25%,transparent 47%,transparent 53%,rgba(var(--color-primary-600),calc(.3*var(--effect-intensity)))75%,transparent 100%);opacity:calc(.5*var(--effect-intensity));filter:brightness(.5)contrast();z-index:1;mix-blend-mode:color-dodge}.card-hover-effect[data-v-24a7a9d5]:after{background-position:var(--sparkle-position-x)var(--sparkle-position-y);background-size:160%;background-image:linear-gradient(125deg,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))15%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))30%,rgba(var(--color-primary-300),calc(.2*var(--effect-intensity)))40%,rgba(var(--color-primary-200),calc(.1*var(--effect-intensity)))60%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))70%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))85%);background-blend-mode:overlay;opacity:calc(var(--sparkle-opacity)*var(--effect-intensity));filter:brightness()contrast();z-index:2;mix-blend-mode:color-dodge}.card-hover-effect[data-v-24a7a9d5]:hover:before{opacity:calc(.88*var(--effect-intensity));filter:brightness(.66)contrast(1.33)}.card-hover-effect[data-v-24a7a9d5]:hover:after{opacity:var(--effect-intensity);filter:brightness(1.1)contrast(1.2)}.slide-next-enter-active[data-v-181bca39],.slide-next-leave-active[data-v-181bca39]{transition:transform .2s ease-in-out,opacity .2s ease-in-out}.slide-next-enter-from[data-v-181bca39]{opacity:0;transform:translate(100%)}.slide-next-enter-to[data-v-181bca39],.slide-next-leave-from[data-v-181bca39]{opacity:1;transform:translate(0)}.slide-next-leave-to[data-v-181bca39]{opacity:0;transform:translate(-100%)}.slide-prev-enter-active[data-v-181bca39],.slide-prev-leave-active[data-v-181bca39]{transition:transform .2s ease-in-out,opacity .2s ease-in-out}.slide-prev-enter-from[data-v-181bca39]{opacity:0;transform:translate(-100%)}.slide-prev-enter-to[data-v-181bca39],.slide-prev-leave-from[data-v-181bca39]{opacity:1;transform:translate(0)}.slide-prev-leave-to[data-v-181bca39]{opacity:0;transform:translate(100%)}[data-sonner-toast=""] [data-content=""]{width:100%}.stage-transition-3[data-v-17464329]{--delay:0s;--sharpness:40%;position:fixed;inset:0;overflow:hidden}.stage-transition-3[data-v-17464329]:before,.stage-transition-3[data-v-17464329]:after{content:"";animation:1s cubic-bezier(.87,.05,.02,.97) both arrowIn-17464329,1s cubic-bezier(.87,.05,.02,.97) forwards arrowOut-17464329;position:absolute;inset:0}.stage-transition-3[data-v-17464329]:before{background-color:var(--stage-transition-3-overlay-color-2);animation-delay:calc(0s + var(--delay,0s)),calc(1.4s + var(--delay,0s))}.stage-transition-3[data-v-17464329]:after{background-color:var(--stage-transition-3-overlay-color-1);animation-delay:calc(.2s + var(--delay,0s)),calc(1.2s + var(--delay,0s))}@keyframes arrowIn-17464329{0%{clip-path:polygon(calc(var(--sharpness)*-1)0,calc(var(--sharpness)*-1)0,0 50%,calc(var(--sharpness)*-1)100%,calc(var(--sharpness)*-1)100%,0 50%)}to{clip-path:polygon(calc(var(--sharpness)*-1)0,100% 0,calc(100% + var(--sharpness))50%,100% 100%,calc(var(--sharpness)*-1)100%,0 50%)}}@keyframes arrowOut-17464329{0%{clip-path:polygon(calc(var(--sharpness)*-1)0,100% 0,calc(100% + var(--sharpness))50%,100% 100%,calc(var(--sharpness)*-1)100%,0 50%)}to{clip-path:polygon(100% 0,100% 0,calc(100% + var(--sharpness))50%,100% 100%,100% 100%,calc(100% + var(--sharpness))50%)}}.circle-expansion-transition[data-v-4624be9e]{pointer-events:none;width:150vmax;height:150vmax;position:fixed;top:calc(50% - 75vmax);left:calc(50% - 75vmax)}.circle-expansion-transition div[data-v-4624be9e]{border-radius:50%;width:100%;height:100%;position:absolute;top:0;left:0;transform:scale(0)}.circle-expansion-transition div[data-v-4624be9e]:first-child{background-color:var(--circle-expansion-color-1);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + 0s)forwards}.circle-expansion-transition div[data-v-4624be9e]:nth-child(2){background-color:var(--circle-expansion-color-2);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + .15s)forwards}.circle-expansion-transition div[data-v-4624be9e]:nth-child(3){background-color:var(--circle-expansion-color-3);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + .3s)forwards}.circle-expansion-transition div[data-v-4624be9e]:nth-child(4){background-color:var(--circle-expansion-color-4);animation:circleExpand-4624be9e var(--circle-expansion-duration)ease-in calc(var(--circle-expansion-delay) + .45s)forwards}@keyframes circleExpand-4624be9e{0%{transform:scale(0)}to{transform:scale(1)}}.fantasy-fall-transition[data-v-826171f5]{position:fixed;inset:0;overflow:hidden}.fantasy-fall-up[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-bottom-left-radius:var(--fantasy-fall-radius-sm);border-bottom-right-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-up var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translateY(-100%)}.fantasy-fall-down[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-top-left-radius:var(--fantasy-fall-radius-sm);border-top-right-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-down var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translateY(100%)}.fantasy-fall-left[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-top-right-radius:var(--fantasy-fall-radius-sm);border-bottom-right-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-left var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translate(-100%)}.fantasy-fall-right[data-v-826171f5]:before{content:"";background-color:var(--fantasy-fall-color);border-top-left-radius:var(--fantasy-fall-radius-sm);border-bottom-left-radius:var(--fantasy-fall-radius-sm);width:100%;height:100%;animation:fantasy-fall-right var(--fantasy-fall-duration)ease-out var(--fantasy-fall-delay)forwards;display:block;position:absolute;top:0;left:0;transform:translate(100%)}@media (min-width:768px){.fantasy-fall-up[data-v-826171f5]:before{border-bottom-left-radius:var(--fantasy-fall-radius-md);border-bottom-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-down[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-md);border-top-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-left[data-v-826171f5]:before{border-top-right-radius:var(--fantasy-fall-radius-md);border-bottom-right-radius:var(--fantasy-fall-radius-md)}.fantasy-fall-right[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-md);border-bottom-left-radius:var(--fantasy-fall-radius-md)}}@media (min-width:1024px){.fantasy-fall-up[data-v-826171f5]:before{border-bottom-left-radius:var(--fantasy-fall-radius-lg);border-bottom-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-down[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-lg);border-top-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-left[data-v-826171f5]:before{border-top-right-radius:var(--fantasy-fall-radius-lg);border-bottom-right-radius:var(--fantasy-fall-radius-lg)}.fantasy-fall-right[data-v-826171f5]:before{border-top-left-radius:var(--fantasy-fall-radius-lg);border-bottom-left-radius:var(--fantasy-fall-radius-lg)}}@keyframes fantasy-fall-up{0%{transform:translateY(-100%)}50%{transform:translateY(0%)}to{border-bottom-right-radius:0%;border-bottom-left-radius:0%;transform:translateY(0%)}}@keyframes fantasy-fall-down{0%{transform:translateY(100%)}50%{transform:translateY(0%)}to{border-top-left-radius:0%;border-top-right-radius:0%;transform:translateY(0%)}}@keyframes fantasy-fall-left{0%{transform:translate(-100%)}50%{transform:translate(0%)}to{border-top-right-radius:0%;border-bottom-right-radius:0%;transform:translate(0%)}}@keyframes fantasy-fall-right{0%{transform:translate(100%)}50%{transform:translate(0%)}to{border-top-left-radius:0%;border-bottom-left-radius:0%;transform:translate(0%)}}.stage-transition-4[data-v-4221f976]{--delay:0s;grid-template-rows:repeat(5,1fr);display:grid;position:fixed;inset:0;overflow:hidden}.stage-transition-4__block[data-v-4221f976]{width:100%;height:100%;position:relative}.stage-transition-4__block[data-v-4221f976]:before,.stage-transition-4__block[data-v-4221f976]:after{content:"";animation:.8s cubic-bezier(.87,.05,.02,.97) both slideIn-4221f976,.8s cubic-bezier(.87,.05,.02,.97) forwards slideOut-4221f976;position:absolute;inset:0}.stage-transition-4__block[data-v-4221f976]:before{background-color:var(--stage-transition-4-overlay-color-2);animation-delay:calc(0s + var(--d,0s) + var(--delay,0s)),calc(1.6s + var(--d,0s) + var(--delay,0s))}.stage-transition-4__block[data-v-4221f976]:after{background-color:var(--stage-transition-4-overlay-color-1);animation-delay:calc(.3s + var(--d,0s) + var(--delay,0s)),calc(1.3s + var(--d,0s) + var(--delay,0s))}.stage-transition-4__block[data-v-4221f976]:first-child{--d:.1s}.stage-transition-4__block[data-v-4221f976]:nth-child(2){--d:.3s}.stage-transition-4__block[data-v-4221f976]:nth-child(3){--d:0s}.stage-transition-4__block[data-v-4221f976]:nth-child(4){--d:.4s}.stage-transition-4__block[data-v-4221f976]:nth-child(5){--d:.2s}@keyframes slideIn-4221f976{0%{transform:translate(-101%)}to{transform:translate(0)}}@keyframes slideOut-4221f976{0%{transform:translate(0)}to{transform:translate(101%)}}.stage-transition-1[data-v-81c0af14]{--delay:0s;position:fixed;inset:0;overflow:hidden}.stage-transition-1[data-v-81c0af14]:before,.stage-transition-1[data-v-81c0af14]:after{content:"";animation:1s cubic-bezier(.87,.05,.02,.97) both slideIn-81c0af14,1s cubic-bezier(.87,.05,.02,.97) forwards slideOut-81c0af14;position:absolute;inset:0}.stage-transition-1[data-v-81c0af14]:before{background-color:var(--stage-transition-1-overlay-color-2);animation-delay:calc(0s + var(--delay,0s)),calc(1.4s + var(--delay,0s))}.stage-transition-1[data-v-81c0af14]:after{background-color:var(--stage-transition-1-overlay-color-1);animation-delay:calc(.2s + var(--delay,0s)),calc(1.2s + var(--delay,0s))}@keyframes slideIn-81c0af14{0%{transform:translate(-101%)}to{transform:translate(0)}}@keyframes slideOut-81c0af14{0%{transform:translate(0)}to{transform:translate(101%)}}.stage-transition-2[data-v-9e8b66c8]{--delay:0s;--skew-x:100%;position:fixed;inset:0;overflow:hidden}.stage-transition-2[data-v-9e8b66c8]:before,.stage-transition-2[data-v-9e8b66c8]:after{content:"";animation:1s cubic-bezier(.87,.05,.02,.97) both maskIn-9e8b66c8,1s cubic-bezier(.87,.05,.02,.97) forwards maskOut-9e8b66c8;position:absolute;inset:0}.stage-transition-2[data-v-9e8b66c8]:before{background-color:var(--stage-transition-2-overlay-color-2);animation-delay:calc(0s + var(--delay,0s)),calc(1.4s + var(--delay,0s))}.stage-transition-2[data-v-9e8b66c8]:after{background-color:var(--stage-transition-2-overlay-color-1);animation-delay:calc(.2s + var(--delay,0s)),calc(1.2s + var(--delay,0s))}@keyframes maskIn-9e8b66c8{0%{clip-path:polygon(0 0,0 0,calc(var(--skew-x,0)*-1)100%,calc(var(--skew-x,0)*-1)100%)}to{clip-path:polygon(0 0,calc(100% + var(--skew-x,0))0,100% 100%,calc(var(--skew-x,0)*-1)100%)}}@keyframes maskOut-9e8b66c8{0%{clip-path:polygon(0 0,calc(100% + var(--skew-x,0))0,100% 100%,calc(var(--skew-x,0)*-1)100%)}to{clip-path:polygon(calc(100% + var(--skew-x,0))0,calc(100% + var(--skew-x,0))0,100% 100%,100% 100%)}}.rectangle-rotate-transition[data-v-45ea2f7f]{position:fixed;inset:0;overflow:hidden}.rectangle[data-v-45ea2f7f]{width:100%;height:100%;position:absolute}.rectangle div[data-v-45ea2f7f]{width:100vmax;height:100vmax;position:absolute;transform:scale(0)}.rectangle-rotate-1 div[data-v-45ea2f7f]{background-color:var(--rectangle-rotate-1-color);animation:expand-rotate-45ea2f7f var(--rectangle-rotate-duration)ease calc(var(--rectangle-rotate-delay) + 0s)forwards;top:-50vmax;left:-50vmax}.rectangle-rotate-2 div[data-v-45ea2f7f]{background-color:var(--rectangle-rotate-2-color);animation:expand-rotate-45ea2f7f var(--rectangle-rotate-duration)ease calc(var(--rectangle-rotate-delay) + var(--rectangle-rotate-stagger))forwards;bottom:-50vmax;right:-50vmax}.rectangle-rotate-3 div[data-v-45ea2f7f]{background-color:var(--rectangle-rotate-3-color);animation:expand-rotate-45ea2f7f var(--rectangle-rotate-duration)ease calc(var(--rectangle-rotate-delay) + calc(var(--rectangle-rotate-stagger)*2))forwards;top:calc(50% - 50vmax);left:calc(50% - 50vmax)}@keyframes expand-rotate-45ea2f7f{0%{transform:scale(0)rotate(0)}to{transform:scale(1)rotate(var(--rectangle-rotate-rotation))}}html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%,-35%)}html[dir=rtl],[data-sonner-toaster][dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%,-35%)}[data-sonner-toaster]{width:var(--width);--gray1:#fcfcfc;--gray2:#f8f8f8;--gray3:#f3f3f3;--gray4:#ededed;--gray5:#e8e8e8;--gray6:#e2e2e2;--gray7:#dbdbdb;--gray8:#c7c7c7;--gray9:#8f8f8f;--gray10:#858585;--gray11:#6f6f6f;--gray12:#171717;--border-radius:8px;box-sizing:border-box;z-index:999999999;outline:none;margin:0;padding:0;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;list-style:none;transition:transform .4s;position:fixed}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift)*var(--gap));z-index:var(--z-index);opacity:0;transform:var(--y);touch-action:none;box-sizing:border-box;overflow-wrap:anywhere;outline:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;position:absolute}[data-sonner-toast][data-styled=true]{background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);width:var(--width);align-items:center;gap:6px;padding:16px;font-size:13px;display:flex;box-shadow:0 4px 12px #0000001a}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{--y:translateY(-100%);--lift:1;--lift-amount:calc(1*var(--gap));top:0}[data-sonner-toast][data-y-position=bottom]{--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift)*var(--gap));bottom:0}[data-sonner-toast][data-styled=true] [data-description]{color:#3f3f3f;font-weight:400;line-height:1.4}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{color:inherit;font-weight:500;line-height:1.5}[data-sonner-toast][data-styled=true] [data-icon]{width:16px;height:16px;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end);flex-shrink:0;justify-content:flex-start;align-items:center;display:flex;position:relative}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform-origin:50%;animation:.3s forwards sonner-fade-in;transform:scale(.8)}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{flex-direction:column;gap:2px;display:flex}[data-sonner-toast][data-styled=true] [data-button]{height:24px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);cursor:pointer;border:none;border-radius:4px;outline:none;flex-shrink:0;align-items:center;padding-left:8px;padding-right:8px;font-size:12px;font-weight:500;transition:opacity .4s,box-shadow .2s;display:flex}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:#00000014}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:#ffffff4d}[data-sonner-toast][data-styled=true] [data-close-button]{left:var(--toast-close-button-start);right:var(--toast-close-button-end);width:20px;height:20px;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);cursor:pointer;z-index:1;border-radius:50%;justify-content:center;align-items:center;padding:0;transition:opacity .1s,background .2s,border-color .2s;display:flex;position:absolute;top:0}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";z-index:-1;height:100%;position:absolute;left:-100%;right:-100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3)translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3)translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]:after{content:"";height:calc(var(--gap) + 1px);width:100%;position:absolute;bottom:100%;left:0}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before)*.05 + 1;--y:translateY(calc(var(--lift-amount)*var(--toasts-before)))scale(calc(-1*var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift)*var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift)*-100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift)*var(--offset) + var(--lift)*-100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y)translateY(var(--swipe-amount-y,0px))translateX(var(--swipe-amount-x,0px));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y)translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y)translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y)translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y)translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y)translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y)translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y)translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y)translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%;position:fixed}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left)*-1)}[data-sonner-toaster] [data-sonner-toast]{width:calc(100% - var(--mobile-offset-left)*2);left:0;right:0}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:calc(var(--mobile-offset-bottom) + max(env(safe-area-inset-bottom),0px))}[data-sonner-toaster][data-y-position=top]{top:calc(var(--mobile-offset-top) + max(env(safe-area-inset-top),0px))}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:#ecfdf3;--success-border:#bffcd9;--success-text:#008a2e;--info-bg:#f0f8ff;--info-border:#dde7fd;--info-text:#0973dc;--warning-bg:#fffcf0;--warning-border:#fbeeb1;--warning-text:#dc7609;--error-bg:#fff0f0;--error-border:#ffe0e1;--error-text:#e60000}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:#333;--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:#1f1f1f;--normal-border:#333;--normal-border-hover:#404040;--normal-text:var(--gray1);--success-bg:#001f0f;--success-border:#003d1c;--success-text:#59f3a6;--info-bg:#000d1f;--info-border:#19233e;--info-text:#5896f3;--warning-bg:#1d1f00;--warning-border:#2e2e00;--warning-text:#f3cf58;--error-bg:#2d0607;--error-border:#4d0408;--error-text:#ff9ea1}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);z-index:10;position:absolute;inset:0}.sonner-loading-wrapper[data-visible=false]{transform-origin:50%;animation:.2s forwards sonner-fade-out}.sonner-spinner{height:var(--size);width:var(--size);position:relative;top:50%;left:50%}.sonner-loading-bar{background:var(--gray11);border-radius:6px;width:24%;height:8%;animation:1.2s linear infinite sonner-spin;position:absolute;top:-3.9%;left:-10%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg)translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg)translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg)translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg)translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg)translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg)translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg)translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg)translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg)translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg)translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg)translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg)translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{transform-origin:50%;transition:opacity .2s,transform .2s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8)translate(-50%,-50%)}@property --chromatic-hue{syntax:"";inherits:true;initial-value:0}@keyframes hue-anim{0%{--chromatic-hue:0}to{--chromatic-hue:360}}.dynamic-hue{animation:10s linear infinite hue-anim}@font-face{font-family:cjkfonts AllSeto;font-style:normal;font-display:swap;src:url(/assets/cjkFonts_allseto_v1.11-ByBdljxl.ttf)format("truetype")}@font-face{font-family:Xiaolai SC;font-style:normal;font-display:swap;src:url(/assets/XiaolaiSC-Regular-SNWuh554.ttf)format("truetype")}*,:before,:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before,:after{--un-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.slide-away-enter-active,.slide-away-leave-active{transition:transform .3s ease-in-out,opacity .3s ease-in-out}.slide-away-enter,.slide-away-leave-to{opacity:0;transform:translateY(-10px)}.slide-away-enter-from,.slide-away-leave{opacity:0;transform:translateY(10px)}.fade-slide-out-r-to-l-enter-active,.fade-slide-out-r-to-l-leave-active{transition:opacity .2s ease-in-out,transform .2s ease-in-out}.fade-slide-out-r-to-l-enter-from,.fade-slide-out-r-to-l-leave-to{opacity:0;transform:translate(10px)}.fade-slide-out-r-to-l-enter-to,.fade-slide-out-r-to-l-leave-from{opacity:1;transform:translate(0)}.fade-slide-out-l-to-r-enter-active,.fade-slide-out-l-to-r-leave-active{transition:opacity .2s ease-in-out,transform .2s ease-in-out}.fade-slide-out-l-to-r-enter-from,.fade-slide-out-l-to-r-leave-to{opacity:0;transform:translate(-10px)}.fade-slide-out-l-to-r-enter-to,.fade-slide-out-l-to-r-leave-from{opacity:1;transform:translate(0)}.fade-enter-active,.fade-leave-active{transition:opacity .2s ease-in-out}.fade-enter-from,.fade-leave-to{opacity:0}.fade-enter-to,.fade-leave-from{opacity:1}:root{--bg-color-light:#fff;--bg-color-dark:#121212;--bg-color:var(--bg-color-light)}*{touch-action:manipulation}html,body,#app{overscroll-behavior:none;height:100%;margin:0;padding:0}html{background:var(--bg-color);transition:all .3s ease-in-out}html.dark{--bg-color:var(--bg-color-dark);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}#nprogress{pointer-events:none}#nprogress .bar{background:color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))70%,#636363);opacity:.75;z-index:1031;width:100%;height:2px;position:fixed;top:0;left:0}@supports (color:lab(0% 0 0)){#nprogress .bar{background:color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))70%,lab(42% 0 0))}}.dark #nprogress .bar{background:`color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))90%,#dedede)`}@supports (color:lab(0% 0 0)){.dark #nprogress .bar{background:`color-mix(in srgb,oklch(95% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + ${0}))90%,lab(88.4% 0 0))`}}@media (display-mode:standalone){#nprogress,#nprogress .bar{display:none}}@font-face{font-family:DM Sans;font-style:normal;font-display:swap;font-weight:100 1000;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-sans:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Sans;font-style:normal;font-display:swap;font-weight:100 1000;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-sans:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Serif Display;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-serif-display@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Serif Display;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-serif-display@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:DM Mono;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-300-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-400-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/cyrillic-500-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-300-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-400-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/japanese-500-normal.woff2)format("woff2")}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Kiwi Maru;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/kiwi-maru@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-800-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Sniglet;font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/sniglet@latest/latin-ext-800-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/greek-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+1F??}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/kayah-li-wght-normal.woff2)format("woff2-variations");unicode-range:U+200C-200D,U+2010,U+25CC,U+A900-A92F}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Jura;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/jura:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Gugi;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/gugi@latest/korean-400-normal.woff2)format("woff2")}@font-face{font-family:Gugi;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/gugi@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Quicksand;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/quicksand:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Urbanist;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/urbanist:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Urbanist;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/urbanist:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Comfortaa;font-style:normal;font-display:swap;font-weight:300 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/comfortaa:vf@latest/vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-100-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-300-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-400-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-500-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-700-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-800-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-900-normal.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-100-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-300-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-400-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-500-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-700-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-800-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/cyrillic-ext-900-normal.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-100-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-300-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-400-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-500-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-700-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-800-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-900-normal.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-100-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-300-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-400-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-500-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-700-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-800-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/greek-ext-900-normal.woff2)format("woff2");unicode-range:U+1F??}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-100-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-300-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-400-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-500-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-700-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-800-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/hebrew-900-normal.woff2)format("woff2");unicode-range:U+307-308,U+590-5FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-100-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-300-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-400-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-500-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-700-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-800-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/japanese-900-normal.woff2)format("woff2")}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-100-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-300-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-400-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-500-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-700-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-800-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-900-normal.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-100-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-300-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-400-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-500-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-700-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-800-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/latin-ext-900-normal.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:100;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-100-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:300;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-300-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-400-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-500-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-700-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:800;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-800-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"M PLUS Rounded 1c";font-style:normal;font-display:swap;font-weight:900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/m-plus-rounded-1c@latest/vietnamese-900-normal.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}*,:before,:after,::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:root{--chromatic-hue:220.44;--chromatic-chroma:calc(.18 + (cos(var(--chromatic-hue)*3.14159/180)*.04));--chromatic-chroma-50:calc(var(--chromatic-chroma)*.3);--chromatic-chroma-100:calc(var(--chromatic-chroma)*.5);--chromatic-chroma-200:calc(var(--chromatic-chroma)*.6);--chromatic-chroma-300:calc(var(--chromatic-chroma)*.75);--chromatic-chroma-400:calc(var(--chromatic-chroma)*.85);--chromatic-chroma-500:var(--chromatic-chroma);--chromatic-chroma-600:calc(var(--chromatic-chroma)*1.15);--chromatic-chroma-700:calc(var(--chromatic-chroma)*1.1);--chromatic-chroma-800:calc(var(--chromatic-chroma)*.85);--chromatic-chroma-900:calc(var(--chromatic-chroma)*.7);--chromatic-chroma-950:calc(var(--chromatic-chroma)*.5)}.i-eos-icons\:three-dots-loading,[i-eos-icons\:three-dots-loading=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='18' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.67' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='.33' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='0' fill='currentColor'%3E%3Canimate attributeName='r' begin='0' calcMode='spline' dur='1.5s' keySplines='0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8' repeatCount='indefinite' values='0;2;0;0'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:alibabacloud{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M14.752 4.64h5.274C22.242 4.64 24 6.475 24 8.691V15.8a3.947 3.947 0 01-3.974 3.975h-5.274l1.299-1.835 3.822-1.222c.688-.23 1.146-.918 1.146-1.605v-5.81c0-.687-.458-1.375-1.146-1.605L16.05 6.475l-1.3-1.835zM2.98 15.111c0 .688.46 1.376 1.147 1.606l3.822 1.146 1.3 1.835H3.974A3.947 3.947 0 010 15.723V8.69c0-2.216 1.758-4.05 3.975-4.05h5.273L7.95 6.474 4.127 7.697c-.688.23-1.146.918-1.146 1.606v5.808z'/%3E%3Cpath d='M16.051 11.213H8.025v1.835h8.026v-1.835z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:anthropic{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:bilibiliindex{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M11.995 0c2.204-.001 3.701 2.07 4.497 3.874.374.849.672 1.728.892 2.638a.09.09 0 00.066.066c.885.209 1.728.486 2.529.83 1.17.504 2.236 1.17 3.076 2.13.195.224.386.52.574.89.78 1.539.27 3.194-.905 4.35-1.412 1.39-3.384 2.137-5.264 2.608a.058.058 0 00-.044.047c-.036.227-.184.734-.443 1.522-.71 2.16-2.34 5.044-4.966 5.045-2.625.001-4.258-2.88-4.97-5.04-.26-.788-.408-1.295-.446-1.522a.059.059 0 00-.043-.047c-1.88-.468-3.853-1.214-5.267-2.602-1.177-1.155-1.688-2.81-.909-4.35.188-.37.378-.666.573-.89.839-.962 1.905-1.628 3.074-2.133a15.26 15.26 0 012.529-.833.087.087 0 00.065-.066c.22-.91.516-1.79.89-2.639C8.296 2.072 9.791.001 11.994 0zm5.915 8.994l.176 1.29a.068.068 0 00.026.043c.415.318.687.68.815 1.083a1.996 1.996 0 01-1.846 2.596 2.001 2.001 0 01-2.058-2.282c.075-.52.359-.977.852-1.369a.052.052 0 00.02-.047c-.102-.978-.311-1.911-.559-2.993-.3-1.31-.727-2.529-1.45-3.705a3.868 3.868 0 00-.506-.665c-.48-.494-.997-.897-1.696-.728-.476.116-1.069.654-1.34 1.043a10.085 10.085 0 00-1.399 2.938.02.02 0 00.022.016l1.588-.074a.07.07 0 00.046-.02c.638-.632 1.57-.76 2.337-.308.318.187.569.478.754.873.456.977-.123 2.14-1.06 2.482-.879.321-1.8-.006-2.294-.809a.068.068 0 00-.061-.032 23.52 23.52 0 00-2.412.209c-.676.094-1.403.296-2.014.5-.692.228-1.347.52-1.965.876-.885.51-2.189 1.567-1.536 2.725.119.211.233.373.343.487.89.92 2 1.415 3.3 1.852a.022.022 0 00.029-.023l-.157-1.145a.068.068 0 00-.033-.05 2.08 2.08 0 01-.848-.96c-.415-.925-.03-1.983.792-2.49a2.004 2.004 0 012.415.239c.345.315.623.855.642 1.356.026.697-.253 1.239-.782 1.703a.057.057 0 00-.02.05c.165 1.255.485 2.545.787 3.705.262 1.004.69 2.098 1.296 3.041.315.49.697.92 1.135 1.189.526.323 1.05.312 1.57-.033.666-.442 1.045-1.034 1.47-1.822a9.514 9.514 0 00.77-1.89.017.017 0 00-.018-.014l-1.336.063a.06.06 0 00-.05.033 1.822 1.822 0 01-1.279 1.008 1.85 1.85 0 01-1.878-.665c-.558-.723-.557-1.598-.003-2.32a1.78 1.78 0 011.063-.668c.6-.133 1.164.016 1.693.447a.076.076 0 00.051.017c.83-.027 1.64-.098 2.431-.213.62-.09 1.364-.288 1.908-.442a11.537 11.537 0 002.236-.9c.732-.386 1.634-1.033 1.89-1.847.4-1.269-1.44-2.406-2.352-2.802-.637-.277-1.13-.467-1.479-.57a.02.02 0 00-.019.003.02.02 0 00-.006.009.022.022 0 000 .01z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:cloudflare{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437'/%3E%3Cpath d='M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:deepseek{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:featherless-ai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' width='1em' height='1em' %3E%3Cg fill='currentColor'%3E%3Cpath d='M40.0866 4.68482C38.2902 3.5825 35.863 3 33.0672 3C28.7842 3 24.0653 4.35865 19.8276 6.72206L19.7979 6.71083C19.7979 6.71083 19.7937 6.73344 19.7914 6.74423C18.5086 7.4617 17.2656 8.2629 16.0981 9.15731C9.22112 14.4248 7.29519 20.6748 8.92004 24.0156C7.14142 27.0728 6.0457 30.2332 6 33.9767C9.41949 27.421 11.4719 22.108 22.6146 13.1637C19.4309 13.8501 13.9281 17.1057 10.2271 22.0459C9.87793 19.156 12.1477 14.4895 17.2033 10.6174C17.8435 10.127 18.5092 9.66864 19.1886 9.23374C18.6577 10.8934 18.8269 10.4806 17.7254 12.8076C19.3543 11.2566 20.4268 10.2995 22.035 7.64145C24.123 6.60964 26.2948 5.83844 28.4482 5.37235C28.0919 6.56071 27.4137 8.57466 26.4955 10.1669C26.4955 10.1669 28.8258 9.66435 30.7518 9.77788C29.6995 10.9459 28.7527 12.2094 27.7926 13.5012C26.4777 15.2696 25.1184 17.0983 23.3778 18.8005C23.1683 19.0054 22.968 19.1912 22.7649 19.383C20.0902 19.1254 18.3235 20.1315 16.6683 21.9089C17.9737 21.2966 19.7273 20.7924 20.8266 21.0959C18.8008 22.7579 15.6106 24.9488 12.9893 24.7684C12.4922 25.5295 12.4608 25.5528 11.9144 26.4722C16.1664 27.537 21.507 23.1905 24.6498 20.1161C26.4926 18.3131 27.8964 16.4257 29.2534 14.6012C32.0481 10.8427 34.4616 7.5974 39.8153 6.3624L42 5.85877L40.0866 4.68482Z' class='logo-mark'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:fireworks{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:gemini{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:huggingface{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.781 3.277c2.997 1.704 4.844 4.851 4.844 8.258 0 .995-.155 1.955-.443 2.857a1.332 1.332 0 011.125.4 1.41 1.41 0 01.2 1.723c.204.165.352.385.428.632l.017.062c.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.255.57-.893 1.018-2.128 1.5l-.202.078-.131.048c-.478.173-.89.295-1.061.345l-.086.024c-.89.243-1.808.375-2.732.394-1.32 0-2.3-.36-2.923-1.067a9.852 9.852 0 01-3.18.018C9.778 21.647 8.802 22 7.494 22a11.249 11.249 0 01-2.541-.343l-.221-.06-.273-.08a16.574 16.574 0 01-1.175-.405c-1.237-.483-1.875-.93-2.13-1.501-.186-.4-.151-.867.093-1.236a1.42 1.42 0 01-.2-1.166c.069-.273.226-.516.447-.694a1.41 1.41 0 01.2-1.722c.233-.248.557-.391.917-.407l.078-.001a9.385 9.385 0 01-.44-2.85c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0zM4.188 14.758c.125.687 2.357 2.35 2.14 2.707-.19.315-.796-.239-.948-.386l-.041-.04-.168-.147c-.561-.479-2.304-1.9-2.74-1.432-.43.46.119.859 1.055 1.42l.784.467.136.083c1.045.643 1.12.84.95 1.113-.188.295-3.07-2.1-3.34-1.083-.27 1.011 2.942 1.304 2.744 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725l.16.04.175.042c1.227.284 3.565.65 4.435-.604.673-.973.64-1.709-.248-2.61l-.057-.057c-.945-.928-1.495-2.288-1.495-2.288l-.017-.058-.025-.072c-.082-.22-.284-.639-.63-.584-.46.073-.798 1.21.12 1.933l.05.038c.977.721-.195 1.21-.573.534l-.058-.104-.143-.25c-.463-.799-1.282-2.111-1.739-2.397-.532-.332-.907-.148-.782.541zm14.842-.541c-.533.335-1.563 2.074-1.94 2.751a.613.613 0 01-.687.302.436.436 0 01-.176-.098.303.303 0 01-.049-.06l-.014-.028-.008-.02-.007-.019-.003-.013-.003-.017a.289.289 0 01-.004-.048c0-.12.071-.266.25-.427.026-.024.054-.047.084-.07l.047-.036c.022-.016.043-.032.063-.049.883-.71.573-1.81.131-1.917l-.031-.006-.056-.004a.368.368 0 00-.062.006l-.028.005-.042.014-.039.017-.028.015-.028.019-.036.027-.023.02c-.173.158-.273.428-.31.542l-.016.054s-.53 1.309-1.439 2.234l-.054.054c-.365.358-.596.69-.702 1.018-.143.437-.066.868.21 1.353.055.097.117.195.187.296.882 1.275 3.282.876 4.494.59l.286-.07.25-.074c.276-.084.736-.233 1.2-.42l.188-.077.065-.028.064-.028.124-.056.081-.038c.529-.252.964-.543.994-.827l.001-.036a.299.299 0 00-.037-.139c-.094-.176-.271-.212-.491-.168l-.045.01c-.044.01-.09.024-.136.04l-.097.035-.054.022c-.559.23-1.238.705-1.607.745h.006a.452.452 0 01-.05.003h-.024l-.024-.003-.023-.005c-.068-.016-.116-.06-.14-.142a.22.22 0 01-.005-.1c.062-.345.958-.595 1.713-.91l.066-.028c.528-.224.97-.483.985-.832v-.04a.47.47 0 00-.016-.098c-.048-.18-.175-.251-.36-.251-.785 0-2.55 1.36-2.92 1.36-.025 0-.048-.007-.058-.024a.6.6 0 01-.046-.088c-.1-.238.068-.462 1.06-1.066l.209-.126c.538-.32 1.01-.588 1.341-.831.29-.212.475-.406.503-.6l.003-.028c.008-.113-.038-.227-.147-.344a.266.266 0 00-.07-.054l-.034-.015-.013-.005a.403.403 0 00-.13-.02c-.162 0-.369.07-.595.18-.637.313-1.431.952-1.826 1.285l-.249.215-.033.033c-.08.078-.288.27-.493.386l-.071.037-.041.019a.535.535 0 01-.122.036h.005a.346.346 0 01-.031.003l.01-.001-.013.001c-.079.005-.145-.021-.19-.095a.113.113 0 01-.014-.065c.027-.465 2.034-1.991 2.152-2.642l.009-.048c.1-.65-.271-.817-.791-.493zM11.938 2.984c-4.798 0-8.688 3.829-8.688 8.55 0 .692.083 1.364.24 2.008l.008-.009c.252-.298.612-.46 1.017-.46.355.008.699.117.993.312.22.14.465.384.715.694.261-.372.69-.598 1.15-.605.852 0 1.367.728 1.562 1.383l.047.105.06.127c.192.396.595 1.139 1.143 1.68 1.06 1.04 1.324 2.115.8 3.266a8.865 8.865 0 002.024-.014c-.505-1.12-.26-2.17.74-3.186l.066-.066c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694a1.87 1.87 0 01.99-.312c.357 0 .682.126.925.36.14-.61.215-1.245.215-1.898 0-4.722-3.89-8.55-8.687-8.55zm1.857 8.926l.439-.212c.553-.264.89-.383.89.152 0 1.093-.771 3.208-3.155 3.262h-.184c-2.325-.052-3.116-2.06-3.156-3.175l-.001-.087c0-1.107 1.452.586 3.25.586.716 0 1.379-.272 1.917-.526zm4.017-3.143c.45 0 .813.358.813.8 0 .441-.364.8-.813.8a.806.806 0 01-.812-.8c0-.442.364-.8.812-.8zm-11.624 0c.448 0 .812.358.812.8 0 .441-.364.8-.812.8a.806.806 0 01-.813-.8c0-.442.364-.8.813-.8zm7.79-.841c.32-.384.846-.54 1.33-.394.483.146.83.564.878 1.06.048.495-.212.97-.659 1.203-.322.168-.447-.477-.767-.585l.002-.003c-.287-.098-.772.362-.925.079a1.215 1.215 0 01.14-1.36zm-4.323 0c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003c-.108.036-.194.134-.273.24l-.118.165c-.11.15-.22.262-.377.18a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:microsoft{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M11.49 2H2v9.492h9.492V2h-.002z'/%3E%3Cpath d='M22 2h-9.492v9.492H22V2z'/%3E%3Cpath d='M11.49 12.508H2V22h9.492v-9.492h-.002z'/%3E%3Cpath d='M22 12.508h-9.492V22H22v-9.492z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:mistral{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:moonshot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:novita{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath clip-rule='evenodd' d='M9.167 4.17v5.665L0 19.003h9.167v-5.666l5.666 5.666H24L9.167 4.17z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:ollama{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:openai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:openrouter{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:perplexity{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:player2{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M19.956 10.178C19.8934 10.7544 19.724 11.6784 19.1182 12.5274C18.3667 13.5817 17.3528 13.8824 16.9558 13.9746C16.6911 14.0049 16.3026 14.045 15.8323 14.0789C14.1804 14.2045 13.0525 14.1565 11.7041 14.131C10.81 14.1143 9.54304 14.1034 7.98548 14.131C7.97564 16.7493 7.96551 19.368 7.95508 21.987L5 22V15.8717C5.00358 14.6542 5.00983 12.9193 5.03397 10.7643C6.47441 10.7684 14.6905 10.7205 15.6696 10.7721C15.8672 10.7841 16.3621 10.8039 16.6764 10.4458C16.8842 10.2113 16.9696 9.83348 16.9763 9.26802C16.9835 8.82659 16.9902 8.38204 16.9763 7.94322C16.9459 6.90454 16.608 6.51472 15.7103 6.51107C12.8124 6.5069 9.91142 6.43915 7.01356 6.51107C6.60048 6.51888 5.90083 6.53087 5.02056 6.50325V3C5.43007 3.00782 6.13285 3.02397 7.00686 3.01563C11.1399 2.98436 12.7292 3.01199 15.5328 3.01563C18.3591 3.0198 19.994 4.94393 19.994 8.26009C19.9913 8.90059 20.0253 9.54944 19.956 10.178Z'/%3E%3Cpath d='M20 19H11V22H20V19Z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:together{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M17.385 11.23a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm0 10.77a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm-10.77 0a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23z' opacity='.2'/%3E%3Ccircle cx='6.615' cy='6.615' r='4.615'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:vllm{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M0 4.973h9.324V23L0 4.973z'/%3E%3Cpath d='M13.986 4.351L22.378 0l-6.216 23H9.324l4.662-18.649z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:volcengine{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M7.29 5.36L3.148 21.737a.215.215 0 00.203.261h8.29a.214.214 0 00.215-.261L7.7 5.359a.214.214 0 00-.41 0z' fill-opacity='.5'/%3E%3Cpath clip-rule='evenodd' d='M4.553 16.18l-1.406 5.558a.214.214 0 00.203.261h2.42-4.551a.214.214 0 01-.214-.26l2.275-8.961a.214.214 0 01.409 0l.864 3.402z'/%3E%3Cpath d='M14.44.15a.214.214 0 00-.41 0L8.366 21.739a.214.214 0 00.214.261H19.9a.214.214 0 00.215-.261L14.44.151z' fill-opacity='.5'/%3E%3Cpath clip-rule='evenodd' d='M16.694 22h3.207a.215.215 0 00.214-.262l-1.839-6.993 1.164-4.592a.214.214 0 01.411 0l2.951 11.586a.214.214 0 01-.214.261h-5.894z'/%3E%3Cpath d='M10.278 7.741L6.685 21.736a.214.214 0 00.214.264h7.17a.216.216 0 00.214-.166.216.216 0 000-.098L10.687 7.742a.214.214 0 00-.409 0z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lobe-icons\:xai{--un-icon:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em' %3E%3Cg fill='currentColor' fill-rule='evenodd'%3E%3Cpath d='M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:ghost,[i-lucide\:ghost=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 10h.01M15 10h.01M12 2a8 8 0 0 0-8 8v12l3-3l2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:mic,[i-lucide\:mic=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 19v3m7-12v2a7 7 0 0 1-14 0v-2'/%3E%3Crect width='6' height='13' x='9' y='2' rx='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-lucide\:music,[i-lucide\:music=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:discord{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:elevenlabs{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.604 0v24h4.931V0zm9.86 0v24h4.933V0z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:github,[i-simple-icons\:github=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:javascript{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M0 0h24v24H0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873c-.736-.345-1.554-.585-1.797-1.14c-.091-.33-.105-.51-.046-.705c.15-.646.915-.84 1.515-.66c.39.12.75.42.976.9c1.034-.676 1.034-.676 1.755-1.125c-.27-.42-.404-.601-.586-.78c-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005c-1.14 1.291-.811 3.541.569 4.471c1.365 1.02 3.361 1.244 3.616 2.205c.24 1.17-.87 1.545-1.966 1.41c-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109c1.74 1.756 6.09 1.666 6.871-1.004c.029-.09.24-.705.074-1.65zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805c0 1.232.063 2.363-.138 2.711c-.33.689-1.18.601-1.566.48c-.396-.196-.597-.466-.83-.855c-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517c.855.51 2.004.675 3.207.405c.783-.226 1.458-.691 1.811-1.411c.51-.93.402-2.07.397-3.346c.012-2.054 0-4.109 0-6.179z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-simple-icons\:x{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584l-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar-check-circle-line-duotone,.i-solar\:check-circle-line-duotone,[i-solar-check-circle-line-duotone=""],[i-solar\:check-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m8.5 12.5l2 2l5-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:add-circle-line-duotone,[i-solar\:add-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:add-square-line-duotone,[i-solar\:add-square-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12h-3m0 0H9m3 0V9m0 3v3'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-down-linear,[i-solar\:alt-arrow-down-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19 9l-7 6l-7-6'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-left-line-duotone,[i-solar\:alt-arrow-left-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 5l-6 7l6 7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:alt-arrow-right-outline,[i-solar\:alt-arrow-right-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M8.512 4.43a.75.75 0 0 1 1.057.082l6 7a.75.75 0 0 1 0 .976l-6 7a.75.75 0 0 1-1.138-.976L14.012 12L8.431 5.488a.75.75 0 0 1 .08-1.057' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:armchair-2-bold-duotone,[i-solar\:armchair-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.533 18H6.75v2a.75.75 0 1 1-1.5 0v-2.324c-.829-.362-1.49-1.005-1.808-1.817l-.039-.102L2.1 12.264C1.685 11.15 2.613 10 3.927 10c.81 0 1.534.453 1.81 1.134l1.098 2.706c.1.246.15.37.222.47a1.2 1.2 0 0 0 .74.463c.13.027.277.027.57.027h6.98c.569 0 .853 0 1.091-.098q.196-.082.349-.219c.184-.166.281-.405.475-.883l1.001-2.466c.276-.68 1-1.134 1.81-1.134c1.314 0 2.242 1.15 1.827 2.264l-1.12 3c-.195.524-.292.785-.421 1.008a3.43 3.43 0 0 1-1.609 1.404V20a.75.75 0 1 1-1.5 0v-2.005c-.187.005-.415.005-.717.005'/%3E%3Cpath fill='currentColor' d='M13.236 3.5h-2.472c-1.1 0-1.976 0-2.66.088c-.706.09-1.285.28-1.746.72c-.464.441-.669 1.003-.765 1.685c-.093.658-.093 1.495-.093 2.54v2.195q.147.186.237.406l1.098 2.706c.1.246.15.37.222.47a1.2 1.2 0 0 0 .74.463c.13.027.277.027.57.027h6.98c.569 0 .853 0 1.091-.098q.196-.082.349-.219c.184-.166.281-.405.475-.883l1.001-2.466q.09-.221.237-.406V8.533c0-1.045 0-1.882-.093-2.54c-.096-.682-.301-1.244-.765-1.686c-.46-.438-1.04-.629-1.745-.72c-.685-.087-1.56-.087-2.661-.087' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:arrow-right-line-duotone,[i-solar\:arrow-right-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Cpath fill='currentColor' d='M4 11.25a.75.75 0 0 0 0 1.5zm0 1.5h16v-1.5H4z' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m14 6l6 6l-6 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:arrow-up-outline,[i-solar\:arrow-up-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.47 3.47a.75.75 0 0 1 1.06 0l6 6a.75.75 0 1 1-1.06 1.06l-4.72-4.72V20a.75.75 0 0 1-1.5 0V5.81l-4.72 4.72a.75.75 0 1 1-1.06-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:book-bookmark-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 20.028V18H8v2.028c0 .277 0 .416.095.472s.224-.006.484-.13l1.242-.593c.088-.042.132-.063.179-.063s.091.02.179.063l1.242.593c.26.124.39.186.484.13c.095-.056.095-.195.095-.472' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8 18h-.574c-1.084 0-1.462.006-1.753.068c-.513.11-.96.347-1.285.667c-.11.108-.164.161-.291.505s-.107.489-.066.78l.022.15c.11.653.31.998.616 1.244c.307.246.737.407 1.55.494c.837.09 1.946.092 3.536.092h4.43c1.59 0 2.7-.001 3.536-.092c.813-.087 1.243-.248 1.55-.494s.506-.591.616-1.243c.091-.548.11-1.241.113-2.171h-8v2.028c0 .277 0 .416-.095.472s-.224-.006-.484-.13l-1.242-.593c-.088-.042-.132-.063-.179-.063s-.091.02-.179.063l-1.242.593c-.26.124-.39.186-.484.13C8 20.444 8 20.305 8 20.028z'/%3E%3Cpath fill='currentColor' d='M4.727 2.733c.306-.308.734-.508 1.544-.618C7.105 2.002 8.209 2 9.793 2h4.414c1.584 0 2.688.002 3.522.115c.81.11 1.238.31 1.544.618c.305.308.504.74.613 1.557c.112.84.114 1.955.114 3.552V18H7.426c-1.084 0-1.462.006-1.753.068c-.513.11-.96.347-1.285.667c-.11.108-.164.161-.291.505A1.3 1.3 0 0 0 4 19.7V7.842c0-1.597.002-2.711.114-3.552c.109-.816.308-1.249.613-1.557' opacity='.5'/%3E%3Cpath fill='currentColor' d='M7.25 7A.75.75 0 0 1 8 6.25h8a.75.75 0 0 1 0 1.5H8A.75.75 0 0 1 7.25 7M8 9.75a.75.75 0 0 0 0 1.5h5a.75.75 0 0 0 0-1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:bookmark-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M21 11.098v4.993c0 3.096 0 4.645-.734 5.321c-.35.323-.792.526-1.263.58c-.987.113-2.14-.907-4.445-2.946c-1.02-.901-1.529-1.352-2.118-1.47a2.2 2.2 0 0 0-.88 0c-.59.118-1.099.569-2.118 1.47c-2.305 2.039-3.458 3.059-4.445 2.945a2.24 2.24 0 0 1-1.263-.579C3 20.736 3 19.188 3 16.091v-4.994C3 6.81 3 4.666 4.318 3.333S7.758 2 12 2s6.364 0 7.682 1.332S21 6.81 21 11.098' opacity='.5'/%3E%3Cpath fill='currentColor' d='M9 5.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:box-minimalistic-bold-duotone,[i-solar\:box-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8.422 20.618C10.178 21.54 11.056 22 12 22V12L2.638 7.073l-.04.067C2 8.154 2 9.417 2 11.942v.117c0 2.524 0 3.787.597 4.801c.598 1.015 1.674 1.58 3.825 2.709z'/%3E%3Cpath fill='currentColor' d='m17.577 4.432l-2-1.05C13.822 2.461 12.944 2 12 2c-.945 0-1.822.46-3.578 1.382l-2 1.05C4.318 5.536 3.242 6.1 2.638 7.072L12 12l9.362-4.927c-.606-.973-1.68-1.537-3.785-2.641' opacity='.7'/%3E%3Cpath fill='currentColor' d='m21.403 7.14l-.041-.067L12 12v10c.944 0 1.822-.46 3.578-1.382l2-1.05c2.151-1.129 3.227-1.693 3.825-2.708c.597-1.014.597-2.277.597-4.8v-.117c0-2.525 0-3.788-.597-4.802' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:card-search-broken,[i-solar\:card-search-broken=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' d='M14 4c3.771 0 5.657 0 6.828 1.172S22 8.229 22 12v1M10 4C6.229 4 4.343 4 3.172 5.172S2 8.229 2 12s0 5.657 1.172 6.828S6.229 20 10 20h3m-3-4H6'/%3E%3Ccircle cx='18' cy='17' r='3'/%3E%3Cpath stroke-linecap='round' d='m20.5 19.5l1 1M2 10h5m15 0H11'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:chat-round-line-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12c0 1.6.376 3.112 1.043 4.453c.178.356.237.763.134 1.148l-.595 2.226a1.3 1.3 0 0 0 1.591 1.592l2.226-.596a1.63 1.63 0 0 1 1.149.133A9.96 9.96 0 0 0 12 22' opacity='.5'/%3E%3Cpath fill='currentColor' d='M7.825 12.85a.825.825 0 0 0 0 1.65h6.05a.825.825 0 0 0 0-1.65zm0-3.85a.825.825 0 0 0 0 1.65h8.8a.825.825 0 0 0 0-1.65z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:chat-square-like-bold-duotone,[i-solar\:chat-square-like-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m13.629 20.472l-.542.916c-.483.816-1.69.816-2.174 0l-.542-.916c-.42-.71-.63-1.066-.968-1.262c-.338-.197-.763-.204-1.613-.219c-1.256-.021-2.043-.098-2.703-.372a5 5 0 0 1-2.706-2.706C2 14.995 2 13.83 2 11.5v-1c0-3.273 0-4.91.737-6.112a5 5 0 0 1 1.65-1.651C5.59 2 7.228 2 10.5 2h3c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C22 5.59 22 7.228 22 10.5v1c0 2.33 0 3.495-.38 4.413a5 5 0 0 1-2.707 2.706c-.66.274-1.447.35-2.703.372c-.85.015-1.275.022-1.613.219c-.338.196-.548.551-.968 1.262' opacity='.5'/%3E%3Cpath fill='currentColor' d='M10.99 14.308c-1.327-.978-3.49-2.84-3.49-4.593c0-2.677 2.475-3.677 4.5-1.609c2.025-2.068 4.5-1.068 4.5 1.609c0 1.752-2.163 3.615-3.49 4.593c-.454.335-.681.502-1.01.502s-.556-.167-1.01-.502'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:check-circle-bold-duotone,[i-solar\:check-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M16.03 8.97a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:close-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.97 8.97a.75.75 0 0 1 1.06 0L12 10.94l1.97-1.97a.75.75 0 1 1 1.06 1.06L13.06 12l1.97 1.97a.75.75 0 0 1-1.06 1.06L12 13.06l-1.97 1.97a.75.75 0 0 1-1.06-1.06L10.94 12l-1.97-1.97a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:close-circle-line-duotone,[i-solar\:close-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='m14.5 9.5l-5 5m0-5l5 5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:code-bold-duotone,[i-solar\:code-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.443 7.328a.75.75 0 0 1 1.059-.056l1.737 1.564c.737.663 1.347 1.212 1.767 1.71c.44.525.754 1.088.754 1.784c0 .695-.313 1.258-.754 1.782c-.42.499-1.03 1.049-1.767 1.711l-1.737 1.564a.75.75 0 1 1-1.004-1.115l1.697-1.527c.788-.709 1.319-1.19 1.663-1.598c.33-.393.402-.622.402-.817c0-.196-.072-.425-.402-.818c-.344-.409-.875-.889-1.663-1.598l-1.697-1.527a.75.75 0 0 1-.056-1.06m-8.94 1.06a.75.75 0 0 0-1.004-1.115L4.761 8.836c-.737.663-1.347 1.212-1.767 1.71c-.44.525-.754 1.088-.754 1.784c0 .695.313 1.258.754 1.782c.42.499 1.03 1.049 1.767 1.711l1.737 1.564a.75.75 0 1 0 1.004-1.115l-1.697-1.527c-.788-.709-1.319-1.19-1.663-1.598c-.33-.393-.402-.622-.402-.817c0-.196.072-.425.402-.818c.344-.409.875-.889 1.663-1.598z'/%3E%3Cpath fill='currentColor' d='M14.182 4.276a.75.75 0 0 1 .53.918l-3.974 14.83a.75.75 0 1 1-1.449-.389l3.974-14.83a.75.75 0 0 1 .919-.53' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:danger-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12s4.477 10 10 10s10-4.477 10-10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 6.25a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0V7a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:danger-triangle-bold-duotone,[i-solar\:danger-triangle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 3c-2.31 0-3.77 2.587-6.688 7.762l-.364.644c-2.425 4.3-3.638 6.45-2.542 8.022S6.214 21 11.636 21h.728c5.422 0 8.134 0 9.23-1.572s-.117-3.722-2.542-8.022l-.364-.645C15.77 5.587 14.311 3 12 3' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 7.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V8a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:document-add-outline,[i-solar\:document-add-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.944 1.25h2.112c1.838 0 3.294 0 4.433.153c1.172.158 2.121.49 2.87 1.238a.75.75 0 0 1-1.06 1.06c-.424-.422-1.004-.676-2.01-.811c-1.027-.138-2.382-.14-4.289-.14h-2c-1.907 0-3.261.002-4.29.14c-1.005.135-1.585.389-2.008.812S4.025 4.705 3.89 5.71c-.138 1.029-.14 2.383-.14 4.29v4c0 1.907.002 3.262.14 4.29c.135 1.005.389 1.585.812 2.008s1.003.677 2.009.812c1.028.138 2.382.14 4.289.14h2c1.907 0 3.262-.002 4.29-.14c1.005-.135 1.585-.389 2.008-.812c.696-.696.907-1.777.943-4.309a.75.75 0 0 1 1.5.022c-.035 2.427-.192 4.158-1.382 5.348c-.749.748-1.698 1.08-2.87 1.238c-1.14.153-2.595.153-4.433.153h-2.112c-1.838 0-3.294 0-4.433-.153c-1.172-.158-2.121-.49-2.87-1.238c-.748-.749-1.08-1.698-1.238-2.87c-.153-1.14-.153-2.595-.153-4.433V9.944c0-1.838 0-3.294.153-4.433c.158-1.172.49-2.121 1.238-2.87c.749-.748 1.698-1.08 2.87-1.238c1.14-.153 2.595-.153 4.433-.153m7.17 5.796a2.716 2.716 0 1 1 3.84 3.84L17.2 15.643a7 7 0 0 1-.63.587q-.346.27-.744.46c-.224.107-.46.185-.806.3l-2.084.695a1.28 1.28 0 0 1-1.62-1.62l.681-2.04l.014-.043c.116-.347.194-.582.301-.806a4 4 0 0 1 .46-.744c.153-.196.328-.371.587-.63l.031-.031zm2.78 1.06a1.216 1.216 0 0 0-1.72 0l-.182.182l.034.107c.094.27.273.63.611.968a2.55 2.55 0 0 0 1.075.645l.182-.182a1.216 1.216 0 0 0 0-1.72m-1.328 3.048a4 4 0 0 1-.99-.73a4 4 0 0 1-.73-.99L14.45 12.83c-.301.301-.407.409-.496.523q-.17.218-.289.467c-.062.131-.111.274-.246.678l-.4 1.2l.283.283l1.2-.4c.404-.135.547-.184.678-.246q.248-.12.467-.289c.114-.089.222-.195.523-.496zM7.25 9A.75.75 0 0 1 8 8.25h6.5a.75.75 0 0 1 0 1.5H8A.75.75 0 0 1 7.25 9m0 4a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5H8a.75.75 0 0 1-.75-.75m0 4a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5H8a.75.75 0 0 1-.75-.75' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:document-text-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M3 10c0-3.771 0-5.657 1.172-6.828S7.229 2 11 2h2c3.771 0 5.657 0 6.828 1.172S21 6.229 21 10v4c0 3.771 0 5.657-1.172 6.828S16.771 22 13 22h-2c-3.771 0-5.657 0-6.828-1.172S3 17.771 3 14z'/%3E%3Cpath stroke-linecap='round' d='M8 12h8M8 8h8m-8 8h5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:earth-outline,[i-solar\:earth-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.578 5.343a9.25 9.25 0 0 0 6.803 15.9c-.206-.912-.234-2.138.393-3.319c.652-1.229 2.002-1.762 2.995-2.006a9.2 9.2 0 0 1 1.898-.254h.043c1.673-.018 2.426-.562 2.826-1.08c.342-.444.47-.887.602-1.336l.05-.172A9.22 9.22 0 0 0 18.6 5.519l-.027.1c-.163.594-.425 1.202-.711 1.636c-.256.388-.752.78-1.164 1.076a10 10 0 0 1-.902.56c-.228.132-.433.25-.63.38c-.432.286-.766.593-.991 1.056a.67.67 0 0 0-.035.49c.075.272.126.578.126.889c.002.649-.328 1.176-.753 1.518a2.4 2.4 0 0 1-1.521.526c-2.455-.027-3.965-2.02-4.164-4.236c-.08-.881-.466-1.773-.954-2.552a8.8 8.8 0 0 0-1.296-1.62m1.167-.956a10.5 10.5 0 0 1 1.4 1.779c.558.89 1.069 2.012 1.177 3.214c.15 1.68 1.213 2.854 2.686 2.87a.9.9 0 0 0 .563-.194c.146-.117.196-.24.195-.346c0-.156-.026-.328-.072-.495a2.16 2.16 0 0 1 .131-1.542c.385-.794.956-1.285 1.514-1.653c.239-.158.487-.3.71-.43l.09-.05c.255-.148.48-.28.683-.427c.431-.31.704-.557.787-.684c.183-.276.388-.734.518-1.207c.103-.374.131-.662.122-.84A9.2 9.2 0 0 0 12 2.75a9.2 9.2 0 0 0-5.255 1.637M22.68 13.24q.07-.61.071-1.24c0-5.937-4.813-10.75-10.75-10.75S1.25 6.063 1.25 12S6.063 22.75 12 22.75c5.46 0 9.97-4.071 10.659-9.344a3 3 0 0 1 .048-.156zm-2.774 3.567c-.596.218-1.314.348-2.179.357h-.031l-.09.003a7.7 7.7 0 0 0-1.477.208c-.902.221-1.693.62-2.029 1.252c-.456.859-.39 1.793-.22 2.432a9.26 9.26 0 0 0 6.026-4.252' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:emoji-funny-square-bold-duotone,[i-solar\:emoji-funny-square-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M6.504 21.52c1.633.943 3.706.387 7.853-.724s6.22-1.666 7.163-3.3s.387-3.706-.724-7.853s-1.666-6.22-3.3-7.163s-3.706-.388-7.853.724c-4.147 1.11-6.22 1.666-7.163 3.3s-.388 3.706.724 7.853c1.11 4.147 1.666 6.22 3.3 7.163' opacity='.5'/%3E%3Cpath fill='currentColor' d='M14.898 11.224c.533-.143.792-.908.578-1.708s-.821-1.333-1.355-1.19c-.533.143-.792.907-.577 1.708c.214.8.82 1.333 1.354 1.19m-5.796 1.553c.534-.143.792-.908.578-1.708s-.82-1.333-1.354-1.19s-.792.907-.578 1.708s.82 1.333 1.354 1.19m-.917 2.974a.75.75 0 0 1 .91-.545c1.13.283 2.428.287 3.746-.066c1.318-.354 2.44-1.006 3.278-1.816a.75.75 0 1 1 1.043 1.078a8.4 8.4 0 0 1-1.15.928l.159.322a1.5 1.5 0 1 1-2.693 1.322l-.196-.4l-.053.014c-1.555.417-3.112.42-4.499.073a.75.75 0 0 1-.545-.91'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:eye-closed-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.919 6.605a1 1 0 0 0-1.838.79l.002.003l.003.007l.01.021l.032.072q.04.09.12.25c.105.21.262.506.47.857c.41.687 1.027 1.6 1.872 2.52l-.797.797a1 1 0 1 0 1.414 1.414l.84-.84c.565.455 1.197.885 1.897 1.256l-.782 1.202a1 1 0 0 0 1.676 1.091l.985-1.514c.677.208 1.402.355 2.177.425V16.5a1 1 0 0 0 1 1V13c-2.748 0-4.819-1.199-6.304-2.59l-.024-.022a12 12 0 0 1-.564-.569a13.4 13.4 0 0 1-1.67-2.237a12 12 0 0 1-.516-.968zm-1.838.79L2 7c-.92.394-.919.395-.919.395' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M15.22 12.398A8.7 8.7 0 0 1 12 13v4.5a1 1 0 0 0 1-1v-1.544c.772-.07 1.497-.217 2.176-.425l.986 1.515a1 1 0 0 0 1.676-1.091l-.782-1.203c.701-.37 1.332-.8 1.897-1.256l.84.84a1 1 0 1 0 1.414-1.414l-.797-.798a15.4 15.4 0 0 0 2.302-3.296a10 10 0 0 0 .19-.395l.011-.026l.004-.008l.002-.005a1 1 0 1 0-1.838-.788l-.005.011a5 5 0 0 1-.146.302a13 13 0 0 1-2.614 3.48c-.841.79-1.87 1.517-3.095 2' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:eye-scan-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14 2.75c1.907 0 3.262.002 4.29.14c1.005.135 1.585.389 2.008.812c.487.487.7.865.817 1.538c.132.759.135 1.84.135 3.76a.75.75 0 0 0 1.5 0v-.096c0-1.8 0-3.018-.158-3.922c-.175-1.005-.549-1.656-1.233-2.34c-.749-.75-1.698-1.081-2.87-1.239c-1.14-.153-2.595-.153-4.433-.153H14a.75.75 0 0 0 0 1.5M2 14.25a.75.75 0 0 1 .75.75c0 1.92.003 3.001.135 3.76c.118.673.33 1.051.817 1.538c.423.423 1.003.677 2.009.812c1.028.138 2.382.14 4.289.14a.75.75 0 0 1 0 1.5h-.056c-1.838 0-3.294 0-4.433-.153c-1.172-.158-2.121-.49-2.87-1.238c-.684-.685-1.058-1.336-1.233-2.341c-.158-.904-.158-2.123-.158-3.922V15a.75.75 0 0 1 .75-.75m20 0a.75.75 0 0 1 .75.75v.096c0 1.8 0 3.018-.158 3.922c-.175 1.005-.549 1.656-1.233 2.34c-.749.75-1.698 1.081-2.87 1.239c-1.14.153-2.595.153-4.433.153H14a.75.75 0 0 1 0-1.5c1.907 0 3.262-.002 4.29-.14c1.005-.135 1.585-.389 2.008-.812c.487-.487.7-.865.817-1.538c.132-.759.135-1.84.135-3.76a.75.75 0 0 1 .75-.75m-12.056-13H10a.75.75 0 0 1 0 1.5c-1.907 0-3.261.002-4.29.14c-1.005.135-1.585.389-2.008.812c-.487.487-.7.865-.817 1.538c-.132.759-.135 1.84-.135 3.76a.75.75 0 1 1-1.5 0v-.096c0-1.8 0-3.018.158-3.922c.175-1.005.549-1.656 1.233-2.34c.749-.75 1.698-1.081 2.87-1.239c1.14-.153 2.595-.153 4.433-.153' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12 10.75a1.25 1.25 0 1 0 0 2.5a1.25 1.25 0 0 0 0-2.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.892 14.06C5.297 13.37 5 13.025 5 12s.297-1.37.892-2.06C7.08 8.562 9.072 7 12 7s4.92 1.562 6.108 2.94c.595.69.892 1.035.892 2.06s-.297 1.37-.892 2.06C16.92 15.438 14.928 17 12 17s-4.92-1.562-6.108-2.94M9.25 12a2.75 2.75 0 1 1 5.5 0a2.75 2.75 0 0 1-5.5 0' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:face-scan-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.801 2.57a.71.71 0 0 1-.555.838a8.78 8.78 0 0 0-6.838 6.838a.71.71 0 1 1-1.394-.283a10.2 10.2 0 0 1 7.949-7.949a.71.71 0 0 1 .838.556M2.57 13.199a.71.71 0 0 1 .838.555a8.78 8.78 0 0 0 6.838 6.838a.71.71 0 1 1-.283 1.394a10.2 10.2 0 0 1-7.948-7.949a.71.71 0 0 1 .555-.838M13.199 2.57a.71.71 0 0 1 .838-.556a10.2 10.2 0 0 1 7.949 7.949a.711.711 0 0 1-1.394.283a8.78 8.78 0 0 0-6.838-6.838a.71.71 0 0 1-.555-.838m8.231 10.629a.71.71 0 0 1 .556.838a10.2 10.2 0 0 1-7.949 7.949a.711.711 0 0 1-.283-1.394a8.78 8.78 0 0 0 6.838-6.838a.71.71 0 0 1 .838-.555' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M12 19.583a7.583 7.583 0 1 0 0-15.166a7.583 7.583 0 0 0 0 15.166' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.94 14.539a.71.71 0 0 1 .995-.148c.59.437 1.3.69 2.065.69a3.45 3.45 0 0 0 2.065-.69a.71.71 0 1 1 .847 1.142a4.87 4.87 0 0 1-2.912.97a4.87 4.87 0 0 1-2.911-.97a.71.71 0 0 1-.148-.994m5.547-2.895c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244m-4.976 0c.458 0 .83-.557.83-1.244s-.372-1.244-.83-1.244s-.83.557-.83 1.244s.372 1.244.83 1.244'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:face-scan-circle-outline,[i-solar\:face-scan-circle-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 10.5c0 .829-.448 1.5-1 1.5c-.553 0-1-.671-1-1.5c0-.828.447-1.5 1-1.5s1 .672 1 1.5m-6 0c0 .829-.448 1.5-1 1.5s-1-.671-1-1.5C8 9.672 8.448 9 9 9s1 .672 1 1.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M13.265 2.051a.75.75 0 0 1 .884-.586a10.76 10.76 0 0 1 8.386 8.386a.75.75 0 0 1-1.47.298a9.26 9.26 0 0 0-7.214-7.214a.75.75 0 0 1-.586-.884m-2.53 0a.75.75 0 0 1-.586.884a9.26 9.26 0 0 0-7.214 7.215a.75.75 0 0 1-1.47-.299A10.76 10.76 0 0 1 9.85 1.465a.75.75 0 0 1 .884.586M2.051 13.265a.75.75 0 0 1 .884.586a9.26 9.26 0 0 0 7.214 7.214a.75.75 0 1 1-.298 1.47a10.76 10.76 0 0 1-8.386-8.385a.75.75 0 0 1 .586-.885m19.898 0a.75.75 0 0 1 .586.885a10.76 10.76 0 0 1-8.386 8.385a.75.75 0 0 1-.298-1.47a9.26 9.26 0 0 0 7.214-7.214a.75.75 0 0 1 .884-.586M8.397 15.554a.75.75 0 0 1 1.05-.156c.728.54 1.607.852 2.553.852s1.825-.312 2.553-.852a.75.75 0 1 1 .893 1.205A5.77 5.77 0 0 1 12 17.75a5.77 5.77 0 0 1-3.447-1.147a.75.75 0 0 1-.156-1.05' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:filters-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18 8A6 6 0 1 1 6 8a6 6 0 0 1 12 0'/%3E%3Cpath fill='currentColor' d='M13.58 13.79a6 6 0 0 1-7.16-3.58a6 6 0 1 0 7.16 3.58' opacity='.7'/%3E%3Cpath fill='currentColor' d='M13.58 13.79c.271.684.42 1.43.42 2.21a6 6 0 0 1-2 4.472a6 6 0 1 0 5.58-10.262a6.01 6.01 0 0 1-4 3.58' opacity='.4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:forward-linear,[i-solar\:forward-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19.5 12l-5-5m5 5l-5 5m5-5h-10c-1.667 0-5 1-5 5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:ghost-bold-duotone,[i-solar\:ghost-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 19.206V12c0-5.523-4.477-10-10-10S2 6.477 2 12v7.206a1.727 1.727 0 0 0 2.5 1.544a2.89 2.89 0 0 1 2.896.18a2.89 2.89 0 0 0 3.208 0l.353-.234a1.88 1.88 0 0 1 2.086 0l.353.235a2.89 2.89 0 0 0 3.208 0a2.89 2.89 0 0 1 2.897-.18A1.727 1.727 0 0 0 22 19.206' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15 12c.552 0 1-.672 1-1.5S15.552 9 15 9s-1 .672-1 1.5s.448 1.5 1 1.5m-5-1.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5S8.448 9 9 9s1 .672 1 1.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:home-smile-outline,[i-solar\:home-smile-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M9.447 15.398a.75.75 0 1 0-.894 1.204A5.77 5.77 0 0 0 12 17.75a5.77 5.77 0 0 0 3.447-1.148a.75.75 0 1 0-.894-1.204A4.27 4.27 0 0 1 12 16.25a4.27 4.27 0 0 1-2.553-.852'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 1.25c-.708 0-1.351.203-2.05.542c-.674.328-1.454.812-2.427 1.416L5.456 4.491c-.92.572-1.659 1.03-2.227 1.465c-.589.45-1.041.91-1.368 1.507c-.326.595-.472 1.229-.543 1.978c-.068.725-.068 1.613-.068 2.726v1.613c0 1.904 0 3.407.153 4.582c.156 1.205.486 2.178 1.23 2.947c.747.773 1.697 1.119 2.875 1.282c1.14.159 2.598.159 4.434.159h4.116c1.836 0 3.294 0 4.434-.159c1.177-.163 2.128-.509 2.876-1.282c.743-.769 1.073-1.742 1.23-2.947c.152-1.175.152-2.678.152-4.582v-1.613c0-1.113 0-2-.068-2.726c-.07-.75-.217-1.383-.543-1.978c-.327-.597-.78-1.056-1.368-1.507c-.568-.436-1.306-.893-2.227-1.465l-2.067-1.283c-.973-.604-1.753-1.088-2.428-1.416c-.697-.34-1.34-.542-2.049-.542M8.28 4.504c1.015-.63 1.73-1.072 2.327-1.363c.581-.283.993-.391 1.393-.391s.812.108 1.393.391c.598.29 1.312.733 2.327 1.363l2 1.241c.961.597 1.636 1.016 2.14 1.402c.489.375.77.684.963 1.036c.193.353.306.766.365 1.398c.061.648.062 1.465.062 2.623v1.521c0 1.97-.002 3.376-.14 4.443c-.136 1.048-.393 1.656-.82 2.099c-.425.439-1.003.7-2.004.839c-1.026.142-2.379.144-4.286.144h-4c-1.908 0-3.26-.002-4.286-.144c-1.001-.14-1.579-.4-2.003-.84c-.428-.442-.685-1.05-.82-2.098c-.14-1.067-.141-2.472-.141-4.443v-1.521c0-1.158 0-1.975.062-2.623c.059-.632.172-1.045.365-1.398c.193-.352.474-.661.964-1.036c.503-.386 1.178-.805 2.139-1.402z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:info-circle-line-duotone,[i-solar\:info-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='M12 17v-6'/%3E%3Ccircle cx='1' cy='1' r='1' fill='currentColor' transform='matrix(1 0 0 -1 11 9)'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:info-circle-outline,[i-solar\:info-circle-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 17.75a.75.75 0 0 0 .75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75M12 7a1 1 0 1 1 0 2a1 1 0 0 1 0-2'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M1.25 12C1.25 6.063 6.063 1.25 12 1.25S22.75 6.063 22.75 12S17.937 22.75 12 22.75S1.25 17.937 1.25 12M12 2.75a9.25 9.25 0 1 0 0 18.5a9.25 9.25 0 0 0 0-18.5' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:layers-bold-duotone,[i-solar\:layers-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.979 9.685C2.993 8.891 2 8.494 2 8s.993-.89 2.979-1.685l2.808-1.123C9.773 4.397 10.767 4 12 4s2.227.397 4.213 1.192l2.808 1.123C21.007 7.109 22 7.506 22 8s-.993.89-2.979 1.685l-2.808 1.124C14.227 11.603 13.233 12 12 12s-2.227-.397-4.213-1.191z'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 8c0 .494.993.89 2.979 1.685l2.808 1.124C9.773 11.603 10.767 12 12 12s2.227-.397 4.213-1.191l2.808-1.124C21.007 8.891 22 8.494 22 8s-.993-.89-2.979-1.685l-2.808-1.123C14.227 4.397 13.233 4 12 4s-2.227.397-4.213 1.192L4.98 6.315C2.993 7.109 2 7.506 2 8' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m5.766 10l-.787.315C2.993 11.109 2 11.507 2 12s.993.89 2.979 1.685l2.808 1.124C9.773 15.603 10.767 16 12 16s2.227-.397 4.213-1.191l2.808-1.124C21.007 12.891 22 12.493 22 12s-.993-.89-2.979-1.685L18.234 10l-2.021.809C14.227 11.603 13.233 12 12 12s-2.227-.397-4.213-1.191z' opacity='.7'/%3E%3Cpath fill='currentColor' d='m5.766 14l-.787.315C2.993 15.109 2 15.507 2 16s.993.89 2.979 1.685l2.808 1.124C9.773 19.603 10.767 20 12 20s2.227-.397 4.213-1.192l2.808-1.123C21.007 16.891 22 16.494 22 16c0-.493-.993-.89-2.979-1.685L18.234 14l-2.021.809C14.227 15.603 13.233 16 12 16s-2.227-.397-4.213-1.191z' opacity='.4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:leaf-bold-duotone,[i-solar\:leaf-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 22c-4.418 0-8-3.646-8-8.143c0-4.462 2.553-9.67 6.537-11.531A3.45 3.45 0 0 1 12 2z' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M13.463 2.326A3.45 3.45 0 0 0 12 2v7l4.432-4.432c-.863-.947-1.86-1.724-2.97-2.242' opacity='.3'/%3E%3Cpath fill='currentColor' d='M12 9v5.5l6.614-6.614c-.572-1.22-1.308-2.357-2.182-3.318z' opacity='.4'/%3E%3Cpath fill='currentColor' d='m12 19.5l7.811-7.811a15 15 0 0 0-1.197-3.803L12 14.5z' opacity='.6'/%3E%3Cpath fill='currentColor' d='M19.811 11.689L12 19.5V22c4.418 0 8-3.646 8-8.143c0-.71-.064-1.438-.189-2.168' opacity='.7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magic-stick-2-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.714 2.127c-.836-.43-1.922.263-4.095 1.65l-.562.36c-.618.394-.927.591-1.273.648c-.347.056-.692-.034-1.382-.215l-.628-.164C6.345 3.769 5.13 3.45 4.436 4.13s-.412 1.908.157 4.363l.147.635c.161.697.242 1.046.177 1.393c-.066.346-.27.65-.68 1.26l-.372.555c-1.439 2.145-2.158 3.217-1.753 4.067c.406.85 1.668.915 4.192 1.045l.654.033c.717.037 1.076.056 1.382.213c.306.158.524.436.962.994l.398.507c1.539 1.962 2.309 2.943 3.255 2.788c.945-.154 1.441-1.342 2.433-3.717l.257-.614c.282-.675.422-1.012.677-1.261c.255-.25.595-.382 1.274-.647l.618-.24c2.39-.933 3.586-1.4 3.765-2.345s-.777-1.744-2.688-3.342l-.495-.413c-.543-.454-.815-.68-.963-.992s-.158-.672-.175-1.393l-.016-.657c-.062-2.538-.093-3.806-.928-4.236'/%3E%3Cpath fill='currentColor' d='M15.93 16.991c.127-.268.239-.45.392-.6c.172-.167.382-.282.71-.42l4.498 4.499a.75.75 0 0 1-1.06 1.06z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magic-stick-3-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51c.012-.014.555.503.568.49l4-4c.013-.013-.504-.556-.49-.568L7.922 3.845a2.883 2.883 0 0 0-4.077 0m1.288 11.462a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z' opacity='.5'/%3E%3Cpath fill='currentColor' d='M19.967 9.13a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273z' opacity='.2'/%3E%3Cpath fill='currentColor' d='M16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274z' opacity='.7'/%3E%3Cpath fill='currentColor' d='M10.568 6.49c-.012.014-.555-.503-.568-.49l-4 4c-.013.013.504.556.49.568l9.588 9.587a2.883 2.883 0 1 0 4.078-4.077z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:magnifer-line-duotone,[i-solar\:magnifer-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cdefs%3E%3Cmask id='solarMagniferLineDuotone0'%3E%3Cg fill='none' stroke-width='1.5'%3E%3Ccircle cx='11.5' cy='11.5' r='9.5' stroke='gray'/%3E%3Cpath stroke='%23fff' stroke-linecap='round' d='M18.5 18.5L22 22'/%3E%3C/g%3E%3C/mask%3E%3C/defs%3E%3Cpath fill='currentColor' d='M0 0h24v24H0z' mask='url(%23solarMagniferLineDuotone0)'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:microphone-3-bold-duotone,[i-solar\:microphone-3-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M4 9a.75.75 0 0 1 .75.75v1a7.25 7.25 0 1 0 14.5 0v-1a.75.75 0 0 1 1.5 0v1a8.75 8.75 0 0 1-8 8.718v2.282a.75.75 0 0 1-1.5 0v-2.282a8.75 8.75 0 0 1-8-8.718v-1A.75.75 0 0 1 4 9' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 2a5.75 5.75 0 0 0-5.75 5.75v3a5.75 5.75 0 0 0 11.5 0v-3A5.75 5.75 0 0 0 12 2m2 9.5a.75.75 0 0 0 0-1.5h-4a.75.75 0 0 0 0 1.5zm-.25-3.75a.75.75 0 0 1-.75.75h-2A.75.75 0 0 1 11 7h2a.75.75 0 0 1 .75.75' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M14 11.5a.75.75 0 0 0 0-1.5h-4a.75.75 0 0 0 0 1.5zm-1-3A.75.75 0 0 0 13 7h-2a.75.75 0 0 0 0 1.5z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:minus-circle-line-duotone,[i-solar\:minus-circle-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.5'/%3E%3Cpath stroke-linecap='round' d='M15 12H9'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:moon-outline,[i-solar\:moon-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.017 2.802a9.25 9.25 0 1 0 10.181 10.181A7.25 7.25 0 1 1 11.017 2.802M1.25 12C1.25 6.063 6.063 1.25 12 1.25c.717 0 1.075.571 1.137 1.026c.059.438-.103.995-.606 1.299a5.75 5.75 0 1 0 7.894 7.894c.304-.503.861-.665 1.299-.606c.455.062 1.026.42 1.026 1.137c0 5.937-4.813 10.75-10.75 10.75S1.25 17.937 1.25 12' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:notes-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='m20.312 12.647l.517-1.932c.604-2.255.907-3.382.68-4.358a4 4 0 0 0-1.162-2.011c-.731-.685-1.859-.987-4.114-1.591c-2.255-.605-3.383-.907-4.358-.68a4 4 0 0 0-2.011 1.162c-.587.626-.893 1.543-1.348 3.209l-.244.905l-.517 1.932c-.605 2.255-.907 3.382-.68 4.358a4 4 0 0 0 1.162 2.011c.731.685 1.859.987 4.114 1.592c2.032.544 3.149.843 4.064.73q.15-.019.294-.052a4 4 0 0 0 2.011-1.16c.685-.732.987-1.86 1.592-4.115Z'/%3E%3Cpath d='M16.415 17.974a4 4 0 0 1-1.068 1.678c-.731.685-1.859.987-4.114 1.591s-3.383.907-4.358.679a4 4 0 0 1-2.011-1.161c-.685-.731-.988-1.859-1.592-4.114l-.517-1.932c-.605-2.255-.907-3.383-.68-4.358a4 4 0 0 1 1.162-2.011c.731-.685 1.859-.987 4.114-1.592q.638-.172 1.165-.309'/%3E%3Cpath stroke-linecap='round' d='m11.777 10l4.83 1.294M11 12.898l2.898.776'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:pallete-2-bold-duotone,[i-solar\:pallete-2-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10.847 21.934C5.867 21.362 2 17.133 2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 5.157-3.283 4.733-6.086 4.37c-1.618-.209-3.075-.397-3.652.518c-.395.626.032 1.406.555 1.929a1.673 1.673 0 0 1 0 2.366c-.523.523-1.235.836-1.97.751' opacity='.5'/%3E%3Cpath fill='currentColor' d='M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0M6.5 13a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m11 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m-3-4.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:pause-circle-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.076 8.617C8 8.801 8 9.034 8 9.5v5c0 .466 0 .699.076.883a1 1 0 0 0 .541.54c.184.077.417.077.883.077s.699 0 .883-.076a1 1 0 0 0 .54-.541c.077-.184.077-.417.077-.883v-5c0-.466 0-.699-.076-.883a1 1 0 0 0-.541-.54C10.199 8 9.966 8 9.5 8s-.699 0-.883.076a1 1 0 0 0-.54.541m4.999 0C13 8.801 13 9.034 13 9.5v5c0 .466 0 .699.076.883a1 1 0 0 0 .541.54c.184.077.417.077.883.077s.699 0 .883-.076a1 1 0 0 0 .54-.541c.077-.184.077-.417.077-.883v-5c0-.466 0-.699-.076-.883a1 1 0 0 0-.541-.54C15.199 8 14.966 8 14.5 8s-.699 0-.883.076a1 1 0 0 0-.54.541'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:people-nearby-bold-duotone,[i-solar\:people-nearby-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19.717 20.362C21.143 19.585 22 18.587 22 17.5c0-1.152-.963-2.204-2.546-3C17.623 13.58 14.962 13 12 13s-5.623.58-7.454 1.5C2.963 15.296 2 16.348 2 17.5s.963 2.204 2.546 3C6.377 21.42 9.038 22 12 22c3.107 0 5.882-.637 7.717-1.638' opacity='.6'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M9.25 4a2.75 2.75 0 1 1 5.5 0a2.75 2.75 0 0 1-5.5 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m8.223 11.574l-2.175-.725a1.532 1.532 0 0 1 .805-2.952l1.898.407l.21.044a15 15 0 0 0 6.288-.044l1.897-.407a1.532 1.532 0 0 1 .806 2.952l-2.175.725c-.263.088-.394.132-.493.193a1 1 0 0 0-.466.986c.016.115.066.244.165.503l1.247 3.242a1.473 1.473 0 0 1-2.654 1.26L12 15l-1.576 2.757a1.473 1.473 0 0 1-2.654-1.26l1.247-3.241c.1-.259.149-.388.165-.503a1 1 0 0 0-.466-.986c-.099-.061-.23-.105-.493-.193'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:play-circle-bold-duotone,[i-solar\:play-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='m15.414 13.059l-4.72 2.787C9.934 16.294 9 15.71 9 14.786V9.214c0-.924.934-1.507 1.694-1.059l4.72 2.787c.781.462.781 1.656 0 2.118'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:play-circle-broken{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M13.888 9.935C14.963 10.812 15.5 11.25 15.5 12s-.537 1.188-1.612 2.065c-.297.242-.591.47-.862.66c-.237.167-.506.339-.784.508c-1.073.652-1.609.978-2.09.617c-.48-.36-.524-1.116-.612-2.628c-.024-.427-.04-.846-.04-1.222s.016-.795.04-1.222c.088-1.512.132-2.267.612-2.628c.481-.361 1.018-.035 2.09.617c.278.169.547.341.784.508c.27.19.565.418.862.66Z'/%3E%3Cpath stroke-linecap='round' d='M7 3.338A9.95 9.95 0 0 1 12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12c0-1.821.487-3.53 1.338-5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:refresh-bold-duotone,[i-solar\:refresh-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12.079 2.25c-4.794 0-8.734 3.663-9.118 8.333H2a.75.75 0 0 0-.528 1.283l1.68 1.666a.75.75 0 0 0 1.056 0l1.68-1.666a.75.75 0 0 0-.528-1.283h-.893c.38-3.831 3.638-6.833 7.612-6.833a7.66 7.66 0 0 1 6.537 3.643a.75.75 0 1 0 1.277-.786A9.16 9.16 0 0 0 12.08 2.25'/%3E%3Cpath fill='currentColor' d='M20.841 10.467a.75.75 0 0 0-1.054 0L18.1 12.133a.75.75 0 0 0 .527 1.284h.899c-.381 3.83-3.651 6.833-7.644 6.833a7.7 7.7 0 0 1-6.565-3.644a.75.75 0 1 0-1.276.788a9.2 9.2 0 0 0 7.84 4.356c4.809 0 8.766-3.66 9.151-8.333H22a.75.75 0 0 0 .527-1.284z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:round-double-alt-arrow-right-bold-duotone,[i-solar\:round-double-alt-arrow-right-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12' opacity='.5'/%3E%3Cpath fill='currentColor' d='M9.03 15.53a.75.75 0 0 1-1.06-1.06L10.44 12L7.97 9.53a.75.75 0 0 1 1.06-1.06l3 3a.75.75 0 0 1 0 1.06z'/%3E%3Cpath fill='currentColor' d='M13.03 15.53a.75.75 0 1 1-1.06-1.06L14.44 12l-2.47-2.47a.75.75 0 0 1 1.06-1.06l3 3a.75.75 0 0 1 0 1.06z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:running-2-line-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none'%3E%3Ccircle cx='18.5' cy='4.5' r='2.5' stroke='currentColor' stroke-width='1.5' opacity='.5'/%3E%3Cpath stroke='currentColor' stroke-linecap='round' stroke-width='1.5' d='m9 17l-1 1.2c-.738.886-1.107 1.328-1.61 1.564S5.31 20 4.157 20H3'/%3E%3Cpath fill='currentColor' d='M13.65 22a.75.75 0 0 0 1.5 0zm-1.085-5.754l.453-.598zm1.184 1.015l.587-.466zm.557 1.12l.727-.186zm-.802-6.826a.75.75 0 0 0-1.009-1.11zm-2.652 1.61l.703.26zm.07 1.555l-.677.323zm2.728 5.219v2.06h1.5v-2.06zm-1.538-3.095c.663.502.887.679 1.05.884l1.174-.934c-.308-.387-.717-.69-1.319-1.146zm3.038 3.095c0-.755.006-1.264-.117-1.744l-1.453.373c.065.254.07.538.07 1.37zm-1.988-2.211c.197.247.339.534.417.84l1.454-.373a3.75 3.75 0 0 0-.697-1.4zm-.667-7.283c-.42.381-.945.836-1.354 1.224c-.21.198-.41.398-.573.586c-.149.172-.327.4-.42.649l1.407.521c-.007.021.014-.035.146-.187c.116-.134.276-.295.471-.48c.4-.38.865-.778 1.332-1.203zm.523 5.203c-.488-.37-.818-.62-1.056-.832c-.233-.208-.32-.33-.363-.418l-1.354.645c.167.35.423.63.72.894c.292.26.679.552 1.147.907zm-2.87-2.744a2.75 2.75 0 0 0 .097 2.139l1.354-.645a1.25 1.25 0 0 1-.044-.973z' opacity='.5'/%3E%3Cpath fill='currentColor' d='m5.436 8.82l-.37-.652zm-1.807.164a.75.75 0 1 0 .742 1.304zm9.778-1.627l-.286.693zm-2.96-.715l-.055-.748zM21 12.75a.75.75 0 1 0 0-1.5zm-5.232-3.213l-.67.335zM5.065 8.168l-1.436.816l.742 1.304l1.435-.816zm8.627-1.505c-1.344-.553-2.08-.857-3.3-.769l.11 1.496c.823-.06 1.255.099 2.62.66zm-7.886 2.81c2.502-1.422 3.552-2 4.695-2.083l-.109-1.496c-1.56.114-2.949.923-5.327 2.274zm13.949 3.276H21v-1.5h-1.245zm-4.658-2.878a5.21 5.21 0 0 0 4.658 2.878v-1.5A3.71 3.71 0 0 1 16.439 9.2zm1.342-.67a5.33 5.33 0 0 0-2.747-2.538l-.57 1.387c.86.354 1.564 1 1.975 1.821z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:scale-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12' opacity='.5'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M16.656 2.75a.75.75 0 0 1 0-1.5H22a.75.75 0 0 1 .75.75v5.344a.75.75 0 0 1-1.5 0V3.81l-7.44 7.439H16a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1-.75-.75V8a.75.75 0 0 1 1.5 0v2.19l7.44-7.44z' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-bold-duotone,[i-solar\:settings-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M14.279 2.152C13.909 2 13.439 2 12.5 2s-1.408 0-1.779.152a2 2 0 0 0-1.09 1.083c-.094.223-.13.484-.145.863a1.62 1.62 0 0 1-.796 1.353a1.64 1.64 0 0 1-1.579.008c-.338-.178-.583-.276-.825-.308a2.03 2.03 0 0 0-1.49.396c-.318.242-.553.646-1.022 1.453c-.47.807-.704 1.21-.757 1.605c-.07.526.074 1.058.4 1.479c.148.192.357.353.68.555c.477.297.783.803.783 1.361s-.306 1.064-.782 1.36c-.324.203-.533.364-.682.556a2 2 0 0 0-.399 1.479c.053.394.287.798.757 1.605s.704 1.21 1.022 1.453c.424.323.96.465 1.49.396c.242-.032.487-.13.825-.308a1.64 1.64 0 0 1 1.58.008c.486.28.774.795.795 1.353c.015.38.051.64.145.863c.204.49.596.88 1.09 1.083c.37.152.84.152 1.779.152s1.409 0 1.779-.152a2 2 0 0 0 1.09-1.083c.094-.223.13-.483.145-.863c.02-.558.309-1.074.796-1.353a1.64 1.64 0 0 1 1.579-.008c.338.178.583.276.825.308c.53.07 1.066-.073 1.49-.396c.318-.242.553-.646 1.022-1.453c.47-.807.704-1.21.757-1.605a2 2 0 0 0-.4-1.479c-.148-.192-.357-.353-.68-.555c-.477-.297-.783-.803-.783-1.361s.306-1.064.782-1.36c.324-.203.533-.364.682-.556a2 2 0 0 0 .399-1.479c-.053-.394-.287-.798-.757-1.605s-.704-1.21-1.022-1.453a2.03 2.03 0 0 0-1.49-.396c-.242.032-.487.13-.825.308a1.64 1.64 0 0 1-1.58-.008a1.62 1.62 0 0 1-.795-1.353c-.015-.38-.051-.64-.145-.863a2 2 0 0 0-1.09-1.083' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M15.523 12c0 1.657-1.354 3-3.023 3s-3.023-1.343-3.023-3S10.83 9 12.5 9s3.023 1.343 3.023 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-minimalistic-bold-duotone,[i-solar\:settings-minimalistic-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.428 2c-1.114 0-2.129.6-4.157 1.802l-.686.406C5.555 5.41 4.542 6.011 3.985 7c-.557.99-.557 2.19-.557 4.594v.812c0 2.403 0 3.605.557 4.594s1.57 1.59 3.6 2.791l.686.407C10.299 21.399 11.314 22 12.428 22s2.128-.6 4.157-1.802l.686-.407c2.028-1.2 3.043-1.802 3.6-2.791c.557-.99.557-2.19.557-4.594v-.812c0-2.403 0-3.605-.557-4.594s-1.572-1.59-3.6-2.792l-.686-.406C14.555 2.601 13.542 2 12.428 2' clip-rule='evenodd' opacity='.5'/%3E%3Cpath fill='currentColor' d='M12.428 8.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:settings-outline,[i-solar\:settings-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor' fill-rule='evenodd' clip-rule='evenodd'%3E%3Cpath d='M12 8.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5M9.75 12a2.25 2.25 0 1 1 4.5 0a2.25 2.25 0 0 1-4.5 0'/%3E%3Cpath d='M11.975 1.25c-.445 0-.816 0-1.12.02a2.8 2.8 0 0 0-.907.19a2.75 2.75 0 0 0-1.489 1.488c-.145.35-.184.72-.2 1.122a.87.87 0 0 1-.415.731a.87.87 0 0 1-.841-.005c-.356-.188-.696-.339-1.072-.389a2.75 2.75 0 0 0-2.033.545a2.8 2.8 0 0 0-.617.691c-.17.254-.356.575-.578.96l-.025.044c-.223.385-.408.706-.542.98c-.14.286-.25.568-.29.88a2.75 2.75 0 0 0 .544 2.033c.231.301.532.52.872.734a.87.87 0 0 1 .426.726a.87.87 0 0 1-.426.726c-.34.214-.64.433-.872.734a2.75 2.75 0 0 0-.545 2.033c.041.312.15.594.29.88c.135.274.32.595.543.98l.025.044c.222.385.408.706.578.96c.177.263.367.5.617.69a2.75 2.75 0 0 0 2.033.546c.376-.05.716-.2 1.072-.389a.87.87 0 0 1 .84-.005a.86.86 0 0 1 .417.731c.015.402.054.772.2 1.122a2.75 2.75 0 0 0 1.488 1.489c.29.12.59.167.907.188c.304.021.675.021 1.12.021h.05c.445 0 .816 0 1.12-.02c.318-.022.617-.069.907-.19a2.75 2.75 0 0 0 1.489-1.488c.145-.35.184-.72.2-1.122a.87.87 0 0 1 .415-.732a.87.87 0 0 1 .841.006c.356.188.696.339 1.072.388a2.75 2.75 0 0 0 2.033-.544c.25-.192.44-.428.617-.691c.17-.254.356-.575.578-.96l.025-.044c.223-.385.408-.706.542-.98c.14-.286.25-.569.29-.88a2.75 2.75 0 0 0-.544-2.033c-.231-.301-.532-.52-.872-.734a.87.87 0 0 1-.426-.726c0-.278.152-.554.426-.726c.34-.214.64-.433.872-.734a2.75 2.75 0 0 0 .545-2.033a2.8 2.8 0 0 0-.29-.88a18 18 0 0 0-.543-.98l-.025-.044a18 18 0 0 0-.578-.96a2.8 2.8 0 0 0-.617-.69a2.75 2.75 0 0 0-2.033-.546c-.376.05-.716.2-1.072.389a.87.87 0 0 1-.84.005a.87.87 0 0 1-.417-.731c-.015-.402-.054-.772-.2-1.122a2.75 2.75 0 0 0-1.488-1.489c-.29-.12-.59-.167-.907-.188c-.304-.021-.675-.021-1.12-.021zm-1.453 1.595c.077-.032.194-.061.435-.078c.247-.017.567-.017 1.043-.017s.796 0 1.043.017c.241.017.358.046.435.078c.307.127.55.37.677.677c.04.096.073.247.086.604c.03.792.439 1.555 1.165 1.974s1.591.392 2.292.022c.316-.167.463-.214.567-.227a1.25 1.25 0 0 1 .924.247c.066.051.15.138.285.338c.139.206.299.483.537.895s.397.69.506.912c.107.217.14.333.15.416a1.25 1.25 0 0 1-.247.924c-.064.083-.178.187-.48.377c-.672.422-1.128 1.158-1.128 1.996s.456 1.574 1.128 1.996c.302.19.416.294.48.377c.202.263.29.595.247.924c-.01.083-.044.2-.15.416c-.109.223-.268.5-.506.912s-.399.689-.537.895c-.135.2-.219.287-.285.338a1.25 1.25 0 0 1-.924.247c-.104-.013-.25-.06-.567-.227c-.7-.37-1.566-.398-2.292.021s-1.135 1.183-1.165 1.975c-.013.357-.046.508-.086.604a1.25 1.25 0 0 1-.677.677c-.077.032-.194.061-.435.078c-.247.017-.567.017-1.043.017s-.796 0-1.043-.017c-.241-.017-.358-.046-.435-.078a1.25 1.25 0 0 1-.677-.677c-.04-.096-.073-.247-.086-.604c-.03-.792-.439-1.555-1.165-1.974s-1.591-.392-2.292-.022c-.316.167-.463.214-.567.227a1.25 1.25 0 0 1-.924-.247c-.066-.051-.15-.138-.285-.338a17 17 0 0 1-.537-.895c-.238-.412-.397-.69-.506-.912c-.107-.217-.14-.333-.15-.416a1.25 1.25 0 0 1 .247-.924c.064-.083.178-.187.48-.377c.672-.422 1.128-1.158 1.128-1.996s-.456-1.574-1.128-1.996c-.302-.19-.416-.294-.48-.377a1.25 1.25 0 0 1-.247-.924c.01-.083.044-.2.15-.416c.109-.223.268-.5.506-.912s.399-.689.537-.895c.135-.2.219-.287.285-.338a1.25 1.25 0 0 1 .924-.247c.104.013.25.06.567.227c.7.37 1.566.398 2.292-.022c.726-.419 1.135-1.182 1.165-1.974c.013-.357.046-.508.086-.604c.127-.307.37-.55.677-.677'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:stop-circle-bold-duotone,[i-solar\:stop-circle-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10' opacity='.5'/%3E%3Cpath fill='currentColor' d='M8.586 8.586C8 9.172 8 10.114 8 12s0 2.828.586 3.414S10.114 16 12 16s2.828 0 3.414-.586S16 13.886 16 12s0-2.828-.586-3.414S13.886 8 12 8s-2.828 0-3.414.586'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:sun-2-outline,[i-solar\:sun-2-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12 1.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75M3.669 3.716a.75.75 0 0 1 1.06-.047L6.95 5.7a.75.75 0 1 1-1.012 1.107L3.716 4.776a.75.75 0 0 1-.047-1.06m16.662 0a.75.75 0 0 1-.047 1.06l-2.222 2.031A.75.75 0 0 1 17.05 5.7l2.222-2.031a.75.75 0 0 1 1.06.047M12 7.75a4.25 4.25 0 1 0 0 8.5a4.25 4.25 0 0 0 0-8.5M6.25 12a5.75 5.75 0 1 1 11.5 0a5.75 5.75 0 0 1-11.5 0m-5 0a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5H2a.75.75 0 0 1-.75-.75m18 0a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1-.75-.75m-2.224 5.025a.75.75 0 0 1 1.06 0l2.222 2.223a.75.75 0 0 1-1.06 1.06l-2.222-2.222a.75.75 0 0 1 0-1.06m-10.051 0a.75.75 0 0 1 0 1.061l-2.223 2.222a.75.75 0 0 1-1.06-1.06l2.222-2.223a.75.75 0 0 1 1.06 0M12 19.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:trash-bin-trash-linear,[i-solar\:trash-bin-trash-linear=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' d='M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.196.81-4.856.81h-.774c-2.66 0-3.991 0-4.856-.81c-.865-.809-.954-2.136-1.13-4.79l-.46-6.9M9.5 11l.5 5m4.5-5l-.5 5'/%3E%3Cpath d='M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:tuning-outline,[i-solar\:tuning-outline=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16.959 9.75a.75.75 0 0 1-.75-.75V2a.75.75 0 0 1 1.5 0v7a.75.75 0 0 1-.75.75'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7 5.75a3.75 3.75 0 1 1 0 7.5a3.75 3.75 0 0 1 0-7.5M9.25 9.5a2.25 2.25 0 1 0-4.5 0a2.25 2.25 0 0 0 4.5 0M17 18.25a3.75 3.75 0 1 0 0-7.5a3.75 3.75 0 0 0 0 7.5m2.25-3.75a2.25 2.25 0 1 1-4.5 0a2.25 2.25 0 0 1 4.5 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M6.209 15a.75.75 0 0 1 1.5 0v7a.75.75 0 0 1-1.5 0zm10.75 7.75a.75.75 0 0 1-.75-.75v-2a.75.75 0 0 1 1.5 0v2a.75.75 0 0 1-.75.75M6.209 2a.75.75 0 0 1 1.5 0v2a.75.75 0 0 1-1.5 0z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:tuning-square-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z'/%3E%3Ccircle cx='8' cy='10' r='2'/%3E%3Ccircle cx='2' cy='2' r='2' transform='matrix(1 0 0 -1 14 16)'/%3E%3Cpath stroke-linecap='round' d='M8 14v5m8-9V5M8 5v1m8 13v-1'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:undo-left-bold-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7.53 3.47a.75.75 0 0 1 0 1.06L5.06 7l2.47 2.47a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='m5.06 7l.75-.75h9.226c.904 0 1.633 0 2.222.053c.606.055 1.136.172 1.617.45a3.75 3.75 0 0 1 1.372 1.372c.278.481.395 1.011.45 1.617c.053.589.053 1.318.053 2.222v.072c0 .904 0 1.633-.053 2.222c-.055.606-.172 1.136-.45 1.617a3.75 3.75 0 0 1-1.372 1.373c-.481.277-1.011.394-1.617.449c-.589.053-1.318.053-2.222.053H8a.75.75 0 0 1 0-1.5h7c.948 0 1.61 0 2.122-.047c.502-.046.788-.13 1.003-.254a2.25 2.25 0 0 0 .823-.824c.125-.215.21-.5.255-1.003c.046-.512.047-1.174.047-2.122s0-1.61-.047-2.122c-.046-.503-.13-.788-.255-1.003a2.25 2.25 0 0 0-.823-.824c-.215-.124-.5-.208-1.003-.254c-.512-.046-1.174-.047-2.122-.047H5.81z' opacity='.5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:upload-minimalistic-bold,[i-solar\:upload-minimalistic-bold=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12.554 2.494a.75.75 0 0 0-1.107 0l-4 4.375A.75.75 0 0 0 8.553 7.88l2.696-2.95V16a.75.75 0 0 0 1.5 0V4.932l2.697 2.95a.75.75 0 1 0 1.107-1.013z'/%3E%3Cpath fill='currentColor' d='M3.75 15a.75.75 0 0 0-1.5 0v.055c0 1.367 0 2.47.117 3.337c.12.9.38 1.658.981 2.26c.602.602 1.36.86 2.26.982c.867.116 1.97.116 3.337.116h6.11c1.367 0 2.47 0 3.337-.116c.9-.122 1.658-.38 2.26-.982s.86-1.36.982-2.26c.116-.867.116-1.97.116-3.337V15a.75.75 0 0 0-1.5 0c0 1.435-.002 2.436-.103 3.192c-.099.734-.28 1.122-.556 1.399c-.277.277-.665.457-1.4.556c-.755.101-1.756.103-3.191.103H9c-1.435 0-2.437-.002-3.192-.103c-.734-.099-1.122-.28-1.399-.556c-.277-.277-.457-.665-.556-1.4c-.101-.755-.103-1.756-.103-3.191'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:upload-square-line-duotone,[i-solar\:upload-square-line-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 17v-7m0 0l3 3m-3-3l-3 3'/%3E%3Cpath stroke-linecap='round' d='M16 7H8'/%3E%3Cpath d='M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2s7.071 0 8.535 1.464C22 4.93 22 7.286 22 12s0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:user-rounded-linear{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Ccircle cx='12' cy='6' r='4'/%3E%3Cellipse cx='12' cy='17' rx='7' ry='4'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-solar\:user-speak-rounded-bold-duotone,[i-solar\:user-speak-rounded-bold-duotone=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='10' cy='6.75' r='4' fill='currentColor'/%3E%3Cellipse cx='10' cy='17.75' fill='currentColor' opacity='.5' rx='7' ry='4'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M18.357 2.364a.75.75 0 0 1 1.029-.257L19 2.75l.386-.643h.001l.002.002l.004.002l.01.006l.113.076c.07.049.166.12.277.212c.222.185.512.462.802.838c.582.758 1.155 1.914 1.155 3.507s-.573 2.75-1.155 3.507c-.29.376-.58.653-.802.838a4 4 0 0 1-.363.27l-.028.018l-.01.006l-.003.002l-.002.001s-.001.001-.387-.642l.386.643a.75.75 0 0 1-.776-1.283l.005-.004l.041-.027q.06-.042.177-.136c.152-.128.362-.326.573-.6c.417-.542.844-1.386.844-2.593s-.427-2.05-.844-2.593a3.8 3.8 0 0 0-.573-.6a3 3 0 0 0-.218-.163l-.005-.003a.75.75 0 0 1-.253-1.027' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M16.33 4.415a.75.75 0 0 1 1.006-.336L17 4.75l.336-.67h.001l.002.001l.004.002l.008.004l.022.012a2 2 0 0 1 .233.153c.136.102.31.254.48.467c.349.436.664 1.099.664 2.031s-.316 1.595-.664 2.031a2.7 2.7 0 0 1-.654.586l-.06.034l-.02.012l-.01.004l-.003.002l-.002.001l-.33-.657l.329.658a.75.75 0 0 1-.685-1.335l.003-.001l.052-.036c.052-.04.13-.106.209-.205c.15-.189.335-.526.335-1.094s-.184-.905-.335-1.094a1.2 1.2 0 0 0-.261-.24l-.003-.002a.75.75 0 0 1-.322-1' clip-rule='evenodd'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners\:3-dots-fade{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Ccircle cx='4' cy='12' r='3' fill='currentColor'%3E%3Canimate id='svgSpinners3DotsFade0' fill='freeze' attributeName='opacity' begin='0;svgSpinners3DotsFade1.end-0.25s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3' fill='currentColor' opacity='.4'%3E%3Canimate fill='freeze' attributeName='opacity' begin='svgSpinners3DotsFade0.begin+0.15s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3' fill='currentColor' opacity='.3'%3E%3Canimate id='svgSpinners3DotsFade1' fill='freeze' attributeName='opacity' begin='svgSpinners3DotsFade0.begin+0.3s' dur='0.75s' values='1;.2'/%3E%3C/circle%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners\:ring-resize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg stroke='currentColor'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-linecap='round' stroke-width='3'%3E%3Canimate attributeName='stroke-dasharray' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0 150;42 150;42 150;42 150'/%3E%3Canimate attributeName='stroke-dashoffset' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0;-16;-59;-59'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' dur='2s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon)no-repeat;-webkit-mask:var(--un-icon)no-repeat;mask:var(--un-icon)no-repeat;color:inherit;background-color:currentColor;width:1.2em;height:1.2em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-vscode-icons\:file-type-minecraft{background:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='%2352a535' d='M30 2H2v28h28z'/%3E%3Cpath fill='%2386d562' d='M24.4 13.2h-5.6v.47h5.6zm-5.6 8.4h-5.6v.47h5.6zm2.8 2.8h-2.8v.47h2.8zm-8.4 0h-2.8v.47h2.8zm0-11.2H7.6v.47h5.6z'/%3E%3Cpath d='M24.4 13.2V7.6h-5.6v5.6h-5.6V16h-2.8v8.4h2.8v-2.8h5.6v2.8h2.8V16h-2.8v-2.8zM13.2 7.6H7.6v5.6h5.6z'/%3E%3Cpath fill='%232a641c' d='M24.4 7.6h-5.6v.47h5.6zm-5.6 5.6h-5.6v.47h5.6zm-5.6-5.6H7.6v.47h5.6zm0 8.4h-2.8v.47h2.8zm8.4 0h-2.8v.47h2.8z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat;width:1.2em;height:1.2em}.prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-headings);font-weight:600;line-height:1.25}.prose :where(a):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links);font-weight:500;text-decoration:underline}.prose :where(a code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links)}.prose :where(p,ul,ol,pre):not(:where(.not-prose,.not-prose *)){margin:1em 0;line-height:1.75}.prose :where(blockquote):not(:where(.not-prose,.not-prose *)){border-left:.25em solid var(--un-prose-borders);margin:1em 0;padding-left:1em;font-style:italic}.prose :where(h1):not(:where(.not-prose,.not-prose *)){margin:1rem 0;font-size:2.25em}.prose :where(h2):not(:where(.not-prose,.not-prose *)){margin:1.75em 0 .5em;font-size:1.75em}.prose :where(h3):not(:where(.not-prose,.not-prose *)){margin:1.5em 0 .5em;font-size:1.375em}.prose :where(h4):not(:where(.not-prose,.not-prose *)){margin:1em 0;font-size:1.125em}.prose :where(img,video):not(:where(.not-prose,.not-prose *)){max-width:100%}.prose :where(figure,picture):not(:where(.not-prose,.not-prose *)){margin:1em 0}.prose :where(figcaption):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-captions);font-size:.875em}.prose :where(code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em;font-weight:600}.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):before,.prose :where(:not(pre)>code):not(:where(.not-prose,.not-prose *)):after{content:"`"}.prose :where(pre):not(:where(.not-prose,.not-prose *)){border-radius:.375rem;padding:1.25rem 1.5rem;overflow-x:auto}.prose :where(pre,code):not(:where(.not-prose,.not-prose *)){white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:4;-webkit-hyphens:none;hyphens:none;background:0 0}.prose :where(pre code):not(:where(.not-prose,.not-prose *)){font-weight:inherit}.prose :where(ol,ul):not(:where(.not-prose,.not-prose *)){padding-left:1.25em}.prose :where(ol):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ol[type=A]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where(.not-prose,.not-prose *)){list-style-type:decimal}.prose :where(ul):not(:where(.not-prose,.not-prose *)){list-style-type:disc}.prose :where(ol>li):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(ul>li):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(summary):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists)}.prose :where(hr):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-hr);margin:2em 0}.prose :where(table):not(:where(.not-prose,.not-prose *)){border-collapse:collapse;margin:1em 0;display:block;overflow-x:auto}.prose :where(tr):not(:where(.not-prose,.not-prose *)):nth-child(2n){background:var(--un-prose-bg-soft)}.prose :where(td,th):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-borders);padding:.625em 1em}.prose :where(abbr):not(:where(.not-prose,.not-prose *)){cursor:help}.prose :where(kbd):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);border:1px solid;border-radius:.25rem;padding:.25rem .5rem;font-size:.875em}.prose :where(details):not(:where(.not-prose,.not-prose *)){background:var(--un-prose-bg-soft);margin:1em 0;padding:1.25rem 1.5rem}.prose :where(summary):not(:where(.not-prose,.not-prose *)){cursor:pointer;font-weight:600}.prose{color:var(--un-prose-body);max-width:65ch}.container,[container=""]{width:100%}.scrollbar-none,[scrollbar-none=""]{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}[scrollbar-none=""]::-webkit-scrollbar{display:none}@media (min-width:640px){.container,[container=""]{max-width:640px}}@media (min-width:768px){.container,[container=""]{max-width:768px}}@media (min-width:1024px){.container,[container=""]{max-width:1024px}}@media (min-width:1280px){.container,[container=""]{max-width:1280px}}@media (min-width:1536px){.container,[container=""]{max-width:1536px}}.\[input\:checked\~\&\]{input:checked~&}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.data-\[disabled\]\:pointer-events-none[data-disabled],.pointer-events-none,[pointer-events-none=""]{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.absolute,[absolute=""]{position:absolute}.fixed,[fixed=""]{position:fixed}.relative,[relative=""]{position:relative}.sticky,[sticky=""]{position:sticky}.before-position-absolute:before,[before~=absolute]:before,.after\:absolute:after,[after~=absolute]:after{position:absolute}.inset-0,[inset-0=""],[before~=inset-0]:before,[after~=inset-0]:after{inset:0}.inset-x-0,[inset-x-0=""]{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0,[bottom-0=""]{bottom:0}.bottom-2{bottom:.5rem}.left-0,[left-0=""]{left:0}.left-1\/2{left:50%}.left-10,[left-10=""]{left:2.5rem}.left-2{left:.5rem}.right--10,[right--10=""]{right:-2.5rem}.right--15,[right--15=""]{right:-3.75rem}.right--5,[right--5=""]{right:-1.25rem}.right-0,[right-0=""]{right:0}.right-2,[right-2=""]{right:.5rem}.right-4,[right-4=""]{right:1rem}.top--20,[top--20=""]{top:-5rem}.top-\[-32px\]{top:-32px}.top-0,[top-0=""],[top~="0"]{top:0}.top-1\/2,[top~="50%"]{top:50%}.top-2,[top-2=""]{top:.5rem}[top~="[65dvh]"]{top:65dvh}[top~="[calc(100dvh-12rem)]"]{top:calc(100dvh - 12rem)}[top~="[calc(100dvh-15rem)]"]{top:calc(100dvh - 15rem)}.before\:left-3:before{left:.75rem}.before\:right-0:before{right:0}.before\:top-50\%:before{top:50%}.after\:left-\[2px\]:after{left:2px}.after\:top-\[2px\]:after{top:2px}.line-clamp-1,[line-clamp-1=""]{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3,[line-clamp-3=""]{-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.z--1,[z--1=""]{z-index:-1}.z--2{z-index:-2}.z-\[9999\]{z-index:9999}.z-0{z-index:0}.z-1,[z-1=""]{z-index:1}.z-10,[z-10=""]{z-index:10}.z-100,[z-100=""]{z-index:100}.z-1000{z-index:1000}.z-15,[z-15=""]{z-index:15}.z-2,[z-2=""]{z-index:2}.z-3,[z-3=""]{z-index:3}.z-4,[z-4=""]{z-index:4}.z-5,[z-5=""]{z-index:5}.z-99,[z-99=""]{z-index:99}[before~=z-0]:before{z-index:0}[after~=z--2]:after{z-index:-2}.\[\&\>div\]\:grid>div,.grid,[grid=""],[grid~=\~]{display:grid}.col-span-1{grid-column:span 1/span 1}.col-span-2,.grid-col-span-2,[grid-col-span-2=""]{grid-column:span 2/span 2}.col-span-full{grid-column:1/-1}.row-span-1{grid-row:span 1/span 1}.row-span-2{grid-row:span 2/span 2}.col-start-1{grid-column-start:1}.col-start-3{grid-column-start:3}.col-start-4{grid-column-start:4}.col-start-5{grid-column-start:5}.row-start-6{grid-row-start:6}.auto-cols-\[350px\]{grid-auto-columns:350px}.auto-cols-auto{grid-auto-columns:auto}.grid-auto-rows-\[minmax\(min-content\,max-content\)\]{grid-auto-rows:minmax(min-content,max-content)}.grid-auto-flow-dense{grid-auto-flow:dense}.grid-flow-col{grid-auto-flow:column}.grid-flow-row{grid-auto-flow:row}.\[\&\>div\]\:grid-cols-\[4fr_2fr\]>div{grid-template-columns:4fr 2fr}.cols-\[150px_1fr\],[grid~="cols-[150px_1fr]"]{grid-template-columns:150px 1fr}.cols-\[70px_1fr\],[grid~="cols-[70px_1fr]"]{grid-template-columns:70px 1fr}.grid-cols-\[repeat\(auto-fill\,minmax\(280px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.cols-1,.grid-cols-1,[grid~=cols-1]{grid-template-columns:repeat(1,minmax(0,1fr))}.cols-5,[grid~=cols-5]{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-2,[grid-cols-2=""]{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.m-0,[m0=""]{margin:0}.\[\&\:\:-webkit-inner-spin-button\]\:m-0::-webkit-inner-spin-button{margin:0}.m-\[5px\]{margin:5px}.m-1{margin:.25rem}.m-auto{margin:auto}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-5,[mx-5=""]{margin-left:1.25rem;margin-right:1.25rem}.mx-auto,[mx-auto=""]{margin-left:auto;margin-right:auto}.my,.my-4{margin-top:1rem;margin-bottom:1rem}.my-0,[my-0=""]{margin-top:0;margin-bottom:0}.my-10,[my-10=""]{margin-top:2.5rem;margin-bottom:2.5rem}.my-5,[my-5=""]{margin-top:1.25rem;margin-bottom:1.25rem}.my-auto,[my-auto=""]{margin-top:auto;margin-bottom:auto}[m~=y-1]{margin-top:.25rem;margin-bottom:.25rem}.-mb-px{margin-bottom:-1px}.mb-0{margin-bottom:0}.mb-1,[mb-1=""]{margin-bottom:.25rem}.mb-14,[mb-14=""]{margin-bottom:3.5rem}.mb-2,[mb-2=""]{margin-bottom:.5rem}.mb-3,[mb-3=""]{margin-bottom:.75rem}.mb-4,[mb-4=""]{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml{margin-left:1rem}.ml-0\.5,[ml-0\.5=""]{margin-left:.125rem}.ml-1,[ml-1=""]{margin-left:.25rem}.ml-auto{margin-left:auto}.mr{margin-right:1rem}.mr-0\!{margin-right:0!important}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-auto{margin-right:auto}.ms{margin-inline-start:1rem}.mt-0\.5{margin-top:.125rem}.mt-1,[mt-1=""]{margin-top:.25rem}.mt-2,[mt-2=""]{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4,[mt-4=""]{margin-top:1rem}.mt-auto{margin-top:auto}[ml~="12"]{margin-left:3rem}[mr~="12"]{margin-right:3rem}[box~=border]{box-sizing:border-box}.inline,[inline=""]{display:inline}.block,[block=""]{display:block}.inline-block,[inline-block=""]{display:inline-block}.contents{display:contents}.aspect-square,[aspect-square=""]{aspect-ratio:1}.size-16,[size-16=""]{width:4rem;height:4rem}.size-2{width:.5rem;height:.5rem}.size-20,[size-20=""]{width:5rem;height:5rem}.size-24,[size-24=""],[size~="24"]{width:6rem;height:6rem}.size-3,[size-3=""]{width:.75rem;height:.75rem}.size-4,[size-4=""]{width:1rem;height:1rem}.size-5,[size-5=""]{width:1.25rem;height:1.25rem}.size-6,[size-6=""],[size~="6"]{width:1.5rem;height:1.5rem}.size-60,[size-60=""]{width:15rem;height:15rem}.size-8,[size-8=""]{width:2rem;height:2rem}[size~="1"]{width:.25rem;height:.25rem}[size~=sm]{width:24rem;height:24rem}.h-\[1px\]{height:1px}.h-\[calc\(\(1lh\+1rem\+1rem\)\*2\)\]{height:calc(2lh + 4rem)}.h-\[calc\(100\%-40px\)\]{height:calc(100% - 40px)}.h-0\.5,[h-0\.5=""]{height:.125rem}.h-0\.5lh{height:.5lh}.h-1\.5,[h-1\.5=""]{height:.375rem}.h-10{height:2.5rem}.h-100dvh,[h-100dvh=""],[h~="100dvh"]{height:100dvh}.h-12{height:3rem}.h-15{height:3.75rem}.h-16{height:4rem}.h-1lh{height:1lh}.h-2,.h2,[h-2=""]{height:.5rem}.h-24,[h-24=""]{height:6rem}.h-30,[h-30=""]{height:7.5rem}.h-4,[h-4=""]{height:1rem}.h-48,[h-48=""]{height:12rem}.h-5,[h-5=""],[h~="5"]{height:1.25rem}.h-6{height:1.5rem}.h-60,[h-60=""]{height:15rem}.h-7,[h-7=""]{height:1.75rem}.h-8,[h-8=""]{height:2rem}.h-auto,[h-auto=""],[h~=auto]{height:auto}.h-fit,[h-fit=""]{height:fit-content}.h-full,[h-full=""],[h~="100%"]{height:100%}.h1{height:.25rem}.h3{height:.75rem}.max-h-\[10lh\],[max-h~="[10lh]"]{max-height:10lh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[96\%\]{max-height:96%}.max-h-\[calc\(100dvh-100px-56px\)\]{max-height:calc(100dvh - 156px)}.max-h-\[calc\(100dvh-17rem\)\]{max-height:calc(100dvh - 17rem)}.max-h-\[calc\(100dvh-28rem\)\]{max-height:calc(100dvh - 28rem)}.max-h-\[calc\(100dvh-7lh\)\]{max-height:calc(100dvh - 7lh)}.max-h-100dvh,[max-h-100dvh=""],[max-h~="100dvh"]{max-height:100dvh}.max-h-50dvh{max-height:50dvh}.max-h-60,[max-h-60=""]{max-height:15rem}.max-h-full{max-height:100%}.max-h-none,[max-h-none=""]{max-height:none}.max-w-100dvw,[max-w-100dvw=""]{max-width:100dvw}.max-w-2xl{max-width:42rem}.max-w-4lh,[max-w-4lh=""]{max-width:4lh}.max-w-6xl{max-width:72rem}.max-w-full,[max-w-full=""]{max-width:100%}.max-w-md{max-width:28rem}.min-h-\[120px\],.min-h-120px,[min-h-120px=""]{min-height:120px}.min-h-\[1lh\]{min-height:1lh}.min-h-16,[min-h-16=""]{min-height:4rem}.min-h-40px,[min-h-40px=""]{min-height:40px}.min-h-70dvh,[min-h-70dvh=""]{min-height:70dvh}.min-w-\[150px\]{min-width:150px}.min-w-\[160px\]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-0,[min-w-0=""]{min-width:0}.min-w-12,[min-w-12=""]{min-width:3rem}.min-w-2,[min-w-2=""]{min-width:.5rem}.min-w-20,[min-w-20=""]{min-width:5rem}.min-w-20px{min-width:20px}.min-w-50,[min-w-50=""]{min-width:12.5rem}.w-\[25px\]{width:25px}.w-\[92dvw\]{width:92dvw}.w-\[92vw\]{width:92vw}.w-0\!{width:0!important}.w-1{width:.25rem}.w-1\.5,[w-1\.5=""]{width:.375rem}.w-1\/2,[w~="[50%]"]{width:50%}.w-10\%{width:10%}.w-100,[w-100=""]{width:25rem}.w-100\%,.w-full,[w-full=""],[w~="100%"],[w~=full]{width:100%}.w-100vw,[w-100vw=""]{width:100vw}.w-11{width:2.75rem}.w-12{width:3rem}.w-15{width:3.75rem}.w-1lh{width:1lh}.w-2,[w-2=""]{width:.5rem}.w-25\%{width:25%}.w-30,[w-30=""]{width:7.5rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-5,[w-5=""]{width:1.25rem}.w-8,[w-8=""]{width:2rem}.w-90\%{width:90%}.w-95\%{width:95%}.w-auto,[w-auto=""]{width:auto}.w-fit,[w-fit=""]{width:fit-content}[h~="[calc(100%-56px)]"]{height:calc(100% - 56px)}[h~="[calc(100dvh-40px)]"]{height:calc(100dvh - 40px)}[h~="[calc(1lh+4px+4px)]"]{height:calc(1lh + 8px)}[h~="300"]{height:75rem}[h~="50%"]{height:50%}[h~="85dvh"]{height:85dvh}[h~=unset]{height:unset}[max-h~="[300px]"]{max-height:300px}[max-h~="[4.5rem]"]{max-height:4.5rem}[max-h~="[85vh]"]{max-height:85vh}[max-h~="100"]{max-height:25rem}[max-h~="35dvh"]{max-height:35dvh}[max-h~="50"]{max-height:12.5rem}[max-w~="[calc(100%-3.5rem)]"]{max-width:calc(100% - 3.5rem)}[max-w~="500px"]{max-width:500px}[min-h~="[100px]"]{min-height:100px}[min-h~="[calc(1lh+4px+4px)]"]{min-height:calc(1lh + 8px)}[min-h~="100"]{min-height:25rem}[min-h~="120"]{min-height:30rem}[min-w~="1/2"],[min-w~="50%"]{min-width:50%}[min-w~="30%"]{min-width:30%}[w~="[calc(1lh+4px+4px)]"]{width:calc(1lh + 8px)}[w~="100dvw"]{width:100dvw}[w~="12.5"]{width:3.125rem}[w~="70%"]{width:70%}.hover\:h-13:hover{height:3.25rem}.hover\:w-2:hover{width:.5rem}.before\:h-\[calc\(100\%-2rem\)\]:before{height:calc(100% - 2rem)}.before\:w-1:before{width:.25rem}[before~=h-full]:before{height:100%}[before~=w-25\%]:before{width:25%}.after\:h-5:after{height:1.25rem}.after\:w-5:after{width:1.25rem}[after~=h-full]:after{height:100%}[after~=w-full]:after{width:100%}.flex,[flex=""],[flex~=\~]{display:flex}.inline-flex,[inline-flex=""],[inline-flex~=\~]{display:inline-flex}.flex-1,[flex-1=""],[flex~="1"]{flex:1}.flex-shrink-0,.shrink-0,[flex-shrink-0=""],[shrink-0=""]{flex-shrink:0}.flex-row,[flex-row=""],[flex~=row]{flex-direction:row}[flex~=row-reverse]{flex-direction:row-reverse}.flex-col,[flex-col=""],[flex~=col]{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap,[flex-wrap=""]{flex-wrap:wrap}.origin-left,[origin-left=""]{transform-origin:0}[perspective~="800"]{perspective:800px}.-translate-x-1\/2,.translate-x-\[-50\%\]{--un-translate-x:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.-translate-y-1\/2,[translate-y~="[-50%]"]{--un-translate-y:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[0\.25lh\]{--un-translate-y:.25lh;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-\[50\%\]{--un-translate-y:50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-1,[translate-y-1=""]{--un-translate-y:.25rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-2,[translate-y-2=""]{--un-translate-y:.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.translate-y-4,[translate-y-4=""]{--un-translate-y:1rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-x~="0.5"]{--un-translate-x:.125rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-x~="data-[state=checked]:full"][data-state=checked]{--un-translate-x:100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[-100%]"]{--un-translate-y:-100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[-80%]"]{--un-translate-y:-80%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[translate-y~="[2px]"]{--un-translate-y:2px;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.peer:checked~.peer-checked\:after\:translate-x-full:after{--un-translate-x:100%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.\[\&_\.card-cover_img\]\:hover\:translate-y-2:hover .card-cover img,[hover\:translate-y-2=""]:hover{--un-translate-y:.5rem;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.before\:translate-y--50\%:before{--un-translate-y:-50%;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.rotate-180{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:180deg;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-100{--un-scale-x:1;--un-scale-y:1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-120{--un-scale-x:1.2;--un-scale-y:1.2;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.scale-125{--un-scale-x:1.25;--un-scale-y:1.25;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.\[\&_\.card-cover_img\]\:hover\:scale-102:hover .card-cover img{--un-scale-x:1.02;--un-scale-y:1.02;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.hover\:scale-110:hover{--un-scale-x:1.1;--un-scale-y:1.1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}[hover~=scale-100]:hover{--un-scale-x:1;--un-scale-y:1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.active\:scale-95:active{--un-scale-x:.95;--un-scale-y:.95;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.transform-scale-x--100,[transform-scale-x--100=""]{--un-scale-x:-1;transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}.preserve-3d{transform-style:preserve-3d}.transform,[transform=""]{transform:translateX(var(--un-translate-x))translateY(var(--un-translate-y))translateZ(var(--un-translate-z))rotate(var(--un-rotate))rotateX(var(--un-rotate-x))rotateY(var(--un-rotate-y))rotateZ(var(--un-rotate-z))skewX(var(--un-skew-x))skewY(var(--un-skew-y))scaleX(var(--un-scale-x))scaleY(var(--un-scale-y))scaleZ(var(--un-scale-z))}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes slideDownAndFade{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}@keyframes slideLeftAndFade{0%{opacity:0;transform:translate(2px)}to{opacity:1;transform:translate(0)}}@keyframes slideRightAndFade{0%{opacity:0;transform:translate(-2px)}to{opacity:1;transform:translate(0)}}@keyframes slideUpAndFade{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-pulse,[animate-pulse=""]{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}.animate-spin{animation:1s linear infinite spin}.data-\[side\=bottom\]\:animate-slideUpAndFade[data-side=bottom]{animation:.4s cubic-bezier(.16,1,.3,1) slideUpAndFade}.data-\[side\=left\]\:animate-slideRightAndFade[data-side=left]{animation:.4s cubic-bezier(.16,1,.3,1) slideRightAndFade}.data-\[side\=right\]\:animate-slideLeftAndFade[data-side=right]{animation:.4s cubic-bezier(.16,1,.3,1) slideLeftAndFade}.data-\[side\=top\]\:animate-slideDownAndFade[data-side=top]{animation:.4s cubic-bezier(.16,1,.3,1) slideDownAndFade}.cursor-pointer,[cursor-pointer=""],[cursor~=pointer]{cursor:pointer}.cursor-not-allowed,.disabled\:cursor-not-allowed:disabled,[cursor~=disabled\:not-allowed]:disabled,[disabled\:cursor-not-allowed=""]:disabled{cursor:not-allowed}.cursor-col-resize,[cursor-col-resize=""]{cursor:col-resize}.select-none,[select-none=""]{-webkit-user-select:none;user-select:none}.resize-none,[resize-none=""]{resize:none}.appearance-none,[appearance-none=""]{appearance:none}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.items-start,[flex~=items-start],[items-start=""]{align-items:flex-start}.items-end,[items-end=""]{align-items:flex-end}.items-center,[flex~=items-center],[items-center=""]{align-items:center}.self-start,[self-start=""]{align-self:flex-start}.self-end,[self-end=""]{align-self:flex-end}.self-center{align-self:center}.justify-start{justify-content:flex-start}.justify-end,[justify-end=""]{justify-content:flex-end}.justify-center,[flex~=justify-center],[justify-center=""]{justify-content:center}.justify-between,[justify-between=""]{justify-content:space-between}.justify-self-end,[justify-self-end=""]{justify-self:end}.gap-\[5px\]{gap:5px}.gap-0\.5,[gap-0\.5=""]{gap:.125rem}.gap-1,[flex~=gap-1],[gap-1=""],[gap~="1"],[grid~=gap-1]{gap:.25rem}.gap-1\.5,[gap-1\.5=""]{gap:.375rem}.gap-2,[flex~=gap-2],[gap-2=""]{gap:.5rem}.gap-3,[flex~=gap-3],[gap-3=""]{gap:.75rem}.gap-4,[flex~=gap-4],[gap-4=""],[grid~=gap-4]{gap:1rem}.gap-5,[gap-5=""]{gap:1.25rem}.gap-6,[flex~=gap-6]{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2,[flex~=gap-x-2]{column-gap:.5rem}.gap-y-0,[flex~=gap-y-0]{row-gap:0}.space-x-1>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(.25rem*calc(1 - var(--un-space-x-reverse)));margin-right:calc(.25rem*var(--un-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.25rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.25rem*var(--un-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.5rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.5rem*var(--un-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(.75rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(.75rem*var(--un-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1rem*var(--un-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1.5rem*calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1.5rem*var(--un-space-y-reverse))}.of-hidden,.overflow-hidden,[of-hidden=""],[overflow-hidden=""],[overflow~=hidden]{overflow:hidden}.overflow-auto,[overflow-auto=""]{overflow:auto}.overflow-scroll,[overflow-scroll=""]{overflow:scroll}.of-x-scroll,[of-x-scroll=""]{overflow-x:scroll}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto,[overflow-y-auto=""]{overflow-y:auto}.overflow-y-scroll,[overflow-y-scroll=""]{overflow-y:scroll}.scroll-smooth,[scroll-smooth=""]{scroll-behavior:smooth}.truncate,[truncate=""]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-ellipsis,[text-ellipsis=""]{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line,[whitespace-pre-line=""]{white-space:pre-line}.whitespace-pre-wrap,[whitespace-pre-wrap=""]{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.b,.border,[b=""],[b~=\~],[border=""],[border~=\~],[border~="1"]{border-width:1px}.border-2,[border-2=""],[border~="2"],[border~="2px"]{border-width:2px}[border~="4"]{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.\[\&\:checked\+div\]\:border-primary-500:checked+div,.border-primary-500{--un-border-opacity:1;border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.b-green{--un-border-opacity:1;border-color:rgb(74 222 128/var(--un-border-opacity))}.b-orange{--un-border-opacity:1;border-color:rgb(251 146 60/var(--un-border-opacity))}.b-purple{--un-border-opacity:1;border-color:rgb(192 132 252/var(--un-border-opacity))}.b-red{--un-border-opacity:1;border-color:rgb(248 113 113/var(--un-border-opacity))}.border-amber-200{--un-border-opacity:1;border-color:rgb(253 230 138/var(--un-border-opacity))}.border-gray-300{--un-border-opacity:1;border-color:rgb(209 213 219/var(--un-border-opacity))}.border-neutral-100,[border~=neutral-100]{--un-border-opacity:1;border-color:rgb(245 245 245/var(--un-border-opacity))}.border-neutral-100\/60,[border~=neutral-100\/60]{border-color:#f5f5f599}.border-neutral-200,.dark [border~=dark\:neutral-200],[border-neutral-200=""],[border~=neutral-200]{--un-border-opacity:1;border-color:rgb(229 229 229/var(--un-border-opacity))}.border-neutral-300,[border-neutral-300=""],[border~="data-[state=unchecked]:neutral-300"][data-state=unchecked],[border~=neutral-300]{--un-border-opacity:1;border-color:rgb(212 212 212/var(--un-border-opacity))}.border-neutral-300\/30{border-color:#d4d4d44d}.border-neutral-400{--un-border-opacity:1;border-color:rgb(163 163 163/var(--un-border-opacity))}.border-neutral-500{--un-border-opacity:1;border-color:rgb(115 115 115/var(--un-border-opacity))}.border-primary-100{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))80%,oklch(100% 0 360/var(--un-border-opacity)))}.border-primary-200,[border~="data-[state=checked]:primary-200"][data-state=checked],[border~=primary-200]{--un-border-opacity:1;border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-primary-400,.dark .dark\:\[\&\:checked\+div\]\:border-primary-400:checked+div,.dark .dark\:border-primary-400{--un-border-opacity:1;border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.border-primary-500\/5{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.05)}.border-red-200{--un-border-opacity:1;border-color:rgb(254 202 202/var(--un-border-opacity))}.border-red-200\/30{border-color:#fecaca4d}.border-white,.dark [border~=dark\:white]{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}.dark .dark\:border-amber-800{--un-border-opacity:1;border-color:rgb(146 64 14/var(--un-border-opacity))}.dark .dark\:border-amber-800\/30{border-color:#92400e4d}.dark .dark\:border-gray-900{--un-border-opacity:1;border-color:rgb(17 24 39/var(--un-border-opacity))}.dark .dark\:border-neutral-600,.dark [border~=dark\:neutral-600]{--un-border-opacity:1;border-color:rgb(82 82 82/var(--un-border-opacity))}.dark .dark\:border-neutral-700,.dark [border~=dark\:neutral-700],.dark [dark\:border-neutral-700=""]{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.dark .dark\:border-neutral-700\/30,.dark [border~="dark:neutral-700/30"]{border-color:#4040404d}.dark .dark\:border-neutral-800,.dark [border~=dark\:neutral-800],.dark [dark\:border-neutral-800=""],[border~=neutral-800]{--un-border-opacity:1;border-color:rgb(38 38 38/var(--un-border-opacity))}.dark .dark\:border-neutral-800\/25,.dark [border~="dark:neutral-800/25"]{border-color:#26262640}.dark .dark\:border-neutral-800\/30,.dark [border~="dark:neutral-800/30"]{border-color:#2626264d}.dark .dark\:border-neutral-900,.dark [border~=dark\:neutral-900]{--un-border-opacity:1;border-color:rgb(23 23 23/var(--un-border-opacity))}.dark .dark\:border-primary-600{--un-border-opacity:1;border-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-800,.dark [border~=dark\:primary-800]{--un-border-opacity:1;border-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-900{--un-border-opacity:1;border-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark .dark\:border-primary-900\/40{border-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.4)}.dark .dark\:border-red-800\/30{border-color:#991b1b4d}.dark .dark\:border-red-900\/30{border-color:#7f1d1d4d}.dark [border~="dark:cyan-500/50"]{border-color:#06b6d480}.dark [border~="dark:neutral-700/60"]{border-color:#40404099}.dark [border~="dark:primary-400/20"]{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)}.dark [border~="dark:primary-500/50"]{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.5)}.dark [border~="dark:violet-500/50"]{border-color:#8b5cf680}[border~=black]{--un-border-opacity:1;border-color:rgb(0 0 0/var(--un-border-opacity))}[border~=cyan-200\/50]{border-color:#a5f3fc80}[border~=neutral-200\/50]{border-color:#e5e5e580}[border~=neutral-200\/60]{border-color:#e5e5e599}[border~=primary-200\/20]{border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}[border~=primary-200\/50]{border-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}[border~=primary-300]{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}[border~=violet-200\/50]{border-color:#ddd6fe80}.peer:checked~.peer-checked\:after\:border-white:after{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}[border~=focus-within\:neutral-800]:focus-within{--un-border-opacity:1;border-color:rgb(38 38 38/var(--un-border-opacity))}.dark .dark\:hover\:border-primary-400\/30:hover{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:hover\:border-primary-700:hover{--un-border-opacity:1;border-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.dark [border~="dark:hover:primary-400/30"]:hover{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.hover\:border-primary-300:hover{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.hover\:border-primary-500\/30:hover,[border~="hover:primary-500/30"]:hover{border-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:focus\:border-neutral-600:focus{--un-border-opacity:1;border-color:rgb(82 82 82/var(--un-border-opacity))}.dark .dark\:focus\:border-primary-400\/50:focus{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}.dark [border~="dark:focus:neutral-700"]:focus{--un-border-opacity:1;border-color:rgb(64 64 64/var(--un-border-opacity))}.dark [border~="dark:focus:primary-400/50"]:focus{border-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}.focus\:border-neutral-300:focus{--un-border-opacity:1;border-color:rgb(212 212 212/var(--un-border-opacity))}.focus\:border-primary-300:focus{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}[border~=focus\:neutral-200]:focus{--un-border-opacity:1;border-color:rgb(229 229 229/var(--un-border-opacity))}[border~=focus\:primary-100]:focus{--un-border-opacity:1;border-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))80%,oklch(100% 0 360/var(--un-border-opacity)))}[border~=focus\:primary-300]:focus{--un-border-opacity:1;border-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-border-opacity))}.rounded,[rounded=""]{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full,[rounded-full=""]{border-radius:9999px}.rounded-lg,[rounded-lg=""],[rounded~=lg]{border-radius:.5rem}.rounded-md,[rounded-md=""]{border-radius:.375rem}.rounded-sm,[rounded-sm=""]{border-radius:.125rem}.rounded-xl,[rounded-xl=""]{border-radius:.75rem}[rounded~="[1lh]"]{border-radius:1lh}.before\:rounded-full:before,.after\:rounded-full:after{border-radius:9999px}.rounded-l-xl,[rounded-l-xl=""]{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl,[rounded-r-xl=""]{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-t-xl,[rounded-t-xl=""]{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border-solid,[border-solid=""],[border~=solid]{border-style:solid}[b~=dashed],[border~=dashed]{border-style:dashed}.\!bg-transparent{background-color:#0000!important}.bg-amber-50{--un-bg-opacity:1;background-color:rgb(255 251 235/var(--un-bg-opacity))}.bg-black,[bg~=black]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.bg-black\/50,[bg~=black\/50]{background-color:#00000080}.bg-blue-100\/50{background-color:#dbeafe80}.bg-blue-50,[bg-blue-50=""]{--un-bg-opacity:1;background-color:rgb(239 246 255/var(--un-bg-opacity))}.bg-green-100\/50{background-color:#dcfce780}.bg-green-50,[bg-green-50=""]{--un-bg-opacity:1;background-color:rgb(240 253 244/var(--un-bg-opacity))}.bg-green-500,[bg-green-500=""],[bg~=green-500]{--un-bg-opacity:1;background-color:rgb(34 197 94/var(--un-bg-opacity))}.bg-lime-50\/60{background-color:#f7fee799}.bg-neutral-100,.data-\[highlighted\]\:bg-neutral-100[data-highlighted],[bg~=neutral-100]{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.bg-neutral-100\/55{background-color:#f5f5f58c}.bg-neutral-200,[bg-neutral-200=""],[bg~=neutral-200]{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}.bg-neutral-200\/45{background-color:#e5e5e573}.bg-neutral-300,.dark [bg~=dark\:neutral-300],[bg~="data-[state=unchecked]:neutral-300"][data-state=unchecked]{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.bg-neutral-400,[bg~=neutral-400]{--un-bg-opacity:1;background-color:rgb(163 163 163/var(--un-bg-opacity))}.bg-neutral-50,[bg-neutral-50=""],[bg~=neutral-50]{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.bg-neutral-50\/70,[bg~=neutral-50\/70]{background-color:#fafafab3}.bg-neutral-600,.dark .dark\:bg-neutral-600{--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity))}.bg-neutral-800,.dark .dark\:bg-neutral-800,.dark .dark\:data-\[highlighted\]\:bg-neutral-800[data-highlighted],.dark [bg~="dark:data-[state=unchecked]:neutral-800"][data-state=unchecked],.dark [bg~=dark\:neutral-800],.dark [dark\:bg-neutral-800=""]{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.bg-orange-50\/70{background-color:#fff7edb3}.bg-primary{--un-bg-opacity:1;background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-100,[bg-primary-100=""],[bg~=primary-100]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))80%,oklch(100% 0 360/var(--un-bg-opacity)))}.bg-primary-100\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.1)80%,#ffffff1a)}@supports (color:lab(0% 0 0)){.bg-primary-100\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.1)80%,lab(100% 0 0/.1))}}.bg-primary-100\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/1)80%,#fff)}@supports (color:lab(0% 0 0)){.bg-primary-100\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/1)80%,lab(100% 0 0))}}.bg-primary-100\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.2)80%,#fff3)}@supports (color:lab(0% 0 0)){.bg-primary-100\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.2)80%,lab(100% 0 0/.2))}}.bg-primary-100\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.3)80%,#ffffff4d)}@supports (color:lab(0% 0 0)){.bg-primary-100\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.3)80%,lab(100% 0 0/.3))}}.bg-primary-100\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.4)80%,#fff6)}@supports (color:lab(0% 0 0)){.bg-primary-100\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.4)80%,lab(100% 0 0/.4))}}.bg-primary-100\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.05)80%,#ffffff0d)}@supports (color:lab(0% 0 0)){.bg-primary-100\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.05)80%,lab(100% 0 0/.05))}}.bg-primary-100\/50{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.5)80%,#ffffff80)}@supports (color:lab(0% 0 0)){.bg-primary-100\/50{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.5)80%,lab(100% 0 0/.5))}}.bg-primary-100\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.6)80%,#fff9)}@supports (color:lab(0% 0 0)){.bg-primary-100\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.6)80%,lab(100% 0 0/.6))}}.bg-primary-100\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.7)80%,#ffffffb3)}@supports (color:lab(0% 0 0)){.bg-primary-100\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.7)80%,lab(100% 0 0/.7))}}.bg-primary-100\/80{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.8)80%,#fffc)}@supports (color:lab(0% 0 0)){.bg-primary-100\/80{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.8)80%,lab(100% 0 0/.8))}}.bg-primary-100\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.9)80%,#ffffffe6)}@supports (color:lab(0% 0 0)){.bg-primary-100\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/.9)80%,lab(100% 0 0/.9))}}.bg-primary-200,[bg-primary-200=""]{--un-bg-opacity:1;background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-200\/10{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-200\/100{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-200\/20,[bg~=primary-200\/20]{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-200\/30{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-200\/40{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-200\/5{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-200\/50{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-200\/60{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-200\/70{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-200\/80{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-200\/90{background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-300,[bg-primary-300=""]{--un-bg-opacity:1;background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-300\/10{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-300\/100{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-300\/20{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-300\/30{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-300\/40{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-300\/5{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-300\/50,.dark .dark\:bg-primary-300\/50{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-300\/60{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-300\/70{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-300\/80{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-300\/90{background-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-400,.dark .dark\:bg-primary-400,.dark [bg~=dark\:primary-400],[bg-primary-400=""],[bg~="data-[state=checked]:primary-400"][data-state=checked],[bg~=primary-400]{--un-bg-opacity:1;background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-400\/10{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-400\/100{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-400\/20,.dark [bg~="dark:primary-400/20"]{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-400\/30{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-400\/40{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-400\/5{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-400\/50{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-400\/60{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-400\/70{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-400\/80,.dark [bg~="data-[state=checked]:dark:primary-400/80"][data-state=checked]{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-400\/90{background-color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-50,[bg-primary-50=""],[bg~=primary-50]{--un-bg-opacity:1;background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))30%,oklch(100% 0 360/var(--un-bg-opacity)))}.bg-primary-50\/10,.dark .dark\:bg-primary-50\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.1)30%,#ffffff1a)}@supports (color:lab(0% 0 0)){.bg-primary-50\/10,.dark .dark\:bg-primary-50\/10{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.1)30%,lab(100% 0 0/.1))}}.bg-primary-50\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/1)30%,#fff)}@supports (color:lab(0% 0 0)){.bg-primary-50\/100{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/1)30%,lab(100% 0 0))}}.bg-primary-50\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.2)30%,#fff3)}@supports (color:lab(0% 0 0)){.bg-primary-50\/20{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.2)30%,lab(100% 0 0/.2))}}.bg-primary-50\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.3)30%,#ffffff4d)}@supports (color:lab(0% 0 0)){.bg-primary-50\/30{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.3)30%,lab(100% 0 0/.3))}}.bg-primary-50\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.4)30%,#fff6)}@supports (color:lab(0% 0 0)){.bg-primary-50\/40{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.4)30%,lab(100% 0 0/.4))}}.bg-primary-50\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.05)30%,#ffffff0d)}@supports (color:lab(0% 0 0)){.bg-primary-50\/5{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.05)30%,lab(100% 0 0/.05))}}.bg-primary-50\/50,[bg~=primary-50\/50]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.5)30%,#ffffff80)}@supports (color:lab(0% 0 0)){.bg-primary-50\/50,[bg~=primary-50\/50]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.5)30%,lab(100% 0 0/.5))}}.bg-primary-50\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.6)30%,#fff9)}@supports (color:lab(0% 0 0)){.bg-primary-50\/60{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.6)30%,lab(100% 0 0/.6))}}.bg-primary-50\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.7)30%,#ffffffb3)}@supports (color:lab(0% 0 0)){.bg-primary-50\/70{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.7)30%,lab(100% 0 0/.7))}}.bg-primary-50\/80,[bg~=primary-50\/80]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.8)30%,#fffc)}@supports (color:lab(0% 0 0)){.bg-primary-50\/80,[bg~=primary-50\/80]{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.8)30%,lab(100% 0 0/.8))}}.bg-primary-50\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.9)30%,#ffffffe6)}@supports (color:lab(0% 0 0)){.bg-primary-50\/90{background-color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-50)calc(var(--chromatic-hue) + 0)/.9)30%,lab(100% 0 0/.9))}}.bg-primary-500,.dark [bg~=dark\:primary-500],[bg-primary-500=""],[bg~=primary-500],.peer:checked~.peer-checked\:bg-primary-500{--un-bg-opacity:1;background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-500\/10,[bg~=primary-500\/10]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-500\/100{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-500\/15{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.15)}.bg-primary-500\/20,[bg~=primary-500\/20]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-500\/30,[bg~=primary-500\/30]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-500\/40,[bg~=primary-500\/40]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-500\/5,[bg~=primary-500\/5]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-500\/50,[bg~=primary-500\/50]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-500\/60,[bg~=primary-500\/60]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-500\/70,[bg~=primary-500\/70]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-500\/80,[bg~=primary-500\/80]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-500\/90,[bg~=primary-500\/90]{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-600,.dark .dark\:bg-primary-600,[bg-primary-600=""]{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-600\/10{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-600\/100{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-600\/20{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-600\/30{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-600\/40{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-600\/5{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-600\/50{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-600\/60{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-600\/70{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-600\/80{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-600\/90{background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-700,.dark .dark\:bg-primary-700,.dark [dark\:bg-primary-700=""],[bg-primary-700=""]{--un-bg-opacity:1;background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-700\/10{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-700\/100{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-700\/20{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-700\/30,.dark .dark\:bg-primary-700\/30{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-700\/40{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-700\/5{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-700\/50{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-700\/60{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-700\/70{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-700\/80{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-700\/90{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-800,.dark [bg~=dark\:primary-800],[bg-primary-800=""]{--un-bg-opacity:1;background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-800\/10{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-800\/100{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-800\/20{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-800\/30{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-800\/40{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-800\/5{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-800\/50{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-800\/60{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-800\/70{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-800\/80{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-800\/90{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-900,.dark .dark\:bg-primary-900,[bg-primary-900=""]{--un-bg-opacity:1;background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-900\/10,.dark .dark\:bg-primary-900\/10{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-900\/100{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-900\/20,.dark .dark\:bg-primary-900\/20{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-900\/30,.dark .dark\:bg-primary-900\/30{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-900\/40,.dark .dark\:bg-primary-900\/40,.dark [bg~="dark:primary-900/40"]{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-900\/5,.dark .dark\:bg-primary-900\/5{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-900\/50{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-900\/60{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-900\/70{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-900\/80{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-900\/90{background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary-950,[bg-primary-950=""]{--un-bg-opacity:1;background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.bg-primary-950\/10{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary-950\/100{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/1)}.bg-primary-950\/20{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary-950\/30{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary-950\/40{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary-950\/5{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary-950\/50{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary-950\/60{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary-950\/70,.dark [bg~="dark:primary-950/70"]{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary-950\/80{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary-950\/90{background-color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/.9)}.bg-primary\/10{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.1)}.bg-primary\/100{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/1)}.bg-primary\/20{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.2)}.bg-primary\/30{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.3)}.bg-primary\/40{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.4)}.bg-primary\/5{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.05)}.bg-primary\/50{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.5)}.bg-primary\/60{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.6)}.bg-primary\/70{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.7)}.bg-primary\/80{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.8)}.bg-primary\/90{background-color:oklch(62% var(--chromatic-chroma)calc(var(--chromatic-hue) + 0)/.9)}.bg-red-100\/50{background-color:#fee2e280}.bg-red-50,[bg-red-50=""]{--un-bg-opacity:1;background-color:rgb(254 242 242/var(--un-bg-opacity))}.bg-red-500{--un-bg-opacity:1;background-color:rgb(239 68 68/var(--un-bg-opacity))}.bg-red-500\/15{background-color:#ef444426}.bg-red900,.dark [dark\:bg-red-900=""]{--un-bg-opacity:1;background-color:rgb(127 29 29/var(--un-bg-opacity))}.bg-transparent,.dark [bg~=dark\:transparent],[bg-transparent=""],[bg~=transparent]{background-color:#0000}.bg-violet-50\/60{background-color:#f5f3ff99}.bg-white,.dark [bg~=dark\:white],[bg-white=""],[bg~=white]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.bg-white\/60,[bg~=white\/60]{background-color:#fff9}.bg-white\/80{background-color:#fffc}.bg-white\/90{background-color:#ffffffe6}.bg-yellow-500{--un-bg-opacity:1;background-color:rgb(234 179 8/var(--un-bg-opacity))}.dark .dark\:bg-amber-900\/20{background-color:#78350f33}.dark .dark\:bg-black\/30,.dark [bg~="dark:black/30"]{background-color:#0000004d}.dark .dark\:bg-black\/40{background-color:#0006}.dark .dark\:bg-black\/75{background-color:#000000bf}.dark .dark\:bg-blue-900\/30{background-color:#1e3a8a4d}.dark .dark\:bg-blue-900\/50{background-color:#1e3a8a80}.dark .dark\:bg-green-900\/30{background-color:#14532d4d}.dark .dark\:bg-green-900\/50{background-color:#14532d80}.dark .dark\:bg-lime-50\/10{background-color:#f7fee71a}.dark .dark\:bg-lime-900\/10{background-color:#3653141a}.dark .dark\:bg-neutral-500\/70{background-color:#737373b3}.dark .dark\:bg-neutral-700,.dark [bg~=dark\:neutral-700],.dark [dark\:bg-neutral-700=""],[bg~=neutral-700]{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark .dark\:bg-neutral-700\/50{background-color:#40404080}.dark .dark\:bg-neutral-700\/60{background-color:#40404099}.dark .dark\:bg-neutral-800\/50,.dark [bg~="dark:neutral-800/50"]{background-color:#26262680}.dark .dark\:bg-neutral-800\/70,.dark [bg~="dark:neutral-800/70"]{background-color:#262626b3}.dark .dark\:bg-neutral-900,.dark [bg~=dark\:neutral-900]{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}.dark .dark\:bg-neutral-900\/20{background-color:#17171733}.dark .dark\:bg-neutral-900\/95{background-color:#171717f2}.dark .dark\:bg-orange-50\/10{background-color:#fff7ed1a}.dark .dark\:bg-orange-900\/10{background-color:#7c2d121a}.dark .dark\:bg-primary-800\/25{background-color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/.25)}.dark .dark\:bg-red-700\/30{background-color:#b91c1c4d}.dark .dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark .dark\:bg-red-900\/30{background-color:#7f1d1d4d}.dark .dark\:bg-red-900\/50{background-color:#7f1d1d80}.dark .dark\:bg-violet-50\/10{background-color:#f5f3ff1a}.dark .dark\:bg-violet-900\/10{background-color:#4c1d951a}.dark [bg~="dark:[rgba(0,0,0,0.3)]"]{--un-bg-opacity:.3;background-color:rgba(0,0,0,var(--un-bg-opacity))}.dark [bg~="dark:black/10"]{background-color:#0000001a}.dark [bg~=dark\:blue-900],.dark [dark\:bg-blue-900=""]{--un-bg-opacity:1;background-color:rgb(30 58 138/var(--un-bg-opacity))}.dark [bg~=dark\:green-600]{--un-bg-opacity:1;background-color:rgb(22 163 74/var(--un-bg-opacity))}.dark [bg~="dark:neutral-100/80"],[bg~=neutral-100\/80]{background-color:#f5f5f5cc}.dark [bg~=dark\:neutral-500]{--un-bg-opacity:1;background-color:rgb(115 115 115/var(--un-bg-opacity))}.dark [bg~="dark:neutral-900/50"]{background-color:#17171780}.dark [bg~="dark:neutral-900/70"]{background-color:#171717b3}.dark [bg~=dark\:neutral-950]{--un-bg-opacity:1;background-color:rgb(10 10 10/var(--un-bg-opacity))}.dark [bg~="dark:neutral-950/80"]{background-color:#0a0a0acc}.dark [bg~="dark:orange-900/20"]{background-color:#7c2d1233}.dark [bg~=dark\:violet-800]{--un-bg-opacity:1;background-color:rgb(91 33 182/var(--un-bg-opacity))}.dark [dark\:bg-green-900=""]{--un-bg-opacity:1;background-color:rgb(20 83 45/var(--un-bg-opacity))}[bg~=\$bg-color]{background-color:var(--bg-color)}[bg~=black\/0]{background-color:#0000}[bg~=black\/4]{background-color:#0000000a}[bg~=blue-100]{--un-bg-opacity:1;background-color:rgb(219 234 254/var(--un-bg-opacity))}[bg~=emerald-500]{--un-bg-opacity:1;background-color:rgb(16 185 129/var(--un-bg-opacity))}[bg~=gray-200\/30]{background-color:#e5e7eb4d}[bg~=inherit]{background-color:inherit }[bg~=neutral-100\/50]{background-color:#f5f5f580}[bg~=neutral-200\/50]{background-color:#e5e5e580}[bg~=neutral-50\/50]{background-color:#fafafa80}[bg~=orange-50]{--un-bg-opacity:1;background-color:rgb(255 247 237/var(--un-bg-opacity))}[bg~=violet-100]{--un-bg-opacity:1;background-color:rgb(237 233 254/var(--un-bg-opacity))}[bg~=white\/70]{background-color:#ffffffb3}.dark .dark\:hover\:bg-black\/40:hover{background-color:#0006}.dark .dark\:hover\:bg-neutral-600:hover{--un-bg-opacity:1;background-color:rgb(82 82 82/var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-700:hover{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark .dark\:hover\:bg-neutral-700\/80:hover{background-color:#404040cc}.dark .dark\:hover\:bg-neutral-800:hover{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.dark .dark\:hover\:bg-primary-700\/40:hover{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.4)}.dark .dark\:hover\:bg-red-700\/40:hover{background-color:#b91c1c66}.dark .hover\:dark\:bg-neutral-800\/50:hover{background-color:#26262680}.dark [bg~="dark:hover:neutral-800"]:hover{--un-bg-opacity:1;background-color:rgb(38 38 38/var(--un-bg-opacity))}.dark [bg~="dark:hover:white/30"]:hover{background-color:#ffffff4d}.dark [hover~="dark:bg-black/40"]:hover{background-color:#0006}.dark [hover~=dark\:bg-neutral-700]:hover{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}.dark [hover~="dark:bg-neutral-700/50"]:hover{background-color:#40404080}.group:hover [bg~="group-hover:black/20"]{background-color:#0003}.hover\:bg-neutral-100:hover{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.hover\:bg-neutral-300:hover{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}.hover\:bg-neutral-400:hover{--un-bg-opacity:1;background-color:rgb(163 163 163/var(--un-bg-opacity))}.hover\:bg-neutral-400\/20:hover{background-color:#a3a3a333}.hover\:bg-neutral-50:hover{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.hover\:bg-neutral-50\/50:hover{background-color:#fafafa80}.hover\:bg-primary-500\/20:hover{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)}.hover\:bg-primary-600:hover{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-white\/80:hover{background-color:#fffc}[bg~=hover\:emerald-600]:hover{--un-bg-opacity:1;background-color:rgb(5 150 105/var(--un-bg-opacity))}[bg~=hover\:neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}[bg~=hover\:neutral-50]:hover{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}[hover\:bg-neutral-300=""]:hover{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}[hover\:bg-primary-600=""]:hover{--un-bg-opacity:1;background-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}[hover~=bg-neutral-200]:hover{--un-bg-opacity:1;background-color:rgb(229 229 229/var(--un-bg-opacity))}[hover~=bg-white\/80]:hover{background-color:#fffc}.dark [bg~="dark:focus:neutral-900"]:focus{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}[bg~=focus\:neutral-50]:focus{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.active\:bg-neutral-400\/30:active{background-color:#a3a3a34d}.active\:bg-neutral-50\/90:active{background-color:#fafafae6}.active\:bg-primary-500\/30:active{background-color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.3)}.active\:bg-red-500\/30:active{background-color:#ef44444d}.dark .active\:dark\:bg-neutral-800\/90:active{background-color:#262626e6}.dark .dark\:active\:bg-neutral-700\/60:active{background-color:#40404099}.dark .dark\:active\:bg-primary-700\/30:active{background-color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:active\:bg-red-700\/30:active{background-color:#b91c1c4d}.dark [bg~="dark:active:neutral-50"]:active{--un-bg-opacity:1;background-color:rgb(250 250 250/var(--un-bg-opacity))}.dark [bg~="dark:active:neutral-700"]:active{--un-bg-opacity:1;background-color:rgb(64 64 64/var(--un-bg-opacity))}[bg~=active\:neutral-300]:active{--un-bg-opacity:1;background-color:rgb(212 212 212/var(--un-bg-opacity))}[bg~=active\:neutral-950]:active{--un-bg-opacity:1;background-color:rgb(10 10 10/var(--un-bg-opacity))}.dark .dark\:disabled\:bg-neutral-900:disabled{--un-bg-opacity:1;background-color:rgb(23 23 23/var(--un-bg-opacity))}.disabled\:bg-neutral-100:disabled{--un-bg-opacity:1;background-color:rgb(245 245 245/var(--un-bg-opacity))}.before\:bg-lime-200:before{--un-bg-opacity:1;background-color:rgb(217 249 157/var(--un-bg-opacity))}.before\:bg-orange-200:before{--un-bg-opacity:1;background-color:rgb(254 215 170/var(--un-bg-opacity))}.before\:bg-primary-200:before{--un-bg-opacity:1;background-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.before\:bg-violet-200:before{--un-bg-opacity:1;background-color:rgb(221 214 254/var(--un-bg-opacity))}.dark .before\:dark\:bg-lime-900:before{--un-bg-opacity:1;background-color:rgb(54 83 20/var(--un-bg-opacity))}.dark .before\:dark\:bg-orange-900:before{--un-bg-opacity:1;background-color:rgb(124 45 18/var(--un-bg-opacity))}.dark .before\:dark\:bg-primary-900:before{--un-bg-opacity:1;background-color:oklch(37% var(--chromatic-chroma-900)calc(var(--chromatic-hue) + 0)/var(--un-bg-opacity))}.dark .before\:dark\:bg-violet-900:before{--un-bg-opacity:1;background-color:rgb(76 29 149/var(--un-bg-opacity))}.after\:bg-white:after{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.bg-opacity-30{--un-bg-opacity:.3}.dark .dark\:from-neutral-800,.dark [dark\:from-neutral-800=""]{--un-gradient-from-position:0%;--un-gradient-from:rgb(38 38 38/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#26262600 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:from-primary-400\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:from-primary-400\/20{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-neutral-50,[from-neutral-50=""]{--un-gradient-from-position:0%;--un-gradient-from:rgb(250 250 250/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:#fafafa00 var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-from-opacity,1))var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500\/0{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.from-primary-500\/20,.before\:from-primary-500\/20:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .before\:dark\:from-primary-400\/20:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark [before~="dark:from-primary-400/0"]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark [hover~="before:dark:from-primary-400/20"]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}[before~=from-primary-500\/0]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}[hover~="before:from-primary-500/20"]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.dark .dark\:via-primary-400\/10{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.via-primary-500\/10,.before\:via-primary-500\/10:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.dark .before\:dark\:via-primary-400\/10:before,.dark [hover~="before:dark:via-primary-400/10"]:hover:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}[hover~="before:via-primary-500/10"]:hover:before{--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to)}.dark .dark\:to-neutral-900{--un-gradient-to-position:100%;--un-gradient-to:rgb(23 23 23/var(--un-to-opacity,1))var(--un-gradient-to-position)}.dark .dark\:to-primary-400\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.dark .dark\:to-transparent,.to-transparent{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.to-neutral-100,[to-neutral-100=""]{--un-gradient-to-position:100%;--un-gradient-to:rgb(245 245 245/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-primary-400{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-to-opacity,1))var(--un-gradient-to-position)}.to-primary-500\/0{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.before\:to-transparent:before,.dark .before\:dark\:to-transparent:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.dark [before~="dark:to-primary-400/0"]:before{--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}.dark [hover~="before:dark:to-transparent"]:hover:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}[before~=to-primary-500\/0]:before{--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position)}[hover~=before\:to-transparent]:hover:before{--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.bg-gradient-to-b,[bg-gradient-to-b=""]{--un-gradient-shape:to bottom in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.bg-gradient-to-r,.before\:bg-gradient-to-r:before,[before~=bg-gradient-to-r]:before,[hover~=before\:bg-gradient-to-r]:hover:before{--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.dark .dark\:fill-neutral-800,.dark [dark\:fill-neutral-800=""]{--un-fill-opacity:1;fill:rgb(38 38 38/var(--un-fill-opacity))}.fill-white,[fill-white=""]{--un-fill-opacity:1;fill:rgb(255 255 255/var(--un-fill-opacity))}[stroke-width~="0.5"]{stroke-width:.5px}[stroke-width~="1.5"]{stroke-width:1.5px}[stroke-width~="2"]{stroke-width:2px}[stroke~="163"]{stroke-width:163px}[stroke~="175"]{stroke-width:175px}.object-cover,[object-cover=""]{object-fit:cover}.object-contain,[object-contain=""]{object-fit:contain}.p-\[2px\]{padding:2px}.p-1,[p-1=""],[p~="1"]{padding:.25rem}.p-1\.5,[p-1\.5=""]{padding:.375rem}.p-2,[p-2=""],[p~="2"]{padding:.5rem}.p-2\.5{padding:.625rem}.p-3,[p-3=""]{padding:.75rem}.p-4,[p-4=""]{padding:1rem}.p-5,[p-5=""]{padding:1.25rem}.p-6{padding:1.5rem}.p-8,[p-8=""]{padding:2rem}.px,.px-4,[px-4=""],[px=""]{padding-left:1rem;padding-right:1rem}.px-\[25px\]{padding-left:25px;padding-right:25px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5,[px~="1.5"]{padding-left:.375rem;padding-right:.375rem}.px-2,.px2,[px-2=""],[px~="2"],[px2=""]{padding-left:.5rem;padding-right:.5rem}.px-3,[px-3=""]{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py,.py-4,[py-4=""],[py~="4"]{padding-top:1rem;padding-bottom:1rem}.py-\.5,.py-0\.5,[py-\.5=""],[py-0\.5=""],[py~="0.5"]{padding-top:.125rem;padding-bottom:.125rem}.py-0{padding-top:0;padding-bottom:0}.py-1,.py1,[py-1=""],[py1=""]{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5,[py-1\.5=""]{padding-top:.375rem;padding-bottom:.375rem}.py-2,[py-2=""]{padding-top:.5rem;padding-bottom:.5rem}.py-3,[py-3=""]{padding-top:.75rem;padding-bottom:.75rem}[py~="2.5"]{padding-top:.625rem;padding-bottom:.625rem}.pb-0{padding-bottom:0}.pb-12,[pb-12=""]{padding-bottom:3rem}.pb-2,[pb-2=""]{padding-bottom:.5rem}.pb-3,[pb-3=""]{padding-bottom:.75rem}.pb-4,[pb-4=""]{padding-bottom:1rem}.pb-6,[pb-6=""]{padding-bottom:1.5rem}.pl,.pl-4,[pl-4=""]{padding-left:1rem}.pl-\[1\.5rem\]{padding-left:1.5rem}.pl-10{padding-left:2.5rem}.pl-3,[pl-3=""]{padding-left:.75rem}.pl-5,[pl-5=""]{padding-left:1.25rem}.pr-\[0\.5rem\]{padding-right:.5rem}.pr-\[20px\]{padding-right:20px}.pr-1,[pr-1=""]{padding-right:.25rem}.pr-3,[pr-3=""]{padding-right:.75rem}.pr-4,[pr-4=""]{padding-right:1rem}.pt,.pt-4,[pt-4=""]{padding-top:1rem}.pt-0{padding-top:0}.pt-1,[pt-1=""]{padding-top:.25rem}.pt-10,[pt-10=""]{padding-top:2.5rem}.pt-14,[pt-14=""]{padding-top:3.5rem}.pt-2,[pt-2=""]{padding-top:.5rem}.pt-3{padding-top:.75rem}[pl~="6.5"]{padding-left:1.625rem}.text-center,[text-center=""],[text~=center]{text-align:center}.text-left,[text-left=""]{text-align:left}.text-right,[text-right=""]{text-align:right}.text-wrap,[text-wrap=""]{text-wrap:wrap}.text-nowrap,[text-nowrap=""]{text-wrap:nowrap}.text-\[10px\]{font-size:10px}.text-2xl,[text-2xl=""]{font-size:1.5rem;line-height:2rem}.text-3xl,[text-3xl=""]{font-size:1.875rem;line-height:2.25rem}.text-5xl,[text-5xl=""]{font-size:3rem;line-height:1}.text-6xl,[text-6xl=""]{font-size:3.75rem;line-height:1}.text-base,[text-base=""],[text~=base]{font-size:1rem;line-height:1.5rem}.text-lg,[text-lg=""],[text~=lg]{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""],[text~=sm]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""],[text~=xs]{font-size:.75rem;line-height:1rem}[text~="[12px]"]{font-size:12px}[text~="4xl"]{font-size:2.25rem;line-height:2.5rem}[text~="60"]{font-size:15rem}[default-text~="2"]:default{font-size:.5rem}.dark .dark\:data-\[disabled\]\:text-neutral-600[data-disabled],.dark .dark\:text-neutral-600,.dark [text~=dark\:neutral-600],.text-neutral-600,[text~=neutral-600]{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}.dark .dark\:text-amber-300{--un-text-opacity:1;color:rgb(252 211 77/var(--un-text-opacity))}.dark .dark\:text-amber-400{--un-text-opacity:1;color:rgb(251 191 36/var(--un-text-opacity))}.dark .dark\:text-blue-300{--un-text-opacity:1;color:rgb(147 197 253/var(--un-text-opacity))}.dark .dark\:text-green-300{--un-text-opacity:1;color:rgb(134 239 172/var(--un-text-opacity))}.dark .dark\:text-green-400,.text-green{--un-text-opacity:1;color:rgb(74 222 128/var(--un-text-opacity))}.dark .dark\:text-lime-400{--un-text-opacity:1;color:rgb(163 230 53/var(--un-text-opacity))}.dark .dark\:text-neutral-100,.dark [text~=dark\:neutral-100],[text~=neutral-100]{--un-text-opacity:1;color:rgb(245 245 245/var(--un-text-opacity))}.dark .dark\:text-neutral-200,.dark [dark\:text-neutral-200=""],.data-\[placeholder\]\:text-neutral-200[data-placeholder]{--un-text-opacity:1;color:rgb(229 229 229/var(--un-text-opacity))}.dark .dark\:text-neutral-300,.dark [dark\:text-neutral-300=""],.dark [text~=dark\:neutral-300],[text~=neutral-300]{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark .dark\:text-neutral-300\/80{color:#d4d4d4cc}.dark .dark\:text-neutral-400,.dark [dark\:text-neutral-400=""],.dark [text~=dark\:neutral-400],.data-\[disabled\]\:text-neutral-400[data-disabled],.text-neutral-400,[text-neutral-400=""],[text~=neutral-400]{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}.dark .dark\:text-neutral-500,.dark [text~=dark\:neutral-500],.text-neutral-500,[text-neutral-500=""],[text~=neutral-500]{--un-text-opacity:1;color:rgb(115 115 115/var(--un-text-opacity))}.dark .dark\:text-neutral-600\/20,.dark [text~="dark:neutral-600/20"]{color:#52525233}.dark .dark\:text-orange-400,.text-orange{--un-text-opacity:1;color:rgb(251 146 60/var(--un-text-opacity))}.dark .dark\:color-primary-100,.dark .dark\:text-primary-100,.dark [dark\:color-primary-100=""]{--un-text-opacity:1;color:color-mix(in srgb,oklch(95% var(--chromatic-chroma-100)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))80%,oklch(100% 0 360/var(--un-text-opacity)))}.dark .dark\:text-primary-300,.dark [text~=dark\:primary-300],.text-primary-300{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-300\/80{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.color-primary-400,.dark .dark\:text-primary-400,.dark [text~=dark\:primary-400],.text-primary-400,[color-primary-400=""],[text~=primary-400]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-primary-600,.text-primary-600,[text~=primary-600]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .dark\:text-red-100{--un-text-opacity:1;color:rgb(254 226 226/var(--un-text-opacity))}.dark .dark\:text-red-300{--un-text-opacity:1;color:rgb(252 165 165/var(--un-text-opacity))}.dark .dark\:text-red-400,.text-red{--un-text-opacity:1;color:rgb(248 113 113/var(--un-text-opacity))}.dark .dark\:text-slate-100{--un-text-opacity:1;color:rgb(241 245 249/var(--un-text-opacity))}.dark .dark\:text-violet-400{--un-text-opacity:1;color:rgb(167 139 250/var(--un-text-opacity))}.dark .dark\:text-white,.text-white,[text-white=""],[text~=white]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}.dark [text~="dark:cyan-600/90"]{color:#0891b2e6}.dark [text~=dark\:gray-200]{--un-text-opacity:1;color:rgb(229 231 235/var(--un-text-opacity))}.dark [text~="dark:neutral-100/65"]{color:#f5f5f5a6}.dark [text~="dark:neutral-600/50"]{color:#52525280}.dark [text~=dark\:neutral-900]{--un-text-opacity:1;color:rgb(23 23 23/var(--un-text-opacity))}.dark [text~=dark\:orange-500],.text-orange-500{--un-text-opacity:1;color:rgb(249 115 22/var(--un-text-opacity))}.dark [text~="dark:pink-300/90"]{color:#f9a8d4e6}.dark [text~="dark:primary-300/50"]{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}.dark [text~="dark:primary-600/90"]{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.9)}.dark [text~="dark:violet-600/90"]{color:#7c3aede6}.text-amber-500{--un-text-opacity:1;color:rgb(245 158 11/var(--un-text-opacity))}.text-amber-600{--un-text-opacity:1;color:rgb(217 119 6/var(--un-text-opacity))}.text-amber-700{--un-text-opacity:1;color:rgb(180 83 9/var(--un-text-opacity))}.text-black,[text-black=""]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.text-blue-500,[text-blue-500=""]{--un-text-opacity:1;color:rgb(59 130 246/var(--un-text-opacity))}.text-blue-700,[text-blue-700=""]{--un-text-opacity:1;color:rgb(29 78 216/var(--un-text-opacity))}.text-green-500,[text-green-500=""]{--un-text-opacity:1;color:rgb(34 197 94/var(--un-text-opacity))}.text-green-600{--un-text-opacity:1;color:rgb(22 163 74/var(--un-text-opacity))}.text-green-700,[text-green-700=""]{--un-text-opacity:1;color:rgb(21 128 61/var(--un-text-opacity))}.text-lime-500{--un-text-opacity:1;color:rgb(132 204 22/var(--un-text-opacity))}.text-neutral-200\/50,[text~=neutral-200\/50]{color:#e5e5e580}.text-neutral-400\/50,[text~=neutral-400\/50]{color:#a3a3a380}.text-neutral-500\/50,[text~=neutral-500\/50]{color:#73737380}.text-neutral-700,[text-neutral-700=""]{--un-text-opacity:1;color:rgb(64 64 64/var(--un-text-opacity))}.text-neutral-700\/80{color:#404040cc}.text-neutral-800{--un-text-opacity:1;color:rgb(38 38 38/var(--un-text-opacity))}.text-neutral-950{--un-text-opacity:1;color:rgb(10 10 10/var(--un-text-opacity))}.text-primary-500,[text~=primary-500]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-600\/80{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}.text-primary-700{--un-text-opacity:1;color:oklch(49% var(--chromatic-chroma-700)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-800{--un-text-opacity:1;color:oklch(42% var(--chromatic-chroma-800)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-primary-950{--un-text-opacity:1;color:oklch(29% var(--chromatic-chroma-950)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.text-purple{--un-text-opacity:1;color:rgb(192 132 252/var(--un-text-opacity))}.text-red-500,[text-red-500=""]{--un-text-opacity:1;color:rgb(239 68 68/var(--un-text-opacity))}.text-red-700,[text-red-700=""]{--un-text-opacity:1;color:rgb(185 28 28/var(--un-text-opacity))}.text-red-950{--un-text-opacity:1;color:rgb(69 10 10/var(--un-text-opacity))}.text-slate-700{--un-text-opacity:1;color:rgb(51 65 85/var(--un-text-opacity))}.text-transparent{color:#0000}.text-violet-500,[text-violet-500=""]{--un-text-opacity:1;color:rgb(139 92 246/var(--un-text-opacity))}[text~=cyan-400\/90]{color:#22d3eee6}[text~=gray-700]{--un-text-opacity:1;color:rgb(55 65 81/var(--un-text-opacity))}[text~=orange-700]{--un-text-opacity:1;color:rgb(194 65 12/var(--un-text-opacity))}[text~=pink-400]{--un-text-opacity:1;color:rgb(244 114 182/var(--un-text-opacity))}[text~=primary-400\/90]{color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.9)}[text~=violet-400\/90]{color:#a78bfae6}.dark .dark\:hover\:text-neutral-300:hover{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark [hover~="dark:text-primary-300/80"]:hover{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.8)}.dark [text~="dark:hover:neutral-200"]:hover{--un-text-opacity:1;color:rgb(229 229 229/var(--un-text-opacity))}.dark [text~="dark:hover:neutral-800"]:hover{--un-text-opacity:1;color:rgb(38 38 38/var(--un-text-opacity))}.dark [text~="dark:hover:primary-500"]:hover{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.hover\:text-neutral-700:hover{--un-text-opacity:1;color:rgb(64 64 64/var(--un-text-opacity))}[hover~=text-primary-600\/80]:hover{color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.8)}[text~=hover\:neutral-600]:hover{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}[text~=hover\:primary-600]:hover{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="dark:disabled:neutral-600"]:disabled{--un-text-opacity:1;color:rgb(82 82 82/var(--un-text-opacity))}[text~=disabled\:neutral-400]:disabled,.dark [text~="placeholder:dark:hover:neutral-400"]:hover::placeholder{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}.dark [text~="placeholder:dark:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark [text~="placeholder:dark:neutral-300"]::placeholder{--un-text-opacity:1;color:rgb(212 212 212/var(--un-text-opacity))}.dark [text~="placeholder:dark:primary-300/50"]::placeholder{color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.5)}[text~="placeholder:hover:neutral-500"]:hover::placeholder{--un-text-opacity:1;color:rgb(115 115 115/var(--un-text-opacity))}[text~="placeholder:hover:primary-500"]:hover::placeholder{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}[text~=placeholder\:neutral-400]::placeholder{--un-text-opacity:1;color:rgb(163 163 163/var(--un-text-opacity))}[text~=placeholder\:primary-400]::placeholder{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.font-bold,[font-bold=""]{font-weight:700}.font-medium,[font-medium=""]{font-weight:500}.font-normal,[font-normal=""]{font-weight:400}.font-semibold,[font-semibold=""]{font-weight:600}.leading-\[25px\]{line-height:25px}.leading-10,.lh-10{line-height:2.5rem}.leading-none,[leading~="[1]"]{line-height:1}[leading~="[0.75]"]{line-height:.75}.font-cute,[font-cute=""]{font-family:Sniglet,Kiwi Maru,xiaolai,DM Sans Variant,DM Sans,ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-jura,[font-jura=""]{font-family:Jura}.font-mono,[font-mono=""]{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-quicksand,[font-quicksand=""]{font-family:Quicksand}.font-sans,[font-sans=""]{font-family:DM Sans,DM Sans Variant,ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-sans-rounded,[font-sans-rounded=""]{font-family:Comfortaa Variable,Comfortaa,DM Sans,ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-italic,.italic,[font-italic=""]{font-style:italic}.decoration-underline,.underline,[decoration-underline=""],[underline=""]{text-decoration-line:underline}.decoration-dotted,[decoration-dotted=""]{text-decoration-style:dotted}.decoration-dashed,[decoration-dashed=""]{text-decoration-style:dashed}.tab{tab-size:4}.text-stroke-1,[text-stroke-1=""]{-webkit-text-stroke-width:1px}.text-shadow{--un-text-shadow:0 0 1px var(--un-text-shadow-color,#0003),0 0 1px var(--un-text-shadow-color,#0100051a);text-shadow:var(--un-text-shadow)}.write-vertical-left,[write-vertical-left=""]{writing-mode:vertical-lr}.\[\&\:checked\+div_\.radio-dot\]\:opacity-100:checked+div .radio-dot,.opacity-100,.group:hover .group-hover\:opacity-100,.group:hover [group-hover\:opacity-100=""]{opacity:1}.op-0,.opacity-0,[op-0=""],[opacity-0=""]{opacity:0}.op50,.opacity-50,[op50=""]{opacity:.5}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-95,[opacity-95=""]{opacity:.95}.\[\&_\.round-range-tooltip\]\:hover\:opacity-100:hover .round-range-tooltip,[hover~=opacity-100]:hover{opacity:1}.disabled\:opacity-50:disabled,[disabled\:opacity-50=""]:disabled{opacity:.5}.before\:opacity-100:before{opacity:1}[before~=opacity-0]:before{opacity:0}[hover~=before\:opacity-100]:hover:before{opacity:1}.mix-blend-screen,[mix-blend-screen=""]{mix-blend-mode:screen}.dark .dark\:shadow-lg,.shadow-lg{--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark [shadow~=dark\:none]{--un-shadow:0 0 var(--un-shadow-color,#0000);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow{--un-shadow:var(--un-shadow-inset)0 1px 3px 0 var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 1px 2px -1px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-green-500\/50{--un-shadow-color:#22c55e80 }.shadow-md,[shadow-md=""],[shadow~=md]{--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-sm,[shadow-sm=""],[shadow~=sm]{--un-shadow:var(--un-shadow-inset)0 1px 2px 0 var(--un-shadow-color,#0000000d);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-xl,[shadow-xl=""]{--un-shadow:var(--un-shadow-inset)0 20px 25px -5px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-yellow-500\/30{--un-shadow-color:#eab3084d }[shadow~=cyan-200\/20]{--un-shadow-color:#a5f3fc33 }[shadow~=cyan-200\/50]{--un-shadow-color:#a5f3fc80 }[shadow~=primary-200\/20]{--un-shadow-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.2)}[shadow~=primary-200\/50]{--un-shadow-color:oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/.5)}[shadow~=violet-200\/20]{--un-shadow-color:#ddd6fe33 }[shadow~=violet-200\/50]{--un-shadow-color:#ddd6fe80 }.focus-within\:shadow-neutral-800:focus-within{--un-shadow-opacity:1;--un-shadow-color:rgb(38 38 38/var(--un-shadow-opacity))}[shadow~="focus-within:[0_0_0_1px]"]:focus-within{--un-shadow:0 0 0 1px var(--un-shadow-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark [hover~=dark\:shadow-lg]:hover{--un-shadow:var(--un-shadow-inset)0 10px 15px -3px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}[hover~=shadow-md]:hover{--un-shadow:var(--un-shadow-inset)0 4px 6px -1px var(--un-shadow-color,#0000001a),var(--un-shadow-inset)0 2px 4px -2px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.focus\:shadow-\[0_0_0_2px\]:focus{--un-shadow:0 0 0 2px var(--un-shadow-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.focus\:shadow-black:focus{--un-shadow-opacity:1;--un-shadow-color:rgb(0 0 0/var(--un-shadow-opacity))}.outline{outline-style:solid}.data-\[highlighted\]\:outline-none[data-highlighted],.outline-none,[outline-none=""],[outline~=focus-within\:none]:focus-within,.focus\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.ring-2,.focus\:ring-2:focus{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset)0 0 0 var(--un-ring-offset-width)var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset)0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width))var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.dark .dark\:ring-neutral-600\/30{--un-ring-color:#5252524d }.dark .dark\:ring-neutral-600\/60{--un-ring-color:#52525299 }.ring-neutral-300\/30{--un-ring-color:#d4d4d44d }.dark .dark\:focus\:ring-neutral-600\/30:focus{--un-ring-color:#5252524d }.dark .dark\:focus\:ring-neutral-600\/60:focus{--un-ring-color:#52525299 }.dark .dark\:focus\:ring-primary-600\/30:focus{--un-ring-color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/.3)}.dark .dark\:focus\:ring-red-600\/30:focus{--un-ring-color:#dc26264d }.dark .dark\:focus\:ring-red-600\/60:focus{--un-ring-color:#dc262699 }.focus\:ring-neutral-300\/30:focus{--un-ring-color:#d4d4d44d }.focus\:ring-primary-300\/60:focus{--un-ring-color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/.6)}.focus\:ring-red-300\/30:focus{--un-ring-color:#fca5a54d }.backdrop-blur-lg{--un-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-md,[backdrop-blur-md=""]{--un-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-sm,[backdrop-blur-sm=""]{--un-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.backdrop-blur-xl,[backdrop-blur-xl=""]{--un-backdrop-blur:blur(24px);-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.blur{--un-blur:blur(8px);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.drop-shadow{--un-drop-shadow:drop-shadow(0 1px 2px var(--un-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--un-drop-shadow-color,#0000000f));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.drop-shadow-sm,[drop-shadow-sm=""]{--un-drop-shadow:drop-shadow(0 1px 1px var(--un-drop-shadow-color,#0000000d));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~=none],.dark [drop-shadow~="dark:hover:none"]:hover{--un-drop-shadow:drop-shadow(0 0 var(--un-drop-shadow-color,#0000));filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~="hover:[0px_4px_4px_rgba(220,220,220,0.4)]"]:hover{--un-drop-shadow:drop-shadow(0px 4px 4px #dcdcdc66);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}[drop-shadow~="active:[0px_0px_0px_rgba(220,220,220,0.25)]"]:active{--un-drop-shadow:drop-shadow(0px 0px 0px #dcdcdc40);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.\[\&_\.provider-icon\]\:grayscale-100 .provider-icon,.grayscale-100,[grayscale-100=""]{--un-grayscale:grayscale(1);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.\[\&_\.provider-icon\]\:hover\:grayscale-0:hover .provider-icon{--un-grayscale:grayscale(0);filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.filter{filter:var(--un-blur)var(--un-brightness)var(--un-contrast)var(--un-drop-shadow)var(--un-grayscale)var(--un-hue-rotate)var(--un-invert)var(--un-saturate)var(--un-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur)var(--un-backdrop-brightness)var(--un-backdrop-contrast)var(--un-backdrop-grayscale)var(--un-backdrop-hue-rotate)var(--un-backdrop-invert)var(--un-backdrop-opacity)var(--un-backdrop-saturate)var(--un-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-\[width\,margin\]{transition-property:width,margin;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-100,[transition~="100"]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.1s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all,[transition-all=""],[transition~=all]{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors,[transition-colors=""],[transition~=colors]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors\,transform\,width\,height{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform,width,height;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity,[transition-opacity=""]{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform,[transition~=transform]{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=border]{transition-property:border;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=colors\,transform]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=width]{transition-property:width;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition~=placeholder\:all]::placeholder,[before~=transition-all]:before,.after\:transition-all:after,[after~=transition-all]:after{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,[duration-150=""]{transition-duration:.15s}.duration-200,[duration-200=""],[transition~=duration-200]{transition-duration:.2s}.duration-250,[duration-250=""],[duration~="250"],[transition~=duration-250]{transition-duration:.25s}.duration-300,[transition~=duration-300]{transition-duration:.3s}.duration-400,[transition~=duration-400]{transition-duration:.4s}.duration-500,[duration-500=""],[duration~="500"],[transition~=duration-500]{transition-duration:.5s}.duration-75{transition-duration:75ms}[duration~="10"]{transition-duration:10ms}[duration~="1000"]{transition-duration:1s}.placeholder\:duration-250::placeholder,[placeholder\:duration-250=""]::placeholder,[transition~=placeholder\:duration-250]::placeholder{transition-duration:.25s}[before~=duration-400]:before,[after~=duration-400]:after{transition-duration:.4s}[delay~="10"]{transition-delay:10ms}[delay~="100"]{transition-delay:.1s}[delay~="11"]{transition-delay:11ms}[delay~="19"]{transition-delay:19ms}[delay~="2"]{transition-delay:2ms}[delay~="20"]{transition-delay:20ms}[delay~="200"]{transition-delay:.2s}[delay~="3"]{transition-delay:3ms}[delay~="4"]{transition-delay:4ms}[delay~="5"]{transition-delay:5ms}[delay~="50"]{transition-delay:50ms}[delay~="6"]{transition-delay:6ms}[delay~="7"]{transition-delay:7ms}[delay~="8"]{transition-delay:8ms}[delay~="9"]{transition-delay:9ms}.ease,.ease-in-out,[ease-in-out=""],[transition~=ease-in-out]{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear,[ease-linear=""]{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:ease-in-out::placeholder,[transition~=placeholder\:ease-in-out]::placeholder,[before~=ease-in-out]:before,[after~=ease-in-out]:after{transition-timing-function:cubic-bezier(.4,0,.2,1)}.will-change-background-color,[will-change-background-color=""]{will-change:background-color}.will-change-color,[will-change-color=""]{will-change:color}.will-change-transform,[will-change-transform=""]{will-change:transform}.will-change-width,[will-change-width=""]{will-change:width}.before\:content-\[\'\'\]:before,.after\:content-\[\'\'\]:after,.content-empty,[before~=content-empty]:before,[after~=content-empty]:after{content:""}.placeholder-stone-400::placeholder{--un-placeholder-opacity:1;color:rgb(168 162 158/var(--un-placeholder-opacity))}.hidden,[hidden=""]{display:none}.bg-dotted-\[neutral-200\/60\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.6}.bg-dotted-\[neutral-200\/80\]{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8}.dark .dark\:bg-dotted-\[neutral-700\/25\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.25}.dark .dark\:bg-dotted-\[neutral-700\/40\]{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.4}.dark .dark\:hover\:bg-dotted-\[primary-200\/20\]:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.hover\:bg-dotted-\[primary-300\/50\]:hover,.after\:bg-dotted-\[primary-300\/50\]:after{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .dark\:after\:bg-dotted-\[primary-200\/20\]:after,.dark [hover~="dark:after:bg-dotted-[primary-200/20]"]:hover:after{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}[after~="bg-dotted-[neutral-200/80]"]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8}[hover~="after:bg-dotted-[primary-300/50]"]:hover:after{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.transition-colors-none,.placeholder\:transition-colors-none::placeholder{transition-property:color,background-color,border-color,text-color;transition-duration:0s}@media (max-width:1023.9px){[min-w~="p.availableVoices[m]||[]);async function b(e,t,n){let r=await _.getProviderInstance(m);if(!r)throw Error(`Failed to initialize speech provider`);let i=_.getProviderConfig(m),a=i.model||h;return await p.speech(r,a,e,t,{...i})}return s([v],async()=>{let e=_.getProviderConfig(m),t=_.getProviderMetadata(m);await t.validators.validateProviderConfig(e)?await p.loadVoicesForProvider(m):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,t)=>(o(),r(l(a),{"provider-id":m,"default-model":h},{playground:c(()=>[i(l(u),{"available-voices":y.value,"generate-speech":b,"api-key-configured":g,"default-text":`Hello! This is a test of the Index TTS voice synthesis.`},null,8,[`available-voices`])]),_:1}))}});typeof p==`function`&&p(_);var v=_;export{v as default}; \ No newline at end of file +import{d$ as e,d9 as t,dV as n,dX as r,e as i,e0 as a,e8 as o,ef as s,eg as c,en as l,f as u,v as d,y as f}from"./index-BIGBQG2E.js";import{b as p}from"./route-block-gWR0cCIm.js";const m=`index-tts-vllm`,h=`IndexTTS-1.5`,g=!0;var _=a({__name:`index-tts-vllm`,setup(a){let p=d(),_=f(),{providers:v}=t(_),y=n(()=>p.availableVoices[m]||[]);async function b(e,t,n){let r=await _.getProviderInstance(m);if(!r)throw Error(`Failed to initialize speech provider`);let i=_.getProviderConfig(m),a=i.model||h;return await p.speech(r,a,e,t,{...i})}return s([v],async()=>{let e=_.getProviderConfig(m),t=_.getProviderMetadata(m);await t.validators.validateProviderConfig(e)?await p.loadVoicesForProvider(m):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(t,n)=>(o(),r(l(i),{"provider-id":m,"default-model":h},{playground:c(()=>[e(l(u),{"available-voices":y.value,"generate-speech":b,"api-key-configured":g,"default-text":`Hello! This is a test of the Index TTS voice synthesis.`},null,8,[`available-voices`])]),_:1}))}});typeof p==`function`&&p(_);var v=_;export{v as default}; \ No newline at end of file diff --git a/assets/memory-BptisQ8A.js b/assets/memory-CNpnR5Ql.js similarity index 80% rename from assets/memory-BptisQ8A.js rename to assets/memory-CNpnR5Ql.js index 829da8c1080f082bee8793377be2abefff16807a..62eb7d36ef9ecebb1950d80e1d29138ff7662950 100644 --- a/assets/memory-BptisQ8A.js +++ b/assets/memory-CNpnR5Ql.js @@ -1 +1 @@ -import{cs as e,d$ as t,dS as n,dV as r,dY as i,dZ as a,d_ as o,e7 as s,eb as c,ef as l,eg as u,em as d}from"./index-B9WIljdS.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=t({__name:`index`,setup(t){return(t,f)=>{let m=c(`motion`);return s(),i(n,null,[r(`div`,null,[o(d(e),{label:`In development, needs your help!`,theme:`orange`},{default:l(()=>f[0]||=[r(`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 `),r(`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 `),r(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/memory/index.vue`},`here`),a(`. `)],-1)]),_:1,__:[0]})]),u((s(),i(`div`,p,f[1]||=[r(`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{cs as e,d$ as t,dT as n,dW as r,dZ as i,d_ as a,e0 as o,e8 as s,ec as c,eg as l,eh as u,en as d}from"./index-BIGBQG2E.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(),i(n,null,[r(`div`,null,[t(d(e),{label:`In development, needs your help!`,theme:`orange`},{default:l(()=>f[0]||=[r(`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 `),r(`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 `),r(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/memory/index.vue`},`here`),a(`. `)],-1)]),_:1,__:[0]})]),u((s(),i(`div`,p,f[1]||=[r(`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-3y9YURXG.js b/assets/memory-long-term-3y9YURXG.js deleted file mode 100644 index 70815c6f269038407dc198c5de23d9a8adbc7c64..0000000000000000000000000000000000000000 --- a/assets/memory-long-term-3y9YURXG.js +++ /dev/null @@ -1 +0,0 @@ -import{d$ as e,dY as t,e7 as n}from"./index-B9WIljdS.js";import{b as r}from"./route-block-gWR0cCIm.js";var i=e({__name:`memory-long-term`,setup(e){return(e,r)=>(n(),t(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file diff --git a/assets/memory-long-term-DaVuCOPk.js b/assets/memory-long-term-DaVuCOPk.js new file mode 100644 index 0000000000000000000000000000000000000000..cf6c4eb44a2a244b4fea4c03878d807766bfe235 --- /dev/null +++ b/assets/memory-long-term-DaVuCOPk.js @@ -0,0 +1 @@ +import{dZ as e,e0 as t,e8 as n}from"./index-BIGBQG2E.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-A4xwu6aD.js b/assets/memory-short-term-A4xwu6aD.js new file mode 100644 index 0000000000000000000000000000000000000000..99be483ffa858aafaa41d10df008781da4d01df0 --- /dev/null +++ b/assets/memory-short-term-A4xwu6aD.js @@ -0,0 +1 @@ +import{dZ as e,e0 as t,e8 as n}from"./index-BIGBQG2E.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/memory-short-term-DxB8blpY.js b/assets/memory-short-term-DxB8blpY.js deleted file mode 100644 index 40824c00a2393ba9d82345b4e50b6c787c27da59..0000000000000000000000000000000000000000 --- a/assets/memory-short-term-DxB8blpY.js +++ /dev/null @@ -1 +0,0 @@ -import{d$ as e,dY as t,e7 as n}from"./index-B9WIljdS.js";import{b as r}from"./route-block-gWR0cCIm.js";var i=e({__name:`memory-short-term`,setup(e){return(e,r)=>(n(),t(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file diff --git a/assets/messages-Cl2ZMDuq.js b/assets/messages-DQjPeAXc.js similarity index 61% rename from assets/messages-Cl2ZMDuq.js rename to assets/messages-DQjPeAXc.js index d1f7090513b94c456792c1dda8d509cffa9e1e95..3b40e85622474adb2e53288ec238f26d107f1fa9 100644 --- a/assets/messages-Cl2ZMDuq.js +++ b/assets/messages-DQjPeAXc.js @@ -1 +1 @@ -import"./Basic-BfTEEIor.js";import{b as e}from"./Textarea-Q_8nrbKN.js";import{c4 as t,c5 as n,cu as r,d$ as i,dS as a,dV as o,dY as s,d_ as c,e7 as l,e8 as u,ei as d,em as f,eq as p}from"./index-B9WIljdS.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=i({__name:`messages`,setup(i){let y=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(),s(`div`,m,[o(`div`,h,[c(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`]),o(`button`,g,p(x.value?`Processing...`:`Send`),1)]),o(`div`,_,[o(`div`,v,[n[1]||=o(`h3`,{"font-normal":``},` TTS Message `,-1),(l(!0),s(a,null,u(b.value,e=>(l(),s(`div`,{key:e},[o(`div`,null,p(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file +import"./Basic-BgQfJAar.js";import{b as e}from"./Textarea-rGc1yvjC.js";import{c4 as t,c5 as n,cu as r,d$ as i,dT as a,dW as o,dZ as s,e0 as c,e8 as l,e9 as u,ej as d,en as f,er as p}from"./index-BIGBQG2E.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(),s(`div`,m,[o(`div`,h,[i(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`]),o(`button`,g,p(x.value?`Processing...`:`Send`),1)]),o(`div`,_,[o(`div`,v,[n[1]||=o(`h3`,{"font-normal":``},` TTS Message `,-1),(l(!0),s(a,null,u(b.value,e=>(l(),s(`div`,{key:e},[o(`div`,null,p(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/microsoft-speech-DNNo6YPJ.js b/assets/microsoft-speech-DxOqJ-JQ.js similarity index 69% rename from assets/microsoft-speech-DNNo6YPJ.js rename to assets/microsoft-speech-DxOqJ-JQ.js index ae3004cdf4e8e53a197e8da0a81b3b6a43c8d0c3..e1b5d35a17d7911ff7ac09b565b8ebb424c936e3 100644 --- a/assets/microsoft-speech-DNNo6YPJ.js +++ b/assets/microsoft-speech-DxOqJ-JQ.js @@ -1 +1 @@ -import{A as e,cN as t,cQ as n,d$ as r,d8 as i,dU as a,dV as o,dW as s,d_ as c,e as l,e5 as u,e7 as d,ee as f,ef as p,ei as m,em as h,f as g,v as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=r({__name:`microsoft-speech`,setup(r){let{t:y}=e(),C={pitch:0,speed:1,volume:0},w=_(),T=v(),{providers:E}=i(T),D=m(0),O=m(1),k=m(0),A=a({get:()=>E.value[x]?.region,set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=a(()=>!!E.value[x]?.apiKey),M=a(()=>w.availableVoices[x]||[]);u(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)}),f([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(e,r)=>(d(),s(h(l),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":p(()=>[c(h(n),{modelValue:A.value,"onUpdate:modelValue":r[0]||=e=>A.value=e,label:h(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:h(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":p(()=>[o(`div`,b,[c(h(t),{modelValue:D.value,"onUpdate:modelValue":r[1]||=e=>D.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:h(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`]),c(h(t),{modelValue:O.value,"onUpdate:modelValue":r[2]||=e=>O.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),c(h(t),{modelValue:k.value,"onUpdate:modelValue":r[3]||=e=>k.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:h(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:p(()=>[c(h(g),{"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{A as e,cO as t,cR as n,d$ as r,d9 as i,dV as a,dW as o,dX as s,e as c,e0 as l,e6 as u,e8 as d,ef as f,eg as p,ej as m,en as h,f as g,v as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=l({__name:`microsoft-speech`,setup(l){let{t:y}=e(),C={pitch:0,speed:1,volume:0},w=_(),T=v(),{providers:E}=i(T),D=m(0),O=m(1),k=m(0),A=a({get:()=>E.value[x]?.region,set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=a(()=>!!E.value[x]?.apiKey),M=a(()=>w.availableVoices[x]||[]);u(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)}),f([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(e,i)=>(d(),s(h(c),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":p(()=>[r(h(n),{modelValue:A.value,"onUpdate:modelValue":i[0]||=e=>A.value=e,label:h(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:h(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":p(()=>[o(`div`,b,[r(h(t),{modelValue:D.value,"onUpdate:modelValue":i[1]||=e=>D.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:h(y)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(h(t),{modelValue:O.value,"onUpdate:modelValue":i[2]||=e=>O.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(h(t),{modelValue:k.value,"onUpdate:modelValue":i[3]||=e=>k.value=e,label:h(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:h(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:p(()=>[r(h(g),{"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-D4NFd2lk.js b/assets/mistral-ai-DHDVQ-H_.js similarity index 55% rename from assets/mistral-ai-D4NFd2lk.js rename to assets/mistral-ai-DHDVQ-H_.js index 7edf816c999ee1401f2ab40fb3f72123468ca41c..9c061d311d8774a54cb865fc262c65b06e906ebf 100644 --- a/assets/mistral-ai-D4NFd2lk.js +++ b/assets/mistral-ai-DHDVQ-H_.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`mistral-ai`;var x=t({__name:`mistral-ai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`mistral-ai`;var x=o({__name:`mistral-ai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`mis-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-BkGZGThV.js b/assets/models-BkGZGThV.js new file mode 100644 index 0000000000000000000000000000000000000000..ac8a52594b1689cd252c01b119ba1fdf24fda2d6 --- /dev/null +++ b/assets/models-BkGZGThV.js @@ -0,0 +1 @@ +import{A as e,b as t,cD as n,cE as r,cF as i,cI as a,cO as o,cS as s,cU as c,cj as l,cq as u,cs as d,cx as f,cy as p,d$ as m,d9 as h,dP as g,dT as _,dV as v,dW as y,dX as b,dY as x,dZ as S,d_ as C,dg as w,dj as T,e0 as E,e8 as D,e9 as O,ec as k,ef as A,eg as j,eh as M,ei as N,ej as P,en as F,eo as I,er as L,ew as R,n as z,o as B,q as V,r as H}from"./index-BIGBQG2E.js";import{b as U}from"./browser-bFm1l1qg.js";import{b as W}from"./route-block-gWR0cCIm.js";import{c as G,g as K,h as q}from"./Scenes-D3-lazzf.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";import{b as J}from"./IconAnimation-D-qvmNIz.js";import{b as Y}from"./icon-animation-zitz9bVj.js";var X=R(q()),Z=R(H());const Q={flex:``,"items-center":``,"gap-2":``},$={"font-medium":``,"font-mono":``},ee={flex:``,"gap-2":``},te=[`onUpdate:modelValue`],ne=[`href`,`download`],re={flex:``,"items-center":``},ie={flex:``,"items-center":``},ae={flex:``,"items-center":``};var oe=E({__name:`Live2D`,props:{palette:{}},emits:[`extractColorsFromModel`,`switchToVRM`],setup(n){let{t:r}=e(),i=w({accept:`application/zip`}),a=B(),{live2dDisableFocus:d}=h(a),v=V(),{modelFile:E,motionMap:k,loadingModel:R,availableMotions:z,modelUrl:H,currentMotion:U,scale:W,position:G}=h(v),K=P(H.value);i.onChange(e=>{e&&e.length>0&&(k.value={},E.value=e[0],R.value=!0)}),A(R,e=>{e||E.value&&z.value.forEach(e=>{e.motionName in f?k.value[e.fileName]=e.motionName:k.value[e.fileName]=p})});async function q(e,t){if(!Object.keys(t).length)return e;let n=new X.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 J(){let e=await Z.default.getItem(`live2dModel`);if(!e)return;let t=await q(e,k.value);E.value=t,R.value=!0}let Y=T(E);return(e,n)=>(D(),S(_,null,[m(F(u),{title:F(r)(`settings.live2d.switch-to-vrm.title`),icon:`i-solar:magic-stick-3-bold-duotone`,class:I([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:j(()=>[m(F(l),{variant:`secondary`,onClick:n[0]||=t=>e.$emit(`switchToVRM`)},{default:j(()=>[C(L(F(r)(`settings.live2d.switch-to-vrm.change-to-vrm`)),1)]),_:1})]),_:1},8,[`title`]),m(F(u),{title:F(r)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:I([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:j(()=>[m(F(l),{variant:`secondary`,onClick:n[1]||=e=>F(i).open()},{default:j(()=>[C(L(F(r)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),y(`div`,Q,[m(F(s),{modelValue:K.value,"onUpdate:modelValue":n[2]||=e=>K.value=e,disabled:F(R),class:`flex-1`,placeholder:F(r)(`settings.live2d.change-model.from-url-placeholder`)},null,8,[`modelValue`,`disabled`,`placeholder`]),m(F(l),{size:`sm`,variant:`secondary`,onClick:n[3]||=e=>H.value=K.value},{default:j(()=>[C(L(F(r)(`settings.live2d.change-model.from-url`)),1)]),_:1})])]),_:1},8,[`title`]),m(F(u),{title:F(r)(`settings.live2d.theme-color-from-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:I([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:j(()=>[m(F(t),{class:`mb-4 mt-2`,colors:e.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),m(F(l),{variant:`secondary`,onClick:n[4]||=t=>e.$emit(`extractColorsFromModel`)},{default:j(()=>[C(L(F(r)(`settings.live2d.theme-color-from-model.button-extract.title`)),1)]),_:1})]),_:1},8,[`title`]),F(E)?(D(),b(F(u),{key:0,title:F(r)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`,class:I([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:j(()=>[(D(!0),S(_,null,O(F(z),e=>(D(),S(`div`,{key:e.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[y(`span`,$,L(e.fileName),1),y(`div`,ee,[M(y(`select`,{"onUpdate:modelValue":t=>F(k)[e.fileName]=t},[(D(!0),S(_,null,O(Object.keys(F(f)),e=>(D(),S(`option`,{key:e},L(e),1))),128))],8,te),[[g,F(k)[e.fileName]]]),m(F(l),{class:`form-control`,onClick:t=>U.value={group:e.motionName,index:e.motionIndex}},{default:j(()=>n[12]||=[C(` Play `,-1)]),_:2,__:[12]},1032,[`onClick`])])]))),128)),m(F(l),{onClick:J},{default:j(()=>n[13]||=[C(` Save and patch `,-1)]),_:1,__:[13]}),y(`a`,{"mt-2":``,block:``,href:F(Y),download:`${F(E)?.name||`live2d`}-motion-edited.zip`},[m(F(l),{"w-full":``},{default:j(()=>n[14]||=[C(`Export`,-1)]),_:1,__:[14]})],8,ne)]),_:1},8,[`title`])):x(``,!0),m(F(u),{title:F(r)(`settings.live2d.scale-and-position.title`),icon:`i-solar:scale-bold-duotone`,class:I([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:j(()=>[m(F(o),{modelValue:F(W),"onUpdate:modelValue":n[6]||=e=>N(W)?W.value=e:null,as:`div`,min:.5,max:2,step:.01,label:F(r)(`settings.live2d.scale-and-position.scale`)},{label:j(()=>[y(`div`,re,[y(`div`,null,L(F(r)(`settings.live2d.scale-and-position.scale`)),1),y(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:n[5]||=()=>W.value=1},n[15]||=[y(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),m(F(o),{modelValue:F(G).x,"onUpdate:modelValue":n[8]||=e=>F(G).x=e,as:`div`,min:-100,max:100,step:1,label:F(r)(`settings.live2d.scale-and-position.x`)},{label:j(()=>[y(`div`,ie,[y(`div`,null,L(F(r)(`settings.live2d.scale-and-position.x`)),1),y(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:n[7]||=()=>F(G).x=0},n[16]||=[y(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),m(F(o),{modelValue:F(G).y,"onUpdate:modelValue":n[10]||=e=>F(G).y=e,as:`div`,min:-100,max:100,step:1,label:F(r)(`settings.live2d.scale-and-position.y`)},{label:j(()=>[y(`div`,ae,[y(`div`,null,L(F(r)(`settings.live2d.scale-and-position.y`)),1),y(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:n[9]||=()=>F(G).y=0},n[17]||=[y(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`])]),_:1},8,[`title`]),m(F(u),{title:F(r)(`settings.live2d.focus.title`),icon:`i-solar:eye-scan-bold-duotone`,class:I([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:j(()=>[m(F(c),{modelValue:F(d),"onUpdate:modelValue":n[11]||=e=>N(d)?d.value=e:null,label:F(r)(`settings.live2d.focus.button-disable.title`)},null,8,[`modelValue`,`label`])]),_:1},8,[`title`])],64))}}),se=oe;const ce={grid:`~ cols-5 gap-1`,"p-2":``},le={class:`text-xs`},ue={flex:``,"items-center":``,"gap-2":``},de={class:`text-sm text-neutral-600 space-y-1`},fe={class:`flex justify-between`},pe={class:`flex justify-between`},me={class:`flex justify-between`},he={class:`text-sm text-neutral-600 space-y-1`};var ge=E({__name:`VRM`,props:{palette:{}},emits:[`extractColorsFromModel`,`switchToLive2D`],setup(o){let{t:c}=e(),u=w({accept:`.vrm`}),f=z(),{modelFile:p,modelUrl:g,modelSize:x,modelOffset:E,cameraFOV:k,modelRotationY:A,cameraDistance:M,trackingMode:P,directionalLightPosition:R,directionalLightTarget:B,directionalLightRotation:V,directionalLightIntensity:H,directionalLightColor:U,ambientLightIntensity:W,ambientLightColor:G,hemisphereLightPosition:K,hemisphereLightIntensity:q,hemisphereSkyColor:J,hemisphereGroundColor:Y}=h(f),X=v(()=>[{value:`camera`,label:c(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.camera`),class:`col-start-3`},{value:`mouse`,label:c(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.mouse`),class:`col-start-4`},{value:`none`,label:c(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.disabled`),class:`col-start-5`}]);u.onChange(e=>{e&&e.length>0&&(p.value=e[0])});let Z=T(p),Q=v({get:()=>Z.value||g.value||``,set:e=>{g.value=e}});function $(){let e=new URL(Q.value,`https://example.com`);e.origin===`https://example.com`&&(g.value=Q.value)}return(e,o)=>(D(),S(_,null,[m(F(a),{title:F(c)(`settings.pages.models.sections.section.scene`),icon:`i-solar:people-nearby-bold-duotone`,class:I([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:j(()=>[m(F(l),{variant:`secondary`,size:`sm`,onClick:o[0]||=t=>e.$emit(`switchToLive2D`)},{default:j(()=>[C(L(F(c)(`settings.vrm.switch-to-vrm.change-to-vrm`)),1)]),_:1}),m(F(t),{class:`mb-4 mt-2`,colors:e.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),m(F(l),{variant:`secondary`,onClick:o[1]||=t=>e.$emit(`extractColorsFromModel`)},{default:j(()=>[C(L(F(c)(`settings.vrm.theme-color-from-model.button-extract.title`)),1)]),_:1}),y(`div`,ce,[m(F(n),{x:F(E).x,"onUpdate:x":o[2]||=e=>F(E).x=e,y:F(E).y,"onUpdate:y":o[3]||=e=>F(E).y=e,z:F(E).z,"onUpdate:z":o[4]||=e=>F(E).z=e,label:`Model Position`,"x-config":{min:-F(x).x*2,max:F(x).x*2,step:F(x).x/100,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{min:-F(x).y*2,max:F(x).y*2,step:F(x).y/100,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{min:-F(x).z*2,max:F(x).z*2,step:F(x).z/100,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),m(F(r),{modelValue:F(k),"onUpdate:modelValue":o[5]||=e=>N(k)?k.value=e:null,config:{min:1,max:180,step:1,label:F(c)(`settings.vrm.scale-and-position.fov`)},label:F(c)(`settings.vrm.scale-and-position.fov`)},null,8,[`modelValue`,`config`,`label`]),m(F(r),{modelValue:F(M),"onUpdate:modelValue":o[6]||=e=>N(M)?M.value=e:null,config:{min:F(x).z,max:F(x).z*20,step:F(x).z/100,label:F(c)(`settings.vrm.scale-and-position.camera-distance`),formatValue:e=>e?.toFixed(4)},label:F(c)(`settings.vrm.scale-and-position.camera-distance`)},null,8,[`modelValue`,`config`,`label`]),m(F(r),{modelValue:F(A),"onUpdate:modelValue":o[7]||=e=>N(A)?A.value=e:null,config:{min:-180,max:180,step:1,label:F(c)(`settings.vrm.scale-and-position.rotation-y`)},label:F(c)(`settings.vrm.scale-and-position.rotation-y`)},null,8,[`modelValue`,`config`,`label`]),y(`div`,le,L(F(c)(`settings.vrm.scale-and-position.eye-tracking-mode.title`))+`: `,1),o[29]||=y(`div`,null,null,-1),(D(!0),S(_,null,O(X.value,e=>(D(),b(F(l),{key:e.value,class:I([e.class,`w-auto`]),size:`sm`,variant:F(P)===e.value?`primary`:`secondary`,label:e.label,onClick:t=>P.value=e.value},null,8,[`class`,`variant`,`label`,`onClick`]))),128)),m(F(n),{x:F(R).x,"onUpdate:x":o[8]||=e=>F(R).x=e,y:F(R).y,"onUpdate:y":o[9]||=e=>F(R).y=e,z:F(R).z,"onUpdate:z":o[10]||=e=>F(R).z=e,label:`Directional Light Position`,"x-config":{step:.001,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{step:.001,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{step:.001,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),m(F(n),{x:F(B).x,"onUpdate:x":o[11]||=e=>F(B).x=e,y:F(B).y,"onUpdate:y":o[12]||=e=>F(B).y=e,z:F(B).z,"onUpdate:z":o[13]||=e=>F(B).z=e,label:`Directional Light Target`,"x-config":{step:.001,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{step:.001,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{step:.001,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),m(F(n),{x:F(V).x,"onUpdate:x":o[14]||=e=>F(V).x=e,y:F(V).y,"onUpdate:y":o[15]||=e=>F(V).y=e,z:F(V).z,"onUpdate:z":o[16]||=e=>F(V).z=e,label:`Directional Light Rotation`,"x-config":{step:.001,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{step:.001,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{step:.001,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),m(F(i),{modelValue:F(U),"onUpdate:modelValue":o[17]||=e=>N(U)?U.value=e:null,label:`Directional Light Color`},null,8,[`modelValue`]),m(F(r),{modelValue:F(H),"onUpdate:modelValue":o[18]||=e=>N(H)?H.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Directional Light Intensity`},null,8,[`modelValue`]),m(F(r),{modelValue:F(W),"onUpdate:modelValue":o[19]||=e=>N(W)?W.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Ambient Light Intensity`},null,8,[`modelValue`]),m(F(i),{modelValue:F(G),"onUpdate:modelValue":o[20]||=e=>N(G)?G.value=e:null,label:`Ambient Light Color`},null,8,[`modelValue`]),m(F(n),{x:F(K).x,"onUpdate:x":o[21]||=e=>F(K).x=e,y:F(K).y,"onUpdate:y":o[22]||=e=>F(K).y=e,z:F(K).z,"onUpdate:z":o[23]||=e=>F(K).z=e,label:`Hemisphere Light Position`,"x-config":{step:.001,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{step:.001,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{step:.001,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),m(F(r),{modelValue:F(q),"onUpdate:modelValue":o[24]||=e=>N(q)?q.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Hemisphere Light Intensity`},null,8,[`modelValue`]),m(F(i),{modelValue:F(J),"onUpdate:modelValue":o[25]||=e=>N(J)?J.value=e:null,label:`Hemisphere Sky Color`},null,8,[`modelValue`]),m(F(i),{modelValue:F(Y),"onUpdate:modelValue":o[26]||=e=>N(Y)?Y.value=e:null,label:`Hemisphere Ground Color`},null,8,[`modelValue`])])]),_:1},8,[`title`]),m(F(a),{title:F(c)(`settings.vrm.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:I([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:j(()=>[m(F(l),{variant:`secondary`,onClick:o[27]||=()=>{F(u).reset(),F(u).open()}},{default:j(()=>[C(L(F(c)(`settings.vrm.change-model.from-file`))+`... `,1)]),_:1}),y(`div`,ue,[m(F(s),{modelValue:Q.value,"onUpdate:modelValue":o[28]||=e=>Q.value=e,class:`flex-1`,placeholder:F(c)(`settings.vrm.change-model.from-url-placeholder`)},null,8,[`modelValue`,`placeholder`]),m(F(l),{size:`sm`,variant:`secondary`,onClick:$},{default:j(()=>[C(L(F(c)(`settings.vrm.change-model.from-url`)),1)]),_:1})]),m(F(d),{label:F(c)(`settings.vrm.scale-and-position.model-info-title`)},{default:j(()=>[y(`div`,null,[y(`div`,de,[y(`div`,fe,[y(`span`,null,L(F(c)(`settings.vrm.scale-and-position.model-info-x`)),1),y(`span`,null,L(F(x).x.toFixed(4)),1)]),y(`div`,pe,[y(`span`,null,L(F(c)(`settings.vrm.scale-and-position.model-info-y`)),1),y(`span`,null,L(F(x).y.toFixed(4)),1)]),y(`div`,me,[y(`span`,null,L(F(c)(`settings.vrm.scale-and-position.model-info-z`)),1),y(`span`,null,L(F(x).z.toFixed(4)),1)])])])]),_:1},8,[`label`]),m(F(d),{theme:`lime`,label:`Tips!`},{default:j(()=>[y(`div`,he,L(F(c)(`settings.vrm.scale-and-position.tips`)),1)]),_:1})]),_:1},8,[`title`])],64))}}),_e=ge;const ve={"h-full":``,"w-full":``,"p-2":``};var ye=E({__name:`index`,props:{palette:{},live2dSceneClass:{},live2dSettingsClass:{},vrmSceneClass:{},vrmSettingsClass:{}},emits:[`extractColorsFromModel`],setup(e){let t=e,{stageView:n}=h(B()),{modelFile:r,modelUrl:i}=h(V()),{modelFile:a,modelUrl:o}=h(z());return(e,s)=>(D(),S(_,null,[F(n)===`2d`?(D(),S(_,{key:0},[y(`div`,{class:I([...t.live2dSceneClass?typeof t.live2dSceneClass==`string`?[t.live2dSceneClass]:t.live2dSceneClass:[]])},[m(K,{"model-src":F(i),"model-file":F(r)},null,8,[`model-src`,`model-file`])],2),y(`div`,{flex:`~ col gap-2`,class:I([...t.live2dSettingsClass?typeof t.live2dSettingsClass==`string`?[t.live2dSettingsClass]:t.live2dSettingsClass:[]])},[m(se,{palette:e.palette,onExtractColorsFromModel:s[0]||=t=>e.$emit(`extractColorsFromModel`),onSwitchToVRM:s[1]||=e=>n.value=`3d`},null,8,[`palette`])],2)],64)):x(``,!0),F(n)===`3d`?(D(),S(_,{key:1},[y(`div`,{class:I([...t.vrmSceneClass?typeof t.vrmSceneClass==`string`?[t.vrmSceneClass]:t.vrmSceneClass:[]])},[m(G,{"model-src":F(o),"model-file":F(a)},null,8,[`model-src`,`model-file`])],2),y(`div`,ve,[y(`div`,{flex:`~ col gap-2`,class:I([...t.vrmSettingsClass?typeof t.vrmSettingsClass==`string`?[t.vrmSettingsClass]:t.vrmSettingsClass:[]])},[m(_e,{palette:e.palette,onExtractColorsFromModel:s[2]||=t=>e.$emit(`extractColorsFromModel`),onSwitchToLive2D:s[3]||=e=>n.value=`2d`},null,8,[`palette`])],2)])],64)):x(``,!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 Ce=E({__name:`index`,setup(e){let t=P(),n=P([]);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 U(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}=Y(`i-solar:people-nearby-bold-duotone`);return(e,t)=>{let s=k(`motion`);return D(),S(_,null,[y(`div`,xe,[m(F(be),{"live-2d-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,"live-2d-settings-class":`w-100% md:w-40% lg:w-40% 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-40% lg:w-40% xl:w-25% 2xl:w-30% h-fit sm:max-h-80dvh overflow-y-scroll relative`,palette:n.value,onExtractColorsFromModel:r},null,8,[`palette`])]),F(a)?(D(),b(J,{key:0,"z-index":-1,icon:F(o),"icon-size":12,duration:1e3,started:F(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`])):M((D(),S(`div`,Se,t[0]||=[y(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[s]])],64)}}});typeof W==`function`&&W(Ce);var we=Ce;export{we as default}; \ No newline at end of file diff --git a/assets/models-DGVWZaRr.js b/assets/models-DGVWZaRr.js deleted file mode 100644 index e90192b66040453e186138216d7da81965dbf3aa..0000000000000000000000000000000000000000 --- a/assets/models-DGVWZaRr.js +++ /dev/null @@ -1 +0,0 @@ -import{A as e,b as t,cF as n,cG as r,cH as i,cN as a,cR as o,cT as s,cj as c,cq as l,cs as u,cx as d,cy as f,d$ as p,d8 as m,dO as h,dS as g,dU as _,dV as v,dW as y,dX as b,dY as x,dZ as S,d_ as C,df as w,di as T,e7 as E,e8 as D,eb as O,ee as k,ef as A,eg as j,eh as M,ei as N,em as P,en as F,eq as I,ev as L,n as R,o as z,q as B,r as V}from"./index-B9WIljdS.js";import{b as H}from"./browser-bFm1l1qg.js";import{b as U}from"./route-block-gWR0cCIm.js";import{c as W,g as G,h as K}from"./Scenes-uCDQqCpn.js";import"./import-url-browser-D0zVIqhu.js";import"./duckdb-mvp-P5KShsBk.js";import{b as q}from"./IconAnimation-BeiZddFw.js";import{b as J}from"./icon-animation-BVIg_nVx.js";var ee=L(K()),te=L(V());const ne={flex:``,"items-center":``,"gap-2":``},Y={"font-medium":``,"font-mono":``},X={flex:``,"gap-2":``},re=[`onUpdate:modelValue`],ie=[`href`,`download`],ae={flex:``,"items-center":``},oe={flex:``,"items-center":``},se={flex:``,"items-center":``};var Z=p({__name:`Live2D`,props:{palette:{}},emits:[`extractColorsFromModel`,`switchToVRM`],setup(n){let{t:r}=e(),i=w({accept:`application/zip`}),u=z(),{live2dDisableFocus:p}=m(u),_=B(),{modelFile:O,motionMap:L,loadingModel:R,availableMotions:V,modelUrl:H,currentMotion:U,scale:W,position:G}=m(_),K=N(H.value);i.onChange(e=>{e&&e.length>0&&(L.value={},O.value=e[0],R.value=!0)}),k(R,e=>{e||O.value&&V.value.forEach(e=>{e.motionName in d?L.value[e.fileName]=e.motionName:L.value[e.fileName]=f})});async function q(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 J(){let e=await te.default.getItem(`live2dModel`);if(!e)return;let t=await q(e,L.value);O.value=t,R.value=!0}let Z=T(O);return(e,n)=>(E(),x(g,null,[C(P(l),{title:P(r)(`settings.live2d.switch-to-vrm.title`),icon:`i-solar:magic-stick-3-bold-duotone`,class:F([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:A(()=>[C(P(c),{variant:`secondary`,onClick:n[0]||=t=>e.$emit(`switchToVRM`)},{default:A(()=>[S(I(P(r)(`settings.live2d.switch-to-vrm.change-to-vrm`)),1)]),_:1})]),_:1},8,[`title`]),C(P(l),{title:P(r)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:F([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:A(()=>[C(P(c),{variant:`secondary`,onClick:n[1]||=e=>P(i).open()},{default:A(()=>[S(I(P(r)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),v(`div`,ne,[C(P(o),{modelValue:K.value,"onUpdate:modelValue":n[2]||=e=>K.value=e,disabled:P(R),class:`flex-1`,placeholder:P(r)(`settings.live2d.change-model.from-url-placeholder`)},null,8,[`modelValue`,`disabled`,`placeholder`]),C(P(c),{size:`sm`,variant:`secondary`,onClick:n[3]||=e=>H.value=K.value},{default:A(()=>[S(I(P(r)(`settings.live2d.change-model.from-url`)),1)]),_:1})])]),_:1},8,[`title`]),C(P(l),{title:P(r)(`settings.live2d.theme-color-from-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:F([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:A(()=>[C(P(t),{class:`mb-4 mt-2`,colors:e.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),C(P(c),{variant:`secondary`,onClick:n[4]||=t=>e.$emit(`extractColorsFromModel`)},{default:A(()=>[S(I(P(r)(`settings.live2d.theme-color-from-model.button-extract.title`)),1)]),_:1})]),_:1},8,[`title`]),P(O)?(E(),y(P(l),{key:0,title:P(r)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`,class:F([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:A(()=>[(E(!0),x(g,null,D(P(V),e=>(E(),x(`div`,{key:e.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[v(`span`,Y,I(e.fileName),1),v(`div`,X,[j(v(`select`,{"onUpdate:modelValue":t=>P(L)[e.fileName]=t},[(E(!0),x(g,null,D(Object.keys(P(d)),e=>(E(),x(`option`,{key:e},I(e),1))),128))],8,re),[[h,P(L)[e.fileName]]]),C(P(c),{class:`form-control`,onClick:t=>U.value={group:e.motionName,index:e.motionIndex}},{default:A(()=>n[12]||=[S(` Play `,-1)]),_:2,__:[12]},1032,[`onClick`])])]))),128)),C(P(c),{onClick:J},{default:A(()=>n[13]||=[S(` Save and patch `,-1)]),_:1,__:[13]}),v(`a`,{"mt-2":``,block:``,href:P(Z),download:`${P(O)?.name||`live2d`}-motion-edited.zip`},[C(P(c),{"w-full":``},{default:A(()=>n[14]||=[S(`Export`,-1)]),_:1,__:[14]})],8,ie)]),_:1},8,[`title`])):b(``,!0),C(P(l),{title:P(r)(`settings.live2d.scale-and-position.title`),icon:`i-solar:scale-bold-duotone`,class:F([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:A(()=>[C(P(a),{modelValue:P(W),"onUpdate:modelValue":n[6]||=e=>M(W)?W.value=e:null,as:`div`,min:.5,max:2,step:.01,label:P(r)(`settings.live2d.scale-and-position.scale`)},{label:A(()=>[v(`div`,ae,[v(`div`,null,I(P(r)(`settings.live2d.scale-and-position.scale`)),1),v(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:n[5]||=()=>W.value=1},n[15]||=[v(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),C(P(a),{modelValue:P(G).x,"onUpdate:modelValue":n[8]||=e=>P(G).x=e,as:`div`,min:-100,max:100,step:1,label:P(r)(`settings.live2d.scale-and-position.x`)},{label:A(()=>[v(`div`,oe,[v(`div`,null,I(P(r)(`settings.live2d.scale-and-position.x`)),1),v(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:n[7]||=()=>P(G).x=0},n[16]||=[v(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`]),C(P(a),{modelValue:P(G).y,"onUpdate:modelValue":n[10]||=e=>P(G).y=e,as:`div`,min:-100,max:100,step:1,label:P(r)(`settings.live2d.scale-and-position.y`)},{label:A(()=>[v(`div`,se,[v(`div`,null,I(P(r)(`settings.live2d.scale-and-position.y`)),1),v(`button`,{"px-2":``,"text-xs":``,"outline-none":``,title:`Reset value to default`,onClick:n[9]||=()=>P(G).y=0},n[17]||=[v(`div`,{"i-solar:forward-linear":``,"transform-scale-x--100":``,text:`neutral-500 dark:neutral-400`},null,-1)])])]),_:1},8,[`modelValue`,`label`])]),_:1},8,[`title`]),C(P(l),{title:P(r)(`settings.live2d.focus.title`),icon:`i-solar:eye-scan-bold-duotone`,class:F([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:A(()=>[C(P(s),{modelValue:P(p),"onUpdate:modelValue":n[11]||=e=>M(p)?p.value=e:null,label:P(r)(`settings.live2d.focus.button-disable.title`)},null,8,[`modelValue`,`label`])]),_:1},8,[`title`])],64))}}),ce=Z;const le={grid:`~ cols-5 gap-1`,"p-2":``},ue={class:`col-span-2 col-start-1 row-start-6 self-center text-xs`},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 _e=p({__name:`VRM`,props:{palette:{}},emits:[`extractColorsFromModel`,`switchToLive2D`],setup(a){let{t:s}=e(),l=w({accept:`.vrm`}),d=R(),{modelFile:f,modelUrl:p,modelSize:h,modelOffset:b,cameraFOV:O,modelRotationY:k,cameraDistance:j,trackingMode:N,directionalLightPosition:L,directionalLightTarget:z,directionalLightRotation:B,directionalLightIntensity:V,ambientLightIntensity:H,hemisphereLightPosition:U,hemisphereLightIntensity:W}=m(d),G=_(()=>[{value:`camera`,label:s(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.camera`),class:`col-start-3`},{value:`mouse`,label:s(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.mouse`),class:`col-start-4`},{value:`none`,label:s(`settings.vrm.scale-and-position.eye-tracking-mode.options.option.disabled`),class:`col-start-5`}]);l.onChange(e=>{e&&e.length>0&&(f.value=e[0])});let K=T(f),q=_({get:()=>K.value||p.value||``,set:e=>{p.value=e}});function J(){let e=new URL(q.value,`https://example.com`);e.origin===`https://example.com`&&(p.value=q.value)}return(e,a)=>(E(),x(g,null,[C(P(i),{title:P(s)(`settings.pages.models.sections.section.scene`),icon:`i-solar:people-nearby-bold-duotone`,class:F([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:A(()=>[C(P(c),{variant:`secondary`,size:`sm`,onClick:a[0]||=t=>e.$emit(`switchToLive2D`)},{default:A(()=>[S(I(P(s)(`settings.vrm.switch-to-vrm.change-to-vrm`)),1)]),_:1}),C(P(t),{class:`mb-4 mt-2`,colors:e.palette.map(e=>({hex:e,name:e})),"mx-auto":``},null,8,[`colors`]),C(P(c),{variant:`secondary`,onClick:a[1]||=t=>e.$emit(`extractColorsFromModel`)},{default:A(()=>[S(I(P(s)(`settings.vrm.theme-color-from-model.button-extract.title`)),1)]),_:1}),v(`div`,le,[C(P(n),{x:P(b).x,"onUpdate:x":a[2]||=e=>P(b).x=e,y:P(b).y,"onUpdate:y":a[3]||=e=>P(b).y=e,z:P(b).z,"onUpdate:z":a[4]||=e=>P(b).z=e,label:`Model Position`,"x-config":{min:-P(h).x*2,max:P(h).x*2,step:P(h).x/100,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{min:-P(h).y*2,max:P(h).y*2,step:P(h).y/100,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{min:-P(h).z*2,max:P(h).z*2,step:P(h).z/100,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),C(P(r),{modelValue:P(O),"onUpdate:modelValue":a[5]||=e=>M(O)?O.value=e:null,config:{min:1,max:180,step:1,label:P(s)(`settings.vrm.scale-and-position.fov`)},label:P(s)(`settings.vrm.scale-and-position.fov`)},null,8,[`modelValue`,`config`,`label`]),C(P(r),{modelValue:P(j),"onUpdate:modelValue":a[6]||=e=>M(j)?j.value=e:null,config:{min:P(h).z,max:P(h).z*20,step:P(h).z/100,label:P(s)(`settings.vrm.scale-and-position.camera-distance`),formatValue:e=>e?.toFixed(4)},label:P(s)(`settings.vrm.scale-and-position.camera-distance`)},null,8,[`modelValue`,`config`,`label`]),C(P(r),{modelValue:P(k),"onUpdate:modelValue":a[7]||=e=>M(k)?k.value=e:null,config:{min:-180,max:180,step:1,label:P(s)(`settings.vrm.scale-and-position.rotation-y`)},label:P(s)(`settings.vrm.scale-and-position.rotation-y`)},null,8,[`modelValue`,`config`,`label`]),v(`span`,ue,I(P(s)(`settings.vrm.scale-and-position.eye-tracking-mode.title`))+`: `,1),(E(!0),x(g,null,D(G.value,e=>(E(),y(P(c),{key:e.value,class:F([e.class,`row-start-6 w-auto`]),size:`sm`,variant:P(N)===e.value?`primary`:`secondary`,label:e.label,onClick:t=>N.value=e.value},null,8,[`class`,`variant`,`label`,`onClick`]))),128)),C(P(n),{x:P(L).x,"onUpdate:x":a[8]||=e=>P(L).x=e,y:P(L).y,"onUpdate:y":a[9]||=e=>P(L).y=e,z:P(L).z,"onUpdate:z":a[10]||=e=>P(L).z=e,label:`Directional Light Position`,"x-config":{step:.001,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{step:.001,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{step:.001,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),C(P(n),{x:P(z).x,"onUpdate:x":a[11]||=e=>P(z).x=e,y:P(z).y,"onUpdate:y":a[12]||=e=>P(z).y=e,z:P(z).z,"onUpdate:z":a[13]||=e=>P(z).z=e,label:`Directional Light Target`,"x-config":{step:.001,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{step:.001,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{step:.001,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),C(P(n),{x:P(B).x,"onUpdate:x":a[14]||=e=>P(B).x=e,y:P(B).y,"onUpdate:y":a[15]||=e=>P(B).y=e,z:P(B).z,"onUpdate:z":a[16]||=e=>P(B).z=e,label:`Directional Light Rotation`,"x-config":{step:.001,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{step:.001,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{step:.001,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),C(P(r),{modelValue:P(V),"onUpdate:modelValue":a[17]||=e=>M(V)?V.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Directional Light Intensity`},null,8,[`modelValue`]),C(P(r),{modelValue:P(H),"onUpdate:modelValue":a[18]||=e=>M(H)?H.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Ambient Light Intensity`},null,8,[`modelValue`]),C(P(n),{x:P(U).x,"onUpdate:x":a[19]||=e=>P(U).x=e,y:P(U).y,"onUpdate:y":a[20]||=e=>P(U).y=e,z:P(U).z,"onUpdate:z":a[21]||=e=>P(U).z=e,label:`Hemisphere Light Position`,"x-config":{step:.001,label:`X`,formatValue:e=>e?.toFixed(4)},"y-config":{step:.001,label:`Y`,formatValue:e=>e?.toFixed(4)},"z-config":{step:.001,label:`Z`,formatValue:e=>e?.toFixed(4)}},null,8,[`x`,`y`,`z`,`x-config`,`y-config`,`z-config`]),C(P(r),{modelValue:P(W),"onUpdate:modelValue":a[22]||=e=>M(W)?W.value=e:null,config:{min:0,max:10,step:.01,label:`Intensity`},label:`Hemisphere Light Intensity`},null,8,[`modelValue`])])]),_:1},8,[`title`]),C(P(i),{title:P(s)(`settings.vrm.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`,class:F([`rounded-xl`,`bg-white/80 dark:bg-black/75`,`backdrop-blur-lg`])},{default:A(()=>[C(P(c),{variant:`secondary`,onClick:a[23]||=()=>{P(l).reset(),P(l).open()}},{default:A(()=>[S(I(P(s)(`settings.vrm.change-model.from-file`))+`... `,1)]),_:1}),v(`div`,de,[C(P(o),{modelValue:q.value,"onUpdate:modelValue":a[24]||=e=>q.value=e,class:`flex-1`,placeholder:P(s)(`settings.vrm.change-model.from-url-placeholder`)},null,8,[`modelValue`,`placeholder`]),C(P(c),{size:`sm`,variant:`secondary`,onClick:J},{default:A(()=>[S(I(P(s)(`settings.vrm.change-model.from-url`)),1)]),_:1})]),C(P(u),{label:P(s)(`settings.vrm.scale-and-position.model-info-title`)},{default:A(()=>[v(`div`,null,[v(`div`,fe,[v(`div`,pe,[v(`span`,null,I(P(s)(`settings.vrm.scale-and-position.model-info-x`)),1),v(`span`,null,I(P(h).x.toFixed(4)),1)]),v(`div`,me,[v(`span`,null,I(P(s)(`settings.vrm.scale-and-position.model-info-y`)),1),v(`span`,null,I(P(h).y.toFixed(4)),1)]),v(`div`,he,[v(`span`,null,I(P(s)(`settings.vrm.scale-and-position.model-info-z`)),1),v(`span`,null,I(P(h).z.toFixed(4)),1)])])])]),_:1},8,[`label`]),C(P(u),{theme:`lime`,label:`Tips!`},{default:A(()=>[v(`div`,ge,I(P(s)(`settings.vrm.scale-and-position.tips`)),1)]),_:1})]),_:1},8,[`title`])],64))}}),Q=_e;const ve={"h-full":``,"w-full":``,"p-2":``};var ye=p({__name:`index`,props:{palette:{},live2dSceneClass:{},live2dSettingsClass:{},vrmSceneClass:{},vrmSettingsClass:{}},emits:[`extractColorsFromModel`],setup(e){let t=e,{stageView:n}=m(z()),{modelFile:r,modelUrl:i}=m(B()),{modelFile:a,modelUrl:o}=m(R());return(e,s)=>(E(),x(g,null,[P(n)===`2d`?(E(),x(g,{key:0},[v(`div`,{class:F([...t.live2dSceneClass?typeof t.live2dSceneClass==`string`?[t.live2dSceneClass]:t.live2dSceneClass:[]])},[C(G,{"model-src":P(i),"model-file":P(r)},null,8,[`model-src`,`model-file`])],2),v(`div`,{flex:`~ col gap-2`,class:F([...t.live2dSettingsClass?typeof t.live2dSettingsClass==`string`?[t.live2dSettingsClass]:t.live2dSettingsClass:[]])},[C(ce,{palette:e.palette,onExtractColorsFromModel:s[0]||=t=>e.$emit(`extractColorsFromModel`),onSwitchToVRM:s[1]||=e=>n.value=`3d`},null,8,[`palette`])],2)],64)):b(``,!0),P(n)===`3d`?(E(),x(g,{key:1},[v(`div`,{class:F([...t.vrmSceneClass?typeof t.vrmSceneClass==`string`?[t.vrmSceneClass]:t.vrmSceneClass:[]])},[C(W,{"model-src":P(o),"model-file":P(a)},null,8,[`model-src`,`model-file`])],2),v(`div`,ve,[v(`div`,{flex:`~ col gap-2`,class:F([...t.vrmSettingsClass?typeof t.vrmSettingsClass==`string`?[t.vrmSettingsClass]:t.vrmSettingsClass:[]])},[C(Q,{palette:e.palette,onExtractColorsFromModel:s[2]||=t=>e.$emit(`extractColorsFromModel`),onSwitchToLive2D:s[3]||=e=>n.value=`2d`},null,8,[`palette`])],2)])],64)):b(``,!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 $=p({__name:`index`,setup(e){let t=N(),n=N([]);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 H(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=O(`motion`);return E(),x(g,null,[v(`div`,xe,[C(P(be),{"live-2d-scene-class":`absolute max-h-[calc(100dvh-100px-56px)] w-full h-full`,"live-2d-settings-class":`w-100% md:w-40% lg:w-40% 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-40% lg:w-40% xl:w-25% 2xl:w-30% h-fit sm:max-h-80dvh overflow-y-scroll relative`,palette:n.value,onExtractColorsFromModel:r},null,8,[`palette`])]),P(a)?(E(),y(q,{key:0,"z-index":-1,icon:P(o),"icon-size":12,duration:1e3,started:P(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`])):j((E(),x(`div`,Se,t[0]||=[v(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[s]])],64)}}});typeof U==`function`&&U($);var Ce=$;export{Ce as default}; \ No newline at end of file diff --git a/assets/modules-D1uvB1yJ.js b/assets/modules-BE14UNWX.js similarity index 77% rename from assets/modules-D1uvB1yJ.js rename to assets/modules-BE14UNWX.js index 503c9da67ee5edf66ba1fe8a8c4d9370ca6a1726..82a08fe70efc918463d17a5dbea4eb6282119c9a 100644 --- a/assets/modules-D1uvB1yJ.js +++ b/assets/modules-BE14UNWX.js @@ -1 +1 @@ -import{A as e,co as t,d$ as n,dS as r,dU as i,dV as a,dW as o,dY as s,e7 as c,e8 as l,eb as u,eg as d,em as f,v as p,x as m}from"./index-B9WIljdS.js";import{b as h}from"./route-block-gWR0cCIm.js";import{b as g}from"./IconAnimation-BeiZddFw.js";import{b as _}from"./icon-animation-BVIg_nVx.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=n({__name:`index`,setup(n){let{t:h}=e(),b=i(()=>[{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:m().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:p().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(e,n)=>{let i=u(`motion`);return c(),s(r,null,[a(`div`,v,[(c(!0),s(r,null,l(b.value,(e,n)=>d((c(),o(f(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:e.name,description:e.description,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:e.to,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[i]])),128))]),f(S)?(c(),o(g,{key:0,icon:f(C),"icon-size":12,duration:1e3,started:f(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`])):d((c(),s(`div`,y,n[0]||=[a(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[i]])],64)}}});typeof h==`function`&&h(b);var x=b;export{x as default}; \ No newline at end of file +import{A as e,co as t,dT as n,dV as r,dW as i,dX as a,dZ as o,e0 as s,e8 as c,e9 as l,ec as u,eh as d,en as f,v as p,x as m}from"./index-BIGBQG2E.js";import{b as h}from"./route-block-gWR0cCIm.js";import{b as g}from"./IconAnimation-D-qvmNIz.js";import{b as _}from"./icon-animation-zitz9bVj.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=s({__name:`index`,setup(s){let{t:h}=e(),b=r(()=>[{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:m().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:p().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(e,r)=>{let s=u(`motion`);return c(),o(n,null,[i(`div`,v,[(c(!0),o(n,null,l(b.value,(e,n)=>d((c(),a(f(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:e.name,description:e.description,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:e.to,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[s]])),128))]),f(S)?(c(),a(g,{key:0,icon:f(C),"icon-size":12,duration:1e3,started:f(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`])):d((c(),o(`div`,y,r[0]||=[i(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[s]])],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-O9H_anWy.js b/assets/moonshot-ai-DUyvYdYh.js similarity index 54% rename from assets/moonshot-ai-O9H_anWy.js rename to assets/moonshot-ai-DUyvYdYh.js index 5b30b53fde67d1f4ea94ea6a8f4cc929c5cf9184..c1061f8dde45bd3ddc0ce88de22695e566f20821 100644 --- a/assets/moonshot-ai-O9H_anWy.js +++ b/assets/moonshot-ai-DUyvYdYh.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`moonshot-ai`;var x=t({__name:`moonshot-ai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`moonshot-ai`;var x=o({__name:`moonshot-ai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`ms-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-D3qcyZ3I.js b/assets/novita-ai-D-caW35N.js similarity index 55% rename from assets/novita-ai-D3qcyZ3I.js rename to assets/novita-ai-D-caW35N.js index c85ff4d7b4e3fac4beeefdcfb74f51f948c2af3b..5ee6eef4cf0cf47d445b2dd548420cad327df782 100644 --- a/assets/novita-ai-D3qcyZ3I.js +++ b/assets/novita-ai-D-caW35N.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`novita-ai`;var x=t({__name:`novita-ai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`novita-ai`;var x=o({__name:`novita-ai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`nvt-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-CYoWD53x.js b/assets/ollama-4wbi0n-k.js similarity index 65% rename from assets/ollama-CYoWD53x.js rename to assets/ollama-4wbi0n-k.js index fa8d472dbd3caa8815a87944dd6193b8f1397424..d0813af5fdec701530119ab62146bff9611bdaa4 100644 --- a/assets/ollama-CYoWD53x.js +++ b/assets/ollama-4wbi0n-k.js @@ -1 +1 @@ -import{A as e,cP as t,d$ as n,d6 as r,d8 as i,dU as a,dW as o,d_ as s,e5 as c,e7 as l,ee as u,ef as d,ei as f,em as p,g as m,h,i as g,j as _,l as v,y}from"./index-B9WIljdS.js";import{b}from"./route-block-gWR0cCIm.js";const x=`ollama`;var S=n({__name:`ollama`,setup(n){let{t:b}=e(),S=r(),C=y(),{providers:w}=i(C),T=a(()=>C.getProviderMetadata(x)),E=a({get:()=>w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});c(()=>{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=f([{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 u(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(e,n)=>(l(),o(p(m),{"provider-name":T.value?.localizedName,"provider-icon":T.value?.icon,"on-back":()=>p(S).back()},{default:d(()=>[s(p(h),null,{default:d(()=>[s(p(g),{title:p(b)(`settings.pages.providers.common.section.basic.title`),description:p(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[s(p(_),{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`]),s(p(v),{title:p(b)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[s(p(t),{modelValue:O.value,"onUpdate:modelValue":n[1]||=e=>O.value=e,label:p(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:p(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":p(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":p(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{A as e,cQ as t,d$ as n,d7 as r,d9 as i,dV as a,dX as o,e0 as s,e6 as c,e8 as l,ef as u,eg as d,ej as f,en as p,g as m,h,i as g,j as _,l as v,y}from"./index-BIGBQG2E.js";import{b}from"./route-block-gWR0cCIm.js";const x=`ollama`;var S=s({__name:`ollama`,setup(s){let{t:b}=e(),S=r(),C=y(),{providers:w}=i(C),T=a(()=>C.getProviderMetadata(x)),E=a({get:()=>w.value[x]?.baseUrl||T.value?.defaultOptions?.().baseUrl||``,set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});c(()=>{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=f([{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 u(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(e,r)=>(l(),o(p(m),{"provider-name":T.value?.localizedName,"provider-icon":T.value?.icon,"on-back":()=>p(S).back()},{default:d(()=>[n(p(h),null,{default:d(()=>[n(p(g),{title:p(b)(`settings.pages.providers.common.section.basic.title`),description:p(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>[n(p(_),{modelValue:E.value,"onUpdate:modelValue":r[0]||=e=>E.value=e,placeholder:T.value?.defaultOptions?.().baseUrl||``,required:``},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`title`,`description`]),n(p(v),{title:p(b)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(p(t),{modelValue:O.value,"onUpdate:modelValue":r[1]||=e=>O.value=e,label:p(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:p(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":p(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":p(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:r[2]||=(e,t)=>k(O.value,e,t),onRemove:r[3]||=e=>A(e,O.value)},null,8,[`modelValue`,`label`,`description`,`key-placeholder`,`value-placeholder`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`]))}});typeof b==`function`&&b(S);var C=S;export{C as default}; \ No newline at end of file diff --git a/assets/openai-BaDAnGRp.js b/assets/openai-BDPnuQYk.js similarity index 58% rename from assets/openai-BaDAnGRp.js rename to assets/openai-BDPnuQYk.js index 825613fcd1822c42138d8897c57a93baeceabbb2..8dd4e4f45ce35a34eadbef8d760025c5983b2ddf 100644 --- a/assets/openai-BaDAnGRp.js +++ b/assets/openai-BDPnuQYk.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`openai`;var x=t({__name:`openai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{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/`}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`openai`;var x=o({__name:`openai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||`https://api.openai.com/v1/`,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{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/`}),l([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,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName||`OpenAI`,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-BlXe47o4.js b/assets/openai-audio-speech-DDIxYC90.js similarity index 58% rename from assets/openai-audio-speech-BlXe47o4.js rename to assets/openai-audio-speech-DDIxYC90.js index 4d4723c500d7d7c762e161d060d31663739c5cf7..53023f35b2019a3b8d9f889e50c2374a1f43c8c2 100644 --- a/assets/openai-audio-speech-BlXe47o4.js +++ b/assets/openai-audio-speech-DDIxYC90.js @@ -1 +1 @@ -import{A as e,cN as t,d$ as n,d8 as r,dU as i,dW as a,d_ as o,e as s,e7 as c,ee as l,ef as u,ei as d,em as f,f as p,v as m,y as h}from"./index-B9WIljdS.js";import{b as g}from"./route-block-gWR0cCIm.js";const _=`openai-audio-speech`,v=`gpt-4o-mini-tts`;var y=n({__name:`openai-audio-speech`,setup(n){let g=m(),y=h(),{providers:b}=r(y),{t:x}=e(),S={speed:1},C=d(1),w=i(()=>!!b.value[_]?.apiKey),T=i(()=>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 l(C,async()=>{let e=y.getProviderConfig(_);e.speed=C.value}),(e,n)=>(c(),a(f(s),{"provider-id":_,"default-model":v,"additional-settings":S},{"voice-settings":u(()=>[o(f(t),{modelValue:C.value,"onUpdate:modelValue":n[0]||=e=>C.value=e,label:f(x)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:f(x)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:u(()=>[o(f(p),{"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{A as e,cO as t,d$ as n,d9 as r,dV as i,dX as a,e as o,e0 as s,e8 as c,ef as l,eg as u,ej as d,en as f,f as p,v as m,y as h}from"./index-BIGBQG2E.js";import{b as g}from"./route-block-gWR0cCIm.js";const _=`openai-audio-speech`,v=`gpt-4o-mini-tts`;var y=s({__name:`openai-audio-speech`,setup(s){let g=m(),y=h(),{providers:b}=r(y),{t:x}=e(),S={speed:1},C=d(1),w=i(()=>!!b.value[_]?.apiKey),T=i(()=>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 l(C,async()=>{let e=y.getProviderConfig(_);e.speed=C.value}),(e,r)=>(c(),a(f(o),{"provider-id":_,"default-model":v,"additional-settings":S},{"voice-settings":u(()=>[n(f(t),{modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,label:f(x)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:f(x)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:u(()=>[n(f(p),{"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-DRVPjEZB.js b/assets/openai-audio-transcription-CbLHW9aC.js similarity index 51% rename from assets/openai-audio-transcription-DRVPjEZB.js rename to assets/openai-audio-transcription-CbLHW9aC.js index 29c6a447a5b5cecb3c2a79b95e6000862b0be5d2..d2b1c69b7f73f3a6effff2cba57ce52e53ae1dc2 100644 --- a/assets/openai-audio-transcription-DRVPjEZB.js +++ b/assets/openai-audio-transcription-CbLHW9aC.js @@ -1 +1 @@ -import{c as e,d as t,d$ as n,d8 as r,dU as i,dW as a,d_ as o,e7 as s,ef as c,em as l,t as u,y as d}from"./index-B9WIljdS.js";import{b as f}from"./route-block-gWR0cCIm.js";const p=`openai-audio-transcription`,m=`whisper-1`;var h=n({__name:`openai-audio-transcription`,setup(n){let f=u(),h=d(),{providers:g}=r(h),_=i(()=>!!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(),a(l(e),{"provider-id":p,"default-model":m},{playground:c(()=>[o(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,d$ as n,d9 as r,dV as i,dX as a,e0 as o,e8 as s,eg as c,en as l,t as u,y as d}from"./index-BIGBQG2E.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}=r(h),_=i(()=>!!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(r,i)=>(s(),a(l(e),{"provider-id":p,"default-model":m},{playground:c(()=>[n(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-DIsInNVt.js b/assets/openrouter-ai-Bp9JI8pa.js similarity index 61% rename from assets/openrouter-ai-DIsInNVt.js rename to assets/openrouter-ai-Bp9JI8pa.js index d97f7e8efe78ddaba10908ac64570558145d53c7..a827e48c0ab50335788520c6f1514fc3f447a548 100644 --- a/assets/openrouter-ai-DIsInNVt.js +++ b/assets/openrouter-ai-Bp9JI8pa.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`openrouter-ai`;var x=t({__name:`openrouter-ai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`openrouter-ai`;var x=o({__name:`openrouter-ai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||w.value?.defaultOptions?.().baseUrl||``}),l([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,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`sk-or-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-ClYhdjun.js b/assets/pages-ClYhdjun.js deleted file mode 100644 index d029a85527697b9e75c06fd3145861b8c2e8ee8f..0000000000000000000000000000000000000000 --- a/assets/pages-ClYhdjun.js +++ /dev/null @@ -1 +0,0 @@ -import"./Basic-BfTEEIor.js";import{b as e,d as t}from"./theme-color-DKGyNM2w.js";import{d$ as n,d8 as r,d9 as i,dV as a,dW as o,dX as s,d_ as c,da as l,dc as u,dh as d,e5 as f,e7 as p,ee as m,ef as h,ei as g,em as _,q as v}from"./index-B9WIljdS.js";import"./HeaderLink-Dp-qWbnF.js";import{b as y}from"./route-block-gWR0cCIm.js";import{b}from"./Scenes-uCDQqCpn.js";import{b as x,c as S,d as C,e as w,f as T,g as E}from"./AnimatedWave-Bw1I6g_s.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/pages-m4rd-W8R.js b/assets/pages-m4rd-W8R.js new file mode 100644 index 0000000000000000000000000000000000000000..c802c24e160ebe0dc6185c72f01a12c958b1d7e4 --- /dev/null +++ b/assets/pages-m4rd-W8R.js @@ -0,0 +1 @@ +import"./Basic-BgQfJAar.js";import{b as e,d as t}from"./theme-color-BIFWobsZ.js";import{d$ as n,d9 as r,dW as i,dX as a,dY as o,da as s,db as c,dd as l,di as u,e0 as d,e6 as f,e8 as p,ef as m,eg as h,ej as g,en as _,q as v}from"./index-BIGBQG2E.js";import"./HeaderLink-q8Ont_Aw.js";import{b as y}from"./route-block-gWR0cCIm.js";import{b}from"./Scenes-D3-lazzf.js";import{b as x,c as S,d as C,e as w,f as T,g as E}from"./AnimatedWave-Cojz6rq7.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(),a(E,null,{default:h(()=>[n(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(()=>[i(`div`,D,[i(`div`,O,[n(T,{class:`hidden md:flex`}),n(C,{class:`flex md:hidden`})]),i(`div`,k,[n(_(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)?o(``,!0):(p(),a(w,{key:0,h:`85dvh`,absolute:``,"right-4":``,flex:``,"flex-1":``,"flex-col":``,"max-w":`500px`,"min-w":`30%`})),_(L)?(p(),a(S,{key:1,onSettingsOpen:j})):o(``,!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-f1-XYGPE.js b/assets/plain-BFyN07HS.js similarity index 63% rename from assets/plain-f1-XYGPE.js rename to assets/plain-BFyN07HS.js index d19aa6efea56775ceb8247623a2123c16bfe0acc..876a0bdcb998d0362d6180401f5be8ae2a01358e 100644 --- a/assets/plain-f1-XYGPE.js +++ b/assets/plain-BFyN07HS.js @@ -1 +1 @@ -import{cO as e,dW as t,e7 as n,ea as r}from"./index-B9WIljdS.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{cP as e,dX as t,e8 as n,eb as r}from"./index-BIGBQG2E.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-C1AHVzFC.js b/assets/player2--doz6X0m.js similarity index 59% rename from assets/player2-C1AHVzFC.js rename to assets/player2--doz6X0m.js index 796cdc8005407d1d784584c747b25ec0a7d40e1f..0b261427329c155454b5586f3986f24abfc88ee2 100644 --- a/assets/player2-C1AHVzFC.js +++ b/assets/player2--doz6X0m.js @@ -1 +1 @@ -import{A as e,cs as t,d$ as n,d6 as r,d8 as i,dS as a,dU as o,dV as s,dX as c,dY as l,dZ as u,d_ as d,e5 as f,e7 as p,ee as m,ef as h,ei as g,em as _,g as v,h as y,i as b,j as x,y as S}from"./index-B9WIljdS.js";import{b as C}from"./route-block-gWR0cCIm.js";const w={key:0,"mb-1":``},T=`player2`;var E=n({__name:`player2`,setup(n){let{t:C}=e(),E=r(),D=S(),{providers:O}=i(D),k=o(()=>D.getProviderMetadata(T)),A=o({get:()=>O.value[T]?.baseUrl||``,set:e=>{O.value[T]||(O.value[T]={}),O.value[T].baseUrl=e}}),j=g(!0);f(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}}),m([A],()=>{O.value[T]={...O.value[T],baseUrl:A.value||``}});function M(){O.value[T]={...k.value?.defaultOptions}}return(e,n)=>(p(),l(a,null,[j.value?c(``,!0):(p(),l(`div`,w,[d(_(t),{theme:`orange`},{label:h(()=>n[1]||=[u(` Player 2 is not running `,-1)]),default:h(()=>[n[2]||=s(`div`,null,[u(` Please download and run the Player2 App: `),s(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),s(`div`,null,[u(` After downloading, if you still are having trouble, please reach out to us on Discord: `),s(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),u(`. `)])],-1)]),_:1,__:[2]})])),d(_(v),{"provider-name":k.value?.localizedName,"provider-icon":k.value?.icon,"on-back":()=>_(E).back()},{default:h(()=>[d(_(y),null,{default:h(()=>[d(_(b),{title:_(C)(`settings.pages.providers.common.section.basic.title`),description:_(C)(`settings.pages.providers.common.section.basic.description`),"on-reset":M},{default:h(()=>[d(_(x),{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{A as e,cs as t,d$ as n,d7 as r,d9 as i,dT as a,dV as o,dW as s,dY as c,dZ as l,d_ as u,e0 as d,e6 as f,e8 as p,ef as m,eg as h,ej as g,en as _,g as v,h as y,i as b,j as x,y as S}from"./index-BIGBQG2E.js";import{b as C}from"./route-block-gWR0cCIm.js";const w={key:0,"mb-1":``},T=`player2`;var E=d({__name:`player2`,setup(d){let{t:C}=e(),E=r(),D=S(),{providers:O}=i(D),k=o(()=>D.getProviderMetadata(T)),A=o({get:()=>O.value[T]?.baseUrl||``,set:e=>{O.value[T]||(O.value[T]={}),O.value[T].baseUrl=e}}),j=g(!0);f(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}}),m([A],()=>{O.value[T]={...O.value[T],baseUrl:A.value||``}});function M(){O.value[T]={...k.value?.defaultOptions}}return(e,r)=>(p(),l(a,null,[j.value?c(``,!0):(p(),l(`div`,w,[n(_(t),{theme:`orange`},{label:h(()=>r[1]||=[u(` Player 2 is not running `,-1)]),default:h(()=>[r[2]||=s(`div`,null,[u(` Please download and run the Player2 App: `),s(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),s(`div`,null,[u(` After downloading, if you still are having trouble, please reach out to us on Discord: `),s(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),u(`. `)])],-1)]),_:1,__:[2]})])),n(_(v),{"provider-name":k.value?.localizedName,"provider-icon":k.value?.icon,"on-back":()=>_(E).back()},{default:h(()=>[n(_(y),null,{default:h(()=>[n(_(b),{title:_(C)(`settings.pages.providers.common.section.basic.title`),description:_(C)(`settings.pages.providers.common.section.basic.description`),"on-reset":M},{default:h(()=>[n(_(x),{modelValue:A.value,"onUpdate:modelValue":r[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-bqrel8Cy.js b/assets/player2-speech-Cf4MI4jv.js similarity index 66% rename from assets/player2-speech-bqrel8Cy.js rename to assets/player2-speech-Cf4MI4jv.js index a3a6a558dd56196c9fcdb8975c25e6ea4c19a75c..1c45b5e5f744efbdf3d04c2825accd1d31c00bf0 100644 --- a/assets/player2-speech-bqrel8Cy.js +++ b/assets/player2-speech-Cf4MI4jv.js @@ -1 +1 @@ -import{A as e,cN as t,cs as n,d$ as r,dS as i,dU as a,dV as o,dX as s,dY as c,dZ as l,d_ as u,e as d,e5 as f,e7 as p,ee as m,ef as h,ei as g,em as _,f as v,v as y,y as b}from"./index-B9WIljdS.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=r({__name:`player2-speech`,setup(r){let x=g(1),T=y(),E=b(),{t:D}=e(),O=a(()=>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=g(!0);return f(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}}),m(x,async()=>{let e=E.getProviderConfig(C);e.speed=x.value}),(e,r)=>(p(),c(i,null,[A.value?s(``,!0):(p(),c(`div`,S,[u(_(n),{theme:`orange`},{label:h(()=>r[1]||=[l(` Player 2 is not running `,-1)]),default:h(()=>[r[2]||=o(`div`,null,[l(` Please download and run the Player2 App: `),o(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),o(`div`,null,[l(` After downloading, if you still are having trouble, please reach out to us on Discord: `),o(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),l(`. `)])],-1)]),_:1,__:[2]})])),u(_(d),{"provider-id":C,"default-model":w},{"voice-settings":h(()=>[u(_(t),{modelValue:x.value,"onUpdate:modelValue":r[0]||=e=>x.value=e,label:_(D)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:_(D)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:h(()=>[u(_(v),{"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{A as e,cO as t,cs as n,d$ as r,dT as i,dV as a,dW as o,dY as s,dZ as c,d_ as l,e as u,e0 as d,e6 as f,e8 as p,ef as m,eg as h,ej as g,en as _,f as v,v as y,y as b}from"./index-BIGBQG2E.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=d({__name:`player2-speech`,setup(d){let x=g(1),T=y(),E=b(),{t:D}=e(),O=a(()=>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=g(!0);return f(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}}),m(x,async()=>{let e=E.getProviderConfig(C);e.speed=x.value}),(e,a)=>(p(),c(i,null,[A.value?s(``,!0):(p(),c(`div`,S,[r(_(n),{theme:`orange`},{label:h(()=>a[1]||=[l(` Player 2 is not running `,-1)]),default:h(()=>[a[2]||=o(`div`,null,[l(` Please download and run the Player2 App: `),o(`a`,{href:`https://player2.game`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game `),o(`div`,null,[l(` After downloading, if you still are having trouble, please reach out to us on Discord: `),o(`a`,{href:`https://player2.game/discord`,target:`_blank`,rel:`noopener noreferrer`},` https://player2.game/discord `),l(`. `)])],-1)]),_:1,__:[2]})])),r(_(u),{"provider-id":C,"default-model":w},{"voice-settings":h(()=>[r(_(t),{modelValue:x.value,"onUpdate:modelValue":a[0]||=e=>x.value=e,label:_(D)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:_(D)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:5,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:h(()=>[r(_(v),{"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-Ctap1RD7.js b/assets/polaroid-jY86CfCa.js similarity index 63% rename from assets/polaroid-Ctap1RD7.js rename to assets/polaroid-jY86CfCa.js index fc55d1ee24a070dc3e6d650d9801a01cfc2f53c4..9415f2d1c631de972863ad3af3e9ad20b8b5ecc3 100644 --- a/assets/polaroid-Ctap1RD7.js +++ b/assets/polaroid-jY86CfCa.js @@ -1 +1 @@ -import{ch as e,d$ as t,dO as n,dS as r,dV as i,dY as a,d_ as o,e7 as s,e8 as c,ee as l,ef as u,eg as d,ei as f,em as p,eq as m}from"./index-B9WIljdS.js";import{i as h,j as g}from"./Scenes-uCDQqCpn.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=t({__name:`polaroid`,setup(t){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(t,l)=>(s(),a(`div`,_,[i(`div`,v,[o(p(e),{relative:``,"min-h-70dvh":``},{default:u(({width:e,height:t})=>[o(p(g),{ref_key:`live2dCanvasRef`,ref:b,width:e,height:t,resolution:3,"rounded-full":``},{default:u(({app:n})=>[o(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})]),i(`div`,null,[d(i(`select`,{"onUpdate:modelValue":l[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:l[1]||=e=>T(S.value)},[(s(!0),a(r,null,c(C.value,e=>(s(),a(`option`,{key:e.motionIndex,value:e.motionName},m(e.fileName),9,y))),128))],544),[[n,S.value]])]),i(`div`,{border:`2px solid black dark:white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[i(`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{ch as e,d$ as t,dP as n,dT as r,dW as i,dZ as a,e0 as o,e8 as s,e9 as c,ef as l,eg as u,eh as d,ej as f,en as p,er as m}from"./index-BIGBQG2E.js";import{i as h,j as g}from"./Scenes-D3-lazzf.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(),a(`div`,_,[i(`div`,v,[t(p(e),{relative:``,"min-h-70dvh":``},{default:u(({width:e,height:n})=>[t(p(g),{ref_key:`live2dCanvasRef`,ref:b,width:e,height:n,resolution:3,"rounded-full":``},{default:u(({app:r})=>[t(p(h),{ref_key:`live2dModelRef`,ref:x,app:r,width:e,height:n,"focus-at":{x:e/2,y:n/2},onModelLoaded:E},null,8,[`app`,`width`,`height`,`focus-at`])]),_:2},1032,[`width`,`height`])]),_:1})]),i(`div`,null,[d(i(`select`,{"onUpdate:modelValue":l[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:l[1]||=e=>T(S.value)},[(s(!0),a(r,null,c(C.value,e=>(s(),a(`option`,{key:e.motionIndex,value:e.motionName},m(e.fileName),9,y))),128))],544),[[n,S.value]])]),i(`div`,{border:`2px solid black dark:white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[i(`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-DlCWpqGP.js b/assets/providers-C2VzTNwI.js similarity index 79% rename from assets/providers-DlCWpqGP.js rename to assets/providers-C2VzTNwI.js index 3dc872e15a99f89f63977f3bc7287ecc4812d7bc..f3d85ca7b47828535320986d46f0c607af126919 100644 --- a/assets/providers-DlCWpqGP.js +++ b/assets/providers-C2VzTNwI.js @@ -1 +1 @@ -import{A as e,co as t,d$ as n,d8 as r,dS as i,dV as a,dW as o,dY as s,d_ as c,e7 as l,e8 as u,ea as d,eb as f,ef as p,eg as m,em as h,eq as g,y as _}from"./index-B9WIljdS.js";import{b as v}from"./route-block-gWR0cCIm.js";import{b as y}from"./IconAnimation-BeiZddFw.js";import{b}from"./icon-animation-BVIg_nVx.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=n({__name:`index`,setup(n){let{t:v}=e(),F=_(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=r(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(e,n)=>{let r=d(`i18n-t`),_=f(`motion`);return l(),s(i,null,[a(`div`,x,[a(`div`,S,[a(`div`,C,g(e.$t(`settings.pages.providers.helpinfo.title`)),1),a(`div`,w,[c(r,{keypath:`settings.pages.providers.helpinfo.description`},{chat:p(()=>n[0]||=[a(`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`},[a(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),a(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),a(`div`,T,[n[2]||=a(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),a(`div`,null,[a(`div`,null,[a(`span`,E,g(h(v)(`settings.pages.providers.explained.chat`)),1)]),n[1]||=a(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[a(`div`,null,` Chat `)],-1)])]),a(`div`,D,[(l(!0),s(i,null,u(h(I),(e,n)=>m((l(),o(h(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))]),a(`div`,O,[n[4]||=a(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),a(`div`,null,[a(`div`,null,[a(`span`,k,g(h(v)(`settings.pages.providers.explained.Speech`)),1)]),n[3]||=a(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[a(`div`,null,` Speech `)],-1)])]),a(`div`,A,[(l(!0),s(i,null,u(h(L),(e,n)=>m((l(),o(h(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(h(I).length+n)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))]),a(`div`,j,[n[6]||=a(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),a(`div`,null,[a(`div`,null,[a(`span`,M,g(h(v)(`settings.pages.providers.explained.Transcription`)),1)]),n[5]||=a(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[a(`div`,null,` Transcription `)],-1)])]),a(`div`,N,[(l(!0),s(i,null,u(h(R),(e,n)=>m((l(),o(h(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(h(I).length+h(L).length+n)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))])]),h(B)?(l(),o(y,{key:0,"z-index":-1,icon:h(V),"icon-size":12,duration:1e3,started:h(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`])):m((l(),s(`div`,P,n[7]||=[a(`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{A as e,co as t,d$ as n,d9 as r,dT as i,dW as a,dX as o,dZ as s,e0 as c,e8 as l,e9 as u,eb as d,ec as f,eg as p,eh as m,en as h,er as g,y as _}from"./index-BIGBQG2E.js";import{b as v}from"./route-block-gWR0cCIm.js";import{b as y}from"./IconAnimation-D-qvmNIz.js";import{b}from"./icon-animation-zitz9bVj.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=c({__name:`index`,setup(c){let{t:v}=e(),F=_(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=r(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(e,r)=>{let c=d(`i18n-t`),_=f(`motion`);return l(),s(i,null,[a(`div`,x,[a(`div`,S,[a(`div`,C,g(e.$t(`settings.pages.providers.helpinfo.title`)),1),a(`div`,w,[n(c,{keypath:`settings.pages.providers.helpinfo.description`},{chat:p(()=>r[0]||=[a(`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`},[a(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),a(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),a(`div`,T,[r[2]||=a(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),a(`div`,null,[a(`div`,null,[a(`span`,E,g(h(v)(`settings.pages.providers.explained.chat`)),1)]),r[1]||=a(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[a(`div`,null,` Chat `)],-1)])]),a(`div`,D,[(l(!0),s(i,null,u(h(I),(e,n)=>m((l(),o(h(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:n*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))]),a(`div`,O,[r[4]||=a(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),a(`div`,null,[a(`div`,null,[a(`span`,k,g(h(v)(`settings.pages.providers.explained.Speech`)),1)]),r[3]||=a(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[a(`div`,null,` Speech `)],-1)])]),a(`div`,A,[(l(!0),s(i,null,u(h(L),(e,n)=>m((l(),o(h(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(h(I).length+n)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))]),a(`div`,j,[r[6]||=a(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),a(`div`,null,[a(`div`,null,[a(`span`,M,g(h(v)(`settings.pages.providers.explained.Transcription`)),1)]),r[5]||=a(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[a(`div`,null,` Transcription `)],-1)])]),a(`div`,N,[(l(!0),s(i,null,u(h(R),(e,n)=>m((l(),o(h(t),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+n*10,delay:(h(I).length+h(L).length+n)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[_]])),128))])]),h(B)?(l(),o(y,{key:0,"z-index":-1,icon:h(V),"icon-size":12,duration:1e3,started:h(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`])):m((l(),s(`div`,P,r[7]||=[a(`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-D-thhmwX.js b/assets/queue-DzSVSIxS.js similarity index 83% rename from assets/queue-D-thhmwX.js rename to assets/queue-DzSVSIxS.js index 2de999d7d3f8de608cdeaf01a4c808c3512c987d..7336aca7d0203e8f41d6711a3afd222f652c17de 100644 --- a/assets/queue-D-thhmwX.js +++ b/assets/queue-DzSVSIxS.js @@ -1 +1 @@ -import{c5 as e,ca as t,d$ as n,dV as r,dY as i,e5 as a,e7 as o,ei as s}from"./index-B9WIljdS.js";var c=n({__name:`queue`,setup(n){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(),i(`div`,null,t[0]||=[r(`div`,null,null,-1)]))}}),l=c;export{l as default}; \ No newline at end of file +import{c5 as e,ca as t,dW as n,dZ as r,e0 as i,e6 as a,e8 as o,ej as s}from"./index-BIGBQG2E.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-DtolI52J.js b/assets/scene-CRPN8LGX.js similarity index 71% rename from assets/scene-DtolI52J.js rename to assets/scene-CRPN8LGX.js index 49e7b95254d676badb009f4ceeeab50024f672f2..de6b4d87df5187ba1bba59936b8380dc055a34f1 100644 --- a/assets/scene-DtolI52J.js +++ b/assets/scene-CRPN8LGX.js @@ -1 +1 @@ -import{cs as e,d$ as t,dS as n,dV as r,dW as i,dY as a,dZ as o,d_ as s,e7 as c,eb as l,ef as u,eg as d,em as f}from"./index-B9WIljdS.js";import{b as p}from"./route-block-gWR0cCIm.js";import{b as m}from"./IconAnimation-BeiZddFw.js";import{b as h}from"./icon-animation-BVIg_nVx.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 _=t({__name:`index`,setup(t){let{iconAnimationStarted:p,showIconAnimation:_,animationIcon:v}=h(`i-solar:armchair-2-bold-duotone`);return(t,h)=>{let y=l(`motion`);return c(),a(n,null,[r(`div`,null,[s(f(e),{label:`In development, needs your help!`,theme:`orange`},{default:u(()=>h[0]||=[r(`div`,null,[o(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),r(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),o(`. The source code of this page is located at `),r(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/scene/index.vue`},`here`),o(`. `)],-1)]),_:1,__:[0]})]),f(_)?(c(),i(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(),a(`div`,g,h[1]||=[r(`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{cs as e,d$ as t,dT as n,dW as r,dX as i,dZ as a,d_ as o,e0 as s,e8 as c,ec as l,eg as u,eh as d,en as f}from"./index-BIGBQG2E.js";import{b as p}from"./route-block-gWR0cCIm.js";import{b as m}from"./IconAnimation-D-qvmNIz.js";import{b as h}from"./icon-animation-zitz9bVj.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(),a(n,null,[r(`div`,null,[t(f(e),{label:`In development, needs your help!`,theme:`orange`},{default:u(()=>h[0]||=[r(`div`,null,[o(` This functionality is still under development. If you have any suggestions or would like to contribute, please reach out to us on our `),r(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/issues`},`GitHub issues page`),o(`. The source code of this page is located at `),r(`a`,{underline:``,"decoration-dotted":``,href:`https://github.com/moeru-ai/airi/tree/main/apps/stage-web/src/pages/settings/scene/index.vue`},`here`),o(`. `)],-1)]),_:1,__:[0]})]),f(_)?(c(),i(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(),a(`div`,g,h[1]||=[r(`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-OjK1du8Y.js b/assets/settings-B1QJpBHt.js similarity index 73% rename from assets/settings-OjK1du8Y.js rename to assets/settings-B1QJpBHt.js index fc61f4772a48b365962049481be60a2616d55bad..58bd2c76ac730a4f85b2fedefb1683f0fa4a6d27 100644 --- a/assets/settings-OjK1du8Y.js +++ b/assets/settings-B1QJpBHt.js @@ -1 +1 @@ -import{A as e,cp as t,d$ as n,d6 as r,dS as i,dU as a,dV as o,dW as s,dY as c,e4 as l,e7 as u,e8 as d,eb as f,eg as p,ei as m,em as h,ep as g,o as _}from"./index-B9WIljdS.js";import{b as v}from"./route-block-gWR0cCIm.js";import{b as y}from"./IconAnimation-BeiZddFw.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=n({__name:`index`,setup(n){let v=r(),w=m(!1),T=m(),E=m(),{t:D}=e(),O=m(``),k=m(``),A=m(!1),j=_();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 l(),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=a(()=>[{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(e,n)=>{let r=f(`motion`);return u(),c(`div`,b,[n[0]||=o(`div`,null,null,-1),o(`div`,x,[(u(!0),c(i,null,d(F.value,(e,n)=>p((u(),s(h(t),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:g({transitionDelay:`${n*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:t=>N(t,e)},null,8,[`style`,`title`,`description`,`icon`,`to`,`onClick`])),[[r]])),128))]),A.value&&!h(j).disableTransitions&&h(j).usePageSpecificTransitions?(u(),s(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`])):p((u(),c(`div`,S,[p(o(`div`,C,null,512),[[r]])])),[[r]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file +import{A as e,cp as t,d7 as n,dT as r,dV as i,dW as a,dX as o,dZ as s,e0 as c,e5 as l,e8 as u,e9 as d,ec as f,eh as p,ej as m,en as h,eq as g,o as _}from"./index-BIGBQG2E.js";import{b as v}from"./route-block-gWR0cCIm.js";import{b as y}from"./IconAnimation-D-qvmNIz.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=c({__name:`index`,setup(c){let v=n(),w=m(!1),T=m(),E=m(),{t:D}=e(),O=m(``),k=m(``),A=m(!1),j=_();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 l(),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=i(()=>[{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(e,n)=>{let i=f(`motion`);return u(),s(`div`,b,[n[0]||=a(`div`,null,null,-1),a(`div`,x,[(u(!0),s(r,null,d(F.value,(e,n)=>p((u(),o(h(t),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:g({transitionDelay:`${n*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:t=>N(t,e)},null,8,[`style`,`title`,`description`,`icon`,`to`,`onClick`])),[[i]])),128))]),A.value&&!h(j).disableTransitions&&h(j).usePageSpecificTransitions?(u(),o(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`])):p((u(),s(`div`,S,[p(a(`div`,C,null,512),[[i]])])),[[i]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file diff --git a/assets/settings-Cc73OB2L.js b/assets/settings-BB0AtFTc.js similarity index 86% rename from assets/settings-Cc73OB2L.js rename to assets/settings-BB0AtFTc.js index 4308c5823f95af6c82da690da041f990f40e2674..3591b54ff135d80c3af2c0fafe012af42e3e5656 100644 --- a/assets/settings-Cc73OB2L.js +++ b/assets/settings-BB0AtFTc.js @@ -1 +1 @@ -import{c as e,d as t}from"./theme-color-DKGyNM2w.js";import{A as n,cr as r,d$ as i,d4 as a,d5 as o,d8 as s,dU as c,dV as l,dY as u,d_ as d,dc as f,e5 as p,e7 as m,ee as h,em as g,y as _}from"./index-B9WIljdS.js";import{b as v}from"./HeaderLink-Dp-qWbnF.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=i({__name:`settings`,setup(i){let S=o(),C=f(),{t:w}=n(),T=_(),{allProvidersMetadata:E}=s(T),D=c(()=>{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=c(()=>D.value[S.path]),{updateThemeColor:k}=t(e({light:`rgb(255 255 255)`,dark:`rgb(18 18 18)`}));return h(C,()=>k(),{immediate:!0}),h(S,()=>k(),{immediate:!0}),p(()=>k()),(e,t)=>(m(),u(`div`,y,[l(`div`,b,[d(v)]),l(`div`,x,[d(g(r),{title:O.value?.title,subtitle:O.value?.subtitle},null,8,[`title`,`subtitle`]),d(g(a))])]))}}),C=S;export{C as default}; \ No newline at end of file +import{c as e,d as t}from"./theme-color-BIFWobsZ.js";import{A as n,cr as r,d$ as i,d5 as a,d6 as o,d9 as s,dV as c,dW as l,dZ as u,dd as d,e0 as f,e6 as p,e8 as m,ef as h,en as g,y as _}from"./index-BIGBQG2E.js";import{b as v}from"./HeaderLink-q8Ont_Aw.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=f({__name:`settings`,setup(f){let S=o(),C=d(),{t:w}=n(),T=_(),{allProvidersMetadata:E}=s(T),D=c(()=>{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=c(()=>D.value[S.path]),{updateThemeColor:k}=t(e({light:`rgb(255 255 255)`,dark:`rgb(18 18 18)`}));return h(C,()=>k(),{immediate:!0}),h(S,()=>k(),{immediate:!0}),p(()=>k()),(e,t)=>(m(),u(`div`,y,[l(`div`,b,[i(v)]),l(`div`,x,[i(g(r),{title:O.value?.title,subtitle:O.value?.subtitle},null,8,[`title`,`subtitle`]),i(g(a))])]))}}),C=S;export{C as default}; \ No newline at end of file diff --git a/assets/speech-Abc_vh4w.js b/assets/speech-Abc_vh4w.js new file mode 100644 index 0000000000000000000000000000000000000000..c443b4ab812a04a053f1a5ff7ba7f5bd5dbe7192 --- /dev/null +++ b/assets/speech-Abc_vh4w.js @@ -0,0 +1 @@ +import"./Basic-BgQfJAar.js";import{b as e}from"./Textarea-rGc1yvjC.js";import{A as t,cB as n,cO as r,cR as ee,cT as i,cg as a,ci as o,ck as te,cl as ne,cm as re,cn as s,d$ as c,d4 as ie,d9 as l,dP as ae,dQ as oe,dT as u,dW as d,dX as f,dY as p,dZ as m,d_ as h,e0 as g,e6 as se,e7 as ce,e8 as _,e9 as le,ec as ue,ef as de,eg as v,eh as y,ei as b,ej as x,en as S,eo as fe,er as C,v as pe,w as me,y as he}from"./index-BIGBQG2E.js";import{b as w}from"./route-block-gWR0cCIm.js";const ge={flex:`~ col md:row gap-6`},_e={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%]`},ve={flex:`~ col gap-4`},ye={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},be={text:`neutral-400 dark:neutral-500`},xe={"max-w-full":``},Se={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},Ce={key:1},we={key:0},Te={flex:`~ col gap-4`},T={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:w}=t(),A=he(),j=pe(),{configuredSpeechProvidersMetadata:M}=l(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}=l(j),G=x(``),K=x(!1),q=x(`Hello, my name is AI Assistant`),J=x(``),Y=x(!1),X=x(``),Z=x(null),Q=x(``);se(async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)}),de(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 me({...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=``)}ce(()=>{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(t,l)=>{let g=ue(`motion`);return _(),m(u,null,[d(`div`,ge,[d(`div`,_e,[d(`div`,null,[d(`div`,ve,[d(`div`,null,[d(`h2`,ye,C(S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),d(`div`,be,[d(`span`,null,C(S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),d(`div`,xe,[S(M).length>0?(_(),m(`fieldset`,Se,[(_(!0),m(u,null,le(S(M),e=>(_(),f(S(ne),{id:e.id,key:e.id,modelValue:S(N),"onUpdate:modelValue":l[0]||=e=>b(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))])):(_(),m(`div`,Ce,[c(S(ie),{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:v(()=>l[13]||=[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 Speech Providers Configured`),d(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech 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,__:[13]})]))])]),d(`div`,null,[S(N)&&S(Ge)?(_(),m(`div`,we,[d(`div`,Te,[d(`div`,null,[d(`h2`,T,C(S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),d(`div`,E,[d(`span`,null,C(S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),S(z)?(_(),m(`div`,D,[l[14]||=d(`div`,{class:`mr-2 animate-spin`},[d(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),d(`span`,null,C(S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):S(B)?(_(),f(S(o),{key:1,title:S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`),error:S(B)},null,8,[`title`,`error`])):S(R).length===0&&!S(z)?(_(),f(S(s),{key:2,type:`warning`},{title:v(()=>[h(C(S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:v(()=>[h(C(S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):S(R).length>0?(_(),f(S(re),{key:3,modelValue:S(P),"onUpdate:modelValue":l[1]||=e=>b(P)?P.value=e:null,"search-query":S(V),"onUpdate:searchQuery":l[2]||=e=>b(V)?V.value=e:null,items:S(R),searchable:!0,"search-placeholder":S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:S(V)}),"search-results-text":S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":S(w)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":S(w)(`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`])):p(``,!0)])])):p(``,!0)])]),S(N)?(_(),m(`div`,O,[d(`div`,Ee,[l[24]||=d(`div`,null,[d(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),d(`div`,{text:`neutral-400 dark:neutral-500`},[d(`span`,null,`Customize how your AI assistant speaks`)])],-1),S(We)?(_(),m(`div`,De,[d(`div`,Oe,[c(S(a),{class:`w-full rounded-lg p-2.5 text-sm`},{default:v(()=>l[15]||=[d(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[15]}),d(`div`,ke,[c(S(a),{class:`w-full rounded-lg p-4 text-sm`},{default:v(()=>l[16]||=[d(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[16]}),c(S(a),{class:`w-full rounded-lg p-4 text-sm`},{default:v(()=>l[17]||=[d(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),c(S(a),{class:`w-full rounded-lg p-4 text-sm`},{default:v(()=>l[18]||=[d(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]})]),c(S(a),{class:`w-full rounded-lg p-3 text-sm`},{default:v(()=>l[19]||=[d(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]})])])):S(W)[S(N)]&&S(W)[S(N)].length>0?(_(),m(`div`,Ae,[c(S(te),{"search-query":G.value,"onUpdate:searchQuery":l[3]||=e=>G.value=e,"voice-id":S(I),"onUpdate:voiceId":l[4]||=e=>b(I)?I.value=e:null,voices:S(W)[S(N)]?.map(e=>({id:e.id,name:e.name,description:e.description,previewURL:e.previewURL,customizable:!1})),searchable:!0,"search-placeholder":S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder`),"search-no-results-title":S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices`),"search-no-results-description":S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description`),"search-results-text":S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results`,{count:0,total:0}),"custom-input-placeholder":S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder`),"expand-button-text":S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_more`),"collapse-button-text":S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_less`),"play-button-text":S(w)(`settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample`),"pause-button-text":S(w)(`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`])])):S(H)?(_(),f(S(o),{key:2,class:`mb-2`,title:`Error loading voices`,error:S(H)},null,8,[`error`])):(_(),f(S(s),{key:3,type:`warning`,icon:`i-solar:info-circle-line-duotone`,class:`mb-2`},{title:v(()=>l[20]||=[h(` No voices available `,-1)]),content:v(()=>l[21]||=[h(` No voices were found for this provider. You can enter a custom voice name below. `,-1)]),_:1})),d(`div`,je,[c(S(r),{modelValue:S(L),"onUpdate:modelValue":l[5]||=e=>b(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`]),c(S(i),{modelValue:S(U),"onUpdate:modelValue":l[6]||=e=>b(U)?U.value=e:null,label:`Enable SSML`,description:`Enable Speech Synthesis Markup Language for more control over speech output`},null,8,[`modelValue`])]),!S(W)[S(N)]||S(W)[S(N)].length===0?(_(),m(`div`,Me,[c(S(ee),{modelValue:S(I),"onUpdate:modelValue":l[7]||=e=>b(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`]),S(N)===`elevenlabs`?(_(),m(`div`,Ne,[l[23]||=d(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),y(d(`select`,{"onUpdate:modelValue":l[8]||=e=>b(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`},l[22]||=[d(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),d(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),d(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[ae,S(P)]])])):p(``,!0),d(`div`,Pe,[c(S(r),{modelValue:S(L),"onUpdate:modelValue":l[9]||=e=>b(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`])])])):p(``,!0)])])):p(``,!0)]),d(`div`,Fe,[d(`div`,Ie,[d(`h2`,Le,[d(`div`,Re,[c(S(n)),d(`div`,null,C(S(w)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),d(`div`,ze,[c(S(i),{modelValue:K.value,"onUpdate:modelValue":l[10]||=e=>K.value=e,label:`Use Custom SSML`,description:`Enable to input raw SSML instead of plain text`},null,8,[`modelValue`]),K.value?y((_(),m(`textarea`,{key:1,"onUpdate:modelValue":l[12]||=e=>J.value=e,placeholder:`Enter SSML text...`,border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-48":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"font-mono":``,"outline-none":``},null,512)),[[oe,J.value]]):(_(),f(S(e),{key:0,modelValue:q.value,"onUpdate:modelValue":l[11]||=e=>q.value=e,"h-24":``,"w-full":``,placeholder:S(w)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`)},null,8,[`modelValue`,`placeholder`])),d(`div`,Be,[d(`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()||!S(F),class:fe({"opacity-50 cursor-not-allowed":Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!S(F)}),bg:`neutral-700 dark:neutral-300`,onClick:Ke},[d(`div`,He,[l[25]||=d(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),d(`span`,null,C(Y.value?S(w)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):S(w)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,Ve),X.value?(_(),m(`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:$},l[26]||=[d(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[d(`div`,{"i-solar:stop-circle-bold-duotone":``}),d(`span`,null,`Stop`)],-1)])):p(``,!0)]),X.value?(_(),m(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,Ue)):p(``,!0)])])])]),y((_(),m(`div`,k,l[27]||=[d(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[g]])],64)}}});typeof w==`function`&&w(A);var j=A;export{j as default}; \ No newline at end of file diff --git a/assets/speech-_wcIRiZp.js b/assets/speech-_wcIRiZp.js deleted file mode 100644 index 8a67e5a07753dc878b61b5660f28359e21fddf04..0000000000000000000000000000000000000000 --- a/assets/speech-_wcIRiZp.js +++ /dev/null @@ -1 +0,0 @@ -import"./Basic-BfTEEIor.js";import{b as e}from"./Textarea-Q_8nrbKN.js";import{A as t,cD as n,cN as r,cQ as ee,cS as i,cg as a,ci as o,ck as te,cl as ne,cm as s,cn as c,d$ as l,d3 as re,d8 as u,dO as ie,dP as ae,dS as d,dV as f,dW as p,dX as m,dY as h,dZ as g,d_ as _,e5 as oe,e6 as se,e7 as v,e8 as ce,eb as le,ee as ue,ef as y,eg as b,eh as x,ei as S,em as C,en as de,eq as w,v as fe,w as pe,y as me}from"./index-B9WIljdS.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`},E={class:`text-lg md:text-2xl`},D={text:`neutral-400 dark:neutral-400`},O={key:0,class:`flex items-center justify-center py-4`},k={key:0},Te={flex:`~ col gap-4`},Ee={key:0},De={class:`flex flex-col gap-4`},Oe={flex:`~ row gap-4`},ke={key:1,class:`space-y-6`},Ae={flex:`~ col gap-4`},je={key:4,class:`mt-2 space-y-6`},Me={key:0},Ne={flex:`~ col gap-4`},Pe={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Fe={"w-full":``,"rounded-xl":``},Ie={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},Le={class:`inline-flex items-center gap-4`},Re={flex:`~ col gap-4`},ze={flex:`~ row`,"gap-4":``},Be=[`disabled`],Ve={flex:`~ row`,"items-center":``,"gap-2":``},He=[`src`],Ue={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=l({__name:`speech`,setup(l){let{t:T}=t(),A=me(),j=fe(),{configuredSpeechProvidersMetadata:M}=u(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}=u(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(``);oe(async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)}),ue(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 pe({...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=``)}se(()=>{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(t,l)=>{let u=le(`motion`);return v(),h(d,null,[f(`div`,he,[f(`div`,ge,[f(`div`,null,[f(`div`,_e,[f(`div`,null,[f(`h2`,ve,w(C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),f(`div`,ye,[f(`span`,null,w(C(T)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),f(`div`,be,[C(M).length>0?(v(),h(`fieldset`,xe,[(v(!0),h(d,null,ce(C(M),e=>(v(),p(C(ne),{id:e.id,key:e.id,modelValue:C(N),"onUpdate:modelValue":l[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(),h(`div`,Se,[_(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(()=>l[13]||=[f(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),f(`div`,{class:`flex flex-col`},[f(`span`,{class:`font-medium`},`No Speech Providers Configured`),f(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech providers`)],-1),f(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[13]})]))])]),f(`div`,null,[C(N)&&C(Ge)?(v(),h(`div`,Ce,[f(`div`,we,[f(`div`,null,[f(`h2`,E,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),f(`div`,D,[f(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),C(z)?(v(),h(`div`,O,[l[14]||=f(`div`,{class:`mr-2 animate-spin`},[f(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),f(`span`,null,w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):C(B)?(v(),p(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(),p(C(c),{key:2,type:`warning`},{title:y(()=>[g(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1)]),content:y(()=>[g(w(C(T)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)]),_:1})):C(R).length>0?(v(),p(C(s),{key:3,modelValue:C(P),"onUpdate:modelValue":l[1]||=e=>x(P)?P.value=e:null,"search-query":C(V),"onUpdate:searchQuery":l[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`])):m(``,!0)])])):m(``,!0)])]),C(N)?(v(),h(`div`,k,[f(`div`,Te,[l[24]||=f(`div`,null,[f(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),f(`div`,{text:`neutral-400 dark:neutral-500`},[f(`span`,null,`Customize how your AI assistant speaks`)])],-1),C(We)?(v(),h(`div`,Ee,[f(`div`,De,[_(C(a),{class:`w-full rounded-lg p-2.5 text-sm`},{default:y(()=>l[15]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[15]}),f(`div`,Oe,[_(C(a),{class:`w-full rounded-lg p-4 text-sm`},{default:y(()=>l[16]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[16]}),_(C(a),{class:`w-full rounded-lg p-4 text-sm`},{default:y(()=>l[17]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),_(C(a),{class:`w-full rounded-lg p-4 text-sm`},{default:y(()=>l[18]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]})]),_(C(a),{class:`w-full rounded-lg p-3 text-sm`},{default:y(()=>l[19]||=[f(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]})])])):C(W)[C(N)]&&C(W)[C(N)].length>0?(v(),h(`div`,ke,[_(C(te),{"search-query":G.value,"onUpdate:searchQuery":l[3]||=e=>G.value=e,"voice-id":C(I),"onUpdate:voiceId":l[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(),p(C(o),{key:2,class:`mb-2`,title:`Error loading voices`,error:C(H)},null,8,[`error`])):(v(),p(C(c),{key:3,type:`warning`,icon:`i-solar:info-circle-line-duotone`,class:`mb-2`},{title:y(()=>l[20]||=[g(` No voices available `,-1)]),content:y(()=>l[21]||=[g(` No voices were found for this provider. You can enter a custom voice name below. `,-1)]),_:1})),f(`div`,Ae,[_(C(r),{modelValue:C(L),"onUpdate:modelValue":l[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`]),_(C(i),{modelValue:C(U),"onUpdate:modelValue":l[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(),h(`div`,je,[_(C(ee),{modelValue:C(I),"onUpdate:modelValue":l[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(),h(`div`,Me,[l[23]||=f(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),b(f(`select`,{"onUpdate:modelValue":l[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`},l[22]||=[f(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),f(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),f(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[ie,C(P)]])])):m(``,!0),f(`div`,Ne,[_(C(r),{modelValue:C(L),"onUpdate:modelValue":l[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`])])])):m(``,!0)])])):m(``,!0)]),f(`div`,Pe,[f(`div`,Fe,[f(`h2`,Ie,[f(`div`,Le,[_(C(n)),f(`div`,null,w(C(T)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),f(`div`,Re,[_(C(i),{modelValue:K.value,"onUpdate:modelValue":l[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(),h(`textarea`,{key:1,"onUpdate:modelValue":l[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(),p(C(e),{key:0,modelValue:q.value,"onUpdate:modelValue":l[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`])),f(`div`,ze,[f(`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:de({"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},[f(`div`,Ve,[l[25]||=f(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),f(`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,Be),X.value?(v(),h(`button`,{key:0,border:`primary-300 dark:primary-800 solid 2`,transition:`border duration-250 ease-in-out`,"rounded-lg":``,"px-4":``,"py-2":``,"text-sm":``,onClick:$},l[26]||=[f(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[f(`div`,{"i-solar:stop-circle-bold-duotone":``}),f(`span`,null,`Stop`)],-1)])):m(``,!0)]),X.value?(v(),h(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,He)):m(``,!0)])])])]),b((v(),h(`div`,Ue,l[27]||=[f(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof T==`function`&&T(A);var j=A;export{j as default}; \ No newline at end of file diff --git a/assets/stage-Bvsu22mO.js b/assets/stage-Bvsu22mO.js deleted file mode 100644 index a1127faa4e0e9bb3f18982cb3824a70427aa5def..0000000000000000000000000000000000000000 --- a/assets/stage-Bvsu22mO.js +++ /dev/null @@ -1 +0,0 @@ -import{d$ as e,d4 as t,dY as n,d_ as r,e7 as i,em as a}from"./index-B9WIljdS.js";const o={text:`gray-700 dark:gray-200`,"h-full":``,"font-cute":``};var s=e({__name:`stage`,setup(e){return(e,s)=>(i(),n(`main`,o,[r(a(t))]))}}),c=s;export{c as default}; \ No newline at end of file diff --git a/assets/stage-C6gN8EAr.js b/assets/stage-C6gN8EAr.js new file mode 100644 index 0000000000000000000000000000000000000000..c802c24e160ebe0dc6185c72f01a12c958b1d7e4 --- /dev/null +++ b/assets/stage-C6gN8EAr.js @@ -0,0 +1 @@ +import"./Basic-BgQfJAar.js";import{b as e,d as t}from"./theme-color-BIFWobsZ.js";import{d$ as n,d9 as r,dW as i,dX as a,dY as o,da as s,db as c,dd as l,di as u,e0 as d,e6 as f,e8 as p,ef as m,eg as h,ej as g,en as _,q as v}from"./index-BIGBQG2E.js";import"./HeaderLink-q8Ont_Aw.js";import{b as y}from"./route-block-gWR0cCIm.js";import{b}from"./Scenes-D3-lazzf.js";import{b as x,c as S,d as C,e as w,f as T,g as E}from"./AnimatedWave-Cojz6rq7.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(),a(E,null,{default:h(()=>[n(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(()=>[i(`div`,D,[i(`div`,O,[n(T,{class:`hidden md:flex`}),n(C,{class:`flex md:hidden`})]),i(`div`,k,[n(_(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)?o(``,!0):(p(),a(w,{key:0,h:`85dvh`,absolute:``,"right-4":``,flex:``,"flex-1":``,"flex-col":``,"max-w":`500px`,"min-w":`30%`})),_(L)?(p(),a(S,{key:1,onSettingsOpen:j})):o(``,!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-CioUItKt.js b/assets/stage-CioUItKt.js new file mode 100644 index 0000000000000000000000000000000000000000..654b19f3faf031f649289d1e41c00d74b4192fcc --- /dev/null +++ b/assets/stage-CioUItKt.js @@ -0,0 +1 @@ +import{d$ as e,d5 as t,dZ as n,e0 as r,e8 as i,en as a}from"./index-BIGBQG2E.js";const o={text:`gray-700 dark:gray-200`,"h-full":``,"font-cute":``};var s=r({__name:`stage`,setup(r){return(r,s)=>(i(),n(`main`,o,[e(a(t))]))}}),c=s;export{c as default}; \ No newline at end of file diff --git a/assets/stage-D82DzKH0.js b/assets/stage-D82DzKH0.js deleted file mode 100644 index d029a85527697b9e75c06fd3145861b8c2e8ee8f..0000000000000000000000000000000000000000 --- a/assets/stage-D82DzKH0.js +++ /dev/null @@ -1 +0,0 @@ -import"./Basic-BfTEEIor.js";import{b as e,d as t}from"./theme-color-DKGyNM2w.js";import{d$ as n,d8 as r,d9 as i,dV as a,dW as o,dX as s,d_ as c,da as l,dc as u,dh as d,e5 as f,e7 as p,ee as m,ef as h,ei as g,em as _,q as v}from"./index-B9WIljdS.js";import"./HeaderLink-Dp-qWbnF.js";import{b as y}from"./route-block-gWR0cCIm.js";import{b}from"./Scenes-uCDQqCpn.js";import{b as x,c as S,d as C,e as w,f as T,g as E}from"./AnimatedWave-Bw1I6g_s.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/sury-s6Akl-oc-BIvMfvjZ.js b/assets/sury-s6Akl-oc-BuVXWdfG.js similarity index 71% rename from assets/sury-s6Akl-oc-BIvMfvjZ.js rename to assets/sury-s6Akl-oc-BuVXWdfG.js index b701c92878d58fc1877896a9ab2c0665b7d0466b..a6d68730eff264061b52f6c6e48cd3908d43b677 100644 --- a/assets/sury-s6Akl-oc-BIvMfvjZ.js +++ b/assets/sury-s6Akl-oc-BuVXWdfG.js @@ -1 +1 @@ -import{bR as e,d7 as t}from"./index-B9WIljdS.js";const n=async()=>{let{toJSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_sury_xsschema-EzZM58z3.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{bR as e,d8 as t}from"./index-BIGBQG2E.js";const n=async()=>{let{toJSONSchema:n}=await e(t(()=>import(`./__vite-optional-peer-dep_sury_xsschema-EzZM58z3.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/theme-color-DKGyNM2w.js b/assets/theme-color-BIFWobsZ.js similarity index 99% rename from assets/theme-color-DKGyNM2w.js rename to assets/theme-color-BIFWobsZ.js index 7b5555233c3b4050b45b3578c563a6b13a8c719b..9e8798a9f459a255e4c1b1f9f2a0da20216afd5e 100644 --- a/assets/theme-color-DKGyNM2w.js +++ b/assets/theme-color-BIFWobsZ.js @@ -1 +1 @@ -import{ca as e,cb as t,dc as n}from"./index-B9WIljdS.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{ca as e,cb as t,dd as n}from"./index-BIGBQG2E.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-DmixiGRl.js b/assets/together-ai-CsX6JpBs.js similarity index 55% rename from assets/together-ai-DmixiGRl.js rename to assets/together-ai-CsX6JpBs.js index 7c28771bfcd8afb3cc4a95a636c1192b1a7b48b8..4934843f030b62a7b02e14f6dd84a05fc15c3af5 100644 --- a/assets/together-ai-DmixiGRl.js +++ b/assets/together-ai-CsX6JpBs.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`together-ai`;var x=t({__name:`together-ai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`together-ai`;var x=o({__name:`together-ai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon-color":w.value?.iconColor,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`togetherapi-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-BogxzGZV.js b/assets/transformers.web-BgaDiHAD.js similarity index 99% rename from assets/transformers.web-BogxzGZV.js rename to assets/transformers.web-BgaDiHAD.js index 397c4480ab2204faa2c43bc981949e2c39c910f1..f396886477ef20faf231f4a8a25453e787bcaad6 100644 --- a/assets/transformers.web-BogxzGZV.js +++ b/assets/transformers.web-BgaDiHAD.js @@ -1,4 +1,4 @@ -import{es as e,et as t}from"./index-B9WIljdS.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{et as e,eu as t}from"./index-BIGBQG2E.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-Dqxhpop2.js b/assets/valibot-DBCeetIe-YlZF0hjt.js similarity index 69% rename from assets/valibot-DBCeetIe-Dqxhpop2.js rename to assets/valibot-DBCeetIe-YlZF0hjt.js index 99db398c5d1ef4979fd631c619e064f6b33cbef5..c62aedc47bfef6e76fadf46cc6f13459bc7b8092 100644 --- a/assets/valibot-DBCeetIe-Dqxhpop2.js +++ b/assets/valibot-DBCeetIe-YlZF0hjt.js @@ -1 +1 @@ -import{bR as e,d7 as t}from"./index-B9WIljdS.js";const n=async()=>{let{toJsonSchema:n}=await e(t(()=>import(`./dist-CN0a6r6N.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{bR as e,d8 as t}from"./index-BIGBQG2E.js";const n=async()=>{let{toJsonSchema:n}=await e(t(()=>import(`./dist-CN0a6r6N.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/vibrant-CyXFiZWx.js b/assets/vibrant-LAlhuqlD.js similarity index 70% rename from assets/vibrant-CyXFiZWx.js rename to assets/vibrant-LAlhuqlD.js index e5271e31d172769b250753341a42eab1d8c1ad6a..b3d5251f75546980da3f321b49751866274de24e 100644 --- a/assets/vibrant-CyXFiZWx.js +++ b/assets/vibrant-LAlhuqlD.js @@ -1 +1 @@ -import{b as e}from"./InputFile-CXpzJde3.js";import{d$ as t,dS as n,dV as r,dX as i,dY as a,d_ as o,e7 as s,e8 as c,ee as l,ei as u,em as d,ep as f,eq as p}from"./index-B9WIljdS.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=t({__name:`vibrant`,setup(t){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}),(t,l)=>(s(),a(`div`,h,[r(`div`,g,[(s(!0),a(n,null,c(C.value,(e,t)=>(s(),a(`div`,{key:t,style:f({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),r(`div`,_,p(w.value),1),r(`div`,v,[o(d(e),{modelValue:x.value,"onUpdate:modelValue":l[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),r(`div`,y,[S.value?(s(),a(`img`,{key:0,src:S.value.src,"h-full":``,"w-full":``,"object-contain":``},null,8,b)):i(``,!0)])]))}}),S=x;export{S as default}; \ No newline at end of file +import{b as e}from"./InputFile-BcSJOVRJ.js";import{d$ as t,dT as n,dW as r,dY as i,dZ as a,e0 as o,e8 as s,e9 as c,ef as l,ej as u,en as d,eq as f,er as p}from"./index-BIGBQG2E.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(),a(`div`,h,[r(`div`,g,[(s(!0),a(n,null,c(C.value,(e,t)=>(s(),a(`div`,{key:t,style:f({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),r(`div`,_,p(w.value),1),r(`div`,v,[t(d(e),{modelValue:x.value,"onUpdate:modelValue":l[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),r(`div`,y,[S.value?(s(),a(`img`,{key:0,src:S.value.src,"h-full":``,"w-full":``,"object-contain":``},null,8,b)):i(``,!0)])]))}}),S=x;export{S as default}; \ No newline at end of file diff --git a/assets/volcengine-P5JJHh1K.js b/assets/volcengine-Ghd4CBxy.js similarity index 74% rename from assets/volcengine-P5JJHh1K.js rename to assets/volcengine-Ghd4CBxy.js index e36187bc09b783536774b656c8bbc087dffa5e7c..e519575701f12ce6421d70ce6ffd741caea7e1be 100644 --- a/assets/volcengine-P5JJHh1K.js +++ b/assets/volcengine-Ghd4CBxy.js @@ -1 +1 @@ -import{A as e,cN as t,cQ as n,d$ as r,d8 as i,dU as a,dV as o,dW as s,d_ as c,e as l,e5 as u,e7 as d,ee as f,ef as p,ei as m,em as h,f as g,v as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=r({__name:`volcengine`,setup(r){let y=m(1),C=_(),w=v(),{providers:T}=i(w),{t:E}=e(),D=a({get:()=>(T.value[x]?.app)?.appId||``,set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=a(()=>!!T.value[x]?.apiKey),k=a(()=>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 u(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)}),f(y,async()=>{let e=w.getProviderConfig(x);e.audio||={},e.audio.speedRatio=y.value}),f([T,D],async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,r)=>(d(),s(h(l),{"provider-id":x,"default-model":S},{"basic-settings":p(()=>[o(`div`,b,[c(h(n),{modelValue:D.value,"onUpdate:modelValue":r[0]||=e=>D.value=e,label:h(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:h(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":p(()=>[c(h(t),{modelValue:y.value,"onUpdate:modelValue":r[1]||=e=>y.value=e,label:h(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:p(()=>[c(h(g),{"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{A as e,cO as t,cR as n,d$ as r,d9 as i,dV as a,dW as o,dX as s,e as c,e0 as l,e6 as u,e8 as d,ef as f,eg as p,ej as m,en as h,f as g,v as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=l({__name:`volcengine`,setup(l){let y=m(1),C=_(),w=v(),{providers:T}=i(w),{t:E}=e(),D=a({get:()=>(T.value[x]?.app)?.appId||``,set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=a(()=>!!T.value[x]?.apiKey),k=a(()=>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 u(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)}),f(y,async()=>{let e=w.getProviderConfig(x);e.audio||={},e.audio.speedRatio=y.value}),f([T,D],async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(d(),s(h(c),{"provider-id":x,"default-model":S},{"basic-settings":p(()=>[o(`div`,b,[r(h(n),{modelValue:D.value,"onUpdate:modelValue":i[0]||=e=>D.value=e,label:h(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:h(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":p(()=>[r(h(t),{modelValue:y.value,"onUpdate:modelValue":i[1]||=e=>y.value=e,label:h(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:h(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:p(()=>[r(h(g),{"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/vrm/animations/idle_loop.vrma b/assets/vrm/animations/idle_loop.vrma deleted file mode 100644 index 26b28f4e4227c48eecdd29d25e3dc6f4c6ac3844..0000000000000000000000000000000000000000 Binary files a/assets/vrm/animations/idle_loop.vrma and /dev/null differ diff --git a/assets/xai-CYO-rtmE.js b/assets/xai-n-qIhfM0.js similarity index 58% rename from assets/xai-CYO-rtmE.js rename to assets/xai-n-qIhfM0.js index 333cb41d442b434525e9fd7365215dbba96fb7c2..27badeddd14d7e359eebcb4e3a3f3aa8d5d4474e 100644 --- a/assets/xai-CYO-rtmE.js +++ b/assets/xai-n-qIhfM0.js @@ -1 +1 @@ -import{A as e,d$ as t,d6 as n,d8 as r,dU as i,dW as a,d_ as o,e5 as s,e7 as c,ee as l,ef as u,em as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-B9WIljdS.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`xai`;var x=t({__name:`xai`,setup(t){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([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)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[o(d(p),null,{default:u(()=>[o(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[o(d(g),{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`]),o(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[o(d(h),{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{A as e,d$ as t,d7 as n,d9 as r,dV as i,dX as a,e0 as o,e6 as s,e8 as c,ef as l,eg as u,en as d,g as f,h as p,i as m,j as h,k as g,l as _,y as v}from"./index-BIGBQG2E.js";import{b as y}from"./route-block-gWR0cCIm.js";const b=`xai`;var x=o({__name:`xai`,setup(o){let{t:y}=e(),x=n(),S=v(),{providers:C}=r(S),w=i(()=>S.getProviderMetadata(b)),T=i({get:()=>C.value[b]?.apiKey||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=i({get:()=>C.value[b]?.baseUrl||``,set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});s(()=>{S.initializeProvider(b),T.value=C.value[b]?.apiKey||``,E.value=C.value[b]?.baseUrl||``}),l([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){C.value[b]={...w.value?.defaultOptions}}return(e,n)=>(c(),a(d(f),{"provider-name":w.value?.localizedName,"provider-icon":w.value?.icon,"on-back":()=>d(x).back()},{default:u(()=>[t(d(p),null,{default:u(()=>[t(d(m),{title:d(y)(`settings.pages.providers.common.section.basic.title`),description:d(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:u(()=>[t(d(g),{modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,"provider-name":w.value?.localizedName,placeholder:`xai-...`},null,8,[`modelValue`,`provider-name`])]),_:1},8,[`title`,`description`]),t(d(_),{title:d(y)(`settings.pages.providers.common.section.advanced.title`)},{default:u(()=>[t(d(h),{modelValue:E.value,"onUpdate:modelValue":n[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-DKreLe0e.js b/assets/zod-Bw_60DVU-BbjRq13c.js similarity index 74% rename from assets/zod-Bw_60DVU-DKreLe0e.js rename to assets/zod-Bw_60DVU-BbjRq13c.js index 185ef0385f565adf3acb36946551c8d934616a1f..44e570f2d44cec8525ff41fd2365d03f51b69819 100644 --- a/assets/zod-Bw_60DVU-DKreLe0e.js +++ b/assets/zod-Bw_60DVU-BbjRq13c.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/core-DcnIWNLR.js","assets/index-B9WIljdS.js","assets/index-CdrV4-fw.css"])))=>i.map(i=>d[i]); -import{bQ as e,d7 as t}from"./index-B9WIljdS.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-DcnIWNLR.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-BMl6e2Vf.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-DLp7fhGT.js","assets/index-BIGBQG2E.js","assets/index-9HJVUVbL.css"])))=>i.map(i=>d[i]); +import{bQ as e,d8 as t}from"./index-BIGBQG2E.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-DLp7fhGT.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-BMl6e2Vf.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 5fbee52f7b9fc56953a4d7b51656ea0f01c33cc2..a428b39beb353a8a9a0187270bdbd46be1bc9518 100644 --- a/index.html +++ b/index.html @@ -32,8 +32,8 @@ src="/remote-assets/page-external-data/js/script.js" > - - + +
diff --git a/sw.js b/sw.js index cb7e455aefce27c9c665a294f56f9c2f9dab9077..10d0b8368e5669d8477f2c7cebcc9056aa12e576 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let u={};const o=s=>l(s,n),a={module:{uri:n},exports:u,require:o};e[n]=Promise.all(r.map(s=>a[s]||o(s))).then(s=>(i(...s),u))}}define(["./workbox-3aa584b4"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/__vite-browser-external-D71AMOyU.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-snGRN6_r.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-EzZM58z3.js",revision:null},{url:"assets/_...all_-C6f1CqAg.js",revision:null},{url:"assets/airi-card-CwVG5sxe.js",revision:null},{url:"assets/alibaba-cloud-model-studio-CDh_4wmt.js",revision:null},{url:"assets/AnimatedWave-Bw1I6g_s.js",revision:null},{url:"assets/AnimatedWave-CW4ij04Q.css",revision:null},{url:"assets/anthropic-CM4lGj4P.js",revision:null},{url:"assets/appearance-CK7NAy2u.js",revision:null},{url:"assets/arktype-C-GObzDh-BwfwC23N.js",revision:null},{url:"assets/audio-D_gw8_qs.js",revision:null},{url:"assets/audio-record-Fhs1ZD1c.js",revision:null},{url:"assets/azure-ai-foundry-BzOe3syr.js",revision:null},{url:"assets/background-gradient-blending-6ss5Fg2-.css",revision:null},{url:"assets/background-gradient-blending-XDN7GK5x.js",revision:null},{url:"assets/background-remove-BPFawsw0.js",revision:null},{url:"assets/Basic-BfTEEIor.js",revision:null},{url:"assets/browser-bFm1l1qg.js",revision:null},{url:"assets/browser-bqvzIJPy.js",revision:null},{url:"assets/CardCreate-BU_uEtuV.js",revision:null},{url:"assets/CardCreate-CutGwari.js",revision:null},{url:"assets/CardCreationDialog-BSWV6-8O.js",revision:null},{url:"assets/CardCreationDialog-BYY8X8ME.js",revision:null},{url:"assets/CardCreationDialog-UIvAa4Bx.css",revision:null},{url:"assets/CardDetailDialog-BLm7zRgk.js",revision:null},{url:"assets/CardDetailDialog-CcoHJxL0.js",revision:null},{url:"assets/CardListItem-BJ53NvW9.js",revision:null},{url:"assets/CardListItem-X7iklUlr.js",revision:null},{url:"assets/chat-C0i2b9Lw.js",revision:null},{url:"assets/cloudflare-workers-ai-CQCSOdn6.js",revision:null},{url:"assets/color-scheme-DsJzj-Kq.js",revision:null},{url:"assets/color-scheme-r2m6hu6X.css",revision:null},{url:"assets/consciousness-C1mosjsj.js",revision:null},{url:"assets/core-DcnIWNLR.js",revision:null},{url:"assets/deepseek-BUQnh-tD.js",revision:null},{url:"assets/default-browser-CS6ZmB8h.js",revision:null},{url:"assets/default-CTBzNlUY.js",revision:null},{url:"assets/default-node-CUnR0j1U.js",revision:null},{url:"assets/delays-ClnSqQ-z.js",revision:null},{url:"assets/DeleteCardDialog-CAT_oitI.js",revision:null},{url:"assets/DeleteCardDialog-DXxjLYbx.js",revision:null},{url:"assets/developer-BNL2hIKB.js",revision:null},{url:"assets/DialogTitle-4J3ZFQI8.js",revision:null},{url:"assets/dist-CN0a6r6N.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-BmRGzHbw.js",revision:null},{url:"assets/elevenlabs-X1PaqUDW.js",revision:null},{url:"assets/emotions-UjFoSlJC.js",revision:null},{url:"assets/esm-BMl6e2Vf.js",revision:null},{url:"assets/featherless-ai-Spcctzbu.js",revision:null},{url:"assets/filter-message-DAxYSZzI.js",revision:null},{url:"assets/fireworks-ai-734fhxoo.js",revision:null},{url:"assets/general-CpymSjFJ.js",revision:null},{url:"assets/gesture-circle-D2vggVou.js",revision:null},{url:"assets/google-generative-ai-C7FbKjL1.js",revision:null},{url:"assets/HeaderLink-4n3ShASi.css",revision:null},{url:"assets/HeaderLink-Dp-qWbnF.js",revision:null},{url:"assets/hearing-_QhzfMHP.js",revision:null},{url:"assets/home-4Khdv6MH.js",revision:null},{url:"assets/icon-animation-BVIg_nVx.js",revision:null},{url:"assets/IconAnimation-BeiZddFw.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-Cr6BK5qs.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-TVB6v_2U.js",revision:null},{url:"assets/index-B9WIljdS.js",revision:null},{url:"assets/index-CdrV4-fw.css",revision:null},{url:"assets/index-tts-vllm-cHdeYFFK.js",revision:null},{url:"assets/InputFile-CXpzJde3.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-BptisQ8A.js",revision:null},{url:"assets/memory-long-term-3y9YURXG.js",revision:null},{url:"assets/memory-short-term-DxB8blpY.js",revision:null},{url:"assets/messages-Cl2ZMDuq.js",revision:null},{url:"assets/microsoft-speech-DNNo6YPJ.js",revision:null},{url:"assets/mistral-ai-D4NFd2lk.js",revision:null},{url:"assets/models-DGVWZaRr.js",revision:null},{url:"assets/modules-D1uvB1yJ.js",revision:null},{url:"assets/moonshot-ai-O9H_anWy.js",revision:null},{url:"assets/novita-ai-D3qcyZ3I.js",revision:null},{url:"assets/ollama-CYoWD53x.js",revision:null},{url:"assets/openai-audio-speech-BlXe47o4.js",revision:null},{url:"assets/openai-audio-transcription-DRVPjEZB.js",revision:null},{url:"assets/openai-BaDAnGRp.js",revision:null},{url:"assets/openrouter-ai-DIsInNVt.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-ClYhdjun.js",revision:null},{url:"assets/plain-f1-XYGPE.js",revision:null},{url:"assets/player2-C1AHVzFC.js",revision:null},{url:"assets/player2-speech-bqrel8Cy.js",revision:null},{url:"assets/polaroid-Ctap1RD7.js",revision:null},{url:"assets/process.worklet-CF6Ao8XG.js",revision:null},{url:"assets/providers-DlCWpqGP.js",revision:null},{url:"assets/queue-D-thhmwX.js",revision:null},{url:"assets/route-block-gWR0cCIm.js",revision:null},{url:"assets/scene-DtolI52J.js",revision:null},{url:"assets/Scenes-uCDQqCpn.js",revision:null},{url:"assets/settings-Cc73OB2L.js",revision:null},{url:"assets/settings-OjK1du8Y.js",revision:null},{url:"assets/speech-_wcIRiZp.js",revision:null},{url:"assets/stage-Bvsu22mO.js",revision:null},{url:"assets/stage-D82DzKH0.js",revision:null},{url:"assets/sury-s6Akl-oc-BIvMfvjZ.js",revision:null},{url:"assets/Textarea-Q_8nrbKN.js",revision:null},{url:"assets/theme-color-DKGyNM2w.js",revision:null},{url:"assets/together-ai-DmixiGRl.js",revision:null},{url:"assets/transformers.web-BogxzGZV.js",revision:null},{url:"assets/valibot-DBCeetIe-Dqxhpop2.js",revision:null},{url:"assets/vibrant-CyXFiZWx.js",revision:null},{url:"assets/volcengine-P5JJHh1K.js",revision:null},{url:"assets/worker-_4r9VDQB.js",revision:null},{url:"assets/xai-CYO-rtmE.js",revision:null},{url:"assets/zod-Bw_60DVU-DKreLe0e.js",revision:null},{url:"index.html",revision:"57a95fe1f70ee78990226dfd1e51032c"},{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 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-CLt_IrJn.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-snGRN6_r.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-EzZM58z3.js",revision:null},{url:"assets/_...all_-B1JTxHeH.js",revision:null},{url:"assets/airi-card-Deid7cRS.js",revision:null},{url:"assets/alibaba-cloud-model-studio-7ap18Fo0.js",revision:null},{url:"assets/AnimatedWave-Cojz6rq7.js",revision:null},{url:"assets/AnimatedWave-CW4ij04Q.css",revision:null},{url:"assets/anthropic-5AYt9HNX.js",revision:null},{url:"assets/appearance-CgbkXuYz.js",revision:null},{url:"assets/arktype-C-GObzDh-BwfwC23N.js",revision:null},{url:"assets/audio-C3Vjld8K.js",revision:null},{url:"assets/audio-record-DgRdKFoy.js",revision:null},{url:"assets/azure-ai-foundry-C31WIx9s.js",revision:null},{url:"assets/background-gradient-blending-6ss5Fg2-.css",revision:null},{url:"assets/background-gradient-blending-jSovSmMB.js",revision:null},{url:"assets/background-remove-DTJN32z8.js",revision:null},{url:"assets/Basic-BgQfJAar.js",revision:null},{url:"assets/browser-bFm1l1qg.js",revision:null},{url:"assets/browser-bqvzIJPy.js",revision:null},{url:"assets/CardCreate-DfNbL4BD.js",revision:null},{url:"assets/CardCreate-DswUjQ7w.js",revision:null},{url:"assets/CardCreationDialog-CUhrihgO.js",revision:null},{url:"assets/CardCreationDialog-CYhEzkFt.js",revision:null},{url:"assets/CardCreationDialog-UIvAa4Bx.css",revision:null},{url:"assets/CardDetailDialog-B3nu2JGI.js",revision:null},{url:"assets/CardDetailDialog-dVpnsyGs.js",revision:null},{url:"assets/CardListItem-1GFj18SB.js",revision:null},{url:"assets/CardListItem-jWaHBlBm.js",revision:null},{url:"assets/chat-DVKZmgmM.js",revision:null},{url:"assets/cloudflare-workers-ai-DQ5b742r.js",revision:null},{url:"assets/color-scheme-Cg53Mdi1.js",revision:null},{url:"assets/color-scheme-r2m6hu6X.css",revision:null},{url:"assets/consciousness-BuF1Ojbx.js",revision:null},{url:"assets/core-DLp7fhGT.js",revision:null},{url:"assets/deepseek-ByVQlTAc.js",revision:null},{url:"assets/default-browser-CS6ZmB8h.js",revision:null},{url:"assets/default-node-BdKlRQ9_.js",revision:null},{url:"assets/default-UaFS1yzN.js",revision:null},{url:"assets/delays-DsBi38hN.js",revision:null},{url:"assets/DeleteCardDialog-C5wCNpwE.js",revision:null},{url:"assets/DeleteCardDialog-Dyob2QXx.js",revision:null},{url:"assets/developer-DGJJ6tta.js",revision:null},{url:"assets/DialogTitle-icfnGx6M.js",revision:null},{url:"assets/dist-CN0a6r6N.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-gF-vx9Va.js",revision:null},{url:"assets/elevenlabs-W4waKSIH.js",revision:null},{url:"assets/emotions-yTSpRcgw.js",revision:null},{url:"assets/esm-BMl6e2Vf.js",revision:null},{url:"assets/featherless-ai-DibRGwb-.js",revision:null},{url:"assets/filter-message-Cm2-SMhJ.js",revision:null},{url:"assets/fireworks-ai-LsH2mj56.js",revision:null},{url:"assets/general-BwshJ41f.js",revision:null},{url:"assets/gesture-circle-pkJOWcgA.js",revision:null},{url:"assets/google-generative-ai--KpWfIV-.js",revision:null},{url:"assets/HeaderLink-4n3ShASi.css",revision:null},{url:"assets/HeaderLink-q8Ont_Aw.js",revision:null},{url:"assets/hearing-BaAcNIp6.js",revision:null},{url:"assets/home-C2jtrSIW.js",revision:null},{url:"assets/icon-animation-zitz9bVj.js",revision:null},{url:"assets/IconAnimation-D-qvmNIz.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-Di3k1Znc.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-TVB6v_2U.js",revision:null},{url:"assets/index-9HJVUVbL.css",revision:null},{url:"assets/index-BIGBQG2E.js",revision:null},{url:"assets/index-tts-vllm-CZN3SzPx.js",revision:null},{url:"assets/InputFile-BcSJOVRJ.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-CNpnR5Ql.js",revision:null},{url:"assets/memory-long-term-DaVuCOPk.js",revision:null},{url:"assets/memory-short-term-A4xwu6aD.js",revision:null},{url:"assets/messages-DQjPeAXc.js",revision:null},{url:"assets/microsoft-speech-DxOqJ-JQ.js",revision:null},{url:"assets/mistral-ai-DHDVQ-H_.js",revision:null},{url:"assets/models-BkGZGThV.js",revision:null},{url:"assets/modules-BE14UNWX.js",revision:null},{url:"assets/moonshot-ai-DUyvYdYh.js",revision:null},{url:"assets/novita-ai-D-caW35N.js",revision:null},{url:"assets/ollama-4wbi0n-k.js",revision:null},{url:"assets/openai-audio-speech-DDIxYC90.js",revision:null},{url:"assets/openai-audio-transcription-CbLHW9aC.js",revision:null},{url:"assets/openai-BDPnuQYk.js",revision:null},{url:"assets/openrouter-ai-Bp9JI8pa.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-m4rd-W8R.js",revision:null},{url:"assets/plain-BFyN07HS.js",revision:null},{url:"assets/player2--doz6X0m.js",revision:null},{url:"assets/player2-speech-Cf4MI4jv.js",revision:null},{url:"assets/polaroid-jY86CfCa.js",revision:null},{url:"assets/process.worklet-CF6Ao8XG.js",revision:null},{url:"assets/providers-C2VzTNwI.js",revision:null},{url:"assets/queue-DzSVSIxS.js",revision:null},{url:"assets/route-block-gWR0cCIm.js",revision:null},{url:"assets/scene-CRPN8LGX.js",revision:null},{url:"assets/Scenes-D3-lazzf.js",revision:null},{url:"assets/settings-B1QJpBHt.js",revision:null},{url:"assets/settings-BB0AtFTc.js",revision:null},{url:"assets/speech-Abc_vh4w.js",revision:null},{url:"assets/stage-C6gN8EAr.js",revision:null},{url:"assets/stage-CioUItKt.js",revision:null},{url:"assets/sury-s6Akl-oc-BuVXWdfG.js",revision:null},{url:"assets/Textarea-rGc1yvjC.js",revision:null},{url:"assets/theme-color-BIFWobsZ.js",revision:null},{url:"assets/together-ai-CsX6JpBs.js",revision:null},{url:"assets/transformers.web-BgaDiHAD.js",revision:null},{url:"assets/valibot-DBCeetIe-YlZF0hjt.js",revision:null},{url:"assets/vibrant-LAlhuqlD.js",revision:null},{url:"assets/volcengine-Ghd4CBxy.js",revision:null},{url:"assets/worker-_4r9VDQB.js",revision:null},{url:"assets/xai-n-qIhfM0.js",revision:null},{url:"assets/zod-Bw_60DVU-BbjRq13c.js",revision:null},{url:"index.html",revision:"e7a70870ebb9b91dada768958cdbb24f"},{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\//]}))});