vuer 0.0.31rc8__py3-none-any.whl → 0.0.32rc5__py3-none-any.whl
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.
Potentially problematic release.
This version of vuer might be problematic. Click here for more details.
- vuer/client_build/404.html +5 -5
- vuer/client_build/assets/chunks/chunk-3010a972.js +17 -0
- vuer/client_build/assets/chunks/chunk-41409215.js +85 -0
- vuer/client_build/assets/chunks/chunk-6066377f.js +1 -0
- vuer/client_build/assets/chunks/chunk-6b3e1cbe.js +220 -0
- vuer/client_build/assets/chunks/chunk-71fcf8b5.js +4502 -0
- vuer/client_build/assets/chunks/chunk-79630475.js +4502 -0
- vuer/client_build/assets/chunks/chunk-98964cd2.js +1 -0
- vuer/client_build/assets/chunks/chunk-a783899f.js +1 -0
- vuer/client_build/assets/chunks/chunk-c2202416.js +24 -0
- vuer/client_build/assets/chunks/chunk-c676def8.js +17 -0
- vuer/client_build/assets/chunks/chunk-d9bdcef8.js +24 -0
- vuer/client_build/assets/chunks/chunk-ed028bdc.js +85 -0
- vuer/client_build/assets/chunks/chunk-fc5669ff.js +220 -0
- vuer/client_build/assets/entries/entry-client-routing.3e00a936.js +2 -0
- vuer/client_build/assets/entries/entry-client-routing.440ca3f3.js +2 -0
- vuer/client_build/assets/entries/entry-client-routing.f2b2c78d.js +2 -0
- vuer/client_build/assets/entries/entry-server-routing.331da83b.js +1 -0
- vuer/client_build/assets/entries/entry-server-routing.a14b8f2f.js +1 -0
- vuer/client_build/assets/entries/entry-server-routing.c5820a27.js +1 -0
- vuer/client_build/assets/entries/pages_hands.page.96d76674.js +1 -0
- vuer/client_build/assets/entries/pages_hands.page.a710320f.js +1 -0
- vuer/client_build/assets/entries/pages_hands.page.d2819396.js +39 -0
- vuer/client_build/assets/entries/pages_index.page.882a1a82.js +97 -0
- vuer/client_build/assets/entries/pages_index.page.ec469c43.js +97 -0
- vuer/client_build/assets/entries/pages_stereo_plane.page.5953449a.js +1 -0
- vuer/client_build/assets/entries/pages_stereo_plane.page.b31b89c0.js +54 -0
- vuer/client_build/assets/entries/pages_video_plane.page.b6db83b0.js +1 -0
- vuer/client_build/assets/entries/pages_video_plane.page.c7a96ba6.js +1 -0
- vuer/client_build/assets/entries/renderer_default.page.client.9822d975.js +1 -0
- vuer/client_build/assets/entries/renderer_default.page.client.aa49b305.js +1 -0
- vuer/client_build/assets/entries/renderer_error.page.19e415e1.js +1 -0
- vuer/client_build/assets/entries/renderer_error.page.3723d86c.js +1 -0
- vuer/client_build/hands/index.html +6 -6
- vuer/client_build/index.html +7 -6
- vuer/client_build/stereo_plane/index.html +20 -0
- vuer/client_build/stereo_plane/index.pageContext.json +1 -0
- vuer/client_build/video_plane/index.html +19 -0
- vuer/client_build/video_plane/index.pageContext.json +1 -0
- vuer/schemas/scene_components.py +100 -28
- {vuer-0.0.31rc8.dist-info → vuer-0.0.32rc5.dist-info}/METADATA +1 -1
- {vuer-0.0.31rc8.dist-info → vuer-0.0.32rc5.dist-info}/RECORD +46 -10
- {vuer-0.0.31rc8.dist-info → vuer-0.0.32rc5.dist-info}/LICENSE +0 -0
- {vuer-0.0.31rc8.dist-info → vuer-0.0.32rc5.dist-info}/WHEEL +0 -0
- {vuer-0.0.31rc8.dist-info → vuer-0.0.32rc5.dist-info}/entry_points.txt +0 -0
- {vuer-0.0.31rc8.dist-info → vuer-0.0.32rc5.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import{r as f,R as g,$ as Qs,g as ea,j as ue,a as Nr}from"../chunks/chunk-3010a972.js";import{a6 as H,W as ta,H as na,c as ra}from"../chunks/chunk-79630475.js";import{r as gr,R as ui}from"../chunks/chunk-d9bdcef8.js";import{_ as J}from"../chunks/chunk-98964cd2.js";import"../chunks/chunk-cf010ec4.js";const oa=["top","right","bottom","left"],Ne=Math.min,ce=Math.max,nn=Math.round,Gt=Math.floor,ze=e=>({x:e,y:e}),ia={left:"right",right:"left",bottom:"top",top:"bottom"},sa={start:"end",end:"start"};function Un(e,t,n){return ce(e,Ne(t,n))}function Pe(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function mr(e){return e==="x"?"y":"x"}function br(e){return e==="y"?"height":"width"}function ut(e){return["top","bottom"].includes(Te(e))?"y":"x"}function vr(e){return mr(ut(e))}function aa(e,t,n){n===void 0&&(n=!1);const r=lt(e),o=vr(e),i=br(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=rn(s)),[s,rn(s)]}function ca(e){const t=rn(e);return[Kn(e),t,Kn(t)]}function Kn(e){return e.replace(/start|end/g,t=>sa[t])}function la(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function ua(e,t,n,r){const o=lt(e);let i=la(Te(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Kn)))),i}function rn(e){return e.replace(/left|right|bottom|top/g,t=>ia[t])}function fa(e){return{top:0,right:0,bottom:0,left:0,...e}}function fi(e){return typeof e!="number"?fa(e):{top:e,right:e,bottom:e,left:e}}function on(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function zr(e,t,n){let{reference:r,floating:o}=e;const i=ut(t),s=vr(t),a=br(s),c=Te(t),l=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let h;switch(c){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(lt(t)){case"start":h[s]-=p*(n&&l?-1:1);break;case"end":h[s]+=p*(n&&l?-1:1);break}return h}const da=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=zr(l,r,c),p=r,h={},m=0;for(let b=0;b<a.length;b++){const{name:y,fn:v}=a[b],{x:w,y:$,data:x,reset:S}=await v({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:l,platform:s,elements:{reference:e,floating:t}});if(u=w??u,d=$??d,h={...h,[y]:{...h[y],...x}},S&&m<=50){m++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(l=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=zr(l,p,c)),b=-1;continue}}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}};async function _t(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Pe(t,e),m=fi(h),y=a[p?d==="floating"?"reference":"floating":d],v=on(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),w=d==="floating"?{...s.floating,x:r,y:o}:s.reference,$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement($))?await(i.getScale==null?void 0:i.getScale($))||{x:1,y:1}:{x:1,y:1},S=on(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:$,strategy:c}):w);return{top:(v.top-S.top+m.top)/x.y,bottom:(S.bottom-v.bottom+m.bottom)/x.y,left:(v.left-S.left+m.left)/x.x,right:(S.right-v.right+m.right)/x.x}}const Fr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=Pe(e,t)||{};if(l==null)return{};const d=fi(u),p={x:n,y:r},h=vr(o),m=br(h),b=await s.getDimensions(l),y=h==="y",v=y?"top":"left",w=y?"bottom":"right",$=y?"clientHeight":"clientWidth",x=i.reference[m]+i.reference[h]-p[h]-i.floating[m],S=p[h]-i.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let C=E?E[$]:0;(!C||!await(s.isElement==null?void 0:s.isElement(E)))&&(C=a.floating[$]||i.floating[m]);const O=x/2-S/2,j=C/2-b[m]/2-1,k=Ne(d[v],j),T=Ne(d[w],j),P=k,z=C-b[m]-T,A=C/2-b[m]/2+O,L=Un(P,A,z),I=!c.arrow&<(o)!=null&&A!=L&&i.reference[m]/2-(A<P?k:T)-b[m]/2<0,F=I?A<P?A-P:A-z:0;return{[h]:p[h]+F,data:{[h]:L,centerOffset:A-L-F,...I&&{alignmentOffset:F}},reset:I}}}),pa=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:b=!0,...y}=Pe(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Te(o),w=Te(a)===a,$=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=p||(w||!b?[rn(a)]:ca(a));!p&&m!=="none"&&x.push(...ua(a,b,m,$));const S=[a,...x],E=await _t(t,y),C=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&C.push(E[v]),d){const P=aa(o,s,$);C.push(E[P[0]],E[P[1]])}if(O=[...O,{placement:o,overflows:C}],!C.every(P=>P<=0)){var j,k;const P=(((j=i.flip)==null?void 0:j.index)||0)+1,z=S[P];if(z)return{data:{index:P,overflows:O},reset:{placement:z}};let A=(k=O.filter(L=>L.overflows[0]<=0).sort((L,I)=>L.overflows[1]-I.overflows[1])[0])==null?void 0:k.placement;if(!A)switch(h){case"bestFit":{var T;const L=(T=O.map(I=>[I.placement,I.overflows.filter(F=>F>0).reduce((F,V)=>F+V,0)]).sort((I,F)=>I[1]-F[1])[0])==null?void 0:T[0];L&&(A=L);break}case"initialPlacement":A=a;break}if(o!==A)return{reset:{placement:A}}}return{}}}};function Br(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wr(e){return oa.some(t=>e[t]>=0)}const ha=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Pe(e,t);switch(r){case"referenceHidden":{const i=await _t(t,{...o,elementContext:"reference"}),s=Br(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Wr(s)}}}case"escaped":{const i=await _t(t,{...o,altBoundary:!0}),s=Br(i,n.floating);return{data:{escapedOffsets:s,escaped:Wr(s)}}}default:return{}}}}};async function ga(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Te(n),a=lt(n),c=ut(n)==="y",l=["left","top"].includes(s)?-1:1,u=i&&c?-1:1,d=Pe(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),c?{x:h*u,y:p*l}:{x:p*l,y:h*u}}const ma=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,c=await ga(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},ba=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:v,y:w}=y;return{x:v,y:w}}},...c}=Pe(e,t),l={x:n,y:r},u=await _t(t,c),d=ut(Te(o)),p=mr(d);let h=l[p],m=l[d];if(i){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",w=h+u[y],$=h-u[v];h=Un(w,h,$)}if(s){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=m+u[y],$=m-u[v];m=Un(w,m,$)}const b=a.fn({...t,[p]:h,[d]:m});return{...b,data:{x:b.x-n,y:b.y-r}}}}},va=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Pe(e,t),u={x:n,y:r},d=ut(o),p=mr(d);let h=u[p],m=u[d];const b=Pe(a,t),y=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const $=p==="y"?"height":"width",x=i.reference[p]-i.floating[$]+y.mainAxis,S=i.reference[p]+i.reference[$]-y.mainAxis;h<x?h=x:h>S&&(h=S)}if(l){var v,w;const $=p==="y"?"width":"height",x=["top","left"].includes(Te(o)),S=i.reference[d]-i.floating[$]+(x&&((v=s.offset)==null?void 0:v[d])||0)+(x?0:y.crossAxis),E=i.reference[d]+i.reference[$]+(x?0:((w=s.offset)==null?void 0:w[d])||0)-(x?y.crossAxis:0);m<S?m=S:m>E&&(m=E)}return{[p]:h,[d]:m}}}},ya=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=Pe(e,t),c=await _t(t,a),l=Te(n),u=lt(n),d=ut(n)==="y",{width:p,height:h}=r.floating;let m,b;l==="top"||l==="bottom"?(m=l,b=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(b=l,m=u==="end"?"top":"bottom");const y=h-c[m],v=p-c[b],w=!t.middlewareData.shift;let $=y,x=v;if(d){const E=p-c.left-c.right;x=u||w?Ne(v,E):E}else{const E=h-c.top-c.bottom;$=u||w?Ne(y,E):E}if(w&&!u){const E=ce(c.left,0),C=ce(c.right,0),O=ce(c.top,0),j=ce(c.bottom,0);d?x=p-2*(E!==0||C!==0?E+C:ce(c.left,c.right)):$=h-2*(O!==0||j!==0?O+j:ce(c.top,c.bottom))}await s({...t,availableWidth:x,availableHeight:$});const S=await o.getDimensions(i.floating);return p!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function Fe(e){return di(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(di(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function di(e){return e instanceof Node||e instanceof le(e).Node}function ke(e){return e instanceof Element||e instanceof le(e).Element}function Ee(e){return e instanceof HTMLElement||e instanceof le(e).HTMLElement}function Hr(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}function At(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function wa(e){return["table","td","th"].includes(Fe(e))}function yr(e){const t=wr(),n=pe(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function $a(e){let t=st(e);for(;Ee(t)&&!vn(t);){if(yr(t))return t;t=st(t)}return null}function wr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vn(e){return["html","body","#document"].includes(Fe(e))}function pe(e){return le(e).getComputedStyle(e)}function yn(e){return ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function st(e){if(Fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hr(e)&&e.host||De(e);return Hr(t)?t.host:t}function pi(e){const t=st(e);return vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&At(t)?t:pi(t)}function Rt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=pi(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=le(o);return i?t.concat(s,s.visualViewport||[],At(o)?o:[],s.frameElement&&n?Rt(s.frameElement):[]):t.concat(o,Rt(o,[],n))}function hi(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ee(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=nn(n)!==i||nn(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function $r(e){return ke(e)?e:e.contextElement}function ot(e){const t=$r(e);if(!Ee(t))return ze(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=hi(t);let s=(i?nn(n.width):n.width)/r,a=(i?nn(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Ea=ze(0);function gi(e){const t=le(e);return!wr()||!t.visualViewport?Ea:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xa(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==le(e)?!1:t}function Xe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=$r(e);let s=ze(1);t&&(r?ke(r)&&(s=ot(r)):s=ot(e));const a=xa(i,n,r)?gi(i):ze(0);let c=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const p=le(i),h=r&&ke(r)?le(r):r;let m=p.frameElement;for(;m&&r&&h!==p;){const b=ot(m),y=m.getBoundingClientRect(),v=pe(m),w=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*b.x,$=y.top+(m.clientTop+parseFloat(v.paddingTop))*b.y;c*=b.x,l*=b.y,u*=b.x,d*=b.y,c+=w,l+=$,m=le(m).frameElement}}return on({width:u,height:d,x:c,y:l})}function Sa(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Ee(n),i=De(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=ze(1);const c=ze(0);if((o||!o&&r!=="fixed")&&((Fe(n)!=="body"||At(i))&&(s=yn(n)),Ee(n))){const l=Xe(n);a=ot(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function Ca(e){return Array.from(e.getClientRects())}function mi(e){return Xe(De(e)).left+yn(e).scrollLeft}function Oa(e){const t=De(e),n=yn(e),r=e.ownerDocument.body,o=ce(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ce(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+mi(e);const a=-n.scrollTop;return pe(r).direction==="rtl"&&(s+=ce(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function _a(e,t){const n=le(e),r=De(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const l=wr();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function Ra(e,t){const n=Xe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ee(e)?ot(e):ze(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:s,height:a,x:c,y:l}}function Vr(e,t,n){let r;if(t==="viewport")r=_a(e,n);else if(t==="document")r=Oa(De(e));else if(ke(t))r=Ra(t,n);else{const o=gi(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return on(r)}function bi(e,t){const n=st(e);return n===t||!ke(n)||vn(n)?!1:pe(n).position==="fixed"||bi(n,t)}function Pa(e,t){const n=t.get(e);if(n)return n;let r=Rt(e,[],!1).filter(a=>ke(a)&&Fe(a)!=="body"),o=null;const i=pe(e).position==="fixed";let s=i?st(e):e;for(;ke(s)&&!vn(s);){const a=pe(s),c=yr(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||At(s)&&!c&&bi(e,s))?r=r.filter(u=>u!==s):o=a,s=st(s)}return t.set(e,r),r}function Ta(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Pa(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((l,u)=>{const d=Vr(t,u,o);return l.top=ce(d.top,l.top),l.right=Ne(d.right,l.right),l.bottom=Ne(d.bottom,l.bottom),l.left=ce(d.left,l.left),l},Vr(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ka(e){return hi(e)}function Aa(e,t,n){const r=Ee(t),o=De(t),i=n==="fixed",s=Xe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=ze(0);if(r||!r&&!i)if((Fe(t)!=="body"||At(o))&&(a=yn(t)),r){const l=Xe(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=mi(o));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function Ur(e,t){return!Ee(e)||pe(e).position==="fixed"?null:t?t(e):e.offsetParent}function vi(e,t){const n=le(e);if(!Ee(e))return n;let r=Ur(e,t);for(;r&&wa(r)&&pe(r).position==="static";)r=Ur(r,t);return r&&(Fe(r)==="html"||Fe(r)==="body"&&pe(r).position==="static"&&!yr(r))?n:r||$a(e)||n}const Da=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||vi,i=this.getDimensions;return{reference:Aa(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Ia(e){return pe(e).direction==="rtl"}const Ma={convertOffsetParentRelativeRectToViewportRelativeRect:Sa,getDocumentElement:De,getClippingRect:Ta,getOffsetParent:vi,getElementRects:Da,getClientRects:Ca,getDimensions:ka,getScale:ot,isElement:ke,isRTL:Ia};function ja(e,t){let n=null,r;const o=De(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:d,height:p}=e.getBoundingClientRect();if(a||t(),!d||!p)return;const h=Gt(u),m=Gt(o.clientWidth-(l+d)),b=Gt(o.clientHeight-(u+p)),y=Gt(l),w={rootMargin:-h+"px "+-m+"px "+-b+"px "+-y+"px",threshold:ce(0,Ne(1,c))||1};let $=!0;function x(S){const E=S[0].intersectionRatio;if(E!==c){if(!$)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},100)}$=!1}try{n=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return s(!0),i}function La(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=$r(e),u=o||i?[...l?Rt(l):[],...Rt(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=l&&a?ja(l,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),l&&!c&&h.observe(l),h.observe(t));let m,b=c?Xe(e):null;c&&y();function y(){const v=Xe(e);b&&(v.x!==b.x||v.y!==b.y||v.width!==b.width||v.height!==b.height)&&n(),b=v,m=requestAnimationFrame(y)}return n(),()=>{u.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const Na=(e,t,n)=>{const r=new Map,o={platform:Ma,...n},i={...o.platform,_c:r};return da(e,t,{...o,platform:i})},za=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Fr({element:r.current,padding:o}).fn(n):{}:r?Fr({element:r,padding:o}).fn(n):{}}}};var en=typeof document<"u"?f.useLayoutEffect:f.useEffect;function sn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!sn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!sn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function yi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kr(e,t){const n=yi(e);return Math.round(t*n)/n}function Gr(e){const t=f.useRef(e);return en(()=>{t.current=e}),t}function Fa(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=f.useState(r);sn(p,r)||h(r);const[m,b]=f.useState(null),[y,v]=f.useState(null),w=f.useCallback(I=>{I!=E.current&&(E.current=I,b(I))},[b]),$=f.useCallback(I=>{I!==C.current&&(C.current=I,v(I))},[v]),x=i||m,S=s||y,E=f.useRef(null),C=f.useRef(null),O=f.useRef(u),j=Gr(c),k=Gr(o),T=f.useCallback(()=>{if(!E.current||!C.current)return;const I={placement:t,strategy:n,middleware:p};k.current&&(I.platform=k.current),Na(E.current,C.current,I).then(F=>{const V={...F,isPositioned:!0};P.current&&!sn(O.current,V)&&(O.current=V,gr.flushSync(()=>{d(V)}))})},[p,t,n,k]);en(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[l]);const P=f.useRef(!1);en(()=>(P.current=!0,()=>{P.current=!1}),[]),en(()=>{if(x&&(E.current=x),S&&(C.current=S),x&&S){if(j.current)return j.current(x,S,T);T()}},[x,S,T,j]);const z=f.useMemo(()=>({reference:E,floating:C,setReference:w,setFloating:$}),[w,$]),A=f.useMemo(()=>({reference:x,floating:S}),[x,S]),L=f.useMemo(()=>{const I={position:n,left:0,top:0};if(!A.floating)return I;const F=Kr(A.floating,u.x),V=Kr(A.floating,u.y);return a?{...I,transform:"translate("+F+"px, "+V+"px)",...yi(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:V}},[n,a,A.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:T,refs:z,elements:A,floatingStyles:L}),[u,T,z,A,L])}function Ba(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function wi(...e){return t=>e.forEach(n=>Ba(n,t))}function ft(...e){return f.useCallback(wi(...e),e)}const $i=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(Wa);if(i){const s=i.props.children,a=o.map(c=>c===i?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:c);return f.createElement(Gn,J({},r,{ref:t}),f.isValidElement(s)?f.cloneElement(s,void 0,a):null)}return f.createElement(Gn,J({},r,{ref:t}),n)});$i.displayName="Slot";const Gn=f.forwardRef((e,t)=>{const{children:n,...r}=e;return f.isValidElement(n)?f.cloneElement(n,{...Ha(r,n.props),ref:t?wi(t,n.ref):n.ref}):f.Children.count(n)>1?f.Children.only(null):null});Gn.displayName="SlotClone";const Ei=({children:e})=>f.createElement(f.Fragment,null,e);function Wa(e){return f.isValidElement(e)&&e.type===Ei}function Ha(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Va=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ze=Va.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?$i:t;return f.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),f.createElement(a,J({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ua(e,t){e&&gr.flushSync(()=>e.dispatchEvent(t))}const Ka=f.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?ui.createPortal(f.createElement(Ze.div,J({},o,{ref:t})),r):null}),Ga=Ka;var Yr=Object.prototype.hasOwnProperty;function Pt(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Pt(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Yr.call(e,n)&&++r&&!Yr.call(t,n)||!(n in t)||!Pt(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function Dt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}var wn=function(t,n,r,o){this.name=t,this.fn=n,this.args=r,this.modifiers=o};wn.prototype._test=function(t){var n=this.fn;try{it(this.modifiers.slice(),n,this)(t)}catch{n=function(){return!1}}try{return it(this.modifiers.slice(),n,this)(t)}catch{return!1}};wn.prototype._check=function(t){try{it(this.modifiers.slice(),this.fn,this)(t)}catch{if(it(this.modifiers.slice(),function(r){return r},this)(!1))return}if(!it(this.modifiers.slice(),this.fn,this)(t))throw null};wn.prototype._testAsync=function(t){var n=this;return new Promise(function(r,o){Si(n.modifiers.slice(),n.fn,n)(t).then(function(i){i?r(t):o(null)}).catch(function(i){return o(i)})})};function xi(e,t){return t===void 0&&(t="simple"),typeof e=="object"?e[t]:e}function it(e,t,n){if(e.length){var r=e.shift(),o=it(e,t,n);return r.perform(o,n)}else return xi(t)}function Si(e,t,n){if(e.length){var r=e.shift(),o=Si(e,t,n);return r.performAsync(o,n)}else return function(i){return Promise.resolve(xi(t,"async")(i))}}var Ya=function(t,n,r){this.name=t,this.perform=n,this.performAsync=r},Er=function(e){function t(n,r,o,i){for(var s=[],a=arguments.length-4;a-- >0;)s[a]=arguments[a+4];e.call(this,s),e.captureStackTrace&&e.captureStackTrace(this,t),this.rule=n,this.value=r,this.cause=o,this.target=i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),xe=function(t,n){t===void 0&&(t=[]),n===void 0&&(n=[]),this.chain=t,this.nextRuleModifiers=n};xe.prototype._applyRule=function(t,n){var r=this;return function(){for(var o=[],i=arguments.length;i--;)o[i]=arguments[i];return r.chain.push(new wn(n,t.apply(r,o),o,r.nextRuleModifiers)),r.nextRuleModifiers=[],r}};xe.prototype._applyModifier=function(t,n){return this.nextRuleModifiers.push(new Ya(n,t.simple,t.async)),this};xe.prototype._clone=function(){return new xe(this.chain.slice(),this.nextRuleModifiers.slice())};xe.prototype.test=function(t){return this.chain.every(function(n){return n._test(t)})};xe.prototype.testAll=function(t){var n=[];return this.chain.forEach(function(r){try{r._check(t)}catch(o){n.push(new Er(r,t,o))}}),n};xe.prototype.check=function(t){this.chain.forEach(function(n){try{n._check(t)}catch(r){throw new Er(n,t,r)}})};xe.prototype.testAsync=function(t){var n=this;return new Promise(function(r,o){Ci(t,n.chain.slice(),r,o)})};function Ci(e,t,n,r){if(t.length){var o=t.shift();o._testAsync(e).then(function(){Ci(e,t,n,r)},function(i){r(new Er(o,e,i))})}else n(e)}var qr=function(e,t){return t&&typeof e=="string"&&e.trim().length===0?!0:e==null};function qa(e,t){return t===void 0&&(t=!1),{simple:function(n){return qr(n,t)||e.check(n)===void 0},async:function(n){return qr(n,t)||e.testAsync(n)}}}function ae(){return typeof Proxy<"u"?Oi(new xe):Yn(new xe)}var Tt={};ae.extend=function(e){Object.assign(Tt,e)};ae.clearCustomRules=function(){Tt={}};function Oi(e){return new Proxy(e,{get:function(n,r){if(r in n)return n[r];var o=Oi(e._clone());if(r in an)return o._applyModifier(an[r],r);if(r in Tt)return o._applyRule(Tt[r],r);if(r in qn)return o._applyRule(qn[r],r)}})}function Yn(e){var t=function(o,i){return Object.keys(o).forEach(function(s){i[s]=function(){for(var a=[],c=arguments.length;c--;)a[c]=arguments[c];var l=Yn(i._clone()),u=l._applyRule(o[s],s).apply(void 0,a);return u}}),i},n=t(qn,e),r=t(Tt,n);return Object.keys(an).forEach(function(o){Object.defineProperty(r,o,{get:function(){var i=Yn(r._clone());return i._applyModifier(an[o],o)}})}),r}var an={not:{simple:function(e){return function(t){return!e(t)}},async:function(e){return function(t){return Promise.resolve(e(t)).then(function(n){return!n}).catch(function(){return!0})}}},some:{simple:function(e){return function(t){return Yt(t).some(function(n){try{return e(n)}catch{return!1}})}},async:function(e){return function(t){return Promise.all(Yt(t).map(function(n){try{return e(n).catch(function(){return!1})}catch{return!1}})).then(function(n){return n.some(Boolean)})}}},every:{simple:function(e){return function(t){return t!==!1&&Yt(t).every(e)}},async:function(e){return function(t){return Promise.all(Yt(t).map(e)).then(function(n){return n.every(Boolean)})}}},strict:{simple:function(e,t){return function(n){return Xr(t)&&n&&typeof n=="object"?Object.keys(t.args[0]).length===Object.keys(n).length&&e(n):e(n)}},async:function(e,t){return function(n){return Promise.resolve(e(n)).then(function(r){return Xr(t)&&n&&typeof n=="object"?Object.keys(t.args[0]).length===Object.keys(n).length&&r:r}).catch(function(){return!1})}}}};function Xr(e){return e&&e.name==="schema"&&e.args.length>0&&typeof e.args[0]=="object"}function Yt(e){return typeof e=="string"?e.split(""):e}var qn={equal:function(e){return function(t){return t==e}},exact:function(e){return function(t){return t===e}},number:function(e){return e===void 0&&(e=!0),function(t){return typeof t=="number"&&(e||isFinite(t))}},integer:function(){return function(e){var t=Number.isInteger||Xa;return t(e)}},numeric:function(){return function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},string:function(){return et("string")},boolean:function(){return et("boolean")},undefined:function(){return et("undefined")},null:function(){return et("null")},array:function(){return et("array")},object:function(){return et("object")},instanceOf:function(e){return function(t){return t instanceof e}},pattern:function(e){return function(t){return e.test(t)}},lowercase:function(){return function(e){return typeof e=="boolean"||e===e.toLowerCase()&&e.trim()!==""}},uppercase:function(){return function(e){return e===e.toUpperCase()&&e.trim()!==""}},vowel:function(){return function(e){return/^[aeiou]+$/i.test(e)}},consonant:function(){return function(e){return/^(?=[^aeiou])([a-z]+)$/i.test(e)}},first:function(e){return function(t){return t[0]==e}},last:function(e){return function(t){return t[t.length-1]==e}},empty:function(){return function(e){return e.length===0}},length:function(e,t){return function(n){return n.length>=e&&n.length<=(t||e)}},minLength:function(e){return function(t){return t.length>=e}},maxLength:function(e){return function(t){return t.length<=e}},negative:function(){return function(e){return e<0}},positive:function(){return function(e){return e>=0}},between:function(e,t){return function(n){return n>=e&&n<=t}},range:function(e,t){return function(n){return n>=e&&n<=t}},lessThan:function(e){return function(t){return t<e}},lessThanOrEqual:function(e){return function(t){return t<=e}},greaterThan:function(e){return function(t){return t>e}},greaterThanOrEqual:function(e){return function(t){return t>=e}},even:function(){return function(e){return e%2===0}},odd:function(){return function(e){return e%2!==0}},includes:function(e){return function(t){return~t.indexOf(e)}},schema:function(e){return Ja(e)},passesAnyOf:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(n){return e.some(function(r){return r.test(n)})}},optional:qa};function et(e){return function(t){return Array.isArray(t)&&e==="array"||t===null&&e==="null"||typeof t===e}}function Xa(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ja(e){return{simple:function(t){var n=[];if(Object.keys(e).forEach(function(r){var o=e[r];try{o.check((t||{})[r])}catch(i){i.target=r,n.push(i)}}),n.length>0)throw n;return!0},async:function(t){var n=[],r=Object.keys(e).map(function(o){var i=e[o];return i.testAsync((t||{})[o]).catch(function(s){s.target=o,n.push(s)})});return Promise.all(r).then(function(){if(n.length>0)throw n;return!0})}}}var B="colors",ee="sizes",R="space",Za={gap:R,gridGap:R,columnGap:R,gridColumnGap:R,rowGap:R,gridRowGap:R,inset:R,insetBlock:R,insetBlockEnd:R,insetBlockStart:R,insetInline:R,insetInlineEnd:R,insetInlineStart:R,margin:R,marginTop:R,marginRight:R,marginBottom:R,marginLeft:R,marginBlock:R,marginBlockEnd:R,marginBlockStart:R,marginInline:R,marginInlineEnd:R,marginInlineStart:R,padding:R,paddingTop:R,paddingRight:R,paddingBottom:R,paddingLeft:R,paddingBlock:R,paddingBlockEnd:R,paddingBlockStart:R,paddingInline:R,paddingInlineEnd:R,paddingInlineStart:R,top:R,right:R,bottom:R,left:R,scrollMargin:R,scrollMarginTop:R,scrollMarginRight:R,scrollMarginBottom:R,scrollMarginLeft:R,scrollMarginX:R,scrollMarginY:R,scrollMarginBlock:R,scrollMarginBlockEnd:R,scrollMarginBlockStart:R,scrollMarginInline:R,scrollMarginInlineEnd:R,scrollMarginInlineStart:R,scrollPadding:R,scrollPaddingTop:R,scrollPaddingRight:R,scrollPaddingBottom:R,scrollPaddingLeft:R,scrollPaddingX:R,scrollPaddingY:R,scrollPaddingBlock:R,scrollPaddingBlockEnd:R,scrollPaddingBlockStart:R,scrollPaddingInline:R,scrollPaddingInlineEnd:R,scrollPaddingInlineStart:R,fontSize:"fontSizes",background:B,backgroundColor:B,backgroundImage:B,borderImage:B,border:B,borderBlock:B,borderBlockEnd:B,borderBlockStart:B,borderBottom:B,borderBottomColor:B,borderColor:B,borderInline:B,borderInlineEnd:B,borderInlineStart:B,borderLeft:B,borderLeftColor:B,borderRight:B,borderRightColor:B,borderTop:B,borderTopColor:B,caretColor:B,color:B,columnRuleColor:B,fill:B,outline:B,outlineColor:B,stroke:B,textDecorationColor:B,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:ee,minBlockSize:ee,maxBlockSize:ee,inlineSize:ee,minInlineSize:ee,maxInlineSize:ee,width:ee,minWidth:ee,maxWidth:ee,height:ee,minHeight:ee,maxHeight:ee,flexBasis:ee,gridTemplateColumns:ee,gridTemplateRows:ee,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},Qa=(e,t)=>typeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,dt=()=>{const e=Object.create(null);return(t,n,...r)=>{const o=(i=>JSON.stringify(i,Qa))(t);return o in e?e[o]:e[o]=n(t,...r)}},Ye=Symbol.for("sxs.internal"),xr=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),Jr=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:ec}=Object.prototype,Xn=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),tc=/\s+(?![^()]*\))/,tt=e=>t=>e(...typeof t=="string"?String(t).split(tc):[t]),Zr={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:tt((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:tt((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:tt((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:tt((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:tt((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:tt((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},Mn=/([\d.]+)([^]*)/,nc=(e,t)=>e.length?e.reduce((n,r)=>(n.push(...t.map(o=>o.includes("&")?o.replace(/&/g,/[ +>|~]/.test(r)&&/&.*&/.test(o)?`:is(${r})`:r):r+" "+o)),n),[]):t,rc=(e,t)=>e in oc&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,r,o,i)=>r+(o==="stretch"?`-moz-available${i};${Xn(e)}:${r}-webkit-fill-available`:`-moz-fit-content${i};${Xn(e)}:${r}fit-content`)+i):String(t),oc={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},Ae=e=>e?e+"-":"",_i=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(r,o,i,s,a)=>s=="$"==!!i?r:(o||s=="--"?"calc(":"")+"var(--"+(s==="$"?Ae(t)+(a.includes("$")?"":Ae(n))+a.replace(/\$/g,"-"):a)+")"+(o||s=="--"?"*"+(o||"")+(i||"1")+")":"")),ic=/\s*,\s*(?![^()]*\))/,sc=Object.prototype.toString,rt=(e,t,n,r,o)=>{let i,s,a;const c=(l,u,d)=>{let p,h;const m=b=>{for(p in b){const w=p.charCodeAt(0)===64,$=w&&Array.isArray(b[p])?b[p]:[b[p]];for(h of $){const x=/[A-Z]/.test(v=p)?v:v.replace(/-[^]/g,E=>E[1].toUpperCase()),S=typeof h=="object"&&h&&h.toString===sc&&(!r.utils[x]||!u.length);if(x in r.utils&&!S){const E=r.utils[x];if(E!==s){s=E,m(E(h)),s=null;continue}}else if(x in Zr){const E=Zr[x];if(E!==a){a=E,m(E(h)),a=null;continue}}if(w&&(y=p.slice(1)in r.media?"@media "+r.media[p.slice(1)]:p,p=y.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(E,C,O,j,k,T)=>{const P=Mn.test(C),z=.0625*(P?-1:1),[A,L]=P?[j,C]:[C,j];return"("+(O[0]==="="?"":O[0]===">"===P?"max-":"min-")+A+":"+(O[0]!=="="&&O.length===1?L.replace(Mn,(I,F,V)=>Number(F)+z*(O===">"?1:-1)+V):L)+(k?") and ("+(k[0]===">"?"min-":"max-")+A+":"+(k.length===1?T.replace(Mn,(I,F,V)=>Number(F)+z*(k===">"?-1:1)+V):T):"")+")"})),S){const E=w?d.concat(p):[...d],C=w?[...u]:nc(u,p.split(ic));i!==void 0&&o(Qr(...i)),i=void 0,c(h,C,E)}else i===void 0&&(i=[[],u,d]),p=w||p.charCodeAt(0)!==36?p:`--${Ae(r.prefix)}${p.slice(1).replace(/\$/g,"-")}`,h=S?h:typeof h=="number"?h&&x in ac?String(h)+"px":String(h):_i(rc(x,h??""),r.prefix,r.themeMap[x]),i[0].push(`${w?`${p} `:`${Xn(p)}:`}${h}`)}}var y,v};m(l),i!==void 0&&o(Qr(...i)),i=void 0};c(e,t,n)},Qr=(e,t,n)=>`${n.map(r=>`${r}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,ac={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},eo=e=>String.fromCharCode(e+(e>25?39:97)),qe=e=>(t=>{let n,r="";for(n=Math.abs(t);n>52;n=n/52|0)r=eo(n%52)+r;return eo(n%52)+r})(((t,n)=>{let r=n.length;for(;r;)t=33*t^n.charCodeAt(--r);return t})(5381,JSON.stringify(e))>>>0),xt=["themed","global","styled","onevar","resonevar","allvar","inline"],cc=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},lc=e=>{let t;const n=()=>{const{cssRules:o}=t.sheet;return[].map.call(o,(i,s)=>{const{cssText:a}=i;let c="";if(a.startsWith("--sxs"))return"";if(o[s-1]&&(c=o[s-1].cssText).startsWith("--sxs")){if(!i.cssRules.length)return"";for(const l in t.rules)if(t.rules[l].group===i)return`--sxs{--sxs:${[...t.rules[l].cache].join(" ")}}${a}`;return i.cssRules.length?`${c}${a}`:""}return a}).join("")},r=()=>{if(t){const{rules:a,sheet:c}=t;if(!c.deleteRule){for(;Object(Object(c.cssRules)[0]).type===3;)c.cssRules.splice(0,1);c.cssRules=[]}for(const l in a)delete a[l]}const o=Object(e).styleSheets||[];for(const a of o)if(cc(a)){for(let c=0,l=a.cssRules;l[c];++c){const u=Object(l[c]);if(u.type!==1)continue;const d=Object(l[c+1]);if(d.type!==4)continue;++c;const{cssText:p}=u;if(!p.startsWith("--sxs"))continue;const h=p.slice(14,-3).trim().split(/\s+/),m=xt[h[0]];m&&(t||(t={sheet:a,reset:r,rules:{},toString:n}),t.rules[m]={group:d,index:c,cache:new Set(h)})}if(t)break}if(!t){const a=(c,l)=>({type:l,cssRules:[],insertRule(u,d){this.cssRules.splice(d,0,a(u,{import:3,undefined:1}[(u.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return c==="@media{}"?`@media{${[].map.call(this.cssRules,u=>u.cssText).join("")}}`:c}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:a("","text/css"),rules:{},reset:r,toString:n}}const{sheet:i,rules:s}=t;for(let a=xt.length-1;a>=0;--a){const c=xt[a];if(!s[c]){const l=xt[a+1],u=s[l]?s[l].index:i.cssRules.length;i.insertRule("@media{}",u),i.insertRule(`--sxs{--sxs:${a}}`,u),s[c]={group:i.cssRules[u+1],index:u,cache:new Set([a])}}uc(s[c])}};return r(),t},uc=e=>{const t=e.group;let n=t.cssRules.length;e.apply=r=>{try{t.insertRule(r,n),++n}catch{}}},wt=Symbol(),fc=dt(),to=(e,t)=>fc(e,()=>(...n)=>{let r={type:null,composers:new Set};for(const o of n)if(o!=null)if(o[Ye]){r.type==null&&(r.type=o[Ye].type);for(const i of o[Ye].composers)r.composers.add(i)}else o.constructor!==Object||o.$$typeof?r.type==null&&(r.type=o):r.composers.add(dc(o,e));return r.type==null&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),pc(e,r,t)}),dc=({variants:e,compoundVariants:t,defaultVariants:n,...r},o)=>{const i=`${Ae(o.prefix)}c-${qe(r)}`,s=[],a=[],c=Object.create(null),l=[];for(const p in n)c[p]=String(n[p]);if(typeof e=="object"&&e)for(const p in e){u=c,d=p,ec.call(u,d)||(c[p]="undefined");const h=e[p];for(const m in h){const b={[p]:String(m)};String(m)==="undefined"&&l.push(p);const y=h[m],v=[b,y,!Jr(y)];s.push(v)}}var u,d;if(typeof t=="object"&&t)for(const p of t){let{css:h,...m}=p;h=typeof h=="object"&&h||{};for(const y in m)m[y]=String(m[y]);const b=[m,h,!Jr(h)];a.push(b)}return[i,r,s,a,c,l]},pc=(e,t,n)=>{const[r,o,i,s]=hc(t.composers),a=typeof t.type=="function"||t.type.$$typeof?(d=>{function p(){for(let h=0;h<p[wt].length;h++){const[m,b]=p[wt][h];d.rules[m].apply(b)}return p[wt]=[],null}return p[wt]=[],p.rules={},xt.forEach(h=>p.rules[h]={apply:m=>p[wt].push([h,m])}),p})(n):null,c=(a||n).rules,l=`.${r}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,u=d=>{d=typeof d=="object"&&d||gc;const{css:p,...h}=d,m={};for(const v in i)if(delete h[v],v in d){let w=d[v];typeof w=="object"&&w?m[v]={"@initial":i[v],...w}:(w=String(w),m[v]=w!=="undefined"||s.has(v)?w:i[v])}else m[v]=i[v];const b=new Set([...o]);for(const[v,w,$,x]of t.composers){n.rules.styled.cache.has(v)||(n.rules.styled.cache.add(v),rt(w,[`.${v}`],[],e,C=>{c.styled.apply(C)}));const S=no($,m,e.media),E=no(x,m,e.media,!0);for(const C of S)if(C!==void 0)for(const[O,j,k]of C){const T=`${v}-${qe(j)}-${O}`;b.add(T);const P=(k?n.rules.resonevar:n.rules.onevar).cache,z=k?c.resonevar:c.onevar;P.has(T)||(P.add(T),rt(j,[`.${T}`],[],e,A=>{z.apply(A)}))}for(const C of E)if(C!==void 0)for(const[O,j]of C){const k=`${v}-${qe(j)}-${O}`;b.add(k),n.rules.allvar.cache.has(k)||(n.rules.allvar.cache.add(k),rt(j,[`.${k}`],[],e,T=>{c.allvar.apply(T)}))}}if(typeof p=="object"&&p){const v=`${r}-i${qe(p)}-css`;b.add(v),n.rules.inline.cache.has(v)||(n.rules.inline.cache.add(v),rt(p,[`.${v}`],[],e,w=>{c.inline.apply(w)}))}for(const v of String(d.className||"").trim().split(/\s+/))v&&b.add(v);const y=h.className=[...b].join(" ");return{type:t.type,className:y,selector:l,props:h,toString:()=>y,deferredInjector:a}};return xr(u,{className:r,selector:l,[Ye]:t,toString:()=>(n.rules.styled.cache.has(r)||u(),r)})},hc=e=>{let t="";const n=[],r={},o=[];for(const[i,,,,s,a]of e){t===""&&(t=i),n.push(i),o.push(...a);for(const c in s){const l=s[c];(r[c]===void 0||l!=="undefined"||a.includes(l))&&(r[c]=l)}}return[t,n,r,new Set(o)]},no=(e,t,n,r)=>{const o=[];e:for(let[i,s,a]of e){if(a)continue;let c,l=0,u=!1;for(c in i){const d=i[c];let p=t[c];if(p!==d){if(typeof p!="object"||!p)continue e;{let h,m,b=0;for(const y in p){if(d===String(p[y])){if(y!=="@initial"){const v=y.slice(1);(m=m||[]).push(v in n?n[v]:y.replace(/^@media ?/,"")),u=!0}l+=b,h=!0}++b}if(m&&m.length&&(s={["@media "+m.join(", ")]:s}),!h)continue e}}}(o[l]=o[l]||[]).push([r?"cv":`${c}-${i[c]}`,s,u])}return o},gc={},mc=dt(),bc=(e,t)=>mc(e,()=>(...n)=>{const r=()=>{for(let o of n){o=typeof o=="object"&&o||{};let i=qe(o);if(!t.rules.global.cache.has(i)){if(t.rules.global.cache.add(i),"@import"in o){let s=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let a of[].concat(o["@import"]))a=a.includes('"')||a.includes("'")?a:`"${a}"`,t.sheet.insertRule(`@import ${a};`,s++);delete o["@import"]}rt(o,[],[],e,s=>{t.rules.global.apply(s)})}}return""};return xr(r,{toString:r})}),vc=dt(),yc=(e,t)=>vc(e,()=>n=>{const r=`${Ae(e.prefix)}k-${qe(n)}`,o=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const i=[];rt(n,[],[],e,a=>i.push(a));const s=`@keyframes ${r}{${i.join("")}}`;t.rules.global.apply(s)}return r};return xr(o,{get name(){return o()},toString:o})}),wc=class{constructor(e,t,n,r){this.token=e==null?"":String(e),this.value=t==null?"":String(t),this.scale=n==null?"":String(n),this.prefix=r==null?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+Ae(this.prefix)+Ae(this.scale)+this.token}toString(){return this.computedValue}},$c=dt(),Ec=(e,t)=>$c(e,()=>(n,r)=>{r=typeof n=="object"&&n||Object(r);const o=`.${n=(n=typeof n=="string"?n:"")||`${Ae(e.prefix)}t-${qe(r)}`}`,i={},s=[];for(const c in r){i[c]={};for(const l in r[c]){const u=`--${Ae(e.prefix)}${c}-${l}`,d=_i(String(r[c][l]),e.prefix,c);i[c][l]=new wc(l,d,c,e.prefix),s.push(`${u}:${d}`)}}const a=()=>{if(s.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const c=`${r===e.theme?":root,":""}.${n}{${s.join(";")}}`;t.rules.themed.apply(c)}return n};return{...i,get className(){return a()},selector:o,toString:a}}),xc=dt(),Sc=dt(),Cc=e=>{const t=(n=>{let r=!1;const o=xc(n,i=>{r=!0;const s="prefix"in(i=typeof i=="object"&&i||{})?String(i.prefix):"",a=typeof i.media=="object"&&i.media||{},c=typeof i.root=="object"?i.root||null:globalThis.document||null,l=typeof i.theme=="object"&&i.theme||{},u={prefix:s,media:a,theme:l,themeMap:typeof i.themeMap=="object"&&i.themeMap||{...Za},utils:typeof i.utils=="object"&&i.utils||{}},d=lc(c),p={css:to(u,d),globalCss:bc(u,d),keyframes:yc(u,d),createTheme:Ec(u,d),reset(){d.reset(),p.theme.toString()},theme:{},sheet:d,config:u,prefix:s,getCssText:d.toString,toString:d.toString};return String(p.theme=p.createTheme(l)),p});return r||o.reset(),o})(e);return t.styled=(({config:n,sheet:r})=>Sc(n,()=>{const o=to(n,r);return(...i)=>{const s=o(...i),a=s[Ye].type,c=g.forwardRef((l,u)=>{const d=l&&l.as||a,{props:p,deferredInjector:h}=s(l);return delete p.as,p.ref=u,h?g.createElement(g.Fragment,null,g.createElement(d,p),g.createElement(h,null)):g.createElement(d,p)});return c.className=s.className,c.displayName=`Styled.${a.displayName||a.name||a}`,c.selector=s.selector,c.toString=()=>s.selector,c[Ye]=s[Ye],c}}))(t),t};function Oc(e,t,n){return Math.max(t,Math.min(e,n))}const Z={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function ro(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function oo(e,t,n,r=.15){return r===0?Oc(e,t,n):e<t?-ro(t-e,n-t,r)+t:e>n?+ro(e-n,n-t,r)+n:e}function _c(e,[t,n],[r,o]){const[[i,s],[a,c]]=e;return[oo(t,i,s,r),oo(n,a,c,o)]}function Rc(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pc(e){var t=Rc(e,"string");return typeof t=="symbol"?t:String(t)}function se(e,t,n){return t=Pc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?io(Object(n),!0).forEach(function(r){se(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):io(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const Ri={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function so(e){return e?e[0].toUpperCase()+e.slice(1):""}const Tc=["enter","leave"];function kc(e=!1,t){return e&&!Tc.includes(t)}function Ac(e,t="",n=!1){const r=Ri[e],o=r&&r[t]||t;return"on"+so(e)+so(o)+(kc(n,o)?"Capture":"")}const Dc=["gotpointercapture","lostpointercapture"];function Ic(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=Dc.includes(t)?"capturecapture":"capture",o=!!~t.indexOf(r);return o&&(t=t.replace("capture","")),{device:t,capture:o,passive:n}}function Mc(e,t=""){const n=Ri[e],r=n&&n[t]||t;return e+r}function $n(e){return"touches"in e}function Pi(e){return $n(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function jc(e){return Array.from(e.touches).filter(t=>{var n,r;return t.target===e.currentTarget||((n=e.currentTarget)===null||n===void 0||(r=n.contains)===null||r===void 0?void 0:r.call(n,t.target))})}function Lc(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function Ti(e){return $n(e)?Lc(e)[0]:e}function Nc(e){return jc(e).map(t=>t.identifier)}function jn(e){const t=Ti(e);return $n(e)?t.identifier:t.pointerId}function ao(e){const t=Ti(e);return[t.clientX,t.clientY]}function zc(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}function cn(e,...t){return typeof e=="function"?e(...t):e}function Fc(){}function Bc(...e){return e.length===0?Fc:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function co(e,t){return Object.assign({},t,e||{})}const Wc=32;class Hc{constructor(t,n,r){this.ctrl=t,this.args=n,this.key=r,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:n,ingKey:r,args:o}=this;n[r]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=o,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const n=this.state,r=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=t.target,n.currentTarget=t.currentTarget,n.lastOffset=r.from?cn(r.from,n):n.offset,n.offset=n.lastOffset,n.startTime=n.timeStamp=t.timeStamp)}computeValues(t){const n=this.state;n._values=t,n.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:n,config:r,shared:o}=this;n.args=this.args;let i=0;if(t&&(n.event=t,r.preventDefault&&t.cancelable&&n.event.preventDefault(),n.type=t.type,o.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,o.locked=!!document.pointerLockElement,Object.assign(o,zc(t)),o.down=o.pressed=o.buttons%2===1||o.touches>0,i=t.timeStamp-n.timeStamp,n.timeStamp=t.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const E=n._delta.map(Math.abs);Z.addTo(n._distance,E)}this.axisIntent&&this.axisIntent(t);const[s,a]=n._movement,[c,l]=r.threshold,{_step:u,values:d}=n;if(r.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(s)>=c&&d[0]),u[1]===!1&&(u[1]=Math.abs(a)>=l&&d[1])):(u[0]===!1&&(u[0]=Math.abs(s)>=c&&Math.sign(s)*c),u[1]===!1&&(u[1]=Math.abs(a)>=l&&Math.sign(a)*l)),n.intentional=u[0]!==!1||u[1]!==!1,!n.intentional)return;const p=[0,0];if(r.hasCustomTransform){const[E,C]=d;p[0]=u[0]!==!1?E-u[0]:0,p[1]=u[1]!==!1?C-u[1]:0}else p[0]=u[0]!==!1?s-u[0]:0,p[1]=u[1]!==!1?a-u[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(p);const h=n.offset,m=n._active&&!n._blocked||n.active;m&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=o[this.ingKey]=n._active,t&&(n.first&&("bounds"in r&&(n._bounds=cn(r.bounds,n)),this.setup&&this.setup()),n.movement=p,this.computeOffset()));const[b,y]=n.offset,[[v,w],[$,x]]=n._bounds;n.overflow=[b<v?-1:b>w?1:0,y<$?-1:y>x?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const S=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=_c(n._bounds,n.offset,S),n.delta=Z.sub(n.offset,h),this.computeMovement(),m&&(!n.last||i>Wc)){n.delta=Z.sub(n.offset,h);const E=n.delta.map(Math.abs);Z.addTo(n.distance,E),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&i>0&&(n.velocity=[E[0]/i,E[1]/i],n.timeDelta=i)}}emit(){const t=this.state,n=this.shared,r=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!r.triggerAllEvents)return;const o=this.handler(G(G(G({},n),t),{},{[this.aliasKey]:t.values}));o!==void 0&&(t.memo=o)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function Vc([e,t],n){const r=Math.abs(e),o=Math.abs(t);if(r>o&&r>n)return"x";if(o>r&&o>n)return"y"}class Uc extends Hc{constructor(...t){super(...t),se(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Z.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Z.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const n=this.state,r=this.config;if(!n.axis&&t){const o=typeof r.axisThreshold=="object"?r.axisThreshold[Pi(t)]:r.axisThreshold;n.axis=Vc(n._movement,o)}n._blocked=(r.lockDirection||!!r.axis)&&!n.axis||!!r.axis&&r.axis!==n.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const Kc=e=>e,lo=.15,ki={enabled(e=!0){return e},eventOptions(e,t,n){return G(G({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[lo,lo];case!1:return[0,0];default:return Z.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Z.toVector(e)},transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Kc},threshold(e){return Z.toVector(e,0)}},Gc=0,It=G(G({},ki),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Gc){return e},bounds(e={}){if(typeof e=="function")return i=>It.bounds(e(i));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),uo={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};class Yc extends Uc{constructor(...t){super(...t),se(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const n=t._bounds.getBoundingClientRect(),r=t.currentTarget.getBoundingClientRect(),o={left:n.left-r.left+t.offset[0],right:n.right-r.right+t.offset[0],top:n.top-r.top+t.offset[1],bottom:n.bottom-r.bottom+t.offset[1]};t._bounds=It.bounds(o)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const n=this.config,r=this.state;if(t.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(t.buttons):n.pointerButtons!==-1&&n.pointerButtons!==t.buttons))return;const o=this.ctrl.setEventIds(t);n.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(o&&o.size>1&&r._pointerActive)&&(this.start(t),this.setupPointer(t),r._pointerId=jn(t),r._pointerActive=!0,this.computeValues(ao(t)),this.computeInitial(),n.preventScrollAxis&&Pi(t)!=="mouse"?(r._active=!1,this.setupScrollPrevention(t)):n.delay>0?(this.setupDelayTrigger(t),n.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const n=this.state,r=this.config;if(!n._pointerActive)return;const o=jn(t);if(n._pointerId!==void 0&&o!==n._pointerId)return;const i=ao(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=Z.sub(i,n._values),this.computeValues(i)),Z.addTo(n._movement,n._delta),this.compute(t),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(t);return}if(r.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===r.preventScrollAxis||r.preventScrollAxis==="xy"){n._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{}const n=this.state,r=this.config;if(!n._active||!n._pointerActive)return;const o=jn(t);if(n._pointerId!==void 0&&o!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[i,s]=n._distance;if(n.tap=i<=r.tapsThreshold&&s<=r.tapsThreshold,n.tap&&r.filterTaps)n._force=!0;else{const[a,c]=n._delta,[l,u]=n._movement,[d,p]=r.swipe.velocity,[h,m]=r.swipe.distance,b=r.swipe.duration;if(n.elapsedTime<b){const y=Math.abs(a/n.timeDelta),v=Math.abs(c/n.timeDelta);y>d&&Math.abs(l)>h&&(n.swipe[0]=Math.sign(a)),v>p&&Math.abs(u)>m&&(n.swipe[1]=Math.sign(c))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const n=this.config,r=n.device;n.pointerLock&&t.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,r,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,qc(t);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const n=uo[t.key];if(n){const r=this.state,o=t.shiftKey?10:t.altKey?.1:1;this.start(t),r._delta=n(this.config.keyboardDisplacement,o),r._keyboardActive=!0,Z.addTo(r._movement,r._delta),this.compute(t),this.emit()}}keyUp(t){t.key in uo&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const n=this.config.device;t(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(n,"change",this.pointerMove.bind(this)),t(n,"end",this.pointerUp.bind(this)),t(n,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function qc(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const Mt=typeof window<"u"&&window.document&&window.document.createElement;function Ai(){return Mt&&"ontouchstart"in window}function Xc(){return Ai()||Mt&&window.navigator.maxTouchPoints>1}function Jc(){return Mt&&"onpointerdown"in window}function Zc(){return Mt&&"exitPointerLock"in window.document}function Qc(){try{return"constructor"in GestureEvent}catch{return!1}}const fe={isBrowser:Mt,gesture:Qc(),touch:Ai(),touchscreen:Xc(),pointer:Jc(),pointerLock:Zc()},el=250,tl=180,nl=.5,rl=50,ol=250,il=10,fo={mouse:0,touch:0,pen:8},sl=G(G({},It),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&fe.pointerLock,fe.touch&&n?"touch":this.pointerLock?"mouse":fe.pointer&&!o?"pointer":fe.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?el:void 0,!(!fe.touchscreen||n===!1))return e||(n!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&this.device==="pointer"&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o=void 0}){const i=Z.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=nl,distance:t=rl,duration:n=ol}={}){return{velocity:this.transform(Z.toVector(e)),distance:this.transform(Z.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return tl;case!1:return 0;default:return e}},axisThreshold(e){return e?G(G({},fo),e):fo},keyboardDisplacement(e=il){return e}});G(G({},ki),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!fe.touch&&fe.gesture)return"gesture";if(fe.touch&&r)return"touch";if(fe.touchscreen){if(fe.pointer)return"pointer";if(fe.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=s=>{const a=co(cn(n,s),{min:-1/0,max:1/0});return[a.min,a.max]},i=s=>{const a=co(cn(r,s),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof n!="function"&&typeof r!="function"?[o(),i()]:s=>[o(s),i(s)]},threshold(e,t,n){return this.lockDirection=n.axis==="lock",Z.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});G(G({},It),{},{mouseOnly:(e=!0)=>e});G(G({},It),{},{mouseOnly:(e=!0)=>e});const Di=new Map,Jn=new Map;function al(e){Di.set(e.key,e.engine),Jn.set(e.key,e.resolver)}const cl={key:"drag",engine:Yc,resolver:sl};function ll(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function ul(e,t){if(e==null)return{};var n=ll(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}const fl={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=fe.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},dl=["target","eventOptions","window","enabled","transform"];function tn(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=tn(e[r],o);break;case"boolean":o&&(n[r]=e[r]);break}return n}function pl(e,t,n={}){const r=e,{target:o,eventOptions:i,window:s,enabled:a,transform:c}=r,l=ul(r,dl);if(n.shared=tn({target:o,eventOptions:i,window:s,enabled:a,transform:c},fl),t){const u=Jn.get(t);n[t]=tn(G({shared:n.shared},l),u)}else for(const u in l){const d=Jn.get(u);d&&(n[u]=tn(G({shared:n.shared},l[u]),d))}return n}class Ii{constructor(t,n){se(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,r,o,i){const s=this._listeners,a=Mc(n,r),c=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},l=G(G({},c),i);t.addEventListener(a,o,l);const u=()=>{t.removeEventListener(a,o,l),s.delete(u)};return s.add(u),u}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class hl{constructor(){se(this,"_timeouts",new Map)}add(t,n,r=140,...o){this.remove(t),this._timeouts.set(t,window.setTimeout(n,r,...o))}remove(t){const n=this._timeouts.get(t);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class gl{constructor(t){se(this,"gestures",new Set),se(this,"_targetEventStore",new Ii(this)),se(this,"gestureEventStores",{}),se(this,"gestureTimeoutStores",{}),se(this,"handlers",{}),se(this,"config",{}),se(this,"pointerIds",new Set),se(this,"touchIds",new Set),se(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),ml(this,t)}setEventIds(t){if($n(t))return this.touchIds=new Set(Nc(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,n){this.handlers=t,this.nativeHandlers=n}applyConfig(t,n){this.config=pl(t,n,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const n=this.config.shared,r={};let o;if(!(n.target&&(o=n.target(),!o))){if(n.enabled){for(const s of this.gestures){const a=this.config[s],c=po(r,a.eventOptions,!!o);if(a.enabled){const l=Di.get(s);new l(this,t,s).bind(c)}}const i=po(r,n.eventOptions,!!o);for(const s in this.nativeHandlers)i(s,"",a=>this.nativeHandlers[s](G(G({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const i in r)r[i]=Bc(...r[i]);if(!o)return r;for(const i in r){const{device:s,capture:a,passive:c}=Ic(i);this._targetEventStore.add(o,s,"",r[i],{capture:a,passive:c})}}}}function nt(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Ii(e,t),e.gestureTimeoutStores[t]=new hl}function ml(e,t){t.drag&&nt(e,"drag"),t.wheel&&nt(e,"wheel"),t.scroll&&nt(e,"scroll"),t.move&&nt(e,"move"),t.pinch&&nt(e,"pinch"),t.hover&&nt(e,"hover")}const po=(e,t,n)=>(r,o,i,s={},a=!1)=>{var c,l;const u=(c=s.capture)!==null&&c!==void 0?c:t.capture,d=(l=s.passive)!==null&&l!==void 0?l:t.passive;let p=a?r:Ac(r,o,u);n&&d&&(p+="Passive"),e[p]=e[p]||[],e[p].push(i)};function bl(e,t={},n,r){const o=g.useMemo(()=>new gl(e),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),g.useEffect(o.effect.bind(o)),g.useEffect(()=>o.clean.bind(o),[]),t.target===void 0)return o.bind.bind(o)}function vl(e,t){return al(cl),bl({drag:e},t||{},"drag")}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Mi(e,t=[]){let n=[];function r(i,s){const a=f.createContext(s),c=n.length;n=[...n,s];function l(d){const{scope:p,children:h,...m}=d,b=(p==null?void 0:p[e][c])||a,y=f.useMemo(()=>m,Object.values(m));return f.createElement(b.Provider,{value:y},h)}function u(d,p){const h=(p==null?void 0:p[e][c])||a,m=f.useContext(h);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(a){const c=(a==null?void 0:a[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,yl(o,...t)]}function yl(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...a,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function pt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function wl(e,t=globalThis==null?void 0:globalThis.document){const n=pt(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Zn="dismissableLayer.update",$l="dismissableLayer.pointerDownOutside",El="dismissableLayer.focusOutside";let ho;const xl=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sl=f.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=f.useContext(xl),[d,p]=f.useState(null),h=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,m]=f.useState({}),b=ft(t,O=>p(O)),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(v),$=d?y.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=$>=w,E=Cl(O=>{const j=O.target,k=[...u.branches].some(T=>T.contains(j));!S||k||(i==null||i(O),a==null||a(O),O.defaultPrevented||c==null||c())},h),C=Ol(O=>{const j=O.target;[...u.branches].some(T=>T.contains(j))||(s==null||s(O),a==null||a(O),O.defaultPrevented||c==null||c())},h);return wl(O=>{$===u.layers.size-1&&(o==null||o(O),!O.defaultPrevented&&c&&(O.preventDefault(),c()))},h),f.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ho=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),go(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ho)}},[d,h,r,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),go())},[d,u]),f.useEffect(()=>{const O=()=>m({});return document.addEventListener(Zn,O),()=>document.removeEventListener(Zn,O)},[]),f.createElement(Ze.div,J({},l,{ref:b,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,E.onPointerDownCapture)}))});function Cl(e,t=globalThis==null?void 0:globalThis.document){const n=pt(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){ji($l,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ol(e,t=globalThis==null?void 0:globalThis.document){const n=pt(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&ji(El,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function go(){const e=new CustomEvent(Zn);document.dispatchEvent(e)}function ji(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ua(o,i):o.dispatchEvent(i)}const at=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},_l=Qs["useId".toString()]||(()=>{});let Rl=0;function Pl(e){const[t,n]=f.useState(_l());return at(()=>{e||n(r=>r??String(Rl++))},[e]),e||(t?`radix-${t}`:"")}const Tl=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return f.createElement(Ze.svg,J({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:f.createElement("polygon",{points:"0,0 30,0 15,10"}))}),kl=Tl;function Al(e){const[t,n]=f.useState(void 0);return at(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Li="Popper",[Ni,zi]=Mi(Li),[Dl,Fi]=Ni(Li),Il=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return f.createElement(Dl,{scope:t,anchor:r,onAnchorChange:o},n)},Ml="PopperAnchor",jl=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Fi(Ml,n),s=f.useRef(null),a=ft(t,s);return f.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:f.createElement(Ze.div,J({},o,{ref:a}))}),Bi="PopperContent",[Ll,Nl]=Ni(Bi),zl=f.forwardRef((e,t)=>{var n,r,o,i,s,a,c,l;const{__scopePopper:u,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:m=0,arrowPadding:b=0,avoidCollisions:y=!0,collisionBoundary:v=[],collisionPadding:w=0,sticky:$="partial",hideWhenDetached:x=!1,updatePositionStrategy:S="optimized",onPlaced:E,...C}=e,O=Fi(Bi,u),[j,k]=f.useState(null),T=ft(t,we=>k(we)),[P,z]=f.useState(null),A=Al(P),L=(n=A==null?void 0:A.width)!==null&&n!==void 0?n:0,I=(r=A==null?void 0:A.height)!==null&&r!==void 0?r:0,F=d+(h!=="center"?"-"+h:""),V=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},re=Array.isArray(v)?v:[v],Se=re.length>0,oe={padding:V,boundary:re.filter(Hl),altBoundary:Se},{refs:Ft,floatingStyles:bt,placement:Bt,isPositioned:We,middlewareData:ge}=Fa({strategy:"fixed",placement:F,whileElementsMounted:(...we)=>La(...we,{animationFrame:S==="always"}),elements:{reference:O.anchor},middleware:[ma({mainAxis:p+I,alignmentAxis:m}),y&&ba({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?va():void 0,...oe}),y&&pa({...oe}),ya({...oe,apply:({elements:we,rects:Ue,availableWidth:Cn,availableHeight:On})=>{const{width:_n,height:Ut}=Ue.reference,Ke=we.floating.style;Ke.setProperty("--radix-popper-available-width",`${Cn}px`),Ke.setProperty("--radix-popper-available-height",`${On}px`),Ke.setProperty("--radix-popper-anchor-width",`${_n}px`),Ke.setProperty("--radix-popper-anchor-height",`${Ut}px`)}}),P&&za({element:P,padding:b}),Vl({arrowWidth:L,arrowHeight:I}),x&&ha({strategy:"referenceHidden",...oe})]}),[He,Me]=Wi(Bt),Ve=pt(E);at(()=>{We&&(Ve==null||Ve())},[We,Ve]);const Wt=(o=ge.arrow)===null||o===void 0?void 0:o.x,Ht=(i=ge.arrow)===null||i===void 0?void 0:i.y,Vt=((s=ge.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[je,vt]=f.useState();return at(()=>{j&&vt(window.getComputedStyle(j).zIndex)},[j]),f.createElement("div",{ref:Ft.setFloating,"data-radix-popper-content-wrapper":"",style:{...bt,transform:We?bt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:je,"--radix-popper-transform-origin":[(a=ge.transformOrigin)===null||a===void 0?void 0:a.x,(c=ge.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},f.createElement(Ll,{scope:u,placedSide:He,onArrowChange:z,arrowX:Wt,arrowY:Ht,shouldHideArrow:Vt},f.createElement(Ze.div,J({"data-side":He,"data-align":Me},C,{ref:T,style:{...C.style,animation:We?void 0:"none",opacity:(l=ge.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),Fl="PopperArrow",Bl={top:"bottom",right:"left",bottom:"top",left:"right"},Wl=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Nl(Fl,r),s=Bl[i.placedSide];return f.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},f.createElement(kl,J({},o,{ref:n,style:{...o.style,display:"block"}})))});function Hl(e){return e!==null}const Vl=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,s;const{placement:a,rects:c,middlewareData:l}=t,d=((n=l.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[m,b]=Wi(a),y={start:"0%",center:"50%",end:"100%"}[b],v=((r=(o=l.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+p/2,w=((i=(s=l.arrow)===null||s===void 0?void 0:s.y)!==null&&i!==void 0?i:0)+h/2;let $="",x="";return m==="bottom"?($=d?y:`${v}px`,x=`${-h}px`):m==="top"?($=d?y:`${v}px`,x=`${c.floating.height+h}px`):m==="right"?($=`${-h}px`,x=d?y:`${w}px`):m==="left"&&($=`${c.floating.width+h}px`,x=d?y:`${w}px`),{data:{x:$,y:x}}}});function Wi(e){const[t,n="center"]=e.split("-");return[t,n]}const Ul=Il,Kl=jl,Gl=zl,Yl=Wl;function ql(e,t){return f.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Hi=e=>{const{present:t,children:n}=e,r=Xl(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=ft(r.ref,o.ref);return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};Hi.displayName="Presence";function Xl(e){const[t,n]=f.useState(),r=f.useRef({}),o=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[a,c]=ql(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const l=qt(r.current);i.current=a==="mounted"?l:"none"},[a]),at(()=>{const l=r.current,u=o.current;if(u!==e){const p=i.current,h=qt(l);e?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),at(()=>{if(t){const l=d=>{const h=qt(r.current).includes(d.animationName);d.target===t&&h&&gr.flushSync(()=>c("ANIMATION_END"))},u=d=>{d.target===t&&(i.current=qt(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function qt(e){return(e==null?void 0:e.animationName)||"none"}function Jl({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Zl({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=pt(n),c=f.useCallback(l=>{if(i){const d=typeof l=="function"?l(e):l;d!==e&&a(d)}else o(l)},[i,e,o,a]);return[s,c]}function Zl({defaultProp:e,onChange:t}){const n=f.useState(e),[r]=n,o=f.useRef(r),i=pt(t);return f.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Ql=f.forwardRef((e,t)=>f.createElement(Ze.span,J({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),eu=Ql,[En,Qg]=Mi("Tooltip",[zi]),xn=zi(),tu="TooltipProvider",Qn="tooltip.open",[em,Sr]=En(tu),Cr="Tooltip",[nu,Sn]=En(Cr),ru=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,c=Sr(Cr,e.__scopeTooltip),l=xn(t),[u,d]=f.useState(null),p=Pl(),h=f.useRef(0),m=s??c.disableHoverableContent,b=a??c.delayDuration,y=f.useRef(!1),[v=!1,w]=Jl({prop:r,defaultProp:o,onChange:C=>{C?(c.onOpen(),document.dispatchEvent(new CustomEvent(Qn))):c.onClose(),i==null||i(C)}}),$=f.useMemo(()=>v?y.current?"delayed-open":"instant-open":"closed",[v]),x=f.useCallback(()=>{window.clearTimeout(h.current),y.current=!1,w(!0)},[w]),S=f.useCallback(()=>{window.clearTimeout(h.current),w(!1)},[w]),E=f.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,w(!0)},b)},[b,w]);return f.useEffect(()=>()=>window.clearTimeout(h.current),[]),f.createElement(Ul,l,f.createElement(nu,{scope:t,contentId:p,open:v,stateAttribute:$,trigger:u,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayed?E():x()},[c.isOpenDelayed,E,x]),onTriggerLeave:f.useCallback(()=>{m?S():window.clearTimeout(h.current)},[S,m]),onOpen:x,onClose:S,disableHoverableContent:m},n))},mo="TooltipTrigger",ou=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Sn(mo,n),i=Sr(mo,n),s=xn(n),a=f.useRef(null),c=ft(t,a,o.onTriggerChange),l=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>l.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),f.createElement(Kl,J({asChild:!0},s),f.createElement(Ze.button,J({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:Oe(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:Oe(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:Oe(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Oe(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:Oe(e.onBlur,o.onClose),onClick:Oe(e.onClick,o.onClose)})))}),iu="TooltipPortal",[tm,su]=En(iu,{forceMount:void 0}),kt="TooltipContent",au=f.forwardRef((e,t)=>{const n=su(kt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Sn(kt,e.__scopeTooltip);return f.createElement(Hi,{present:r||s.open},s.disableHoverableContent?f.createElement(Vi,J({side:o},i,{ref:t})):f.createElement(cu,J({side:o},i,{ref:t})))}),cu=f.forwardRef((e,t)=>{const n=Sn(kt,e.__scopeTooltip),r=Sr(kt,e.__scopeTooltip),o=f.useRef(null),i=ft(t,o),[s,a]=f.useState(null),{trigger:c,onClose:l}=n,u=o.current,{onPointerInTransitChange:d}=r,p=f.useCallback(()=>{a(null),d(!1)},[d]),h=f.useCallback((m,b)=>{const y=m.currentTarget,v={x:m.clientX,y:m.clientY},w=pu(v,y.getBoundingClientRect()),$=hu(v,w),x=gu(b.getBoundingClientRect()),S=bu([...$,...x]);a(S),d(!0)},[d]);return f.useEffect(()=>()=>p(),[p]),f.useEffect(()=>{if(c&&u){const m=y=>h(y,u),b=y=>h(y,c);return c.addEventListener("pointerleave",m),u.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",b)}}},[c,u,h,p]),f.useEffect(()=>{if(s){const m=b=>{const y=b.target,v={x:b.clientX,y:b.clientY},w=(c==null?void 0:c.contains(y))||(u==null?void 0:u.contains(y)),$=!mu(v,s);w?p():$&&(p(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,u,s,l,p]),f.createElement(Vi,J({},e,{ref:i}))}),[lu,uu]=En(Cr,{isInside:!1}),Vi=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,c=Sn(kt,n),l=xn(n),{onClose:u}=c;return f.useEffect(()=>(document.addEventListener(Qn,u),()=>document.removeEventListener(Qn,u)),[u]),f.useEffect(()=>{if(c.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,u]),f.createElement(Sl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:u},f.createElement(Gl,J({"data-state":c.stateAttribute},l,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),f.createElement(Ei,null,r),f.createElement(lu,{scope:n,isInside:!0},f.createElement(eu,{id:c.contentId,role:"tooltip"},o||r))))}),fu="TooltipArrow",du=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xn(n);return uu(fu,n).isInside?null:f.createElement(Yl,J({},o,r,{ref:t}))});function pu(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function hu(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function gu(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function mu(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i].x,c=t[i].y,l=t[s].x,u=t[s].y;c>r!=u>r&&n<(l-a)*(r-c)/(u-c)+a&&(o=!o)}return o}function bu(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),vu(t)}function vu(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const yu=ru,wu=ou,$u=au,Eu=du;function xu(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function W(e,t){if(e==null)return{};var n=xu(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}let K;(function(e){e[e.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",e[e.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",e[e.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",e[e.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",e[e.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",e[e.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",e[e.THEME_ERROR=6]="THEME_ERROR",e[e.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",e[e.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",e[e.EMPTY_KEY=9]="EMPTY_KEY"})(K||(K={}));const Su={[K.UNSUPPORTED_INPUT]:(e,t)=>[`An input with type \`${e}\` input was found at path \`${t}\` but it's not supported yet.`],[K.NO_COMPONENT_FOR_TYPE]:(e,t)=>[`Type \`${e}\` found at path \`${t}\` can't be displayed in panel because no component supports it yet.`],[K.UNKNOWN_INPUT]:(e,t)=>[`input at path \`${e}\` is not recognized.`,t],[K.DUPLICATE_KEYS]:(e,t,n)=>[`Key \`${e}\` of path \`${t}\` already exists at path \`${n}\`. Even nested keys need to be unique. Rename one of the keys.`],[K.ALREADY_REGISTERED_TYPE]:e=>[`Type ${e} has already been registered. You can't register a component with the same type.`],[K.CLIPBOARD_ERROR]:e=>["Error copying the value",e],[K.THEME_ERROR]:(e,t)=>[`Error accessing the theme \`${e}.${t}\` value.`],[K.PATH_DOESNT_EXIST]:e=>[`Error getting the value at path \`${e}\`. There is probably an error in your \`render\` function.`],[K.PATH_DOESNT_EXIST]:e=>[`Error accessing the value at path \`${e}\``],[K.INPUT_TYPE_OVERRIDE]:(e,t,n)=>[`Input at path \`${e}\` already exists with type: \`${t}\`. Its type cannot be overridden with type \`${n}\`.`],[K.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function Ui(e,t,...n){const[r,...o]=Su[t](...n);console[e]("LEVA: "+r,...o)}const _e=Ui.bind(null,"warn"),Cu=Ui.bind(null,"log"),Ou=["value"],_u=["schema"],Ru=["value"],Ki=[],Je={};function bo(e){let{value:t}=e,n=W(e,Ou);for(let r of Ki){const o=r(t,n);if(o)return o}}function Ie(e,t){let{schema:n}=t,r=W(t,_u);if(e in Je){_e(K.ALREADY_REGISTERED_TYPE,e);return}Ki.push((o,i)=>n(o,i)&&e),Je[e]=r}function Ln(e,t,n,r){const{normalize:o}=Je[e];if(o)return o(t,n,r);if(typeof t!="object"||!("value"in t))return{value:t};const{value:i}=t,s=W(t,Ru);return{value:i,settings:s}}function Pu(e,t,n,r,o,i){const{sanitize:s}=Je[e];return s?s(t,n,r,o,i):t}function vo(e,t,n){const{format:r}=Je[e];return r?r(t,n):t}function Tu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yo(Object(n),!0).forEach(function(r){Tu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yo(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const Be=(e,t,n)=>e>n?n:e<t?t:e,ku=e=>{if(e===""||typeof e=="number")return e;try{const t=Le(e);if(!isNaN(t))return t}catch{}return parseFloat(e)},Au=Math.log(10);function wo(e){let t=Math.abs(+String(e).replace(".",""));if(t===0)return .01;for(;t!==0&&t%10===0;)t/=10;const n=Math.floor(Math.log(t)/Au)+1,r=Math.floor(Math.log10(Math.abs(e))),o=Math.pow(10,r-n);return Math.max(o,.001)}const ln=(e,t,n)=>n===t?0:(Be(e,t,n)-t)/(n-t),un=(e,t,n)=>e*(n-t)+t,Du=()=>"_"+Math.random().toString(36).substr(2,9),$o=/\(([0-9+\-*/^ .]+)\)/,Eo=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,xo=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,So=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,Co=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,Oo=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function Le(e){if(isNaN(Number(e)))if($o.test(e)){const t=e.replace($o,(n,r)=>String(Le(r)));return Le(t)}else if(Eo.test(e)){const t=e.replace(Eo,(n,r,o)=>String(Math.pow(Number(r),Number(o))));return Le(t)}else if(xo.test(e)){const t=e.replace(xo,(n,r,o)=>String(Number(r)*Number(o)));return Le(t)}else if(So.test(e)){const t=e.replace(So,(n,r,o)=>{if(o!=0)return String(Number(r)/Number(o));throw new Error("Division by zero")});return Le(t)}else if(Co.test(e)){const t=e.replace(Co,(n,r,o)=>String(Number(r)+Number(o)));return Le(t)}else if(Oo.test(e)){const t=e.replace(Oo,(n,r,o)=>String(Number(r)-Number(o)));return Le(t)}else return Number(e);return Number(e)}function Iu(e,t){return t.reduce((n,r)=>(e&&e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}function Mu(e,t){const n=M({},e);return t.forEach(r=>r in e&&delete n[r]),n}function ju(e,t){return e.reduce((n,r,o)=>Object.assign(n,{[t[o]]:r}),{})}function Gi(e){return Object.prototype.toString.call(e)==="[object Object]"}const Lu=e=>Gi(e)&&Object.keys(e).length===0;let be;(function(e){e.BUTTON="BUTTON",e.BUTTON_GROUP="BUTTON_GROUP",e.MONITOR="MONITOR",e.FOLDER="FOLDER"})(be||(be={}));let ve;(function(e){e.SELECT="SELECT",e.IMAGE="IMAGE",e.NUMBER="NUMBER",e.COLOR="COLOR",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.INTERVAL="INTERVAL",e.VECTOR3D="VECTOR3D",e.VECTOR2D="VECTOR2D"})(ve||(ve={}));const Nu=["type","__customInput"],zu=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],Fu=["type"];function Yi(e,t,n={},r){var o,i;if(typeof e!="object"||Array.isArray(e))return{type:r,input:e,options:M({key:t,label:t,optional:!1,disabled:!1,order:0},n)};if("__customInput"in e){const{type:S,__customInput:E}=e,C=W(e,Nu);return Yi(E,t,C,S)}const{render:s,label:a,optional:c,order:l=0,disabled:u,hint:d,onChange:p,onEditStart:h,onEditEnd:m,transient:b}=e,y=W(e,zu),v=M({render:s,key:t,label:a??t,hint:d,transient:b??!!p,onEditStart:h,onEditEnd:m,disabled:u,optional:c,order:l},n);let{type:w}=y,$=W(y,Fu);if(w=r??w,w in be)return{type:w,input:$,options:v};let x;return r&&Gi($)&&"value"in $?x=$.value:x=Lu($)?void 0:$,{type:w,input:x,options:M(M({},v),{},{onChange:p,optional:(o=v.optional)!==null&&o!==void 0?o:!1,disabled:(i=v.disabled)!==null&&i!==void 0?i:!1})}}function Bu(e,t,n,r){const o=Yi(e,t),{type:i,input:s,options:a}=o;if(i)return i in be?o:{type:i,input:Ln(i,s,n,r),options:a};let c=bo(s);return c?{type:c,input:Ln(c,s,n,r),options:a}:(c=bo({value:s}),c?{type:c,input:Ln(c,{value:s},n,r),options:a}:!1)}function _o(e,t,n,r,o){const{value:i,type:s,settings:a}=e;e.value=qi({type:s,value:i,settings:a},t,n,r),e.fromPanel=o}const Wu=function(t,n,r){this.type="LEVA_ERROR",this.message="LEVA: "+t,this.previousValue=n,this.error=r};function qi({type:e,value:t,settings:n},r,o,i){const s=e!=="SELECT"&&typeof r=="function"?r(t):r;let a;try{a=Pu(e,s,n,t,o,i)}catch(c){throw new Wu(`The value \`${r}\` did not result in a correct value.`,t,c)}return Pt(a,t)?t:a}const Xi=(e,t,n=!1)=>{let r=0;return function(){const o=arguments,i=n&&!r,s=()=>e.apply(this,o);window.clearTimeout(r),r=window.setTimeout(s,t),i&&s()}},Ji=e=>e.shiftKey?5:e.altKey?1/5:1;function Hu(e,t){const n=console.error;console.error=()=>{},ui.render(e,t),console.error=n}const Vu=["value"],Uu=["min","max"],Ku=e=>{if(typeof e=="number")return!0;if(typeof e=="string"){const t=parseFloat(e);return isNaN(t)?!1:e.substring((""+t).length).trim().length<4}return!1},Zi=(e,{min:t=-1/0,max:n=1/0,suffix:r})=>{const o=parseFloat(e);if(e===""||isNaN(o))throw Error("Invalid number");const i=Be(o,t,n);return r?i+r:i},Gu=(e,{pad:t=0,suffix:n})=>{const r=parseFloat(e).toFixed(t);return n?r+n:r},Qi=e=>{let{value:t}=e,n=W(e,Vu);const{min:r=-1/0,max:o=1/0}=n,i=W(n,Uu);let s=parseFloat(t);const a=typeof t=="string"?t.substring((""+s).length):void 0;s=Be(s,r,o);let c=n.step;c||(Number.isFinite(r)?Number.isFinite(o)?c=+(Math.abs(o-r)/100).toPrecision(1):c=+(Math.abs(s-r)/100).toPrecision(1):Number.isFinite(o)&&(c=+(Math.abs(o-s)/100).toPrecision(1)));const l=c?wo(c)*10:wo(s);c=c||l/10;const u=Math.round(Be(Math.log10(1/l),0,2));return{value:a?s+a:s,settings:M({initialValue:s,step:c,pad:u,min:r,max:o,suffix:a},i)}},es=(e,{step:t,initialValue:n})=>{const r=Math.round((e-n)/t);return n+r*t};var ts=Object.freeze({__proto__:null,schema:Ku,sanitize:Zi,format:Gu,normalize:Qi,sanitizeStep:es});function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y.apply(this,arguments)}const ns=f.createContext({});function Q(){return f.useContext(ns)}const Or=f.createContext(null),rs=f.createContext(null),os=f.createContext(null);function jt(){return f.useContext(rs)}function Yu(){return f.useContext(os)}const is=()=>({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function Xt(e,t){const[n,r]=e.split(" "),o={};return n!=="none"&&(o.boxShadow=`${t.inset?"inset ":""}0 0 0 $borderWidths${[t.key]} $colors${n!=="default"&&n||t.borderColor}`),r&&(o.backgroundColor=r),o}const $t={$inputStyle:()=>e=>Xt(e,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>e=>Xt(e,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>e=>Xt(e,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>e=>Xt(e,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:D,css:nm,createTheme:qu,globalCss:Xu,keyframes:rm}=Cc({prefix:"leva",theme:is(),utils:M(M({},$t),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:e=>({"&:focus":$t.$focusStyle()(e)}),$focusWithin:e=>({"&:focus-within":$t.$focusStyle()(e)}),$hover:e=>({"&:hover":$t.$hoverStyle()(e)}),$active:e=>({"&:active":$t.$activeStyle()(e)})})}),Ju=Xu({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function Zu(e){const t=is();if(!e)return{theme:t,className:""};Object.keys(e).forEach(r=>{Object.assign(t[r],e[r])});const n=qu(t);return{theme:t,className:n.className}}function Re(e,t){const{theme:n}=f.useContext(Or);if(!(e in n)||!(t in n[e]))return _e(K.THEME_ERROR,e,t),"";let r=t;for(;;){let o=n[e][r];if(typeof o=="string"&&o.charAt(0)==="$")r=o.substr(1);else return o}}const ss=D("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),as=D("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${ss}`]:{paddingLeft:0}}),Qu=D(as,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),ef=D("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),tf=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],nf=["onUpdate"];function _r(e){let{innerLabel:t,value:n,onUpdate:r,onChange:o,onKeyDown:i,type:s,id:a,inputType:c="text",rows:l=0}=e,u=W(e,tf);const{id:d,emitOnEditStart:p,emitOnEditEnd:h,disabled:m}=Q(),b=a||d,y=f.useRef(null),v=l>0,w=v?"textarea":"input",$=f.useCallback(E=>C=>{const O=C.currentTarget.value;E(O)},[]);g.useEffect(()=>{const E=y.current,C=$(O=>{r(O),h()});return E==null||E.addEventListener("blur",C),()=>E==null?void 0:E.removeEventListener("blur",C)},[$,r,h]);const x=f.useCallback(E=>{E.key==="Enter"&&$(r)(E)},[$,r]),S=Object.assign({as:w},v?{rows:l}:{},u);return g.createElement(ef,{textArea:v},t&&typeof t=="string"?g.createElement(as,null,t):t,g.createElement(ss,Y({levaType:s,ref:y,id:b,type:c,autoComplete:"off",spellCheck:"false",value:n,onChange:$(o),onFocus:()=>p(),onKeyPress:x,onKeyDown:i,disabled:m},S)))}function rf(e){let{onUpdate:t}=e,n=W(e,nf);const r=f.useCallback(i=>t(ku(i)),[t]),o=f.useCallback(i=>{const s=i.key==="ArrowUp"?1:i.key==="ArrowDown"?-1:0;if(s){i.preventDefault();const a=i.altKey?.1:i.shiftKey?10:1;t(c=>parseFloat(c)+s*a)}},[t]);return g.createElement(_r,Y({},n,{onUpdate:r,onKeyDown:o,type:"number"}))}const fn=D("div",{}),er=D("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]}),of=D("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${er}::after`]:{opacity:.6},[`${fn}:hover > & + ${er}::after`]:{opacity:.6},[`${fn}:hover > & > svg`]:{opacity:1}}),cs=D("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${fn}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),ls=D("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${cs} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),us=D(ls,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),sf=D("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),af=D("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),tr=D("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),cf=D("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${tr}`]:{pointerEvents:"auto"}}}}}),fs=D("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),lf=D("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),uf=D(Eu,{fill:"$toolTipBackground"});function Rr({children:e}){const{className:t}=f.useContext(Or);return g.createElement(Ga,{className:t},e)}const ff=["align"];function df(){const{id:e,disable:t,disabled:n}=Q();return g.createElement(g.Fragment,null,g.createElement(af,{id:e+"__disable",type:"checkbox",checked:!n,onChange:()=>t(!n)}),g.createElement("label",{htmlFor:e+"__disable"}))}function pf(e){const{id:t,optional:n,hint:r}=Q(),o=e.htmlFor||(t?{htmlFor:t}:null),i=!r&&typeof e.children=="string"?{title:e.children}:null;return g.createElement(g.Fragment,null,n&&g.createElement(df,null),r!==void 0?g.createElement(yu,null,g.createElement(wu,{asChild:!0},g.createElement(tr,Y({},o,e))),g.createElement($u,{side:"top",sideOffset:2},g.createElement(lf,null,r,g.createElement(uf,null)))):g.createElement(tr,Y({},o,i,e)))}function ye(e){let{align:t}=e,n=W(e,ff);const{value:r,label:o,key:i,disabled:s}=Q(),{hideCopyButton:a}=Yu(),c=!a&&i!==void 0,[l,u]=f.useState(!1),d=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[i]:r??""})),u(!0)}catch{_e(K.CLIPBOARD_ERROR,{[i]:r})}};return g.createElement(sf,{align:t,onPointerLeave:()=>u(!1)},g.createElement(pf,n),c&&!s&&g.createElement("div",{title:`Click to copy ${typeof o=="string"?o:i} value`},l?g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},g.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),g.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):g.createElement("svg",{onClick:d,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},g.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),g.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const hf=["toggled"],gf=D("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function Pr(e){let{toggled:t}=e,n=W(e,hf);return g.createElement(gf,Y({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${t?0:-90}deg)`}},n),g.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const mf=["input"];function he(e){let{input:t}=e,n=W(e,mf);return t?g.createElement(us,n):g.createElement(ls,n)}function ds({value:e,type:t,settings:n,setValue:r}){const[o,i]=f.useState(vo(t,e,n)),s=f.useRef(e),a=f.useRef(n);a.current=n;const c=f.useCallback(u=>i(vo(t,u,a.current)),[t]),l=f.useCallback(u=>{try{r(u)}catch(d){const{type:p,previousValue:h}=d;if(p!=="LEVA_ERROR")throw d;c(h)}},[c,r]);return f.useEffect(()=>{Pt(e,s.current)||c(e),s.current=e},[e,c]),{displayValue:o,onChange:i,onUpdate:l}}function Lt(e,t){const{emitOnEditStart:n,emitOnEditEnd:r}=Q();return vl(o=>{o.first&&(document.body.classList.add("leva__panel__dragged"),n==null||n());const i=e(o);return o.last&&(document.body.classList.remove("leva__panel__dragged"),r==null||r()),i},t)}function bf(e){const t=f.useRef(null),n=f.useRef(null),r=f.useRef(!1);return f.useEffect(()=>{const o=Xi(()=>{t.current.width=t.current.offsetWidth*window.devicePixelRatio,t.current.height=t.current.offsetHeight*window.devicePixelRatio,e(t.current,n.current)},250);return window.addEventListener("resize",o),r.current||(o(),r.current=!0),()=>window.removeEventListener("resize",o)},[e]),f.useEffect(()=>{n.current=t.current.getContext("2d")},[]),[t,n]}function ps(){const e=f.useRef(null),t=f.useRef({x:0,y:0}),n=f.useCallback(r=>{Object.assign(t.current,r),e.current&&(e.current.style.transform=`translate3d(${t.current.x}px, ${t.current.y}px, 0)`)},[]);return[e,n]}const vf=["__refCount"],Nn=(e,t)=>{if(!e[t])return null;const n=e[t];return W(n,vf)};function yf(e){const t=jt(),[n,r]=f.useState(Nn(t.getData(),e)),o=f.useCallback(l=>t.setValueAtPath(e,l,!0),[e,t]),i=f.useCallback(l=>t.setSettingsAtPath(e,l),[e,t]),s=f.useCallback(l=>t.disableInputAtPath(e,l),[e,t]),a=f.useCallback(()=>t.emitOnEditStart(e),[e,t]),c=f.useCallback(()=>t.emitOnEditEnd(e),[e,t]);return f.useEffect(()=>{r(Nn(t.getData(),e));const l=t.useStore.subscribe(u=>Nn(u.data,e),r,{equalityFn:Dt});return()=>l()},[t,e]),[n,{set:o,setSettings:i,disable:s,storeId:t.storeId,emitOnEditStart:a,emitOnEditEnd:c}]}const wf=D("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),hs=D("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),nr=D("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),gs=D("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),ms=D("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function $f({value:e,min:t,max:n,onDrag:r,step:o,initialValue:i}){const s=f.useRef(null),a=f.useRef(null),c=f.useRef(0),l=Re("sizes","scrubberWidth"),u=Lt(({event:p,first:h,xy:[m],movement:[b],memo:y})=>{if(h){const{width:w,left:$}=s.current.getBoundingClientRect();c.current=w-parseFloat(l),y=(p==null?void 0:p.target)===a.current?e:un((m-$)/w,t,n)}const v=y+un(b/c.current,0,n-t);return r(es(v,{step:o,initialValue:i})),y}),d=ln(e,t,n);return g.createElement(gs,Y({ref:s},u()),g.createElement(hs,null,g.createElement(ms,{style:{left:0,right:`${(1-d)*100}%`}})),g.createElement(nr,{ref:a,style:{left:`calc(${d} * (100% - ${l}))`}}))}const Ef=g.memo(({label:e,onUpdate:t,step:n,innerLabelTrim:r})=>{const[o,i]=f.useState(!1),s=Lt(({active:a,delta:[c],event:l,memo:u=0})=>(i(a),u+=c/2,Math.abs(u)>=1&&(t(d=>parseFloat(d)+Math.floor(u)*n*Ji(l)),u=0),u));return g.createElement(Qu,Y({dragging:o,title:e.length>1?e:""},s()),e.slice(0,r))});function bs({label:e,id:t,displayValue:n,onUpdate:r,onChange:o,settings:i,innerLabelTrim:s=1}){const a=s>0&&g.createElement(Ef,{label:e,step:i.step,onUpdate:r,innerLabelTrim:s});return g.createElement(rf,{id:t,value:String(n),onUpdate:r,onChange:o,innerLabel:a})}function xf(){const e=Q(),{label:t,value:n,onUpdate:r,settings:o,id:i}=e,{min:s,max:a}=o,c=a!==1/0&&s!==-1/0;return g.createElement(he,{input:!0},g.createElement(ye,null,t),g.createElement(wf,{hasRange:c},c&&g.createElement($f,Y({value:parseFloat(n),onDrag:r},o)),g.createElement(bs,Y({},e,{id:i,label:"value",innerLabelTrim:c?0:1}))))}const{sanitizeStep:Sf}=ts,Cf=W(ts,["sanitizeStep"]);var Of=M({component:xf},Cf);const _f=(e,t)=>ae().schema({options:ae().passesAnyOf(ae().object(),ae().array())}).test(t),Rf=(e,{values:t})=>{if(t.indexOf(e)<0)throw Error("Selected value doesn't match Select options");return e},Pf=(e,{values:t})=>t.indexOf(e),Tf=e=>{let{value:t,options:n}=e,r,o;return Array.isArray(n)?(o=n,r=n.map(i=>String(i))):(o=Object.values(n),r=Object.keys(n)),"value"in e?o.includes(t)||(r.unshift(String(t)),o.unshift(t)):t=o[0],Object.values(n).includes(t)||(n[String(t)]=t),{value:t,settings:{keys:r,values:o}}};var kf=Object.freeze({__proto__:null,schema:_f,sanitize:Rf,format:Pf,normalize:Tf});const Af=D("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),rr=D("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),Df=D("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${rr}:focus + &`]:{$focusStyle:""},[`${rr}:hover + &`]:{$hoverStyle:""}});function If({displayValue:e,value:t,onUpdate:n,id:r,settings:o,disabled:i}){const{keys:s,values:a}=o,c=f.useRef();return t===a[e]&&(c.current=s[e]),g.createElement(Af,null,g.createElement(rr,{id:r,value:e,onChange:l=>n(a[Number(l.currentTarget.value)]),disabled:i},s.map((l,u)=>g.createElement("option",{key:l,value:u},l))),g.createElement(Df,null,c.current),g.createElement(Pr,{toggled:!0}))}function Mf(){const{label:e,value:t,displayValue:n,onUpdate:r,id:o,disabled:i,settings:s}=Q();return g.createElement(he,{input:!0},g.createElement(ye,null,e),g.createElement(If,{id:o,value:t,displayValue:n,onUpdate:r,settings:s,disabled:i}))}var jf=M({component:Mf},kf);const Lf=e=>ae().string().test(e),Nf=e=>{if(typeof e!="string")throw Error("Invalid string");return e},zf=({value:e,editable:t=!0,rows:n=!1})=>({value:e,settings:{editable:t,rows:typeof n=="number"?n:n?5:0}});var Ff=Object.freeze({__proto__:null,schema:Lf,sanitize:Nf,normalize:zf});const Bf=["displayValue","onUpdate","onChange","editable"],Wf=D("div",{whiteSpace:"pre-wrap"});function Hf(e){let{displayValue:t,onUpdate:n,onChange:r,editable:o=!0}=e,i=W(e,Bf);return o?g.createElement(_r,Y({value:t,onUpdate:n,onChange:r},i)):g.createElement(Wf,null,t)}function Vf(){const{label:e,settings:t,displayValue:n,onUpdate:r,onChange:o}=Q();return g.createElement(he,{input:!0},g.createElement(ye,null,e),g.createElement(Hf,Y({displayValue:n,onUpdate:r,onChange:o},t)))}var Uf=M({component:Vf},Ff);const Kf=e=>ae().boolean().test(e),Gf=e=>{if(typeof e!="boolean")throw Error("Invalid boolean");return e};var Yf=Object.freeze({__proto__:null,schema:Kf,sanitize:Gf});const qf=D("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function Xf({value:e,onUpdate:t,id:n,disabled:r}){return g.createElement(qf,null,g.createElement("input",{id:n,type:"checkbox",checked:e,onChange:o=>t(o.currentTarget.checked),disabled:r}),g.createElement("label",{htmlFor:n},g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},g.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function Jf(){const{label:e,value:t,onUpdate:n,disabled:r,id:o}=Q();return g.createElement(he,{input:!0},g.createElement(ye,null,e),g.createElement(Xf,{value:t,onUpdate:n,id:o,disabled:r}))}var Zf=M({component:Jf},Yf);const Qf=["locked"];function ed({value:e,id:t,valueKey:n,settings:r,onUpdate:o,innerLabelTrim:i}){const s=f.useRef(e[n]);s.current=e[n];const a=f.useCallback(l=>o({[n]:qi({type:"NUMBER",value:s.current,settings:r},l)}),[o,r,n]),c=ds({type:"NUMBER",value:e[n],settings:r,setValue:a});return g.createElement(bs,{id:t,label:n,value:e[n],displayValue:c.displayValue,onUpdate:c.onUpdate,onChange:c.onChange,settings:r,innerLabelTrim:i})}const td=D("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function nd(e){let{locked:t}=e,n=W(e,Qf);return g.createElement("svg",Y({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),t?g.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}):g.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Tr({value:e,onUpdate:t,settings:n,innerLabelTrim:r}){const{id:o,setSettings:i}=Q(),{lock:s,locked:a}=n;return g.createElement(td,{withLock:s},s&&g.createElement(nd,{locked:a,onClick:()=>i({locked:!a})}),Object.keys(e).map((c,l)=>g.createElement(ed,{id:l===0?o:`${o}.${c}`,key:c,valueKey:c,value:e,settings:n[c],onUpdate:t,innerLabelTrim:r})))}const vs=(e,t)=>{const n={};let r=0,o=1/0;Object.entries(e).forEach(([i,s])=>{n[i]=Qi(M({value:s},t[i])).settings,r=Math.max(r,n[i].step),o=Math.min(o,n[i].pad)});for(let i in n){const{step:s,min:a,max:c}=t[i]||{};!isFinite(s)&&(!isFinite(a)||!isFinite(c))&&(n[i].step=r,n[i].pad=o)}return n},rd=["lock"],od=["value"];function id(e){const t=ae().array().length(e).every.number(),n=r=>{if(!r||typeof r!="object")return!1;const o=Object.values(r);return o.length===e&&o.every(i=>isFinite(i))};return r=>t.test(r)||n(r)}function sd(e){return Array.isArray(e)?"array":"object"}function St(e,t,n){return sd(e)===t?e:t==="array"?Object.values(e):ju(e,n)}const ad=(e,t,n)=>{const r=St(e,"object",t.keys);for(let s in r)r[s]=Zi(r[s],t[s]);const o=Object.keys(r);let i={};if(o.length===t.keys.length)i=r;else{const s=St(n,"object",t.keys);if(o.length===1&&t.locked){const a=o[0],c=r[a],l=s[a],u=l!==0?c/l:1;for(let d in s)d===a?i[a]=c:i[d]=s[d]*u}else i=M(M({},s),r)}return St(i,t.format,t.keys)},cd=(e,t)=>St(e,"object",t.keys),ld=e=>!!e&&("step"in e||"min"in e||"max"in e);function ud(e,t,n=[]){const{lock:r=!1}=t,o=W(t,rd),i=Array.isArray(e)?"array":"object",s=i==="object"?Object.keys(e):n,a=St(e,"object",s),c=ld(o)?s.reduce((u,d)=>Object.assign(u,{[d]:o}),{}):o,l=vs(a,c);return{value:i==="array"?e:a,settings:M(M({},l),{},{format:i,keys:s,lock:r,locked:!1})}}function ys(e){return{schema:id(e.length),normalize:t=>{let{value:n}=t,r=W(t,od);return ud(n,r,e)},format:(t,n)=>cd(t,n),sanitize:(t,n,r)=>ad(t,n,r)}}var fd={grad:.9,turn:360,rad:360/(2*Math.PI)},Ce=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},q=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},de=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},ws=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Ro=function(e){return{r:de(e.r,0,255),g:de(e.g,0,255),b:de(e.b,0,255),a:de(e.a)}},zn=function(e){return{r:q(e.r),g:q(e.g),b:q(e.b),a:q(e.a,3)}},dd=/^#([0-9a-f]{3,8})$/i,Jt=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},$s=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:o}},Es=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),c=r*(1-(1-t+i)*n),l=i%6;return{r:255*[r,a,s,s,c,r][l],g:255*[c,r,r,a,s,s][l],b:255*[s,s,c,r,r,a][l],a:o}},Po=function(e){return{h:ws(e.h),s:de(e.s,0,100),l:de(e.l,0,100),a:de(e.a)}},To=function(e){return{h:q(e.h),s:q(e.s),l:q(e.l),a:q(e.a,3)}},ko=function(e){return Es((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Ct=function(e){return{h:(t=$s(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},pd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,md=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,or={string:[[function(e){var t=dd.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?q(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?q(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=gd.exec(e)||md.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ro({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=pd.exec(e)||hd.exec(e);if(!t)return null;var n,r,o=Po({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(fd[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return ko(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=o===void 0?1:o;return Ce(t)&&Ce(n)&&Ce(r)?Ro({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=o===void 0?1:o;if(!Ce(t)||!Ce(n)||!Ce(r))return null;var s=Po({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return ko(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=o===void 0?1:o;if(!Ce(t)||!Ce(n)||!Ce(r))return null;var s=function(a){return{h:ws(a.h),s:de(a.s,0,100),v:de(a.v,0,100),a:de(a.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return Es(s)},"hsv"]]},Ao=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},xs=function(e){return typeof e=="string"?Ao(e.trim(),or.string):typeof e=="object"&&e!==null?Ao(e,or.object):[null,void 0]},bd=function(e){return xs(e)[1]},Fn=function(e,t){var n=Ct(e);return{h:n.h,s:de(n.s+100*t,0,100),l:n.l,a:n.a}},Bn=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Do=function(e,t){var n=Ct(e);return{h:n.h,s:n.s,l:de(n.l+100*t,0,100),a:n.a}},ir=function(){function e(t){this.parsed=xs(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return q(Bn(this.rgba),2)},e.prototype.isDark=function(){return Bn(this.rgba)<.5},e.prototype.isLight=function(){return Bn(this.rgba)>=.5},e.prototype.toHex=function(){return t=zn(this.rgba),n=t.r,r=t.g,o=t.b,s=(i=t.a)<1?Jt(q(255*i)):"","#"+Jt(n)+Jt(r)+Jt(o)+s;var t,n,r,o,i,s},e.prototype.toRgb=function(){return zn(this.rgba)},e.prototype.toRgbString=function(){return t=zn(this.rgba),n=t.r,r=t.g,o=t.b,(i=t.a)<1?"rgba("+n+", "+r+", "+o+", "+i+")":"rgb("+n+", "+r+", "+o+")";var t,n,r,o,i},e.prototype.toHsl=function(){return To(Ct(this.rgba))},e.prototype.toHslString=function(){return t=To(Ct(this.rgba)),n=t.h,r=t.s,o=t.l,(i=t.a)<1?"hsla("+n+", "+r+"%, "+o+"%, "+i+")":"hsl("+n+", "+r+"%, "+o+"%)";var t,n,r,o,i},e.prototype.toHsv=function(){return t=$s(this.rgba),{h:q(t.h),s:q(t.s),v:q(t.v),a:q(t.a,3)};var t},e.prototype.invert=function(){return te({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),te(Fn(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),te(Fn(this.rgba,-t))},e.prototype.grayscale=function(){return te(Fn(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),te(Do(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),te(Do(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?te({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):q(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=Ct(this.rgba);return typeof t=="number"?te({h:t,s:n.s,l:n.l,a:n.a}):q(n.h)},e.prototype.isEqual=function(t){return this.toHex()===te(t).toHex()},e}(),te=function(e){return e instanceof ir?e:new ir(e)},Io=[],vd=function(e){e.forEach(function(t){Io.indexOf(t)<0&&(t(ir,or),Io.push(t))})};function yd(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,l=r[this.toHex()];if(l)return l;if(s!=null&&s.closest){var u=this.toRgb(),d=1/0,p="black";if(!i.length)for(var h in n)i[h]=new e(n[h]).toRgb();for(var m in n){var b=(a=u,c=i[m],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));b<d&&(d=b,p=m)}return p}},t.string.push([function(s){var a=s.toLowerCase(),c=a==="transparent"?"#0000":n[a];return c?new e(c).toRgb():null},"name"])}function ht(){return(ht=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function kr(e,t){if(e==null)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function sr(e){var t=f.useRef(e),n=f.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var ct=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Ot=function(e){return"touches"in e},ar=function(e){return e&&e.ownerDocument.defaultView||self},Mo=function(e,t,n){var r=e.getBoundingClientRect(),o=Ot(t)?function(i,s){for(var a=0;a<i.length;a++)if(i[a].identifier===s)return i[a];return i[0]}(t.touches,n):t;return{left:ct((o.pageX-(r.left+ar(e).pageXOffset))/r.width),top:ct((o.pageY-(r.top+ar(e).pageYOffset))/r.height)}},jo=function(e){!Ot(e)&&e.preventDefault()},Ar=g.memo(function(e){var t=e.onMove,n=e.onKey,r=kr(e,["onMove","onKey"]),o=f.useRef(null),i=sr(t),s=sr(n),a=f.useRef(null),c=f.useRef(!1),l=f.useMemo(function(){var h=function(y){jo(y),(Ot(y)?y.touches.length>0:y.buttons>0)&&o.current?i(Mo(o.current,y,a.current)):b(!1)},m=function(){return b(!1)};function b(y){var v=c.current,w=ar(o.current),$=y?w.addEventListener:w.removeEventListener;$(v?"touchmove":"mousemove",h),$(v?"touchend":"mouseup",m)}return[function(y){var v=y.nativeEvent,w=o.current;if(w&&(jo(v),!function(x,S){return S&&!Ot(x)}(v,c.current)&&w)){if(Ot(v)){c.current=!0;var $=v.changedTouches||[];$.length&&(a.current=$[0].identifier)}w.focus(),i(Mo(w,v,a.current)),b(!0)}},function(y){var v=y.which||y.keyCode;v<37||v>40||(y.preventDefault(),s({left:v===39?.05:v===37?-.05:0,top:v===40?.05:v===38?-.05:0}))},b]},[s,i]),u=l[0],d=l[1],p=l[2];return f.useEffect(function(){return p},[p]),g.createElement("div",ht({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))}),Nt=function(e){return e.filter(Boolean).join(" ")},Dr=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,i=Nt(["react-colorful__pointer",e.className]);return g.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},g.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},ne=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Ss=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:ne(e.h),s:ne(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:ne(o/2),a:ne(r,2)}},cr=function(e){var t=Ss(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Wn=function(e){var t=Ss(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},Cs=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),c=r*(1-(1-t+i)*n),l=i%6;return{r:ne(255*[r,a,s,s,c,r][l]),g:ne(255*[c,r,r,a,s,s][l]),b:ne(255*[s,s,c,r,r,a][l]),a:ne(o,2)}},Os=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:ne(60*(a<0?a+6:a)),s:ne(i?s/i*100:0),v:ne(i/255*100),a:o}},_s=g.memo(function(e){var t=e.hue,n=e.onChange,r=Nt(["react-colorful__hue",e.className]);return g.createElement("div",{className:r},g.createElement(Ar,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:ct(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":ne(t),"aria-valuemax":"360","aria-valuemin":"0"},g.createElement(Dr,{className:"react-colorful__hue-pointer",left:t/360,color:cr({h:t,s:100,v:100,a:1})})))}),Rs=g.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:cr({h:t.h,s:100,v:100,a:1})};return g.createElement("div",{className:"react-colorful__saturation",style:r},g.createElement(Ar,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:ct(t.s+100*o.left,0,100),v:ct(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ne(t.s)+"%, Brightness "+ne(t.v)+"%"},g.createElement(Dr,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:cr(t)})))}),Ir=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function Ps(e,t,n){var r=sr(n),o=f.useState(function(){return e.toHsva(t)}),i=o[0],s=o[1],a=f.useRef({color:t,hsva:i});f.useEffect(function(){if(!e.equal(t,a.current.color)){var l=e.toHsva(t);a.current={hsva:l,color:t},s(l)}},[t,e]),f.useEffect(function(){var l;Ir(i,a.current.hsva)||e.equal(l=e.fromHsva(i),a.current.color)||(a.current={hsva:i,color:l},r(l))},[i,e,r]);var c=f.useCallback(function(l){s(function(u){return Object.assign({},u,l)})},[]);return[i,c]}var wd=typeof window<"u"?f.useLayoutEffect:f.useEffect,$d=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Lo=new Map,Ts=function(e){wd(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Lo.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Lo.set(t,n);var r=$d();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Ed=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,i=e.onChange,s=kr(e,["className","colorModel","color","onChange"]),a=f.useRef(null);Ts(a);var c=Ps(n,o,i),l=c[0],u=c[1],d=Nt(["react-colorful",t]);return g.createElement("div",ht({},s,{ref:a,className:d}),g.createElement(Rs,{hsva:l,onChange:u}),g.createElement(_s,{hue:l.h,onChange:u,className:"react-colorful__last-control"}))},xd=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+Wn(Object.assign({},n,{a:0}))+", "+Wn(Object.assign({},n,{a:1}))+")"},i=Nt(["react-colorful__alpha",t]),s=ne(100*n.a);return g.createElement("div",{className:i},g.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),g.createElement(Ar,{onMove:function(a){r({a:a.left})},onKey:function(a){r({a:ct(n.a+a.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},g.createElement(Dr,{className:"react-colorful__alpha-pointer",left:n.a,color:Wn(n)})))},Sd=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,i=e.onChange,s=kr(e,["className","colorModel","color","onChange"]),a=f.useRef(null);Ts(a);var c=Ps(n,o,i),l=c[0],u=c[1],d=Nt(["react-colorful",t]);return g.createElement("div",ht({},s,{ref:a,className:d}),g.createElement(Rs,{hsva:l,onChange:u}),g.createElement(_s,{hue:l.h,onChange:u}),g.createElement(xd,{hsva:l,onChange:u,className:"react-colorful__last-control"}))},Cd={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Os,fromHsva:Cs,equal:Ir},Od=function(e){return g.createElement(Sd,ht({},e,{colorModel:Cd}))},_d={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return Os({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(t=Cs(e)).r,g:t.g,b:t.b};var t},equal:Ir},Rd=function(e){return g.createElement(Ed,ht({},e,{colorModel:_d}))};function gt(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(d){s(d)}}function c(u){try{l(r.throw(u))}catch(d){s(d)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(e,t||[])).next())})}function mt(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Pd(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Td(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Pd(arguments[t]));return e}var kd=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function zt(e,t){var n=Ad(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Ad(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=kd.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var Dd=[".DS_Store","Thumbs.db"];function Id(e){return gt(this,void 0,void 0,function(){return mt(this,function(t){return dn(e)&&Md(e)?[2,zd(e.dataTransfer,e.type)]:jd(e)?[2,Ld(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Nd(e)]:[2,[]]})})}function Md(e){return dn(e.dataTransfer)}function jd(e){return dn(e)&&dn(e.target)}function dn(e){return typeof e=="object"&&e!==null}function Ld(e){return lr(e.target.files).map(function(t){return zt(t)})}function Nd(e){return gt(this,void 0,void 0,function(){var t;return mt(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return zt(r)})]}})})}function zd(e,t){return gt(this,void 0,void 0,function(){var n,r;return mt(this,function(o){switch(o.label){case 0:return e===null?[2,[]]:e.items?(n=lr(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Fd))]):[3,2];case 1:return r=o.sent(),[2,No(ks(r))];case 2:return[2,No(lr(e.files).map(function(i){return zt(i)}))]}})})}function No(e){return e.filter(function(t){return Dd.indexOf(t.name)===-1})}function lr(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Fd(e){if(typeof e.webkitGetAsEntry!="function")return zo(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?As(t):zo(e)}function ks(e){return e.reduce(function(t,n){return Td(t,Array.isArray(n)?ks(n):[n])},[])}function zo(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var n=zt(t);return Promise.resolve(n)}function Bd(e){return gt(this,void 0,void 0,function(){return mt(this,function(t){return[2,e.isDirectory?As(e):Wd(e)]})})}function As(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return gt(s,void 0,void 0,function(){var c,l,u;return mt(this,function(d){switch(d.label){case 0:if(a.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return c=d.sent(),n(c),[3,4];case 3:return l=d.sent(),r(l),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(Bd)),o.push(u),i(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function Wd(e){return gt(this,void 0,void 0,function(){return mt(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=zt(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var Hd=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function Fo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Bo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fo(Object(n),!0).forEach(function(r){Ds(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fo(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ds(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wo(e,t){return Gd(e)||Kd(e,t)||Ud(e,t)||Vd()}function Vd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ud(e,t){if(e){if(typeof e=="string")return Ho(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ho(e,t)}}function Ho(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kd(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Gd(e){if(Array.isArray(e))return e}var Yd="file-invalid-type",qd="file-too-large",Xd="file-too-small",Jd="too-many-files",Zd=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:Yd,message:"File type must be ".concat(n)}},Vo=function(t){return{code:qd,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Uo=function(t){return{code:Xd,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Qd={code:Jd,message:"Too many files"};function Is(e,t){var n=e.type==="application/x-moz-file"||Hd(e,t);return[n,n?null:Zd(t)]}function Ms(e,t,n){if(Et(e.size))if(Et(t)&&Et(n)){if(e.size>n)return[!1,Vo(n)];if(e.size<t)return[!1,Uo(t)]}else{if(Et(t)&&e.size<t)return[!1,Uo(t)];if(Et(n)&&e.size>n)return[!1,Vo(n)]}return[!0,null]}function Et(e){return e!=null}function ep(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(a){var c=Is(a,n),l=Wo(c,1),u=l[0],d=Ms(a,r,o),p=Wo(d,1),h=p[0];return u&&h})}function pn(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Zt(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ko(e){e.preventDefault()}function tp(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function np(e){return e.indexOf("Edge/")!==-1}function rp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return tp(e)||np(e)}function $e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!pn(r)&&a&&a.apply(void 0,[r].concat(i)),pn(r)})}}function op(){return"showOpenFilePicker"in window}function ip(e){return e=typeof e=="string"?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter(function(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}).reduce(function(t,n){return Bo(Bo({},t),{},Ds({},n,[]))},{}):{}}]}function sp(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ap(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}var cp=["children"],lp=["open"],up=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],fp=["refKey","onChange","onClick"];function dp(e){return gp(e)||hp(e)||js(e)||pp()}function pp(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hp(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gp(e){if(Array.isArray(e))return ur(e)}function Hn(e,t){return vp(e)||bp(e,t)||js(e,t)||mp()}function mp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function js(e,t){if(e){if(typeof e=="string")return ur(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ur(e,t)}}function ur(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bp(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function vp(e){if(Array.isArray(e))return e}function Go(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Go(Object(n),!0).forEach(function(r){fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Go(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hn(e,t){if(e==null)return{};var n=yp(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yp(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Mr=f.forwardRef(function(e,t){var n=e.children,r=hn(e,cp),o=Ns(r),i=o.open,s=hn(o,lp);return f.useImperativeHandle(t,function(){return{open:i}},[i]),g.createElement(f.Fragment,null,n(U(U({},s),{},{open:i})))});Mr.displayName="Dropzone";var Ls={disabled:!1,getFilesFromEvent:Id,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Mr.defaultProps=Ls;Mr.propTypes={children:H.func,accept:H.oneOfType([H.string,H.arrayOf(H.string)]),multiple:H.bool,preventDropOnDocument:H.bool,noClick:H.bool,noKeyboard:H.bool,noDrag:H.bool,noDragEventsBubbling:H.bool,minSize:H.number,maxSize:H.number,maxFiles:H.number,disabled:H.bool,getFilesFromEvent:H.func,onFileDialogCancel:H.func,onFileDialogOpen:H.func,useFsAccessApi:H.bool,onDragEnter:H.func,onDragLeave:H.func,onDragOver:H.func,onDrop:H.func,onDropAccepted:H.func,onDropRejected:H.func,validator:H.func};var dr={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Ns(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=U(U({},Ls),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,p=t.onDrop,h=t.onDropAccepted,m=t.onDropRejected,b=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.preventDropOnDocument,$=t.noClick,x=t.noKeyboard,S=t.noDrag,E=t.noDragEventsBubbling,C=t.validator,O=f.useMemo(function(){return typeof y=="function"?y:Yo},[y]),j=f.useMemo(function(){return typeof b=="function"?b:Yo},[b]),k=f.useRef(null),T=f.useRef(null),P=f.useReducer(wp,dr),z=Hn(P,2),A=z[0],L=z[1],I=A.isFocused,F=A.isFileDialogActive,V=A.draggedFiles,re=f.useRef(typeof window<"u"&&window.isSecureContext&&v&&op()),Se=function(){!re.current&&F&&setTimeout(function(){if(T.current){var N=T.current.files;N.length||(L({type:"closeDialog"}),j())}},300)};f.useEffect(function(){return window.addEventListener("focus",Se,!1),function(){window.removeEventListener("focus",Se,!1)}},[T,F,j,re]);var oe=f.useRef([]),Ft=function(N){k.current&&k.current.contains(N.target)||(N.preventDefault(),oe.current=[])};f.useEffect(function(){return w&&(document.addEventListener("dragover",Ko,!1),document.addEventListener("drop",Ft,!1)),function(){w&&(document.removeEventListener("dragover",Ko),document.removeEventListener("drop",Ft))}},[k,w]);var bt=f.useCallback(function(_){_.preventDefault(),_.persist(),Ue(_),oe.current=[].concat(dp(oe.current),[_.target]),Zt(_)&&Promise.resolve(o(_)).then(function(N){pn(_)&&!E||(L({draggedFiles:N,isDragActive:!0,type:"setDraggedFiles"}),l&&l(_))})},[o,l,E]),Bt=f.useCallback(function(_){_.preventDefault(),_.persist(),Ue(_);var N=Zt(_);if(N&&_.dataTransfer)try{_.dataTransfer.dropEffect="copy"}catch{}return N&&d&&d(_),!1},[d,E]),We=f.useCallback(function(_){_.preventDefault(),_.persist(),Ue(_);var N=oe.current.filter(function(ie){return k.current&&k.current.contains(ie)}),X=N.indexOf(_.target);X!==-1&&N.splice(X,1),oe.current=N,!(N.length>0)&&(L({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),Zt(_)&&u&&u(_))},[k,u,E]),ge=f.useCallback(function(_,N){var X=[],ie=[];_.forEach(function(me){var yt=Is(me,n),Qe=Hn(yt,2),Rn=Qe[0],Pn=Qe[1],Tn=Ms(me,s,i),Kt=Hn(Tn,2),kn=Kt[0],An=Kt[1],Dn=C?C(me):null;if(Rn&&kn&&!Dn)X.push(me);else{var In=[Pn,An];Dn&&(In=In.concat(Dn)),ie.push({file:me,errors:In.filter(function(Zs){return Zs})})}}),(!a&&X.length>1||a&&c>=1&&X.length>c)&&(X.forEach(function(me){ie.push({file:me,errors:[Qd]})}),X.splice(0)),L({acceptedFiles:X,fileRejections:ie,type:"setFiles"}),p&&p(X,ie,N),ie.length>0&&m&&m(ie,N),X.length>0&&h&&h(X,N)},[L,a,n,s,i,c,p,h,m,C]),He=f.useCallback(function(_){_.preventDefault(),_.persist(),Ue(_),oe.current=[],Zt(_)&&Promise.resolve(o(_)).then(function(N){pn(_)&&!E||ge(N,_)}),L({type:"reset"})},[o,ge,E]),Me=f.useCallback(function(){if(re.current){L({type:"openDialog"}),O();var _={multiple:a,types:ip(n)};window.showOpenFilePicker(_).then(function(N){return o(N)}).then(function(N){ge(N,null),L({type:"closeDialog"})}).catch(function(N){sp(N)?(j(N),L({type:"closeDialog"})):ap(N)&&(re.current=!1,T.current&&(T.current.value=null,T.current.click()))});return}T.current&&(L({type:"openDialog"}),O(),T.current.value=null,T.current.click())},[L,O,j,v,ge,n,a]),Ve=f.useCallback(function(_){!k.current||!k.current.isEqualNode(_.target)||(_.key===" "||_.key==="Enter"||_.keyCode===32||_.keyCode===13)&&(_.preventDefault(),Me())},[k,Me]),Wt=f.useCallback(function(){L({type:"focus"})},[]),Ht=f.useCallback(function(){L({type:"blur"})},[]),Vt=f.useCallback(function(){$||(rp()?setTimeout(Me,0):Me())},[$,Me]),je=function(N){return r?null:N},vt=function(N){return x?null:je(N)},we=function(N){return S?null:je(N)},Ue=function(N){E&&N.stopPropagation()},Cn=f.useMemo(function(){return function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=_.refKey,X=N===void 0?"ref":N,ie=_.role,me=_.onKeyDown,yt=_.onFocus,Qe=_.onBlur,Rn=_.onClick,Pn=_.onDragEnter,Tn=_.onDragOver,Kt=_.onDragLeave,kn=_.onDrop,An=hn(_,up);return U(U(fr({onKeyDown:vt($e(me,Ve)),onFocus:vt($e(yt,Wt)),onBlur:vt($e(Qe,Ht)),onClick:je($e(Rn,Vt)),onDragEnter:we($e(Pn,bt)),onDragOver:we($e(Tn,Bt)),onDragLeave:we($e(Kt,We)),onDrop:we($e(kn,He)),role:typeof ie=="string"&&ie!==""?ie:"button"},X,k),!r&&!x?{tabIndex:0}:{}),An)}},[k,Ve,Wt,Ht,Vt,bt,Bt,We,He,x,S,r]),On=f.useCallback(function(_){_.stopPropagation()},[]),_n=f.useMemo(function(){return function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=_.refKey,X=N===void 0?"ref":N,ie=_.onChange,me=_.onClick,yt=hn(_,fp),Qe=fr({accept:n,multiple:a,type:"file",style:{display:"none"},onChange:je($e(ie,He)),onClick:je($e(me,On)),tabIndex:-1},X,T);return U(U({},Qe),yt)}},[T,n,a,He,r]),Ut=V.length,Ke=Ut>0&&ep({files:V,accept:n,minSize:s,maxSize:i,multiple:a,maxFiles:c}),Js=Ut>0&&!Ke;return U(U({},A),{},{isDragAccept:Ke,isDragReject:Js,isFocused:I&&!r,getRootProps:Cn,getInputProps:_n,rootRef:k,inputRef:T,open:je(Me)})}function wp(e,t){switch(t.type){case"focus":return U(U({},e),{},{isFocused:!0});case"blur":return U(U({},e),{},{isFocused:!1});case"openDialog":return U(U({},dr),{},{isFileDialogActive:!0});case"closeDialog":return U(U({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return U(U({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return U(U({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return U({},dr);default:return e}}function Yo(){}function $p(e){let t;const n=new Set,r=(l,u)=>{const d=typeof l=="function"?l(t):l;if(d!==t){const p=t;t=u?d:Object.assign({},t,d),n.forEach(h=>h(t,p))}},o=()=>t,i=(l,u=o,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=u(t);function h(){const m=u(t);if(!d(p,m)){const b=p;l(p=m,b)}}return n.add(h),()=>n.delete(h)},c={setState:r,getState:o,subscribe:(l,u,d)=>u||d?i(l,u,d):(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,o,c),c}const Ep=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),qo=Ep?f.useEffect:f.useLayoutEffect;function xp(e){const t=typeof e=="function"?$p(e):e,n=(r=t.getState,o=Object.is)=>{const[,i]=f.useReducer(y=>y+1,0),s=t.getState(),a=f.useRef(s),c=f.useRef(r),l=f.useRef(o),u=f.useRef(!1),d=f.useRef();d.current===void 0&&(d.current=r(s));let p,h=!1;(a.current!==s||c.current!==r||l.current!==o||u.current)&&(p=r(s),h=!o(d.current,p)),qo(()=>{h&&(d.current=p),a.current=s,c.current=r,l.current=o,u.current=!1});const m=f.useRef(s);qo(()=>{const y=()=>{try{const w=t.getState(),$=c.current(w);l.current(d.current,$)||(a.current=w,d.current=$,i())}catch{u.current=!0,i()}},v=t.subscribe(y);return t.getState()!==m.current&&y(),v},[]);const b=h?p:d.current;return f.useDebugValue(b),b};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,t];return{next(){const o=r.length<=0;return{value:r.shift(),done:o}}}},n}const Sp=e=>(t,n,r)=>{const o=r.subscribe;return r.subscribe=(s,a,c)=>{let l=s;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let d=s(r.getState());l=p=>{const h=s(p);if(!u(d,h)){const m=d;a(d=h,m)}},c!=null&&c.fireImmediately&&a(d,d)}return o(l)},e(t,n,r)};/*!
|
|
5
|
+
* isobject <https://github.com/jonschlinkert/isobject>
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
8
|
+
* Released under the MIT License.
|
|
9
|
+
*/var Cp=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1};/*!
|
|
10
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
13
|
+
* Released under the MIT License.
|
|
14
|
+
*/var Op=Cp;function Xo(e){return Op(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var zs=function(t){var n,r;return!(Xo(t)===!1||(n=t.constructor,typeof n!="function")||(r=n.prototype,Xo(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*!
|
|
15
|
+
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) 2015-2017, Jon Schlinkert.
|
|
18
|
+
* Released under the MIT License.
|
|
19
|
+
*/var _p=zs,jr=function(t){return _p(t)||typeof t=="function"||Array.isArray(t)};/*!
|
|
20
|
+
* for-in <https://github.com/jonschlinkert/for-in>
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
23
|
+
* Released under the MIT License.
|
|
24
|
+
*/var Rp=function(t,n,r){for(var o in t)if(n.call(r,t[o],o,t)===!1)break},Pp=jr,Tp=Rp;function Fs(e,t){for(var n=arguments.length,r=0;++r<n;){var o=arguments[r];pr(o)&&Tp(o,kp,e)}return e}function kp(e,t){if(Ap(t)){var n=this[t];pr(e)&&pr(n)?Fs(n,e):this[t]=e}}function pr(e){return Pp(e)&&!Array.isArray(e)}function Ap(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}var Dp=Fs;/*!
|
|
25
|
+
* get-value <https://github.com/jonschlinkert/get-value>
|
|
26
|
+
*
|
|
27
|
+
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
28
|
+
* Licensed under the MIT License.
|
|
29
|
+
*/var Ip=function(e,t,n,r,o){if(!Mp(e)||!t)return e;if(t=Qt(t),n&&(t+="."+Qt(n)),r&&(t+="."+Qt(r)),o&&(t+="."+Qt(o)),t in e)return e[t];for(var i=t.split("."),s=i.length,a=-1;e&&++a<s;){for(var c=i[a];c[c.length-1]==="\\";)c=c.slice(0,-1)+"."+i[++a];e=e[c]}return e};function Mp(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function Qt(e){return e?Array.isArray(e)?e.join("."):e:""}/*!
|
|
30
|
+
* assign-symbols <https://github.com/jonschlinkert/assign-symbols>
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) 2015, Jon Schlinkert.
|
|
33
|
+
* Licensed under the MIT License.
|
|
34
|
+
*/var jp=function(e,t){if(e===null||typeof e>"u")throw new TypeError("expected first argument to be an object.");if(typeof t>"u"||typeof Symbol>"u"||typeof Object.getOwnPropertySymbols!="function")return e;for(var n=Object.prototype.propertyIsEnumerable,r=Object(e),o=arguments.length,i=0;++i<o;)for(var s=Object(arguments[i]),a=Object.getOwnPropertySymbols(s),c=0;c<a.length;c++){var l=a[c];n.call(s,l)&&(r[l]=s[l])}return r},Lp=jr,Np=jp,zp=Object.assign||function(e){if(e===null||typeof e>"u")throw new TypeError("Cannot convert undefined or null to object");Jo(e)||(e={});for(var t=1;t<arguments.length;t++){var n=arguments[t];Bp(n)&&(n=Wp(n)),Jo(n)&&(Fp(e,n),Np(e,n))}return e};function Fp(e,t){for(var n in t)Hp(t,n)&&(e[n]=t[n])}function Bp(e){return e&&typeof e=="string"}function Wp(e){var t={};for(var n in e)t[n]=e[n];return t}function Jo(e){return e&&typeof e=="object"||Lp(e)}function Hp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}/*!
|
|
35
|
+
* split-string <https://github.com/jonschlinkert/split-string>
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) 2015-2017, Jon Schlinkert.
|
|
38
|
+
* Released under the MIT License.
|
|
39
|
+
*/var Vp=zp,Up=function(e,t,n){if(typeof e!="string")throw new TypeError("expected a string");typeof t=="function"&&(n=t,t=null),typeof t=="string"&&(t={sep:t});var r=Vp({sep:"."},t),o=r.quotes||['"',"'","`"],i;r.brackets===!0?i={"<":">","(":")","[":"]","{":"}"}:r.brackets&&(i=r.brackets);var s=[],a=[],c=[""],l=r.sep,u=e.length,d=-1,p;function h(){if(i&&a.length)return i[a[a.length-1]]}for(;++d<u;){var m=e[d],b=e[d+1],y={val:m,idx:d,arr:c,str:e};if(s.push(y),m==="\\"){y.val=Gp(r,e,d)===!0?m+b:b,y.escaped=!0,typeof n=="function"&&n(y),c[c.length-1]+=y.val,d++;continue}if(i&&i[m]){a.push(m);var v=h(),w=d+1;if(e.indexOf(v,w+1)!==-1)for(;a.length&&w<u;){var $=e[++w];if($==="\\"){$++;continue}if(o.indexOf($)!==-1){w=hr(e,$,w+1);continue}if(v=h(),a.length&&e.indexOf(v,w+1)===-1)break;if(i[$]){a.push($);continue}v===$&&a.pop()}if(p=w,p===-1){c[c.length-1]+=m;continue}m=e.slice(d,p+1),y.val=m,y.idx=d=p}if(o.indexOf(m)!==-1){if(p=hr(e,m,d+1),p===-1){c[c.length-1]+=m;continue}Kp(m,r)===!0?m=e.slice(d,p+1):m=e.slice(d+1,p),y.val=m,y.idx=d=p}if(typeof n=="function"&&(n(y,s),m=y.val,d=y.idx),y.val===l&&y.split!==!1){c.push("");continue}c[c.length-1]+=y.val}return c};function hr(e,t,n,r){var o=e.indexOf(t,n);return e.charAt(o-1)==="\\"?hr(e,t,o+1):o}function Kp(e,t){return t.keepDoubleQuotes===!0&&e==='"'||t.keepSingleQuotes===!0&&e==="'"?!0:t.keepQuotes}function Gp(e,t,n){return typeof e.keepEscaping=="function"?e.keepEscaping(t,n):e.keepEscaping===!0||t[n+1]==="\\"}/*!
|
|
40
|
+
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) 2015, Jon Schlinkert.
|
|
43
|
+
* Licensed under the MIT License.
|
|
44
|
+
*/var Yp=function(t){return typeof t<"u"&&t!==null&&(typeof t=="object"||typeof t=="function")},Zo=Yp,qp=function(t){Zo(t)||(t={});for(var n=arguments.length,r=1;r<n;r++){var o=arguments[r];Zo(o)&&Xp(t,o)}return t};function Xp(e,t){for(var n in t)Jp(t,n)&&(e[n]=t[n])}function Jp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}/*!
|
|
45
|
+
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
|
46
|
+
*
|
|
47
|
+
* Copyright (c) 2015, Jon Schlinkert.
|
|
48
|
+
* Licensed under the MIT License.
|
|
49
|
+
*/var Zp=function(t){return typeof t<"u"&&t!==null&&(typeof t=="object"||typeof t=="function")};/*!
|
|
50
|
+
* set-value <https://github.com/jonschlinkert/set-value>
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) 2014-2015, 2017, Jon Schlinkert.
|
|
53
|
+
* Released under the MIT License.
|
|
54
|
+
*/var Qp=Up,eh=qp,Qo=zs,ei=Zp,th=function(e,t,n){if(!ei(e)||(Array.isArray(t)&&(t=[].concat.apply([],t).join(".")),typeof t!="string"))return e;for(var r=Qp(t,{sep:".",brackets:!0}).filter(nh),o=r.length,i=-1,s=e;++i<o;){var a=r[i];if(i!==o-1){ei(s[a])||(s[a]={}),s=s[a];continue}Qo(s[a])&&Qo(n)?s[a]=eh({},s[a],n):s[a]=n}return e};function nh(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}var Vn=jr,ti=Dp,rh=Ip,ni=th,oh=function(t,n,r){if(!Vn(t))throw new TypeError("expected an object");if(typeof n!="string"||r==null)return ti.apply(null,arguments);if(typeof r=="string")return ni(t,n,r),t;var o=rh(t,n);return Vn(r)&&Vn(o)&&(r=ti({},o,r)),ni(t,n,r),t};const ih=ea(oh),Lr=(...e)=>e.filter(Boolean).join(".");function sh(e){const t=e.split(".");return[t.pop(),t.join(".")||void 0]}function ah(e,t){return Object.entries(Iu(e,t)).reduce((n,[,{value:r,disabled:o,key:i}])=>(n[i]=o?void 0:r,n),{})}function ch(e,t){const n=f.useRef();return(t?Pt:Dt)(e,n.current)||(n.current=e),n.current}function Bs(e,t){return f.useMemo(e,ch(t,!0))}function lh(e){const t=f.useRef(null),n=f.useRef(null),r=f.useRef(!0);return f.useLayoutEffect(()=>{e||(t.current.style.height="0px",t.current.style.overflow="hidden")},[]),f.useEffect(()=>{if(r.current){r.current=!1;return}let o;const i=t.current,s=()=>{e&&(i.style.removeProperty("height"),i.style.removeProperty("overflow"),n.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};i.addEventListener("transitionend",s,{once:!0});const{height:a}=n.current.getBoundingClientRect();return i.style.height=a+"px",e||(i.style.overflow="hidden",o=window.setTimeout(()=>i.style.height="0px",50)),()=>{i.removeEventListener("transitionend",s),clearTimeout(o)}},[e]),{wrapperRef:t,contentRef:n}}const uh=e=>{const[t,n]=f.useState(e.getVisiblePaths());return f.useEffect(()=>{n(e.getVisiblePaths());const r=e.useStore.subscribe(e.getVisiblePaths,n,{equalityFn:Dt});return()=>r()},[e]),t};function fh(e,t,n){return e.useStore(o=>{const i=M(M({},n),o.data);return ah(i,t)},Dt)}function Ws(e=3){const t=f.useRef(null),n=f.useRef(null),[r,o]=f.useState(!1),i=f.useCallback(()=>o(!0),[]),s=f.useCallback(()=>o(!1),[]);return f.useLayoutEffect(()=>{if(r){const{bottom:a,top:c,left:l}=t.current.getBoundingClientRect(),{height:u}=n.current.getBoundingClientRect(),d=a+u>window.innerHeight-40?"up":"down";n.current.style.position="fixed",n.current.style.zIndex="10000",n.current.style.left=l+"px",d==="down"?n.current.style.top=a+e+"px":n.current.style.bottom=window.innerHeight-c+e+"px"}},[e,r]),{popinRef:t,wrapperRef:n,shown:r,show:i,hide:s}}vd([yd]);const dh={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};ae.extend({color:()=>e=>te(e).isValid()});const ph=e=>ae().color().test(e);function Hs(e,{format:t,hasAlpha:n,isString:r}){const o=dh[t]+(r&&t!=="hex"?"String":""),i=e[o]();return typeof i=="object"&&!n?Mu(i,["a"]):i}const Vs=(e,t)=>{const n=te(e);if(!n.isValid())throw Error("Invalid color");return Hs(n,t)},hh=(e,t)=>Hs(te(e),M(M({},t),{},{isString:!0,format:"hex"})),gh=({value:e})=>{const t=bd(e),n=t==="name"?"hex":t,r=typeof e=="object"?"a"in e:t==="hex"&&e.length===8||/^(rgba)|(hsla)|(hsva)/.test(e),o={format:n,hasAlpha:r,isString:typeof e=="string"};return{value:Vs(e,o),settings:o}};var mh=Object.freeze({__proto__:null,schema:ph,sanitize:Vs,format:hh,normalize:gh});const bh=D("div",{position:"relative",boxSizing:"border-box",borderRadius:"$sm",overflow:"hidden",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",backgroundColor:"#fff",backgroundImage:`url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')`,$inputStyle:"",$hover:"",zIndex:1,variants:{active:{true:{$inputStyle:"$accent1"}}},"&::before":{content:'""',position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:"currentColor",zIndex:1}}),vh=D("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),yh=D("div",{width:"$colorPickerWidth",height:"$colorPickerHeight",".react-colorful":{width:"100%",height:"100%",boxShadow:"$level2",cursor:"crosshair"},".react-colorful__saturation":{borderRadius:"$sm $sm 0 0"},".react-colorful__alpha, .react-colorful__hue":{height:10},".react-colorful__last-control":{borderRadius:"0 0 $sm $sm"},".react-colorful__pointer":{height:12,width:12}});function ri(e,t){return t!=="rgb"?te(e).toRgb():e}function wh({value:e,displayValue:t,settings:n,onUpdate:r}){const{emitOnEditStart:o,emitOnEditEnd:i}=Q(),{format:s,hasAlpha:a}=n,{popinRef:c,wrapperRef:l,shown:u,show:d,hide:p}=Ws(),h=f.useRef(0),[m,b]=f.useState(()=>ri(e,s)),y=a?Od:Rd,v=()=>{b(ri(e,s)),d(),o()},w=()=>{p(),i(),window.clearTimeout(h.current)},$=()=>{h.current=window.setTimeout(w,500)};return f.useEffect(()=>()=>window.clearTimeout(h.current),[]),g.createElement(g.Fragment,null,g.createElement(bh,{ref:c,active:u,onClick:()=>v(),style:{color:t}}),u&&g.createElement(Rr,null,g.createElement(fs,{onPointerUp:w}),g.createElement(yh,{ref:l,onMouseEnter:()=>window.clearTimeout(h.current),onMouseLeave:x=>x.buttons===0&&$()},g.createElement(y,{color:m,onChange:r}))))}function $h(){const{value:e,displayValue:t,label:n,onChange:r,onUpdate:o,settings:i}=Q();return g.createElement(he,{input:!0},g.createElement(ye,null,n),g.createElement(vh,null,g.createElement(wh,{value:e,displayValue:t,onChange:r,onUpdate:o,settings:i}),g.createElement(_r,{value:t,onChange:r,onUpdate:o})))}var Eh=M({component:$h},mh);function xh(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Q();return g.createElement(he,{input:!0},g.createElement(ye,null,e),g.createElement(Tr,{value:t,settings:r,onUpdate:n}))}var Sh=M({component:xh},ys(["x","y","z"]));const Ch=D("div",{$flexCenter:"",position:"relative",backgroundColor:"$elevation3",borderRadius:"$sm",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",touchAction:"none",$draggable:"",$hover:"","&:active":{cursor:"none"},"&::after":{content:'""',backgroundColor:"$accent2",height:4,width:4,borderRadius:2}}),Oh=D("div",{$flexCenter:"",width:"$joystickWidth",height:"$joystickHeight",borderRadius:"$sm",boxShadow:"$level2",position:"fixed",zIndex:1e4,overflow:"hidden",$draggable:"",transform:"translate(-50%, -50%)",variants:{isOutOfBounds:{true:{backgroundColor:"$elevation1"},false:{backgroundColor:"$elevation3"}}},"> div":{position:"absolute",$flexCenter:"",borderStyle:"solid",borderWidth:1,borderColor:"$highlight1",backgroundColor:"$elevation3",width:"80%",height:"80%","&::after,&::before":{content:'""',position:"absolute",zindex:10,backgroundColor:"$highlight1"},"&::before":{width:"100%",height:1},"&::after":{height:"100%",width:1}},"> span":{position:"relative",zindex:100,width:10,height:10,backgroundColor:"$accent2",borderRadius:"50%"}});function _h({value:e,settings:t,onUpdate:n}){const r=f.useRef(),o=f.useRef(0),i=f.useRef(0),s=f.useRef(1),[a,c]=f.useState(!1),[l,u]=f.useState(!1),[d,p]=ps(),h=f.useRef(null),m=f.useRef(null);f.useLayoutEffect(()=>{if(a){const{top:P,left:z,width:A,height:L}=h.current.getBoundingClientRect();m.current.style.left=z+A/2+"px",m.current.style.top=P+L/2+"px"}},[a]);const{keys:[b,y],joystick:v}=t,w=v==="invertY"?1:-1,{[b]:{step:$},[y]:{step:x}}=t,S=Re("sizes","joystickWidth"),E=Re("sizes","joystickHeight"),C=parseFloat(S)*.8/2,O=parseFloat(E)*.8/2,j=f.useCallback(()=>{r.current||(u(!0),o.current&&p({x:o.current*C}),i.current&&p({y:i.current*-O}),r.current=window.setInterval(()=>{n(P=>{const z=$*o.current*s.current,A=w*x*i.current*s.current;return Array.isArray(P)?{[b]:P[0]+z,[y]:P[1]+A}:{[b]:P[b]+z,[y]:P[y]+A}})},16))},[C,O,n,p,$,x,b,y,w]),k=f.useCallback(()=>{window.clearTimeout(r.current),r.current=void 0,u(!1)},[]);f.useEffect(()=>{function P(z){s.current=Ji(z)}return window.addEventListener("keydown",P),window.addEventListener("keyup",P),()=>{window.clearTimeout(r.current),window.removeEventListener("keydown",P),window.removeEventListener("keyup",P)}},[]);const T=Lt(({first:P,active:z,delta:[A,L],movement:[I,F]})=>{P&&c(!0);const V=Be(I,-C,C),re=Be(F,-O,O);o.current=Math.abs(I)>Math.abs(V)?Math.sign(I-V):0,i.current=Math.abs(F)>Math.abs(re)?Math.sign(re-F):0;let Se=e[b],oe=e[y];z?(o.current||(Se+=A*$*s.current,p({x:V})),i.current||(oe-=w*L*x*s.current,p({y:re})),o.current||i.current?j():k(),n({[b]:Se,[y]:oe})):(c(!1),o.current=0,i.current=0,p({x:0,y:0}),k())});return g.createElement(Ch,Y({ref:h},T()),a&&g.createElement(Rr,null,g.createElement(Oh,{ref:m,isOutOfBounds:l},g.createElement("div",null),g.createElement("span",{ref:d}))))}const Rh=D("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Ph(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Q();return g.createElement(he,{input:!0},g.createElement(ye,null,e),g.createElement(Rh,{withJoystick:!!r.joystick},r.joystick&&g.createElement(_h,{value:t,settings:r,onUpdate:n}),g.createElement(Tr,{value:t,settings:r,onUpdate:n})))}const Th=["joystick"],Us=ys(["x","y"]),kh=e=>{let{joystick:t=!0}=e,n=W(e,Th);const{value:r,settings:o}=Us.normalize(n);return{value:r,settings:M(M({},o),{},{joystick:t})}};var Ah=M(M({component:Ph},Us),{},{normalize:kh});const Dh=e=>{if(e!==void 0){if(e instanceof File)try{return URL.createObjectURL(e)}catch{return}if(typeof e=="string"&&e.indexOf("blob:")===0)return e;throw Error("Invalid image format [undefined | blob | File].")}},Ih=(e,t)=>typeof t=="object"&&"image"in t,Mh=({image:e})=>({value:e});var jh=Object.freeze({__proto__:null,sanitize:Dh,schema:Ih,normalize:Mh});const Lh=D("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),Nh=D("div",{$flexCenter:"",overflow:"hidden",height:"$rowHeight",background:"$elevation3",textAlign:"center",color:"inherit",borderRadius:"$sm",outline:"none",userSelect:"none",cursor:"pointer",$inputStyle:"",$hover:"",$focusWithin:"",$active:"$accent1 $elevation1",variants:{isDragAccept:{true:{$inputStyle:"$accent1",backgroundColor:"$elevation1"}}}}),zh=D("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),Fh=D("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),Bh=D("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),Wh=D("div",{$flexCenter:"",top:"0",right:"0",marginRight:"$sm",height:"100%",cursor:"pointer",variants:{disabled:{true:{color:"$elevation3",cursor:"default"}}},"&::after,&::before":{content:'""',position:"absolute",height:2,width:10,borderRadius:1,backgroundColor:"currentColor"},"&::after":{transform:"rotate(45deg)"},"&::before":{transform:"rotate(-45deg)"}});function Hh(){const{label:e,value:t,onUpdate:n,disabled:r}=Q(),{popinRef:o,wrapperRef:i,shown:s,show:a,hide:c}=Ws(),l=f.useCallback(m=>{m.length&&n(m[0])},[n]),u=f.useCallback(m=>{m.stopPropagation(),n(void 0)},[n]),{getRootProps:d,getInputProps:p,isDragAccept:h}=Ns({maxFiles:1,accept:"image/*",onDrop:l,disabled:r});return g.createElement(he,{input:!0},g.createElement(ye,null,e),g.createElement(Lh,null,g.createElement(zh,{ref:o,hasImage:!!t,onPointerDown:()=>!!t&&a(),onPointerUp:c,style:{backgroundImage:t?`url(${t})`:"none"}}),s&&!!t&&g.createElement(Rr,null,g.createElement(fs,{onPointerUp:c,style:{cursor:"pointer"}}),g.createElement(Fh,{ref:i,style:{backgroundImage:`url(${t})`}})),g.createElement(Nh,d({isDragAccept:h}),g.createElement("input",p()),g.createElement(Bh,null,h?"drop image":"click or drop")),g.createElement(Wh,{onClick:u,disabled:!t})))}var Vh=M({component:Hh},jh);const oi=ae().number(),Uh=(e,t)=>ae().array().length(2).every.number().test(e)&&ae().schema({min:oi,max:oi}).test(t),gn=e=>({min:e[0],max:e[1]}),Ks=(e,{bounds:[t,n]},r)=>{const o=Array.isArray(e)?gn(e):e,i={min:r[0],max:r[1]},{min:s,max:a}=M(M({},i),o);return[Be(Number(s),t,Math.max(t,a)),Be(Number(a),Math.min(n,s),n)]},Kh=({value:e,min:t,max:n})=>{const r={min:t,max:n},o=vs(gn(e),{min:r,max:r}),i=[t,n],s=M(M({},o),{},{bounds:i});return{value:Ks(gn(e),s,e),settings:s}};var Gh=Object.freeze({__proto__:null,schema:Uh,format:gn,sanitize:Ks,normalize:Kh});const Yh=["value","bounds","onDrag"],qh=["bounds"],Xh=D("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function Jh(e){let{value:t,bounds:[n,r],onDrag:o}=e,i=W(e,Yh);const s=f.useRef(null),a=f.useRef(null),c=f.useRef(null),l=f.useRef(0),u=Re("sizes","scrubberWidth"),d=Lt(({event:m,first:b,xy:[y],movement:[v],memo:w={}})=>{if(b){const{width:x,left:S}=s.current.getBoundingClientRect();l.current=x-parseFloat(u);const E=(m==null?void 0:m.target)===a.current||(m==null?void 0:m.target)===c.current;w.pos=un((y-S)/x,n,r);const C=Math.abs(w.pos-t.min)-Math.abs(w.pos-t.max);w.key=C<0||C===0&&w.pos<=t.min?"min":"max",E&&(w.pos=t[w.key])}const $=w.pos+un(v/l.current,0,r-n);return o({[w.key]:Sf($,i[w.key])}),w}),p=`calc(${ln(t.min,n,r)} * (100% - ${u} - 8px) + 4px)`,h=`calc(${1-ln(t.max,n,r)} * (100% - ${u} - 8px) + 4px)`;return g.createElement(gs,Y({ref:s},d()),g.createElement(hs,null,g.createElement(ms,{style:{left:p,right:h}})),g.createElement(nr,{position:"left",ref:a,style:{left:p}}),g.createElement(nr,{position:"right",ref:c,style:{right:h}}))}function Zh(){const{label:e,displayValue:t,onUpdate:n,settings:r}=Q(),o=W(r,qh);return g.createElement(g.Fragment,null,g.createElement(he,{input:!0},g.createElement(ye,null,e),g.createElement(Xh,null,g.createElement(Jh,Y({value:t},r,{onDrag:n})),g.createElement(Tr,{value:t,settings:o,onUpdate:n,innerLabelTrim:0}))))}var Qh=M({component:Zh},Gh);const eg=()=>{const e=new Map;return{on:(t,n)=>{let r=e.get(t);r===void 0&&(r=new Set,e.set(t,r)),r.add(n)},off:(t,n)=>{const r=e.get(t);r!==void 0&&(r.delete(n),r.size===0&&e.delete(t))},emit:(t,...n)=>{const r=e.get(t);if(r!==void 0)for(const o of r)o(...n)}}},tg=["type","value"],ng=["onChange","transient","onEditStart","onEditEnd"],rg=function(){const t=xp(Sp(()=>({data:{}}))),n=eg();this.storeId=Du(),this.useStore=t;const r={},o=new Set;this.getVisiblePaths=()=>{const s=this.getData(),a=Object.keys(s),c=[];Object.entries(r).forEach(([u,d])=>{d.render&&a.some(p=>p.indexOf(u)===0)&&!d.render(this.get)&&c.push(u+".")});const l=[];return o.forEach(u=>{u in s&&s[u].__refCount>0&&c.every(d=>u.indexOf(d)===-1)&&(!s[u].render||s[u].render(this.get))&&l.push(u)}),l},this.setOrderedPaths=s=>{s.forEach(a=>o.add(a))},this.orderPaths=s=>(this.setOrderedPaths(s),s),this.disposePaths=s=>{t.setState(a=>{const c=a.data;return s.forEach(l=>{if(l in c){const u=c[l];u.__refCount--,u.__refCount===0&&u.type in be&&delete c[l]}}),{data:c}})},this.dispose=()=>{t.setState(()=>({data:{}}))},this.getFolderSettings=s=>r[s]||{},this.getData=()=>t.getState().data,this.addData=(s,a)=>{t.setState(c=>{const l=c.data;return Object.entries(s).forEach(([u,d])=>{let p=l[u];if(p){const{type:h,value:m}=d,b=W(d,tg);h!==p.type?_e(K.INPUT_TYPE_OVERRIDE,h):((p.__refCount===0||a)&&Object.assign(p,b),p.__refCount++)}else l[u]=M(M({},d),{},{__refCount:1})}),{data:l}})},this.setValueAtPath=(s,a,c)=>{t.setState(l=>{const u=l.data;return _o(u[s],a,s,this,c),{data:u}})},this.setSettingsAtPath=(s,a)=>{t.setState(c=>{const l=c.data;return l[s].settings=M(M({},l[s].settings),a),{data:l}})},this.disableInputAtPath=(s,a)=>{t.setState(c=>{const l=c.data;return l[s].disabled=a,{data:l}})},this.set=(s,a)=>{t.setState(c=>{const l=c.data;return Object.entries(s).forEach(([u,d])=>{try{_o(l[u],d,void 0,void 0,a)}catch{}}),{data:l}})},this.getInput=s=>{try{return this.getData()[s]}catch{_e(K.PATH_DOESNT_EXIST,s)}},this.get=s=>{var a;return(a=this.getInput(s))===null||a===void 0?void 0:a.value},this.emitOnEditStart=s=>{n.emit(`onEditStart:${s}`,this.get(s),s,M(M({},this.getInput(s)),{},{get:this.get}))},this.emitOnEditEnd=s=>{n.emit(`onEditEnd:${s}`,this.get(s),s,M(M({},this.getInput(s)),{},{get:this.get}))},this.subscribeToEditStart=(s,a)=>{const c=`onEditStart:${s}`;return n.on(c,a),()=>n.off(c,a)},this.subscribeToEditEnd=(s,a)=>{const c=`onEditEnd:${s}`;return n.on(c,a),()=>n.off(c,a)};const i=(s,a,c)=>{const l={};return Object.entries(s).forEach(([u,d])=>{if(u==="")return _e(K.EMPTY_KEY);let p=Lr(a,u);if(d.type===be.FOLDER){const h=i(d.schema,p,c);Object.assign(l,h),p in r||(r[p]=d.settings)}else if(u in c)_e(K.DUPLICATE_KEYS,u,p,c[u].path);else{const h=Bu(d,u,p,l);if(h){const{type:m,options:b,input:y}=h,{onChange:v,transient:w,onEditStart:$,onEditEnd:x}=b,S=W(b,ng);l[p]=M(M(M({type:m},S),y),{},{fromPanel:!0}),c[u]={path:p,onChange:v,transient:w,onEditStart:$,onEditEnd:x}}else _e(K.UNKNOWN_INPUT,p,d)}}),l};this.getDataFromSchema=s=>{const a={};return[i(s,"",a),a]}},Gs=new rg,og={collapsed:!1};function ig(e,t){return{type:be.FOLDER,schema:e,settings:M(M({},og),t)}}const ii=e=>"__levaInput"in e,sg=(e,t)=>{const n={},r=t?t.toLowerCase():null;return e.forEach(o=>{const[i,s]=sh(o);(!r||i.toLowerCase().indexOf(r)>-1)&&ih(n,s,{[i]:{__levaInput:!0,path:o}})}),n},ag=["type","label","path","valueKey","value","settings","setValue","disabled"];function cg(e){let{type:t,label:n,path:r,valueKey:o,value:i,settings:s,setValue:a,disabled:c}=e,l=W(e,ag);const{displayValue:u,onChange:d,onUpdate:p}=ds({type:t,value:i,settings:s,setValue:a}),h=Je[t].component;return h?g.createElement(ns.Provider,{value:M({key:o,path:r,id:""+r,label:n,displayValue:u,value:i,onChange:d,onUpdate:p,settings:s,setValue:a,disabled:c},l)},g.createElement(cf,{disabled:c},g.createElement(h,null))):(_e(K.NO_COMPONENT_FOR_TYPE,t,r),null)}const lg=D("button",{display:"block",$reset:"",fontWeight:"$button",height:"$rowHeight",borderStyle:"none",borderRadius:"$sm",backgroundColor:"$elevation1",color:"$highlight1","&:not(:disabled)":{color:"$highlight3",backgroundColor:"$accent2",cursor:"pointer",$hover:"$accent3",$active:"$accent3 $accent1",$focus:""}});function ug({onClick:e,settings:t,label:n}){const r=jt();return g.createElement(he,null,g.createElement(lg,{disabled:t.disabled,onClick:()=>e(r.get)},n))}const fg=D("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),dg=D("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),pg=({label:e,opts:t})=>{let n=typeof e=="string"&&e.trim()===""?null:e,r=t;return typeof t.opts=="object"&&(r.label!==void 0&&(n=t.label),r=t.opts),{label:n,opts:r}};function hg(e){const{label:t,opts:n}=pg(e),r=jt();return g.createElement(he,{input:!!t},t&&g.createElement(ye,null,t),g.createElement(fg,null,Object.entries(n).map(([o,i])=>g.createElement(dg,{key:o,onClick:()=>i(r.get)},o))))}const gg=D("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),Ys=100;function mg(e,t){e.push(t),e.length>Ys&&e.shift()}const bg=f.forwardRef(function({initialValue:e},t){const n=Re("colors","highlight3"),r=Re("colors","elevation2"),o=Re("colors","highlight1"),[i,s]=f.useMemo(()=>[te(o).alpha(.4).toRgbString(),te(o).alpha(.1).toRgbString()],[o]),a=f.useRef([e]),c=f.useRef(e),l=f.useRef(e),u=f.useRef(),d=f.useCallback((m,b)=>{if(!m)return;const{width:y,height:v}=m,w=new Path2D,$=y/Ys,x=v*.05;for(let C=0;C<a.current.length;C++){const O=ln(a.current[C],c.current,l.current),j=$*C,k=v-O*(v-x*2)-x;w.lineTo(j,k)}b.clearRect(0,0,y,v);const S=new Path2D(w);S.lineTo($*(a.current.length+1),v),S.lineTo(0,v),S.lineTo(0,0);const E=b.createLinearGradient(0,0,0,v);E.addColorStop(0,i),E.addColorStop(1,s),b.fillStyle=E,b.fill(S),b.strokeStyle=r,b.lineJoin="round",b.lineWidth=14,b.stroke(w),b.strokeStyle=n,b.lineWidth=2,b.stroke(w)},[n,r,i,s]),[p,h]=bf(d);return f.useImperativeHandle(t,()=>({frame:m=>{(c.current===void 0||m<c.current)&&(c.current=m),(l.current===void 0||m>l.current)&&(l.current=m),mg(a.current,m),u.current=requestAnimationFrame(()=>d(p.current,h.current))}}),[p,h,d]),f.useEffect(()=>()=>cancelAnimationFrame(u.current),[]),g.createElement(gg,{ref:p})}),si=e=>Number.isFinite(e)?e.toPrecision(2):e.toString(),vg=f.forwardRef(function({initialValue:e},t){const[n,r]=f.useState(si(e));return f.useImperativeHandle(t,()=>({frame:o=>r(si(o))}),[]),g.createElement("div",null,n)});function ai(e){return typeof e=="function"?e():e.current}function yg({label:e,objectOrFn:t,settings:n}){const r=f.useRef(),o=f.useRef(ai(t));return f.useEffect(()=>{const i=window.setInterval(()=>{var s;document.hidden||(s=r.current)===null||s===void 0||s.frame(ai(t))},n.interval);return()=>window.clearInterval(i)},[t,n.interval]),g.createElement(he,{input:!0},g.createElement(ye,{align:"top"},e),n.graph?g.createElement(bg,{ref:r,initialValue:o.current}):g.createElement(vg,{ref:r,initialValue:o.current}))}const wg=["type","label","key"],$g={[be.BUTTON]:ug,[be.BUTTON_GROUP]:hg,[be.MONITOR]:yg},Eg=g.memo(({path:e})=>{const[t,{set:n,setSettings:r,disable:o,storeId:i,emitOnEditStart:s,emitOnEditEnd:a}]=yf(e);if(!t)return null;const{type:c,label:l,key:u}=t,d=W(t,wg);if(c in be){const p=$g[c];return g.createElement(p,Y({label:l,path:e},d))}return c in Je?g.createElement(cg,Y({key:i+e,type:c,label:l,storeId:i,path:e,valueKey:u,setValue:n,setSettings:r,disable:o,emitOnEditStart:s,emitOnEditEnd:a},d)):(Cu(K.UNSUPPORTED_INPUT,c,e),null)});function xg({toggle:e,toggled:t,name:n}){return g.createElement(of,{onClick:()=>e()},g.createElement(Pr,{toggled:t}),g.createElement("div",null,n))}const Sg=({name:e,path:t,tree:n})=>{const r=jt(),o=Lr(t,e),{collapsed:i,color:s}=r.getFolderSettings(o),[a,c]=f.useState(!i),l=f.useRef(null),u=Re("colors","folderWidgetColor"),d=Re("colors","folderTextColor");return f.useLayoutEffect(()=>{l.current.style.setProperty("--leva-colors-folderWidgetColor",s||u),l.current.style.setProperty("--leva-colors-folderTextColor",s||d)},[s,u,d]),g.createElement(fn,{ref:l},g.createElement(xg,{name:e,toggled:a,toggle:()=>c(p=>!p)}),g.createElement(qs,{parent:o,tree:n,toggled:a}))},qs=g.memo(({isRoot:e=!1,fill:t=!1,flat:n=!1,parent:r,tree:o,toggled:i})=>{const{wrapperRef:s,contentRef:a}=lh(i),c=jt(),l=([d,p])=>{var h;return(ii(p)?(h=c.getInput(p.path))===null||h===void 0?void 0:h.order:c.getFolderSettings(Lr(r,d)).order)||0},u=Object.entries(o).sort((d,p)=>l(d)-l(p));return g.createElement(er,{ref:s,isRoot:e,fill:t,flat:n},g.createElement(cs,{ref:a,isRoot:e,toggled:i},u.map(([d,p])=>ii(p)?g.createElement(Eg,{key:p.path,valueKey:p.valueKey,path:p.path}):g.createElement(Sg,{key:d,name:d,path:r,tree:p}))))}),Cg=D("div",{position:"relative",fontFamily:"$mono",fontSize:"$root",color:"$rootText",backgroundColor:"$elevation1",variants:{fill:{false:{position:"fixed",top:"10px",right:"10px",zIndex:1e3,width:"$rootWidth"},true:{position:"relative",width:"100%"}},flat:{false:{borderRadius:"$lg",boxShadow:"$level1"}},oneLineLabels:{true:{[`${us}`]:{gridTemplateColumns:"auto",gridAutoColumns:"minmax(max-content, 1fr)",gridAutoRows:"minmax($sizes$rowHeight), auto)",rowGap:0,columnGap:0,marginTop:"$rowGap"}}},hideTitleBar:{true:{$$titleBarHeight:"0px"},false:{$$titleBarHeight:"$sizes$titleBarHeight"}}},"&,*,*:after,*:before":{boxSizing:"border-box"},"*::selection":{backgroundColor:"$accent2"}}),Xs=40,mn=D("i",{$flexCenter:"",width:Xs,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),Og=D("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),_g=D("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${mn}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),Rg=D("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),Pg=D("div",{touchAction:"none",$flexCenter:"",flex:1,"> svg":{fill:"$highlight1"},color:"$highlight1",variants:{drag:{true:{$draggable:"","> svg":{transition:"fill 250ms ease"},"&:hover":{color:"$highlight3"},"&:hover > svg":{fill:"$highlight3"}}},filterEnabled:{false:{paddingRight:Xs}}}}),Tg=g.forwardRef(({setFilter:e,toggle:t},n)=>{const[r,o]=f.useState(""),i=f.useMemo(()=>Xi(e,250),[e]),s=()=>{e(""),o("")},a=c=>{const l=c.currentTarget.value;t(!0),o(l)};return f.useEffect(()=>{i(r)},[r,i]),g.createElement(g.Fragment,null,g.createElement(Rg,{ref:n,value:r,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:c=>c.stopPropagation(),onChange:a}),g.createElement(mn,{onClick:()=>s(),style:{visibility:r?"visible":"hidden"}},g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},g.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))))});function kg({setFilter:e,onDrag:t,onDragStart:n,onDragEnd:r,toggle:o,toggled:i,title:s,drag:a,filterEnabled:c,from:l}){const[u,d]=f.useState(!1),p=f.useRef(null);f.useEffect(()=>{var m,b;u?(m=p.current)===null||m===void 0||m.focus():(b=p.current)===null||b===void 0||b.blur()},[u]);const h=Lt(({offset:[m,b],first:y,last:v})=>{t({x:m,y:b}),y&&n({x:m,y:b}),v&&r({x:m,y:b})},{filterTaps:!0,from:({offset:[m,b]})=>[(l==null?void 0:l.x)||m,(l==null?void 0:l.y)||b]});return f.useEffect(()=>{const m=b=>{b.key==="L"&&b.shiftKey&&b.metaKey&&d(y=>!y)};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[]),g.createElement(g.Fragment,null,g.createElement(Og,{mode:a?"drag":void 0},g.createElement(mn,{active:!i,onClick:()=>o()},g.createElement(Pr,{toggled:i,width:12,height:8})),g.createElement(Pg,Y({},a?h():{},{drag:a,filterEnabled:c}),s===void 0&&a?g.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},g.createElement("circle",{cx:"2",cy:"2",r:"2"}),g.createElement("circle",{cx:"14",cy:"2",r:"2"}),g.createElement("circle",{cx:"26",cy:"2",r:"2"}),g.createElement("circle",{cx:"2",cy:"12",r:"2"}),g.createElement("circle",{cx:"14",cy:"12",r:"2"}),g.createElement("circle",{cx:"26",cy:"12",r:"2"})):s),c&&g.createElement(mn,{active:u,onClick:()=>d(m=>!m)},g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},g.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),g.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"})))),g.createElement(_g,{toggled:u},g.createElement(Tg,{ref:p,setFilter:e,toggle:o})))}const Ag=["store","hidden","theme","collapsed"];function Dg(e){let{store:t,hidden:n=!1,theme:r,collapsed:o=!1}=e,i=W(e,Ag);const s=Bs(()=>Zu(r),[r]),[a,c]=f.useState(!o),l=typeof o=="object"?!o.collapsed:a,u=f.useMemo(()=>typeof o=="object"?d=>{typeof d=="function"?o.onChange(!d(!o.collapsed)):o.onChange(!d)}:c,[o]);return!t||n?null:g.createElement(Or.Provider,{value:s},g.createElement(Ig,Y({store:t},i,{toggled:l,setToggle:u,rootClass:s.className})))}const Ig=g.memo(({store:e,rootClass:t,fill:n=!1,flat:r=!1,neverHide:o=!1,oneLineLabels:i=!1,titleBar:s={title:void 0,drag:!0,filter:!0,position:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0},hideCopyButton:a=!1,toggled:c,setToggle:l})=>{var u,d;const p=uh(e),[h,m]=f.useState(""),b=f.useMemo(()=>sg(p,h),[p,h]),[y,v]=ps(),w=o||p.length>0,$=typeof s=="object"&&s.title||void 0,x=typeof s=="object"&&(u=s.drag)!==null&&u!==void 0?u:!0,S=typeof s=="object"&&(d=s.filter)!==null&&d!==void 0?d:!0,E=typeof s=="object"&&s.position||void 0,C=typeof s=="object"&&s.onDrag||void 0,O=typeof s=="object"&&s.onDragStart||void 0,j=typeof s=="object"&&s.onDragEnd||void 0;return g.useEffect(()=>{v({x:E==null?void 0:E.x,y:E==null?void 0:E.y})},[E,v]),Ju(),g.createElement(os.Provider,{value:{hideCopyButton:a}},g.createElement(Cg,{ref:y,className:t,fill:n,flat:r,oneLineLabels:i,hideTitleBar:!s,style:{display:w?"block":"none"}},s&&g.createElement(kg,{onDrag:k=>{v(k),C==null||C(k)},onDragStart:k=>O==null?void 0:O(k),onDragEnd:k=>j==null?void 0:j(k),setFilter:m,toggle:k=>l(T=>k??!T),toggled:c,title:$,drag:x,filterEnabled:S,from:E}),w&&g.createElement(rs.Provider,{value:e},g.createElement(qs,{isRoot:!0,fill:n,flat:r,tree:b,toggled:c}))))}),Mg=["isRoot"];let bn=!1,Ge=null;function jg(e){let{isRoot:t=!1}=e,n=W(e,Mg);return f.useEffect(()=>(bn=!0,!t&&Ge&&(Ge.remove(),Ge=null),()=>{t||(bn=!1)}),[t]),g.createElement(Dg,Y({store:Gs},n))}function Lg(e){f.useEffect(()=>{e&&!bn&&(Ge||(Ge=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(Ge),Hu(g.createElement(jg,{isRoot:!0}),Ge))),bn=!0)},[e])}function Ng(e,t,n,r,o){let i,s,a,c,l;return typeof e=="string"?(s=e,i=t,Array.isArray(n)?l=n:n&&("store"in n?(c=n,l=r):(a=n,Array.isArray(r)?l=r:(c=r,l=o)))):(i=e,Array.isArray(t)?l=t:(c=t,l=n)),{schema:i,folderName:s,folderSettings:a,hookSettings:c,deps:l||[]}}function zg(e,t,n,r,o){const{folderName:i,schema:s,folderSettings:a,hookSettings:c,deps:l}=Ng(e,t,n,r,o),u=typeof s=="function",d=f.useRef(!1),p=f.useRef(!0),h=Bs(()=>{d.current=!0;const T=typeof s=="function"?s():s;return i?{[i]:ig(T,a)}:T},l),m=!(c!=null&&c.store);Lg(m);const[b]=f.useState(()=>(c==null?void 0:c.store)||Gs),[y,v]=f.useMemo(()=>b.getDataFromSchema(h),[b,h]),[w,$,x,S,E]=f.useMemo(()=>{const T=[],P=[],z={},A={},L={};return Object.values(v).forEach(({path:I,onChange:F,onEditStart:V,onEditEnd:re,transient:Se})=>{T.push(I),F?(z[I]=F,Se||P.push(I)):P.push(I),V&&(A[I]=V),re&&(L[I]=re)}),[T,P,z,A,L]},[v]),C=f.useMemo(()=>b.orderPaths(w),[w,b]),O=fh(b,$,y),j=f.useCallback(T=>{const P=Object.entries(T).reduce((z,[A,L])=>Object.assign(z,{[v[A].path]:L}),{});b.set(P,!1)},[b,v]),k=f.useCallback(T=>b.get(v[T].path),[b,v]);return f.useEffect(()=>{const T=!p.current&&d.current;return b.addData(y,T),p.current=!1,d.current=!1,()=>b.disposePaths(C)},[b,C,y]),f.useEffect(()=>{const T=[];return Object.entries(x).forEach(([P,z])=>{z(b.get(P),P,M({initial:!0,get:b.get},b.getInput(P)));const A=b.useStore.subscribe(L=>{const I=L.data[P];return[I.disabled?void 0:I.value,I]},([L,I])=>z(L,P,M({initial:!1,get:b.get},I)),{equalityFn:Dt});T.push(A)}),()=>T.forEach(P=>P())},[b,x]),f.useEffect(()=>{const T=[];return Object.entries(S).forEach(([P,z])=>T.push(b.subscribeToEditStart(P,z))),Object.entries(E).forEach(([P,z])=>T.push(b.subscribeToEditEnd(P,z))),()=>T.forEach(P=>P())},[S,E,b]),u?[O,j,k]:O}Ie(ve.SELECT,jf);Ie(ve.IMAGE,Vh);Ie(ve.NUMBER,Of);Ie(ve.COLOR,Eh);Ie(ve.STRING,Uf);Ie(ve.BOOLEAN,Zf);Ie(ve.INTERVAL,Qh);Ie(ve.VECTOR3D,Sh);Ie(ve.VECTOR2D,Ah);const{AmbientLight:Fg,PointLight:Bg,SceneContainer:Wg,Grid:Hg,Hands:Vg,StereoVideoPlane:Ug,WebRTCStereoVideoPlane:Kg,Movable:ci}=ra,li={"Mary Project":"assets/MaryOculus.webm"};function Gg(){const e=typeof window>"u",t=zg({"streaming uri":{value:"http://localhost:8080/offer",label:"streaming uri"},"video uri":{value:li["Mary Project"],label:"video uri"},"use video":{value:!0,label:"use video"},"use streaming":{value:!1,label:"use streaming"}},{collapsed:!0});return e?ue("div",{children:"Loading..."}):Nr(ta,{children:[ue(na,{children:ue("title",{children:"Vuer | Stereo Video and WebRTC Demo"})}),ue(f.Suspense,{children:Nr(Wg,{frameloop:"always",bgChildren:ue(Hg,{}),rawChildren:[],children:[ue(Fg,{intensity:.25},"ambient"),ue(Bg,{intensity:1,position:[0,1,1]},"spot"),ue(Vg,{fps:30,eventType:["squeeze"],stream:!0}),t["use video"]&&ue(ci,{position:[4,2,0],rotation:[0,-1,0],size:[10,10],children:ue(Ug,{transparent:!0,opacity:.1,src:li["Mary Project"],fixed:!0,position:[-1.778,-1,0],distanceToCamera:10,height:2,aspect:1.778})},"Mary-project-stereo-video"),t["use streaming"]&&ue(ci,{position:[1.778,2,-3],children:ue(Kg,{src:"http://localhost:8080/offer",fixed:!0,height:2,aspect:1.778,position:[-1.778,-1,0]})},"RTC-video-panel")]})})]})}const om={Page:Gg};export{om as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,j as t,r as o}from"../chunks/chunk-c676def8.js";import{W as i,H as a,c as s}from"../chunks/chunk-71fcf8b5.js";import"../chunks/chunk-c2202416.js";import"../chunks/chunk-cf010ec4.js";const{AmbientLight:n,PointLight:r,SceneContainer:p,Grid:m,Hands:c,WebRTCVideoPlane:g,VideoPlane:d}=s,l={Sintel:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4","Big Buck Bunny":"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4","Elephant Dream":"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4","For Bigger Blazes":"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4","For Bigger Joy Rides":"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4"};function h(){return typeof window>"u"?e("div",{children:"Loading..."}):t(i,{children:[e(a,{children:e("title",{children:"Vuer (Hand Tracking Demo)"})}),e(o.Suspense,{children:t(p,{frameloop:"always",bgChildren:e(m,{}),rawChildren:[],children:[e(n,{intensity:.25},"ambient"),e(r,{intensity:1,position:[0,1,1]},"spot"),e(c,{fps:30,eventType:["squeeze"],stream:!0}),e(g,{src:"http://localhost:8080/offer",fixed:!0,position:[0,1,-3],distanceToCamera:10,height:2,aspect:1.778}),e(d,{src:l["Elephant Dream"],fixed:!0,position:[2.5,1,-.5],rotation:[0,-1,0],distanceToCamera:10,height:2,aspect:1.778})]})})]})}const k={Page:h};export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,a as t,r as o}from"../chunks/chunk-3010a972.js";import{W as i,H as s,c as a}from"../chunks/chunk-79630475.js";import"../chunks/chunk-d9bdcef8.js";import"../chunks/chunk-cf010ec4.js";const{AmbientLight:n,PointLight:r,SceneContainer:p,Grid:m,Hands:c,WebRTCVideoPlane:d,VideoPlane:g}=a,l={Sintel:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4","Big Buck Bunny":"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4","Elephant Dream":"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4","For Bigger Blazes":"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4","For Bigger Joy Rides":"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4"};function h(){return typeof window>"u"?e("div",{children:"Loading..."}):t(i,{children:[e(s,{children:e("title",{children:"Vuer | Video and WebRTC Demo"})}),e(o.Suspense,{children:t(p,{frameloop:"always",bgChildren:e(m,{}),rawChildren:[],children:[e(n,{intensity:.25},"ambient"),e(r,{intensity:1,position:[0,1,1]},"spot"),e(c,{fps:30,eventType:["squeeze"],stream:!0}),e(d,{src:"http://localhost:8080/offer",fixed:!0,position:[0,1,-3],distanceToCamera:10,height:2,aspect:1.778}),e(g,{src:l["Elephant Dream"],fixed:!0,position:[2.5,1,-.5],rotation:[0,-1,0],distanceToCamera:10,height:2,aspect:1.778})]})})]})}const y={Page:h};export{y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as s,j as o}from"../chunks/chunk-3010a972.js";import{r as l}from"../chunks/chunk-d9bdcef8.js";var r={},c=l;r.createRoot=c.createRoot,r.hydrateRoot=c.hydrateRoot;const u=s.createContext(void 0);function g({pageContext:t,children:e}){return o(u.Provider,{value:t,children:e})}function m({pageContext:t,children:e}){return o(s.StrictMode,{children:o(g,{pageContext:t,children:e})})}function P(t){return(t.exports.documentProps||{}).title||(t.documentProps||{}).title||"Vuer (Technical Preview)"}const p=!0,v=!0;let n;const h=async t=>{const{Page:e,pageProps:d}=t,i=o(m,{pageContext:t,children:o(e,{...d})}),a=document.getElementById("page-view");t.isHydration?n=r.hydrateRoot(a,i):(n||(n=r.createRoot(a)),n.render(i)),document.title=P(t)};function R(){console.log("Hydration finished; page is now interactive.")}function S(){console.log("Page transition start"),document.querySelector("body").classList.add("page-is-transitioning")}function x(){console.log("Page transition end"),document.querySelector("body").classList.remove("page-is-transitioning")}export{p as clientRouting,v as hydrationCanBeAborted,R as onHydrationEnd,x as onPageTransitionEnd,S as onPageTransitionStart,h as render};
|