@tresjs/nuxt 5.3.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/BbH313iv.js +1 -0
- package/dist/client/_nuxt/{speTgVU1.js → CPZxO2bC.js} +1 -1
- package/dist/client/_nuxt/DnLreTGP.js +32 -0
- package/dist/client/_nuxt/{CbvahQ3W.js → Xp19LDlO.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/65968d00-91f9-431a-9977-950d984956a6.json +1 -0
- package/dist/client/_nuxt/entry.BPSyFWKM.css +1 -0
- package/dist/client/_nuxt/error-404.BkcOqmZ2.css +1 -0
- package/dist/client/_nuxt/error-500.DjFAyAVV.css +1 -0
- package/dist/client/_nuxt/{index.DPHGyEZm.css → index.BoTOVuDd.css} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/package.json +5 -5
- package/dist/client/_nuxt/CN4MeTL9.js +0 -1
- package/dist/client/_nuxt/builds/meta/010db34a-80d5-439f-9655-a8c27c861f95.json +0 -1
- package/dist/client/_nuxt/entry.DYBJYVv_.css +0 -1
- package/dist/client/_nuxt/error-404.BeYzWcwE.css +0 -1
- package/dist/client/_nuxt/error-500.D4tTUxwg.css +0 -1
- package/dist/client/_nuxt/tIr-SHIQ.js +0 -32
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as Zi,f as Rs,g as ra,h as F,j as td,r as z,k as na,l as je,m as Fr,n as Er,p as ja,q as Ft,s as nt,v as vt,x as Cr,y as Nn,z as el,A as id,B as tl,C as qi,D as il,E as Ge,F as gt,G as I,H as Pe,I as Je,J as xt,K as S,L as d,M as Z,N as A,o as v,w as _,O as H,P as ne,Q as rd,R as sa,S as nd,T as yi,U as is,V as sd,W as ad,X as rs,Y as Ua,b as E,Z as Or,$ as or,a0 as Ht,a1 as R,a2 as ae,a3 as oe,a4 as zr,a5 as aa,a6 as Ir,a7 as Tr,c as V,a8 as xe,a9 as Xe,aa as pt,ab as fe,ac as lr,ad as oa,ae as qn,af as rl,ag as nl,ah as Ii,ai as sl,aj as od,ak as Et,al as ur,am as Qt,an as _e,ao as ld,ap as al,aq as ud,ar as ol,as as ll,at as dd,au as la,av as cd,d as de,t as ee,aw as Pr,ax as hd,ay as ki,az as Ie,aA as De,aB as Se,aC as O,aD as ut,aE as le,aF as Ze,aG as It,aH as dr,aI as Ue,a as P,aJ as Ar,aK as fd,aL as kn,aM as ua,aN as pd,aO as md,aP as ul,aQ as gd,_ as dl,aR as da,aS as cl,aT as cr,aU as ca,aV as hl,aW as yd,aX as vd,aY as Ga,aZ as bd,a_ as ft,a$ as fl,b0 as pl,b1 as xd,b2 as wd,b3 as _d,b4 as Cd,b5 as Ad,b6 as ns}from"#entry";function Sd(r,e=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY){return Math.min(t,Math.max(e,r))}function Zr(r,e){let t=r;const i=e.toString(),n=i.indexOf("."),s=n>=0?i.length-n:0;if(s>0){const a=10**s;t=Math.round(t*a)/a}return t}function Md(r,e,t,i){e=Number(e),t=Number(t);const n=(r-(Number.isNaN(e)?0:e))%i;let s=Zr(Math.abs(n)*2>=i?r+Math.sign(n)*(i-Math.abs(n)):r-n,i);return Number.isNaN(e)?!Number.isNaN(t)&&s>t&&(s=Math.floor(Zr(t/i,i))*i):s<e?s=e:!Number.isNaN(t)&&s>t&&(s=e+Math.floor(Zr((t-e)/i,i))*i),s=Zr(s,i),s}function Wa(r,e){return Zi(r)?!1:Array.isArray(r)?r.some(t=>Rs(t,e)):Rs(r,e)}const Bd=["INPUT","TEXTAREA"];function qd(r,e,t,i={}){if(!e||i.enableIgnoredElement&&Bd.includes(e.nodeName))return null;const{arrowKeyOptions:n="both",attributeName:s="[data-reka-collection-item]",itemsArray:a=[],loop:o=!0,dir:l="ltr",preventScroll:u=!0,focus:c=!1}=i,[h,f,m,p,g,y]=[r.key==="ArrowRight",r.key==="ArrowLeft",r.key==="ArrowUp",r.key==="ArrowDown",r.key==="Home",r.key==="End"],w=m||p,x=h||f;if(!g&&!y&&(!w&&!x||n==="vertical"&&x||n==="horizontal"&&w))return null;const b=t?Array.from(t.querySelectorAll(s)):a;if(!b.length)return null;u&&r.preventDefault();let C=null;return x||w?C=ml(b,e,{goForward:w?p:l==="ltr"?h:f,loop:o}):g?C=b.at(0)||null:y&&(C=b.at(-1)||null),c&&C?.focus(),C}function ml(r,e,t,i=r.length){if(--i===0)return null;const n=r.indexOf(e),s=t.goForward?n+1:n-1;if(!t.loop&&(s<0||s>=r.length))return null;const a=(s+r.length)%r.length,o=r[a];return o?o.hasAttribute("disabled")&&o.getAttribute("disabled")!=="false"?ml(r,o,t,i):o:null}const kd=ra(()=>{const r=z(new Map),e=z(),t=F(()=>{for(const a of r.value.values())if(a)return!0;return!1}),i=na({scrollBody:z(!0)});let n=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",ja&&n?.(),e.value=void 0};return je(t,(a,o)=>{if(!Fr)return;if(!a){o&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,u={padding:l,margin:0},c=i.scrollBody?.value?typeof i.scrollBody.value=="object"?Er({padding:i.scrollBody.value.padding===!0?l:i.scrollBody.value.padding,margin:i.scrollBody.value.margin===!0?l:i.scrollBody.value.margin},u):u:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),ja&&(n=Ft(document,"touchmove",h=>Fd(h),{passive:!1})),nt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),r});function ha(r){const e=Math.random().toString(36).substring(2,7),t=kd();t.value.set(e,r??!1);const i=F({get:()=>t.value.get(e)??!1,set:n=>t.value.set(e,n)});return td(()=>{t.value.delete(e)}),i}function gl(r){const e=window.getComputedStyle(r);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&r.clientWidth<r.scrollWidth||e.overflowY==="auto"&&r.clientHeight<r.scrollHeight)return!0;{const t=r.parentNode;return!(t instanceof Element)||t.tagName==="BODY"?!1:gl(t)}}function Fd(r){const e=r||window.event,t=e.target;return t instanceof Element&&gl(t)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}function Vn(r){const e=na({dir:z("ltr")});return F(()=>r?.value||e.dir?.value||"ltr")}let ss=0;function yl(){vt(r=>{if(!Fr)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??Ka()),document.body.insertAdjacentElement("beforeend",e[1]??Ka()),ss++,r(()=>{ss===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(t=>t.remove()),ss--})})}function Ka(){const r=document.createElement("span");return r.setAttribute("data-reka-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}function vl(r){return F(()=>Cr(r)?!!Nn(r)?.closest("form"):!0)}function bl(r,e){const t=el(!1,300);id(()=>{t.value=!1});const i=z(null),n=tl();function s(){i.value=null,t.value=!1}function a(o,l){const u=o.currentTarget,c={x:o.clientX,y:o.clientY},h=Ed(c,u.getBoundingClientRect()),f=Od(c,h,1),m=zd(l.getBoundingClientRect()),p=Td([...f,...m]);i.value=p,t.value=!0}return vt(o=>{if(r.value&&e.value){const l=c=>a(c,e.value),u=c=>a(c,r.value);r.value.addEventListener("pointerleave",l),e.value.addEventListener("pointerleave",u),o(()=>{r.value?.removeEventListener("pointerleave",l),e.value?.removeEventListener("pointerleave",u)})}}),vt(o=>{if(i.value){const l=u=>{if(!i.value||!(u.target instanceof Element))return;const c=u.target,h={x:u.clientX,y:u.clientY},f=r.value?.contains(c)||e.value?.contains(c),m=!Id(h,i.value),p=!!c.closest("[data-grace-area-trigger]");f?s():(m||p)&&(s(),n.trigger())};r.value?.ownerDocument.addEventListener("pointermove",l),o(()=>r.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:t,onPointerExit:n.on}}function Ed(r,e){const t=Math.abs(e.top-r.y),i=Math.abs(e.bottom-r.y),n=Math.abs(e.right-r.x),s=Math.abs(e.left-r.x);switch(Math.min(t,i,n,s)){case s:return"left";case n:return"right";case t:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function Od(r,e,t=5){const i=[];switch(e){case"top":i.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":i.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":i.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":i.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return i}function zd(r){const{top:e,right:t,bottom:i,left:n}=r;return[{x:n,y:e},{x:t,y:e},{x:t,y:i},{x:n,y:i}]}function Id(r,e){const{x:t,y:i}=r;let n=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const o=e[s].x,l=e[s].y,u=e[a].x,c=e[a].y;l>i!=c>i&&t<(u-o)*(i-l)/(c-l)+o&&(n=!n)}return n}function Td(r){const e=r.slice();return e.sort((t,i)=>t.x<i.x?-1:t.x>i.x?1:t.y<i.y?-1:t.y>i.y?1:0),Pd(e)}function Pd(r){if(r.length<=1)return r.slice();const e=[];for(let i=0;i<r.length;i++){const n=r[i];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(n.y-a.y)>=(s.y-a.y)*(n.x-a.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let i=r.length-1;i>=0;i--){const n=r[i];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(n.y-a.y)>=(s.y-a.y)*(n.x-a.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Dd=function(r){if(typeof document>"u")return null;var e=Array.isArray(r)?r[0]:r;return e.ownerDocument.body},Ti=new WeakMap,Qr=new WeakMap,en={},as=0,xl=function(r){return r&&(r.host||xl(r.parentNode))},Rd=function(r,e){return e.map(function(t){if(r.contains(t))return t;var i=xl(t);return i&&r.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",r,". Doing nothing"),null)}).filter(function(t){return!!t})},$d=function(r,e,t,i){var n=Rd(e,Array.isArray(r)?r:[r]);en[t]||(en[t]=new WeakMap);var s=en[t],a=[],o=new Set,l=new Set(n),u=function(h){!h||o.has(h)||(o.add(h),u(h.parentNode))};n.forEach(u);var c=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(f){if(o.has(f))c(f);else try{var m=f.getAttribute(i),p=m!==null&&m!=="false",g=(Ti.get(f)||0)+1,y=(s.get(f)||0)+1;Ti.set(f,g),s.set(f,y),a.push(f),g===1&&p&&Qr.set(f,!0),y===1&&f.setAttribute(t,"true"),p||f.setAttribute(i,"true")}catch(w){console.error("aria-hidden: cannot operate on ",f,w)}})};return c(e),o.clear(),as++,function(){a.forEach(function(h){var f=Ti.get(h)-1,m=s.get(h)-1;Ti.set(h,f),s.set(h,m),f||(Qr.has(h)||h.removeAttribute(i),Qr.delete(h)),m||h.removeAttribute(t)}),as--,as||(Ti=new WeakMap,Ti=new WeakMap,Qr=new WeakMap,en={})}},Ld=function(r,e,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(r)?r:[r]),n=Dd(r);return n?(i.push.apply(i,Array.from(n.querySelectorAll("[aria-live], script"))),$d(i,n,t,"aria-hidden")):function(){return null}};function fa(r){let e;je(()=>Nn(r),t=>{t?e=Ld(t):e&&e()}),qi(()=>{e&&e()})}function bt(r,e="reka"){return`${e}-${il?.()}`}function Hd(r){const e=na({locale:z("en")});return F(()=>r?.value||e.locale?.value||"en")}function Nd(r){const e=z(),t=F(()=>e.value?.width??0),i=F(()=>e.value?.height??0);return Ge(()=>{const n=Nn(r);if(n){e.value={width:n.offsetWidth,height:n.offsetHeight};const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,u;if("borderBoxSize"in o){const c=o.borderBoxSize,h=Array.isArray(c)?c[0]:c;l=h.inlineSize,u=h.blockSize}else l=n.offsetWidth,u=n.offsetHeight;e.value={width:l,height:u}});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else e.value=void 0}),{width:t,height:i}}function Vd(r){const e=el("",1e3);return{search:e,handleTypeaheadSearch:(n,s)=>{e.value=e.value+n;{const a=gt(),o=s.map(f=>({...f,textValue:f.value?.textValue??f.ref.textContent?.trim()??""})),l=o.find(f=>f.ref===a),u=o.map(f=>f.textValue),c=Ud(u,e.value,l?.textValue),h=o.find(f=>f.textValue===c);return h&&h.ref.focus(),h?.ref}},resetTypeahead:()=>{e.value=""}}}function jd(r,e){return r.map((t,i)=>r[(e+i)%r.length])}function Ud(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=t?r.indexOf(t):-1;let a=jd(r,Math.max(s,0));n.length===1&&(a=a.filter(u=>u!==t));const l=a.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==t?l:void 0}const[Nt,Gd]=Pe("DialogRoot");var Wd=I({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(r,{emit:e}){const t=r,n=Je(t,"open",e,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=z(),a=z(),{modal:o}=xt(t);return Gd({open:n,modal:o,openModal:()=>{n.value=!0},onOpenChange:l=>{n.value=l},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:a}),(l,u)=>S(l.$slots,"default",{open:d(n),close:()=>n.value=!1})}}),pa=Wd,Kd=I({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r;Z();const t=Nt();return(i,n)=>(v(),A(d(ne),H(e,{type:i.as==="button"?"button":void 0,onClick:n[0]||(n[0]=s=>d(t).onOpenChange(!1))}),{default:_(()=>[S(i.$slots,"default")]),_:3},16,["type"]))}}),wl=Kd;const Xd=rd(()=>z([]));function Yd(){const r=Xd();return{add(e){const t=r.value[0];e!==t&&t?.pause(),r.value=Xa(r.value,e),r.value.unshift(e)},remove(e){r.value=Xa(r.value,e),r.value[0]?.resume()}}}function Xa(r,e){const t=[...r],i=t.indexOf(e);return i!==-1&&t.splice(i,1),t}var Jd=I({__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(r,{emit:e}){const t=r,i=e,{currentRef:n,currentElement:s}=Z(),a=z(null),o=Yd(),l=sa({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});vt(c=>{if(!Fr)return;const h=s.value;if(!t.trapped)return;function f(y){if(l.paused||!h)return;const w=y.target;h.contains(w)?a.value=w:yi(a.value,{select:!0})}function m(y){if(l.paused||!h)return;const w=y.relatedTarget;w!==null&&(h.contains(w)||yi(a.value,{select:!0}))}function p(y){h.contains(a.value)||yi(h)}document.addEventListener("focusin",f),document.addEventListener("focusout",m);const g=new MutationObserver(p);h&&g.observe(h,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",m),g.disconnect()})}),vt(async c=>{const h=s.value;if(await nt(),!h)return;o.add(l);const f=gt();if(!h.contains(f)){const p=new CustomEvent(is,Ua);h.addEventListener(is,g=>i("mountAutoFocus",g)),h.dispatchEvent(p),p.defaultPrevented||(sd(ad(h),{select:!0}),gt()===f&&yi(h))}c(()=>{h.removeEventListener(is,y=>i("mountAutoFocus",y));const p=new CustomEvent(rs,Ua),g=y=>{i("unmountAutoFocus",y)};h.addEventListener(rs,g),h.dispatchEvent(p),setTimeout(()=>{p.defaultPrevented||yi(f??document.body,{select:!0}),h.removeEventListener(rs,g),o.remove(l)},0)})});function u(c){if(!t.loop&&!t.trapped||l.paused)return;const h=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,f=gt();if(h&&f){const m=c.currentTarget,[p,g]=nd(m);p&&g?!c.shiftKey&&f===g?(c.preventDefault(),t.loop&&yi(p,{select:!0})):c.shiftKey&&f===p&&(c.preventDefault(),t.loop&&yi(g,{select:!0})):f===m&&c.preventDefault()}}return(c,h)=>(v(),A(d(ne),{ref_key:"currentRef",ref:n,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:_(()=>[S(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),ma=Jd;const Zd="menu.itemSelect",$s=["Enter"," "],Qd=["ArrowDown","PageUp","Home"],_l=["ArrowUp","PageDown","End"],ec=[...Qd,..._l],tc={ltr:[...$s,"ArrowRight"],rtl:[...$s,"ArrowLeft"]},ic={ltr:["ArrowLeft"],rtl:["ArrowRight"]};function ga(r){return r?"open":"closed"}function Fn(r){return r==="indeterminate"}function ya(r){return Fn(r)?"indeterminate":r?"checked":"unchecked"}function rc(r){const e=gt();for(const t of r)if(t===e||(t.focus(),gt()!==e))return}function nc(r,e){const{x:t,y:i}=r;let n=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const o=e[s].x,l=e[s].y,u=e[a].x,c=e[a].y;l>i!=c>i&&t<(u-o)*(i-l)/(c-l)+o&&(n=!n)}return n}function sc(r,e){if(!e)return!1;const t={x:r.clientX,y:r.clientY};return nc(t,e)}function Mr(r){return r.pointerType==="mouse"}var ac=I({__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(r,{emit:e}){const t=r,i=e,n=Nt(),{forwardRef:s,currentElement:a}=Z();return n.titleId||=bt(void 0,"reka-dialog-title"),n.descriptionId||=bt(void 0,"reka-dialog-description"),Ge(()=>{n.contentElement=a,gt()!==document.body&&(n.triggerElement.value=gt())}),(o,l)=>(v(),A(d(ma),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>i("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>i("closeAutoFocus",u))},{default:_(()=>[E(d(Or),H({id:d(n).contentId,ref:d(s),as:o.as,"as-child":o.asChild,"disable-outside-pointer-events":o.disableOutsidePointerEvents,role:"dialog","aria-describedby":d(n).descriptionId,"aria-labelledby":d(n).titleId,"data-state":d(ga)(d(n).open.value)},o.$attrs,{onDismiss:l[0]||(l[0]=u=>d(n).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>i("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>i("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>i("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>i("pointerDownOutside",u))}),{default:_(()=>[S(o.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Cl=ac,oc=I({__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(r,{emit:e}){const t=r,i=e,n=Nt(),s=or(i),{forwardRef:a,currentElement:o}=Z();return fa(o),(l,u)=>(v(),A(Cl,H({...t,...d(s)},{ref:d(a),"trap-focus":d(n).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{c.defaultPrevented||(c.preventDefault(),d(n).triggerElement.value?.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const h=c.detail.originalEvent,f=h.button===0&&h.ctrlKey===!0;(h.button===2||f)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()})}),{default:_(()=>[S(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),lc=oc,uc=I({__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(r,{emit:e}){const t=r,n=or(e);Z();const s=Nt(),a=z(!1),o=z(!1);return(l,u)=>(v(),A(Cl,H({...t,...d(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{c.defaultPrevented||(a.value||d(s).triggerElement.value?.focus(),c.preventDefault()),a.value=!1,o.value=!1}),onInteractOutside:u[1]||(u[1]=c=>{c.defaultPrevented||(a.value=!0,c.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const h=c.target;d(s).triggerElement.value?.contains(h)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.value&&c.preventDefault()})}),{default:_(()=>[S(l.$slots,"default")]),_:3},16))}}),dc=uc,cc=I({__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(r,{emit:e}){const t=r,i=e,n=Nt(),s=or(i),{forwardRef:a}=Z();return(o,l)=>(v(),A(d(Ht),{present:o.forceMount||d(n).open.value},{default:_(()=>[d(n).modal.value?(v(),A(lc,H({key:0,ref:d(a)},{...t,...d(s),...o.$attrs}),{default:_(()=>[S(o.$slots,"default")]),_:3},16)):(v(),A(dc,H({key:1,ref:d(a)},{...t,...d(s),...o.$attrs}),{default:_(()=>[S(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),va=cc,hc=I({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(r){const e=r;Z();const t=Nt();return(i,n)=>(v(),A(d(ne),H(e,{id:d(t).descriptionId}),{default:_(()=>[S(i.$slots,"default")]),_:3},16,["id"]))}}),nr=hc,fc=I({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=Nt();return ha(!0),Z(),(t,i)=>(v(),A(d(ne),{as:t.as,"as-child":t.asChild,"data-state":d(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:_(()=>[S(t.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),pc=fc,mc=I({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=Nt(),{forwardRef:t}=Z();return(i,n)=>d(e)?.modal.value?(v(),A(d(Ht),{key:0,present:i.forceMount||d(e).open.value},{default:_(()=>[E(pc,H(i.$attrs,{ref:d(t),as:i.as,"as-child":i.asChild}),{default:_(()=>[S(i.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):R("v-if",!0)}}),En=mc,gc=I({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(d(zr),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),ba=gc,yc=I({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(r){const e=r,t=Nt();return Z(),(i,n)=>(v(),A(d(ne),H(e,{id:d(t).titleId}),{default:_(()=>[S(i.$slots,"default")]),_:3},16,["id"]))}}),sr=yc,vc=I({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Nt(),{forwardRef:i,currentElement:n}=Z();return t.contentId||=bt(void 0,"reka-dialog-content"),Ge(()=>{t.triggerElement.value=n.value}),(s,a)=>(v(),A(d(ne),H(e,{ref:d(i),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":d(t).open.value||!1,"aria-controls":d(t).open.value?d(t).contentId:void 0,"data-state":d(t).open.value?"open":"closed",onClick:d(t).onOpenToggle}),{default:_(()=>[S(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),xa=vc;const bc="rovingFocusGroup.onEntryFocus",xc={bubbles:!1,cancelable:!0},wc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _c(r,e){return e!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}function Cc(r,e,t){const i=_c(r.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return wc[i]}function Al(r,e=!1){const t=gt();for(const i of r)if(i===t||(i.focus({preventScroll:e}),gt()!==t))return}function Ac(r,e){return r.map((t,i)=>r[(e+i)%r.length])}const[Sc,Mc]=Pe("RovingFocusGroup");var Bc=I({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(r,{expose:e,emit:t}){const i=r,n=t,{loop:s,orientation:a,dir:o}=xt(i),l=Vn(o),u=Je(i,"currentTabStopId",n,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),c=z(!1),h=z(!1),f=z(0),{getItems:m,CollectionSlot:p}=aa({isProvider:!0});function g(w){const x=!h.value;if(w.currentTarget&&w.target===w.currentTarget&&x&&!c.value){const b=new CustomEvent(bc,xc);if(w.currentTarget.dispatchEvent(b),n("entryFocus",b),!b.defaultPrevented){const C=m().map(k=>k.ref).filter(k=>k.dataset.disabled!==""),q=C.find(k=>k.getAttribute("data-active")===""),M=C.find(k=>k.getAttribute("data-highlighted")===""),B=C.find(k=>k.id===u.value),T=[q,M,B,...C].filter(Boolean);Al(T,i.preventScrollOnEntryFocus)}}h.value=!1}function y(){setTimeout(()=>{h.value=!1},1)}return e({getItems:m}),Mc({loop:s,dir:l,orientation:a,currentTabStopId:u,onItemFocus:w=>{u.value=w},onItemShiftTab:()=>{c.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(w,x)=>(v(),A(d(p),null,{default:_(()=>[E(d(ne),{tabindex:c.value||f.value===0?-1:0,"data-orientation":d(a),as:w.as,"as-child":w.asChild,dir:d(l),style:{outline:"none"},onMousedown:x[0]||(x[0]=b=>h.value=!0),onMouseup:y,onFocus:g,onBlur:x[1]||(x[1]=b=>c.value=!1)},{default:_(()=>[S(w.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Sl=Bc,qc=I({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const e=r,t=Sc(),i=bt(),n=F(()=>e.tabStopId||i),s=F(()=>t.currentTabStopId.value===n.value),{getItems:a,CollectionItem:o}=aa();Ge(()=>{e.focusable&&t.onFocusableItemAdd()}),qi(()=>{e.focusable&&t.onFocusableItemRemove()});function l(u){if(u.key==="Tab"&&u.shiftKey){t.onItemShiftTab();return}if(u.target!==u.currentTarget)return;const c=Cc(u,t.orientation.value,t.dir.value);if(c!==void 0){if(u.metaKey||u.ctrlKey||u.altKey||!e.allowShiftKey&&u.shiftKey)return;u.preventDefault();let h=[...a().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(c==="last")h.reverse();else if(c==="prev"||c==="next"){c==="prev"&&h.reverse();const f=h.indexOf(u.currentTarget);h=t.loop.value?Ac(h,f+1):h.slice(f+1)}nt(()=>Al(h))}}return(u,c)=>(v(),A(d(o),null,{default:_(()=>[E(d(ne),{tabindex:s.value?0:-1,"data-orientation":d(t).orientation.value,"data-active":u.active?"":void 0,"data-disabled":u.focusable?void 0:"",as:u.as,"as-child":u.asChild,onMousedown:c[0]||(c[0]=h=>{u.focusable?d(t).onItemFocus(n.value):h.preventDefault()}),onFocus:c[1]||(c[1]=h=>d(t).onItemFocus(n.value)),onKeydown:l},{default:_(()=>[S(u.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),Ml=qc,kc=I({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(r){const e=r,{primitiveElement:t,currentElement:i}=Ir(),n=F(()=>e.checked??e.value);return je(n,(s,a)=>{if(!i.value)return;const o=i.value,l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(c&&s!==a){const h=new Event("input",{bubbles:!0}),f=new Event("change",{bubbles:!0});c.call(o,s),o.dispatchEvent(h),o.dispatchEvent(f)}}),(s,a)=>(v(),A(Tr,H({ref_key:"primitiveElement",ref:t},{...e,...s.$attrs},{as:"input"}),null,16))}}),Ya=kc,Fc=I({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(r){const e=r,t=F(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),i=F(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((n,s)=>typeof n=="object"?Object.entries(n).map(([a,o])=>({name:`${e.name}[${s}][${a}]`,value:o})):{name:`${e.name}[${s}]`,value:n}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([n,s])=>({name:`${e.name}[${n}]`,value:s})):[]);return(n,s)=>(v(),V(xe,null,[R(" We render single input if it's required "),t.value?(v(),A(Ya,H({key:n.name},{...e,...n.$attrs},{name:n.name,value:n.value}),null,16,["name","value"])):(v(!0),V(xe,{key:1},Xe(i.value,a=>(v(),A(Ya,H({key:a.name},{ref_for:!0},{...e,...n.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))],2112))}}),Bl=Fc;const[Ec]=Pe("CheckboxGroupRoot");function On(r){return r==="indeterminate"}function ql(r){return On(r)?"indeterminate":r?"checked":"unchecked"}const[Oc,zc]=Pe("CheckboxRoot");var Ic=I({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:[Boolean,String],required:!1},modelValue:{type:[Boolean,String,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},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(r,{emit:e}){const t=r,i=e,{forwardRef:n,currentElement:s}=Z(),a=Ec(null),o=Je(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),l=F(()=>a?.disabled.value||t.disabled),u=F(()=>Zi(a?.modelValue.value)?o.value==="indeterminate"?"indeterminate":o.value:Wa(a.modelValue.value,t.value));function c(){if(Zi(a?.modelValue.value))o.value=On(o.value)?!0:!o.value;else{const m=[...a.modelValue.value||[]];if(Wa(m,t.value)){const p=m.findIndex(g=>Rs(g,t.value));m.splice(p,1)}else m.push(t.value);a.modelValue.value=m}}const h=vl(s),f=F(()=>t.id&&s.value?document.querySelector(`[for="${t.id}"]`)?.innerText:void 0);return zc({disabled:l,state:u}),(m,p)=>(v(),A(lr(d(a)?.rovingFocus.value?d(Ml):d(ne)),H(m.$attrs,{id:m.id,ref:d(n),role:"checkbox","as-child":m.asChild,as:m.as,type:m.as==="button"?"button":void 0,"aria-checked":d(On)(u.value)?"mixed":u.value,"aria-required":m.required,"aria-label":m.$attrs["aria-label"]||f.value,"data-state":d(ql)(u.value),"data-disabled":l.value?"":void 0,disabled:l.value,focusable:d(a)?.rovingFocus.value?!l.value:void 0,onKeydown:pt(fe(()=>{},["prevent"]),["enter"]),onClick:c}),{default:_(()=>[S(m.$slots,"default",{modelValue:d(o),state:u.value}),d(h)&&m.name&&!d(a)?(v(),A(d(Bl),{key:0,type:"checkbox",checked:!!u.value,name:m.name,value:m.value,disabled:l.value,required:m.required},null,8,["checked","name","value","disabled","required"])):R("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"]))}}),Tc=Ic,Pc=I({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const{forwardRef:e}=Z(),t=Oc();return(i,n)=>(v(),A(d(Ht),{present:i.forceMount||d(On)(d(t).state.value)||d(t).state.value===!0},{default:_(()=>[E(d(ne),H({ref:d(e),"data-state":d(ql)(d(t).state.value),"data-disabled":d(t).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":i.asChild,as:i.as},i.$attrs),{default:_(()=>[S(i.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),Dc=Pc;const[kl,Rc]=Pe("PopperRoot");var $c=I({inheritAttrs:!1,__name:"PopperRoot",setup(r){const e=z();return Rc({anchor:e,onAnchorChange:t=>e.value=t}),(t,i)=>S(t.$slots,"default")}}),Dr=$c,Lc=I({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,{forwardRef:t,currentElement:i}=Z(),n=kl();return oa(()=>{n.onAnchorChange(e.reference??i.value)}),(s,a)=>(v(),A(d(ne),{ref:d(t),as:s.as,"as-child":s.asChild},{default:_(()=>[S(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),Rr=Lc;const Hc={key:0,d:"M0 0L6 6L12 0"},Nc={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Vc=I({__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(r){const e=r;return Z(),(t,i)=>(v(),A(d(ne),H(e,{width:t.width,height:t.height,viewBox:t.asChild?void 0:"0 0 12 6",preserveAspectRatio:t.asChild?void 0:"none"}),{default:_(()=>[S(t.$slots,"default",{},()=>[t.rounded?(v(),V("path",Nc)):(v(),V("path",Hc))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),jc=Vc;function Uc(r){return r!==null}function Gc(r){return{name:"transformOrigin",options:r,fn(e){const{placement:t,rects:i,middlewareData:n}=e,a=n.arrow?.centerOffset!==0,o=a?0:r.arrowWidth,l=a?0:r.arrowHeight,[u,c]=Ls(t),h={start:"0%",center:"50%",end:"100%"}[c],f=(n.arrow?.x??0)+o/2,m=(n.arrow?.y??0)+l/2;let p="",g="";return u==="bottom"?(p=a?h:`${f}px`,g=`${-l}px`):u==="top"?(p=a?h:`${f}px`,g=`${i.floating.height+l}px`):u==="right"?(p=`${-l}px`,g=a?h:`${m}px`):u==="left"&&(p=`${i.floating.width+l}px`,g=a?h:`${m}px`),{data:{x:p,y:g}}}}}function Ls(r){const[e,t="center"]=r.split("-");return[e,t]}const Wc=["top","right","bottom","left"],li=Math.min,lt=Math.max,zn=Math.round,tn=Math.floor,$t=r=>({x:r,y:r}),Kc={left:"right",right:"left",bottom:"top",top:"bottom"},Xc={start:"end",end:"start"};function Hs(r,e,t){return lt(r,li(e,t))}function Jt(r,e){return typeof r=="function"?r(e):r}function Zt(r){return r.split("-")[0]}function hr(r){return r.split("-")[1]}function wa(r){return r==="x"?"y":"x"}function _a(r){return r==="y"?"height":"width"}const Yc=new Set(["top","bottom"]);function Rt(r){return Yc.has(Zt(r))?"y":"x"}function Ca(r){return wa(Rt(r))}function Jc(r,e,t){t===void 0&&(t=!1);const i=hr(r),n=Ca(r),s=_a(n);let a=n==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=In(a)),[a,In(a)]}function Zc(r){const e=In(r);return[Ns(r),e,Ns(e)]}function Ns(r){return r.replace(/start|end/g,e=>Xc[e])}const Ja=["left","right"],Za=["right","left"],Qc=["top","bottom"],eh=["bottom","top"];function th(r,e,t){switch(r){case"top":case"bottom":return t?e?Za:Ja:e?Ja:Za;case"left":case"right":return e?Qc:eh;default:return[]}}function ih(r,e,t,i){const n=hr(r);let s=th(Zt(r),t==="start",i);return n&&(s=s.map(a=>a+"-"+n),e&&(s=s.concat(s.map(Ns)))),s}function In(r){return r.replace(/left|right|bottom|top/g,e=>Kc[e])}function rh(r){return{top:0,right:0,bottom:0,left:0,...r}}function Fl(r){return typeof r!="number"?rh(r):{top:r,right:r,bottom:r,left:r}}function Tn(r){const{x:e,y:t,width:i,height:n}=r;return{width:i,height:n,top:t,left:e,right:e+i,bottom:t+n,x:e,y:t}}function Qa(r,e,t){let{reference:i,floating:n}=r;const s=Rt(e),a=Ca(e),o=_a(a),l=Zt(e),u=s==="y",c=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2,f=i[o]/2-n[o]/2;let m;switch(l){case"top":m={x:c,y:i.y-n.height};break;case"bottom":m={x:c,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:h};break;case"left":m={x:i.x-n.width,y:h};break;default:m={x:i.x,y:i.y}}switch(hr(e)){case"start":m[a]-=f*(t&&u?-1:1);break;case"end":m[a]+=f*(t&&u?-1:1);break}return m}async function nh(r,e){var t;e===void 0&&(e={});const{x:i,y:n,platform:s,rects:a,elements:o,strategy:l}=r,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=Jt(e,r),p=Fl(m),y=o[f?h==="floating"?"reference":"floating":h],w=Tn(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(y)))==null||t?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),x=h==="floating"?{x:i,y:n,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},q=Tn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:x,offsetParent:b,strategy:l}):x);return{top:(w.top-q.top+p.top)/C.y,bottom:(q.bottom-w.bottom+p.bottom)/C.y,left:(w.left-q.left+p.left)/C.x,right:(q.right-w.right+p.right)/C.x}}const sh=async(r,e,t)=>{const{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:a}=t,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:r,floating:e,strategy:n}),{x:c,y:h}=Qa(u,i,l),f=i,m={},p=0;for(let y=0;y<o.length;y++){var g;const{name:w,fn:x}=o[y],{x:b,y:C,data:q,reset:M}=await x({x:c,y:h,initialPlacement:i,placement:f,strategy:n,middlewareData:m,rects:u,platform:{...a,detectOverflow:(g=a.detectOverflow)!=null?g:nh},elements:{reference:r,floating:e}});c=b??c,h=C??h,m={...m,[w]:{...m[w],...q}},M&&p<=50&&(p++,typeof M=="object"&&(M.placement&&(f=M.placement),M.rects&&(u=M.rects===!0?await a.getElementRects({reference:r,floating:e,strategy:n}):M.rects),{x:c,y:h}=Qa(u,f,l)),y=-1)}return{x:c,y:h,placement:f,strategy:n,middlewareData:m}},ah=r=>({name:"arrow",options:r,async fn(e){const{x:t,y:i,placement:n,rects:s,platform:a,elements:o,middlewareData:l}=e,{element:u,padding:c=0}=Jt(r,e)||{};if(u==null)return{};const h=Fl(c),f={x:t,y:i},m=Ca(n),p=_a(m),g=await a.getDimensions(u),y=m==="y",w=y?"top":"left",x=y?"bottom":"right",b=y?"clientHeight":"clientWidth",C=s.reference[p]+s.reference[m]-f[m]-s.floating[p],q=f[m]-s.reference[m],M=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let B=M?M[b]:0;(!B||!await(a.isElement==null?void 0:a.isElement(M)))&&(B=o.floating[b]||s.floating[p]);const T=C/2-q/2,k=B/2-g[p]/2-1,$=li(h[w],k),N=li(h[x],k),U=$,Q=B-g[p]-N,ie=B/2-g[p]/2+T,X=Hs(U,ie,Q),Y=!l.arrow&&hr(n)!=null&&ie!==X&&s.reference[p]/2-(ie<U?$:N)-g[p]/2<0,ce=Y?ie<U?ie-U:ie-Q:0;return{[m]:f[m]+ce,data:{[m]:X,centerOffset:ie-X-ce,...Y&&{alignmentOffset:ce}},reset:Y}}}),oh=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t,i;const{placement:n,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=Jt(r,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const w=Zt(n),x=Rt(o),b=Zt(o)===o,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),q=f||(b||!g?[In(o)]:Zc(o)),M=p!=="none";!f&&M&&q.push(...ih(o,g,p,C));const B=[o,...q],T=await l.detectOverflow(e,y),k=[];let $=((i=s.flip)==null?void 0:i.overflows)||[];if(c&&k.push(T[w]),h){const ie=Jc(n,a,C);k.push(T[ie[0]],T[ie[1]])}if($=[...$,{placement:n,overflows:k}],!k.every(ie=>ie<=0)){var N,U;const ie=(((N=s.flip)==null?void 0:N.index)||0)+1,X=B[ie];if(X&&(!(h==="alignment"?x!==Rt(X):!1)||$.every(K=>Rt(K.placement)===x?K.overflows[0]>0:!0)))return{data:{index:ie,overflows:$},reset:{placement:X}};let Y=(U=$.filter(ce=>ce.overflows[0]<=0).sort((ce,K)=>ce.overflows[1]-K.overflows[1])[0])==null?void 0:U.placement;if(!Y)switch(m){case"bestFit":{var Q;const ce=(Q=$.filter(K=>{if(M){const he=Rt(K.placement);return he===x||he==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(he=>he>0).reduce((he,te)=>he+te,0)]).sort((K,he)=>K[1]-he[1])[0])==null?void 0:Q[0];ce&&(Y=ce);break}case"initialPlacement":Y=o;break}if(n!==Y)return{reset:{placement:Y}}}return{}}}};function eo(r,e){return{top:r.top-e.height,right:r.right-e.width,bottom:r.bottom-e.height,left:r.left-e.width}}function to(r){return Wc.some(e=>r[e]>=0)}const lh=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(e){const{rects:t,platform:i}=e,{strategy:n="referenceHidden",...s}=Jt(r,e);switch(n){case"referenceHidden":{const a=await i.detectOverflow(e,{...s,elementContext:"reference"}),o=eo(a,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:to(o)}}}case"escaped":{const a=await i.detectOverflow(e,{...s,altBoundary:!0}),o=eo(a,t.floating);return{data:{escapedOffsets:o,escaped:to(o)}}}default:return{}}}}},El=new Set(["left","top"]);async function uh(r,e){const{placement:t,platform:i,elements:n}=r,s=await(i.isRTL==null?void 0:i.isRTL(n.floating)),a=Zt(t),o=hr(t),l=Rt(t)==="y",u=El.has(a)?-1:1,c=s&&l?-1:1,h=Jt(e,r);let{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof p=="number"&&(m=o==="end"?p*-1:p),l?{x:m*c,y:f*u}:{x:f*u,y:m*c}}const dh=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,i;const{x:n,y:s,placement:a,middlewareData:o}=e,l=await uh(e,r);return a===((t=o.offset)==null?void 0:t.placement)&&(i=o.arrow)!=null&&i.alignmentOffset?{}:{x:n+l.x,y:s+l.y,data:{...l,placement:a}}}}},ch=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:i,placement:n,platform:s}=e,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:w=>{let{x,y:b}=w;return{x,y:b}}},...u}=Jt(r,e),c={x:t,y:i},h=await s.detectOverflow(e,u),f=Rt(Zt(n)),m=wa(f);let p=c[m],g=c[f];if(a){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",b=p+h[w],C=p-h[x];p=Hs(b,p,C)}if(o){const w=f==="y"?"top":"left",x=f==="y"?"bottom":"right",b=g+h[w],C=g-h[x];g=Hs(b,g,C)}const y=l.fn({...e,[m]:p,[f]:g});return{...y,data:{x:y.x-t,y:y.y-i,enabled:{[m]:a,[f]:o}}}}}},hh=function(r){return r===void 0&&(r={}),{options:r,fn(e){const{x:t,y:i,placement:n,rects:s,middlewareData:a}=e,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=Jt(r,e),c={x:t,y:i},h=Rt(n),f=wa(h);let m=c[f],p=c[h];const g=Jt(o,e),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const b=f==="y"?"height":"width",C=s.reference[f]-s.floating[b]+y.mainAxis,q=s.reference[f]+s.reference[b]-y.mainAxis;m<C?m=C:m>q&&(m=q)}if(u){var w,x;const b=f==="y"?"width":"height",C=El.has(Zt(n)),q=s.reference[h]-s.floating[b]+(C&&((w=a.offset)==null?void 0:w[h])||0)+(C?0:y.crossAxis),M=s.reference[h]+s.reference[b]+(C?0:((x=a.offset)==null?void 0:x[h])||0)-(C?y.crossAxis:0);p<q?p=q:p>M&&(p=M)}return{[f]:m,[h]:p}}}},fh=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){var t,i;const{placement:n,rects:s,platform:a,elements:o}=e,{apply:l=()=>{},...u}=Jt(r,e),c=await a.detectOverflow(e,u),h=Zt(n),f=hr(n),m=Rt(n)==="y",{width:p,height:g}=s.floating;let y,w;h==="top"||h==="bottom"?(y=h,w=f===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(w=h,y=f==="end"?"top":"bottom");const x=g-c.top-c.bottom,b=p-c.left-c.right,C=li(g-c[y],x),q=li(p-c[w],b),M=!e.middlewareData.shift;let B=C,T=q;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(T=b),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(B=x),M&&!f){const $=lt(c.left,0),N=lt(c.right,0),U=lt(c.top,0),Q=lt(c.bottom,0);m?T=p-2*($!==0||N!==0?$+N:lt(c.left,c.right)):B=g-2*(U!==0||Q!==0?U+Q:lt(c.top,c.bottom))}await l({...e,availableWidth:T,availableHeight:B});const k=await a.getDimensions(o.floating);return p!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function jn(){return typeof window<"u"}function Fi(r){return Aa(r)?(r.nodeName||"").toLowerCase():"#document"}function dt(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Vt(r){var e;return(e=(Aa(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function Aa(r){return jn()?r instanceof Node||r instanceof dt(r).Node:!1}function Tt(r){return jn()?r instanceof Element||r instanceof dt(r).Element:!1}function Lt(r){return jn()?r instanceof HTMLElement||r instanceof dt(r).HTMLElement:!1}function io(r){return!jn()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof dt(r).ShadowRoot}const ph=new Set(["inline","contents"]);function $r(r){const{overflow:e,overflowX:t,overflowY:i,display:n}=Pt(r);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!ph.has(n)}const mh=new Set(["table","td","th"]);function gh(r){return mh.has(Fi(r))}const yh=[":popover-open",":modal"];function Un(r){return yh.some(e=>{try{return r.matches(e)}catch{return!1}})}const vh=["transform","translate","scale","rotate","perspective"],bh=["transform","translate","scale","rotate","perspective","filter"],xh=["paint","layout","strict","content"];function Sa(r){const e=Ma(),t=Tt(r)?Pt(r):r;return vh.some(i=>t[i]?t[i]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||bh.some(i=>(t.willChange||"").includes(i))||xh.some(i=>(t.contain||"").includes(i))}function wh(r){let e=ui(r);for(;Lt(e)&&!ar(e);){if(Sa(e))return e;if(Un(e))return null;e=ui(e)}return null}function Ma(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _h=new Set(["html","body","#document"]);function ar(r){return _h.has(Fi(r))}function Pt(r){return dt(r).getComputedStyle(r)}function Gn(r){return Tt(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function ui(r){if(Fi(r)==="html")return r;const e=r.assignedSlot||r.parentNode||io(r)&&r.host||Vt(r);return io(e)?e.host:e}function Ol(r){const e=ui(r);return ar(e)?r.ownerDocument?r.ownerDocument.body:r.body:Lt(e)&&$r(e)?e:Ol(e)}function Br(r,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const n=Ol(r),s=n===((i=r.ownerDocument)==null?void 0:i.body),a=dt(n);if(s){const o=Vs(a);return e.concat(a,a.visualViewport||[],$r(n)?n:[],o&&t?Br(o):[])}return e.concat(n,Br(n,[],t))}function Vs(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function zl(r){const e=Pt(r);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const n=Lt(r),s=n?r.offsetWidth:t,a=n?r.offsetHeight:i,o=zn(t)!==s||zn(i)!==a;return o&&(t=s,i=a),{width:t,height:i,$:o}}function Ba(r){return Tt(r)?r:r.contextElement}function Qi(r){const e=Ba(r);if(!Lt(e))return $t(1);const t=e.getBoundingClientRect(),{width:i,height:n,$:s}=zl(e);let a=(s?zn(t.width):t.width)/i,o=(s?zn(t.height):t.height)/n;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const Ch=$t(0);function Il(r){const e=dt(r);return!Ma()||!e.visualViewport?Ch:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ah(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==dt(r)?!1:e}function Mi(r,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const n=r.getBoundingClientRect(),s=Ba(r);let a=$t(1);e&&(i?Tt(i)&&(a=Qi(i)):a=Qi(r));const o=Ah(s,t,i)?Il(s):$t(0);let l=(n.left+o.x)/a.x,u=(n.top+o.y)/a.y,c=n.width/a.x,h=n.height/a.y;if(s){const f=dt(s),m=i&&Tt(i)?dt(i):i;let p=f,g=Vs(p);for(;g&&i&&m!==p;){const y=Qi(g),w=g.getBoundingClientRect(),x=Pt(g),b=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,C=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,h*=y.y,l+=b,u+=C,p=dt(g),g=Vs(p)}}return Tn({width:c,height:h,x:l,y:u})}function Wn(r,e){const t=Gn(r).scrollLeft;return e?e.left+t:Mi(Vt(r)).left+t}function Tl(r,e){const t=r.getBoundingClientRect(),i=t.left+e.scrollLeft-Wn(r,t),n=t.top+e.scrollTop;return{x:i,y:n}}function Sh(r){let{elements:e,rect:t,offsetParent:i,strategy:n}=r;const s=n==="fixed",a=Vt(i),o=e?Un(e.floating):!1;if(i===a||o&&s)return t;let l={scrollLeft:0,scrollTop:0},u=$t(1);const c=$t(0),h=Lt(i);if((h||!h&&!s)&&((Fi(i)!=="body"||$r(a))&&(l=Gn(i)),Lt(i))){const m=Mi(i);u=Qi(i),c.x=m.x+i.clientLeft,c.y=m.y+i.clientTop}const f=a&&!h&&!s?Tl(a,l):$t(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:t.y*u.y-l.scrollTop*u.y+c.y+f.y}}function Mh(r){return Array.from(r.getClientRects())}function Bh(r){const e=Vt(r),t=Gn(r),i=r.ownerDocument.body,n=lt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=lt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-t.scrollLeft+Wn(r);const o=-t.scrollTop;return Pt(i).direction==="rtl"&&(a+=lt(e.clientWidth,i.clientWidth)-n),{width:n,height:s,x:a,y:o}}const ro=25;function qh(r,e){const t=dt(r),i=Vt(r),n=t.visualViewport;let s=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){s=n.width,a=n.height;const c=Ma();(!c||c&&e==="fixed")&&(o=n.offsetLeft,l=n.offsetTop)}const u=Wn(i);if(u<=0){const c=i.ownerDocument,h=c.body,f=getComputedStyle(h),m=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(i.clientWidth-h.clientWidth-m);p<=ro&&(s-=p)}else u<=ro&&(s+=u);return{width:s,height:a,x:o,y:l}}const kh=new Set(["absolute","fixed"]);function Fh(r,e){const t=Mi(r,!0,e==="fixed"),i=t.top+r.clientTop,n=t.left+r.clientLeft,s=Lt(r)?Qi(r):$t(1),a=r.clientWidth*s.x,o=r.clientHeight*s.y,l=n*s.x,u=i*s.y;return{width:a,height:o,x:l,y:u}}function no(r,e,t){let i;if(e==="viewport")i=qh(r,t);else if(e==="document")i=Bh(Vt(r));else if(Tt(e))i=Fh(e,t);else{const n=Il(r);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Tn(i)}function Pl(r,e){const t=ui(r);return t===e||!Tt(t)||ar(t)?!1:Pt(t).position==="fixed"||Pl(t,e)}function Eh(r,e){const t=e.get(r);if(t)return t;let i=Br(r,[],!1).filter(o=>Tt(o)&&Fi(o)!=="body"),n=null;const s=Pt(r).position==="fixed";let a=s?ui(r):r;for(;Tt(a)&&!ar(a);){const o=Pt(a),l=Sa(a);!l&&o.position==="fixed"&&(n=null),(s?!l&&!n:!l&&o.position==="static"&&!!n&&kh.has(n.position)||$r(a)&&!l&&Pl(r,a))?i=i.filter(c=>c!==a):n=o,a=ui(a)}return e.set(r,i),i}function Oh(r){let{element:e,boundary:t,rootBoundary:i,strategy:n}=r;const a=[...t==="clippingAncestors"?Un(e)?[]:Eh(e,this._c):[].concat(t),i],o=a[0],l=a.reduce((u,c)=>{const h=no(e,c,n);return u.top=lt(h.top,u.top),u.right=li(h.right,u.right),u.bottom=li(h.bottom,u.bottom),u.left=lt(h.left,u.left),u},no(e,o,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function zh(r){const{width:e,height:t}=zl(r);return{width:e,height:t}}function Ih(r,e,t){const i=Lt(e),n=Vt(e),s=t==="fixed",a=Mi(r,!0,s,e);let o={scrollLeft:0,scrollTop:0};const l=$t(0);function u(){l.x=Wn(n)}if(i||!i&&!s)if((Fi(e)!=="body"||$r(n))&&(o=Gn(e)),i){const m=Mi(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else n&&u();s&&!i&&n&&u();const c=n&&!i&&!s?Tl(n,o):$t(0),h=a.left+o.scrollLeft-l.x-c.x,f=a.top+o.scrollTop-l.y-c.y;return{x:h,y:f,width:a.width,height:a.height}}function os(r){return Pt(r).position==="static"}function so(r,e){if(!Lt(r)||Pt(r).position==="fixed")return null;if(e)return e(r);let t=r.offsetParent;return Vt(r)===t&&(t=t.ownerDocument.body),t}function Dl(r,e){const t=dt(r);if(Un(r))return t;if(!Lt(r)){let n=ui(r);for(;n&&!ar(n);){if(Tt(n)&&!os(n))return n;n=ui(n)}return t}let i=so(r,e);for(;i&&gh(i)&&os(i);)i=so(i,e);return i&&ar(i)&&os(i)&&!Sa(i)?t:i||wh(r)||t}const Th=async function(r){const e=this.getOffsetParent||Dl,t=this.getDimensions,i=await t(r.floating);return{reference:Ih(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Ph(r){return Pt(r).direction==="rtl"}const Dh={convertOffsetParentRelativeRectToViewportRelativeRect:Sh,getDocumentElement:Vt,getClippingRect:Oh,getOffsetParent:Dl,getElementRects:Th,getClientRects:Mh,getDimensions:zh,getScale:Qi,isElement:Tt,isRTL:Ph};function Rl(r,e){return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}function Rh(r,e){let t=null,i;const n=Vt(r);function s(){var o;clearTimeout(i),(o=t)==null||o.disconnect(),t=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const u=r.getBoundingClientRect(),{left:c,top:h,width:f,height:m}=u;if(o||e(),!f||!m)return;const p=tn(h),g=tn(n.clientWidth-(c+f)),y=tn(n.clientHeight-(h+m)),w=tn(c),b={rootMargin:-p+"px "+-g+"px "+-y+"px "+-w+"px",threshold:lt(0,li(1,l))||1};let C=!0;function q(M){const B=M[0].intersectionRatio;if(B!==l){if(!C)return a();B?a(!1,B):i=setTimeout(()=>{a(!1,1e-7)},1e3)}B===1&&!Rl(u,r.getBoundingClientRect())&&a(),C=!1}try{t=new IntersectionObserver(q,{...b,root:n.ownerDocument})}catch{t=new IntersectionObserver(q,b)}t.observe(r)}return a(!0),s}function $h(r,e,t,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=Ba(r),c=n||s?[...u?Br(u):[],...Br(e)]:[];c.forEach(w=>{n&&w.addEventListener("scroll",t,{passive:!0}),s&&w.addEventListener("resize",t)});const h=u&&o?Rh(u,t):null;let f=-1,m=null;a&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(e)})),t()}),u&&!l&&m.observe(u),m.observe(e));let p,g=l?Mi(r):null;l&&y();function y(){const w=Mi(r);g&&!Rl(g,w)&&t(),g=w,p=requestAnimationFrame(y)}return t(),()=>{var w;c.forEach(x=>{n&&x.removeEventListener("scroll",t),s&&x.removeEventListener("resize",t)}),h?.(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const Lh=dh,Hh=ch,ao=oh,Nh=fh,Vh=lh,jh=ah,Uh=hh,Gh=(r,e,t)=>{const i=new Map,n={platform:Dh,...t},s={...n.platform,_c:i};return sh(r,e,{...n,platform:s})};function Wh(r){return r!=null&&typeof r=="object"&&"$el"in r}function js(r){if(Wh(r)){const e=r.$el;return Aa(e)&&Fi(e)==="#comment"?null:e}return r}function Xi(r){return typeof r=="function"?r():d(r)}function Kh(r){return{name:"arrow",options:r,fn(e){const t=js(Xi(r.element));return t==null?{}:jh({element:t,padding:r.padding}).fn(e)}}}function $l(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function oo(r,e){const t=$l(r);return Math.round(e*t)/t}function Xh(r,e,t){t===void 0&&(t={});const i=t.whileElementsMounted,n=F(()=>{var B;return(B=Xi(t.open))!=null?B:!0}),s=F(()=>Xi(t.middleware)),a=F(()=>{var B;return(B=Xi(t.placement))!=null?B:"bottom"}),o=F(()=>{var B;return(B=Xi(t.strategy))!=null?B:"absolute"}),l=F(()=>{var B;return(B=Xi(t.transform))!=null?B:!0}),u=F(()=>js(r.value)),c=F(()=>js(e.value)),h=z(0),f=z(0),m=z(o.value),p=z(a.value),g=qn({}),y=z(!1),w=F(()=>{const B={position:m.value,left:"0",top:"0"};if(!c.value)return B;const T=oo(c.value,h.value),k=oo(c.value,f.value);return l.value?{...B,transform:"translate("+T+"px, "+k+"px)",...$l(c.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:T+"px",top:k+"px"}});let x;function b(){if(u.value==null||c.value==null)return;const B=n.value;Gh(u.value,c.value,{middleware:s.value,placement:a.value,strategy:o.value}).then(T=>{h.value=T.x,f.value=T.y,m.value=T.strategy,p.value=T.placement,g.value=T.middlewareData,y.value=B!==!1})}function C(){typeof x=="function"&&(x(),x=void 0)}function q(){if(C(),i===void 0){b();return}if(u.value!=null&&c.value!=null){x=i(u.value,c.value,b);return}}function M(){n.value||(y.value=!1)}return je([s,a,o,n],b,{flush:"sync"}),je([u,c],q,{flush:"sync"}),je(n,M,{flush:"sync"}),rl()&&nl(C),{x:Ii(h),y:Ii(f),strategy:Ii(m),placement:Ii(p),middlewareData:Ii(g),isPositioned:Ii(y),floatingStyles:w,update:b}}const Ll={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Yh,Jh]=Pe("PopperContent");var Zh=I({inheritAttrs:!1,__name:"PopperContent",props:sl({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},hideShiftedArrow:{type:Boolean,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}},{...Ll}),emits:["placed"],setup(r,{emit:e}){const t=r,i=e,n=kl(),{forwardRef:s,currentElement:a}=Z(),o=z(),l=z(),{width:u,height:c}=Nd(l),h=F(()=>t.side+(t.align!=="center"?`-${t.align}`:"")),f=F(()=>typeof t.collisionPadding=="number"?t.collisionPadding:{top:0,right:0,bottom:0,left:0,...t.collisionPadding}),m=F(()=>Array.isArray(t.collisionBoundary)?t.collisionBoundary:[t.collisionBoundary]),p=F(()=>({padding:f.value,boundary:m.value.filter(Uc),altBoundary:m.value.length>0})),g=F(()=>({mainAxis:t.sideFlip,crossAxis:t.alignFlip})),y=od(()=>[Lh({mainAxis:t.sideOffset+c.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&ao({...p.value,...g.value}),t.avoidCollisions&&Hh({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?Uh():void 0,...p.value}),!t.prioritizePosition&&t.avoidCollisions&&ao({...p.value,...g.value}),Nh({...p.value,apply:({elements:U,rects:Q,availableWidth:ie,availableHeight:X})=>{const{width:Y,height:ce}=Q.reference,K=U.floating.style;K.setProperty("--reka-popper-available-width",`${ie}px`),K.setProperty("--reka-popper-available-height",`${X}px`),K.setProperty("--reka-popper-anchor-width",`${Y}px`),K.setProperty("--reka-popper-anchor-height",`${ce}px`)}}),l.value&&Kh({element:l.value,padding:t.arrowPadding}),Gc({arrowWidth:u.value,arrowHeight:c.value}),t.hideWhenDetached&&Vh({strategy:"referenceHidden",...p.value})]),w=F(()=>t.reference??n.anchor.value),{floatingStyles:x,placement:b,isPositioned:C,middlewareData:q}=Xh(w,o,{strategy:t.positionStrategy,placement:h,whileElementsMounted:(...U)=>$h(...U,{layoutShift:!t.disableUpdateOnLayoutShift,animationFrame:t.updatePositionStrategy==="always"}),middleware:y}),M=F(()=>Ls(b.value)[0]),B=F(()=>Ls(b.value)[1]);oa(()=>{C.value&&i("placed")});const T=F(()=>{const U=q.value.arrow?.centerOffset!==0;return t.hideShiftedArrow&&U}),k=z("");vt(()=>{a.value&&(k.value=window.getComputedStyle(a.value).zIndex)});const $=F(()=>q.value.arrow?.x??0),N=F(()=>q.value.arrow?.y??0);return Jh({placedSide:M,onArrowChange:U=>l.value=U,arrowX:$,arrowY:N,shouldHideArrow:T}),(U,Q)=>(v(),V("div",{ref_key:"floatingRef",ref:o,"data-reka-popper-content-wrapper":"",style:Et({...d(x),transform:d(C)?d(x).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:k.value,"--reka-popper-transform-origin":[d(q).transformOrigin?.x,d(q).transformOrigin?.y].join(" "),...d(q).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[E(d(ne),H({ref:d(s)},U.$attrs,{"as-child":t.asChild,as:U.as,"data-side":M.value,"data-align":B.value,style:{animation:d(C)?void 0:"none"}}),{default:_(()=>[S(U.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),Kn=Zh;const Qh={top:"bottom",right:"left",bottom:"top",left:"right"};var ef=I({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(r){const{forwardRef:e}=Z(),t=Yh(),i=F(()=>Qh[t.placedSide.value]);return(n,s)=>(v(),V("span",{ref:a=>{d(t).onArrowChange(a)},style:Et({position:"absolute",left:d(t).arrowX?.value?`${d(t).arrowX?.value}px`:void 0,top:d(t).arrowY?.value?`${d(t).arrowY?.value}px`:void 0,[i.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d(t).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d(t).placedSide.value],visibility:d(t).shouldHideArrow.value?"hidden":void 0})},[E(jc,H(n.$attrs,{ref:d(e),style:{display:"block"},as:n.as,"as-child":n.asChild,rounded:n.rounded,width:n.width,height:n.height}),{default:_(()=>[S(n.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Xn=ef,tf=I({__name:"MenuAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(d(Rr),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Hl=tf,rf=I({__name:"MenuArrow",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}},setup(r){const e=r;return(t,i)=>(v(),A(d(Xn),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),nf=rf;function sf(){const r=z(!1);return Ge(()=>{Ft("keydown",()=>{r.value=!0},{capture:!0,passive:!0}),Ft(["pointerdown","pointermove"],()=>{r.value=!1},{capture:!0,passive:!0})}),r}const af=ra(sf),[Ei,Nl]=Pe(["MenuRoot","MenuSub"],"MenuContext"),[Lr,of]=Pe("MenuRoot");var lf=I({__name:"MenuRoot",props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(r,{emit:e}){const t=r,i=e,{modal:n,dir:s}=xt(t),a=Vn(s),o=Je(t,"open",i),l=z(),u=af();return Nl({open:o,onOpenChange:c=>{o.value=c},content:l,onContentChange:c=>{l.value=c}}),of({onClose:()=>{o.value=!1},isUsingKeyboardRef:u,dir:a,modal:n}),(c,h)=>(v(),A(d(Dr),null,{default:_(()=>[S(c.$slots,"default")]),_:3}))}}),uf=lf;const[qa,df]=Pe("MenuContent");var cf=I({__name:"MenuContentImpl",props:sl({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},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},hideShiftedArrow:{type:Boolean,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}},{...Ll}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(r,{emit:e}){const t=r,i=e,n=Ei(),s=Lr(),{trapFocus:a,disableOutsidePointerEvents:o,loop:l}=xt(t);yl(),ha(o.value);const u=z(""),c=z(0),h=z(0),f=z(null),m=z("right"),p=z(0),g=z(null),y=z(),{forwardRef:w,currentElement:x}=Z(),{handleTypeaheadSearch:b}=Vd();je(x,k=>{n.onContentChange(k)}),qi(()=>{window.clearTimeout(c.value)});function C(k){return m.value===f.value?.side&&sc(k,f.value?.area)}async function q(k){i("openAutoFocus",k),!k.defaultPrevented&&(k.preventDefault(),x.value?.focus({preventScroll:!0}))}function M(k){if(k.defaultPrevented)return;const N=k.target.closest("[data-reka-menu-content]")===k.currentTarget,U=k.ctrlKey||k.altKey||k.metaKey,Q=k.key.length===1,ie=qd(k,gt(),x.value,{loop:l.value,arrowKeyOptions:"vertical",dir:s?.dir.value,focus:!0,attributeName:"[data-reka-collection-item]:not([data-disabled])"});if(ie)return ie?.focus();if(k.code==="Space")return;const X=y.value?.getItems()??[];if(N&&(k.key==="Tab"&&k.preventDefault(),!U&&Q&&b(k.key,X)),k.target!==x.value||!ec.includes(k.key))return;k.preventDefault();const Y=[...X.map(ce=>ce.ref)];_l.includes(k.key)&&Y.reverse(),rc(Y)}function B(k){k?.currentTarget?.contains?.(k.target)||(window.clearTimeout(c.value),u.value="")}function T(k){if(!Mr(k))return;const $=k.target,N=p.value!==k.clientX;if(k?.currentTarget?.contains($)&&N){const U=k.clientX>p.value?"right":"left";m.value=U,p.value=k.clientX}}return df({onItemEnter:k=>!!C(k),onItemLeave:k=>{C(k)||(x.value?.focus(),g.value=null)},onTriggerLeave:k=>!!C(k),searchRef:u,pointerGraceTimerRef:h,onPointerGraceIntentChange:k=>{f.value=k}}),(k,$)=>(v(),A(d(ma),{"as-child":"",trapped:d(a),onMountAutoFocus:q,onUnmountAutoFocus:$[7]||($[7]=N=>i("closeAutoFocus",N))},{default:_(()=>[E(d(Or),{"as-child":"","disable-outside-pointer-events":d(o),onEscapeKeyDown:$[2]||($[2]=N=>i("escapeKeyDown",N)),onPointerDownOutside:$[3]||($[3]=N=>i("pointerDownOutside",N)),onFocusOutside:$[4]||($[4]=N=>i("focusOutside",N)),onInteractOutside:$[5]||($[5]=N=>i("interactOutside",N)),onDismiss:$[6]||($[6]=N=>i("dismiss"))},{default:_(()=>[E(d(Sl),{ref_key:"rovingFocusGroupRef",ref:y,"current-tab-stop-id":g.value,"onUpdate:currentTabStopId":$[0]||($[0]=N=>g.value=N),"as-child":"",orientation:"vertical",dir:d(s).dir.value,loop:d(l),onEntryFocus:$[1]||($[1]=N=>{i("entryFocus",N),d(s).isUsingKeyboardRef.value||N.preventDefault()})},{default:_(()=>[E(d(Kn),{ref:d(w),role:"menu",as:k.as,"as-child":k.asChild,"aria-orientation":"vertical","data-reka-menu-content":"","data-state":d(ga)(d(n).open.value),dir:d(s).dir.value,side:k.side,"side-offset":k.sideOffset,align:k.align,"align-offset":k.alignOffset,"avoid-collisions":k.avoidCollisions,"collision-boundary":k.collisionBoundary,"collision-padding":k.collisionPadding,"arrow-padding":k.arrowPadding,"prioritize-position":k.prioritizePosition,"position-strategy":k.positionStrategy,"update-position-strategy":k.updatePositionStrategy,sticky:k.sticky,"hide-when-detached":k.hideWhenDetached,reference:k.reference,onKeydown:M,onBlur:B,onPointermove:T},{default:_(()=>[S(k.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","position-strategy","update-position-strategy","sticky","hide-when-detached","reference"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),ka=cf,hf=I({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,t=qa(),{forwardRef:i}=Z(),{CollectionItem:n}=aa(),s=z(!1);async function a(l){l.defaultPrevented||Mr(l)&&(e.disabled?t.onItemLeave(l):t.onItemEnter(l)||l.currentTarget?.focus({preventScroll:!0}))}async function o(l){await nt(),!l.defaultPrevented&&Mr(l)&&t.onItemLeave(l)}return(l,u)=>(v(),A(d(n),{value:{textValue:l.textValue}},{default:_(()=>[E(d(ne),H({ref:d(i),role:"menuitem",tabindex:"-1"},l.$attrs,{as:l.as,"as-child":l.asChild,"aria-disabled":l.disabled||void 0,"data-disabled":l.disabled?"":void 0,"data-highlighted":s.value?"":void 0,onPointermove:a,onPointerleave:o,onFocus:u[0]||(u[0]=async c=>{await nt(),!(c.defaultPrevented||l.disabled)&&(s.value=!0)}),onBlur:u[1]||(u[1]=async c=>{await nt(),!c.defaultPrevented&&(s.value=!1)})}),{default:_(()=>[S(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),Vl=hf,ff=I({__name:"MenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(r,{emit:e}){const t=r,i=e,{forwardRef:n,currentElement:s}=Z(),a=Lr(),o=qa(),l=z(!1);async function u(){const c=s.value;if(!t.disabled&&c){const h=new CustomEvent(Zd,{bubbles:!0,cancelable:!0});i("select",h),await nt(),h.defaultPrevented?l.value=!1:a.onClose()}}return(c,h)=>(v(),A(Vl,H(t,{ref:d(n),onClick:u,onPointerdown:h[0]||(h[0]=()=>{l.value=!0}),onPointerup:h[1]||(h[1]=async f=>{await nt(),!f.defaultPrevented&&(l.value||f.currentTarget?.click())}),onKeydown:h[2]||(h[2]=async f=>{const m=d(o).searchRef.value!=="";c.disabled||m&&f.key===" "||d($s).includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}),{default:_(()=>[S(c.$slots,"default")]),_:3},16))}}),Fa=ff;const[pf,jl]=Pe(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext");var mf=I({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){const e=pf({modelValue:z(!1)});return(t,i)=>(v(),A(d(Ht),{present:t.forceMount||d(Fn)(d(e).modelValue.value)||d(e).modelValue.value===!0},{default:_(()=>[E(d(ne),{as:t.as,"as-child":t.asChild,"data-state":d(ya)(d(e).modelValue.value)},{default:_(()=>[S(t.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),gf=mf,yf=I({__name:"MenuCheckboxItem",props:{modelValue:{type:[Boolean,String],required:!1,default:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select","update:modelValue"],setup(r,{emit:e}){const t=r,i=e,n=ur(t,["modelValue"]),s=Qt(n),a=Je(t,"modelValue",i);return jl({modelValue:a}),(o,l)=>(v(),A(Fa,H({role:"menuitemcheckbox"},d(s),{"aria-checked":d(Fn)(d(a))?"mixed":d(a),"data-state":d(ya)(d(a)),onSelect:l[0]||(l[0]=async u=>{i("select",u),d(Fn)(d(a))?a.value=!0:a.value=!d(a)})}),{default:_(()=>[S(o.$slots,"default",{modelValue:d(a)})]),_:3},16,["aria-checked","data-state"]))}}),vf=yf,bf=I({__name:"MenuRootContentModal",props:{loop:{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},hideShiftedArrow:{type:Boolean,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}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,i=e,n=_e(t,i),s=Ei(),{forwardRef:a,currentElement:o}=Z();return fa(o),(l,u)=>(v(),A(ka,H(d(n),{ref:d(a),"trap-focus":d(s).open.value,"disable-outside-pointer-events":d(s).open.value,"disable-outside-scroll":!0,onDismiss:u[0]||(u[0]=c=>d(s).onOpenChange(!1)),onFocusOutside:u[1]||(u[1]=fe(c=>i("focusOutside",c),["prevent"]))}),{default:_(()=>[S(l.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),xf=bf,wf=I({__name:"MenuRootContentNonModal",props:{loop:{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},hideShiftedArrow:{type:Boolean,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}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const n=_e(r,e),s=Ei();return(a,o)=>(v(),A(ka,H(d(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:o[0]||(o[0]=l=>d(s).onOpenChange(!1))}),{default:_(()=>[S(a.$slots,"default")]),_:3},16))}}),_f=wf,Cf=I({__name:"MenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{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},hideShiftedArrow:{type:Boolean,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}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const n=_e(r,e),s=Ei(),a=Lr();return(o,l)=>(v(),A(d(Ht),{present:o.forceMount||d(s).open.value},{default:_(()=>[d(a).modal.value?(v(),A(xf,ae(H({key:0},{...o.$attrs,...d(n)})),{default:_(()=>[S(o.$slots,"default")]),_:3},16)):(v(),A(_f,ae(H({key:1},{...o.$attrs,...d(n)})),{default:_(()=>[S(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Af=Cf,Sf=I({__name:"MenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(d(ne),H({role:"group"},e),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Ul=Sf,Mf=I({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(r){const e=r;return(t,i)=>(v(),A(d(ne),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Bf=Mf,qf=I({__name:"MenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(d(zr),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),kf=qf;const[Ff,Ef]=Pe("MenuRadioGroup");var Of=I({__name:"MenuRadioGroup",props:{modelValue:{type:null,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,n=ur(t,["modelValue"]),s=Qt(n),a=Je(t,"modelValue",i);return Ef({modelValue:a,onValueChange:o=>{a.value=o}}),(o,l)=>(v(),A(Ul,ae(oe(d(s))),{default:_(()=>[S(o.$slots,"default",{modelValue:d(a)})]),_:3},16))}}),zf=Of,If=I({__name:"MenuRadioItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(r,{emit:e}){const t=r,i=e,n=ur(t,["value"]),s=Qt(n),{value:a}=xt(t),o=Ff(),l=F(()=>o.modelValue.value===a?.value);return jl({modelValue:l}),(u,c)=>(v(),A(Fa,H({role:"menuitemradio"},d(s),{"aria-checked":l.value,"data-state":d(ya)(l.value),onSelect:c[0]||(c[0]=async h=>{i("select",h),d(o).onValueChange(d(a))})}),{default:_(()=>[S(u.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),Tf=If,Pf=I({__name:"MenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(d(ne),H(e,{role:"separator","aria-orientation":"horizontal"}),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Df=Pf;const[Gl,Rf]=Pe("MenuSub");var $f=I({__name:"MenuSub",props:{open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(r,{emit:e}){const t=r,n=Je(t,"open",e,{defaultValue:!1,passive:t.open===void 0}),s=Ei(),a=z(),o=z();return vt(l=>{s?.open.value===!1&&(n.value=!1),l(()=>n.value=!1)}),Nl({open:n,onOpenChange:l=>{n.value=l},content:o,onContentChange:l=>{o.value=l}}),Rf({triggerId:"",contentId:"",trigger:a,onTriggerChange:l=>{a.value=l}}),(l,u)=>(v(),A(d(Dr),null,{default:_(()=>[S(l.$slots,"default")]),_:3}))}}),Lf=$f,Hf=I({__name:"MenuSubContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,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},hideShiftedArrow:{type:Boolean,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,default:!0},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const n=_e(r,e),s=Ei(),a=Lr(),o=Gl(),{forwardRef:l,currentElement:u}=Z();return o.contentId||=bt(void 0,"reka-menu-sub-content"),(c,h)=>(v(),A(d(Ht),{present:c.forceMount||d(s).open.value},{default:_(()=>[E(ka,H(d(n),{id:d(o).contentId,ref:d(l),"aria-labelledby":d(o).triggerId,align:"start",side:d(a).dir.value==="rtl"?"left":"right","disable-outside-pointer-events":!1,"disable-outside-scroll":!1,"trap-focus":!1,onOpenAutoFocus:h[0]||(h[0]=fe(f=>{d(a).isUsingKeyboardRef.value&&d(u)?.focus()},["prevent"])),onCloseAutoFocus:h[1]||(h[1]=fe(()=>{},["prevent"])),onFocusOutside:h[2]||(h[2]=f=>{f.defaultPrevented||f.target!==d(o).trigger.value&&d(s).onOpenChange(!1)}),onEscapeKeyDown:h[3]||(h[3]=f=>{d(a).onClose(),f.preventDefault()}),onKeydown:h[4]||(h[4]=f=>{const m=f.currentTarget?.contains(f.target),p=d(ic)[d(a).dir.value].includes(f.key);m&&p&&(d(s).onOpenChange(!1),d(o).trigger.value?.focus(),f.preventDefault())})}),{default:_(()=>[S(c.$slots,"default")]),_:3},16,["id","aria-labelledby","side"])]),_:3},8,["present"]))}}),Nf=Hf,Vf=I({__name:"MenuSubTrigger",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,t=Ei(),i=Lr(),n=Gl(),s=qa(),a=z(null);n.triggerId||=bt(void 0,"reka-menu-sub-trigger");function o(){a.value&&window.clearTimeout(a.value),a.value=null}qi(()=>{o()});function l(h){!Mr(h)||s.onItemEnter(h)||!e.disabled&&!t.open.value&&!a.value&&(s.onPointerGraceIntentChange(null),a.value=window.setTimeout(()=>{t.onOpenChange(!0),o()},100))}async function u(h){if(!Mr(h))return;o();const f=t.content.value?.getBoundingClientRect();if(f?.width){const m=t.content.value?.dataset.side,p=m==="right",g=p?-5:5,y=f[p?"left":"right"],w=f[p?"right":"left"];s.onPointerGraceIntentChange({area:[{x:h.clientX+g,y:h.clientY},{x:y,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x:y,y:f.bottom}],side:m}),window.clearTimeout(s.pointerGraceTimerRef.value),s.pointerGraceTimerRef.value=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h))return;s.onPointerGraceIntentChange(null)}}async function c(h){const f=s.searchRef.value!=="";e.disabled||f&&h.key===" "||tc[i.dir.value].includes(h.key)&&(t.onOpenChange(!0),await nt(),t.content.value?.focus(),h.preventDefault())}return(h,f)=>(v(),A(Hl,{"as-child":""},{default:_(()=>[E(Vl,H(e,{id:d(n).triggerId,ref:m=>{d(n)?.onTriggerChange(m?.$el)},"aria-haspopup":"menu","aria-expanded":d(t).open.value,"aria-controls":d(n).contentId,"data-state":d(ga)(d(t).open.value),onClick:f[0]||(f[0]=async m=>{e.disabled||m.defaultPrevented||(m.currentTarget.focus(),d(t).open.value||d(t).onOpenChange(!0))}),onPointermove:l,onPointerleave:u,onKeydown:c}),{default:_(()=>[S(h.$slots,"default")]),_:3},16,["id","aria-expanded","aria-controls","data-state"])]),_:3}))}}),jf=Vf;const[Oi,Uf]=Pe("PopoverRoot");var Gf=I({__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(r,{emit:e}){const t=r,i=e,{modal:n}=xt(t),s=Je(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),a=z(),o=z(!1);return Uf({contentId:"",triggerId:"",modal:n,open:s,onOpenChange:l=>{s.value=l},onOpenToggle:()=>{s.value=!s.value},triggerElement:a,hasCustomAnchor:o}),(l,u)=>(v(),A(d(Dr),null,{default:_(()=>[S(l.$slots,"default",{open:d(s),close:()=>s.value=!1})]),_:3}))}}),Wf=Gf,Kf=I({__name:"PopoverAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;Z();const t=Oi();return ld(()=>{t.hasCustomAnchor.value=!0}),qi(()=>{t.hasCustomAnchor.value=!1}),(i,n)=>(v(),A(d(Rr),ae(oe(e)),{default:_(()=>[S(i.$slots,"default")]),_:3},16))}}),Xf=Kf,Yf=I({__name:"PopoverArrow",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(r){const e=r;return Z(),(t,i)=>(v(),A(d(Xn),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Jf=Yf,Zf=I({__name:"PopoverClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r;Z();const t=Oi();return(i,n)=>(v(),A(d(ne),{type:i.as==="button"?"button":void 0,as:i.as,"as-child":e.asChild,onClick:n[0]||(n[0]=s=>d(t).onOpenChange(!1))},{default:_(()=>[S(i.$slots,"default")]),_:3},8,["type","as","as-child"]))}}),Qf=Zf,ep=I({__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},hideShiftedArrow:{type:Boolean,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(r,{emit:e}){const t=r,i=e,n=Qt(ur(t,"trapFocus","disableOutsidePointerEvents")),{forwardRef:s}=Z(),a=Oi();return yl(),(o,l)=>(v(),A(d(ma),{"as-child":"",loop:"",trapped:o.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>i("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>i("closeAutoFocus",u))},{default:_(()=>[E(d(Or),{"as-child":"","disable-outside-pointer-events":o.disableOutsidePointerEvents,onPointerDownOutside:l[0]||(l[0]=u=>i("pointerDownOutside",u)),onInteractOutside:l[1]||(l[1]=u=>i("interactOutside",u)),onEscapeKeyDown:l[2]||(l[2]=u=>i("escapeKeyDown",u)),onFocusOutside:l[3]||(l[3]=u=>i("focusOutside",u)),onDismiss:l[4]||(l[4]=u=>d(a).onOpenChange(!1))},{default:_(()=>[E(d(Kn),H(d(n),{id:d(a).contentId,ref:d(s),"data-state":d(a).open.value?"open":"closed","aria-labelledby":d(a).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:_(()=>[S(o.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Wl=ep,tp=I({__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},hideShiftedArrow:{type:Boolean,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(r,{emit:e}){const t=r,i=e,n=Oi(),s=z(!1);ha(!0);const a=_e(t,i),{forwardRef:o,currentElement:l}=Z();return fa(l),(u,c)=>(v(),A(Wl,H(d(a),{ref:d(o),"trap-focus":d(n).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=fe(h=>{i("closeAutoFocus",h),s.value||d(n).triggerElement.value?.focus()},["prevent"])),onPointerDownOutside:c[1]||(c[1]=h=>{i("pointerDownOutside",h);const f=h.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0,p=f.button===2||m;s.value=p}),onFocusOutside:c[2]||(c[2]=fe(()=>{},["prevent"]))}),{default:_(()=>[S(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),ip=tp,rp=I({__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},hideShiftedArrow:{type:Boolean,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(r,{emit:e}){const t=r,i=e,n=Oi(),s=z(!1),a=z(!1),o=_e(t,i);return(l,u)=>(v(),A(Wl,H(d(o),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{i("closeAutoFocus",c),c.defaultPrevented||(s.value||d(n).triggerElement.value?.focus(),c.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:u[1]||(u[1]=async c=>{i("interactOutside",c),c.defaultPrevented||(s.value=!0,c.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const h=c.target;d(n).triggerElement.value?.contains(h)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:_(()=>[S(l.$slots,"default")]),_:3},16))}}),np=rp,sp=I({__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},hideShiftedArrow:{type:Boolean,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(r,{emit:e}){const t=r,i=e,n=Oi(),s=_e(t,i),{forwardRef:a}=Z();return n.contentId||=bt(void 0,"reka-popover-content"),(o,l)=>(v(),A(d(Ht),{present:o.forceMount||d(n).open.value},{default:_(()=>[d(n).modal.value?(v(),A(ip,H({key:0},d(s),{ref:d(a)}),{default:_(()=>[S(o.$slots,"default")]),_:3},16)):(v(),A(np,H({key:1},d(s),{ref:d(a)}),{default:_(()=>[S(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),ap=sp,op=I({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(d(zr),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),lp=op,up=I({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Oi(),{forwardRef:i,currentElement:n}=Z();return t.triggerId||=bt(void 0,"reka-popover-trigger"),Ge(()=>{t.triggerElement.value=n.value}),(s,a)=>(v(),A(lr(d(t).hasCustomAnchor.value?d(ne):d(Rr)),{"as-child":""},{default:_(()=>[E(d(ne),{id:d(t).triggerId,ref:d(i),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":d(t).open.value,"aria-controls":d(t).contentId,"data-state":d(t).open.value?"open":"closed",as:s.as,"as-child":e.asChild,onClick:d(t).onOpenToggle},{default:_(()=>[S(s.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),dp=up,cp=I({__name:"DropdownMenuArrow",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(r){const e=r;return Z(),(t,i)=>(v(),A(d(nf),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Kl=cp,hp=I({__name:"DropdownMenuCheckboxItem",props:{modelValue:{type:[Boolean,String],required:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select","update:modelValue"],setup(r,{emit:e}){const t=r,n=or(e);return Z(),(s,a)=>(v(),A(d(vf),ae(oe({...t,...d(n)})),{default:_(()=>[S(s.$slots,"default")]),_:3},16))}}),fp=hp;const[Xl,pp]=Pe("DropdownMenuRoot");var mp=I({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(r,{emit:e}){const t=r,i=e;Z();const n=Je(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=z(),{modal:a,dir:o}=xt(t),l=Vn(o);return pp({open:n,onOpenChange:u=>{n.value=u},onOpenToggle:()=>{n.value=!n.value},triggerId:"",triggerElement:s,contentId:"",modal:a,dir:l}),(u,c)=>(v(),A(d(uf),{open:d(n),"onUpdate:open":c[0]||(c[0]=h=>al(n)?n.value=h:null),dir:d(l),modal:d(a)},{default:_(()=>[S(u.$slots,"default",{open:d(n)})]),_:3},8,["open","dir","modal"]))}}),Yl=mp,gp=I({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{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},hideShiftedArrow:{type:Boolean,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}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(r,{emit:e}){const n=_e(r,e);Z();const s=Xl(),a=z(!1);function o(l){l.defaultPrevented||(a.value||setTimeout(()=>{s.triggerElement.value?.focus()},0),a.value=!1,l.preventDefault())}return s.contentId||=bt(void 0,"reka-dropdown-menu-content"),(l,u)=>(v(),A(d(Af),H(d(n),{id:d(s).contentId,"aria-labelledby":d(s)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"},onCloseAutoFocus:o,onInteractOutside:u[0]||(u[0]=c=>{if(c.defaultPrevented)return;const h=c.detail.originalEvent,f=h.button===0&&h.ctrlKey===!0,m=h.button===2||f;(!d(s).modal.value||m)&&(a.value=!0),d(s).triggerElement.value?.contains(c.target)&&c.preventDefault()})}),{default:_(()=>[S(l.$slots,"default")]),_:3},16,["id","aria-labelledby"]))}}),yp=gp,vp=I({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return Z(),(t,i)=>(v(),A(d(Ul),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),bp=vp,xp=I({__name:"DropdownMenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(r,{emit:e}){const t=r,n=or(e);return Z(),(s,a)=>(v(),A(d(Fa),ae(oe({...t,...d(n)})),{default:_(()=>[S(s.$slots,"default")]),_:3},16))}}),wp=xp,_p=I({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return Z(),(t,i)=>(v(),A(d(gf),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Cp=_p,Ap=I({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return Z(),(t,i)=>(v(),A(d(Bf),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Sp=Ap,Mp=I({__name:"DropdownMenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(d(kf),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Bp=Mp,qp=I({__name:"DropdownMenuRadioGroup",props:{modelValue:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=or(e);return Z(),(s,a)=>(v(),A(d(zf),ae(oe({...t,...d(n)})),{default:_(()=>[S(s.$slots,"default")]),_:3},16))}}),kp=qp,Fp=I({__name:"DropdownMenuRadioItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(r,{emit:e}){const n=_e(r,e);return Z(),(s,a)=>(v(),A(d(Tf),ae(oe(d(n))),{default:_(()=>[S(s.$slots,"default")]),_:3},16))}}),Ep=Fp,Op=I({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return Z(),(t,i)=>(v(),A(d(Df),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),zp=Op,Ip=I({__name:"DropdownMenuSub",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(r,{emit:e}){const t=r,n=Je(t,"open",e,{passive:t.open===void 0,defaultValue:t.defaultOpen??!1});return Z(),(s,a)=>(v(),A(d(Lf),{open:d(n),"onUpdate:open":a[0]||(a[0]=o=>al(n)?n.value=o:null)},{default:_(()=>[S(s.$slots,"default",{open:d(n)})]),_:3},8,["open"]))}}),Tp=Ip,Pp=I({__name:"DropdownMenuSubContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,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},hideShiftedArrow:{type:Boolean,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}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const n=_e(r,e);return Z(),(s,a)=>(v(),A(d(Nf),H(d(n),{style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:_(()=>[S(s.$slots,"default")]),_:3},16))}}),Dp=Pp,Rp=I({__name:"DropdownMenuSubTrigger",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return Z(),(t,i)=>(v(),A(d(jf),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),$p=Rp,Lp=I({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Xl(),{forwardRef:i,currentElement:n}=Z();return Ge(()=>{t.triggerElement=n}),t.triggerId||=bt(void 0,"reka-dropdown-menu-trigger"),(s,a)=>(v(),A(d(Hl),{"as-child":""},{default:_(()=>[E(d(ne),{id:d(t).triggerId,ref:d(i),type:s.as==="button"?"button":void 0,"as-child":e.asChild,as:s.as,"aria-haspopup":"menu","aria-expanded":d(t).open.value,"aria-controls":d(t).open.value?d(t).contentId:void 0,"data-disabled":s.disabled?"":void 0,disabled:s.disabled,"data-state":d(t).open.value?"open":"closed",onClick:a[0]||(a[0]=async o=>{!s.disabled&&o.button===0&&o.ctrlKey===!1&&(d(t)?.onOpenToggle(),await nt(),d(t).open.value&&o.preventDefault())}),onKeydown:a[1]||(a[1]=pt(o=>{s.disabled||(["Enter"," "].includes(o.key)&&d(t).onOpenToggle(),o.key==="ArrowDown"&&d(t).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())},["enter","space","arrow-down"]))},{default:_(()=>[S(s.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),Jl=Lp,Hp=I({__name:"HoverCardArrow",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(r){const e=r;return Z(),(t,i)=>(v(),A(d(Xn),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Np=Hp;const[Ea,Vp]=Pe("HoverCardRoot");var jp=I({__name:"HoverCardRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},openDelay:{type:Number,required:!1,default:700},closeDelay:{type:Number,required:!1,default:300}},emits:["update:open"],setup(r,{emit:e}){const t=r,i=e,{openDelay:n,closeDelay:s}=xt(t);Z();const a=Je(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),o=z(0),l=z(0),u=z(!1),c=z(!1),h=z(!1),f=z();function m(){clearTimeout(l.value),o.value=window.setTimeout(()=>a.value=!0,n.value)}function p(){clearTimeout(o.value),!u.value&&!c.value&&(l.value=window.setTimeout(()=>a.value=!1,s.value))}function g(){a.value=!1}return Vp({open:a,onOpenChange(y){a.value=y},onOpen:m,onClose:p,onDismiss:g,hasSelectionRef:u,isPointerDownOnContentRef:c,isPointerInTransitRef:h,triggerElement:f}),(y,w)=>(v(),A(d(Dr),null,{default:_(()=>[S(y.$slots,"default",{open:d(a)})]),_:3}))}}),Up=jp;function Us(r){return e=>e.pointerType==="touch"?void 0:r()}function Gp(r){const e=[],t=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)e.push(t.currentNode);return e}var Wp=I({__name:"HoverCardContentImpl",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},hideShiftedArrow:{type:Boolean,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}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(r,{emit:e}){const t=r,i=e,n=Qt(t),{forwardRef:s,currentElement:a}=Z(),o=Ea(),{isPointerInTransit:l,onPointerExit:u}=bl(o.triggerElement,a);ud(o.isPointerInTransitRef,l,{direction:"rtl"}),u(()=>{o.onClose()});const c=z(!1);let h;vt(m=>{if(c.value){const p=document.body;h=p.style.userSelect||p.style.webkitUserSelect,p.style.userSelect="none",p.style.webkitUserSelect="none",m(()=>{p.style.userSelect=h,p.style.webkitUserSelect=h})}});function f(){c.value=!1,o.isPointerDownOnContentRef.value=!1,nt(()=>{document.getSelection()?.toString()!==""&&(o.hasSelectionRef.value=!0)})}return Ge(()=>{a.value&&(document.addEventListener("pointerup",f),Gp(a.value).forEach(p=>p.setAttribute("tabindex","-1")))}),qi(()=>{document.removeEventListener("pointerup",f),o.hasSelectionRef.value=!1,o.isPointerDownOnContentRef.value=!1}),(m,p)=>(v(),A(d(Or),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:p[1]||(p[1]=g=>i("escapeKeyDown",g)),onPointerDownOutside:p[2]||(p[2]=g=>i("pointerDownOutside",g)),onFocusOutside:p[3]||(p[3]=fe(g=>i("focusOutside",g),["prevent"])),onDismiss:d(o).onDismiss},{default:_(()=>[E(d(Kn),H({...d(n),...m.$attrs},{ref:d(s),"data-state":d(o).open.value?"open":"closed",style:{userSelect:c.value?"text":void 0,WebkitUserSelect:c.value?"text":void 0,"--reka-hover-card-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-hover-card-content-available-width":"var(--reka-popper-available-width)","--reka-hover-card-content-available-height":"var(--reka-popper-available-height)","--reka-hover-card-trigger-width":"var(--reka-popper-anchor-width)","--reka-hover-card-trigger-height":"var(--reka-popper-anchor-height)"},onPointerdown:p[0]||(p[0]=g=>{g.currentTarget.contains(g.target)&&(c.value=!0),d(o).hasSelectionRef.value=!1,d(o).isPointerDownOnContentRef.value=!0})}),{default:_(()=>[S(m.$slots,"default")]),_:3},16,["data-state","style"])]),_:3},8,["onDismiss"]))}}),Kp=Wp,Xp=I({__name:"HoverCardContent",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},hideShiftedArrow:{type:Boolean,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}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(r,{emit:e}){const n=_e(r,e),{forwardRef:s}=Z(),a=Ea();return(o,l)=>(v(),A(d(Ht),{present:o.forceMount||d(a).open.value},{default:_(()=>[E(Kp,H(d(n),{ref:d(s),onPointerenter:l[0]||(l[0]=u=>d(Us)(d(a).onOpen)(u))}),{default:_(()=>[S(o.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),Yp=Xp,Jp=I({__name:"HoverCardPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(d(zr),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Zp=Jp,Qp=I({__name:"HoverCardTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"a"}},setup(r){const{forwardRef:e,currentElement:t}=Z(),i=Ea();i.triggerElement=t;function n(){setTimeout(()=>{!i.isPointerInTransitRef.value&&!i.open.value&&i.onClose()},0)}return(s,a)=>(v(),A(d(Rr),{"as-child":"",reference:s.reference},{default:_(()=>[E(d(ne),{ref:d(e),"as-child":s.asChild,as:s.as,"data-state":d(i).open.value?"open":"closed","data-grace-area-trigger":"",onPointerenter:a[0]||(a[0]=o=>d(Us)(d(i).onOpen)(o)),onPointerleave:a[1]||(a[1]=o=>d(Us)(n)(o)),onFocus:a[2]||(a[2]=o=>d(i).onOpen()),onBlur:a[3]||(a[3]=o=>d(i).onClose())},{default:_(()=>[S(s.$slots,"default")]),_:3},8,["as-child","as","data-state"])]),_:3},8,["reference"]))}}),em=Qp,tm=I({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(r){const e=r;return Z(),(t,i)=>(v(),A(d(ne),H(e,{onMousedown:i[0]||(i[0]=n=>{!n.defaultPrevented&&n.detail>1&&n.preventDefault()})}),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),lo=tm;let ls=new Map,Gs=!1;try{Gs=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Pn=!1;try{Pn=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Zl={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Ql{format(e){let t="";if(!Gs&&this.options.signDisplay!=null?t=rm(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!Pn){var i;let{unit:n,unitDisplay:s="short",locale:a}=this.resolvedOptions();if(!n)return t;let o=(i=Zl[n])===null||i===void 0?void 0:i[s];t+=o[a]||o.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let i=this.numberFormatter.formatToParts(e),n=this.numberFormatter.formatToParts(t);return[...i.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Gs&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Pn&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=im(e,t),this.options=t}}function im(r,e={}){let{numberingSystem:t}=e;if(t&&r.includes("-nu-")&&(r.includes("-u-")||(r+="-u-"),r+=`-nu-${t}`),e.style==="unit"&&!Pn){var i;let{unit:a,unitDisplay:o="short"}=e;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=Zl[a])===null||i===void 0)&&i[o]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${o}`);e={...e,style:"decimal"}}let n=r+(e?Object.entries(e).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(ls.has(n))return ls.get(n);let s=new Intl.NumberFormat(r,e);return ls.set(n,s),s}function rm(r,e,t){if(e==="auto")return r.format(t);if(e==="never")return r.format(Math.abs(t));{let i=!1;if(e==="always"?i=t>0||Object.is(t,0):e==="exceptZero"&&(Object.is(t,-0)||Object.is(t,0)?t=Math.abs(t):i=t>0),i){let n=r.format(-t),s=r.format(t),a=n.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),n.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return r.format(t)}}const nm=new RegExp("^.*\\(.*\\).*$"),sm=["latn","arab","hanidec","deva","beng","fullwide"];class eu{parse(e){return us(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,i){return us(this.locale,this.options,e).isValidPartialNumber(e,t,i)}getNumberingSystem(e){return us(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}const uo=new Map;function us(r,e,t){let i=co(r,e);if(!r.includes("-nu-")&&!i.isValidPartialNumber(t)){for(let n of sm)if(n!==i.options.numberingSystem){let s=co(r+(r.includes("-u-")?"-nu-":"-u-nu-")+n,e);if(s.isValidPartialNumber(t))return s}}return i}function co(r,e){let t=r+(e?Object.entries(e).sort((n,s)=>n[0]<s[0]?-1:1).join():""),i=uo.get(t);return i||(i=new am(r,e),uo.set(t,i)),i}class am{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=Pi(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let a=t.indexOf("-");t=t.replace("-",""),t=t.replace("+","");let o=t.indexOf(".");o===-1&&(o=t.length),t=t.replace(".",""),o-2===0?t=`0.${t}`:o-2===-1?t=`0.0${t}`:o-2===-2?t="0.00":t=`${t.slice(0,o-2)}.${t.slice(o-2)}`,a>-1&&(t=`-${t}`)}let i=t?+t:NaN;if(isNaN(i))return NaN;if(this.options.style==="percent"){var n,s;let a={...this.options,style:"decimal",minimumFractionDigits:Math.min(((n=this.options.minimumFractionDigits)!==null&&n!==void 0?n:0)+2,20),maximumFractionDigits:Math.min(((s=this.options.maximumFractionDigits)!==null&&s!==void 0?s:0)+2,20)};return new eu(this.locale,a).parse(new Ql(this.locale,a).format(i))}return this.options.currencySign==="accounting"&&nm.test(e)&&(i=-1*i),i}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("،",this.symbols.decimal)),this.symbols.group&&(e=Pi(e,".",this.symbols.group))),this.symbols.group==="’"&&e.includes("'")&&(e=Pi(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=Pi(e," ",this.symbols.group),e=Pi(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,i=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&i>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=Pi(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits==null&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=lm(e,this.formatter,this.options,t);var i,n;this.options.style==="percent"&&(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)>18||((n=this.options.maximumFractionDigits)!==null&&n!==void 0?n:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const ho=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),om=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function lm(r,e,t,i){var n,s,a,o;let l=new Intl.NumberFormat(r,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),u=l.formatToParts(-10000.111),c=l.formatToParts(10000.111),h=om.map($=>l.formatToParts($));var f;let m=(f=(n=u.find($=>$.type==="minusSign"))===null||n===void 0?void 0:n.value)!==null&&f!==void 0?f:"-",p=(s=c.find($=>$.type==="plusSign"))===null||s===void 0?void 0:s.value;!p&&(i?.signDisplay==="exceptZero"||i?.signDisplay==="always")&&(p="+");let y=(a=new Intl.NumberFormat(r,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find($=>$.type==="decimal"))===null||a===void 0?void 0:a.value,w=(o=u.find($=>$.type==="group"))===null||o===void 0?void 0:o.value,x=u.filter($=>!ho.has($.type)).map($=>fo($.value)),b=h.flatMap($=>$.filter(N=>!ho.has(N.type)).map(N=>fo(N.value))),C=[...new Set([...x,...b])].sort(($,N)=>N.length-$.length),q=C.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${C.join("|")}|[\\p{White_Space}]`,"gu"),M=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(9876543210)].reverse(),B=new Map(M.map(($,N)=>[$,N])),T=new RegExp(`[${M.join("")}]`,"g");return{minusSign:m,plusSign:p,decimal:y,group:w,literals:q,numeral:T,index:$=>String(B.get($))}}function Pi(r,e,t){return r.replaceAll?r.replaceAll(e,t):r.split(e).join(t)}function fo(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tu(r){const{disabled:e}=r,t=z(),i=tl(),n=()=>window.clearTimeout(t.value),s=f=>{n(),!e.value&&(i.trigger(),t.value=window.setTimeout(()=>{s(60)},f))},a=()=>{s(400)},o=()=>{n()},l=z(!1),u=F(()=>Nn(r.target)),c=f=>{f.button!==0||l.value||(f.preventDefault(),l.value=!0,a())},h=()=>{l.value=!1,o()};return Fr&&(Ft(u||window,"pointerdown",c),Ft(window,"pointerup",h),Ft(window,"pointercancel",h)),{isPressed:l,onTrigger:i.on}}function po(r,e=z({})){return ol(()=>new Ql(r.value,e.value))}function um(r,e=z({})){return ol(()=>new eu(r.value,e.value))}function mo(r,e,t){let i=r==="+"?e+t:e-t;if(e%1!==0||t%1!==0){const n=e.toString().split("."),s=t.toString().split("."),a=n[1]&&n[1].length||0,o=s[1]&&s[1].length||0,l=10**Math.max(a,o);e=Math.round(e*l),t=Math.round(t*l),i=r==="+"?e+t:e-t,i/=l}return i}const[Oa,dm]=Pe("NumberFieldRoot");var cm=I({inheritAttrs:!1,__name:"NumberFieldRoot",props:{defaultValue:{type:Number,required:!1,default:void 0},modelValue:{type:[Number,null],required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1,default:1},stepSnapping:{type:Boolean,required:!1,default:!0},focusOnChange:{type:Boolean,required:!1,default:!0},formatOptions:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},disableWheelChange:{type:Boolean,required:!1},invertWheelChange:{type:Boolean,required:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,{disabled:n,readonly:s,disableWheelChange:a,invertWheelChange:o,min:l,max:u,step:c,stepSnapping:h,formatOptions:f,id:m,locale:p}=xt(t),g=Je(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),{primitiveElement:y,currentElement:w}=Ir(),x=Hd(p),b=vl(w),C=z(),q=F(()=>!Zi(g.value)&&(K(g.value)===l.value||l.value&&!isNaN(g.value)?mo("-",g.value,c.value)<l.value:!1)),M=F(()=>!Zi(g.value)&&(K(g.value)===u.value||u.value&&!isNaN(g.value)?mo("+",g.value,c.value)>u.value:!1));function B(te,ye=1){if(t.focusOnChange&&C.value?.focus(),t.disabled||t.readonly)return;const ei=U.parse(C.value?.value??"");isNaN(ei)?g.value=l.value??0:te==="increase"?g.value=K(ei+(c.value??1)*ye):g.value=K(ei-(c.value??1)*ye)}function T(te=1){B("increase",te)}function k(te=1){B("decrease",te)}function $(te){te==="min"&&l.value!==void 0?g.value=K(l.value):te==="max"&&u.value!==void 0&&(g.value=K(u.value))}const N=po(x,f),U=um(x,f),Q=F(()=>N.resolvedOptions().maximumFractionDigits>0?"decimal":"numeric"),ie=po(x,f),X=F(()=>Zi(g.value)||isNaN(g.value)?"":ie.format(g.value));function Y(te){return U.isValidPartialNumber(te,l.value,u.value)}function ce(te){C.value&&(C.value.value=te)}function K(te){let ye;return c.value===void 0||isNaN(c.value)||!h.value?ye=Sd(te,l.value,u.value):ye=Md(te,l.value,u.value,c.value),ye=U.parse(N.format(ye)),ye}function he(te){const ye=U.parse(te);return g.value=isNaN(ye)?void 0:K(ye),te.length?(isNaN(ye),ce(X.value)):ce(te)}return dm({modelValue:g,handleDecrease:k,handleIncrease:T,handleMinMaxValue:$,inputMode:Q,inputEl:C,onInputElement:te=>C.value=te,textValue:X,validate:Y,applyInputValue:he,disabled:n,readonly:s,disableWheelChange:a,invertWheelChange:o,max:u,min:l,isDecreaseDisabled:q,isIncreaseDisabled:M,id:m}),(te,ye)=>(v(),A(d(ne),H(te.$attrs,{ref_key:"primitiveElement",ref:y,role:"group",as:te.as,"as-child":te.asChild,"data-disabled":d(n)?"":void 0,"data-readonly":d(s)?"":void 0}),{default:_(()=>[S(te.$slots,"default",{modelValue:d(g),textValue:X.value}),d(b)&&te.name?(v(),A(d(Bl),{key:0,type:"text",value:d(g),name:te.name,disabled:d(n),readonly:d(s),required:te.required},null,8,["value","name","disabled","readonly","required"])):R("v-if",!0)]),_:3},16,["as","as-child","data-disabled","data-readonly"]))}}),hm=cm,fm=I({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Oa(),i=F(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isDecreaseDisabled.value),{primitiveElement:n,currentElement:s}=Ir(),{isPressed:a,onTrigger:o}=tu({target:s,disabled:i});return o(()=>{t.handleDecrease()}),(l,u)=>(v(),A(d(ne),H(e,{ref_key:"primitiveElement",ref:n,tabindex:"-1","aria-label":"Decrease",type:l.as==="button"?"button":void 0,style:{userSelect:d(a)?"none":void 0},disabled:i.value?"":void 0,"data-disabled":i.value?"":void 0,"data-pressed":d(a)?"true":void 0,onContextmenu:u[0]||(u[0]=fe(()=>{},["prevent"]))}),{default:_(()=>[S(l.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),pm=fm,mm=I({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Oa(),i=F(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isIncreaseDisabled.value),{primitiveElement:n,currentElement:s}=Ir(),{isPressed:a,onTrigger:o}=tu({target:s,disabled:i});return o(()=>{t.handleIncrease()}),(l,u)=>(v(),A(d(ne),H(e,{ref_key:"primitiveElement",ref:n,tabindex:"-1","aria-label":"Increase",type:l.as==="button"?"button":void 0,style:{userSelect:d(a)?"none":void 0},disabled:i.value?"":void 0,"data-disabled":i.value?"":void 0,"data-pressed":d(a)?"true":void 0,onContextmenu:u[0]||(u[0]=fe(()=>{},["prevent"]))}),{default:_(()=>[S(l.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),gm=mm,ym=I({__name:"NumberFieldInput",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},setup(r){const e=r,{primitiveElement:t,currentElement:i}=Ir(),n=Oa();function s(l){n.disableWheelChange.value||l.target===gt()&&(Math.abs(l.deltaY)<=Math.abs(l.deltaX)||(l.preventDefault(),l.deltaY>0?n.invertWheelChange.value?n.handleDecrease():n.handleIncrease():l.deltaY<0&&(n.invertWheelChange.value?n.handleIncrease():n.handleDecrease())))}Ge(()=>{n.onInputElement(i.value)});const a=z(n.textValue.value);je(()=>n.textValue.value,()=>{a.value=n.textValue.value},{immediate:!0,deep:!0});function o(){requestAnimationFrame(()=>{a.value=n.textValue.value})}return(l,u)=>(v(),A(d(ne),H(e,{id:d(n).id.value,ref_key:"primitiveElement",ref:t,value:a.value,role:"spinbutton",type:"text",tabindex:"0",inputmode:d(n).inputMode.value,disabled:d(n).disabled.value?"":void 0,"data-disabled":d(n).disabled.value?"":void 0,readonly:d(n).readonly.value?"":void 0,"data-readonly":d(n).readonly.value?"":void 0,autocomplete:"off",autocorrect:"off",spellcheck:"false","aria-roledescription":"Number field","aria-valuenow":d(n).modelValue.value,"aria-valuemin":d(n).min.value,"aria-valuemax":d(n).max.value,onKeydown:[u[0]||(u[0]=pt(fe(c=>d(n).handleIncrease(),["prevent"]),["up"])),u[1]||(u[1]=pt(fe(c=>d(n).handleDecrease(),["prevent"]),["down"])),u[2]||(u[2]=pt(fe(c=>d(n).handleIncrease(10),["prevent"]),["page-up"])),u[3]||(u[3]=pt(fe(c=>d(n).handleDecrease(10),["prevent"]),["page-down"])),u[4]||(u[4]=pt(fe(c=>d(n).handleMinMaxValue("min"),["prevent"]),["home"])),u[5]||(u[5]=pt(fe(c=>d(n).handleMinMaxValue("max"),["prevent"]),["end"])),u[8]||(u[8]=pt(c=>d(n).applyInputValue(c.target?.value),["enter"]))],onWheel:s,onBeforeinput:u[6]||(u[6]=c=>{const h=c.target;let f=h.value.slice(0,h.selectionStart??void 0)+(c.data??"")+h.value.slice(h.selectionEnd??void 0);d(n).validate(f)||c.preventDefault()}),onInput:u[7]||(u[7]=c=>{const h=c.target;a.value=h.value}),onChange:o,onBlur:u[9]||(u[9]=c=>d(n).applyInputValue(c.target?.value))}),{default:_(()=>[S(l.$slots,"default")]),_:3},16,["id","value","inputmode","disabled","data-disabled","readonly","data-readonly","aria-valuenow","aria-valuemin","aria-valuemax"]))}}),vm=ym,bm=I({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,t=["horizontal","vertical"];function i(o){return t.includes(o)}const n=F(()=>i(e.orientation)?e.orientation:"horizontal"),s=F(()=>n.value==="vertical"?e.orientation:void 0),a=F(()=>e.decorative?{role:"none"}:{"aria-orientation":s.value,role:"separator"});return(o,l)=>(v(),A(d(ne),H({as:o.as,"as-child":o.asChild,"data-orientation":n.value},a.value),{default:_(()=>[S(o.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),xm=bm,wm=I({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(xm,ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),_m=wm;const[Yn,Cm]=Pe("TabsRoot");var Am=I({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,{orientation:n,unmountOnHide:s,dir:a}=xt(t),o=Vn(a);Z();const l=Je(t,"modelValue",i,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),u=z(),c=qn(new Set);return Cm({modelValue:l,changeModelValue:h=>{l.value=h},orientation:n,dir:o,unmountOnHide:s,activationMode:t.activationMode,baseId:bt(void 0,"reka-tabs"),tabsList:u,contentIds:c,registerContent:h=>{c.value=new Set([...c.value,h])},unregisterContent:h=>{const f=new Set(c.value);f.delete(h),c.value=f}}),(h,f)=>(v(),A(d(ne),{dir:d(o),"data-orientation":d(n),"as-child":h.asChild,as:h.as},{default:_(()=>[S(h.$slots,"default",{modelValue:d(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),Sm=Am;function iu(r,e){return`${r}-trigger-${e}`}function ru(r,e){return`${r}-content-${e}`}var Mm=I({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,{forwardRef:t}=Z(),i=Yn(),n=F(()=>iu(i.baseId,e.value)),s=F(()=>ru(i.baseId,e.value)),a=F(()=>e.value===i.modelValue.value),o=z(a.value);return Ge(()=>{i.registerContent(e.value),requestAnimationFrame(()=>{o.value=!1})}),ll(()=>{i.unregisterContent(e.value)}),(l,u)=>(v(),A(d(Ht),{present:l.forceMount||a.value,"force-mount":""},{default:_(({present:c})=>[E(d(ne),{id:s.value,ref:d(t),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":a.value?"active":"inactive","data-orientation":d(i).orientation.value,"aria-labelledby":n.value,hidden:!c,tabindex:"0",style:Et({animationDuration:o.value?"0s":void 0})},{default:_(()=>[!d(i).unmountOnHide.value||c?S(l.$slots,"default",{key:0}):R("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),Bm=Mm,qm=I({__name:"TabsIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r,{expose:e}){const t=r,i=Yn();e({updateIndicatorStyle:a}),Z();const n=z({size:null,position:null}),s=z([]);je(()=>[i.modelValue.value,i?.dir.value],()=>{a()},{immediate:!0,flush:"post"}),oa(()=>{s.value=Array.from(i.tabsList.value?.querySelectorAll('[role="tab"]')||[])}),dd(F(()=>[i.tabsList.value,...s.value]),a);function a(){const o=i.tabsList.value?.querySelector('[role="tab"][data-state="active"]');o&&(i.orientation.value==="horizontal"?n.value={size:o.offsetWidth,position:o.offsetLeft}:n.value={size:o.offsetHeight,position:o.offsetTop})}return(o,l)=>typeof n.value.size=="number"?(v(),A(d(ne),H({key:0},t,{style:{"--reka-tabs-indicator-size":`${n.value.size}px`,"--reka-tabs-indicator-position":`${n.value.position}px`}}),{default:_(()=>[S(o.$slots,"default")]),_:3},16,["style"])):R("v-if",!0)}}),km=qm,Fm=I({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,{loop:t}=xt(e),{forwardRef:i,currentElement:n}=Z(),s=Yn();return s.tabsList=n,(a,o)=>(v(),A(d(Sl),{"as-child":"",orientation:d(s).orientation.value,dir:d(s).dir.value,loop:d(t)},{default:_(()=>[E(d(ne),{ref:d(i),role:"tablist","as-child":a.asChild,as:a.as,"aria-orientation":d(s).orientation.value},{default:_(()=>[S(a.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),Em=Fm,Om=I({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,{forwardRef:t}=Z(),i=Yn(),n=F(()=>iu(i.baseId,e.value)),s=F(()=>i.contentIds.value.has(e.value)?ru(i.baseId,e.value):void 0),a=F(()=>e.value===i.modelValue.value);return(o,l)=>(v(),A(d(Ml),{"as-child":"",focusable:!o.disabled,active:a.value},{default:_(()=>[E(d(ne),{id:n.value,ref:d(t),role:"tab",type:o.as==="button"?"button":void 0,as:o.as,"as-child":o.asChild,"aria-selected":a.value?"true":"false","aria-controls":s.value,"data-state":a.value?"active":"inactive",disabled:o.disabled,"data-disabled":o.disabled?"":void 0,"data-orientation":d(i).orientation.value,onMousedown:l[0]||(l[0]=fe(u=>{!o.disabled&&u.ctrlKey===!1?d(i).changeModelValue(o.value):u.preventDefault()},["left"])),onKeydown:l[1]||(l[1]=pt(u=>d(i).changeModelValue(o.value),["enter","space"])),onFocus:l[2]||(l[2]=()=>{const u=d(i).activationMode!=="manual";!a.value&&!o.disabled&&u&&d(i).changeModelValue(o.value)})},{default:_(()=>[S(o.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),zm=Om,Im=I({__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(r){const e=r;return Z(),(t,i)=>(v(),A(d(Xn),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Tm=Im;const nu="tooltip.open",[Jn,Pm]=Pe("TooltipRoot");var Dm=I({__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(r,{emit:e}){const t=r,i=e;Z();const n=la(),s=F(()=>t.disableHoverableContent??n.disableHoverableContent.value),a=F(()=>t.disableClosingTrigger??n.disableClosingTrigger.value),o=F(()=>t.disabled??n.disabled.value),l=F(()=>t.delayDuration??n.delayDuration.value),u=F(()=>t.ignoreNonKeyboardFocus??n.ignoreNonKeyboardFocus.value),c=Je(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0});je(c,b=>{n.onClose&&(b?(n.onOpen(),document.dispatchEvent(new CustomEvent(nu))):n.onClose())});const h=z(!1),f=z(),m=F(()=>c.value?h.value?"delayed-open":"instant-open":"closed"),{start:p,stop:g}=cd(()=>{h.value=!0,c.value=!0},l,{immediate:!1});function y(){g(),h.value=!1,c.value=!0}function w(){g(),c.value=!1}function x(){p()}return Pm({contentId:"",open:c,stateAttribute:m,trigger:f,onTriggerChange(b){f.value=b},onTriggerEnter(){n.isOpenDelayed.value?x():y()},onTriggerLeave(){s.value?w():g()},onOpen:y,onClose:w,disableHoverableContent:s,disableClosingTrigger:a,disabled:o,ignoreNonKeyboardFocus:u}),(b,C)=>(v(),A(d(Dr),null,{default:_(()=>[S(b.$slots,"default",{open:d(c)})]),_:3}))}}),Rm=Dm,$m=I({__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(r,{emit:e}){const t=r,i=e,n=Jn(),{forwardRef:s,currentElement:a}=Z(),o=F(()=>t.ariaLabel||a.value?.textContent),l=F(()=>{const{ariaLabel:u,...c}=t;return c});return Ge(()=>{Ft(window,"scroll",u=>{u.target?.contains(n.trigger.value)&&n.onClose()}),Ft(window,nu,n.onClose)}),(u,c)=>(v(),A(d(Or),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:c[0]||(c[0]=h=>i("escapeKeyDown",h)),onPointerDownOutside:c[1]||(c[1]=h=>{d(n).disableClosingTrigger.value&&d(n).trigger.value?.contains(h.target)&&h.preventDefault(),i("pointerDownOutside",h)}),onFocusOutside:c[2]||(c[2]=fe(()=>{},["prevent"])),onDismiss:c[3]||(c[3]=h=>d(n).onClose())},{default:_(()=>[E(d(Kn),H({ref:d(s),"data-state":d(n).stateAttribute.value},{...u.$attrs,...l.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:_(()=>[S(u.$slots,"default"),E(d(Tr),{id:d(n).contentId,role:"tooltip"},{default:_(()=>[de(ee(o.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),su=$m,Lm=I({__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(r){const t=Qt(r),{forwardRef:i,currentElement:n}=Z(),{trigger:s,onClose:a}=Jn(),o=la(),{isPointerInTransit:l,onPointerExit:u}=bl(s,n);return o.isPointerInTransitRef=l,u(()=>{a()}),(c,h)=>(v(),A(su,H({ref:d(i)},d(t)),{default:_(()=>[S(c.$slots,"default")]),_:3},16))}}),Hm=Lm,Nm=I({__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(r,{emit:e}){const t=r,i=e,n=Jn(),s=_e(t,i),{forwardRef:a}=Z();return(o,l)=>(v(),A(d(Ht),{present:o.forceMount||d(n).open.value},{default:_(()=>[(v(),A(lr(d(n).disableHoverableContent.value?su:Hm),H({ref:d(a)},d(s)),{default:_(()=>[S(o.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Vm=Nm,jm=I({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,i)=>(v(),A(d(zr),ae(oe(e)),{default:_(()=>[S(t.$slots,"default")]),_:3},16))}}),Um=jm,Gm=I({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=Jn(),i=la();t.contentId||=bt(void 0,"reka-tooltip-content");const{forwardRef:n,currentElement:s}=Z(),a=z(!1),o=z(!1),l=F(()=>t.disabled.value?{}:{click:g,focus:m,pointermove:h,pointerleave:f,pointerdown:c,blur:p});Ge(()=>{t.onTriggerChange(s.value)});function u(){setTimeout(()=>{a.value=!1},1)}function c(){t.open&&!t.disableClosingTrigger.value&&t.onClose(),a.value=!0,document.addEventListener("pointerup",u,{once:!0})}function h(y){y.pointerType!=="touch"&&!o.value&&!i.isPointerInTransitRef.value&&(t.onTriggerEnter(),o.value=!0)}function f(){t.onTriggerLeave(),o.value=!1}function m(y){a.value||t.ignoreNonKeyboardFocus.value&&!y.target.matches?.(":focus-visible")||t.onOpen()}function p(){t.onClose()}function g(){t.disableClosingTrigger.value||t.onClose()}return(y,w)=>(v(),A(d(Rr),{"as-child":"",reference:y.reference},{default:_(()=>[E(d(ne),H({ref:d(n),"aria-describedby":d(t).open.value?d(t).contentId:void 0,"data-state":d(t).stateAttribute.value,as:y.as,"as-child":e.asChild,"data-grace-area-trigger":""},Pr(l.value)),{default:_(()=>[S(y.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),Wm=Gm;const Km=()=>hd("color-mode").value,Xm=Object.assign({inheritAttrs:!1},{__name:"UColorModeButton",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(r){const e=r,{t}=ki(),i=Km(),n=Ie(),s=De("button",e),a=Qt(ur(e,"icon")),o=F({get(){return i.value==="dark"},set(l){i.preference=l?"dark":"light"}});return(l,u)=>(v(),A(ut,H({...d(a),"aria-label":o.value?d(t)("colorMode.switchToLight"):d(t)("colorMode.switchToDark"),...l.$attrs},{onClick:u[0]||(u[0]=c=>o.value=!o.value)}),{leading:_(({ui:c})=>[E(Se,{class:O(c.leadingIcon({class:[d(s)?.leadingIcon,"hidden dark:inline-block"]})),name:d(n).ui.icons.dark},null,8,["class","name"]),E(Se,{class:O(c.leadingIcon({class:[d(s)?.leadingIcon,"dark:hidden"]})),name:d(n).ui.icons.light},null,8,["class","name"])]),_:1},16))}}),rn={meta:"",ctrl:"",alt:"",win:"⊞",command:"⌘",shift:"⇧",control:"⌃",option:"⌥",enter:"↵",delete:"⌦",backspace:"⌫",escape:"Esc",tab:"⇥",capslock:"⇪",arrowup:"↑",arrowright:"→",arrowdown:"↓",arrowleft:"←",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘"},Ym=()=>{const r=F(()=>navigator&&navigator.userAgent&&navigator.userAgent.match(/Macintosh;/)),e=sa({meta:" ",alt:" ",ctrl:" "});Ge(()=>{e.meta=r.value?rn.command:"Ctrl",e.ctrl=r.value?rn.control:"Ctrl",e.alt=r.value?rn.option:"Alt"});function t(i){if(i)return["meta","alt","ctrl"].includes(i)?e[i]:rn[i]||i}return{macOS:r,getKbdKey:t}},Jm=ra(Ym),Zm={base:"inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans uppercase",variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{sm:"h-4 min-w-[16px] text-[10px]",md:"h-5 min-w-[20px] text-[11px]",lg:"h-6 min-w-[24px] text-[12px]"}},compoundVariants:[{color:"primary",variant:"solid",class:"text-inverted bg-primary"},{color:"secondary",variant:"solid",class:"text-inverted bg-secondary"},{color:"success",variant:"solid",class:"text-inverted bg-success"},{color:"info",variant:"solid",class:"text-inverted bg-info"},{color:"warning",variant:"solid",class:"text-inverted bg-warning"},{color:"error",variant:"solid",class:"text-inverted bg-error"},{color:"primary",variant:"outline",class:"ring ring-inset ring-primary/50 text-primary"},{color:"secondary",variant:"outline",class:"ring ring-inset ring-secondary/50 text-secondary"},{color:"success",variant:"outline",class:"ring ring-inset ring-success/50 text-success"},{color:"info",variant:"outline",class:"ring ring-inset ring-info/50 text-info"},{color:"warning",variant:"outline",class:"ring ring-inset ring-warning/50 text-warning"},{color:"error",variant:"outline",class:"ring ring-inset ring-error/50 text-error"},{color:"primary",variant:"soft",class:"text-primary bg-primary/10"},{color:"secondary",variant:"soft",class:"text-secondary bg-secondary/10"},{color:"success",variant:"soft",class:"text-success bg-success/10"},{color:"info",variant:"soft",class:"text-info bg-info/10"},{color:"warning",variant:"soft",class:"text-warning bg-warning/10"},{color:"error",variant:"soft",class:"text-error bg-error/10"},{color:"primary",variant:"subtle",class:"text-primary ring ring-inset ring-primary/25 bg-primary/10"},{color:"secondary",variant:"subtle",class:"text-secondary ring ring-inset ring-secondary/25 bg-secondary/10"},{color:"success",variant:"subtle",class:"text-success ring ring-inset ring-success/25 bg-success/10"},{color:"info",variant:"subtle",class:"text-info ring ring-inset ring-info/25 bg-info/10"},{color:"warning",variant:"subtle",class:"text-warning ring ring-inset ring-warning/25 bg-warning/10"},{color:"error",variant:"subtle",class:"text-error ring ring-inset ring-error/25 bg-error/10"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"}],defaultVariants:{variant:"outline",color:"neutral",size:"md"}},au={__name:"UKbd",props:{as:{type:null,required:!1,default:"kbd"},value:{type:null,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(r){const e=r,{getKbdKey:t}=Jm(),i=Ie(),n=De("kbd",e),s=F(()=>le({extend:le(Zm),...i.ui?.kbd||{}}));return(a,o)=>(v(),A(d(ne),{as:r.as,class:O(s.value({class:[d(n)?.base,e.class],color:e.color,variant:e.variant,size:e.size}))},{default:_(()=>[S(a.$slots,"default",{},()=>[de(ee(d(t)(r.value)),1)])]),_:3},8,["as","class"]))}},Qm={slots:{content:"flex items-center gap-1 bg-default text-highlighted shadow-sm rounded-sm ring ring-default h-6 px-2.5 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-tooltip-content-transform-origin) pointer-events-auto",arrow:"fill-default",text:"truncate",kbds:"hidden lg:inline-flex items-center shrink-0 gap-0.5 not-first-of-type:before:content-['·'] not-first-of-type:before:me-0.5",kbdsSize:"sm"}},eg={__name:"UTooltip",props:{text:{type:String,required:!1},kbds:{type:Array,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},reference:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},delayDuration:{type:Number,required:!1},disableHoverableContent:{type:Boolean,required:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1}},emits:["update:open"],setup(r,{emit:e}){const t=r,i=e,n=Ze(),s=Ie(),a=De("tooltip",t),o=_e(It(t,"defaultOpen","open","delayDuration","disableHoverableContent","disableClosingTrigger","ignoreNonKeyboardFocus"),i),l=dr(Ue(()=>t.portal)),u=Ue(()=>Er(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),c=Ue(()=>t.arrow),h=F(()=>le({extend:le(Qm),...s.ui?.tooltip||{}})({side:u.value.side}));return(f,m)=>(v(),A(d(Rm),H(d(o),{disabled:!(r.text||r.kbds?.length||n.content)||t.disabled}),{default:_(({open:p})=>[n.default||r.reference?(v(),A(d(Wm),H({key:0},f.$attrs,{"as-child":"",reference:r.reference,class:t.class}),{default:_(()=>[S(f.$slots,"default",{open:p})]),_:2},1040,["reference","class"])):R("",!0),E(d(Um),ae(oe(d(l))),{default:_(()=>[E(d(Vm),H(u.value,{"data-slot":"content",class:h.value.content({class:[!n.default&&t.class,d(a)?.content]})}),{default:_(()=>[S(f.$slots,"content",{ui:h.value},()=>[r.text?(v(),V("span",{key:0,"data-slot":"text",class:O(h.value.text({class:d(a)?.text}))},ee(r.text),3)):R("",!0),r.kbds?.length?(v(),V("span",{key:1,"data-slot":"kbds",class:O(h.value.kbds({class:d(a)?.kbds}))},[(v(!0),V(xe,null,Xe(r.kbds,(g,y)=>(v(),A(au,H({key:y,size:d(a)?.kbdsSize||h.value.kbdsSize()},{ref_for:!0},typeof g=="string"?{value:g}:g),null,16,["size"]))),128))],2)):R("",!0)]),r.arrow?(v(),A(d(Tm),H({key:0},c.value,{"data-slot":"arrow",class:h.value.arrow({class:d(a)?.arrow})}),null,16,["class"])):R("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16,["disabled"]))}},tg={base:"w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"},ig={__name:"UContainer",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(r){const e=r,t=Ie(),i=De("container",e),n=F(()=>le({extend:le(tg),...t.ui?.container||{}}));return(s,a)=>(v(),A(d(ne),{as:r.as,class:O(n.value({class:[d(i)?.base,e.class]}))},{default:_(()=>[S(s.$slots,"default")]),_:3},8,["as","class"]))}};function Zn(r,e={}){const t=r.detail.originalEvent,i=t.target;if(!i?.isConnected){r.preventDefault();return}e.scrollable&&(t.offsetX>i.clientWidth||t.offsetY>i.clientHeight)&&r.preventDefault()}const rg={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default divide-y divide-default sm:ring ring-default sm:shadow-lg flex flex-col focus:outline-none",header:"flex items-center gap-1.5 p-4 sm:px-6 min-h-16",wrapper:"",body:"flex-1 overflow-y-auto p-4 sm:p-6",footer:"flex items-center gap-1.5 p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",close:"absolute top-4 end-4"},variants:{side:{top:{content:""},right:{content:"max-w-md"},bottom:{content:""},left:{content:"max-w-md"}},inset:{true:{content:"rounded-lg"}},transition:{true:{overlay:"data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]"}}},compoundVariants:[{side:"top",inset:!0,class:{content:"max-h-[calc(100%-2rem)] inset-x-4 top-4"}},{side:"top",inset:!1,class:{content:"max-h-full inset-x-0 top-0"}},{side:"right",inset:!0,class:{content:"w-[calc(100%-2rem)] inset-y-4 right-4"}},{side:"right",inset:!1,class:{content:"w-full inset-y-0 right-0"}},{side:"bottom",inset:!0,class:{content:"max-h-[calc(100%-2rem)] inset-x-4 bottom-4"}},{side:"bottom",inset:!1,class:{content:"max-h-full inset-x-0 bottom-0"}},{side:"left",inset:!0,class:{content:"w-[calc(100%-2rem)] inset-y-4 left-4"}},{side:"left",inset:!1,class:{content:"w-full inset-y-0 left-0"}},{transition:!0,side:"top",class:{content:"data-[state=open]:animate-[slide-in-from-top_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-top_200ms_ease-in-out]"}},{transition:!0,side:"right",class:{content:"data-[state=open]:animate-[slide-in-from-right_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-right_200ms_ease-in-out]"}},{transition:!0,side:"bottom",class:{content:"data-[state=open]:animate-[slide-in-from-bottom_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-bottom_200ms_ease-in-out]"}},{transition:!0,side:"left",class:{content:"data-[state=open]:animate-[slide-in-from-left_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-left_200ms_ease-in-out]"}}]},ng={__name:"USlideover",props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},transition:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1,default:"right"},inset:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["after:leave","after:enter","close:prevent","update:open"],setup(r,{emit:e}){const t=r,i=e,n=Ze(),{t:s}=ki(),a=Ie(),o=De("slideover",t),l=_e(It(t,"open","defaultOpen","modal"),i),u=dr(Ue(()=>t.portal)),c=Ue(()=>t.content),h=F(()=>t.dismissible?{pointerDownOutside:Zn}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((p,g)=>(p[g]=y=>{y.preventDefault(),i("close:prevent")},p),{})),f=F(()=>le({extend:le(rg),...a.ui?.slideover||{}})({transition:t.transition,side:t.side,inset:t.inset}));return(m,p)=>(v(),A(d(pa),ae(oe(d(l))),{default:_(({open:g,close:y})=>[n.default?(v(),A(d(xa),{key:0,"as-child":"",class:O(t.class)},{default:_(()=>[S(m.$slots,"default",{open:g})]),_:2},1032,["class"])):R("",!0),E(d(ba),ae(oe(d(u))),{default:_(()=>[r.overlay?(v(),A(d(En),{key:0,"data-slot":"overlay",class:O(f.value.overlay({class:d(o)?.overlay}))},null,8,["class"])):R("",!0),E(d(va),H({"data-side":r.side,"data-slot":"content",class:f.value.content({class:[!n.default&&t.class,d(o)?.content]})},c.value,{onAfterEnter:p[0]||(p[0]=w=>i("after:enter")),onAfterLeave:p[1]||(p[1]=w=>i("after:leave"))},Pr(h.value)),{default:_(()=>[n.content&&(r.title||n.title||r.description||n.description)?(v(),A(d(Tr),{key:0},{default:_(()=>[r.title||n.title?(v(),A(d(sr),{key:0},{default:_(()=>[S(m.$slots,"title",{},()=>[de(ee(r.title),1)])]),_:3})):R("",!0),r.description||n.description?(v(),A(d(nr),{key:1},{default:_(()=>[S(m.$slots,"description",{},()=>[de(ee(r.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),S(m.$slots,"content",{close:y},()=>[n.header||r.title||n.title||r.description||n.description||t.close||n.close?(v(),V("div",{key:0,"data-slot":"header",class:O(f.value.header({class:d(o)?.header}))},[S(m.$slots,"header",{close:y},()=>[P("div",{"data-slot":"wrapper",class:O(f.value.wrapper({class:d(o)?.wrapper}))},[r.title||n.title?(v(),A(d(sr),{key:0,"data-slot":"title",class:O(f.value.title({class:d(o)?.title}))},{default:_(()=>[S(m.$slots,"title",{},()=>[de(ee(r.title),1)])]),_:3},8,["class"])):R("",!0),r.description||n.description?(v(),A(d(nr),{key:1,"data-slot":"description",class:O(f.value.description({class:d(o)?.description}))},{default:_(()=>[S(m.$slots,"description",{},()=>[de(ee(r.description),1)])]),_:3},8,["class"])):R("",!0)],2),S(m.$slots,"actions"),t.close||n.close?(v(),A(d(wl),{key:0,"as-child":""},{default:_(()=>[S(m.$slots,"close",{ui:f.value},()=>[t.close?(v(),A(ut,H({key:0,icon:r.closeIcon||d(a).ui.icons.close,color:"neutral",variant:"ghost","aria-label":d(s)("slideover.close")},typeof t.close=="object"?t.close:{},{"data-slot":"close",class:f.value.close({class:d(o)?.close})}),null,16,["icon","aria-label","class"])):R("",!0)])]),_:2},1024)):R("",!0)])],2)):R("",!0),P("div",{"data-slot":"body",class:O(f.value.body({class:d(o)?.body}))},[S(m.$slots,"body",{close:y})],2),n.footer?(v(),V("div",{key:1,"data-slot":"footer",class:O(f.value.footer({class:d(o)?.footer}))},[S(m.$slots,"footer",{close:y})],2)):R("",!0)])]),_:2},1040,["data-side","class"])]),_:2},1040)]),_:3},16))}},sg={slots:{overlay:"fixed inset-0",content:"bg-default divide-y divide-default flex flex-col focus:outline-none",header:"flex items-center gap-1.5 p-4 sm:px-6 min-h-16",wrapper:"",body:"flex-1 p-4 sm:p-6",footer:"flex items-center gap-1.5 p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",close:"absolute top-4 end-4"},variants:{transition:{true:{overlay:"data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]",content:"data-[state=open]:animate-[scale-in_200ms_ease-out] data-[state=closed]:animate-[scale-out_200ms_ease-in]"}},fullscreen:{true:{content:"inset-0"},false:{content:"w-[calc(100vw-2rem)] max-w-lg rounded-lg shadow-lg ring ring-default"}},overlay:{true:{overlay:"bg-elevated/75"}},scrollable:{true:{overlay:"overflow-y-auto",content:"relative"},false:{content:"fixed",body:"overflow-y-auto"}}},compoundVariants:[{scrollable:!0,fullscreen:!1,class:{overlay:"grid place-items-center p-4 sm:py-8"}},{scrollable:!1,fullscreen:!1,class:{content:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] overflow-hidden"}}]},ag={__name:"UModal",props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},scrollable:{type:Boolean,required:!1},transition:{type:Boolean,required:!1,default:!0},fullscreen:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["after:leave","after:enter","close:prevent","update:open"],setup(r,{emit:e}){const t=r,i=e,n=Ze(),{t:s}=ki(),a=Ie(),o=De("modal",t),l=_e(It(t,"open","defaultOpen","modal"),i),u=dr(Ue(()=>t.portal)),c=Ue(()=>t.content),h=F(()=>t.dismissible?{pointerDownOutside:g=>Zn(g,{scrollable:t.scrollable})}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((y,w)=>(y[w]=x=>{x.preventDefault(),i("close:prevent")},y),{})),[f,m]=Ar(),p=F(()=>le({extend:le(sg),...a.ui?.modal||{}})({transition:t.transition,fullscreen:t.fullscreen,overlay:t.overlay,scrollable:t.scrollable}));return(g,y)=>(v(),A(d(pa),ae(oe(d(l))),{default:_(({open:w,close:x})=>[E(d(f),null,{default:_(()=>[E(d(va),H({"data-slot":"content",class:p.value.content({class:[!n.default&&t.class,d(o)?.content]})},c.value,{onAfterEnter:y[0]||(y[0]=b=>i("after:enter")),onAfterLeave:y[1]||(y[1]=b=>i("after:leave"))},Pr(h.value)),{default:_(()=>[n.content&&(r.title||n.title||r.description||n.description)?(v(),A(d(Tr),{key:0},{default:_(()=>[r.title||n.title?(v(),A(d(sr),{key:0},{default:_(()=>[S(g.$slots,"title",{},()=>[de(ee(r.title),1)])]),_:3})):R("",!0),r.description||n.description?(v(),A(d(nr),{key:1},{default:_(()=>[S(g.$slots,"description",{},()=>[de(ee(r.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),S(g.$slots,"content",{close:x},()=>[n.header||r.title||n.title||r.description||n.description||t.close||n.close?(v(),V("div",{key:0,"data-slot":"header",class:O(p.value.header({class:d(o)?.header}))},[S(g.$slots,"header",{close:x},()=>[P("div",{"data-slot":"wrapper",class:O(p.value.wrapper({class:d(o)?.wrapper}))},[r.title||n.title?(v(),A(d(sr),{key:0,"data-slot":"title",class:O(p.value.title({class:d(o)?.title}))},{default:_(()=>[S(g.$slots,"title",{},()=>[de(ee(r.title),1)])]),_:3},8,["class"])):R("",!0),r.description||n.description?(v(),A(d(nr),{key:1,"data-slot":"description",class:O(p.value.description({class:d(o)?.description}))},{default:_(()=>[S(g.$slots,"description",{},()=>[de(ee(r.description),1)])]),_:3},8,["class"])):R("",!0)],2),S(g.$slots,"actions"),t.close||n.close?(v(),A(d(wl),{key:0,"as-child":""},{default:_(()=>[S(g.$slots,"close",{ui:p.value},()=>[t.close?(v(),A(ut,H({key:0,icon:r.closeIcon||d(a).ui.icons.close,color:"neutral",variant:"ghost","aria-label":d(s)("modal.close")},typeof t.close=="object"?t.close:{},{"data-slot":"close",class:p.value.close({class:d(o)?.close})}),null,16,["icon","aria-label","class"])):R("",!0)])]),_:2},1024)):R("",!0)])],2)):R("",!0),n.body?(v(),V("div",{key:1,"data-slot":"body",class:O(p.value.body({class:d(o)?.body}))},[S(g.$slots,"body",{close:x})],2)):R("",!0),n.footer?(v(),V("div",{key:2,"data-slot":"footer",class:O(p.value.footer({class:d(o)?.footer}))},[S(g.$slots,"footer",{close:x})],2)):R("",!0)])]),_:2},1040,["class"])]),_:2},1024),n.default?(v(),A(d(xa),{key:0,"as-child":"",class:O(t.class)},{default:_(()=>[S(g.$slots,"default",{open:w})]),_:2},1032,["class"])):R("",!0),E(d(ba),ae(oe(d(u))),{default:_(()=>[r.scrollable?(v(),A(d(En),{key:0,"data-slot":"overlay",class:O(p.value.overlay({class:d(o)?.overlay}))},{default:_(()=>[E(d(m))]),_:1},8,["class"])):(v(),V(xe,{key:1},[r.overlay?(v(),A(d(En),{key:0,"data-slot":"overlay",class:O(p.value.overlay({class:d(o)?.overlay}))},null,8,["class"])):R("",!0),E(d(m))],64))]),_:1},16)]),_:3},16))}};(function(){var r;try{if(typeof document<"u"){var e=document.createElement("style");e.nonce=(r=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:r.content,e.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(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const og=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const lg=r=>typeof r<"u";function ug(r){return JSON.parse(JSON.stringify(r))}function go(r,e,t,i={}){var n,s,a;const{clone:o=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:h,shouldEmit:f}=i,m=fd(),p=t||m?.emit||((n=m?.$emit)==null?void 0:n.bind(m))||((a=(s=m?.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(m?.proxy));let g=u;e||(e="modelValue"),g=g||`update:${e.toString()}`;const y=b=>o?typeof o=="function"?o(b):ug(b):b,w=()=>lg(r[e])?y(r[e]):h,x=b=>{f?f(b)&&p(g,b):p(g,b)};if(l){const b=w(),C=z(b);let q=!1;return je(()=>r[e],M=>{q||(q=!0,C.value=y(M),nt(()=>q=!1))}),je(C,M=>{!q&&(M!==r[e]||c)&&x(M)},{deep:c}),C}else return F({get(){return w()},set(b){x(b)}})}const[Hr,dg]=Pe("DrawerRoot"),ou=new WeakMap;function Le(r,e,t=!1){if(!r||!(r instanceof HTMLElement)||!e)return;const i={};Object.entries(e).forEach(([n,s])=>{if(n.startsWith("--")){r.style.setProperty(n,s);return}i[n]=r.style[n],r.style[n]=s}),!t&&ou.set(r,i)}function cg(r,e){if(!r||!(r instanceof HTMLElement))return;const t=ou.get(r);t&&Object.entries(t).forEach(([i,n])=>{r.style[i]=n})}function nn(r,e){const t=window.getComputedStyle(r),i=t.transform||t.webkitTransform||t.mozTransform;let n=i.match(/^matrix3d\((.+)\)$/);return n?Number.parseFloat(n[1].split(", ")[Ee(e)?13:12]):(n=i.match(/^matrix\((.+)\)$/),n?Number.parseFloat(n[1].split(", ")[Ee(e)?5:4]):null)}function hg(r){return 8*(Math.log(r+1)-2)}function Ee(r){switch(r){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return r}}function ds(r,e){if(!r)return()=>{};const t=r.style.cssText;return Object.assign(r.style,e),()=>{r.style.cssText=t}}function fg(...r){return(...e)=>{for(const t of r)typeof t=="function"&&t(...e)}}const ve={DURATION:.5,EASE:[.32,.72,0,1]},lu=.4,pg=.25,mg=100,uu=8,sn=16,du=26,yo="vaul-dragging";function gg({activeSnapPoint:r,snapPoints:e,drawerRef:t,overlayRef:i,fadeFromIndex:n,onSnapPointChange:s,direction:a}){const o=z(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function l(){o.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}Ge(()=>{typeof window<"u"&&window.addEventListener("resize",l)}),ll(()=>{typeof window<"u"&&window.removeEventListener("resize",l)});const u=F(()=>(e.value&&r.value===e.value[e.value.length-1])??null),c=F(()=>e.value&&e.value.length>0&&(n?.value||n?.value===0)&&!Number.isNaN(n?.value)&&e.value[n?.value??-1]===r.value||!e.value),h=F(()=>{var x;return((x=e.value)==null?void 0:x.findIndex(b=>b===r.value))??null}),f=F(()=>{var x;return((x=e.value)==null?void 0:x.map(b=>{const C=typeof b=="string";let q=0;if(C&&(q=Number.parseInt(b,10)),Ee(a.value)){const B=C?q:o.value?b*o.value.innerHeight:0;return o.value?a.value==="bottom"?o.value.innerHeight-B:-o.value.innerHeight+B:B}const M=C?q:o.value?b*o.value.innerWidth:0;return o.value?a.value==="right"?o.value.innerWidth-M:-o.value.innerWidth+M:M}))??[]}),m=F(()=>{var x;return h.value!==null?(x=f.value)==null?void 0:x[h.value]:null}),p=x=>{var b,C,q,M;const B=((b=f.value)==null?void 0:b.findIndex(T=>T===x))??null;nt(()=>{var T;s(B,f.value),Le((T=t.value)==null?void 0:T.$el,{transition:`transform ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,transform:Ee(a.value)?`translate3d(0, ${x}px, 0)`:`translate3d(${x}px, 0, 0)`})}),f.value&&B!==f.value.length-1&&B!==n?.value?Le((C=i.value)==null?void 0:C.$el,{transition:`opacity ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,opacity:"0"}):Le((q=i.value)==null?void 0:q.$el,{transition:`opacity ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,opacity:"1"}),r.value=B!==null?((M=e.value)==null?void 0:M[B])??null:null};je([r,f,e],()=>{var x;if(r.value){const b=((x=e.value)==null?void 0:x.findIndex(C=>C===r.value))??-1;f.value&&b!==-1&&typeof f.value[b]=="number"&&p(f.value[b])}},{immediate:!0});function g({draggedDistance:x,closeDrawer:b,velocity:C,dismissible:q}){var M,B,T;if(n.value===void 0)return;const k=a.value==="bottom"||a.value==="right"?(m.value??0)-x:(m.value??0)+x,$=h.value===n.value-1,N=h.value===0,U=x>0;if($&&Le((M=i.value)==null?void 0:M.$el,{transition:`opacity ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`}),C>2&&!U){q?b():p(f.value[0]);return}if(C>2&&U&&f&&e.value){p(f.value[e.value.length-1]);return}const Q=(B=f.value)==null?void 0:B.reduce((X,Y)=>typeof X!="number"||typeof Y!="number"?X:Math.abs(Y-k)<Math.abs(X-k)?Y:X),ie=Ee(a.value)?window.innerHeight:window.innerWidth;if(C>lu&&Math.abs(x)<ie*.4){const X=U?1:-1;if(X>0&&u){p(f.value[(((T=e.value)==null?void 0:T.length)??0)-1]);return}if(N&&X<0&&q&&b(),h.value===null)return;p(f.value[h.value+X]);return}p(Q)}function y({draggedDistance:x}){var b;if(m.value===null)return;const C=a.value==="bottom"||a.value==="right"?m.value-x:m.value+x;(a.value==="bottom"||a.value==="right")&&C<f.value[f.value.length-1]||(a.value==="top"||a.value==="left")&&C>f.value[f.value.length-1]||Le((b=t.value)==null?void 0:b.$el,{transform:Ee(a.value)?`translate3d(0, ${C}px, 0)`:`translate3d(${C}px, 0, 0)`})}function w(x,b){if(!e.value||typeof h.value!="number"||!f.value||n.value===void 0)return null;const C=h.value===n.value-1;if(h.value>=n.value&&b)return 0;if(C&&!b)return 1;if(!c.value&&!C)return null;const q=C?h.value+1:h.value-1,M=C?f.value[q]-f.value[q-1]:f.value[q+1]-f.value[q],B=x/Math.abs(M);return C?1-B:B}return{isLastSnapPoint:u,shouldFade:c,getPercentageDragged:w,activeSnapPointIndex:h,onRelease:g,onDrag:y,snapPointsOffset:f}}function vo(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let gr=null;function yg(r){const{isOpen:e,modal:t,nested:i,hasBeenOpened:n,preventScrollRestoration:s,noBodyStyles:a}=r,o=z(typeof window<"u"?window.location.href:""),l=z(0);function u(){if(vo()&&gr===null&&e.value&&!a.value){gr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:h,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.value}px`,left:`${-h}px`,right:"0px",height:"auto"}),setTimeout(()=>{requestAnimationFrame(()=>{const m=f-window.innerHeight;m&&l.value>=f&&(document.body.style.top=`-${l.value+m}px`)})},300)}}function c(){if(vo()&&gr!==null&&!a.value){const h=-Number.parseInt(document.body.style.top,10),f=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,gr),window.requestAnimationFrame(()=>{if(s.value&&o.value!==window.location.href){o.value=window.location.href;return}window.scrollTo(f,h)}),gr=null}}return Ge(()=>{function h(){l.value=window.scrollY}h(),window.addEventListener("scroll",h),qi(()=>{window.removeEventListener("scroll",h)})}),je([e,n,o],()=>{i.value||!n.value||(e.value?(window.matchMedia("(display-mode: standalone)").matches||u(),t.value||setTimeout(()=>{c()},500)):c())}),{restorePositionSetting:c}}function vg(r,e){return r&&r.value?r:e}function bg(r){const{emitDrag:e,emitRelease:t,emitClose:i,emitOpenChange:n,open:s,dismissible:a,nested:o,modal:l,shouldScaleBackground:u,setBackgroundColorOnScale:c,scrollLockTimeout:h,closeThreshold:f,activeSnapPoint:m,fadeFromIndex:p,direction:g,noBodyStyles:y,handleOnly:w,preventScrollRestoration:x}=r,b=z(s.value??!1),C=z(!1),q=z(!1),M=z(!1),B=z(null),T=z(null),k=z(null),$=z(null),N=z(null),U=z(!1),Q=z(null),ie=z(0),X=z(!1);z(0);const Y=z(null);z(0);const ce=F(()=>{var re;return((re=Y.value)==null?void 0:re.$el.getBoundingClientRect().height)||0}),K=vg(r.snapPoints,z(void 0)),he=F(()=>{var re;return K&&(((re=K.value)==null?void 0:re.length)??0)>0}),te=z(null),{activeSnapPointIndex:ye,onRelease:ei,snapPointsOffset:ju,onDrag:Uu,shouldFade:Da,getPercentageDragged:Gu}=gg({snapPoints:K,activeSnapPoint:m,drawerRef:Y,fadeFromIndex:p,overlayRef:B,onSnapPointChange:Wu,direction:g});function Wu(re,Ce){K.value&&re===Ce.length-1&&(T.value=new Date)}yg({isOpen:b,modal:l,nested:o,hasBeenOpened:C,noBodyStyles:y,preventScrollRestoration:x});function Kr(){return(window.innerWidth-du)/window.innerWidth}function Ra(re,Ce){var Te;if(!re)return!1;let ge=re;const He=(Te=window.getSelection())==null?void 0:Te.toString(),Qe=Y.value?nn(Y.value.$el,g.value):null,wt=new Date;if(ge.hasAttribute("data-vaul-no-drag")||ge.closest("[data-vaul-no-drag]"))return!1;if(g.value==="right"||g.value==="left")return!0;if(T.value&&wt.getTime()-T.value.getTime()<500)return!1;if(Qe!==null&&(g.value==="bottom"?Qe>0:Qe<0))return!0;if(He&&He.length>0)return!1;if(N.value&&wt.getTime()-N.value.getTime()<h.value&&Qe===0||Ce)return N.value=wt,!1;for(;ge;){if(ge.scrollHeight>ge.clientHeight){if(ge.scrollTop!==0)return N.value=new Date,!1;if(ge.getAttribute("role")==="dialog")return!0}ge=ge.parentNode}return!0}function Ku(re){!a.value&&!K.value||Y.value&&!Y.value.$el.contains(re.target)||(q.value=!0,k.value=new Date,re.target.setPointerCapture(re.pointerId),ie.value=Ee(g.value)?re.clientY:re.clientX)}function Xu(re){var Ce,Te,ge,He,Qe,wt;if(Y.value&&q.value){const zi=g.value==="bottom"||g.value==="right"?1:-1,Xr=(ie.value-(Ee(g.value)?re.clientY:re.clientX))*zi,Yr=Xr>0,La=K.value&&!a.value&&!Yr;if(La&&ye.value===0)return;const ts=Math.abs(Xr),Ha=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let mi=ts/ce.value;const Na=Gu(ts,Yr);if(Na!==null&&(mi=Na),La&&mi>=1||!U.value&&!Ra(re.target,Yr))return;if((Ce=Y?.value)==null||Ce.$el.classList.add(yo),U.value=!0,Le((Te=Y.value)==null?void 0:Te.$el,{transition:"none"}),Le((ge=B.value)==null?void 0:ge.$el,{transition:"none"}),K.value&&Uu({draggedDistance:Xr}),Yr&&!K.value){const gi=hg(Xr),Jr=Math.min(gi*-1,0)*zi;Le((He=Y.value)==null?void 0:He.$el,{transform:Ee(g.value)?`translate3d(0, ${Jr}px, 0)`:`translate3d(${Jr}px, 0, 0)`});return}const ed=1-mi;if((Da.value||p.value&&ye.value===p.value-1)&&(e(mi),Le((Qe=B.value)==null?void 0:Qe.$el,{opacity:`${ed}`,transition:"none"},!0)),Ha&&B.value&&u.value){const gi=Math.min(Kr()+mi*(1-Kr()),1),Jr=8-mi*8,Va=Math.max(0,14-mi*14);Le(Ha,{borderRadius:`${Jr}px`,transform:Ee(g.value)?`scale(${gi}) translate3d(0, ${Va}px, 0)`:`scale(${gi}) translate3d(${Va}px, 0, 0)`,transition:"none"},!0)}if(!K.value){const gi=ts*zi;Le((wt=Y.value)==null?void 0:wt.$el,{transform:Ee(g.value)?`translate3d(0, ${gi}px, 0)`:`translate3d(${gi}px, 0, 0)`})}}}function $a(){var re;if(!Y.value)return;const Ce=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]"),Te=nn(Y.value.$el,g.value);Le(Y.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`}),Le((re=B.value)==null?void 0:re.$el,{transition:`opacity ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,opacity:"1"}),u.value&&Te&&Te>0&&b.value&&Le(Ce,{borderRadius:`${uu}px`,overflow:"hidden",...Ee(g.value)?{transform:`scale(${Kr()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Kr()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${ve.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ve.EASE.join(",")})`},!0)}function mr(re){Y.value&&(i(),re||(b.value=!1),window.setTimeout(()=>{K.value&&(m.value=K.value[0])},ve.DURATION*1e3))}vt(()=>{if(!b.value&&u.value&&og){const re=setTimeout(()=>{cg(document.body)},200);return()=>clearTimeout(re)}}),je(s,()=>{b.value=s.value,s.value||mr()});function Yu(re){if(!q.value||!Y.value)return;Y.value.$el.classList.remove(yo),U.value=!1,q.value=!1,$.value=new Date;const Ce=nn(Y.value.$el,g.value);if(!Ra(re.target,!1)||!Ce||Number.isNaN(Ce)||k.value===null)return;const Te=$.value.getTime()-k.value.getTime(),ge=ie.value-(Ee(g.value)?re.clientY:re.clientX),He=Math.abs(ge)/Te;if(He>.05&&(M.value=!0,window.setTimeout(()=>{M.value=!1},200)),K.value){const wt=g.value==="bottom"||g.value==="right"?1:-1;ei({draggedDistance:ge*wt,closeDrawer:mr,velocity:He,dismissible:a.value}),t(!0);return}if(g.value==="bottom"||g.value==="right"?ge>0:ge<0){$a(),t(!0);return}if(He>lu){mr(),t(!1);return}const Qe=Math.min(Y.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(Ce>=Qe*f.value){mr(),t(!1);return}t(!0),$a()}je(b,re=>{re&&(T.value=new Date),n(re)},{immediate:!0});function Ju(re){var Ce,Te;const ge=re?(window.innerWidth-sn)/window.innerWidth:1,He=re?-16:0;Q.value&&window.clearTimeout(Q.value),Le((Ce=Y.value)==null?void 0:Ce.$el,{transition:`transform ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,transform:`scale(${ge}) translate3d(0, ${He}px, 0)`}),!re&&(Te=Y.value)!=null&&Te.$el&&(Q.value=window.setTimeout(()=>{var Qe,wt;const zi=nn((Qe=Y.value)==null?void 0:Qe.$el,g.value);Le((wt=Y.value)==null?void 0:wt.$el,{transition:"none",transform:Ee(g.value)?`translate3d(0, ${zi}px, 0)`:`translate3d(${zi}px, 0, 0)`})},500))}function Zu(re){var Ce;if(re<0)return;const Te=Ee(g.value)?window.innerHeight:window.innerWidth,ge=(Te-sn)/Te,He=ge+re*(1-ge),Qe=-16+re*sn;Le((Ce=Y.value)==null?void 0:Ce.$el,{transform:Ee(g.value)?`scale(${He}) translate3d(0, ${Qe}px, 0)`:`scale(${He}) translate3d(${Qe}px, 0, 0)`,transition:"none"})}function Qu(re){var Ce;const Te=Ee(g.value)?window.innerHeight:window.innerWidth,ge=re?(Te-sn)/Te:1,He=re?-16:0;re&&Le((Ce=Y.value)==null?void 0:Ce.$el,{transition:`transform ${ve.DURATION}s cubic-bezier(${ve.EASE.join(",")})`,transform:Ee(g.value)?`scale(${ge}) translate3d(0, ${He}px, 0)`:`scale(${ge}) translate3d(${He}px, 0, 0)`})}return{open:s,isOpen:b,modal:l,keyboardIsOpen:X,hasBeenOpened:C,drawerRef:Y,drawerHeightRef:ce,overlayRef:B,handleRef:te,isDragging:q,dragStartTime:k,isAllowedToDrag:U,snapPoints:K,activeSnapPoint:m,hasSnapPoints:he,pointerStart:ie,dismissible:a,snapPointsOffset:ju,direction:g,shouldFade:Da,fadeFromIndex:p,shouldScaleBackground:u,setBackgroundColorOnScale:c,onPress:Ku,onDrag:Xu,onRelease:Yu,closeDrawer:mr,onNestedDrag:Zu,onNestedRelease:Qu,onNestedOpenChange:Ju,emitClose:i,emitDrag:e,emitRelease:t,emitOpenChange:n,nested:o,handleOnly:w,noBodyStyles:y}}const cu=I({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:pg},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:mg},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(r,{expose:e,emit:t}){const i=r,n=t;Ze();const s=F(()=>i.fadeFromIndex??(i.snapPoints&&i.snapPoints.length-1)),a=go(i,"open",n,{defaultValue:i.defaultOpen,passive:i.open===void 0}),o=go(i,"activeSnapPoint",n,{passive:i.activeSnapPoint===void 0}),l={emitDrag:p=>n("drag",p),emitRelease:p=>n("release",p),emitClose:()=>n("close"),emitOpenChange:p=>{n("update:open",p),setTimeout(()=>{n("animationEnd",p)},ve.DURATION*1e3)}},{closeDrawer:u,hasBeenOpened:c,modal:h,isOpen:f}=dg(bg({...l,...xt(i),activeSnapPoint:o,fadeFromIndex:s,open:a}));function m(p){if(a.value!==void 0){l.emitOpenChange(p);return}f.value=p,p?c.value=!0:u()}return e({open:f}),(p,g)=>(v(),A(d(pa),{open:d(f),modal:d(h),"onUpdate:open":m},{default:_(()=>[S(p.$slots,"default",{open:d(f)})]),_:3},8,["open","modal"]))}}),xg=I({__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(r,{emit:e}){const t=r,i=e,{onNestedDrag:n,onNestedOpenChange:s,onNestedRelease:a}=Hr();function o(){s(!1)}function l(h){n(h)}function u(h){h&&s(h),i("update:open",h)}const c=_e(t,i);return(h,f)=>(v(),A(cu,H(d(c),{nested:"",onClose:o,onDrag:l,onRelease:d(a),"onUpdate:open":u}),{default:_(()=>[S(h.$slots,"default")]),_:3},16,["onRelease"]))}}),wg=I({__name:"DrawerOverlay",setup(r){const{overlayRef:e,hasSnapPoints:t,isOpen:i,shouldFade:n}=Hr();return(s,a)=>(v(),A(d(En),{ref_key:"overlayRef",ref:e,"data-vaul-overlay":"","data-vaul-snap-points":d(i)&&d(t)?"true":"false","data-vaul-snap-points-overlay":d(i)&&d(n)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),_g=()=>()=>{};function Cg(){const{direction:r,isOpen:e,shouldScaleBackground:t,setBackgroundColorOnScale:i,noBodyStyles:n}=Hr(),s=z(null),a=z(document.body.style.backgroundColor);function o(){return(window.innerWidth-du)/window.innerWidth}vt(l=>{if(e.value&&t.value){s.value&&clearTimeout(s.value);const u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;fg(i.value&&!n.value?ds(document.body,{background:"black"}):_g,ds(u,{transformOrigin:Ee(r.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${ve.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ve.EASE.join(",")})`}));const c=ds(u,{borderRadius:`${uu}px`,overflow:"hidden",...Ee(r.value)?{transform:`scale(${o()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${o()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});l(()=>{c(),s.value=window.setTimeout(()=>{a.value?document.body.style.background=a.value:document.body.style.removeProperty("background")},ve.DURATION*1e3)})}},{flush:"pre"})}const Ag=I({__name:"DrawerContent",setup(r){const{open:e,isOpen:t,snapPointsOffset:i,hasSnapPoints:n,drawerRef:s,onPress:a,onDrag:o,onRelease:l,modal:u,emitOpenChange:c,dismissible:h,keyboardIsOpen:f,closeDrawer:m,direction:p,handleOnly:g}=Hr();Cg();const y=z(!1),w=F(()=>i.value&&i.value.length>0?`${i.value[0]}px`:"0");function x(q){if(!u.value||q.defaultPrevented){q.preventDefault();return}f.value&&(f.value=!1),h.value?c(!1):q.preventDefault()}function b(q){g.value||a(q)}function C(q){g.value||o(q)}return vt(()=>{n.value&&window.requestAnimationFrame(()=>{y.value=!0})}),(q,M)=>(v(),A(d(va),{ref_key:"drawerRef",ref:s,"data-vaul-drawer":"","data-vaul-drawer-direction":d(p),"data-vaul-delayed-snap-points":y.value?"true":"false","data-vaul-snap-points":d(t)&&d(n)?"true":"false",style:Et({"--snap-point-height":w.value}),onPointerdown:b,onPointermove:C,onPointerup:d(l),onPointerDownOutside:x,onOpenAutoFocus:M[0]||(M[0]=fe(()=>{},["prevent"])),onEscapeKeyDown:M[1]||(M[1]=B=>{d(h)||B.preventDefault()})},{default:_(()=>[S(q.$slots,"default")]),_:3},8,["data-vaul-drawer-direction","data-vaul-delayed-snap-points","data-vaul-snap-points","style","onPointerup"]))}}),Sg=["data-vaul-drawer-visible"],Mg={"data-vaul-handle-hitarea":"","aria-hidden":"true"},Bg=250,qg=120,kg=I({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(r){const e=r,{onPress:t,onDrag:i,handleRef:n,handleOnly:s,isOpen:a,snapPoints:o,activeSnapPoint:l,isDragging:u,dismissible:c,closeDrawer:h}=Hr(),f=z(null),m=z(!1);function p(){if(m.value){w();return}window.setTimeout(()=>{g()},qg)}function g(){if(u.value||e.preventCycle||m.value){w();return}if(w(),!o.value||o.value.length===0){c.value||h();return}const C=l.value===o.value[o.value.length-1];if(C&&c.value){h();return}const q=o.value.findIndex(B=>B===l.value);if(q===-1)return;const M=C?0:q+1;l.value=o.value[M]}function y(){f.value=window.setTimeout(()=>{m.value=!0},Bg)}function w(){f.value&&window.clearTimeout(f.value),m.value=!1}function x(C){s.value&&t(C),y()}function b(C){s.value&&i(C)}return(C,q)=>(v(),V("div",{ref_key:"handleRef",ref:n,"data-vaul-drawer-visible":d(a)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:p,onPointercancel:w,onPointerdown:x,onPointermove:b},[P("span",Mg,[S(C.$slots,"default")])],40,Sg))}}),Fg={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default ring ring-default flex focus:outline-none",handle:["shrink-0 !bg-accented","transition-opacity"],container:"w-full flex flex-col gap-4 p-4 overflow-y-auto",header:"",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"flex-1",footer:"flex flex-col gap-1.5"},variants:{direction:{top:{content:"mb-24 flex-col-reverse",handle:"mb-4"},right:{content:"flex-row",handle:"!ml-4"},bottom:{content:"mt-24 flex-col",handle:"mt-4"},left:{content:"flex-row-reverse",handle:"!mr-4"}},inset:{true:{content:"rounded-lg after:hidden overflow-hidden [--initial-transform:calc(100%+1.5rem)]"}},snapPoints:{true:""}},compoundVariants:[{direction:["top","bottom"],class:{content:"h-auto max-h-[96%]",handle:"!w-12 !h-1.5 mx-auto"}},{direction:["top","bottom"],snapPoints:!0,class:{content:"h-full"}},{direction:["right","left"],class:{content:"w-auto max-w-[calc(100%-2rem)]",handle:"!h-12 !w-1.5 mt-auto mb-auto"}},{direction:["right","left"],snapPoints:!0,class:{content:"w-full"}},{direction:"top",inset:!0,class:{content:"inset-x-4 top-4"}},{direction:"top",inset:!1,class:{content:"inset-x-0 top-0 rounded-b-lg"}},{direction:"bottom",inset:!0,class:{content:"inset-x-4 bottom-4"}},{direction:"bottom",inset:!1,class:{content:"inset-x-0 bottom-0 rounded-t-lg"}},{direction:"left",inset:!0,class:{content:"inset-y-4 left-4"}},{direction:"left",inset:!1,class:{content:"inset-y-0 left-0 rounded-r-lg"}},{direction:"right",inset:!0,class:{content:"inset-y-4 right-4"}},{direction:"right",inset:!1,class:{content:"inset-y-0 right-0 rounded-l-lg"}}]},Eg={__name:"UDrawer",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},inset:{type:Boolean,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},handle:{type:Boolean,required:!1,default:!0},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},nested:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},activeSnapPoint:{type:[Number,String,null],required:!1},closeThreshold:{type:Number,required:!1},shouldScaleBackground:{type:Boolean,required:!1},setBackgroundColorOnScale:{type:Boolean,required:!1},scrollLockTimeout:{type:Number,required:!1},fixed:{type:Boolean,required:!1},dismissible:{type:Boolean,required:!1,default:!0},modal:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},direction:{type:String,required:!1,default:"bottom"},noBodyStyles:{type:Boolean,required:!1},handleOnly:{type:Boolean,required:!1},preventScrollRestoration:{type:Boolean,required:!1},snapPoints:{type:Array,required:!1}},emits:["close:prevent","drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(r,{emit:e}){const t=r,i=e,n=Ze(),s=Ie(),a=De("drawer",t),o=_e(It(t,"activeSnapPoint","closeThreshold","shouldScaleBackground","setBackgroundColorOnScale","scrollLockTimeout","fixed","dismissible","modal","open","defaultOpen","nested","direction","noBodyStyles","handleOnly","preventScrollRestoration","snapPoints"),i),l=dr(Ue(()=>t.portal)),u=Ue(()=>t.content),c=F(()=>t.dismissible?{pointerDownOutside:Zn}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((m,p)=>(m[p]=g=>{g.preventDefault(),i("close:prevent")},m),{})),h=F(()=>le({extend:le(Fg),...s.ui?.drawer||{}})({direction:t.direction,inset:t.inset,snapPoints:t.snapPoints&&t.snapPoints.length>0}));return(f,m)=>(v(),A(lr(r.nested?d(xg):d(cu)),ae(oe(d(o))),{default:_(()=>[n.default?(v(),A(d(xa),{key:0,"as-child":"",class:O(t.class)},{default:_(()=>[S(f.$slots,"default")]),_:3},8,["class"])):R("",!0),E(d(ba),ae(oe(d(l))),{default:_(()=>[r.overlay?(v(),A(d(wg),{key:0,"data-slot":"overlay",class:O(h.value.overlay({class:d(a)?.overlay}))},null,8,["class"])):R("",!0),E(d(Ag),H({"data-slot":"content",class:h.value.content({class:[!n.default&&t.class,d(a)?.content]})},u.value,Pr(c.value)),{default:_(()=>[r.handle?(v(),A(d(kg),{key:0,"data-slot":"handle",class:O(h.value.handle({class:d(a)?.handle}))},null,8,["class"])):R("",!0),n.content&&(r.title||n.title||r.description||n.description)?(v(),A(d(Tr),{key:1},{default:_(()=>[r.title||n.title?(v(),A(d(sr),{key:0},{default:_(()=>[S(f.$slots,"title",{},()=>[de(ee(r.title),1)])]),_:3})):R("",!0),r.description||n.description?(v(),A(d(nr),{key:1},{default:_(()=>[S(f.$slots,"description",{},()=>[de(ee(r.description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),S(f.$slots,"content",{},()=>[P("div",{"data-slot":"container",class:O(h.value.container({class:d(a)?.container}))},[n.header||r.title||n.title||r.description||n.description?(v(),V("div",{key:0,"data-slot":"header",class:O(h.value.header({class:d(a)?.header}))},[S(f.$slots,"header",{},()=>[r.title||n.title?(v(),A(d(sr),{key:0,"data-slot":"title",class:O(h.value.title({class:d(a)?.title}))},{default:_(()=>[S(f.$slots,"title",{},()=>[de(ee(r.title),1)])]),_:3},8,["class"])):R("",!0),r.description||n.description?(v(),A(d(nr),{key:1,"data-slot":"description",class:O(h.value.description({class:d(a)?.description}))},{default:_(()=>[S(f.$slots,"description",{},()=>[de(ee(r.description),1)])]),_:3},8,["class"])):R("",!0)])],2)):R("",!0),n.body?(v(),V("div",{key:1,"data-slot":"body",class:O(h.value.body({class:d(a)?.body}))},[S(f.$slots,"body")],2)):R("",!0),n.footer?(v(),V("div",{key:2,"data-slot":"footer",class:O(h.value.footer({class:d(a)?.footer}))},[S(f.$slots,"footer")],2)):R("",!0)],2)])]),_:3},16,["class"])]),_:3},16)]),_:3},16))}},Og={slots:{root:"bg-default/75 backdrop-blur border-b border-default h-(--ui-header-height) sticky top-0 z-50",container:"flex items-center justify-between gap-3 h-full",left:"lg:flex-1 flex items-center gap-1.5",center:"hidden lg:flex",right:"flex items-center justify-end lg:flex-1 gap-1.5",title:"shrink-0 font-bold text-xl text-highlighted flex items-end gap-1.5",toggle:"lg:hidden",content:"lg:hidden",overlay:"lg:hidden",header:"px-4 sm:px-6 h-(--ui-header-height) shrink-0 flex items-center justify-between gap-3",body:"p-4 sm:p-6 overflow-y-auto"},variants:{toggleSide:{left:{toggle:"-ms-1.5"},right:{toggle:"-me-1.5"}}}},zg=Object.assign({inheritAttrs:!1},{__name:"UHeader",props:kn({as:{type:null,required:!1,default:"header"},title:{type:String,required:!1,default:"Nuxt UI"},to:{type:String,required:!1,default:"/"},mode:{type:null,required:!1,default:"modal"},menu:{type:null,required:!1},toggle:{type:[Boolean,Object],required:!1,default:!0},toggleSide:{type:String,required:!1,default:"right"},autoClose:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(r){const e=r,t=Ze(),i=ua(r,"open",{type:Boolean,default:!1}),n=pd(),{t:s}=ki(),a=Ie(),o=De("header",e),[l,u]=Ar(),[c,h]=Ar(),[f,m]=Ar(),p=F(()=>(t.title&&md(t.title())||e.title||"Nuxt UI").trim());je(()=>n.fullPath,()=>{e.autoClose&&(i.value=!1)});const g=F(()=>le({extend:le(Og),...a.ui?.header||{}})()),y=F(()=>({slideover:ng,modal:ag,drawer:Eg})[e.mode]),w=Ue(()=>Er(e.menu,{content:{onOpenAutoFocus:b=>b.preventDefault()}},e.mode==="modal"?{fullscreen:!0,transition:!1}:{}));function x(){i.value=!i.value}return(b,C)=>(v(),V(xe,null,[E(d(f),null,{default:_(()=>[S(b.$slots,"toggle",{open:i.value,toggle:x,ui:g.value},()=>[r.toggle?(v(),A(ut,H({key:0,color:"neutral",variant:"ghost","aria-label":i.value?d(s)("header.close"):d(s)("header.open"),icon:i.value?d(a).ui.icons.close:d(a).ui.icons.menu},typeof r.toggle=="object"?r.toggle:{},{"data-slot":"toggle",class:g.value.toggle({class:d(o)?.toggle,toggleSide:r.toggleSide}),onClick:x}),null,16,["aria-label","icon","class"])):R("",!0)])]),_:3}),E(d(l),null,{default:_(()=>[P("div",{"data-slot":"left",class:O(g.value.left({class:d(o)?.left}))},[r.toggleSide==="left"?(v(),A(d(m),{key:0})):R("",!0),S(b.$slots,"left",{},()=>[E(ul,{to:r.to,"aria-label":p.value,"data-slot":"title",class:O(g.value.title({class:d(o)?.title}))},{default:_(()=>[S(b.$slots,"title",{},()=>[de(ee(r.title),1)])]),_:3},8,["to","aria-label","class"])])],2)]),_:3}),E(d(c),null,{default:_(()=>[P("div",{"data-slot":"right",class:O(g.value.right({class:d(o)?.right}))},[S(b.$slots,"right"),r.toggleSide==="right"?(v(),A(d(m),{key:0})):R("",!0)],2)]),_:3}),E(d(ne),H({as:r.as},b.$attrs,{"data-slot":"root",class:g.value.root({class:[d(o)?.root,e.class]})}),{default:_(()=>[S(b.$slots,"top"),E(ig,{"data-slot":"container",class:O(g.value.container({class:d(o)?.container}))},{default:_(()=>[E(d(u)),P("div",{"data-slot":"center",class:O(g.value.center({class:d(o)?.center}))},[S(b.$slots,"default")],2),E(d(h))]),_:3},8,["class"]),S(b.$slots,"bottom")]),_:3},16,["as","class"]),E(d(y),H({open:i.value,"onUpdate:open":C[0]||(C[0]=q=>i.value=q),title:d(s)("header.title"),description:d(s)("header.description")},w.value,{ui:{overlay:g.value.overlay({class:d(o)?.overlay}),content:g.value.content({class:d(o)?.content})}}),{content:_(q=>[S(b.$slots,"content",ae(oe(q)),()=>[r.mode!=="drawer"?(v(),V("div",{key:0,"data-slot":"header",class:O(g.value.header({class:d(o)?.header}))},[E(d(u)),E(d(h))],2)):R("",!0),P("div",{"data-slot":"body",class:O(g.value.body({class:d(o)?.body}))},[S(b.$slots,"body")],2)])]),_:3},16,["open","title","description","ui"])],64))}}),Ig=gd("/logo.svg"),Tg={};function Pg(r,e){const t=Xm,i=ut,n=eg,s=zg;return v(),A(s,null,{title:_(()=>[...e[0]||(e[0]=[P("div",{class:"flex items-center"},[P("img",{src:Ig,alt:"Tres.js",class:"h-3 mr-4"}),P("a",{class:"font-bold text-dark font-sans text-sm",href:"/",title:"Home"},[de("Tres"),P("span",{class:"text-primary-400"},"DevTools")])],-1)])]),right:_(()=>[E(t),E(n,{text:"Open on GitHub",kbds:["meta","G"]},{default:_(()=>[E(i,{color:"neutral",variant:"ghost",size:"xs",to:"https://github.com/nuxt/ui",target:"_blank",icon:"i-simple-icons-github","aria-label":"GitHub"})]),_:1})]),_:1})}const Dg=Object.assign(dl(Tg,[["render",Pg]]),{__name:"TheHeader"}),Rg={slots:{base:"font-medium inline-flex items-center",label:"truncate",leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailingIcon:"shrink-0"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{xs:{base:"text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},sm:{base:"text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},md:{base:"text-xs px-2 py-1 gap-1 rounded-md",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},lg:{base:"text-sm px-2 py-1 gap-1.5 rounded-md",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"text-base px-2.5 py-1 gap-1.5 rounded-md",leadingIcon:"size-6",leadingAvatarSize:"2xs",trailingIcon:"size-6"}},square:{true:""}},compoundVariants:[{color:"primary",variant:"solid",class:"bg-primary text-inverted"},{color:"secondary",variant:"solid",class:"bg-secondary text-inverted"},{color:"success",variant:"solid",class:"bg-success text-inverted"},{color:"info",variant:"solid",class:"bg-info text-inverted"},{color:"warning",variant:"solid",class:"bg-warning text-inverted"},{color:"error",variant:"solid",class:"bg-error text-inverted"},{color:"primary",variant:"outline",class:"text-primary ring ring-inset ring-primary/50"},{color:"secondary",variant:"outline",class:"text-secondary ring ring-inset ring-secondary/50"},{color:"success",variant:"outline",class:"text-success ring ring-inset ring-success/50"},{color:"info",variant:"outline",class:"text-info ring ring-inset ring-info/50"},{color:"warning",variant:"outline",class:"text-warning ring ring-inset ring-warning/50"},{color:"error",variant:"outline",class:"text-error ring ring-inset ring-error/50"},{color:"primary",variant:"soft",class:"bg-primary/10 text-primary"},{color:"secondary",variant:"soft",class:"bg-secondary/10 text-secondary"},{color:"success",variant:"soft",class:"bg-success/10 text-success"},{color:"info",variant:"soft",class:"bg-info/10 text-info"},{color:"warning",variant:"soft",class:"bg-warning/10 text-warning"},{color:"error",variant:"soft",class:"bg-error/10 text-error"},{color:"primary",variant:"subtle",class:"bg-primary/10 text-primary ring ring-inset ring-primary/25"},{color:"secondary",variant:"subtle",class:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"},{color:"success",variant:"subtle",class:"bg-success/10 text-success ring ring-inset ring-success/25"},{color:"info",variant:"subtle",class:"bg-info/10 text-info ring ring-inset ring-info/25"},{color:"warning",variant:"subtle",class:"bg-warning/10 text-warning ring ring-inset ring-warning/25"},{color:"error",variant:"subtle",class:"bg-error/10 text-error ring ring-inset ring-error/25"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"},{size:"xs",square:!0,class:"p-0.5"},{size:"sm",square:!0,class:"p-1"},{size:"md",square:!0,class:"p-1"},{size:"lg",square:!0,class:"p-1"},{size:"xl",square:!0,class:"p-1"}],defaultVariants:{color:"primary",variant:"solid",size:"md"}},fi={__name:"UBadge",props:{as:{type:null,required:!1,default:"span"},label:{type:[String,Number],required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1}},setup(r){const e=r,t=Ze(),i=Ie(),n=De("badge",e),{orientation:s,size:a}=da(e),{isLeading:o,isTrailing:l,leadingIconName:u,trailingIconName:c}=cl(e),h=F(()=>le({extend:le(Rg),...i.ui?.badge||{}})({color:e.color,variant:e.variant,size:a.value||e.size,square:e.square||!t.default&&!e.label,fieldGroup:s.value}));return(f,m)=>(v(),A(d(ne),{as:r.as,"data-slot":"base",class:O(h.value.base({class:[d(n)?.base,e.class]}))},{default:_(()=>[S(f.$slots,"leading",{ui:h.value},()=>[d(o)&&d(u)?(v(),A(Se,{key:0,name:d(u),"data-slot":"leadingIcon",class:O(h.value.leadingIcon({class:d(n)?.leadingIcon}))},null,8,["name","class"])):r.avatar?(v(),A(cr,H({key:1,size:d(n)?.leadingAvatarSize||h.value.leadingAvatarSize()},r.avatar,{"data-slot":"leadingAvatar",class:h.value.leadingAvatar({class:d(n)?.leadingAvatar})}),null,16,["size","class"])):R("",!0)]),S(f.$slots,"default",{ui:h.value},()=>[r.label!==void 0&&r.label!==null?(v(),V("span",{key:0,"data-slot":"label",class:O(h.value.label({class:d(n)?.label}))},ee(r.label),3)):R("",!0)]),S(f.$slots,"trailing",{ui:h.value},()=>[d(l)&&d(c)?(v(),A(Se,{key:0,name:d(c),"data-slot":"trailingIcon",class:O(h.value.trailingIcon({class:d(n)?.trailingIcon}))},null,8,["name","class"])):R("",!0)])]),_:3},8,["as","class"]))}},$g={class:"font-mono text-xs"},Lg={key:1,class:"mr-1 w-4 h-4"},Hg={class:"flex items-center gap-2 flex-1 min-w-0"},Ng={class:"text-neutral-700 dark:text-neutral-200 font-medium"},Vg=I({__name:"TreeGraph",props:{item:{},level:{default:0}},emits:["select-object"],setup(r,{emit:e}){const t=r,i=e,n=z(t.item.defaultExpanded??!1),s=()=>{n.value=!n.value},a=()=>{i("select-object",t.item.value)},o=F(()=>t.item.children&&t.item.children.length>0),l=F(()=>({paddingLeft:`${t.level*16}px`}));return(u,c)=>{const h=Se,f=fi,m=hu;return v(),V("div",$g,[P("div",{style:Et(d(l)),class:"flex items-center py-1 hover:bg-neutral-50 dark:hover:bg-neutral-800 group cursor-pointer",onClick:a},[d(o)?(v(),V("div",{key:0,class:"mr-1 w-4 h-4 flex items-center justify-center",onClick:fe(s,["stop"])},[E(h,{name:d(n)?"i-tabler:caret-down-filled":"i-tabler:caret-right-filled",class:"w-3 h-3 text-neutral-400 dark:text-neutral-500"},null,8,["name"])])):(v(),V("div",Lg)),P("div",Hg,[E(h,{name:r.item.icon,class:"w-4 h-4 text-neutral-600 dark:text-neutral-400 flex-shrink-0"},null,8,["name"]),P("span",Ng,ee(r.item.label),1),r.item.name?(v(),A(f,{key:0,color:"primary",size:"sm",variant:"soft"},{default:_(()=>[de(ee(r.item.name),1)]),_:1})):R("",!0),r.item.memorySize>0?(v(),A(f,{key:1,color:"warning",size:"sm",variant:"soft"},{default:_(()=>[de(ee(r.item.memorySize)+" KB ",1)]),_:1})):R("",!0)])],4),d(o)&&d(n)?(v(!0),V(xe,{key:0},Xe(r.item.children,p=>(v(),A(m,{key:p.key,item:p,level:r.level+1,onSelectObject:c[0]||(c[0]=g=>i("select-object",g))},null,8,["item","level"]))),128)):R("",!0)])}}}),hu=Object.assign(Vg,{__name:"TreeGraph"}),jg={slots:{root:"relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",wrapper:"min-w-0 flex-1 flex flex-col",title:"text-sm font-medium",description:"text-sm opacity-90",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex flex-wrap gap-1.5 shrink-0",close:"p-0"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},compoundVariants:[{color:"primary",variant:"solid",class:{root:"bg-primary text-inverted"}},{color:"secondary",variant:"solid",class:{root:"bg-secondary text-inverted"}},{color:"success",variant:"solid",class:{root:"bg-success text-inverted"}},{color:"info",variant:"solid",class:{root:"bg-info text-inverted"}},{color:"warning",variant:"solid",class:{root:"bg-warning text-inverted"}},{color:"error",variant:"solid",class:{root:"bg-error text-inverted"}},{color:"primary",variant:"outline",class:{root:"text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"outline",class:{root:"text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"outline",class:{root:"text-success ring ring-inset ring-success/25"}},{color:"info",variant:"outline",class:{root:"text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"outline",class:{root:"text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"outline",class:{root:"text-error ring ring-inset ring-error/25"}},{color:"primary",variant:"soft",class:{root:"bg-primary/10 text-primary"}},{color:"secondary",variant:"soft",class:{root:"bg-secondary/10 text-secondary"}},{color:"success",variant:"soft",class:{root:"bg-success/10 text-success"}},{color:"info",variant:"soft",class:{root:"bg-info/10 text-info"}},{color:"warning",variant:"soft",class:{root:"bg-warning/10 text-warning"}},{color:"error",variant:"soft",class:{root:"bg-error/10 text-error"}},{color:"primary",variant:"subtle",class:{root:"bg-primary/10 text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"subtle",class:{root:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"subtle",class:{root:"bg-success/10 text-success ring ring-inset ring-success/25"}},{color:"info",variant:"subtle",class:{root:"bg-info/10 text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"subtle",class:{root:"bg-warning/10 text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"subtle",class:{root:"bg-error/10 text-error ring ring-inset ring-error/25"}},{color:"neutral",variant:"solid",class:{root:"text-inverted bg-inverted"}},{color:"neutral",variant:"outline",class:{root:"text-highlighted bg-default ring ring-inset ring-default"}},{color:"neutral",variant:"soft",class:{root:"text-highlighted bg-elevated/50"}},{color:"neutral",variant:"subtle",class:{root:"text-highlighted bg-elevated/50 ring ring-inset ring-accented"}}],defaultVariants:{color:"primary",variant:"solid"}},fu={__name:"UAlert",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},emits:["update:open"],setup(r,{emit:e}){const t=r,i=e,n=Ze(),{t:s}=ki(),a=Ie(),o=De("alert",t),l=F(()=>le({extend:le(jg),...a.ui?.alert||{}})({color:t.color,variant:t.variant,orientation:t.orientation,title:!!t.title||!!n.title}));return(u,c)=>(v(),A(d(ne),{as:r.as,"data-orientation":r.orientation,"data-slot":"root",class:O(l.value.root({class:[d(o)?.root,t.class]}))},{default:_(()=>[S(u.$slots,"leading",{ui:l.value},()=>[r.avatar?(v(),A(cr,H({key:0,size:d(o)?.avatarSize||l.value.avatarSize()},r.avatar,{"data-slot":"avatar",class:l.value.avatar({class:d(o)?.avatar})}),null,16,["size","class"])):r.icon?(v(),A(Se,{key:1,name:r.icon,"data-slot":"icon",class:O(l.value.icon({class:d(o)?.icon}))},null,8,["name","class"])):R("",!0)]),P("div",{"data-slot":"wrapper",class:O(l.value.wrapper({class:d(o)?.wrapper}))},[r.title||n.title?(v(),V("div",{key:0,"data-slot":"title",class:O(l.value.title({class:d(o)?.title}))},[S(u.$slots,"title",{},()=>[de(ee(r.title),1)])],2)):R("",!0),r.description||n.description?(v(),V("div",{key:1,"data-slot":"description",class:O(l.value.description({class:d(o)?.description}))},[S(u.$slots,"description",{},()=>[de(ee(r.description),1)])],2)):R("",!0),r.orientation==="vertical"&&(r.actions?.length||n.actions)?(v(),V("div",{key:2,"data-slot":"actions",class:O(l.value.actions({class:d(o)?.actions}))},[S(u.$slots,"actions",{},()=>[(v(!0),V(xe,null,Xe(r.actions,(h,f)=>(v(),A(ut,H({key:f,size:"xs"},{ref_for:!0},h),null,16))),128))])],2)):R("",!0)],2),r.orientation==="horizontal"&&(r.actions?.length||n.actions)||r.close?(v(),V("div",{key:0,"data-slot":"actions",class:O(l.value.actions({class:d(o)?.actions,orientation:"horizontal"}))},[r.orientation==="horizontal"&&(r.actions?.length||n.actions)?S(u.$slots,"actions",{key:0},()=>[(v(!0),V(xe,null,Xe(r.actions,(h,f)=>(v(),A(ut,H({key:f,size:"xs"},{ref_for:!0},h),null,16))),128))]):R("",!0),S(u.$slots,"close",{ui:l.value},()=>[r.close?(v(),A(ut,H({key:0,icon:r.closeIcon||d(a).ui.icons.close,color:"neutral",variant:"link","aria-label":d(s)("alert.close")},typeof r.close=="object"?r.close:{},{"data-slot":"close",class:l.value.close({class:d(o)?.close}),onClick:c[0]||(c[0]=h=>i("update:open",!1))}),null,16,["icon","aria-label","class"])):R("",!0)])],2)):R("",!0)]),_:3},8,["as","data-orientation","class"]))}},Ug={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],increment:"absolute flex items-center",decrement:"absolute flex items-center"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},size:{xs:"px-2 py-1 text-sm/4 gap-1",sm:"px-2.5 py-1.5 text-sm/4 gap-1.5",md:"px-2.5 py-1.5 text-base/5 gap-1.5",lg:"px-3 py-2 text-base/5 gap-2",xl:"px-3 py-2 text-base gap-2"},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},disabled:{true:{increment:"opacity-75 cursor-not-allowed",decrement:"opacity-75 cursor-not-allowed"}},orientation:{horizontal:{base:"text-center",increment:"inset-y-0 end-0 pe-1",decrement:"inset-y-0 start-0 ps-1"},vertical:{increment:"top-0 end-0 pe-1 [&>button]:py-0 scale-80",decrement:"bottom-0 end-0 pe-1 [&>button]:py-0 scale-80"}},highlight:{true:""},fixed:{false:""},increment:{false:""},decrement:{false:""}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{orientation:"horizontal",decrement:!1,class:"text-start"},{decrement:!0,size:"xs",class:"ps-7"},{decrement:!0,size:"sm",class:"ps-8"},{decrement:!0,size:"md",class:"ps-9"},{decrement:!0,size:"lg",class:"ps-10"},{decrement:!0,size:"xl",class:"ps-11"},{increment:!0,size:"xs",class:"pe-7"},{increment:!0,size:"sm",class:"pe-8"},{increment:!0,size:"md",class:"pe-9"},{increment:!0,size:"lg",class:"pe-10"},{increment:!0,size:"xl",class:"pe-11"},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},pu=Object.assign({inheritAttrs:!1},{__name:"UInputNumber",props:{as:{type:null,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},orientation:{type:null,required:!1,default:"horizontal"},increment:{type:[Boolean,Object],required:!1,default:!0},incrementIcon:{type:null,required:!1},incrementDisabled:{type:Boolean,required:!1},decrement:{type:[Boolean,Object],required:!1,default:!0},decrementIcon:{type:null,required:!1},decrementDisabled:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1},stepSnapping:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},formatOptions:{type:null,required:!1},disableWheelChange:{type:Boolean,required:!1},invertWheelChange:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},focusOnChange:{type:Boolean,required:!1}},emits:["update:modelValue","blur","change"],setup(r,{expose:e,emit:t}){const i=r,n=t,s=Je(i,"modelValue",n,{defaultValue:i.defaultValue}),{t:a}=ki(),o=Ie(),l=De("inputNumber",i),u=_e(It(i,"as","stepSnapping","formatOptions","disableWheelChange","invertWheelChange","required","readonly","focusOnChange"),n),{emitFormBlur:c,emitFormFocus:h,emitFormChange:f,emitFormInput:m,id:p,color:g,size:y,name:w,highlight:x,disabled:b,ariaAttrs:C}=ca(i),{orientation:q,size:M}=da(i),B=F(()=>M.value||y.value),T=F(()=>le({extend:le(Ug),...o.ui?.inputNumber||{}})({color:g.value,variant:i.variant,size:B.value,highlight:x.value,fixed:i.fixed,orientation:i.orientation,fieldGroup:q.value,increment:i.orientation==="vertical"?!!i.increment||!!i.decrement:!!i.increment,decrement:i.orientation==="vertical"?!1:!!i.decrement})),k=F(()=>i.incrementIcon||(i.orientation==="horizontal"?o.ui.icons.plus:o.ui.icons.chevronUp)),$=F(()=>i.decrementIcon||(i.orientation==="horizontal"?o.ui.icons.minus:o.ui.icons.chevronDown)),N=hl("inputRef");function U(X){i.modelModifiers?.optional&&(s.value=X=X??void 0);const Y=new Event("change",{target:{value:X}});n("change",Y),f(),m()}function Q(X){c(),n("blur",X)}function ie(){i.autofocus&&N.value?.$el?.focus()}return Ge(()=>{setTimeout(()=>{ie()},i.autofocusDelay)}),e({inputRef:Ue(()=>N.value?.$el)}),(X,Y)=>(v(),A(d(hm),H(d(u),{id:d(p),"default-value":r.defaultValue,"model-value":d(s),min:r.min,max:r.max,step:r.step,"data-slot":"root",class:T.value.root({class:[d(l)?.root,i.class]}),name:d(w),disabled:d(b),"onUpdate:modelValue":Y[0]||(Y[0]=ce=>U(ce))}),{default:_(()=>[E(d(vm),H({...X.$attrs,...d(C)},{ref_key:"inputRef",ref:N,placeholder:r.placeholder,required:r.required,"data-slot":"base",class:T.value.base({class:d(l)?.base}),onBlur:Q,onFocus:d(h)}),null,16,["placeholder","required","class","onFocus"]),r.increment?(v(),V("div",{key:0,"data-slot":"increment",class:O(T.value.increment({class:d(l)?.increment}))},[E(d(gm),{"as-child":"",disabled:d(b)||r.incrementDisabled},{default:_(()=>[S(X.$slots,"increment",{},()=>[E(ut,H({icon:k.value,color:d(g),size:B.value,variant:"link","aria-label":d(a)("inputNumber.increment")},typeof r.increment=="object"?r.increment:void 0),null,16,["icon","color","size","aria-label"])])]),_:3},8,["disabled"])],2)):R("",!0),r.decrement?(v(),V("div",{key:1,"data-slot":"decrement",class:O(T.value.decrement({class:d(l)?.decrement}))},[E(d(pm),{"as-child":"",disabled:d(b)||r.decrementDisabled},{default:_(()=>[S(X.$slots,"decrement",{},()=>[E(ut,H({icon:$.value,color:d(g),size:B.value,variant:"link","aria-label":d(a)("inputNumber.decrement")},typeof r.decrement=="object"?r.decrement:void 0),null,16,["icon","color","size","aria-label"])])]),_:3},8,["disabled"])],2)):R("",!0)]),_:3},16,["id","default-value","model-value","min","max","step","class","name","disabled"]))}}),Gg=I({__name:"EditableNumber",props:{modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,n=z(!1),s=z(0),a=z(),o=F(()=>Number(t.modelValue).toFixed(2)),l=()=>{n.value=!0,s.value=t.modelValue},u=()=>{i("update:modelValue",s.value),n.value=!1},c=()=>{s.value=t.modelValue,n.value=!1};return(h,f)=>{const m=fi,p=pu;return n.value?(v(),A(p,{key:1,ref_key:"inputRef",ref:a,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value=g),step:.01,variant:"soft",size:"xs",orientation:"vertical","format-options":{minimumFractionDigits:0,maximumFractionDigits:2},class:"w-20 font-mono",onBlur:u,onKeyup:[pt(u,["enter"]),pt(c,["escape"])]},null,8,["modelValue"])):(v(),A(m,{key:0,variant:"soft",color:"neutral",size:"sm",class:"font-mono cursor-pointer hover:bg-neutral-200 dark:hover:bg-neutral-700",onClick:l},{default:_(()=>[de(ee(o.value),1)]),_:1}))}}}),Wg=Object.assign(Gg,{__name:"EditableNumber"}),J=255,mt=100,oi=125,er=150;var G,qt,et,Dn;(function(r){r.HEX="HEX",r.RGB="RGB",r.HWB="HWB",r.HSL="HSL",r.CIELab="CIELab",r.LCH="LCH",r.CMYK="CMYK"})(G||(G={})),(function(r){r.ANALOGOUS="ANALOGOUS",r.COMPLEMENTARY="COMPLEMENTARY",r.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",r.TRIADIC="TRIADIC",r.TETRADIC="TETRADIC",r.SQUARE="SQUARE"})(qt||(qt={})),(function(r){r.ADDITIVE="ADDITIVE",r.SUBTRACTIVE="SUBTRACTIVE"})(et||(et={})),(function(r){r.black="#000000",r.silver="#C0C0C0",r.gray="#808080",r.white="#FFFFFF",r.maroon="#800000",r.red="#FF0000",r.purple="#800080",r.fuchsia="#FF00FF",r.green="#008000",r.lime="#00FF00",r.olive="#808000",r.yellow="#FFFF00",r.navy="#000080",r.blue="#0000FF",r.teal="#008080",r.aqua="#00FFFF",r.orange="#FFA500",r.aliceblue="#F0F8FF",r.antiquewhite="#FAEBD7",r.aquamarine="#7FFFD4",r.azure="#F0FFFF",r.beige="#F5F5DC",r.bisque="#FFE4C4",r.blanchedalmond="#FFEBCD",r.blueviolet="#8A2BE2",r.brown="#A52A2A",r.burlywood="#DEB887",r.cadetblue="#5F9EA0",r.chartreuse="#7FFF00",r.chocolate="#D2691E",r.coral="#FF7F50",r.cornflowerblue="#6495ED",r.cornsilk="#FFF8DC",r.crimson="#DC143C",r.cyan="#00FFFF",r.darkblue="#00008B",r.darkcyan="#008B8B",r.darkgoldenrod="#B8860B",r.darkgray="#A9A9A9",r.darkgreen="#006400",r.darkgrey="#A9A9A9",r.darkkhaki="#BDB76B",r.darkmagenta="#8B008B",r.darkolivegreen="#556B2F",r.darkorange="#FF8C00",r.darkorchid="#9932CC",r.darkred="#8B0000",r.darksalmon="#E9967A",r.darkseagreen="#8FBC8F",r.darkslateblue="#483D8B",r.darkslategray="#2F4F4F",r.darkslategrey="#2F4F4F",r.darkturquoise="#00CED1",r.darkviolet="#9400D3",r.deeppink="#FF1493",r.deepskyblue="#00BFFF",r.dimgray="#696969",r.dimgrey="#696969",r.dodgerblue="#1E90FF",r.firebrick="#B22222",r.floralwhite="#FFFAF0",r.forestgreen="#228B22",r.gainsboro="#DCDCDC",r.ghostwhite="#F8F8FF",r.gold="#FFD700",r.goldenrod="#DAA520",r.greenyellow="#ADFF2F",r.grey="#808080",r.honeydew="#F0FFF0",r.hotpink="#FF69B4",r.indianred="#CD5C5C",r.indigo="#4B0082",r.ivory="#FFFFF0",r.khaki="#F0E68C",r.lavender="#E6E6FA",r.lavenderblush="#FFF0F5",r.lawngreen="#7CFC00",r.lemonchiffon="#FFFACD",r.lightblue="#ADD8E6",r.lightcoral="#F08080",r.lightcyan="#E0FFFF",r.lightgoldenrodyellow="#FAFAD2",r.lightgray="#D3D3D3",r.lightgreen="#90EE90",r.lightgrey="#D3D3D3",r.lightpink="#FFB6C1",r.lightsalmon="#FFA07A",r.lightseagreen="#20B2AA",r.lightskyblue="#87CEFA",r.lightslategray="#778899",r.lightslategrey="#778899",r.lightsteelblue="#B0C4DE",r.lightyellow="#FFFFE0",r.limegreen="#32CD32",r.linen="#FAF0E6",r.magenta="#FF00FF",r.mediumaquamarine="#66CDAA",r.mediumblue="#0000CD",r.mediumorchid="#BA55D3",r.mediumpurple="#9370DB",r.mediumseagreen="#3CB371",r.mediumslateblue="#7B68EE",r.mediumspringgreen="#00FA9A",r.mediumturquoise="#48D1CC",r.mediumvioletred="#C71585",r.midnightblue="#191970",r.mintcream="#F5FFFA",r.mistyrose="#FFE4E1",r.moccasin="#FFE4B5",r.navajowhite="#FFDEAD",r.oldlace="#FDF5E6",r.olivedrab="#6B8E23",r.orangered="#FF4500",r.orchid="#DA70D6",r.palegoldenrod="#EEE8AA",r.palegreen="#98FB98",r.paleturquoise="#AFEEEE",r.palevioletred="#DB7093",r.papayawhip="#FFEFD5",r.peachpuff="#FFDAB9",r.peru="#CD853F",r.pink="#FFC0CB",r.plum="#DDA0DD",r.powderblue="#B0E0E6",r.rosybrown="#BC8F8F",r.royalblue="#4169E1",r.saddlebrown="#8B4513",r.salmon="#FA8072",r.sandybrown="#F4A460",r.seagreen="#2E8B57",r.seashell="#FFF5EE",r.sienna="#A0522D",r.skyblue="#87CEEB",r.slateblue="#6A5ACD",r.slategray="#708090",r.slategrey="#708090",r.snow="#FFFAFA",r.springgreen="#00FF7F",r.steelblue="#4682B4",r.tan="#D2B48C",r.thistle="#D8BFD8",r.tomato="#FF6347",r.turquoise="#40E0D0",r.violet="#EE82EE",r.wheat="#F5DEB3",r.whitesmoke="#F5F5F5",r.yellowgreen="#9ACD32",r.rebeccapurple="#663399"})(Dn||(Dn={}));const mu=Object.keys(Dn),Kg={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],HWB:["H","W","B","A"],CIELab:["L","a","b","A"],LCH:["L","C","H","A"],CMYK:["C","M","Y","K","A"]},Ws={ABGR:G.RGB,ABHW:G.HWB,ACHL:G.LCH,ACKMY:G.CMYK,AHLS:G.HSL,ALAB:G.CIELab,BGR:G.RGB,BHW:G.HWB,CHL:G.LCH,CKMY:G.CMYK,HLS:G.HSL,LAB:G.CIELab};var Sr;(function(r){r.NUMBER="number",r.BOOLEAN="boolean"})(Sr||(Sr={}));const st={[G.HEX]:/^#(?:(?<r>[a-f\d])(?<g>[a-f\d])(?<b>[a-f\d])(?<a>[a-f\d])?|(?<rr>[a-f\d]{2})(?<gg>[a-f\d]{2})(?<bb>[a-f\d]{2})(?<aa>[a-f\d]{2})?)$/i,[G.RGB]:/^rgba?\s*\(\s*(?:(?<r_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<g_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<b_legacy>(?:\d*\.)?\d+%?)(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<r>(?:\d*\.)?\d+%?)\s+(?<g>(?:\d*\.)?\d+%?)\s+(?<b>(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_r>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))\s+(?<relative_g>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))\s+(?<relative_b>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[G.HWB]:/^hwb\s*\(\s*(?:(?<h>(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s+(?<w>(?:\d*\.)?\d+)%\s+(?<b>(?:\d*\.)?\d+)%(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_h>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))\s+(?<relative_w>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))%?\s+(?<relative_b>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))%?(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[G.HSL]:/^hsla?\s*\(\s*(?:(?<h_legacy>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*(?<s_legacy>(?:\d*\.)?\d+)%\s*,\s*(?<l_legacy>(?:\d*\.)?\d+)%(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<h>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s+(?<s>(?:\d*\.)?\d+)%?\s+(?<l>(?:\d*\.)?\d+)%?(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_h>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))\s+(?<relative_s>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))%?\s+(?<relative_l>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))%?(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[G.CIELab]:/^lab\s*\(\s*(?:(?<L>(?:\d*\.)?\d+%?)\s+(?<a>-?(?:\d*\.)?\d+%?)\s+(?<b>-?(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<A>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_L>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))\s+(?<relative_a>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))\s+(?<relative_b>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_A>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[G.LCH]:/^lch\s*\(\s*(?:(?<l>(?:\d*\.)?\d+%?)\s+(?<c>-?(?:\d*\.)?\d+%?)\s+(?<h>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_l>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))\s+(?<relative_c>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))\s+(?<relative_h>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[G.CMYK]:/^(?:device-cmyk|cmyk)\s*\(\s*(?:(?<c_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<m_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<y_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<k_legacy>(?:\d*\.)?\d+%?)(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<c>(?:\d*\.)?\d+%?)\s+(?<m>(?:\d*\.)?\d+%?)\s+(?<y>(?:\d*\.)?\d+%?)\s+(?<k>(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?)\s*\)$/},ct={REGEXP:/^calc\(\s*(?<operation>[\d./*+-\w\s]+)\s*\)$/,SCOPED:/\(\s*([^()]+)\s*\)/g,DIVISION:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\/\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,MULTIPLICATION:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\*\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,SUM:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\+\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,REST:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*-\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/},gu=/^(?<number>-?(?:\d*\.)?\d+)(?<units>(?:deg|grad|rad|turn)?)$/,Me=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,Ks=/^0x([a-f\d]{1,2})$/i,Xg=/\{(\d+)\}/g,Yg=/,( +|\d+)/g,Jg=/ +/,Zg="The provided string color doesn't have a correct format",Qg="The provided color object doesn't have the proper keys or format",ey="is not a valid operation for a relative color";var Ne,Oe,qr;(function(r){r.NONE="none",r.DEGREES="deg",r.GRADIANS="grad",r.RADIANS="rad",r.TURNS="turn"})(Ne||(Ne={})),(function(r){r.NONE="none",r.PERCENT="percent"})(Oe||(Oe={})),(function(r){r.DEVICE_CMYK="device-cmyk",r.CMYK="cmyk"})(qr||(qr={}));const Dt={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:Ne.NONE,rgbUnit:Oe.NONE,labUnit:Oe.NONE,lchUnit:Oe.NONE,cmykUnit:Oe.PERCENT,alphaUnit:Oe.NONE,cmykFunction:qr.DEVICE_CMYK},be=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),fr=r=>+`${r}`.replace(Me,"$1"),rt=r=>Me.test(`${r}`)?fr(r):Math.min(+r,100),an=r=>(r.length===1&&(r+=r),parseInt(r,16)),on=r=>{const e=L(r,0).toString(16).toUpperCase();return e.length===1?`0x0${e}`:`0x${e}`},Ai=(r,e=!1)=>!e&&Me.test(r)?Math.min(J*fr(r)/100,J):Ks.test(r)?(r.length===3&&(r+=r.slice(-1)),e?L(r)/J:L(r)):Math.min(+r,e?1:J),Rn=r=>Me.test(r)?se(oi*fr(r)/100,-125,oi):se(+r,-125,oi),yu=r=>Me.test(r)?se(er*fr(r)/100,-150,er):se(+r,-150,er),ai=r=>Math.min(Me.test(r)?fr(r)/100:+r,1),vu=r=>[...r].sort().join("").toUpperCase(),L=(r,e=6)=>{const t=Math.pow(10,e);return Math.round(+r*t)/t},se=(r,e,t)=>Math.max(e,Math.min(r,t)),bu=r=>180*r/Math.PI,xu=r=>r*Math.PI/180,Bn=360,yt=r=>{if(typeof r=="string"){const e=r.match(gu).groups,t=+e.number;switch(e.units){case Ne.RADIANS:r=L(bu(t));break;case Ne.TURNS:r=L(t*Bn);break;case Ne.GRADIANS:r=L(.9*t);break;case Ne.DEGREES:default:r=t}}return(r>360||r<0)&&(r-=Math.floor(r/Bn)*Bn),r},me=r=>(typeof r=="string"&&(r=Me.test(r)?fr(r)/100:+r),isNaN(+r)||r>1?1:L(r)),wu=(r,e)=>{let t;switch(e){case Ne.RADIANS:t=L(xu(r));break;case Ne.TURNS:t=L(r/Bn);break;case Ne.GRADIANS:t=L(10/9*r);break;case Ne.DEGREES:case Ne.NONE:default:t=r}return t},cs=r=>`${r}`in et,_u=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],ty=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],tr=_u.map((r=>r.reduce(((e,t)=>e+t),0))),hs=(r,e,t)=>(t<0&&(t+=6),t>=6&&(t-=6),L(t<1?((e-r)*t+r)*J:t<3?e*J:t<4?((e-r)*(4-t)+r)*J:r*J)),iy=r=>r<=.04045?r/12.92:((r+.055)/1.055)**2.4,ry=r=>r<=.0031308?12.92*r:1.055*r**(1/2.4)-.055,Cu=(r,e,t,i)=>{const n=[0,0,0],s=[r,e,t];return i.forEach(((a,o)=>{a.forEach(((l,u)=>{n[o]+=l*s[u]}))})),n},pe=(r,e,t)=>{e/=100;const i=(t/=100)<=.5?t*(e+1):t+e-t*e,n=2*t-i;return{R:hs(n,i,(r/=60)+2),G:hs(n,i,r),B:hs(n,i,r-2)}},di=(r,e,t,i=1)=>{r/=J,e/=J,t/=J,i=Math.min(i,1);const n=Math.max(r,e,t),s=Math.min(r,e,t),a=n-s;let o=0,l=0;const u=(n+s)/2;if(a!==0){switch(n){case r:o=(e-t)/a%6;break;case e:o=(t-r)/a+2;break;case t:o=(r-e)/a+4}o=L(60*o),o<0&&(o+=360),l=a/(1-Math.abs(2*u-1))}return{H:o,S:L(100*l),L:L(100*u),A:i}},ci=(r,e,t)=>{const i=[r/J,e/J,t/J].map(iy),n=Cu(i[0],i[1],i[2],_u),s=((a,o,l)=>{const u=f=>f>.008856451679035631?Math.cbrt(f):f/.12841854934601665+.13793103448275862,c=u(a/tr[0]),h=u(o/tr[1]);return[116*h-16,500*(c-h),200*(h-u(l/tr[2]))]})(n[0],n[1],n[2]);return{L:s[0],a:s[1],b:s[2]}},kr=(r,e,t)=>{const i=((s,a,o)=>{const l=f=>f>.20689655172413793?f**3:.12841854934601665*(f-.13793103448275862),u=(s+16)/116,c=a/500,h=o/200;return[tr[0]*l(u+c),tr[1]*l(u),tr[2]*l(u-h)]})(r,e,t),n=Cu(i[0],i[1],i[2],ty).map(ry);return{R:se(n[0]*J,0,J),G:se(n[1]*J,0,J),B:se(n[2]*J,0,J)}},Au=(r,e,t)=>{const i=Math.sqrt(e**2+t**2),n=bu(Math.atan2(t,e));return{L:r,C:i,H:yt(n)}},Su=(r,e,t)=>{const i=xu(t);return{L:r,a:e*Math.cos(i),b:e*Math.sin(i)}},hi=(r,e,t)=>{const i=ci(r,e,t);return Au(i.L,i.a,i.b)},$n=(r,e,t)=>{const i=Su(r,e,t);return kr(i.L,i.a,i.b)},Bi=(r,e,t,i=1)=>({H:di(r,e,t,i).H,W:L(Math.min(r,e,t)/J*100),B:L(100*(1-Math.max(r,e,t)/J)),A:i}),Ln=(r,e,t)=>{const i=1-(t/=100)-(e/=100),n=i*(1-Math.abs(r/60%2-1));let s=0,a=0,o=0;return r<60?(s=i,a=n,o=0):r>=60&&r<120?(s=n,a=i,o=0):r>=120&&r<180?(s=0,a=i,o=n):r>=180&&r<240?(s=0,a=n,o=i):r>=240&&r<300?(s=n,a=0,o=i):r>=300&&(s=i,a=0,o=n),s+=e,a+=e,o+=e,{R:se(s*J,0,J),G:se(a*J,0,J),B:se(o*J,0,J)}},za=(r,e,t,i)=>({R:L(J*(1-r)*(i=1-i)),G:L(J*(1-e)*i),B:L(J*(1-t)*i)}),Mu=(r,e,t)=>{r/=J,e/=J,t/=J;const i=1-Math.max(r,e,t),n=1-i,s=n&&(n-e)/n,a=n&&(n-t)/n;return{C:L(100*(n&&(n-r)/n)),M:L(100*s),Y:L(100*a),K:L(100*i)}},bo=(r,e)=>{if(r<0&&(r+=360),r>360&&(r-=360),r===360||r===0)return r;const t=[[0,120],[120,180],[180,240],[240,360]],i=[[0,60],[60,120],[120,240],[240,360]],n=e?i:t;let s=0,a=0,o=0,l=0;return(e?t:i).find(((u,c)=>r>=u[0]&&r<u[1]&&(s=u[0],a=u[1],o=n[c][0],l=n[c][1],!0))),o+(l-o)/(a-s)*(r-s)};class Bu{get rgb(){return this._rgb}}class ny extends Bu{constructor(e){super();const t=e.match(st.HEX).groups;this._r=t.r??t.rr,this._g=t.g??t.gg,this._b=t.b??t.bb,this._a=t.a??t.aa;const i={R:an(this._r),G:an(this._g),B:an(this._b)};this._a!==void 0&&(i.A=an(this._a)/J),this._rgb=i}}class ze{constructor(e,t,i){this._operations=new Map([[ct.DIVISION,this._division],[ct.MULTIPLICATION,this._multiplication],[ct.SUM,this._sum],[ct.REST,this._rest]]),this._colorIndex=e;let n=t,s=0;if(Number.isNaN(+t))if(t in i)this._result=i[t];else if(ct.REGEXP.test(n))ct.REGEXP.lastIndex=0,this._result=this._getCalcValue(n,i);else{for(;ct.SCOPED.test(n)&&s<100;){if(ct.SCOPED.lastIndex=0,n=n.replace(ct.SCOPED,((a,o)=>this._calculate(o,i).toString())),ct.REGEXP.test(n)){ct.REGEXP.lastIndex=0;break}s++}this._result=this._getCalcValue(n,i)}else this._result=+t}_division(e,t){return e/t}_multiplication(e,t){return e*t}_sum(e,t){return e+t}_rest(e,t){return e-t}_getCalcValue(e,t){const i=e.match(ct.REGEXP).groups.operation,n=this._calculate(i,t);if(Number.isNaN(n))throw new Error(`Invalid value for ${this._colorIndex}. ${i} ${ey}`);return n}_calculate(e,t){return this._operations.forEach(((i,n)=>{let s=0;for(;n.test(e)&&s<100;)e=e.replace(n,((a,o,l)=>i(t[o]??+o,t[l]??+l).toString())),s++})),+e}get result(){return this._result}}class Qn extends Bu{get hasPercentageAlpha(){return Me.test(this._a)}}class Xs extends Qn{constructor(e,t){super();const i=e.match(st.RGB).groups,{r_legacy:n,g_legacy:s,b_legacy:a,a_legacy:o,r:l,g:u,b:c,a:h,from:f,relative_r:m,relative_g:p,relative_b:g,relative_a:y}=i;if(f){const w=t(f),x={r:w.R,g:w.G,b:w.B,alpha:w.A??1},b=new ze("r",m,x).result,C=new ze("g",p,x).result,q=new ze("b",g,x).result,M={R:Math.min(b,J),G:Math.min(C,J),B:Math.min(q,J)};if(y){const B=new ze("alpha",y,x).result;M.A=Math.min(B,1)}this._rgb=M}else{this._r=n??l,this._g=s??u,this._b=a??c,this._a=o??h;const w={R:Math.min(Ai(this._r),J),G:Math.min(Ai(this._g),J),B:Math.min(Ai(this._b),J)};this._a!==void 0&&(w.A=me(this._a)),this._rgb=w}}get hasPercentageValues(){return Me.test(this._r)&&Me.test(this._g)&&Me.test(this._b)}static test(e){return st.RGB.test(e)}}class Ia extends Qn{get angleUnit(){if(this._h){const e=this._h.match(gu).groups.units;return e===""?Ne.NONE:e}return Ne.NONE}}class Ys extends Ia{constructor(e,t){super();const i=e.match(st.HSL).groups,{h_legacy:n,s_legacy:s,l_legacy:a,a_legacy:o,h:l,s:u,l:c,a:h,from:f,relative_h:m,relative_s:p,relative_l:g,relative_a:y}=i;if(f){const w=t(f),x=di(w.R,w.G,w.B,w.A),b={h:x.H,s:x.S,l:x.L,alpha:x.A},C=new ze("h",m,b).result,q=new ze("s",p,b).result,M=new ze("l",g,b).result,B=pe(se(C,0,360),se(q,0,mt),se(M,0,mt));if(y){const T=new ze("alpha",y,b).result;B.A=se(T,0,1)}this._rgb=B}else{this._h=n??l,this._s=s??u,this._l=a??c,this._a=o??h;const w=pe(yt(this._h),rt(this._s),rt(this._l));this._a!==void 0&&(w.A=me(this._a)),this._rgb=w}}static test(e){return st.HSL.test(e)}}class Js extends Ia{constructor(e,t){super();const i=e.match(st.HWB).groups,{h:n,w:s,b:a,a:o,from:l,relative_h:u,relative_w:c,relative_b:h,relative_a:f}=i;if(l){const m=t(l),p=Bi(m.R,m.G,m.B,m.A),g={h:p.H,w:p.W,b:p.B,alpha:p.A},y=new ze("h",u,g).result,w=new ze("w",c,g).result,x=new ze("b",h,g).result,b=Ln(se(y,0,360),se(w,0,mt),se(x,0,mt));if(f){const C=new ze("alpha",f,g).result;b.A=se(C,0,1)}this._rgb=b}else{this._h=n,this._w=s,this._b=a,this._a=o;const m=Ln(yt(this._h),rt(this._w),rt(this._b));this._a!==void 0&&(m.A=me(this._a)),this._rgb=m}}static test(e){return st.HWB.test(e)}}class Zs extends Qn{constructor(e,t){super();const i=e.match(st.CIELab).groups,{L:n,a:s,b:a,A:o,from:l,relative_L:u,relative_a:c,relative_b:h,relative_A:f}=i;if(l){const m=t(l),p=ci(m.R,m.G,m.B),g={l:p.L,a:p.a,b:p.b,alpha:m.A??1},y=new ze("l",u,g).result,w=new ze("a",c,g).result,x=new ze("b",h,g).result,b=kr(se(y,0,mt),se(w,-125,oi),se(x,-125,oi));if(f){const C=new ze("alpha",f,g).result;b.A=se(C,0,1)}this._rgb=b}else{this._L=n,this._A=s,this._B=a,this._a=o;const m=kr(rt(this._L),Rn(this._A),Rn(this._B));this._a!==void 0&&(m.A=me(this._a)),this._rgb=m}}get hasPercentageValues(){return Me.test(this._L)&&Me.test(this._A)&&Me.test(this._B)}static test(e){return st.CIELab.test(e)}}class Qs extends Ia{constructor(e,t){super();const i=e.match(st.LCH).groups,{l:n,c:s,h:a,a:o,from:l,relative_l:u,relative_c:c,relative_h:h,relative_a:f}=i;if(l){const m=t(l),p=hi(m.R,m.G,m.B),g={l:p.L,c:p.C,h:p.H,alpha:m.A??1},y=new ze("l",u,g).result,w=new ze("c",c,g).result,x=new ze("h",h,g).result,b=$n(se(y,0,mt),se(w,-150,er),yt(x));if(f){const C=new ze("alpha",f,g).result;b.A=se(C,0,1)}this._rgb=b}else{this._l=n,this._c=s,this._h=a,this._a=o;const m=$n(rt(this._l),yu(this._c),yt(this._h));this._a!==void 0&&(m.A=me(this._a)),this._rgb=m}}get hasPercentageValues(){return Me.test(this._l)&&Me.test(this._c)}static test(e){return st.LCH.test(e)}}class ea extends Qn{constructor(e){super();const t=e.match(st.CMYK).groups;this._c=t.c_legacy??t.c,this._m=t.m_legacy??t.m,this._y=t.y_legacy??t.y,this._k=t.k_legacy??t.k,this._a=t.a_legacy??t.a;const i=za(ai(this._c),ai(this._m),ai(this._y),ai(this._k));this._a!==void 0&&(i.A=me(this._a)),this._rgb=i}get hasPercentageValues(){return Me.test(this._c)&&Me.test(this._m)&&Me.test(this._y)&&Me.test(this._k)}static test(e){return st.CMYK.test(e)}}const $e=r=>typeof r=="string"?(e=>{let t;if(Object.keys(G).some((i=>{if(st[i].test(e))return t=i,!0})),!t&&~mu.indexOf(e)&&(t=G.HEX),!t)throw new Error(Zg);return t})(r):(e=>{let t,i=!1;const n=vu(Object.keys(e));if(Ws[n]&&(t=Ws[n]),t&&t===G.RGB){const s=Object.entries(e).some((o=>!Ks.test(`${o[1]}`))),a=Object.entries(e).some((o=>!(Me.test(`${o[1]}`)||!Ks.test(`${o[1]}`)&&!isNaN(+o[1])&&+o[1]<=J)));s&&a&&(i=!0),s||(t=G.HEX)}if(!t||i)throw new Error(Qg);return t})(r),sy={[G.HEX](r){const e=~mu.indexOf(r)?Dn[r]:r;return new ny(e).rgb},[G.RGB]:r=>new Xs(r,Ve).rgb,[G.HSL]:r=>new Ys(r,Ve).rgb,[G.HWB]:r=>new Js(r,Ve).rgb,[G.CIELab]:r=>new Zs(r,Ve).rgb,[G.LCH]:r=>new Qs(r,Ve).rgb,[G.CMYK]:r=>new ea(r).rgb},ay={[G.HEX](r){const e={R:Ai(`${r.R}`),G:Ai(`${r.G}`),B:Ai(`${r.B}`)};return be(r,"A")&&(e.A=Math.min(Ai(`${r.A}`,!0),1)),e},[G.RGB](r){return this.HEX(r)},[G.HSL](r){const e=rt(`${r.S}`),t=rt(`${r.L}`),i=pe(yt(r.H),e,t);return be(r,"A")&&(i.A=me(r.A)),i},[G.HWB](r){const e=rt(`${r.W}`),t=rt(`${r.B}`),i=Ln(yt(r.H),e,t);return be(r,"A")&&(i.A=me(r.A)),i},[G.CIELab](r){const e=rt(`${r.L}`),t=Rn(`${r.a}`),i=Rn(`${r.b}`),n=kr(e,t,i);return be(r,"A")&&(n.A=me(r.A)),n},[G.LCH](r){const e=rt(`${r.L}`),t=yu(`${r.C}`),i=yt(`${r.H}`),n=$n(e,t,i);return be(r,"A")&&(n.A=me(r.A)),n},[G.CMYK](r){const e=ai(`${r.C}`),t=ai(`${r.M}`),i=ai(`${r.Y}`),n=ai(`${r.K}`),s=za(e,t,i,n);return be(r,"A")&&(s.A=me(r.A)),s}},Ve=(r,e=$e(r))=>typeof r=="string"?sy[e](r):ay[e](r),we=(r,...e)=>{const t=[],i=[],n=[],s=[],a=[],o=[],l=[],u=Object.values(Ne),c=Object.values(Oe),h=Object.values(qr),f={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0};for(const m of e)if(typeof m=="string"){if(t.push(m),m.includes(",")){f.legacyCSS++;const p=m.match(Yg);new Set(p).size===1&&Jg.test(p[0].slice(1))&&f.spacesAfterCommas++}if(Ys.test(m)){const p=new Ys(m,Ve);i.push(p.angleUnit),l.push(p.hasPercentageAlpha);continue}if(Js.test(m)){const p=new Js(m,Ve);i.push(p.angleUnit),l.push(p.hasPercentageAlpha);continue}if(Xs.test(m)){const p=new Xs(m,Ve);n.push(p.hasPercentageValues),l.push(p.hasPercentageAlpha);continue}if(Zs.test(m)){const p=new Zs(m,Ve);s.push(p.hasPercentageValues),l.push(p.hasPercentageAlpha);continue}if(Qs.test(m)){const p=new Qs(m,Ve);i.push(p.angleUnit),a.push(p.hasPercentageValues),l.push(p.hasPercentageAlpha);continue}if(ea.test(m)){const p=new ea(m);o.push(p.hasPercentageValues),m.startsWith("cmyk")&&f.cmykFunction++,l.push(p.hasPercentageAlpha)}}return{decimals:typeof r.decimals===Sr.NUMBER?r.decimals:Dt.decimals,legacyCSS:typeof r.legacyCSS===Sr.BOOLEAN?r.legacyCSS:!!(t.length&&f.legacyCSS===t.length)||Dt.legacyCSS,spacesAfterCommas:typeof r.spacesAfterCommas===Sr.BOOLEAN?r.spacesAfterCommas:!!(t.length&&f.spacesAfterCommas===t.length)||Dt.spacesAfterCommas,anglesUnit:r.anglesUnit&&u.includes(r.anglesUnit)?r.anglesUnit:new Set(i).size===1?i[0]:Dt.anglesUnit,rgbUnit:r.rgbUnit&&c.includes(r.rgbUnit)?r.rgbUnit:new Set(n).size===1&&n[0]?Oe.PERCENT:Dt.rgbUnit,labUnit:r.labUnit&&c.includes(r.labUnit)?r.labUnit:new Set(s).size===1&&s[0]?Oe.PERCENT:Dt.labUnit,lchUnit:r.lchUnit&&c.includes(r.lchUnit)?r.lchUnit:new Set(a).size===1&&a[0]?Oe.PERCENT:Dt.lchUnit,cmykUnit:r.cmykUnit&&c.includes(r.cmykUnit)?r.cmykUnit:new Set(o).size!==1||o[0]?Dt.cmykUnit:Oe.NONE,alphaUnit:r.alphaUnit&&c.includes(r.alphaUnit)?r.alphaUnit:new Set(l).size===1&&l[0]?Oe.PERCENT:Dt.alphaUnit,cmykFunction:r.cmykFunction&&h.includes(r.cmykFunction)?r.cmykFunction:o.length&&o.length===f.cmykFunction?qr.CMYK:Dt.cmykFunction}},ta=(r,e)=>({H:L(r.H,e),S:L(r.S,e),L:L(r.L,e)}),fs=r=>r?", ":",",vi=(r,e)=>{const t=vu(Object.keys(r));return Kg[Ws[t]].reduce(((i,n,s)=>{const a=r[n];return a!==void 0&&i.push(e(a,s)),i}),[])},bi=(r,e)=>r.replace(Xg,((t,i)=>`${e[+i-1]}`)),_r=(r,e,t=!1)=>{const{alphaUnit:i,legacyCSS:n,decimals:s}=e;return i!==Oe.PERCENT||n&&!t?L(r,s):`${L(100*r,s)}%`},xo=r=>{const{anglesUnit:e,decimals:t}=r;return(i,n)=>n===0&&e!==Ne.NONE?`${L(wu(i,e),t)}${e}`:n===3?_r(i,r):L(i,t)},W={[G.HEX]:r=>{const e=vi(r,(i=>(n=>{let s=L(n,0).toString(16).toUpperCase();return s.length===1&&(s=`0${s}`),s})(L(i)))),t=e.length===4?"#{1}{2}{3}{4}":"#{1}{2}{3}";return bi(t,e)},[G.RGB]:(r,e)=>{const{decimals:t,legacyCSS:i,spacesAfterCommas:n,rgbUnit:s}=e,a=fs(n),o=vi(r,((u,c)=>s===Oe.PERCENT&&c<3?`${((h,f)=>L(h/J*100,f))(u,t)}%`:c===3?_r(u,e):L(u,t))),l=i?o.length===4?`rgba({1}${a}{2}${a}{3}${a}{4})`:`rgb({1}${a}{2}${a}{3})`:o.length===4?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return bi(l,o)},[G.HSL]:(r,e)=>{const{legacyCSS:t,spacesAfterCommas:i}=e,n=fs(i),s=xo(e),a=vi(r,s),o=t?a.length===4?`hsla({1}${n}{2}%${n}{3}%${n}{4})`:`hsl({1}${n}{2}%${n}{3}%)`:a.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return bi(o,a)},[G.HWB]:(r,e)=>{const t=xo(e),i=vi(r,t),n=i.length===4?"hwb({1} {2}% {3}% / {4})":"hwb({1} {2}% {3}%)";return bi(n,i)},[G.CIELab]:(r,e)=>{const{decimals:t,labUnit:i}=e,n=vi(r,((a,o)=>{if(o===0){const l=L(rt(a),t);return i===Oe.PERCENT?`${l}%`:`${l}`}return o<3?i===Oe.PERCENT?`${((l,u)=>L(l/oi*100,u))(a,t)}%`:L(a,t):_r(a,e,!0)})),s=n.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return bi(s,n)},[G.LCH]:(r,e)=>{const{decimals:t,lchUnit:i,anglesUnit:n}=e,s=vi(r,((o,l)=>{if(l===0){const u=L(rt(o),t);return i===Oe.PERCENT?`${u}%`:`${u}`}return l===1?i===Oe.PERCENT?`${((u,c)=>L(u/er*100,c))(o,t)}%`:L(o,t):l===2?n!==Ne.NONE?`${L(wu(o,n),t)}${n}`:L(o,t):_r(o,e,!0)})),a=s.length===4?"lch({1} {2} {3} / {4})":"lch({1} {2} {3})";return bi(a,s)},[G.CMYK]:(r,e)=>{const{decimals:t,legacyCSS:i,spacesAfterCommas:n,cmykUnit:s,cmykFunction:a}=e,o=fs(n),l=vi(r,((c,h)=>s===Oe.PERCENT&&h<4?`${L(c,t)}%`:h===4?_r(c,e):L(c/100,t))),u=i?l.length===5?`${a}({1}${o}{2}${o}{3}${o}{4}${o}{5})`:`${a}({1}${o}{2}${o}{3}${o}{4})`:l.length===5?`${a}({1} {2} {3} {4} / {5})`:`${a}({1} {2} {3} {4})`;return bi(u,l)}},pr=(r,e,t)=>e.reduce(((i,n)=>[...i,{...r,H:t===et.ADDITIVE?yt(r.H+n):yt(bo(bo(r.H,!1)+n,!0))}]),[{...r}]),oy=(r,e)=>pr(r,[30,-30],e),ly=(r,e)=>pr(r,[180],e),uy=(r,e)=>pr(r,[150,-150],e),dy=(r,e)=>pr(r,[120,-120],e),cy=(r,e)=>pr(r,[60,-120,180],e),hy=(r,e)=>pr(r,[90,-90,180],e),j={[G.HEX]:r=>({R:on(r.R),G:on(r.G),B:on(r.B)}),HEXA(r){const e=j.HEX(r);return e.A=be(r,"A")?on(r.A*J):"0xFF",e},[G.RGB](r,e){const t=fy(r,e);return be(t,"A")&&delete t.A,t},RGBA(r,e){const t=j.RGB(r,e);return t.A=be(r,"A")?L(r.A):1,t},[G.HSL](r,e){const t=di(r.R,r.G,r.B);return delete t.A,ta(t,e)},HSLA(r,e){const t=j.HSL(r,e);return t.A=be(r,"A")?L(r.A,e):1,t},[G.HWB](r,e){const t=Bi(r.R,r.G,r.B);return delete t.A,((i,n)=>({H:L(i.H,n),W:L(i.W,n),B:L(i.B,n)}))(t,e)},HWBA(r,e){const t=j.HWB(r,e);return t.A=be(r,"A")?L(r.A,e):1,t},[G.CIELab]:(r,e)=>((t,i)=>({L:L(t.L,i),a:L(t.a,i),b:L(t.b,i)}))(ci(r.R,r.G,r.B),e),CIELabA(r,e){const t=j.CIELab(r,e);return t.A=be(r,"A")?L(r.A,e):1,t},[G.LCH]:(r,e)=>((t,i)=>({L:L(t.L,i),C:L(t.C,i),H:L(t.H,i)}))(hi(r.R,r.G,r.B),e),LCHA(r,e){const t=j.LCH(r,e);return t.A=be(r,"A")?L(r.A,e):1,t},[G.CMYK]:(r,e)=>((t,i)=>({C:L(t.C,i),M:L(t.M,i),Y:L(t.Y,i),K:L(t.K,i)}))(Mu(r.R,r.G,r.B),e),CMYKA(r,e){const t=j.CMYK(r,e);return t.A=be(r,"A")?L(r.A,e):1,t}},ln=(r,e,t,i)=>{const n=$e(r),s=typeof r=="string",a=Ve(r,n),o=typeof r=="string"&&be(a,"A")||typeof r!="string"&&be(r,"A"),l=di(a.R,a.G,a.B,a.A);o||delete l.A;const u=t?l.L/(e+1):(100-l.L)/(e+1),c=Array(e).fill(null).map(((h,f)=>({...l,L:l.L+u*(f+1)*(1-2*+t)})));switch(n){case G.HEX:default:return c.map((h=>{const f=pe(h.H,h.S,h.L);return o&&(f.A=h.A),s?o?W.HEX({...f,A:L(f.A*J)}):W.HEX(f):o?j.HEXA(f):j.HEX(f)}));case G.RGB:return c.map((h=>{const f=pe(h.H,h.S,h.L);return o&&(f.A=h.A),s?W.RGB(f,i):o?j.RGBA(f,i.decimals):j.RGB(f,i.decimals)}));case G.HSL:return c.map((h=>s?W.HSL(h,i):o?j.HSLA({...pe(h.H,h.S,h.L),A:h.A},i.decimals):j.HSL(pe(h.H,h.S,h.L),i.decimals)));case G.HWB:return c.map((h=>{const f=pe(h.H,h.S,h.L);o&&(f.A=h.A);const m=o?j.HWBA(f,i.decimals):j.HWB(f,i.decimals);return s?W.HWB(m,i):m}));case G.CIELab:return c.map((h=>{const f=pe(h.H,h.S,h.L);o&&(f.A=h.A);const m=o?j.CIELabA(f,i.decimals):j.CIELab(f,i.decimals);return s?W.CIELab(m,i):m}));case G.LCH:return c.map((h=>{const f=pe(h.H,h.S,h.L),m=hi(f.R,f.G,f.B);return o&&(m.A=h.A),s?W.LCH(m,i):o?j.LCHA({...f,A:h.A},i.decimals):j.LCH(f,i.decimals)}))}},Di={buildHarmony(r,e,t,i){const n=$e(r),s=Ve(r,n),a=di(s.R,s.G,s.B,s.A),o=typeof r=="string"&&be(s,"A")||typeof r!="string"&&be(r,"A"),l=typeof r=="string";switch(n){case G.HEX:default:return o?this.HEXA(ta(a,0),e,t,l):this.HEX(ta(a,0),e,t,l);case G.HSL:return o?this.HSLA(a,e,t,l,i):this.HSL(a,e,t,l,i);case G.HWB:return o?this.HWBA(a,e,t,l,i):this.HWB(a,e,t,l,i);case G.RGB:return o?this.RGBA(a,e,t,l,i):this.RGB(a,e,t,l,i);case G.CIELab:return o?this.CIELabA(a,e,t,l,i):this.CIELab(a,e,t,l,i);case G.LCH:return o?this.LCHA(a,e,t,l,i):this.LCH(a,e,t,l,i)}},[G.HEX]:(r,e,t,i)=>e(r,t).map((n=>i?W.HEX(pe(n.H,n.S,n.L)):j.HEX(pe(n.H,n.S,n.L)))),HEXA:(r,e,t,i)=>e(r,t).map((n=>i?W.HEX({...pe(n.H,n.S,n.L),A:me(n.A)*J}):j.HEXA({...pe(n.H,n.S,n.L),A:me(n.A)}))),[G.RGB]:(r,e,t,i,n)=>e(r,t).map((s=>i?W.RGB(pe(s.H,s.S,s.L),n):j.RGB(pe(s.H,s.S,s.L),n.decimals))),RGBA:(r,e,t,i,n)=>e(r,t).map((s=>i?W.RGB({...pe(s.H,s.S,s.L),A:me(s.A)},n):j.RGBA({...pe(s.H,s.S,s.L),A:me(s.A)},n.decimals))),[G.HSL]:(r,e,t,i,n)=>e(r,t).map((s=>i?W.HSL({H:s.H,S:s.S,L:s.L},n):j.HSL(pe(s.H,s.S,s.L),n.decimals))),HSLA:(r,e,t,i,n)=>e(r,t).map((s=>i?W.HSL({...s,A:me(s.A)},n):j.HSLA({...pe(s.H,s.S,s.L),A:me(s.A)},n.decimals))),[G.HWB]:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L),o=Bi(a.R,a.G,a.B);return i?W.HWB({H:o.H,W:o.W,B:o.B},n):j.HWB(a,n.decimals)})),HWBA:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L),o=Bi(a.R,a.G,a.B);return i?W.HWB({...o,A:me(s.A)},n):j.HWBA({...a,A:me(s.A)},n.decimals)})),[G.CIELab]:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.CIELab(ci(a.R,a.G,a.B),n):j.CIELab(a,n.decimals)})),CIELabA:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.CIELab({...ci(a.R,a.G,a.B),A:me(s.A)},n):j.CIELabA({...a,A:me(s.A)},n.decimals)})),[G.LCH]:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.LCH(hi(a.R,a.G,a.B),n):j.LCH(a,n.decimals)})),LCHA:(r,e,t,i,n)=>e(r,t).map((s=>{const a=pe(s.H,s.S,s.L);return i?W.LCH({...hi(a.R,a.G,a.B),A:me(s.A)},n):j.LCHA({...a,A:me(s.A)},n.decimals)}))},Ji={mix(r,e){const t=r.map((a=>{const o=$e(a);return Ve(a,o)})),i=e===et.SUBTRACTIVE?t.map((a=>{const o=((l,u,c)=>{const h=Math.min(l,u,c),f=Math.min(J-l,J-u,J-c),m=l-h,p=u-h,g=c-h,y=Math.min(m,p),w=m-y,x=(p+y)/2,b=(g+p-y)/2,C=Math.max(w,x,b)/Math.max(m,p,g),q=isNaN(C)||C===1/0||C<=0?1:C;return{R:w/q+f,Y:x/q+f,B:b/q+f}})(a.R,a.G,a.B);return be(a,"A")&&(o.A=a.A),o})):null;function n(a){const o=e===et.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return a.reduce(((l,u)=>{const c=be(u,"A")?u.A:1,h={R:Math.min(l.R+u.R*c,J),B:Math.min(l.B+u.B*c,J),A:1-(1-c)*(1-l.A)},f="G"in l?l.G:l.Y,m="G"in u?u.G:u.Y;return{...h,...e===et.ADDITIVE?{G:Math.min(f+m*c,J)}:{Y:Math.min(f+m*c,J)}}}),o)}let s;if(e===et.ADDITIVE)s=n(t);else{const a=n(i);s=((o,l,u)=>{const c=Math.min(o,l,u),h=Math.min(J-o,J-l,J-u),f=o-c,m=l-c,p=u-c,g=Math.min(m,p),y=f+m-g,w=m+g,x=2*(p-g),b=Math.max(y,w,x)/Math.max(f,m,p),C=isNaN(b)||b===1/0||b<=0?1:b;return{R:y/C+h,G:w/C+h,B:x/C+h}})(a.R,a.Y,a.B),s.A=a.A}return{R:L(s.R),G:L(s.G),B:L(s.B),A:se(s.A,0,1)}},[G.HEX](r,e,t){const i=this.mix(r,e);return delete i.A,t?W.HEX(i):j.HEX(i)},HEXA(r,e,t){const i=this.mix(r,e);return i.A=t?me(i.A)*J:me(i.A),t?W.HEX(i):j.HEXA(i)},[G.RGB](r,e,t,i){const n=this.mix(r,e);return delete n.A,t?W.RGB(n,i):j.RGB(n,i.decimals)},RGBA(r,e,t,i){const n=this.mix(r,e);return t?W.RGB(n,i):j.RGBA(n,i.decimals)},[G.HSL](r,e,t,i){const n=this.mix(r,e),s=di(n.R,n.G,n.B);return delete n.A,delete s.A,t?W.HSL(s,i):j.HSL(n,i.decimals)},HSLA(r,e,t,i){const n=this.mix(r,e),s=di(n.R,n.G,n.B,n.A);return t?W.HSL(s,i):j.HSLA(n,i.decimals)},[G.HWB](r,e,t,i){const n=this.mix(r,e),s=Bi(n.R,n.G,n.B);return delete n.A,delete s.A,t?W.HWB(s,i):j.HWB(n,i.decimals)},HWBA(r,e,t,i){const n=this.mix(r,e),s=Bi(n.R,n.G,n.B,n.A);return t?W.HWB(s,i):j.HWBA(n,i.decimals)},[G.CIELab](r,e,t,i){const n=this.mix(r,e),s=ci(n.R,n.G,n.B);return delete n.A,t?W.CIELab(s,i):j.CIELab(n,i.decimals)},CIELabA(r,e,t,i){const n=this.mix(r,e),s=ci(n.R,n.G,n.B);return be(n,"A")&&(s.A=n.A),t?W.CIELab(s,i):j.CIELabA(n,i.decimals)},[G.LCH](r,e,t,i){const n=this.mix(r,e),s=hi(n.R,n.G,n.B);return delete n.A,t?W.LCH(s,i):j.LCH(n,i.decimals)},LCHA(r,e,t,i){const n=this.mix(r,e),s=hi(n.R,n.G,n.B);return be(n,"A")&&(s.A=n.A),t?W.LCH(s,i):j.LCHA(n,i.decimals)}},fy=(r,e)=>({R:L(r.R,e),G:L(r.G,e),B:L(r.B,e),...be(r,"A")?{A:L(r.A,e)}:{}}),tt=(r,e,t,i)=>i(Ve(r,e),t),Hn=(r,e,t,i,n)=>(t<1&&(t=5),((a,o,l)=>{const u=l-1,c=(o.R-a.R)/u,h=(o.G-a.G)/u,f=(o.B-a.B)/u,m=me(a.A),p=(me(o.A)-m)/u;return Array(l).fill(null).map(((g,y)=>y===0?a:y===u?o:{R:L(a.R+c*y),G:L(a.G+h*y),B:L(a.B+f*y),A:L(m+p*y)}))})(Ve(r),Ve(e),t).map((a=>n(a,i))));function Be(r){const{from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:s,cssFunction:a}=r,o=typeof i=="number"?Hn(e,t,i,n?.decimals,s):Hn(e,t,5,i?.decimals,s);return a?o.map((l=>a(l,we((typeof i=="number"?n:i)??{},e,t)))):o}function qe(r){const{colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:n,css:s}=r,a=we((typeof t=="string"?i:t)??{},...e);return n(e,typeof t=="string"?t:et.ADDITIVE,s,a)}const ps=(r,e,t,i)=>({[qt.ANALOGOUS]:Di.buildHarmony(e,oy,t,i),[qt.COMPLEMENTARY]:Di.buildHarmony(e,ly,t,i),[qt.SPLIT_COMPLEMENTARY]:Di.buildHarmony(e,uy,t,i),[qt.TRIADIC]:Di.buildHarmony(e,dy,t,i),[qt.TETRADIC]:Di.buildHarmony(e,cy,t,i),[qt.SQUARE]:Di.buildHarmony(e,hy,t,i)})[r],ke=Object.fromEntries(Object.entries(Ji).map((r=>{const[e,t]=r;return[e,t.bind(Ji)]})));class Ae{constructor(e,t={}){this._options=we(t,e),this.rgb=Ve(e),this.update("rgb")}update(...e){e.includes("rgb")||this.updateRGB(),e.includes("hsl")||this.updateHSL(),e.includes("hwb")||this.updateHWB(),e.includes("lab")||this.updateLAB(),e.includes("lch")||this.updateLCH(),e.includes("cmyk")||this.updateCMYK()}updateRGB(){this.rgb={...pe(this.hsl.H,this.hsl.S,this.hsl.L),A:this.hsl.A}}updateHSL(){this.hsl=di(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateHWB(){this.hwb=Bi(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateLAB(){this.lab={...ci(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateLCH(){this.lch={...hi(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateCMYK(){this.cmyk=Mu(this.rgb.R,this.rgb.G,this.rgb.B)}updateRGBFromHWB(){this.rgb={...Ln(this.hwb.H,this.hwb.W,this.hwb.B),A:this.rgb.A}}updateRGBFromLCH(){this.rgb={...$n(this.lch.L,this.lch.C,this.lch.H),A:this.rgb.A}}updateRGBFromCMYK(){this.rgb={...za(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K),A:this.rgb.A}}updateRGBFromLAB(){this.rgb={...kr(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateLCHFromLAB(){this.lch={...Au(this.lab.L,this.lab.a,this.lab.b),A:this.lab.A}}updateLABromLCH(){this.lab={...Su(this.lch.L,this.lch.C,this.lch.H),A:this.lch.A}}setOptions(e={}){return this._options={...this._options,...e},this}setR(e){this.rgb.R=se(e,0,J),this.update("rgb")}setG(e){return this.rgb.G=se(e,0,J),this.update("rgb"),this}setB(e){return this.rgb.B=se(e,0,J),this.update("rgb"),this}setH(e){return this.hsl.H=yt(e),this.update("hsl"),this}setS(e){return this.hsl.S=se(e,0,mt),this.update("hsl"),this}setL(e){return this.hsl.L=se(e,0,mt),this.update("hsl"),this}setWhiteness(e){return this.hwb.W=se(e,0,mt),this.updateRGBFromHWB(),this.update("rgb","hwb"),this}setBlackness(e){return this.hwb.B=se(e,0,mt),this.updateRGBFromHWB(),this.update("rgb","hwb"),this}setCIEL(e){return this.lab.L=se(e,0,mt),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEa(e){return this.lab.a=se(e,-125,oi),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEb(e){return this.lab.b=se(e,-125,oi),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setLCHL(e){return this.lch.L=se(e,0,mt),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setLCHC(e){return this.lch.C=se(e,0,er),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setLCHH(e){return this.lch.H=yt(e),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setA(e){const t=se(e,0,1);return this.rgb.A=t,this.hsl.A=t,this.hwb.A=t,this.lab.A=t,this.lch.A=t,this.cmyk.A=t,this}setC(e){return this.cmyk.C=se(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setM(e){return this.cmyk.M=se(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setY(e){return this.cmyk.Y=se(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setK(e){return this.cmyk.K=se(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}get options(){return this._options}get R(){return L(this.rgb.R,this.options.decimals)}get G(){return L(this.rgb.G,this.options.decimals)}get B(){return L(this.rgb.B,this.options.decimals)}get H(){return L(this.hsl.H,this.options.decimals)}get S(){return L(this.hsl.S,this.options.decimals)}get L(){return L(this.hsl.L,this.options.decimals)}get Whiteness(){return L(this.hwb.W,this.options.decimals)}get Blackness(){return L(this.hwb.B,this.options.decimals)}get CIEL(){return L(this.lab.L,this.options.decimals)}get CIEa(){return L(this.lab.a,this.options.decimals)}get CIEb(){return L(this.lab.b,this.options.decimals)}get LCHL(){return L(this.lch.L,this.options.decimals)}get LCHC(){return L(this.lch.C,this.options.decimals)}get LCHH(){return L(this.lch.H,this.options.decimals)}get A(){return L(this.hsl.A,this.options.decimals)}get C(){return L(this.cmyk.C,this.options.decimals)}get M(){return L(this.cmyk.M,this.options.decimals)}get Y(){return L(this.cmyk.Y,this.options.decimals)}get K(){return L(this.cmyk.K,this.options.decimals)}get HEXObject(){return j.HEX(this.rgb)}get HEXAObject(){return j.HEXA(this.rgb)}get RGBObject(){return{R:this.R,G:this.G,B:this.B}}get RGBAObject(){return{...this.RGBObject,A:this.A}}get HSLObject(){return{H:this.H,S:this.S,L:this.L}}get HSLAObject(){return{...this.HSLObject,A:this.A}}get HWBObject(){return{H:this.H,W:this.Whiteness,B:this.Blackness}}get HWBAObject(){return{...this.HWBObject,A:this.A}}get CIELabObject(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}}get CIELabAObject(){return{...this.CIELabObject,A:this.A}}get LCHObject(){return{L:this.LCHL,C:this.LCHC,H:this.LCHH}}get LCHAObject(){return{...this.LCHObject,A:this.A}}get CMYKObject(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}}get CMYKAObject(){return{...this.CMYKObject,A:this.A}}get HEX(){return W.HEX({R:this.R,G:this.G,B:this.B})}get HEXA(){return W.HEX({R:this.R,G:this.G,B:this.B,A:this.A*J})}get RGB(){return W.RGB({R:this.R,G:this.G,B:this.B},this.options)}get RGBA(){return W.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)}get HSL(){return W.HSL({H:this.H,S:this.S,L:this.L},this.options)}get HSLA(){return W.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)}get HWB(){return W.HWB({H:this.H,W:this.Whiteness,B:this.Blackness},this.options)}get HWBA(){return W.HWB({H:this.H,W:this.Whiteness,B:this.Blackness,A:this.A},this.options)}get CIELab(){return W.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)}get CIELabA(){return W.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)}get LCH(){return W.LCH({L:this.LCHL,C:this.LCHC,H:this.LCHH},this.options)}get LCHA(){return W.LCH({L:this.LCHL,C:this.LCHC,H:this.LCHH,A:this.A},this.options)}get CMYK(){return W.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)}get CMYKA(){return W.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)}static toHEXObject(e){const t=$e(e);return tt(e,t,0,j.HEX)}static toHEX(e){return W.HEX(Ae.toHEXObject(e))}static toHEXAObject(e){const t=$e(e);return tt(e,t,0,j.HEXA)}static toHEXA(e){return W.HEX(Ae.toHEXAObject(e))}static toRGBObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.RGB)}static toRGB(e,t={}){const i=Ae.toRGBObject(e,t),n=we(t,e);return W.RGB(i,n)}static toRGBAObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.RGBA)}static toRGBA(e,t={}){const i=Ae.toRGBAObject(e,t),n=we(t,e);return W.RGB(i,n)}static toHSLObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.HSL)}static toHSL(e,t={}){const i=Ae.toHSLObject(e,t),n=we(t,e);return W.HSL(i,n)}static toHSLAObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.HSLA)}static toHSLA(e,t={}){const i=Ae.toHSLAObject(e,t),n=we(t,e);return W.HSL(i,n)}static toHWBObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.HWB)}static toHWB(e,t={}){const i=Ae.toHWBObject(e,t),n=we(t,e);return W.HWB(i,n)}static toHWBAObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.HWBA)}static toHWBA(e,t={}){const i=Ae.toHWBAObject(e,t),n=we(t,e);return W.HWB(i,n)}static toCIELabObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.CIELab)}static toCIELab(e,t={}){const i=Ae.toCIELabObject(e,t),n=we(t,e);return W.CIELab(i,n)}static toCIELabAObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.CIELabA)}static toCIELabA(e,t={}){const i=Ae.toCIELabAObject(e,t),n=we(t,e);return W.CIELab(i,n)}static toLCHObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.LCH)}static toLCH(e,t={}){const i=Ae.toLCHObject(e,t),n=we(t,e);return W.LCH(i,n)}static toLCHAObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.LCHA)}static toLCHA(e,t={}){const i=Ae.toLCHAObject(e,t),n=we(t,e);return W.LCH(i,n)}static toCMYKObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.CMYK)}static toCMYK(e,t={}){const i=Ae.toCMYKObject(e,t),n=we(t,e);return W.CMYK(i,n)}static toCMYKAObject(e,t={}){const i=$e(e);return tt(e,i,t.decimals,j.CMYKA)}static toCMYKA(e,t={}){const i=Ae.toCMYKAObject(e,t),n=we(t,e);return W.CMYK(i,n)}static getBlendHEXObject(e,t,i=5){return Hn(e,t,i,0,j.HEX)}static getBlendHEX(e,t,i=5){return Ae.getBlendHEXObject(e,t,i).map((n=>W.HEX(n)))}static getBlendHEXAObject(e,t,i=5){return Hn(e,t,i,0,j.HEXA)}static getBlendHEXA(e,t,i=5){return Ae.getBlendHEXAObject(e,t,i).map((n=>W.HEX(n)))}static getBlendRGBObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.RGB})}static getBlendRGB(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.RGB,cssFunction:W.RGB})}static getBlendRGBAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.RGBA})}static getBlendRGBA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.RGBA,cssFunction:W.RGB})}static getBlendHSLObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.HSL})}static getBlendHSL(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.HSL,cssFunction:W.HSL})}static getBlendHSLAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.HSLA})}static getBlendHSLA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.HSLA,cssFunction:W.HSL})}static getBlendHWBObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.HWB})}static getBlendHWB(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.HWB,cssFunction:W.HWB})}static getBlendHWBAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.HWBA})}static getBlendHWBA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.HWBA,cssFunction:W.HWB})}static getBlendCIELabObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.CIELab})}static getBlendCIELab(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.CIELab,cssFunction:W.CIELab})}static getBlendCIELabAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.CIELabA})}static getBlendCIELabA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.CIELabA,cssFunction:W.CIELab})}static getBlendLCHObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.LCH})}static getBlendLCH(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.LCH,cssFunction:W.LCH})}static getBlendLCHAObject(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.LCHA})}static getBlendLCHA(e,t,i,n){return Be({from:e,to:t,thirdParameter:i,fourthParameter:n,translateFunction:j.LCHA,cssFunction:W.LCH})}static getMixHEXObject(e,t=et.ADDITIVE){return Ji.HEX(e,t,!1)}static getMixHEX(e,t=et.ADDITIVE){return Ji.HEX(e,t,!0)}static getMixHEXAObject(e,t=et.ADDITIVE){return Ji.HEXA(e,t,!1)}static getMixHEXA(e,t=et.ADDITIVE){return Ji.HEXA(e,t,!0)}static getMixRGBObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.RGB,css:!1})}static getMixRGB(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.RGB,css:!0})}static getMixRGBAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.RGBA,css:!1})}static getMixRGBA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.RGBA,css:!0})}static getMixHSLObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HSL,css:!1})}static getMixHSL(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HSL,css:!0})}static getMixHSLAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HSLA,css:!1})}static getMixHSLA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HSLA,css:!0})}static getMixHWBObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HWB,css:!1})}static getMixHWB(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HWB,css:!0})}static getMixHWBAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HWBA,css:!1})}static getMixHWBA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.HWBA,css:!0})}static getMixCIELabObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.CIELab,css:!1})}static getMixCIELab(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.CIELab,css:!0})}static getMixCIELabAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.CIELabA,css:!1})}static getMixCIELabA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.CIELabA,css:!0})}static getMixLCHObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.LCH,css:!1})}static getMixLCH(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.LCH,css:!0})}static getMixLCHAObject(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.LCHA,css:!1})}static getMixLCHA(e,t,i){return qe({colors:e,secondParameter:t,thirdParameter:i,colorMixerFunction:ke.LCHA,css:!0})}static getShades(e,t,i){return typeof t=="number"?ln(e,t,!0,we(i||{},e)):ln(e,5,!0,we(t||{},e))}static getTints(e,t,i){return typeof t=="number"?ln(e,t,!1,we(i||{},e)):ln(e,5,!1,we(t||{},e))}static getHarmony(e,t,i,n){return`${t}`in qt?ps(t,e,cs(i)?i:et.ADDITIVE,we(cs(i)?n||{}:i||{},e)):cs(t)?ps(qt.COMPLEMENTARY,e,t,we(i||{},e)):ps(qt.COMPLEMENTARY,e,et.ADDITIVE,we(t||{},e))}}const py={slots:{root:"data-[disabled]:opacity-75",picker:"flex gap-4",selector:"rounded-md touch-none",selectorBackground:"w-full h-full relative rounded-md",selectorThumb:"-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-white rounded-full cursor-pointer data-[disabled]:cursor-not-allowed",track:"w-[8px] relative rounded-md touch-none",trackThumb:"absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-white cursor-pointer data-[disabled]:cursor-not-allowed"},variants:{size:{xs:{selector:"w-38 h-38",track:"h-38"},sm:{selector:"w-40 h-40",track:"h-40"},md:{selector:"w-42 h-42",track:"h-42"},lg:{selector:"w-44 h-44",track:"h-44"},xl:{selector:"w-46 h-46",track:"h-46"}}},compoundVariants:[],defaultVariants:{size:"md"}},my=["data-disabled"],gy=["data-disabled"];function yy(r){const e=r.S*(r.L<50?r.L:100-r.L),t=r.L+e/100;return{h:r.H,s:r.L===0?r.S:2*e/t,v:t}}function wo(r){const e=(200-r.s)*r.v/100;return{H:r.h,S:e===0||e===200?0:Math.round(r.s*r.v/(e<=100?e:200-e)),L:e/2}}const vy={__name:"UColorPicker",props:kn({as:{type:null,required:!1},throttle:{type:Number,required:!1,default:50},disabled:{type:Boolean,required:!1},defaultValue:{type:String,required:!1,default:"#FFFFFF"},format:{type:String,required:!1,default:"hex"},size:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const e=r,t=ua(r,"modelValue",{type:String}),i=Ie(),n=De("colorPicker",e),s=F(()=>le({extend:le(py),...i.ui?.colorPicker||{}})({size:e.size})),a=F({get(){try{const B=new Ae(t.value||e.defaultValue);return yy(B.HSLObject)}catch{return{h:0,s:0,v:100}}},set(B){const T=new Ae(wo(B),{labUnit:"percent",cmykUnit:"percent",cmykFunction:"cmyk"});switch(e.format){case"rgb":t.value=T.RGB;break;case"hsl":t.value=T.HSL;break;case"cmyk":t.value=T.CMYK;break;case"lab":t.value=T.CIELab;break;default:t.value=T.HEX}}});function o(B,T,k="both",$={x:0,y:0},N){const U=z($),Q=z(),ie=Ga(B),X=Ga(T);function Y(he){if(Cr(N))return he.preventDefault();const te=Cr(T);Q.value={x:he.clientX-(te?he.clientX-X.left.value+te.scrollLeft:ie.left.value),y:he.clientY-(te?he.clientY-X.top.value+te.scrollTop:ie.top.value)},ce(he)}function ce(he){if(!Q.value)return;const te=Cr(T);let{x:ye,y:ei}=U.value;te&&(k==="x"||k==="both")&&(ye=Math.min(Math.max(0,(he.clientX-Q.value.x)/te.scrollWidth*100),100)),te&&(k==="y"||k==="both")&&(ei=Math.min(Math.max(0,(he.clientY-Q.value.y)/te.scrollHeight*100),100)),U.value={x:ye,y:ei}}function K(){Q.value&&(Q.value=void 0)}return Fr&&(Ft(T,"pointerdown",Y),Ft(window,"pointermove",ce),Ft(window,"pointerup",K)),{position:U}}function l(B,T="left"){return T==="right"?B*100/360:B/100*360}function u(B){return 100-B}const c=z(null),h=z(null),f=z(null),m=z(null),p=F(()=>e.disabled),{position:g}=o(h,c,"both",{x:a.value.s,y:u(a.value.v)},p),{position:y}=o(m,f,"y",{x:0,y:l(a.value.h,"right")},p),{pause:w,resume:x}=yd(a,B=>{g.value={x:B.s,y:u(B.v)},y.value={x:0,y:l(B.h,"right")}});vd([g,y],()=>{w(),a.value={h:l(y.value.y),s:g.value.x,v:u(g.value.y)},nt(x)},{throttle:()=>e.throttle});const b=F(()=>new Ae(wo({h:l(y.value.y),s:100,v:100})).HEX),C=F(()=>({backgroundColor:b.value})),q=F(()=>({backgroundColor:new Ae(t.value||e.defaultValue).HEX,left:`${g.value.x}%`,top:`${g.value.y}%`})),M=F(()=>({backgroundColor:b.value,top:`${y.value.y}%`}));return(B,T)=>(v(),A(d(ne),{as:r.as,"data-slot":"root",class:O(s.value.root({class:[d(n)?.root,e.class]})),"data-disabled":p.value?!0:void 0},{default:_(()=>[P("div",{"data-slot":"picker",class:O(s.value.picker({class:d(n)?.picker}))},[P("div",{ref_key:"selectorRef",ref:c,"data-slot":"selector",class:O(s.value.selector({class:d(n)?.selector})),style:Et(C.value)},[P("div",{"data-slot":"selectorBackground",class:O(s.value.selectorBackground({class:d(n)?.selectorBackground})),"data-color-picker-background":""},[P("div",{ref_key:"selectorThumbRef",ref:h,"data-slot":"selectorThumb",class:O(s.value.selectorThumb({class:d(n)?.selectorThumb})),style:Et(q.value),"data-disabled":p.value?!0:void 0},null,14,my)],2)],6),P("div",{ref_key:"trackRef",ref:f,"data-slot":"track",class:O(s.value.track({class:d(n)?.track})),"data-color-picker-track":""},[P("div",{ref_key:"trackThumbRef",ref:m,"data-slot":"trackThumb",class:O(s.value.trackThumb({class:d(n)?.trackThumb})),style:Et(M.value),"data-disabled":p.value?!0:void 0},null,14,gy)],2)],2)]),_:1},8,["as","class","data-disabled"]))}},by=dl(vy,[["__scopeId","data-v-afb6814e"]]),_t={Root:Yl,Trigger:Jl,Portal:Bp,Content:yp,Arrow:Kl,Item:wp,Group:bp,Separator:zp,CheckboxItem:fp,ItemIndicator:Cp,Label:Sp,RadioGroup:kp,RadioItem:Ep,Sub:Tp,SubContent:Dp,SubTrigger:$p},xy={Root:Up,Trigger:em,Portal:Zp,Content:Yp,Arrow:Np},wy={Root:Wf,Trigger:dp,Portal:lp,Content:ap,Arrow:Jf,Close:Qf,Anchor:Xf},_y={slots:{content:"bg-default shadow-lg rounded-md ring ring-default data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-popover-content-transform-origin) focus:outline-none pointer-events-auto",arrow:"fill-default"}},Cy={__name:"UPopover",props:{mode:{type:null,required:!1,default:"click"},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},reference:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1},openDelay:{type:Number,required:!1,default:0},closeDelay:{type:Number,required:!1,default:0}},emits:["close:prevent","update:open"],setup(r,{emit:e}){const t=r,i=e,n=Ze(),s=Ie(),a=De("popover",t),o=t.mode==="hover"?It(t,"defaultOpen","open","openDelay","closeDelay"):It(t,"defaultOpen","open","modal"),l=_e(o,i),u=dr(Ue(()=>t.portal)),c=Ue(()=>Er(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),h=F(()=>t.dismissible?{pointerDownOutside:Zn}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((y,w)=>(y[w]=x=>{x.preventDefault(),i("close:prevent")},y),{})),f=Ue(()=>t.arrow),m=F(()=>le({extend:le(_y),...s.ui?.popover||{}})({side:c.value.side})),p=F(()=>t.mode==="hover"?xy:wy);return(g,y)=>(v(),A(d(p).Root,ae(oe(d(l))),{default:_(({open:w,close:x})=>[n.default||r.reference?(v(),A(d(p).Trigger,{key:0,"as-child":"",reference:r.reference,class:O(t.class)},{default:_(()=>[S(g.$slots,"default",{open:w})]),_:2},1032,["reference","class"])):R("",!0),"Anchor"in p.value&&n.anchor?(v(),A(d(p).Anchor,{key:1,"as-child":""},{default:_(()=>[S(g.$slots,"anchor",ae(oe(x?{close:x}:{})))]),_:2},1024)):R("",!0),E(d(p).Portal,ae(oe(d(u))),{default:_(()=>[E(d(p).Content,H(c.value,{"data-slot":"content",class:m.value.content({class:[!n.default&&t.class,d(a)?.content]})},Pr(h.value)),{default:_(()=>[S(g.$slots,"content",ae(oe(x?{close:x}:{}))),r.arrow?(v(),A(d(p).Arrow,H({key:0},f.value,{"data-slot":"arrow",class:m.value.arrow({class:d(a)?.arrow})}),null,16,["class"])):R("",!0)]),_:2},1040,["class"])]),_:2},1040)]),_:3},16))}},Ay=I({__name:"EditableColor",props:{modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,i=e,n=z(t.modelValue),s=()=>{i("update:modelValue",n.value)};return(a,o)=>{const l=ut,u=by,c=Cy;return v(),A(c,{onBlur:s},{content:_(()=>[E(u,{modelValue:n.value,"onUpdate:modelValue":[o[0]||(o[0]=h=>n.value=h),s],class:"p-2"},null,8,["modelValue"])]),default:_(()=>[E(l,{label:n.value,color:"neutral",size:"xs",variant:"soft"},{leading:_(()=>[P("span",{style:Et({backgroundColor:n.value}),class:"size-3 rounded-full"},null,4)]),_:1},8,["label"])]),_:1})}}}),Sy=Object.assign(Ay,{__name:"EditableColor"}),qu={__name:"UDropdownMenuContent",props:{items:{type:null,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0},sub:{type:Boolean,required:!1},labelKey:{type:null,required:!0},descriptionKey:{type:null,required:!0},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0},class:{type:null,required:!1},ui:{type:null,required:!0},uiOverride:{type:null,required:!1},loop:{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},hideShiftedArrow:{type:Boolean,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}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(r,{emit:e}){const t=r,i=e,n=Ze(),{dir:s}=ki(),a=Ie(),o=dr(Ue(()=>t.portal)),l=_e(ur(t,"sub","items","portal","labelKey","descriptionKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),i),u=()=>pl(n,["default"]),[c,h]=Ar(),f=F(()=>s.value==="rtl"?a.ui.icons.chevronLeft:a.ui.icons.chevronRight),m=F(()=>t.items?.length?bd(t.items)?t.items:[t.items]:[]);return(p,g)=>(v(),V(xe,null,[E(d(c),null,{default:_(({item:y,active:w,index:x})=>[S(p.$slots,y.slot||"item",{item:y,index:x,ui:r.ui},()=>[S(p.$slots,y.slot?`${y.slot}-leading`:"item-leading",{item:y,active:w,index:x,ui:r.ui},()=>[y.loading?(v(),A(Se,{key:0,name:r.loadingIcon||d(a).ui.icons.loading,"data-slot":"itemLeadingIcon",class:O(r.ui.itemLeadingIcon({class:[r.uiOverride?.itemLeadingIcon,y.ui?.itemLeadingIcon],color:y?.color,loading:!0}))},null,8,["name","class"])):y.icon?(v(),A(Se,{key:1,name:y.icon,"data-slot":"itemLeadingIcon",class:O(r.ui.itemLeadingIcon({class:[r.uiOverride?.itemLeadingIcon,y.ui?.itemLeadingIcon],color:y?.color,active:w}))},null,8,["name","class"])):y.avatar?(v(),A(cr,H({key:2,size:y.ui?.itemLeadingAvatarSize||r.uiOverride?.itemLeadingAvatarSize||r.ui.itemLeadingAvatarSize()},y.avatar,{"data-slot":"itemLeadingAvatar",class:r.ui.itemLeadingAvatar({class:[r.uiOverride?.itemLeadingAvatar,y.ui?.itemLeadingAvatar],active:w})}),null,16,["size","class"])):R("",!0)]),d(ft)(y,t.labelKey)||n[y.slot?`${y.slot}-label`:"item-label"]||d(ft)(y,t.descriptionKey)||n[y.slot?`${y.slot}-description`:"item-description"]?(v(),V("span",{key:0,"data-slot":"itemWrapper",class:O(r.ui.itemWrapper({class:[r.uiOverride?.itemWrapper,y.ui?.itemWrapper]}))},[P("span",{"data-slot":"itemLabel",class:O(r.ui.itemLabel({class:[r.uiOverride?.itemLabel,y.ui?.itemLabel],active:w}))},[S(p.$slots,y.slot?`${y.slot}-label`:"item-label",{item:y,active:w,index:x},()=>[de(ee(d(ft)(y,t.labelKey)),1)]),y.target==="_blank"&&r.externalIcon!==!1?(v(),A(Se,{key:0,name:typeof r.externalIcon=="string"?r.externalIcon:d(a).ui.icons.external,"data-slot":"itemLabelExternalIcon",class:O(r.ui.itemLabelExternalIcon({class:[r.uiOverride?.itemLabelExternalIcon,y.ui?.itemLabelExternalIcon],color:y?.color,active:w}))},null,8,["name","class"])):R("",!0)],2),d(ft)(y,t.descriptionKey)||n[y.slot?`${y.slot}-description`:"item-description"]?(v(),V("span",{key:0,"data-slot":"itemDescription",class:O(r.ui.itemDescription({class:[r.uiOverride?.itemDescription,y.ui?.itemDescription]}))},[S(p.$slots,y.slot?`${y.slot}-description`:"item-description",{item:y,active:w,index:x},()=>[de(ee(d(ft)(y,t.descriptionKey)),1)])],2)):R("",!0)],2)):R("",!0),P("span",{"data-slot":"itemTrailing",class:O(r.ui.itemTrailing({class:[r.uiOverride?.itemTrailing,y.ui?.itemTrailing]}))},[S(p.$slots,y.slot?`${y.slot}-trailing`:"item-trailing",{item:y,active:w,index:x,ui:r.ui},()=>[y.children?.length?(v(),A(Se,{key:0,name:f.value,"data-slot":"itemTrailingIcon",class:O(r.ui.itemTrailingIcon({class:[r.uiOverride?.itemTrailingIcon,y.ui?.itemTrailingIcon],color:y?.color,active:w}))},null,8,["name","class"])):y.kbds?.length?(v(),V("span",{key:1,"data-slot":"itemTrailingKbds",class:O(r.ui.itemTrailingKbds({class:[r.uiOverride?.itemTrailingKbds,y.ui?.itemTrailingKbds]}))},[(v(!0),V(xe,null,Xe(y.kbds,(b,C)=>(v(),A(au,H({key:C,size:y.ui?.itemTrailingKbdsSize||r.uiOverride?.itemTrailingKbdsSize||r.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof b=="string"?{value:b}:b),null,16,["size"]))),128))],2)):R("",!0)]),E(d(_t).ItemIndicator,{"as-child":""},{default:_(()=>[E(Se,{name:r.checkedIcon||d(a).ui.icons.check,"data-slot":"itemTrailingIcon",class:O(r.ui.itemTrailingIcon({class:[r.uiOverride?.itemTrailingIcon,y.ui?.itemTrailingIcon],color:y?.color}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:3}),E(d(_t).Portal,ae(oe(d(o))),{default:_(()=>[(v(),A(lr(r.sub?d(_t).SubContent:d(_t).Content),H({"data-slot":"content",class:r.ui.content({class:[r.uiOverride?.content,t.class]})},d(l)),{default:_(()=>[S(p.$slots,"content-top",{sub:r.sub??!1}),P("div",{role:"presentation","data-slot":"viewport",class:O(r.ui.viewport({class:r.uiOverride?.viewport}))},[(v(!0),V(xe,null,Xe(m.value,(y,w)=>(v(),A(d(_t).Group,{key:`group-${w}`,"data-slot":"group",class:O(r.ui.group({class:r.uiOverride?.group}))},{default:_(()=>[(v(!0),V(xe,null,Xe(y,(x,b)=>(v(),V(xe,{key:`group-${w}-${b}`},[x.type==="label"?(v(),A(d(_t).Label,{key:0,"data-slot":"label",class:O(r.ui.label({class:[r.uiOverride?.label,x.ui?.label,x.class]}))},{default:_(()=>[E(d(h),{item:x,index:b},null,8,["item","index"])]),_:2},1032,["class"])):x.type==="separator"?(v(),A(d(_t).Separator,{key:1,"data-slot":"separator",class:O(r.ui.separator({class:[r.uiOverride?.separator,x.ui?.separator,x.class]}))},null,8,["class"])):x?.children?.length?(v(),A(d(_t).Sub,{key:2,open:x.open,"default-open":x.defaultOpen},{default:_(()=>[E(d(_t).SubTrigger,{as:"button",type:"button",disabled:x.disabled,"text-value":d(ft)(x,t.labelKey),"data-slot":"item",class:O(r.ui.item({class:[r.uiOverride?.item,x.ui?.item,x.class],color:x?.color}))},{default:_(()=>[E(d(h),{item:x,index:b},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),E(qu,H({sub:"",class:x.ui?.content,ui:r.ui,"ui-override":r.uiOverride,portal:r.portal,items:x.children,align:"start","align-offset":-4,"side-offset":3,"label-key":r.labelKey,"description-key":r.descriptionKey,"checked-icon":r.checkedIcon,"loading-icon":r.loadingIcon,"external-icon":r.externalIcon},{ref_for:!0},x.content),fl({_:2},[Xe(u(),(C,q)=>({name:q,fn:_(M=>[S(p.$slots,q,H({ref_for:!0},M))])}))]),1040,["class","ui","ui-override","portal","items","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:2},1032,["open","default-open"])):x.type==="checkbox"?(v(),A(d(_t).CheckboxItem,{key:3,"model-value":x.checked,disabled:x.disabled,"text-value":d(ft)(x,t.labelKey),"data-slot":"item",class:O(r.ui.item({class:[r.uiOverride?.item,x.ui?.item,x.class],color:x?.color})),"onUpdate:modelValue":x.onUpdateChecked,onSelect:x.onSelect},{default:_(()=>[E(d(h),{item:x,index:b},null,8,["item","index"])]),_:2},1032,["model-value","disabled","text-value","class","onUpdate:modelValue","onSelect"])):(v(),A(ul,H({key:4,ref_for:!0},d(xd)(x),{custom:""}),{default:_(({active:C,...q})=>[E(d(_t).Item,{"as-child":"",disabled:x.disabled,"text-value":d(ft)(x,t.labelKey),onSelect:x.onSelect},{default:_(()=>[E(wd,H({ref_for:!0},q,{"data-slot":"item",class:r.ui.item({class:[r.uiOverride?.item,x.ui?.item,x.class],color:x?.color,active:C})}),{default:_(()=>[E(d(h),{item:x,active:C,index:b},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1032,["disabled","text-value","onSelect"])]),_:2},1040))],64))),128))]),_:2},1032,["class"]))),128))],2),S(p.$slots,"default"),S(p.$slots,"content-bottom",{sub:r.sub??!1})]),_:3},16,["class"]))]),_:3},16)],64))}},My={slots:{content:"min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-dropdown-menu-content-transform-origin) flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",arrow:"fill-default",group:"p-1 isolate",label:"w-full flex items-center font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:"group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",itemLabelExternalIcon:"inline-block size-3 align-top text-dimmed"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}},size:{xs:{label:"p-1 text-xs gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{label:"p-1.5 text-sm gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{label:"p-2 text-sm gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"md"},xl:{label:"p-2 text-base gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemTrailingIcon:"size-6",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"lg"}}},compoundVariants:[{color:"primary",active:!1,class:{item:"text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10",itemLeadingIcon:"text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary"}},{color:"secondary",active:!1,class:{item:"text-secondary data-highlighted:text-secondary data-highlighted:before:bg-secondary/10 data-[state=open]:before:bg-secondary/10",itemLeadingIcon:"text-secondary/75 group-data-highlighted:text-secondary group-data-[state=open]:text-secondary"}},{color:"success",active:!1,class:{item:"text-success data-highlighted:text-success data-highlighted:before:bg-success/10 data-[state=open]:before:bg-success/10",itemLeadingIcon:"text-success/75 group-data-highlighted:text-success group-data-[state=open]:text-success"}},{color:"info",active:!1,class:{item:"text-info data-highlighted:text-info data-highlighted:before:bg-info/10 data-[state=open]:before:bg-info/10",itemLeadingIcon:"text-info/75 group-data-highlighted:text-info group-data-[state=open]:text-info"}},{color:"warning",active:!1,class:{item:"text-warning data-highlighted:text-warning data-highlighted:before:bg-warning/10 data-[state=open]:before:bg-warning/10",itemLeadingIcon:"text-warning/75 group-data-highlighted:text-warning group-data-[state=open]:text-warning"}},{color:"error",active:!1,class:{item:"text-error data-highlighted:text-error data-highlighted:before:bg-error/10 data-[state=open]:before:bg-error/10",itemLeadingIcon:"text-error/75 group-data-highlighted:text-error group-data-[state=open]:text-error"}},{color:"primary",active:!0,class:{item:"text-primary before:bg-primary/10",itemLeadingIcon:"text-primary"}},{color:"secondary",active:!0,class:{item:"text-secondary before:bg-secondary/10",itemLeadingIcon:"text-secondary"}},{color:"success",active:!0,class:{item:"text-success before:bg-success/10",itemLeadingIcon:"text-success"}},{color:"info",active:!0,class:{item:"text-info before:bg-info/10",itemLeadingIcon:"text-info"}},{color:"warning",active:!0,class:{item:"text-warning before:bg-warning/10",itemLeadingIcon:"text-warning"}},{color:"error",active:!0,class:{item:"text-error before:bg-error/10",itemLeadingIcon:"text-error"}}],defaultVariants:{size:"md"}},ku={__name:"UDropdownMenu",props:{size:{type:null,required:!1},items:{type:null,required:!1},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},disabled:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(r,{emit:e}){const t=r,i=e,n=Ze(),s=Ie(),a=De("dropdownMenu",t),o=_e(It(t,"defaultOpen","open","modal"),i),l=Ue(()=>Er(t.content,{side:"bottom",sideOffset:8,collisionPadding:8})),u=Ue(()=>t.arrow),c=()=>pl(n,["default"]),h=F(()=>le({extend:le(My),...s.ui?.dropdownMenu||{}})({size:t.size}));return(f,m)=>(v(),A(d(Yl),ae(oe(d(o))),{default:_(({open:p})=>[n.default?(v(),A(d(Jl),{key:0,"as-child":"",class:O(t.class),disabled:r.disabled},{default:_(()=>[S(f.$slots,"default",{open:p})]),_:2},1032,["class","disabled"])):R("",!0),E(qu,H({class:h.value.content({class:[!n.default&&t.class,d(a)?.content]}),ui:h.value,"ui-override":d(a)},l.value,{items:r.items,portal:r.portal,"label-key":r.labelKey,"description-key":r.descriptionKey,"checked-icon":r.checkedIcon,"loading-icon":r.loadingIcon,"external-icon":r.externalIcon}),fl({default:_(()=>[r.arrow?(v(),A(d(Kl),H({key:0},u.value,{"data-slot":"arrow",class:h.value.arrow({class:d(a)?.arrow})}),null,16,["class"])):R("",!0)]),_:2},[Xe(c(),(g,y)=>({name:y,fn:_(w=>[S(f.$slots,y,ae(oe(w)))])}))]),1040,["class","ui","ui-override","items","portal","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:3},16))}},_o=async r=>{try{await navigator.clipboard.writeText(r)}catch(e){console.error("Failed to copy path:",e)}},Fu=async r=>{try{const e=`:${r.path.replace(/\./g,"-")}="${JSON.stringify(r.value)}"`;await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy prop:",e)}},By=async r=>{try{const e=r.children?.map(i=>i.value)||[],t=`:${r.path.replace(/\./g,"-")}='[${e.map(i=>typeof i=="string"?`"${i}"`:i).join(", ")}]'`;await navigator.clipboard.writeText(t)}catch(e){console.error("Failed to copy prop as array:",e)}},Eu=async r=>{try{const e=JSON.stringify(r);await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy value:",e)}},Ou=async r=>{try{if(!r.children||r.children.length<3)return;await navigator.clipboard.writeText(`new Vector3(${r.children[0].value}, ${r.children[1].value}, ${r.children[2].value})`)}catch(e){console.error("Failed to copy prop as Vector3:",e)}},qy=async r=>{try{const t=`[${(r.children?.map(i=>i.value)||[]).map(i=>typeof i=="string"?`"${i}"`:i).join(", ")}]`;await navigator.clipboard.writeText(t)}catch(e){console.error("Failed to copy prop as array:",e)}},ky=async r=>{try{let e={};r.children&&r.children.length>0&&(e=r.children.reduce((t,i)=>(t[i.label]=i.value,t),{})),await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(e){console.error("Failed to copy value as JSON:",e)}},zu=async r=>{try{const e=r.children?.find(u=>u.label==="x"),t=r.children?.find(u=>u.label==="y"),i=r.children?.find(u=>u.label==="z"),n=r.children?.find(u=>u.label==="order"),s=e?.value||0,a=t?.value||0,o=i?.value||0,l=n?.value||"XYZ";await navigator.clipboard.writeText(`new Euler(${s}, ${a}, ${o}, '${l}')`)}catch(e){console.error("Failed to copy value as Euler:",e)}},Iu=async r=>{try{const e=r.children?.find(u=>u.label==="x"),t=r.children?.find(u=>u.label==="y"),i=r.children?.find(u=>u.label==="z"),n=r.children?.find(u=>u.label==="w"),s=e?.value||0,a=t?.value||0,o=i?.value||0,l=n?.value||1;await navigator.clipboard.writeText(`new Quaternion(${s}, ${a}, ${o}, ${l})`)}catch(e){console.error("Failed to copy value as Quaternion:",e)}};function Fy(r){let e=0,t=r;return r.scene&&(t=r.scene),t.traverse(i=>{if(i.isMesh&&i.geometry){const n=i.geometry,s=n.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,a=n.index?n.index.count*Uint32Array.BYTES_PER_ELEMENT:0,o=n.attributes.normal?n.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,l=n.attributes.uv?n.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,u=s+a+o+l;e+=u}}),e}function Ey(r){return(r/1024).toFixed(2)}const Tu="183",ia=0,Oy=1,zy=2,Co=1,Ao=100,So=204,Mo=205,Bo=3,Iy=0,Pu=300,qo=1e3,un=1001,ko=1002,Ty=1006,Py=1008,Dy=1009,Ry=1015,$y=1023,Du="",Bt="srgb",Fo="srgb-linear",Eo="linear",ms="srgb",Ri=7680,Oo=519,zo=35044,dn=2e3,Io=2001;function Ly(r){for(let e=r.length-1;e>=0;--e)if(r[e]>=65535)return!0;return!1}function To(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}const Po={};function Ru(r){const e=r[0];if(typeof e=="string"&&e.startsWith("TSL:")){const t=r[1];t&&t.isStackTrace?r[0]+=" "+t.getLocation():r[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return r}function Ye(...r){r=Ru(r);const e="THREE."+r.shift();{const t=r[0];t&&t.isStackTrace?console.warn(t.getError(e)):console.warn(e,...r)}}function Ci(...r){r=Ru(r);const e="THREE."+r.shift();{const t=r[0];t&&t.isStackTrace?console.error(t.getError(e)):console.error(e,...r)}}function Do(...r){const e=r.join(" ");e in Po||(Po[e]=!0,Ye(...r))}class es{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners;if(i===void 0)return;const n=i[e];if(n!==void 0){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const i=t[e.type];if(i!==void 0){e.target=this;const n=i.slice(0);for(let s=0,a=n.length;s<a;s++)n[s].call(this,e);e.target=null}}}const We=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];function Nr(){const r=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(We[r&255]+We[r>>8&255]+We[r>>16&255]+We[r>>24&255]+"-"+We[e&255]+We[e>>8&255]+"-"+We[e>>16&15|64]+We[e>>24&255]+"-"+We[t&63|128]+We[t>>8&255]+"-"+We[t>>16&255]+We[t>>24&255]+We[i&255]+We[i>>8&255]+We[i>>16&255]+We[i>>24&255]).toLowerCase()}function ue(r,e,t){return Math.max(e,Math.min(t,r))}function Hy(r,e){return(r%e+e)%e}function gs(r,e,t){return(1-t)*r+t*e}function yr(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function it(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}class Ot{constructor(e=0,t=0){Ot.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=ue(this.x,e.x,t.x),this.y=ue(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=ue(this.x,e,t),this.y=ue(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(ue(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(ue(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),n=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*i-a*n+e.x,this.y=s*n+a*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Vr{constructor(e=0,t=0,i=0,n=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=n}static slerpFlat(e,t,i,n,s,a,o){let l=i[n+0],u=i[n+1],c=i[n+2],h=i[n+3],f=s[a+0],m=s[a+1],p=s[a+2],g=s[a+3];if(h!==g||l!==f||u!==m||c!==p){let y=l*f+u*m+c*p+h*g;y<0&&(f=-f,m=-m,p=-p,g=-g,y=-y);let w=1-o;if(y<.9995){const x=Math.acos(y),b=Math.sin(x);w=Math.sin(w*x)/b,o=Math.sin(o*x)/b,l=l*w+f*o,u=u*w+m*o,c=c*w+p*o,h=h*w+g*o}else{l=l*w+f*o,u=u*w+m*o,c=c*w+p*o,h=h*w+g*o;const x=1/Math.sqrt(l*l+u*u+c*c+h*h);l*=x,u*=x,c*=x,h*=x}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=h}static multiplyQuaternionsFlat(e,t,i,n,s,a){const o=i[n],l=i[n+1],u=i[n+2],c=i[n+3],h=s[a],f=s[a+1],m=s[a+2],p=s[a+3];return e[t]=o*p+c*h+l*m-u*f,e[t+1]=l*p+c*f+u*h-o*m,e[t+2]=u*p+c*m+o*f-l*h,e[t+3]=c*p-o*h-l*f-u*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,n=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,u=o(i/2),c=o(n/2),h=o(s/2),f=l(i/2),m=l(n/2),p=l(s/2);switch(a){case"XYZ":this._x=f*c*h+u*m*p,this._y=u*m*h-f*c*p,this._z=u*c*p+f*m*h,this._w=u*c*h-f*m*p;break;case"YXZ":this._x=f*c*h+u*m*p,this._y=u*m*h-f*c*p,this._z=u*c*p-f*m*h,this._w=u*c*h+f*m*p;break;case"ZXY":this._x=f*c*h-u*m*p,this._y=u*m*h+f*c*p,this._z=u*c*p+f*m*h,this._w=u*c*h-f*m*p;break;case"ZYX":this._x=f*c*h-u*m*p,this._y=u*m*h+f*c*p,this._z=u*c*p-f*m*h,this._w=u*c*h+f*m*p;break;case"YZX":this._x=f*c*h+u*m*p,this._y=u*m*h+f*c*p,this._z=u*c*p-f*m*h,this._w=u*c*h-f*m*p;break;case"XZY":this._x=f*c*h-u*m*p,this._y=u*m*h-f*c*p,this._z=u*c*p+f*m*h,this._w=u*c*h+f*m*p;break;default:Ye("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],n=t[4],s=t[8],a=t[1],o=t[5],l=t[9],u=t[2],c=t[6],h=t[10],f=i+o+h;if(f>0){const m=.5/Math.sqrt(f+1);this._w=.25/m,this._x=(c-l)*m,this._y=(s-u)*m,this._z=(a-n)*m}else if(i>o&&i>h){const m=2*Math.sqrt(1+i-o-h);this._w=(c-l)/m,this._x=.25*m,this._y=(n+a)/m,this._z=(s+u)/m}else if(o>h){const m=2*Math.sqrt(1+o-i-h);this._w=(s-u)/m,this._x=(n+a)/m,this._y=.25*m,this._z=(l+c)/m}else{const m=2*Math.sqrt(1+h-i-o);this._w=(a-n)/m,this._x=(s+u)/m,this._y=(l+c)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<1e-8?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(ue(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const n=Math.min(1,t/i);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,n=e._y,s=e._z,a=e._w,o=t._x,l=t._y,u=t._z,c=t._w;return this._x=i*c+a*o+n*u-s*l,this._y=n*c+a*l+s*o-i*u,this._z=s*c+a*u+i*l-n*o,this._w=a*c-i*o-n*l-s*u,this._onChangeCallback(),this}slerp(e,t){let i=e._x,n=e._y,s=e._z,a=e._w,o=this.dot(e);o<0&&(i=-i,n=-n,s=-s,a=-a,o=-o);let l=1-t;if(o<.9995){const u=Math.acos(o),c=Math.sin(u);l=Math.sin(l*u)/c,t=Math.sin(t*u)/c,this._x=this._x*l+i*t,this._y=this._y*l+n*t,this._z=this._z*l+s*t,this._w=this._w*l+a*t,this._onChangeCallback()}else this._x=this._x*l+i*t,this._y=this._y*l+n*t,this._z=this._z*l+s*t,this._w=this._w*l+a*t,this.normalize();return this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),n=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(n*Math.sin(e),n*Math.cos(e),s*Math.sin(t),s*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class D{constructor(e=0,t=0,i=0){D.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Ro.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Ro.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*n,this.y=s[1]*t+s[4]*i+s[7]*n,this.z=s[2]*t+s[5]*i+s[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,s=e.elements,a=1/(s[3]*t+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*n+s[12])*a,this.y=(s[1]*t+s[5]*i+s[9]*n+s[13])*a,this.z=(s[2]*t+s[6]*i+s[10]*n+s[14])*a,this}applyQuaternion(e){const t=this.x,i=this.y,n=this.z,s=e.x,a=e.y,o=e.z,l=e.w,u=2*(a*n-o*i),c=2*(o*t-s*n),h=2*(s*i-a*t);return this.x=t+l*u+a*h-o*c,this.y=i+l*c+o*u-s*h,this.z=n+l*h+s*c-a*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*n,this.y=s[1]*t+s[5]*i+s[9]*n,this.z=s[2]*t+s[6]*i+s[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=ue(this.x,e.x,t.x),this.y=ue(this.y,e.y,t.y),this.z=ue(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=ue(this.x,e,t),this.y=ue(this.y,e,t),this.z=ue(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(ue(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,n=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=n*l-s*o,this.y=s*a-i*l,this.z=i*o-n*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return ys.copy(this).projectOnVector(e),this.sub(ys)}reflect(e){return this.sub(ys.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(ue(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ys=new D,Ro=new Vr;class pi{constructor(e,t,i,n,s,a,o,l,u){pi.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,n,s,a,o,l,u)}set(e,t,i,n,s,a,o,l,u){const c=this.elements;return c[0]=e,c[1]=n,c[2]=o,c[3]=t,c[4]=s,c[5]=l,c[6]=i,c[7]=a,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,s=this.elements,a=i[0],o=i[3],l=i[6],u=i[1],c=i[4],h=i[7],f=i[2],m=i[5],p=i[8],g=n[0],y=n[3],w=n[6],x=n[1],b=n[4],C=n[7],q=n[2],M=n[5],B=n[8];return s[0]=a*g+o*x+l*q,s[3]=a*y+o*b+l*M,s[6]=a*w+o*C+l*B,s[1]=u*g+c*x+h*q,s[4]=u*y+c*b+h*M,s[7]=u*w+c*C+h*B,s[2]=f*g+m*x+p*q,s[5]=f*y+m*b+p*M,s[8]=f*w+m*C+p*B,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8];return t*a*c-t*o*u-i*s*c+i*o*l+n*s*u-n*a*l}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],h=c*a-o*u,f=o*l-c*s,m=u*s-a*l,p=t*h+i*f+n*m;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/p;return e[0]=h*g,e[1]=(n*u-c*i)*g,e[2]=(o*i-n*a)*g,e[3]=f*g,e[4]=(c*t-n*l)*g,e[5]=(n*s-o*t)*g,e[6]=m*g,e[7]=(i*l-u*t)*g,e[8]=(a*t-i*s)*g,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,s,a,o){const l=Math.cos(s),u=Math.sin(s);return this.set(i*l,i*u,-i*(l*a+u*o)+a+e,-n*u,n*l,-n*(-u*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(vs.makeScale(e,t)),this}rotate(e){return this.premultiply(vs.makeRotation(-e)),this}translate(e,t){return this.premultiply(vs.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let n=0;n<9;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const vs=new pi,$o=new pi().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Lo=new pi().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Ny(){const r={enabled:!0,workingColorSpace:Fo,spaces:{},convert:function(n,s,a){return this.enabled===!1||s===a||!s||!a||(this.spaces[s].transfer===ms&&(n.r=Xt(n.r),n.g=Xt(n.g),n.b=Xt(n.b)),this.spaces[s].primaries!==this.spaces[a].primaries&&(n.applyMatrix3(this.spaces[s].toXYZ),n.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===ms&&(n.r=ir(n.r),n.g=ir(n.g),n.b=ir(n.b))),n},workingToColorSpace:function(n,s){return this.convert(n,this.workingColorSpace,s)},colorSpaceToWorking:function(n,s){return this.convert(n,s,this.workingColorSpace)},getPrimaries:function(n){return this.spaces[n].primaries},getTransfer:function(n){return n===Du?Eo:this.spaces[n].transfer},getToneMappingMode:function(n){return this.spaces[n].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(n,s=this.workingColorSpace){return n.fromArray(this.spaces[s].luminanceCoefficients)},define:function(n){Object.assign(this.spaces,n)},_getMatrix:function(n,s,a){return n.copy(this.spaces[s].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(n){return this.spaces[n].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(n=this.workingColorSpace){return this.spaces[n].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(n,s){return Do("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),r.workingToColorSpace(n,s)},toWorkingColorSpace:function(n,s){return Do("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),r.colorSpaceToWorking(n,s)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return r.define({[Fo]:{primaries:e,whitePoint:i,transfer:Eo,toXYZ:$o,fromXYZ:Lo,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Bt},outputColorSpaceConfig:{drawingBufferColorSpace:Bt}},[Bt]:{primaries:e,whitePoint:i,transfer:ms,toXYZ:$o,fromXYZ:Lo,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Bt}}}),r}const Ct=Ny();function Xt(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function ir(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}let $i;class Vy{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{$i===void 0&&($i=To("canvas")),$i.width=e.width,$i.height=e.height;const n=$i.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),i=$i}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=To("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const n=i.getImageData(0,0,e.width,e.height),s=n.data;for(let a=0;a<s.length;a++)s[a]=Xt(s[a]/255)*255;return i.putImageData(n,0,0),t}else if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(Xt(t[i]/255)*255):t[i]=Xt(t[i]);return{data:t,width:e.width,height:e.height}}else return Ye("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let jy=0;class Uy{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:jy++}),this.uuid=Nr(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},n=this.data;if(n!==null){let s;if(Array.isArray(n)){s=[];for(let a=0,o=n.length;a<o;a++)n[a].isDataTexture?s.push(bs(n[a].image)):s.push(bs(n[a]))}else s=bs(n);i.url=s}return t||(e.images[this.uuid]=i),i}}function bs(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?Vy.getDataURL(r):r.data?{data:Array.from(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(Ye("Texture: Unable to serialize Texture."),{})}let Gy=0;const xs=new D;class Si extends es{constructor(e=Si.DEFAULT_IMAGE,t=Si.DEFAULT_MAPPING,i=un,n=un,s=Ty,a=Py,o=$y,l=Dy,u=Si.DEFAULT_ANISOTROPY,c=Du){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Gy++}),this.uuid=Nr(),this.name="",this.source=new Uy(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=n,this.magFilter=s,this.minFilter=a,this.anisotropy=u,this.format=o,this.internalFormat=null,this.type=l,this.offset=new Ot(0,0),this.repeat=new Ot(1,1),this.center=new Ot(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new pi,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=c,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(xs).x}get height(){return this.source.getSize(xs).y}get depth(){return this.source.getSize(xs).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const i=e[t];if(i===void 0){Ye(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const n=this[t];if(n===void 0){Ye(`Texture.setValues(): property '${t}' does not exist.`);continue}n&&i&&n.isVector2&&i.isVector2||n&&i&&n.isVector3&&i.isVector3||n&&i&&n.isMatrix3&&i.isMatrix3?n.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Pu)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case qo:e.x=e.x-Math.floor(e.x);break;case un:e.x=e.x<0?0:1;break;case ko:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case qo:e.y=e.y-Math.floor(e.y);break;case un:e.y=e.y<0?0:1;break;case ko:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Si.DEFAULT_IMAGE=null;Si.DEFAULT_MAPPING=Pu;Si.DEFAULT_ANISOTROPY=1;class jr{constructor(e=0,t=0,i=0,n=1){jr.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n+a[12]*s,this.y=a[1]*t+a[5]*i+a[9]*n+a[13]*s,this.z=a[2]*t+a[6]*i+a[10]*n+a[14]*s,this.w=a[3]*t+a[7]*i+a[11]*n+a[15]*s,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,s;const l=e.elements,u=l[0],c=l[4],h=l[8],f=l[1],m=l[5],p=l[9],g=l[2],y=l[6],w=l[10];if(Math.abs(c-f)<.01&&Math.abs(h-g)<.01&&Math.abs(p-y)<.01){if(Math.abs(c+f)<.1&&Math.abs(h+g)<.1&&Math.abs(p+y)<.1&&Math.abs(u+m+w-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(u+1)/2,C=(m+1)/2,q=(w+1)/2,M=(c+f)/4,B=(h+g)/4,T=(p+y)/4;return b>C&&b>q?b<.01?(i=0,n=.707106781,s=.707106781):(i=Math.sqrt(b),n=M/i,s=B/i):C>q?C<.01?(i=.707106781,n=0,s=.707106781):(n=Math.sqrt(C),i=M/n,s=T/n):q<.01?(i=.707106781,n=.707106781,s=0):(s=Math.sqrt(q),i=B/s,n=T/s),this.set(i,n,s,t),this}let x=Math.sqrt((y-p)*(y-p)+(h-g)*(h-g)+(f-c)*(f-c));return Math.abs(x)<.001&&(x=1),this.x=(y-p)/x,this.y=(h-g)/x,this.z=(f-c)/x,this.w=Math.acos((u+m+w-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=ue(this.x,e.x,t.x),this.y=ue(this.y,e.y,t.y),this.z=ue(this.z,e.z,t.z),this.w=ue(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=ue(this.x,e,t),this.y=ue(this.y,e,t),this.z=ue(this.z,e,t),this.w=ue(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(ue(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class zt{constructor(e,t,i,n,s,a,o,l,u,c,h,f,m,p,g,y){zt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,n,s,a,o,l,u,c,h,f,m,p,g,y)}set(e,t,i,n,s,a,o,l,u,c,h,f,m,p,g,y){const w=this.elements;return w[0]=e,w[4]=t,w[8]=i,w[12]=n,w[1]=s,w[5]=a,w[9]=o,w[13]=l,w[2]=u,w[6]=c,w[10]=h,w[14]=f,w[3]=m,w[7]=p,w[11]=g,w[15]=y,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 zt().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),i.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();const t=this.elements,i=e.elements,n=1/Li.setFromMatrixColumn(e,0).length(),s=1/Li.setFromMatrixColumn(e,1).length(),a=1/Li.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*a,t[9]=i[9]*a,t[10]=i[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,n=e.y,s=e.z,a=Math.cos(i),o=Math.sin(i),l=Math.cos(n),u=Math.sin(n),c=Math.cos(s),h=Math.sin(s);if(e.order==="XYZ"){const f=a*c,m=a*h,p=o*c,g=o*h;t[0]=l*c,t[4]=-l*h,t[8]=u,t[1]=m+p*u,t[5]=f-g*u,t[9]=-o*l,t[2]=g-f*u,t[6]=p+m*u,t[10]=a*l}else if(e.order==="YXZ"){const f=l*c,m=l*h,p=u*c,g=u*h;t[0]=f+g*o,t[4]=p*o-m,t[8]=a*u,t[1]=a*h,t[5]=a*c,t[9]=-o,t[2]=m*o-p,t[6]=g+f*o,t[10]=a*l}else if(e.order==="ZXY"){const f=l*c,m=l*h,p=u*c,g=u*h;t[0]=f-g*o,t[4]=-a*h,t[8]=p+m*o,t[1]=m+p*o,t[5]=a*c,t[9]=g-f*o,t[2]=-a*u,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const f=a*c,m=a*h,p=o*c,g=o*h;t[0]=l*c,t[4]=p*u-m,t[8]=f*u+g,t[1]=l*h,t[5]=g*u+f,t[9]=m*u-p,t[2]=-u,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const f=a*l,m=a*u,p=o*l,g=o*u;t[0]=l*c,t[4]=g-f*h,t[8]=p*h+m,t[1]=h,t[5]=a*c,t[9]=-o*c,t[2]=-u*c,t[6]=m*h+p,t[10]=f-g*h}else if(e.order==="XZY"){const f=a*l,m=a*u,p=o*l,g=o*u;t[0]=l*c,t[4]=-h,t[8]=u*c,t[1]=f*h+g,t[5]=a*c,t[9]=m*h-p,t[2]=p*h-m,t[6]=o*c,t[10]=g*h+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Wy,e,Ky)}lookAt(e,t,i){const n=this.elements;return at.subVectors(e,t),at.lengthSq()===0&&(at.z=1),at.normalize(),ti.crossVectors(i,at),ti.lengthSq()===0&&(Math.abs(i.z)===1?at.x+=1e-4:at.z+=1e-4,at.normalize(),ti.crossVectors(i,at)),ti.normalize(),cn.crossVectors(at,ti),n[0]=ti.x,n[4]=cn.x,n[8]=at.x,n[1]=ti.y,n[5]=cn.y,n[9]=at.y,n[2]=ti.z,n[6]=cn.z,n[10]=at.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,s=this.elements,a=i[0],o=i[4],l=i[8],u=i[12],c=i[1],h=i[5],f=i[9],m=i[13],p=i[2],g=i[6],y=i[10],w=i[14],x=i[3],b=i[7],C=i[11],q=i[15],M=n[0],B=n[4],T=n[8],k=n[12],$=n[1],N=n[5],U=n[9],Q=n[13],ie=n[2],X=n[6],Y=n[10],ce=n[14],K=n[3],he=n[7],te=n[11],ye=n[15];return s[0]=a*M+o*$+l*ie+u*K,s[4]=a*B+o*N+l*X+u*he,s[8]=a*T+o*U+l*Y+u*te,s[12]=a*k+o*Q+l*ce+u*ye,s[1]=c*M+h*$+f*ie+m*K,s[5]=c*B+h*N+f*X+m*he,s[9]=c*T+h*U+f*Y+m*te,s[13]=c*k+h*Q+f*ce+m*ye,s[2]=p*M+g*$+y*ie+w*K,s[6]=p*B+g*N+y*X+w*he,s[10]=p*T+g*U+y*Y+w*te,s[14]=p*k+g*Q+y*ce+w*ye,s[3]=x*M+b*$+C*ie+q*K,s[7]=x*B+b*N+C*X+q*he,s[11]=x*T+b*U+C*Y+q*te,s[15]=x*k+b*Q+C*ce+q*ye,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],n=e[8],s=e[12],a=e[1],o=e[5],l=e[9],u=e[13],c=e[2],h=e[6],f=e[10],m=e[14],p=e[3],g=e[7],y=e[11],w=e[15],x=l*m-u*f,b=o*m-u*h,C=o*f-l*h,q=a*m-u*c,M=a*f-l*c,B=a*h-o*c;return t*(g*x-y*b+w*C)-i*(p*x-y*q+w*M)+n*(p*b-g*q+w*B)-s*(p*C-g*M+y*B)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],h=e[9],f=e[10],m=e[11],p=e[12],g=e[13],y=e[14],w=e[15],x=t*o-i*a,b=t*l-n*a,C=t*u-s*a,q=i*l-n*o,M=i*u-s*o,B=n*u-s*l,T=c*g-h*p,k=c*y-f*p,$=c*w-m*p,N=h*y-f*g,U=h*w-m*g,Q=f*w-m*y,ie=x*Q-b*U+C*N+q*$-M*k+B*T;if(ie===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const X=1/ie;return e[0]=(o*Q-l*U+u*N)*X,e[1]=(n*U-i*Q-s*N)*X,e[2]=(g*B-y*M+w*q)*X,e[3]=(f*M-h*B-m*q)*X,e[4]=(l*$-a*Q-u*k)*X,e[5]=(t*Q-n*$+s*k)*X,e[6]=(y*C-p*B-w*b)*X,e[7]=(c*B-f*C+m*b)*X,e[8]=(a*U-o*$+u*T)*X,e[9]=(i*$-t*U-s*T)*X,e[10]=(p*M-g*C+w*x)*X,e[11]=(h*C-c*M-m*x)*X,e[12]=(o*k-a*N-l*T)*X,e[13]=(t*N-i*k+n*T)*X,e[14]=(g*b-p*q-y*x)*X,e[15]=(c*q-h*b+f*x)*X,this}scale(e){const t=this.elements,i=e.x,n=e.y,s=e.z;return t[0]*=i,t[4]*=n,t[8]*=s,t[1]*=i,t[5]*=n,t[9]*=s,t[2]*=i,t[6]*=n,t[10]*=s,t[3]*=i,t[7]*=n,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),n=Math.sin(t),s=1-i,a=e.x,o=e.y,l=e.z,u=s*a,c=s*o;return this.set(u*a+i,u*o-n*l,u*l+n*o,0,u*o+n*l,c*o+i,c*l-n*a,0,u*l-n*o,c*l+n*a,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,n,s,a){return this.set(1,i,s,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){const n=this.elements,s=t._x,a=t._y,o=t._z,l=t._w,u=s+s,c=a+a,h=o+o,f=s*u,m=s*c,p=s*h,g=a*c,y=a*h,w=o*h,x=l*u,b=l*c,C=l*h,q=i.x,M=i.y,B=i.z;return n[0]=(1-(g+w))*q,n[1]=(m+C)*q,n[2]=(p-b)*q,n[3]=0,n[4]=(m-C)*M,n[5]=(1-(f+w))*M,n[6]=(y+x)*M,n[7]=0,n[8]=(p+b)*B,n[9]=(y-x)*B,n[10]=(1-(f+g))*B,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){const n=this.elements;e.x=n[12],e.y=n[13],e.z=n[14];const s=this.determinant();if(s===0)return i.set(1,1,1),t.identity(),this;let a=Li.set(n[0],n[1],n[2]).length();const o=Li.set(n[4],n[5],n[6]).length(),l=Li.set(n[8],n[9],n[10]).length();s<0&&(a=-a),At.copy(this);const u=1/a,c=1/o,h=1/l;return At.elements[0]*=u,At.elements[1]*=u,At.elements[2]*=u,At.elements[4]*=c,At.elements[5]*=c,At.elements[6]*=c,At.elements[8]*=h,At.elements[9]*=h,At.elements[10]*=h,t.setFromRotationMatrix(At),i.x=a,i.y=o,i.z=l,this}makePerspective(e,t,i,n,s,a,o=dn,l=!1){const u=this.elements,c=2*s/(t-e),h=2*s/(i-n),f=(t+e)/(t-e),m=(i+n)/(i-n);let p,g;if(l)p=s/(a-s),g=a*s/(a-s);else if(o===dn)p=-(a+s)/(a-s),g=-2*a*s/(a-s);else if(o===Io)p=-a/(a-s),g=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return u[0]=c,u[4]=0,u[8]=f,u[12]=0,u[1]=0,u[5]=h,u[9]=m,u[13]=0,u[2]=0,u[6]=0,u[10]=p,u[14]=g,u[3]=0,u[7]=0,u[11]=-1,u[15]=0,this}makeOrthographic(e,t,i,n,s,a,o=dn,l=!1){const u=this.elements,c=2/(t-e),h=2/(i-n),f=-(t+e)/(t-e),m=-(i+n)/(i-n);let p,g;if(l)p=1/(a-s),g=a/(a-s);else if(o===dn)p=-2/(a-s),g=-(a+s)/(a-s);else if(o===Io)p=-1/(a-s),g=-s/(a-s);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return u[0]=c,u[4]=0,u[8]=0,u[12]=f,u[1]=0,u[5]=h,u[9]=0,u[13]=m,u[2]=0,u[6]=0,u[10]=p,u[14]=g,u[3]=0,u[7]=0,u[11]=0,u[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let n=0;n<16;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Li=new D,At=new zt,Wy=new D(0,0,0),Ky=new D(1,1,1),ti=new D,cn=new D,at=new D,Ho=new zt,No=new Vr;class Ur{constructor(e=0,t=0,i=0,n=Ur.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const n=e.elements,s=n[0],a=n[4],o=n[8],l=n[1],u=n[5],c=n[9],h=n[2],f=n[6],m=n[10];switch(t){case"XYZ":this._y=Math.asin(ue(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,m),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-ue(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(o,m),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(ue(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,m),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-ue(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(ue(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(o,m));break;case"XZY":this._z=Math.asin(-ue(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-c,m),this._y=0);break;default:Ye("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return Ho.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Ho,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return No.setFromEuler(this),this.setFromQuaternion(No,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Ur.DEFAULT_ORDER="XYZ";class Xy{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let Yy=0;const Vo=new D,Hi=new Vr,jt=new zt,hn=new D,vr=new D,Jy=new D,Zy=new Vr,jo=new D(1,0,0),Uo=new D(0,1,0),Go=new D(0,0,1),Wo={type:"added"},Qy={type:"removed"},Ni={type:"childadded",child:null},ws={type:"childremoved",child:null};class Yt extends es{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Yy++}),this.uuid=Nr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Yt.DEFAULT_UP.clone();const e=new D,t=new Ur,i=new Vr,n=new D(1,1,1);function s(){i.setFromEuler(t,!1)}function a(){t.setFromQuaternion(i,void 0,!1)}t._onChange(s),i._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new zt},normalMatrix:{value:new pi}}),this.matrix=new zt,this.matrixWorld=new zt,this.matrixAutoUpdate=Yt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Yt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Xy,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Hi.setFromAxisAngle(e,t),this.quaternion.multiply(Hi),this}rotateOnWorldAxis(e,t){return Hi.setFromAxisAngle(e,t),this.quaternion.premultiply(Hi),this}rotateX(e){return this.rotateOnAxis(jo,e)}rotateY(e){return this.rotateOnAxis(Uo,e)}rotateZ(e){return this.rotateOnAxis(Go,e)}translateOnAxis(e,t){return Vo.copy(e).applyQuaternion(this.quaternion),this.position.add(Vo.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(jo,e)}translateY(e){return this.translateOnAxis(Uo,e)}translateZ(e){return this.translateOnAxis(Go,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(jt.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?hn.copy(e):hn.set(e,t,i);const n=this.parent;this.updateWorldMatrix(!0,!1),vr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?jt.lookAt(vr,hn,this.up):jt.lookAt(hn,vr,this.up),this.quaternion.setFromRotationMatrix(jt),n&&(jt.extractRotation(n.matrixWorld),Hi.setFromRotationMatrix(jt),this.quaternion.premultiply(Hi.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(Ci("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(Wo),Ni.child=e,this.dispatchEvent(Ni),Ni.child=null):Ci("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Qy),ws.child=e,this.dispatchEvent(ws),ws.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),jt.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),jt.multiply(e.parent.matrixWorld)),e.applyMatrix4(jt),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Wo),Ni.child=e,this.dispatchEvent(Ni),Ni.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let i=0,n=this.children.length;i<n;i++){const a=this.children[i].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);const n=this.children;for(let s=0,a=n.length;s<a;s++)n[s].getObjectsByProperty(e,t,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(vr,e,Jy),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(vr,Zy,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,n=t.length;i<n;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,n=t.length;i<n;i++)t[i].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const e=this.pivot;if(e!==null){const t=e.x,i=e.y,n=e.z,s=this.matrix.elements;s[12]+=t-s[0]*t-s[4]*i-s[8]*n,s[13]+=i-s[1]*t-s[5]*i-s[9]*n,s[14]+=n-s[2]*t-s[6]*i-s[10]*n}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let i=0,n=t.length;i<n;i++)t[i].updateMatrixWorld(e)}updateWorldMatrix(e,t){const i=this.parent;if(e===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const n=this.children;for(let s=0,a=n.length;s<a;s++)n[s].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",i={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const n={};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.castShadow===!0&&(n.castShadow=!0),this.receiveShadow===!0&&(n.receiveShadow=!0),this.visible===!1&&(n.visible=!1),this.frustumCulled===!1&&(n.frustumCulled=!1),this.renderOrder!==0&&(n.renderOrder=this.renderOrder),this.static!==!1&&(n.static=this.static),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),this.pivot!==null&&(n.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(n.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(n.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(n.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),n.instanceInfo=this._instanceInfo.map(o=>({...o})),n.availableInstanceIds=this._availableInstanceIds.slice(),n.availableGeometryIds=this._availableGeometryIds.slice(),n.nextIndexStart=this._nextIndexStart,n.nextVertexStart=this._nextVertexStart,n.geometryCount=this._geometryCount,n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.matricesTexture=this._matricesTexture.toJSON(e),n.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(n.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(n.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(n.boundingBox=this.boundingBox.toJSON()));function s(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u<c;u++){const h=l[u];s(e.shapes,h)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),n.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let l=0,u=this.material.length;l<u;l++)o.push(s(e.materials,this.material[l]));n.material=o}else n.material=s(e.materials,this.material);if(this.children.length>0){n.children=[];for(let o=0;o<this.children.length;o++)n.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){n.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];n.animations.push(s(e.animations,l))}}if(t){const o=a(e.geometries),l=a(e.materials),u=a(e.textures),c=a(e.images),h=a(e.shapes),f=a(e.skeletons),m=a(e.animations),p=a(e.nodes);o.length>0&&(i.geometries=o),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),c.length>0&&(i.images=c),h.length>0&&(i.shapes=h),f.length>0&&(i.skeletons=f),m.length>0&&(i.animations=m),p.length>0&&(i.nodes=p)}return i.object=n,i;function a(o){const l=[];for(const u in o){const c=o[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),e.pivot!==null&&(this.pivot=e.pivot.clone()),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i<e.children.length;i++){const n=e.children[i];this.add(n.clone())}return this}}Yt.DEFAULT_UP=new D(0,1,0);Yt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Yt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const $u={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},ii={h:0,s:0,l:0},fn={h:0,s:0,l:0};function _s(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}class Gr{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Bt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ct.colorSpaceToWorking(this,t),this}setRGB(e,t,i,n=Ct.workingColorSpace){return this.r=e,this.g=t,this.b=i,Ct.colorSpaceToWorking(this,n),this}setHSL(e,t,i,n=Ct.workingColorSpace){if(e=Hy(e,1),t=ue(t,0,1),i=ue(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,a=2*i-s;this.r=_s(a,s,e+1/3),this.g=_s(a,s,e),this.b=_s(a,s,e-1/3)}return Ct.colorSpaceToWorking(this,n),this}setStyle(e,t=Bt){function i(s){s!==void 0&&parseFloat(s)<1&&Ye("Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=n[1],o=n[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:Ye("Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=n[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(s,16),t);Ye("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Bt){const i=$u[e.toLowerCase()];return i!==void 0?this.setHex(i,t):Ye("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Xt(e.r),this.g=Xt(e.g),this.b=Xt(e.b),this}copyLinearToSRGB(e){return this.r=ir(e.r),this.g=ir(e.g),this.b=ir(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Bt){return Ct.workingToColorSpace(Ke.copy(this),e),Math.round(ue(Ke.r*255,0,255))*65536+Math.round(ue(Ke.g*255,0,255))*256+Math.round(ue(Ke.b*255,0,255))}getHexString(e=Bt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ct.workingColorSpace){Ct.workingToColorSpace(Ke.copy(this),t);const i=Ke.r,n=Ke.g,s=Ke.b,a=Math.max(i,n,s),o=Math.min(i,n,s);let l,u;const c=(o+a)/2;if(o===a)l=0,u=0;else{const h=a-o;switch(u=c<=.5?h/(a+o):h/(2-a-o),a){case i:l=(n-s)/h+(n<s?6:0);break;case n:l=(s-i)/h+2;break;case s:l=(i-n)/h+4;break}l/=6}return e.h=l,e.s=u,e.l=c,e}getRGB(e,t=Ct.workingColorSpace){return Ct.workingToColorSpace(Ke.copy(this),t),e.r=Ke.r,e.g=Ke.g,e.b=Ke.b,e}getStyle(e=Bt){Ct.workingToColorSpace(Ke.copy(this),e);const t=Ke.r,i=Ke.g,n=Ke.b;return e!==Bt?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(n*255)})`}offsetHSL(e,t,i){return this.getHSL(ii),this.setHSL(ii.h+e,ii.s+t,ii.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(ii),e.getHSL(fn);const i=gs(ii.h,fn.h,t),n=gs(ii.s,fn.s,t),s=gs(ii.l,fn.l,t);return this.setHSL(i,n,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,i=this.g,n=this.b,s=e.elements;return this.r=s[0]*t+s[3]*i+s[6]*n,this.g=s[1]*t+s[4]*i+s[7]*n,this.b=s[2]*t+s[5]*i+s[8]*n,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Ke=new Gr;Gr.NAMES=$u;const St=new D,Ut=new D,Cs=new D,Gt=new D,Vi=new D,ji=new D,Ko=new D,As=new D,Ss=new D,Ms=new D,Bs=new jr,qs=new jr,ks=new jr;class kt{constructor(e=new D,t=new D,i=new D){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,n){n.subVectors(i,t),St.subVectors(e,t),n.cross(St);const s=n.lengthSq();return s>0?n.multiplyScalar(1/Math.sqrt(s)):n.set(0,0,0)}static getBarycoord(e,t,i,n,s){St.subVectors(n,t),Ut.subVectors(i,t),Cs.subVectors(e,t);const a=St.dot(St),o=St.dot(Ut),l=St.dot(Cs),u=Ut.dot(Ut),c=Ut.dot(Cs),h=a*u-o*o;if(h===0)return s.set(0,0,0),null;const f=1/h,m=(u*l-o*c)*f,p=(a*c-o*l)*f;return s.set(1-m-p,p,m)}static containsPoint(e,t,i,n){return this.getBarycoord(e,t,i,n,Gt)===null?!1:Gt.x>=0&&Gt.y>=0&&Gt.x+Gt.y<=1}static getInterpolation(e,t,i,n,s,a,o,l){return this.getBarycoord(e,t,i,n,Gt)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Gt.x),l.addScaledVector(a,Gt.y),l.addScaledVector(o,Gt.z),l)}static getInterpolatedAttribute(e,t,i,n,s,a){return Bs.setScalar(0),qs.setScalar(0),ks.setScalar(0),Bs.fromBufferAttribute(e,t),qs.fromBufferAttribute(e,i),ks.fromBufferAttribute(e,n),a.setScalar(0),a.addScaledVector(Bs,s.x),a.addScaledVector(qs,s.y),a.addScaledVector(ks,s.z),a}static isFrontFacing(e,t,i,n){return St.subVectors(i,t),Ut.subVectors(e,t),St.cross(Ut).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return St.subVectors(this.c,this.b),Ut.subVectors(this.a,this.b),St.cross(Ut).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return kt.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return kt.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,n,s){return kt.getInterpolation(e,this.a,this.b,this.c,t,i,n,s)}containsPoint(e){return kt.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return kt.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,n=this.b,s=this.c;let a,o;Vi.subVectors(n,i),ji.subVectors(s,i),As.subVectors(e,i);const l=Vi.dot(As),u=ji.dot(As);if(l<=0&&u<=0)return t.copy(i);Ss.subVectors(e,n);const c=Vi.dot(Ss),h=ji.dot(Ss);if(c>=0&&h<=c)return t.copy(n);const f=l*h-c*u;if(f<=0&&l>=0&&c<=0)return a=l/(l-c),t.copy(i).addScaledVector(Vi,a);Ms.subVectors(e,s);const m=Vi.dot(Ms),p=ji.dot(Ms);if(p>=0&&m<=p)return t.copy(s);const g=m*u-l*p;if(g<=0&&u>=0&&p<=0)return o=u/(u-p),t.copy(i).addScaledVector(ji,o);const y=c*p-m*h;if(y<=0&&h-c>=0&&m-p>=0)return Ko.subVectors(s,n),o=(h-c)/(h-c+(m-p)),t.copy(n).addScaledVector(Ko,o);const w=1/(y+g+f);return a=g*w,o=f*w,t.copy(i).addScaledVector(Vi,a).addScaledVector(ji,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class Wr{constructor(e=new D(1/0,1/0,1/0),t=new D(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(Mt.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Mt.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=Mt.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const s=i.getAttribute("position");if(t===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let a=0,o=s.count;a<o;a++)e.isMesh===!0?e.getVertexPosition(a,Mt):Mt.fromBufferAttribute(s,a),Mt.applyMatrix4(e.matrixWorld),this.expandByPoint(Mt);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),pn.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),pn.copy(i.boundingBox)),pn.applyMatrix4(e.matrixWorld),this.union(pn)}const n=e.children;for(let s=0,a=n.length;s<a;s++)this.expandByObject(n[s],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Mt),Mt.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(br),mn.subVectors(this.max,br),Ui.subVectors(e.a,br),Gi.subVectors(e.b,br),Wi.subVectors(e.c,br),ri.subVectors(Gi,Ui),ni.subVectors(Wi,Gi),xi.subVectors(Ui,Wi);let t=[0,-ri.z,ri.y,0,-ni.z,ni.y,0,-xi.z,xi.y,ri.z,0,-ri.x,ni.z,0,-ni.x,xi.z,0,-xi.x,-ri.y,ri.x,0,-ni.y,ni.x,0,-xi.y,xi.x,0];return!Fs(t,Ui,Gi,Wi,mn)||(t=[1,0,0,0,1,0,0,0,1],!Fs(t,Ui,Gi,Wi,mn))?!1:(gn.crossVectors(ri,ni),t=[gn.x,gn.y,gn.z],Fs(t,Ui,Gi,Wi,mn))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Mt).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Mt).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Wt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Wt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Wt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Wt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Wt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Wt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Wt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Wt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Wt),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const Wt=[new D,new D,new D,new D,new D,new D,new D,new D],Mt=new D,pn=new Wr,Ui=new D,Gi=new D,Wi=new D,ri=new D,ni=new D,xi=new D,br=new D,mn=new D,gn=new D,wi=new D;function Fs(r,e,t,i,n){for(let s=0,a=r.length-3;s<=a;s+=3){wi.fromArray(r,s);const o=n.x*Math.abs(wi.x)+n.y*Math.abs(wi.y)+n.z*Math.abs(wi.z),l=e.dot(wi),u=t.dot(wi),c=i.dot(wi);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>o)return!1}return!0}const Fe=new D,yn=new Ot;let ev=0;class rr{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:ev++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=zo,this.updateRanges=[],this.gpuType=Ry,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let n=0,s=this.itemSize;n<s;n++)this.array[e+n]=t.array[i+n];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)yn.fromBufferAttribute(this,t),yn.applyMatrix3(e),this.setXY(t,yn.x,yn.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)Fe.fromBufferAttribute(this,t),Fe.applyMatrix3(e),this.setXYZ(t,Fe.x,Fe.y,Fe.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Fe.fromBufferAttribute(this,t),Fe.applyMatrix4(e),this.setXYZ(t,Fe.x,Fe.y,Fe.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Fe.fromBufferAttribute(this,t),Fe.applyNormalMatrix(e),this.setXYZ(t,Fe.x,Fe.y,Fe.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Fe.fromBufferAttribute(this,t),Fe.transformDirection(e),this.setXYZ(t,Fe.x,Fe.y,Fe.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=yr(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=it(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=yr(t,this.array)),t}setX(e,t){return this.normalized&&(t=it(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=yr(t,this.array)),t}setY(e,t){return this.normalized&&(t=it(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=yr(t,this.array)),t}setZ(e,t){return this.normalized&&(t=it(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=yr(t,this.array)),t}setW(e,t){return this.normalized&&(t=it(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=it(t,this.array),i=it(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,n){return e*=this.itemSize,this.normalized&&(t=it(t,this.array),i=it(i,this.array),n=it(n,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,this}setXYZW(e,t,i,n,s){return e*=this.itemSize,this.normalized&&(t=it(t,this.array),i=it(i,this.array),n=it(n,this.array),s=it(s,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==zo&&(e.usage=this.usage),e}}class tv extends rr{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class iv extends rr{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class rv extends rr{constructor(e,t,i){super(new Float32Array(e),t,i)}}const nv=new Wr,xr=new D,Es=new D;class Lu{constructor(e=new D,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):nv.setFromPoints(e).getCenter(i);let n=0;for(let s=0,a=e.length;s<a;s++)n=Math.max(n,i.distanceToSquared(e[s]));return this.radius=Math.sqrt(n),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;xr.subVectors(e,this.center);const t=xr.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),n=(i-this.radius)*.5;this.center.addScaledVector(xr,n/i),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Es.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(xr.copy(e.center).add(Es)),this.expandByPoint(xr.copy(e.center).sub(Es))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}let sv=0;const ht=new zt,Os=new Yt,Ki=new D,ot=new Wr,wr=new Wr,Re=new D;class Ta extends es{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:sv++}),this.uuid=Nr(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(Ly(e)?iv:tv)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const s=new pi().getNormalMatrix(e);i.applyNormalMatrix(s),i.needsUpdate=!0}const n=this.attributes.tangent;return n!==void 0&&(n.transformDirection(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ht.makeRotationFromQuaternion(e),this.applyMatrix4(ht),this}rotateX(e){return ht.makeRotationX(e),this.applyMatrix4(ht),this}rotateY(e){return ht.makeRotationY(e),this.applyMatrix4(ht),this}rotateZ(e){return ht.makeRotationZ(e),this.applyMatrix4(ht),this}translate(e,t,i){return ht.makeTranslation(e,t,i),this.applyMatrix4(ht),this}scale(e,t,i){return ht.makeScale(e,t,i),this.applyMatrix4(ht),this}lookAt(e){return Os.lookAt(e),Os.updateMatrix(),this.applyMatrix4(Os.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ki).negate(),this.translate(Ki.x,Ki.y,Ki.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const i=[];for(let n=0,s=e.length;n<s;n++){const a=e[n];i.push(a.x,a.y,a.z||0)}this.setAttribute("position",new rv(i,3))}else{const i=Math.min(e.length,t.count);for(let n=0;n<i;n++){const s=e[n];t.setXYZ(n,s.x,s.y,s.z||0)}e.length>t.count&&Ye("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Wr);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){Ci("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new D(-1/0,-1/0,-1/0),new D(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,n=t.length;i<n;i++){const s=t[i];ot.setFromBufferAttribute(s),this.morphTargetsRelative?(Re.addVectors(this.boundingBox.min,ot.min),this.boundingBox.expandByPoint(Re),Re.addVectors(this.boundingBox.max,ot.max),this.boundingBox.expandByPoint(Re)):(this.boundingBox.expandByPoint(ot.min),this.boundingBox.expandByPoint(ot.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&Ci('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Lu);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){Ci("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new D,1/0);return}if(e){const i=this.boundingSphere.center;if(ot.setFromBufferAttribute(e),t)for(let s=0,a=t.length;s<a;s++){const o=t[s];wr.setFromBufferAttribute(o),this.morphTargetsRelative?(Re.addVectors(ot.min,wr.min),ot.expandByPoint(Re),Re.addVectors(ot.max,wr.max),ot.expandByPoint(Re)):(ot.expandByPoint(wr.min),ot.expandByPoint(wr.max))}ot.getCenter(i);let n=0;for(let s=0,a=e.count;s<a;s++)Re.fromBufferAttribute(e,s),n=Math.max(n,i.distanceToSquared(Re));if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s],l=this.morphTargetsRelative;for(let u=0,c=o.count;u<c;u++)Re.fromBufferAttribute(o,u),l&&(Ki.fromBufferAttribute(e,u),Re.add(Ki)),n=Math.max(n,i.distanceToSquared(Re))}this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&Ci('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){Ci("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=t.position,n=t.normal,s=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new rr(new Float32Array(4*i.count),4));const a=this.getAttribute("tangent"),o=[],l=[];for(let T=0;T<i.count;T++)o[T]=new D,l[T]=new D;const u=new D,c=new D,h=new D,f=new Ot,m=new Ot,p=new Ot,g=new D,y=new D;function w(T,k,$){u.fromBufferAttribute(i,T),c.fromBufferAttribute(i,k),h.fromBufferAttribute(i,$),f.fromBufferAttribute(s,T),m.fromBufferAttribute(s,k),p.fromBufferAttribute(s,$),c.sub(u),h.sub(u),m.sub(f),p.sub(f);const N=1/(m.x*p.y-p.x*m.y);isFinite(N)&&(g.copy(c).multiplyScalar(p.y).addScaledVector(h,-m.y).multiplyScalar(N),y.copy(h).multiplyScalar(m.x).addScaledVector(c,-p.x).multiplyScalar(N),o[T].add(g),o[k].add(g),o[$].add(g),l[T].add(y),l[k].add(y),l[$].add(y))}let x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let T=0,k=x.length;T<k;++T){const $=x[T],N=$.start,U=$.count;for(let Q=N,ie=N+U;Q<ie;Q+=3)w(e.getX(Q+0),e.getX(Q+1),e.getX(Q+2))}const b=new D,C=new D,q=new D,M=new D;function B(T){q.fromBufferAttribute(n,T),M.copy(q);const k=o[T];b.copy(k),b.sub(q.multiplyScalar(q.dot(k))).normalize(),C.crossVectors(M,k);const N=C.dot(l[T])<0?-1:1;a.setXYZW(T,b.x,b.y,b.z,N)}for(let T=0,k=x.length;T<k;++T){const $=x[T],N=$.start,U=$.count;for(let Q=N,ie=N+U;Q<ie;Q+=3)B(e.getX(Q+0)),B(e.getX(Q+1)),B(e.getX(Q+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new rr(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let f=0,m=i.count;f<m;f++)i.setXYZ(f,0,0,0);const n=new D,s=new D,a=new D,o=new D,l=new D,u=new D,c=new D,h=new D;if(e)for(let f=0,m=e.count;f<m;f+=3){const p=e.getX(f+0),g=e.getX(f+1),y=e.getX(f+2);n.fromBufferAttribute(t,p),s.fromBufferAttribute(t,g),a.fromBufferAttribute(t,y),c.subVectors(a,s),h.subVectors(n,s),c.cross(h),o.fromBufferAttribute(i,p),l.fromBufferAttribute(i,g),u.fromBufferAttribute(i,y),o.add(c),l.add(c),u.add(c),i.setXYZ(p,o.x,o.y,o.z),i.setXYZ(g,l.x,l.y,l.z),i.setXYZ(y,u.x,u.y,u.z)}else for(let f=0,m=t.count;f<m;f+=3)n.fromBufferAttribute(t,f+0),s.fromBufferAttribute(t,f+1),a.fromBufferAttribute(t,f+2),c.subVectors(a,s),h.subVectors(n,s),c.cross(h),i.setXYZ(f+0,c.x,c.y,c.z),i.setXYZ(f+1,c.x,c.y,c.z),i.setXYZ(f+2,c.x,c.y,c.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)Re.fromBufferAttribute(e,t),Re.normalize(),e.setXYZ(t,Re.x,Re.y,Re.z)}toNonIndexed(){function e(o,l){const u=o.array,c=o.itemSize,h=o.normalized,f=new u.constructor(l.length*c);let m=0,p=0;for(let g=0,y=l.length;g<y;g++){o.isInterleavedBufferAttribute?m=l[g]*o.data.stride+o.offset:m=l[g]*c;for(let w=0;w<c;w++)f[p++]=u[m++]}return new rr(f,c,h)}if(this.index===null)return Ye("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Ta,i=this.index.array,n=this.attributes;for(const o in n){const l=n[o],u=e(l,i);t.setAttribute(o,u)}const s=this.morphAttributes;for(const o in s){const l=[],u=s[o];for(let c=0,h=u.length;c<h;c++){const f=u[c],m=e(f,i);l.push(m)}t.morphAttributes[o]=l}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let o=0,l=a.length;o<l;o++){const u=a[o];t.addGroup(u.start,u.count,u.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const u=i[l];e.data.attributes[l]=u.toJSON(e.data)}const n={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let h=0,f=u.length;h<f;h++){const m=u[h];c.push(m.toJSON(e.data))}c.length>0&&(n[l]=c,s=!0)}s&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const n=e.attributes;for(const u in n){const c=n[u];this.setAttribute(u,c.clone(t))}const s=e.morphAttributes;for(const u in s){const c=[],h=s[u];for(let f=0,m=h.length;f<m;f++)c.push(h[f].clone(t));this.morphAttributes[u]=c}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let u=0,c=a.length;u<c;u++){const h=a[u];this.addGroup(h.start,h.count,h.materialIndex)}const o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}let av=0;class ov extends es{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:av++}),this.uuid=Nr(),this.name="",this.type="Material",this.blending=Co,this.side=ia,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=So,this.blendDst=Mo,this.blendEquation=Ao,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Gr(0,0,0),this.blendAlpha=0,this.depthFunc=Bo,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Oo,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ri,this.stencilZFail=Ri,this.stencilZPass=Ri,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){Ye(`Material: parameter '${t}' has value of undefined.`);continue}const n=this[t];if(n===void 0){Ye(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Co&&(i.blending=this.blending),this.side!==ia&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==So&&(i.blendSrc=this.blendSrc),this.blendDst!==Mo&&(i.blendDst=this.blendDst),this.blendEquation!==Ao&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Bo&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Oo&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ri&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Ri&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Ri&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.allowOverride===!1&&(i.allowOverride=!1),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function n(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=n(e.textures),a=n(e.images);s.length>0&&(i.textures=s),a.length>0&&(i.images=a)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const n=t.length;i=new Array(n);for(let s=0;s!==n;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const Kt=new D,zs=new D,vn=new D,si=new D,Is=new D,bn=new D,Ts=new D;class lv{constructor(e=new D,t=new D(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Kt)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Kt.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Kt.copy(this.origin).addScaledVector(this.direction,t),Kt.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){zs.copy(e).add(t).multiplyScalar(.5),vn.copy(t).sub(e).normalize(),si.copy(this.origin).sub(zs);const s=e.distanceTo(t)*.5,a=-this.direction.dot(vn),o=si.dot(this.direction),l=-si.dot(vn),u=si.lengthSq(),c=Math.abs(1-a*a);let h,f,m,p;if(c>0)if(h=a*l-o,f=a*o-l,p=s*c,h>=0)if(f>=-p)if(f<=p){const g=1/c;h*=g,f*=g,m=h*(h+a*f+2*o)+f*(a*h+f+2*l)+u}else f=s,h=Math.max(0,-(a*f+o)),m=-h*h+f*(f+2*l)+u;else f=-s,h=Math.max(0,-(a*f+o)),m=-h*h+f*(f+2*l)+u;else f<=-p?(h=Math.max(0,-(-a*s+o)),f=h>0?-s:Math.min(Math.max(-s,-l),s),m=-h*h+f*(f+2*l)+u):f<=p?(h=0,f=Math.min(Math.max(-s,-l),s),m=f*(f+2*l)+u):(h=Math.max(0,-(a*s+o)),f=h>0?s:Math.min(Math.max(-s,-l),s),m=-h*h+f*(f+2*l)+u);else f=a>0?-s:s,h=Math.max(0,-(a*f+o)),m=-h*h+f*(f+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,h),n&&n.copy(zs).addScaledVector(vn,f),m}intersectSphere(e,t){Kt.subVectors(e.center,this.origin);const i=Kt.dot(this.direction),n=Kt.dot(Kt)-i*i,s=e.radius*e.radius;if(n>s)return null;const a=Math.sqrt(s-n),o=i-a,l=i+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,n,s,a,o,l;const u=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,f=this.origin;return u>=0?(i=(e.min.x-f.x)*u,n=(e.max.x-f.x)*u):(i=(e.max.x-f.x)*u,n=(e.min.x-f.x)*u),c>=0?(s=(e.min.y-f.y)*c,a=(e.max.y-f.y)*c):(s=(e.max.y-f.y)*c,a=(e.min.y-f.y)*c),i>a||s>n||((s>i||isNaN(i))&&(i=s),(a<n||isNaN(n))&&(n=a),h>=0?(o=(e.min.z-f.z)*h,l=(e.max.z-f.z)*h):(o=(e.max.z-f.z)*h,l=(e.min.z-f.z)*h),i>l||o>n)||((o>i||i!==i)&&(i=o),(l<n||n!==n)&&(n=l),n<0)?null:this.at(i>=0?i:n,t)}intersectsBox(e){return this.intersectBox(e,Kt)!==null}intersectTriangle(e,t,i,n,s){Is.subVectors(t,e),bn.subVectors(i,e),Ts.crossVectors(Is,bn);let a=this.direction.dot(Ts),o;if(a>0){if(n)return null;o=1}else if(a<0)o=-1,a=-a;else return null;si.subVectors(this.origin,e);const l=o*this.direction.dot(bn.crossVectors(si,bn));if(l<0)return null;const u=o*this.direction.dot(Is.cross(si));if(u<0||l+u>a)return null;const c=-o*si.dot(Ts);return c<0?null:this.at(c/a,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Hu extends ov{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Gr(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 Ur,this.combine=Iy,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Xo=new zt,_i=new lv,xn=new Lu,Yo=new D,wn=new D,_n=new D,Cn=new D,Ps=new D,An=new D,Jo=new D,Sn=new D;class uv extends Yt{constructor(e=new Ta,t=new Hu){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s<a;s++){const o=n[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}getVertexPosition(e,t){const i=this.geometry,n=i.attributes.position,s=i.morphAttributes.position,a=i.morphTargetsRelative;t.fromBufferAttribute(n,e);const o=this.morphTargetInfluences;if(s&&o){An.set(0,0,0);for(let l=0,u=s.length;l<u;l++){const c=o[l],h=s[l];c!==0&&(Ps.fromBufferAttribute(h,e),a?An.addScaledVector(Ps,c):An.addScaledVector(Ps.sub(t),c))}t.add(An)}return t}raycast(e,t){const i=this.geometry,n=this.material,s=this.matrixWorld;n!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),xn.copy(i.boundingSphere),xn.applyMatrix4(s),_i.copy(e.ray).recast(e.near),!(xn.containsPoint(_i.origin)===!1&&(_i.intersectSphere(xn,Yo)===null||_i.origin.distanceToSquared(Yo)>(e.far-e.near)**2))&&(Xo.copy(s).invert(),_i.copy(e.ray).applyMatrix4(Xo),!(i.boundingBox!==null&&_i.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,_i)))}_computeIntersections(e,t,i){let n;const s=this.geometry,a=this.material,o=s.index,l=s.attributes.position,u=s.attributes.uv,c=s.attributes.uv1,h=s.attributes.normal,f=s.groups,m=s.drawRange;if(o!==null)if(Array.isArray(a))for(let p=0,g=f.length;p<g;p++){const y=f[p],w=a[y.materialIndex],x=Math.max(y.start,m.start),b=Math.min(o.count,Math.min(y.start+y.count,m.start+m.count));for(let C=x,q=b;C<q;C+=3){const M=o.getX(C),B=o.getX(C+1),T=o.getX(C+2);n=Mn(this,w,e,i,u,c,h,M,B,T),n&&(n.faceIndex=Math.floor(C/3),n.face.materialIndex=y.materialIndex,t.push(n))}}else{const p=Math.max(0,m.start),g=Math.min(o.count,m.start+m.count);for(let y=p,w=g;y<w;y+=3){const x=o.getX(y),b=o.getX(y+1),C=o.getX(y+2);n=Mn(this,a,e,i,u,c,h,x,b,C),n&&(n.faceIndex=Math.floor(y/3),t.push(n))}}else if(l!==void 0)if(Array.isArray(a))for(let p=0,g=f.length;p<g;p++){const y=f[p],w=a[y.materialIndex],x=Math.max(y.start,m.start),b=Math.min(l.count,Math.min(y.start+y.count,m.start+m.count));for(let C=x,q=b;C<q;C+=3){const M=C,B=C+1,T=C+2;n=Mn(this,w,e,i,u,c,h,M,B,T),n&&(n.faceIndex=Math.floor(C/3),n.face.materialIndex=y.materialIndex,t.push(n))}}else{const p=Math.max(0,m.start),g=Math.min(l.count,m.start+m.count);for(let y=p,w=g;y<w;y+=3){const x=y,b=y+1,C=y+2;n=Mn(this,a,e,i,u,c,h,x,b,C),n&&(n.faceIndex=Math.floor(y/3),t.push(n))}}}}function dv(r,e,t,i,n,s,a,o){let l;if(e.side===Oy?l=i.intersectTriangle(a,s,n,!0,o):l=i.intersectTriangle(n,s,a,e.side===ia,o),l===null)return null;Sn.copy(o),Sn.applyMatrix4(r.matrixWorld);const u=t.ray.origin.distanceTo(Sn);return u<t.near||u>t.far?null:{distance:u,point:Sn.clone(),object:r}}function Mn(r,e,t,i,n,s,a,o,l,u){r.getVertexPosition(o,wn),r.getVertexPosition(l,_n),r.getVertexPosition(u,Cn);const c=dv(r,e,t,i,wn,_n,Cn,Jo);if(c){const h=new D;kt.getBarycoord(Jo,wn,_n,Cn,h),n&&(c.uv=kt.getInterpolatedAttribute(n,o,l,u,h,new Ot)),s&&(c.uv1=kt.getInterpolatedAttribute(s,o,l,u,h,new Ot)),a&&(c.normal=kt.getInterpolatedAttribute(a,o,l,u,h,new D),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const f={a:o,b:l,c:u,normal:new D,materialIndex:0};kt.getNormal(wn,_n,Cn,f.normal),c.face=f,c.barycoord=h}return c}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Tu}}));typeof window<"u"&&(window.__THREE__?Ye("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Tu);class cv extends uv{type="HighlightMesh";createTime;constructor(...e){super(...e),this.createTime=Date.now()}onBeforeRender(){const t=(Date.now()-this.createTime)/1e3,s=1+.07*Math.sin(2.5*t);this.scale.set(s,s,s)}}const Nu={scene:"i-carbon-web-services-container",perspectivecamera:"i-carbon-video",mesh:"i-carbon-cube",group:"i-carbon-group-objects",ambientlight:"i-carbon-light",directionallight:"i-carbon-light",spotlight:"i-iconoir-project-curve-3d",position:"i-iconoir-axes",rotation:"i-carbon-rotate-clockwise",scale:"i-iconoir-ellipse-3d-three-points",bone:"i-ph-bone",skinnedmesh:"carbon:3d-print-mesh"};function Zo(r){return{name:r.name,value:r,key:r.uuid,label:r.type,type:r.type,icon:Nu[r.type.toLowerCase()]||"i-carbon-cube",defaultExpanded:r.isScene,memorySize:Math.round(Fy(r)/1024),children:[]}}function hv(r){function e(i,n){i.children.forEach(s=>{if(s.type==="HighlightMesh")return;const a=Zo(s);n.children.push(a),e(s,a)})}const t=Zo(r);return e(r,t),t}function Yi(r,e="root",t="root",i=new WeakSet){const n=typeof r;if(r===null||n!=="object")return{label:e,type:n,path:t,value:r,defaultExpanded:t==="root"};if(i.has(r))return{label:e,type:"circular",path:t,value:"[Circular]",defaultExpanded:t==="root"};if(i.add(r),Array.isArray(r))return{label:e,type:"array",path:t,value:`Array[${r.length}]`,defaultExpanded:t==="root",children:r.map((o,l)=>Yi(o,String(l),`${t}[${l}]`,i))};const s=[],a=r.constructor?.name||"Object";if(a==="_Euler"){const o=r,l=["x","y","z","order"];for(const u of l){const c=o[u],h=t==="root"?u:`${t}.${u}`;s.push(Yi(c,u,h,i))}}else if(a==="Quaternion"){const o=r,l=["x","y","z","w"];for(const u of l){const c=o[u],h=t==="root"?u:`${t}.${u}`;s.push(Yi(c,u,h,i))}}else if(a==="_Vector3"){const o=r,l=["x","y","z"];for(const u of l){const c=o[u],h=t==="root"?u:`${t}.${u}`;s.push(Yi(c,u,h,i))}}else for(const o of Object.keys(r)){if(o.startsWith("_")||o.startsWith("$")||o==="__v_isRef"||o==="__v_isReactive"||o==="__v_isShallow"||o==="__v_raw"||o==="__v_isReadonly")continue;const l=r[o];if(typeof l=="function")continue;const u=t==="root"?o:`${t}.${o}`;s.push(Yi(l,o,u,i))}return{label:e,type:"object",path:t,value:a==="Euler"?"Euler":a==="Quaternion"?"Quaternion":a==="Vector3"?"Vector3":a,defaultExpanded:t==="root",children:s}}function fv(r){const e=new Hu({color:11003607,transparent:!0,opacity:.2,depthTest:!1,side:zy});return new cv(r.geometry.clone(),e)}const pv={key:1,class:"w-3 h-3 rounded-full border border-neutral-300 dark:border-neutral-600",style:{background:"linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57)"}},mv={key:2,class:"w-3 h-3 rounded-full border border-neutral-300 dark:border-neutral-600 bg-neutral-200 dark:bg-neutral-700"},gv=I({__name:"MaterialBadge",props:{material:{},displayValue:{}},setup(r){function e(s){return s!==null&&typeof s=="object"&&s.constructor?.name?.includes("Material")}function t(s){if(!s||typeof s!="object")return null;if("color"in s&&s.color&&typeof s.color=="object"){const a=s.color;if("getHexString"in a&&typeof a.getHexString=="function")return`#${a.getHexString()}`}return null}function i(s){return s!==null&&typeof s=="object"&&(s.constructor?.name==="MeshNormalMaterial"||s.constructor?.name==="MeshStandardMaterial"||s.constructor?.name==="MeshBasicMaterial")}function n(s){return typeof s=="boolean"?"text-blue-500 dark:text-blue-400":typeof s=="number"?"text-primary-500":typeof s=="string"?"text-red-500 dark:text-red-400":typeof s>"u"?"text-neutral-400 dark:text-neutral-500":"text-neutral-600 dark:text-neutral-400"}return(s,a)=>{const o=fi;return e(r.material)?(v(),A(o,{key:0,variant:"soft",color:"neutral",size:"sm",class:"flex items-center gap-1 ml-1"},{default:_(()=>[t(r.material)?(v(),V("div",{key:0,class:"w-3 h-3 rounded-full border border-neutral-300 dark:border-neutral-600",style:Et({backgroundColor:t(r.material)})},null,4)):i(r.material)?(v(),V("div",pv)):(v(),V("div",mv)),P("span",{class:O(n(r.material))},ee(r.displayValue),3)]),_:1})):R("",!0)}}}),yv=Object.assign(gv,{__name:"InspectorMaterialBadge"}),vv=I({__name:"GeometryBadge",props:{geometry:{},displayValue:{}},setup(r){const e={box:"i-carbon-cube",sphere:"i-tabler-circle",plane:"i-tabler-square",cylinder:"i-tabler-cylinder",cone:"i-tabler-cone",torus:"i-tabler-circle-dashed",circle:"i-tabler-circle-filled",ring:"i-tabler-circle",dodecahedron:"i-carbon-polygon",icosahedron:"i-carbon-polygon",octahedron:"i-carbon-polygon",tetrahedron:"i-carbon-polygon",tube:"i-tabler-pipe",extrude:"i-tabler-box",lathe:"i-tabler-rotate-3d"};function t(s){return s!==null&&typeof s=="object"&&s.constructor?.name?.includes("Geometry")}function i(s){if(!s||typeof s!="object")return"i-carbon-cube";const o=(s.constructor?.name?.toLowerCase()||"").replace(/geometry$/,"").replace(/^_+/,"");return e[o]||"i-carbon-cube"}function n(s){return typeof s=="boolean"?"text-blue-500 dark:text-blue-400":typeof s=="number"?"text-primary-500":typeof s=="string"?"text-red-500 dark:text-red-400":typeof s>"u"?"text-neutral-400 dark:text-neutral-500":"text-neutral-600 dark:text-neutral-400"}return(s,a)=>{const o=Se,l=fi;return t(r.geometry)?(v(),A(l,{key:0,variant:"soft",color:"neutral",size:"sm",class:"flex items-center gap-1 ml-1"},{default:_(()=>[E(o,{name:i(r.geometry),class:"w-3 h-3 text-neutral-600"},null,8,["name"]),P("span",{class:O(n(r.geometry))},ee(r.displayValue),3)]),_:1})):R("",!0)}}}),bv=Object.assign(vv,{__name:"InspectorGeometryBadge"}),xv={class:"text-sm text-neutral-500 dark:text-neutral-400 pt-2 pb-8"},wv={class:"flex items-center gap-1 py-0.5 mb-4 hover:bg-neutral-50 dark:hover:bg-neutral-800 group"},_v={class:"text-neutral-600 dark:text-neutral-300 font-semibold"},Cv={class:"pl-5 flex flex-col gap-1"},Av={class:"flex items-center gap-1 min-w-0"},Sv={key:0,class:"flex items-center gap-1 ml-1"},Mv=I({__name:"Props",props:{object:{}},emits:["update-value"],setup(r,{emit:e}){const t=e,i=r,n=F(()=>Nu[i.object.type.toLowerCase()]||"i-carbon-cube"),s={PerspectiveCamera:["fov","position","rotation","far","near","aspect"],OrthographicCamera:["position","rotation","left","right","top","bottom","near","far"],DirectionalLight:["color","intensity","position"],PointLight:["color","intensity","position","distance","decay"],SpotLight:["color","intensity","position","target","angle","penumbra"],AmbientLight:["color","intensity"],Mesh:["position","rotation","scale","material","geometry","visible"],SkinnedMesh:["position","rotation","scale","material","geometry","skeleton"],Group:["position","rotation","scale","visible"],Object3D:["position","rotation","scale","visible"],Scene:["background","environment","fog"]};function a(p,g){return g&&typeof g=="object"&&"r"in g&&"g"in g&&"b"in g&&"getHexString"in g?`#${g.getHexString()}`:g}const o=F(()=>{const p=i.object.type;return(s[p]||["position","rotation","scale"]).map(y=>{const w=l(i.object,y);return{key:y,value:a(y,w),displayValue:u(y,w)}}).filter(y=>y.value!==void 0)});function l(p,g){return g.split(".").reduce((y,w)=>y&&typeof y=="object"&&w in y?y[w]:void 0,p)}function u(p,g){return g==null?"undefined":c(g)?"vector":h(g)?g.constructor?.name||"Material":f(g)?(g.constructor?.name||"Geometry").replace(/Geometry$/,"").replace(/^_+/,""):g&&typeof g=="object"&&"r"in g&&"g"in g&&"b"in g&&"getHexString"in g?`#${g.getHexString()}`:typeof g=="number"?Number.isInteger(g)?g.toString():g.toFixed(2):typeof g=="boolean"?g?"true":"false":typeof g=="object"?g.constructor?.name||"Object":String(g)}function c(p){return p!==null&&typeof p=="object"&&"x"in p&&"y"in p&&"z"in p&&typeof p.x=="number"&&typeof p.y=="number"&&typeof p.z=="number"}function h(p){return p!==null&&typeof p=="object"&&p.constructor?.name?.includes("Material")}function f(p){return p!==null&&typeof p=="object"&&p.constructor?.name?.includes("Geometry")}function m(p){return typeof p=="boolean"?"text-blue-500 dark:text-blue-400":typeof p=="number"?"text-green-500 dark:text-green-400":typeof p=="string"?"text-red-500 dark:text-red-400":typeof p>"u"?"text-neutral-400 dark:text-neutral-500":"text-neutral-600 dark:text-neutral-400"}return(p,g)=>{const y=Se,w=fi,x=Wg,b=ut,C=Sy,q=ku;return v(),V("div",xv,[P("div",wv,[E(y,{name:n.value,class:"w-4 h-4 text-neutral-600 dark:text-neutral-400 flex-shrink-0"},null,8,["name"]),P("span",_v,ee(r.object.type),1),r.object.name?(v(),A(w,{key:0,variant:"soft",size:"xs",class:"ml-2"},{default:_(()=>[de(ee(r.object.name),1)]),_:1})):R("",!0)]),P("div",Cv,[(v(!0),V(xe,null,Xe(o.value,M=>(v(),V("div",{key:M.key,class:"flex items-center justify-between py-0.5 hover:bg-neutral-50 dark:hover:bg-neutral-800 group"},[P("div",Av,[P("span",null,ee(M.key)+" :",1),c(M.value)?(v(),V("div",Sv,[E(x,{modelValue:M.value.x,"onUpdate:modelValue":[B=>M.value.x=B,B=>t("update-value",M.key+".x",B)]},null,8,["modelValue","onUpdate:modelValue"]),E(x,{modelValue:M.value.y,"onUpdate:modelValue":[B=>M.value.y=B,B=>t("update-value",M.key+".y",B)]},null,8,["modelValue","onUpdate:modelValue"]),E(x,{modelValue:M.value.z,"onUpdate:modelValue":[B=>M.value.z=B,B=>t("update-value",M.key+".z",B)]},null,8,["modelValue","onUpdate:modelValue"])])):h(M.value)?(v(),A(yv,{key:1,material:M.value,"display-value":M.displayValue},null,8,["material","display-value"])):f(M.value)?(v(),A(bv,{key:2,geometry:M.value,"display-value":M.displayValue},null,8,["geometry","display-value"])):M.key==="visible"?(v(),A(b,{key:3,size:"xs",class:"ml-1 mr-1",variant:"soft",icon:M.value?"i-lucide-eye":"i-lucide-eye-closed",onClick:()=>t("update-value",M.key,!M.value)},null,8,["icon","onClick"])):M.key==="color"?(v(),A(C,{key:4,modelValue:M.value,"onUpdate:modelValue":[B=>M.value=B,B=>t("update-value",M.key,B)]},null,8,["modelValue","onUpdate:modelValue"])):typeof M.value=="number"?(v(),A(x,{key:5,modelValue:M.value,"onUpdate:modelValue":[B=>M.value=B,B=>t("update-value",M.key,B)],class:"ml-1"},null,8,["modelValue","onUpdate:modelValue"])):(v(),V("span",{key:6,class:O([m(M.value),"ml-1"])},ee(M.displayValue),3))]),P("div",{class:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",onClick:g[0]||(g[0]=fe(()=>{},["stop"]))},[E(q,{size:"xs",items:[{label:"Copy Value",icon:"i-lucide:copy",onSelect:()=>d(Eu)(M.value)},M.displayValue==="vector"&&{label:"Copy as prop",icon:"i-material-symbols:data-array",onSelect:()=>d(Fu)({path:M.key,value:Object.values(M.value)})},M.displayValue==="vector"&&M.key==="rotation"&&{label:"Copy as Euler",icon:"i-lucide:rotate-3d",onSelect:()=>d(zu)({children:[{label:"x",value:M.value.x},{label:"y",value:M.value.y},{label:"z",value:M.value.z},{label:"order",value:M.value.order||"XYZ"}]})},M.displayValue==="vector"&&M.key!=="rotation"&&{label:"Copy as Vector3",icon:"i-lucide:pen-line",onSelect:()=>d(Ou)({children:Object.values(M.value).map(B=>({value:B}))})},M.displayValue==="vector"&&M.key==="quaternion"&&{label:"Copy as Quaternion",icon:"i-lucide:rotate-3d",onSelect:()=>d(Iu)({children:[{label:"x",value:M.value.x},{label:"y",value:M.value.y},{label:"z",value:M.value.z},{label:"w",value:M.value.w||1}]})}].filter(Boolean),ui:{content:"w-48"}},{default:_(()=>[E(b,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-ellipsis-vertical",title:"Copy value"})]),_:1},8,["items"])])]))),128))])])}}}),Bv=Object.assign(Mv,{__name:"InspectorProps"}),qv={slots:{root:"flex items-center align-center text-center",border:"",container:"font-medium text-default flex",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xs",label:"text-sm"},variants:{color:{primary:{border:"border-primary"},secondary:{border:"border-secondary"},success:{border:"border-success"},info:{border:"border-info"},warning:{border:"border-warning"},error:{border:"border-error"},neutral:{border:"border-default"}},orientation:{horizontal:{root:"w-full flex-row",border:"w-full",container:"mx-3 whitespace-nowrap"},vertical:{root:"h-full flex-col",border:"h-full",container:"my-2"}},size:{xs:"",sm:"",md:"",lg:"",xl:""},type:{solid:{border:"border-solid"},dashed:{border:"border-dashed"},dotted:{border:"border-dotted"}}},compoundVariants:[{orientation:"horizontal",size:"xs",class:{border:"border-t"}},{orientation:"horizontal",size:"sm",class:{border:"border-t-[2px]"}},{orientation:"horizontal",size:"md",class:{border:"border-t-[3px]"}},{orientation:"horizontal",size:"lg",class:{border:"border-t-[4px]"}},{orientation:"horizontal",size:"xl",class:{border:"border-t-[5px]"}},{orientation:"vertical",size:"xs",class:{border:"border-s"}},{orientation:"vertical",size:"sm",class:{border:"border-s-[2px]"}},{orientation:"vertical",size:"md",class:{border:"border-s-[3px]"}},{orientation:"vertical",size:"lg",class:{border:"border-s-[4px]"}},{orientation:"vertical",size:"xl",class:{border:"border-s-[5px]"}}],defaultVariants:{color:"neutral",size:"xs",type:"solid"}},kv={__name:"USeparator",props:{as:{type:null,required:!1},label:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},size:{type:null,required:!1},type:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},class:{type:null,required:!1},ui:{type:null,required:!1},decorative:{type:Boolean,required:!1}},setup(r){const e=r,t=Ze(),i=Ie(),n=De("separator",e),s=Qt(It(e,"as","decorative","orientation")),a=F(()=>le({extend:le(qv),...i.ui?.separator||{}})({color:e.color,orientation:e.orientation,size:e.size,type:e.type}));return(o,l)=>(v(),A(d(_m),H(d(s),{"data-slot":"root",class:a.value.root({class:[d(n)?.root,e.class]})}),{default:_(()=>[P("div",{"data-slot":"border",class:O(a.value.border({class:d(n)?.border}))},null,2),r.label||r.icon||r.avatar||t.default?(v(),V(xe,{key:0},[P("div",{"data-slot":"container",class:O(a.value.container({class:d(n)?.container}))},[S(o.$slots,"default",{ui:a.value},()=>[r.label?(v(),V("span",{key:0,"data-slot":"label",class:O(a.value.label({class:d(n)?.label}))},ee(r.label),3)):r.icon?(v(),A(Se,{key:1,name:r.icon,"data-slot":"icon",class:O(a.value.icon({class:d(n)?.icon}))},null,8,["name","class"])):r.avatar?(v(),A(cr,H({key:2,size:d(n)?.avatarSize||a.value.avatarSize()},r.avatar,{"data-slot":"avatar",class:a.value.avatar({class:d(n)?.avatar})}),null,16,["size","class"])):R("",!0)])],2),P("div",{"data-slot":"border",class:O(a.value.border({class:d(n)?.border}))},null,2)],64)):R("",!0)]),_:3},16,["class"]))}},Fv={slots:{root:"relative flex items-start",container:"flex items-center",base:"rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-2 focus-visible:outline-offset-2",indicator:"flex items-center justify-center size-full text-inverted",icon:"shrink-0 size-full",wrapper:"w-full",label:"block font-medium text-default",description:"text-muted"},variants:{color:{primary:{base:"focus-visible:outline-primary",indicator:"bg-primary"},secondary:{base:"focus-visible:outline-secondary",indicator:"bg-secondary"},success:{base:"focus-visible:outline-success",indicator:"bg-success"},info:{base:"focus-visible:outline-info",indicator:"bg-info"},warning:{base:"focus-visible:outline-warning",indicator:"bg-warning"},error:{base:"focus-visible:outline-error",indicator:"bg-error"},neutral:{base:"focus-visible:outline-inverted",indicator:"bg-inverted"}},variant:{list:{root:""},card:{root:"border border-muted rounded-lg"}},indicator:{start:{root:"flex-row",wrapper:"ms-2"},end:{root:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{base:"size-3",container:"h-4",wrapper:"text-xs"},sm:{base:"size-3.5",container:"h-4",wrapper:"text-xs"},md:{base:"size-4",container:"h-5",wrapper:"text-sm"},lg:{base:"size-4.5",container:"h-5",wrapper:"text-sm"},xl:{base:"size-5",container:"h-6",wrapper:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},disabled:{true:{root:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}},checked:{true:""}},compoundVariants:[{size:"xs",variant:"card",class:{root:"p-2.5"}},{size:"sm",variant:"card",class:{root:"p-3"}},{size:"md",variant:"card",class:{root:"p-3.5"}},{size:"lg",variant:"card",class:{root:"p-4"}},{size:"xl",variant:"card",class:{root:"p-4.5"}},{color:"primary",variant:"card",class:{root:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{root:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{root:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{root:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{root:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{root:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{root:"has-data-[state=checked]:border-inverted"}},{variant:"card",disabled:!0,class:{root:"cursor-not-allowed"}}],defaultVariants:{size:"md",color:"primary",variant:"list",indicator:"start"}},Ev=Object.assign({inheritAttrs:!1},{__name:"UCheckbox",props:kn({as:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},indicator:{type:null,required:!1},icon:{type:null,required:!1},indeterminateIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},name:{type:String,required:!1},value:{type:null,required:!1},id:{type:String,required:!1},defaultValue:{type:[Boolean,String],required:!1}},{modelValue:{type:[Boolean,String],default:void 0},modelModifiers:{}}),emits:kn(["change"],["update:modelValue"]),setup(r,{emit:e}){const t=r,i=Ze(),n=e,s=ua(r,"modelValue",{type:[Boolean,String],default:void 0}),a=Ie(),o=De("checkbox",t),l=Qt(It(t,"required","value","defaultValue")),{id:u,emitFormChange:c,emitFormInput:h,size:f,color:m,name:p,disabled:g,ariaAttrs:y}=ca(t),w=u.value??il(),x=_d(),b=F(()=>{const{"data-state":M,...B}=x;return B}),C=F(()=>le({extend:le(Fv),...a.ui?.checkbox||{}})({size:f.value,color:m.value,variant:t.variant,indicator:t.indicator,required:t.required,disabled:g.value}));function q(M){const B=new Event("change",{target:{value:M}});n("change",B),c(),h()}return(M,B)=>(v(),A(d(ne),{as:!r.variant||r.variant==="list"?r.as:d(lo),"data-slot":"root",class:O(C.value.root({class:[d(o)?.root,t.class]}))},{default:_(()=>[P("div",{"data-slot":"container",class:O(C.value.container({class:d(o)?.container}))},[E(d(Tc),H({id:d(w)},{...d(l),...b.value,...d(y)},{modelValue:s.value,"onUpdate:modelValue":[B[0]||(B[0]=T=>s.value=T),q],name:d(p),disabled:d(g),"data-slot":"base",class:C.value.base({class:d(o)?.base})}),{default:_(({modelValue:T})=>[E(d(Dc),{"data-slot":"indicator",class:O(C.value.indicator({class:d(o)?.indicator}))},{default:_(()=>[T==="indeterminate"?(v(),A(Se,{key:0,name:r.indeterminateIcon||d(a).ui.icons.minus,"data-slot":"icon",class:O(C.value.icon({class:d(o)?.icon}))},null,8,["name","class"])):(v(),A(Se,{key:1,name:r.icon||d(a).ui.icons.check,"data-slot":"icon",class:O(C.value.icon({class:d(o)?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","modelValue","name","disabled","class"])],2),r.label||i.label||r.description||i.description?(v(),V("div",{key:0,"data-slot":"wrapper",class:O(C.value.wrapper({class:d(o)?.wrapper}))},[r.label||i.label?(v(),A(lr(!r.variant||r.variant==="list"?d(lo):"p"),{key:0,for:d(w),"data-slot":"label",class:O(C.value.label({class:d(o)?.label}))},{default:_(()=>[S(M.$slots,"label",{label:r.label},()=>[de(ee(r.label),1)])]),_:3},8,["for","class"])):R("",!0),r.description||i.description?(v(),V("p",{key:1,"data-slot":"description",class:O(C.value.description({class:d(o)?.description}))},[S(M.$slots,"description",{description:r.description},()=>[de(ee(r.description),1)])],2)):R("",!0)],2)):R("",!0)]),_:3},8,["as","class"]))}}),Ov={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 appearance-none placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},size:{xs:{base:"px-2 py-1 text-sm/4 gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-sm/4 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-base/5 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-base/5 gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},zv=["id","type","value","name","placeholder","disabled","required","autocomplete"],Iv=Object.assign({inheritAttrs:!1},{__name:"UInput",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},type:{type:null,required:!1,default:"text"},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autocomplete:{type:[String,Object],required:!1,default:"off"},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["update:modelValue","blur","change"],setup(r,{expose:e,emit:t}){const i=r,n=t,s=Ze(),a=Je(i,"modelValue",n,{defaultValue:i.defaultValue}),o=Ie(),l=De("input",i),{emitFormBlur:u,emitFormInput:c,emitFormChange:h,size:f,color:m,id:p,name:g,highlight:y,disabled:w,emitFormFocus:x,ariaAttrs:b}=ca(i,{deferInputValidation:!0}),{orientation:C,size:q}=da(i),{isLeading:M,isTrailing:B,leadingIconName:T,trailingIconName:k}=cl(i),$=F(()=>q.value||f.value),N=F(()=>le({extend:le(Ov),...o.ui?.input||{}})({type:i.type,color:m.value,variant:i.variant,size:$?.value,loading:i.loading,highlight:y.value,fixed:i.fixed,leading:M.value||!!i.avatar||!!s.leading,trailing:B.value||!!s.trailing,fieldGroup:C.value})),U=hl("inputRef");function Q(K){i.modelModifiers?.trim&&(typeof K=="string"||K===null||K===void 0)&&(K=K?.trim()??null),(i.modelModifiers?.number||i.type==="number")&&(K=Cd(K)),i.modelModifiers?.nullable&&(K||=null),i.modelModifiers?.optional&&!i.modelModifiers?.nullable&&K!==null&&(K||=void 0),a.value=K,c()}function ie(K){i.modelModifiers?.lazy||Q(K.target.value)}function X(K){const he=K.target.value;i.modelModifiers?.lazy&&Q(he),i.modelModifiers?.trim&&(K.target.value=he.trim()),h(),n("change",K)}function Y(K){u(),n("blur",K)}function ce(){i.autofocus&&U.value?.focus()}return Ge(()=>{setTimeout(()=>{ce()},i.autofocusDelay)}),e({inputRef:U}),(K,he)=>(v(),A(d(ne),{as:r.as,"data-slot":"root",class:O(N.value.root({class:[d(l)?.root,i.class]}))},{default:_(()=>[P("input",H({id:d(p),ref_key:"inputRef",ref:U,type:r.type,value:d(a),name:d(g),placeholder:r.placeholder,"data-slot":"base",class:N.value.base({class:d(l)?.base}),disabled:d(w),required:r.required,autocomplete:r.autocomplete},{...K.$attrs,...d(b)},{onInput:ie,onBlur:Y,onChange:X,onFocus:he[0]||(he[0]=(...te)=>d(x)&&d(x)(...te))}),null,16,zv),S(K.$slots,"default",{ui:N.value}),d(M)||r.avatar||s.leading?(v(),V("span",{key:0,"data-slot":"leading",class:O(N.value.leading({class:d(l)?.leading}))},[S(K.$slots,"leading",{ui:N.value},()=>[d(M)&&d(T)?(v(),A(Se,{key:0,name:d(T),"data-slot":"leadingIcon",class:O(N.value.leadingIcon({class:d(l)?.leadingIcon}))},null,8,["name","class"])):r.avatar?(v(),A(cr,H({key:1,size:d(l)?.leadingAvatarSize||N.value.leadingAvatarSize()},r.avatar,{"data-slot":"leadingAvatar",class:N.value.leadingAvatar({class:d(l)?.leadingAvatar})}),null,16,["size","class"])):R("",!0)])],2)):R("",!0),d(B)||s.trailing?(v(),V("span",{key:1,"data-slot":"trailing",class:O(N.value.trailing({class:d(l)?.trailing}))},[S(K.$slots,"trailing",{ui:N.value},()=>[d(k)?(v(),A(Se,{key:0,name:d(k),"data-slot":"trailingIcon",class:O(N.value.trailingIcon({class:d(l)?.trailingIcon}))},null,8,["name","class"])):R("",!0)])],2)):R("",!0)]),_:3},8,["as","class"]))}}),Tv={class:"font-mono text-xs text-neutral-500 dark:text-neutral-400"},Pv={key:1,class:"mr-1 w-4 h-4"},Dv={class:"flex items-center gap-1 flex-1 min-w-0"},Rv={class:"text-neutral-600 dark:text-neutral-300 font-semibold"},$v=I({__name:"Tree",props:{node:{},level:{default:0},selectedObject:{}},emits:["update-value"],setup(r,{emit:e}){const t=r,i=e,n=z(t.node.defaultExpanded??!1),s=z(null),a=()=>{n.value=!n.value},o=b=>typeof b=="boolean"?"text-blue-500 dark:text-blue-400":typeof b=="number"?"text-green-500 dark:text-green-400":typeof b=="string"?"text-red-500 dark:text-red-400":typeof b>"u"?"text-neutral-400 dark:text-neutral-500":"text-neutral-600 dark:text-neutral-400",l=b=>typeof b=="boolean"?b?"true":"false":typeof b=="number"?b.toString():typeof b=="string"?`"${b}"`:b===null?"null":typeof b>"u"?"undefined":"object",u=()=>{if(typeof t.node.value=="number"){const b=t.node.value+1;i("update-value",t.node.path,b)}},c=()=>{if(typeof t.node.value=="number"){const b=t.node.value-1;i("update-value",t.node.path,b)}},h=b=>{i("update-value",t.node.path,b)},f=()=>{const b=typeof t.node.value=="string"?t.node.value:JSON.stringify(t.node.value);s.value={path:t.node.path,value:b}},m=()=>{if(s.value)try{const{value:b}=s.value;let C=b;Number.isNaN(Number(b))?(b.toLowerCase()==="true"||b.toLowerCase()==="false")&&(C=b.toLowerCase()==="true"):C=Number(b),i("update-value",t.node.path,C)}catch(b){console.error("Failed to apply edit:",b)}finally{s.value=null}},p=()=>{s.value=null},g=b=>{b.key==="Enter"?m():b.key==="Escape"&&p()},y=F(()=>t.node.children&&t.node.children.length>0),w=F(()=>!y.value),x=F(()=>({paddingLeft:`${t.level*16}px`}));return(b,C)=>{const q=Se,M=ut,B=ku,T=Ev,k=Iv,$=pu,N=Vu;return v(),V("div",Tv,[P("div",{style:Et(x.value),class:O(["flex items-center py-0.5 hover:bg-neutral-50 dark:hover:bg-neutral-800 group",{"cursor-pointer":y.value}])},[y.value?(v(),V("div",{key:0,class:"mr-1 w-4 h-4 flex items-center justify-center",onClick:a},[E(q,{name:n.value?"i-tabler:caret-down-filled":"i-tabler:caret-right-filled",class:"w-3 h-3 text-neutral-400 dark:text-neutral-500"},null,8,["name"])])):(v(),V("div",Pv)),P("div",Dv,[r.node.type==="object"||r.node.type==="array"?(v(),V(xe,{key:0},[P("span",{class:"cursor-pointer select-none",onClick:C[0]||(C[0]=U=>y.value?a():void 0)},[de(ee(r.node.label)+" : ",1),P("span",Rv,ee(r.node.value),1)]),r.node.type!=="array"?(v(),A(B,{key:0,size:"xs",items:[{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>d(_o)(r.node.path)},{label:"Copy value as Array",icon:"i-material-symbols:data-array",onSelect:()=>d(qy)(r.node)},r.node.value==="_Vector3"?{label:"Copy value as Vector3",icon:"i-lucide:pen-line",onSelect:()=>d(Ou)(r.node)}:null,r.node.value==="_Euler"?{label:"Copy as Euler",icon:"i-lucide:rotate-3d",onSelect:()=>d(zu)(r.node)}:null,r.node.value==="_Quaternion"?{label:"Copy as Quaternion",icon:"i-lucide:rotate-3d",onSelect:()=>d(Iu)(r.node)}:null,{label:"Copy value as JSON",icon:"i-material-symbols:data-object",onSelect:()=>d(ky)(r.node)},r.node.value==="_Vector3"||r.node.value==="_Euler"||r.node.value==="_Quaternion"?{label:"Copy as Prop",icon:"i-lucide:code",onSelect:()=>d(By)(r.node)}:null].filter(Boolean),ui:{content:"w-48"}},{default:_(()=>[E(M,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-ellipsis-vertical",title:"Copy value"})]),_:1},8,["items"])):R("",!0)],64)):(v(),V(xe,{key:1},[P("span",null,ee(r.node.label)+" :",1),typeof r.node.value=="boolean"?(v(),A(T,{key:0,"model-value":r.node.value,size:"xs","onUpdate:modelValue":h,onClick:C[1]||(C[1]=fe(()=>{},["stop"]))},null,8,["model-value"])):s.value?.path===r.node.path&&typeof r.node.value!="number"&&typeof r.node.value!="boolean"?(v(),A(k,{key:1,modelValue:s.value.value,"onUpdate:modelValue":C[2]||(C[2]=U=>s.value.value=U),size:"xs",class:"w-20",variant:"soft",onKeydown:fe(g,["stop"]),onBlur:m,onFocus:C[3]||(C[3]=U=>U.target?.select()),onClick:C[4]||(C[4]=fe(()=>{},["stop"]))},null,8,["modelValue"])):s.value?.path===r.node.path&&typeof r.node.value=="number"?(v(),A($,{key:2,modelValue:s.value.value,"onUpdate:modelValue":C[5]||(C[5]=U=>s.value.value=U),size:"xs",variant:"subtle",orientation:"vertical","format-options":{minimumFractionDigits:0,maximumFractionDigits:2},class:"w-20",onKeydown:fe(g,["stop"]),onBlur:m,onFocus:C[6]||(C[6]=U=>U.target?.select()),onClick:C[7]||(C[7]=fe(()=>{},["stop"]))},null,8,["modelValue"])):typeof r.node.value!="boolean"?(v(),V("span",{key:3,class:O([o(r.node.value),"cursor-pointer hover:bg-neutral-100 dark:hover:bg-neutral-800 px-1 py-0.5 rounded"]),onClick:fe(f,["stop"])},ee(l(r.node.value)),3)):R("",!0)],64)),w.value?(v(),V("div",{key:2,class:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",onClick:C[8]||(C[8]=fe(()=>{},["stop"]))},[typeof r.node.value=="number"?(v(),V(xe,{key:0},[E(M,{size:"xs",variant:"ghost",color:"neutral",icon:"i-tabler:minus",title:"Decrease value",onClick:fe(c,["stop"])}),E(M,{size:"xs",variant:"ghost",color:"neutral",icon:"i-tabler:plus",title:"Increase value",onClick:fe(u,["stop"])})],64)):R("",!0),E(B,{size:"xs",items:[{label:"Copy Value",icon:"i-lucide:copy",onSelect:()=>d(Eu)(r.node.value)},{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>d(_o)(r.node.path)},{label:"Copy as prop",icon:"i-lucide:pen-line",onSelect:()=>d(Fu)(r.node)}],ui:{content:"w-48"}},{default:_(()=>[E(M,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-ellipsis-vertical",title:"Copy value"})]),_:1},8,["items"])])):R("",!0)])],6),y.value&&n.value?(v(!0),V(xe,{key:0},Xe(r.node.children,U=>(v(),A(N,{key:`${U.path}-${U.label}`,node:U,level:r.level+1,"selected-object":r.selectedObject,onUpdateValue:C[9]||(C[9]=(Q,ie)=>i("update-value",Q,ie))},null,8,["node","level","selected-object"]))),128)):R("",!0)])}}}),Vu=Object.assign($v,{__name:"InspectorTree"});function Lv(r){return rl()?(nl(r),!0):!1}function Hv(r){let e=0,t,i;const n=()=>{e-=1,i&&e<=0&&(i.stop(),t=void 0,i=void 0)};return(...s)=>(e+=1,i||(i=Ad(!0),t=i.run(()=>r(...s))),Lv(n),t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Nv(r){let e=0;return r.traverse(t=>{t.isObject3D&&e++}),e}function Vv(){const r={scene:ns({objects:0,graph:null,value:void 0,selected:void 0,assets:[]}),fps:ns({value:0,accumulator:[],lastLoggedTime:Date.now(),logInterval:1e3}),memory:ns({currentMem:0,averageMem:0,maxMemory:0,allocatedMem:0,accumulator:[],lastLoggedTime:Date.now(),logInterval:1e3}),renderer:sa({info:{render:{frame:0,calls:0,triangles:0,points:0,lines:0},memory:{geometries:0,textures:0},programs:[]}})};let e=null;return typeof window<"u"&&window.parent.parent.__TRES__DEVTOOLS__&&window.parent.parent.__TRES__DEVTOOLS__.subscribe(t=>{if(t.type==="context"){const i=t.data;if(i.scene.value.children.length>0){const n=i.scene.value.uuid;n!==e&&(r.scene.value=i.scene.value,r.scene.objects=Nv(i.scene.value),r.scene.graph=hv(i.scene.value),e=n)}else r.scene.value=void 0,r.scene.graph=null,e=null;i.renderer?.instance?.info&&(Object.assign(r.renderer.info.render,i.renderer.instance.info.render),Object.assign(r.renderer.info.memory,i.renderer.instance.info.memory),r.renderer.info.programs=[...i.renderer.instance.info.programs||[]])}else if(t.type==="performance"){const i=t.data;Object.assign(r.fps,i.fps),r.fps.accumulator=[...i.fps.accumulator],Object.assign(r.memory,i.memory),r.memory.accumulator=[...i.memory.accumulator]}}),r}const Pa=Hv(Vv),jv={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},Uv={key:0,class:"relative isolate"},Gv=I({__name:"index",setup(r){const{scene:e}=Pa(),t=qn(null),i=qn(null),n=z(0);function s(c){t.value&&t.value.remove(i.value),c&&c.isMesh&&(i.value=fv(c),c.add(Cr(i))),t.value=c,n.value++}const a=F(()=>(n.value,Yi(t.value))),o=(c,h)=>{t.value&&(l(t.value,c,h),c.includes("color")||n.value++)},l=(c,h,f)=>{if(!c||typeof c!="object")return;const m=h.split(".");let p=c;for(let x=0;x<m.length-1;x++){const b=m[x];if(p[b]&&typeof p[b]=="object")p=p[b];else return}const g=m[m.length-1],y=x=>typeof x=="string"&&/^#[0-9a-f]{6}$/i.test(x);p[g]=y(f)?new Gr(f):f;const w=c;w.isCamera&&u(h)&&w.updateProjectionMatrix()},u=c=>{const h=["fov","aspect","near","far","left","right","top","bottom"],f=c.split(".").pop();return h.includes(f||"")};return(c,h)=>{const f=hu,m=fu,p=Bv,g=kv,y=Vu;return v(),V("div",jv,[P("div",null,[d(e).value&&d(e).graph?(v(),A(f,{key:d(e).graph.key,item:d(e).graph,onSelectObject:s},null,8,["item"])):(v(),A(m,{key:1,color:"neutral",variant:"subtle",title:"No scene available",description:"Please open a view with a scene to view its graph.",icon:"i-lucide-terminal"}))]),P("div",null,[t.value?(v(),V("div",Uv,[(v(),A(p,{key:n.value,object:t.value,onUpdateValue:o},null,8,["object"])),E(g),E(y,{class:"pt-4",node:a.value,"selected-object":t.value,onUpdateValue:o},null,8,["node","selected-object"])])):R("",!0)])])}}}),Wv=Object.assign(Gv,{__name:"SceneGraph"}),Kv=["points"],Ds=40,Qo=2,Xv=I({__name:"DevtoolsGraph",props:{points:{default:()=>[]},value:{default:0},unit:{default:""},label:{default:""},color:{default:"primary"}},setup(r){const e=r,t=z(140);vt(()=>{const n=Math.max(...e.points,30);t.value=Math.max(n,t.value)});const i=F(()=>e.points.map((n,s)=>`${s*Qo},${Ds-n*Ds/t.value}`).join(" "));return(n,s)=>(v(),V("div",{class:O(["graph relative p-1 rounded text-right text-xs outline-none border-none font-sans",`graph-${r.color}`])},[P("div",{class:O(["absolute bottom-0.5 right-1 font-mono text-xs",`text-${r.color}`])},ee(Math.round(r.value))+" "+ee(r.unit),3),(v(),V("svg",{width:"100%",height:Ds,xmlns:"http://www.w3.org/2000/svg"},[P("polyline",{points:d(i),fill:"none","stroke-width":Qo,"stroke-linecap":"round","stroke-linejoin":"round",class:O(r.color)},null,10,Kv)]))],2))}}),Yv=Object.assign(Xv,{__name:"DevtoolsGraph"}),Jv={slots:{root:"rounded-lg overflow-hidden",header:"p-4 sm:px-6",body:"p-4 sm:p-6",footer:"p-4 sm:px-6"},variants:{variant:{solid:{root:"bg-inverted text-inverted"},outline:{root:"bg-default ring ring-default divide-y divide-default"},soft:{root:"bg-elevated/50 divide-y divide-default"},subtle:{root:"bg-elevated/50 ring ring-default divide-y divide-default"}}},defaultVariants:{variant:"outline"}},Zv={__name:"UCard",props:{as:{type:null,required:!1},variant:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(r){const e=r,t=Ze(),i=Ie(),n=De("card",e),s=F(()=>le({extend:le(Jv),...i.ui?.card||{}})({variant:e.variant}));return(a,o)=>(v(),A(d(ne),{as:r.as,"data-slot":"root",class:O(s.value.root({class:[d(n)?.root,e.class]}))},{default:_(()=>[t.header?(v(),V("div",{key:0,"data-slot":"header",class:O(s.value.header({class:d(n)?.header}))},[S(a.$slots,"header")],2)):R("",!0),t.default?(v(),V("div",{key:1,"data-slot":"body",class:O(s.value.body({class:d(n)?.body}))},[S(a.$slots,"default")],2)):R("",!0),t.footer?(v(),V("div",{key:2,"data-slot":"footer",class:O(s.value.footer({class:d(n)?.footer}))},[S(a.$slots,"footer")],2)):R("",!0)]),_:3},8,["as","class"]))}},Qv={class:"text-sm dark:text-neutral-400 text-neutral-500 font-mono"},eb={key:0,class:"h-1 border-b dark:border-neutral-400 border-neutral-500 w-4"},tb={class:"flex gap-2 items-center -mb2.5"},ib={key:0},rb={class:"p4 dark:text-neutral-400 text-neutral-500 text-xs font-mono"},nb=I({__name:"ProgramsModuleItem",props:{item:{},depth:{default:0}},setup(r){const e=z(!1);return(t,i)=>{const n=fi;return v(),V("div",Qv,[P("div",{class:"flex gap-2 items-end cursor-pointer pt2 mb2",onClick:i[0]||(i[0]=s=>e.value=!d(e))},[r.depth>0?(v(),V("span",eb)):R("",!0),P("div",tb,[P("i",{class:O(r.item.icon)},null,2),de(" "+ee(r.item.type)+" ",1),r.item.name?(v(),A(n,{key:0,variant:"soft"},{default:_(()=>[de(ee(r.item.name),1)]),_:1})):R("",!0)])]),d(e)?(v(),V("div",ib,[P("div",rb,[i[1]||(i[1]=P("p",{class:"text-xs font-bold dark:text-neutral-300/80 text-neutral-700/80 mb2 op-80"}," Uniforms ",-1)),(v(!0),V(xe,null,Xe(Object.entries(r.item.uniforms.map),([s,a])=>(v(),V("div",{key:s},[de(ee(s)+" ",1),E(n,{color:"neutral",variant:"soft"},{default:_(()=>[de(ee(a?.cache[a?.cache.length-1]),1)]),_:2},1024)]))),128))])])):R("",!0)])}}}),sb=Object.assign(nb,{__name:"ProgramsModuleItem"}),ab=I({__name:"ProgramsModule",setup(r){const{renderer:e}=Pa(),t={shaderMaterial:"i-file-icons-vertexshader"},i=F(()=>e.info.programs.map(n=>({...n,icon:t[n.type]||"i-file-icons-vertexshader",uniforms:n.getUniforms(),attributes:n.getAttributes()})));return(n,s)=>{const a=sb;return v(!0),V(xe,null,Xe(d(i),o=>(v(),A(a,{key:o.id,item:o},null,8,["item"]))),128)}}}),ob=Object.assign(ab,{__name:"ProgramsModule"}),lb={class:"space-y-6"},ub={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},db={class:"flex items-center justify-between"},cb={class:"flex items-center gap-2"},hb={class:"space-y-4"},fb={class:"flex items-center justify-between"},pb={class:"flex items-center gap-2"},mb={class:"space-y-4"},gb={class:"grid grid-cols-2 gap-4 text-sm"},yb={class:"font-mono font-semibold"},vb={class:"font-mono font-semibold"},bb={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},xb={class:"flex items-center gap-2"},wb={class:"space-y-4"},_b={class:"grid grid-cols-2 gap-4"},Cb={class:"text-center p-4 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},Ab={class:"flex items-center justify-center gap-2 mb-2"},Sb={class:"font-mono text-sm font-bold"},Mb={class:"text-center p-4 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},Bb={class:"flex items-center justify-center gap-2 mb-2"},qb={class:"font-mono text-sm font-bold"},kb={class:"flex items-center gap-2"},Fb={class:"grid grid-cols-2 gap-3"},Eb={class:"text-center p-3 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},Ob={class:"flex items-center justify-center gap-2 mb-2"},zb={class:"font-mono font-bold"},Ib={class:"text-center p-3 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},Tb={class:"flex items-center justify-center gap-2 mb-2"},Pb={class:"font-mono font-bold"},Db={class:"text-center p-3 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},Rb={class:"flex items-center justify-center gap-2 mb-2"},$b={class:"font-mono font-bold"},Lb={class:"text-center p-3 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},Hb={class:"flex items-center justify-center gap-2 mb-2"},Nb={class:"font-mono font-bold"},Vb={class:"flex items-center gap-2"},jb=I({__name:"PerformanceMonitor",setup(r){const{fps:e,memory:t,renderer:i}=Pa(),n=F(()=>e.value>=50?{color:"primary",label:"Excellent"}:e.value>=30?{color:"warning",label:"Good"}:{color:"error",label:"Poor"}),s=F(()=>{const a=t.currentMem;return a<100?{color:"primary",label:"Low"}:a<500?{color:"warning",label:"Moderate"}:{color:"error",label:"High"}});return(a,o)=>{const l=Se,u=fi,c=Yv,h=Zv,f=fu,m=ob;return v(),V("div",lb,[P("div",ub,[E(h,null,{header:_(()=>[P("div",db,[P("div",cb,[E(l,{name:"i-tabler:activity",class:"w-5 h-5"}),o[0]||(o[0]=P("h3",{class:"text-sm font-semibold"}," Frame Rate ",-1))]),E(u,{color:d(n).color,variant:"soft",size:"sm"},{default:_(()=>[de(ee(d(n).label),1)]),_:1},8,["color"])])]),default:_(()=>[P("div",hb,[E(c,{points:d(e).accumulator,value:d(e).value,color:"primary",unit:"FPS",label:"FPS"},null,8,["points","value"])])]),_:1}),E(h,null,{header:_(()=>[P("div",fb,[P("div",pb,[E(l,{name:"i-tabler:cpu",class:"w-5 h-5"}),o[1]||(o[1]=P("h3",{class:"text-sm font-semibold"}," Memory Usage ",-1))]),E(u,{color:d(s).color,variant:"soft",size:"sm"},{default:_(()=>[de(ee(d(s).label),1)]),_:1},8,["color"])])]),default:_(()=>[P("div",mb,[E(c,{points:d(t).accumulator,value:d(t).currentMem,color:"warning",unit:"MB",label:"Memory"},null,8,["points","value"]),P("div",gb,[P("div",null,[o[2]||(o[2]=P("div",{class:"text-neutral-600 dark:text-neutral-400"}," Current ",-1)),P("div",yb,ee(Math.round(d(t).currentMem))+" MB ",1)]),P("div",null,[o[3]||(o[3]=P("div",{class:"text-neutral-600 dark:text-neutral-400"}," Peak ",-1)),P("div",vb,ee(Math.round(d(t).maxMemory))+" MB ",1)])])])]),_:1})]),P("div",bb,[E(h,null,{header:_(()=>[P("div",xb,[E(l,{name:"i-tabler:database",class:"w-5 h-5"}),o[4]||(o[4]=P("h3",{class:"font-semibold"}," Memory Details ",-1))])]),default:_(()=>[P("div",wb,[P("div",_b,[P("div",Cb,[P("div",Ab,[E(l,{name:"i-tabler:box",class:"w-5 h-5"}),P("span",Sb,ee(d(i).info?.memory?.geometries||0),1)]),o[5]||(o[5]=P("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Geometries ",-1))]),P("div",Mb,[P("div",Bb,[E(l,{name:"i-tabler:photo",class:"w-5 h-5"}),P("span",qb,ee(d(i).info?.memory?.textures||0),1)]),o[6]||(o[6]=P("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Textures ",-1))])]),E(f,{icon:"i-tabler:info-circle",color:"primary",variant:"soft",title:"Memory Allocation",description:`Approximately ${d(Ey)(d(t).allocatedMem)} KB allocated by 3D objects`},null,8,["description"])])]),_:1}),E(h,null,{header:_(()=>[P("div",kb,[E(l,{name:"i-tabler:chart-bar",class:"w-5 h-5"}),o[7]||(o[7]=P("h3",{class:"font-semibold"}," Render Statistics ",-1))])]),default:_(()=>[P("div",Fb,[P("div",Eb,[P("div",Ob,[E(l,{name:"i-tabler:refresh",class:"w-4 h-4 text-primary-500"}),P("span",zb,ee(d(i)?.info?.render?.calls||0),1)]),o[8]||(o[8]=P("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Draw Calls ",-1))]),P("div",Ib,[P("div",Tb,[E(l,{name:"i-tabler:triangle",class:"w-4 h-4 text-orange-500"}),P("span",Pb,ee(d(i)?.info?.render?.triangles||0),1)]),o[9]||(o[9]=P("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Triangles ",-1))]),P("div",Db,[P("div",Rb,[E(l,{name:"i-tabler:point",class:"w-4 h-4 text-blue-500"}),P("span",$b,ee(d(i)?.info?.render?.points||0),1)]),o[10]||(o[10]=P("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Points ",-1))]),P("div",Lb,[P("div",Hb,[E(l,{name:"i-tabler:line",class:"w-4 h-4 text-red-500"}),P("span",Nb,ee(d(i)?.info?.render?.lines||0),1)]),o[11]||(o[11]=P("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Lines ",-1))])])]),_:1})]),E(h,null,{header:_(()=>[P("div",Vb,[E(l,{name:"i-tabler:code",class:"w-5 h-5"}),o[12]||(o[12]=P("h3",{class:"font-semibold"}," Shader Programs ",-1))])]),default:_(()=>[E(m)]),_:1})])}}}),Ub=Object.assign(jb,{__name:"PerformanceMonitor"}),Gb={slots:{root:"flex items-center gap-2",list:"relative flex p-1 group",indicator:"absolute transition-[translate,width] duration-200",trigger:["group relative inline-flex items-center min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",label:"truncate",trailingBadge:"shrink-0",trailingBadgeSize:"sm",content:"focus:outline-none w-full"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{pill:{list:"bg-elevated rounded-lg",trigger:"grow",indicator:"rounded-md shadow-xs"},link:{list:"border-default",indicator:"rounded-full",trigger:"focus:outline-none"}},orientation:{horizontal:{root:"flex-col",list:"w-full",indicator:"left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",trigger:"justify-center"},vertical:{list:"flex-col",indicator:"top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"}},size:{xs:{trigger:"px-2 py-1 text-xs gap-1",leadingIcon:"size-4",leadingAvatarSize:"3xs"},sm:{trigger:"px-2.5 py-1.5 text-xs gap-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs"},md:{trigger:"px-3 py-1.5 text-sm gap-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs"},lg:{trigger:"px-3 py-2 text-sm gap-2",leadingIcon:"size-5",leadingAvatarSize:"2xs"},xl:{trigger:"px-3 py-2 text-base gap-2",leadingIcon:"size-6",leadingAvatarSize:"xs"}}},compoundVariants:[{orientation:"horizontal",variant:"pill",class:{indicator:"inset-y-1"}},{orientation:"horizontal",variant:"link",class:{list:"border-b -mb-px",indicator:"-bottom-px h-px"}},{orientation:"vertical",variant:"pill",class:{indicator:"inset-x-1",list:"items-center"}},{orientation:"vertical",variant:"link",class:{list:"border-s -ms-px",indicator:"-start-px w-px"}},{color:"primary",variant:"pill",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"}},{color:"secondary",variant:"pill",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary"}},{color:"success",variant:"pill",class:{indicator:"bg-success",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success"}},{color:"info",variant:"pill",class:{indicator:"bg-info",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"}},{color:"warning",variant:"pill",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"}},{color:"error",variant:"pill",class:{indicator:"bg-error",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-error"}},{color:"neutral",variant:"pill",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted"}},{color:"primary",variant:"link",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-primary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"}},{color:"secondary",variant:"link",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-secondary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"}},{color:"success",variant:"link",class:{indicator:"bg-success",trigger:"data-[state=active]:text-success focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"}},{color:"info",variant:"link",class:{indicator:"bg-info",trigger:"data-[state=active]:text-info focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"}},{color:"warning",variant:"link",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-warning focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"}},{color:"error",variant:"link",class:{indicator:"bg-error",trigger:"data-[state=active]:text-error focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"}},{color:"neutral",variant:"link",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-highlighted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"}}],defaultVariants:{color:"primary",variant:"pill",size:"md"}},Wb={__name:"UTabs",props:{as:{type:null,required:!1},items:{type:Array,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},content:{type:Boolean,required:!1,default:!0},valueKey:{type:null,required:!1,default:"value"},labelKey:{type:null,required:!1,default:"label"},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultValue:{type:[String,Number],required:!1,default:"0"},modelValue:{type:[String,Number],required:!1},activationMode:{type:String,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:["update:modelValue"],setup(r,{expose:e,emit:t}){const i=r,n=t,s=Ze(),a=Ie(),o=De("tabs",i),l=_e(It(i,"as","unmountOnHide"),n),u=F(()=>le({extend:le(Gb),...a.ui?.tabs||{}})({color:i.color,variant:i.variant,size:i.size,orientation:i.orientation})),c=z([]);function h(f,m){c.value[f]=m}return e({triggersRef:c}),(f,m)=>(v(),A(d(Sm),H(d(l),{"model-value":r.modelValue,"default-value":r.defaultValue,orientation:r.orientation,"activation-mode":r.activationMode,"data-slot":"root",class:u.value.root({class:[d(o)?.root,i.class]})}),{default:_(()=>[E(d(Em),{"data-slot":"list",class:O(u.value.list({class:d(o)?.list}))},{default:_(()=>[E(d(km),{"data-slot":"indicator",class:O(u.value.indicator({class:d(o)?.indicator}))},null,8,["class"]),S(f.$slots,"list-leading"),(v(!0),V(xe,null,Xe(r.items,(p,g)=>(v(),A(d(zm),{key:g,ref_for:!0,ref:y=>h(g,y),value:d(ft)(p,i.valueKey)??String(g),disabled:p.disabled,"data-slot":"trigger",class:O(u.value.trigger({class:[d(o)?.trigger,p.ui?.trigger]}))},{default:_(()=>[S(f.$slots,"leading",{item:p,index:g,ui:u.value},()=>[p.icon?(v(),A(Se,{key:0,name:p.icon,"data-slot":"leadingIcon",class:O(u.value.leadingIcon({class:[d(o)?.leadingIcon,p.ui?.leadingIcon]}))},null,8,["name","class"])):p.avatar?(v(),A(cr,H({key:1,size:p.ui?.leadingAvatarSize||d(o)?.leadingAvatarSize||u.value.leadingAvatarSize()},{ref_for:!0},p.avatar,{"data-slot":"leadingAvatar",class:u.value.leadingAvatar({class:[d(o)?.leadingAvatar,p.ui?.leadingAvatar]})}),null,16,["size","class"])):R("",!0)]),d(ft)(p,i.labelKey)||s.default?(v(),V("span",{key:0,"data-slot":"label",class:O(u.value.label({class:[d(o)?.label,p.ui?.label]}))},[S(f.$slots,"default",{item:p,index:g},()=>[de(ee(d(ft)(p,i.labelKey)),1)])],2)):R("",!0),S(f.$slots,"trailing",{item:p,index:g,ui:u.value},()=>[p.badge||p.badge===0?(v(),A(fi,H({key:0,color:"neutral",variant:"outline",size:p.ui?.trailingBadgeSize||d(o)?.trailingBadgeSize||u.value.trailingBadgeSize()},{ref_for:!0},typeof p.badge=="string"||typeof p.badge=="number"?{label:p.badge}:p.badge,{"data-slot":"trailingBadge",class:u.value.trailingBadge({class:[d(o)?.trailingBadge,p.ui?.trailingBadge]})}),null,16,["size","class"])):R("",!0)])]),_:2},1032,["value","disabled","class"]))),128)),S(f.$slots,"list-trailing")]),_:3},8,["class"]),r.content?(v(!0),V(xe,{key:0},Xe(r.items,(p,g)=>(v(),A(d(Bm),{key:g,value:d(ft)(p,i.valueKey)??String(g),"data-slot":"content",class:O(u.value.content({class:[d(o)?.content,p.ui?.content,p.class]}))},{default:_(()=>[S(f.$slots,p.slot||"content",{item:p,index:g,ui:u.value},()=>[de(ee(p.content),1)])]),_:2},1032,["value","class"]))),128)):R("",!0)]),_:3},16,["model-value","default-value","orientation","activation-mode","class"]))}},Kb={class:"pattern-bg"},Xb={class:"bg-(--ui-bg) p-8 min-h-[calc(100vh-var(--ui-header-height))] max-w-screen-xl mx-auto pt-2 bg-default"},Jb=I({__name:"index",setup(r){const e=[{label:"Scene Graph",description:"Explore and inspect the 3D scene hierarchy and object properties.",icon:"i-lucide-film",slot:"scene-graph"},{label:"Performance",description:"Monitor frame rate, memory usage, and rendering statistics.",icon:"i-lucide-chart-line",slot:"performance"}];return(t,i)=>{const n=Dg,s=Wv,a=Ub,o=Wb;return v(),V("div",Kb,[E(n),P("main",Xb,[E(o,{items:e,color:"primary",size:"lg",variant:"link",ui:{trigger:"grow"},class:"gap-4 w-full"},{"scene-graph":_(()=>[E(s)]),performance:_(()=>[E(a)]),_:1})])])}}});export{Jb as default};
|