@tscircuit/runframe 0.0.1058 → 0.0.1059
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/standalone.min.js
CHANGED
|
@@ -5344,9 +5344,9 @@ try {
|
|
|
5344
5344
|
`)},Ket=function(){var n=parseInt(document.body.getAttribute(zR)||"0",10);return isFinite(n)?n:0},XTn=function(){xe.useEffect(function(){return document.body.setAttribute(zR,(Ket()+1).toString()),function(){var n=Ket()-1;n<=0?document.body.removeAttribute(zR):document.body.setAttribute(zR,n.toString())}},[])},WTn=function(n){var e=n.noRelative,t=n.noImportant,i=n.gapMode,r=i===void 0?"margin":i;XTn();var o=xe.useMemo(function(){return GTn(r)},[r]);return xe.createElement(YTn,{styles:qTn(o,!e,r,t?"":"!important")})},Uye=!1;if(typeof window<"u")try{var JH=Object.defineProperty({},"passive",{get:function(){return Uye=!0,!0}});window.addEventListener("test",JH,JH),window.removeEventListener("test",JH,JH)}catch{Uye=!1}var $R=Uye?{passive:!1}:!1,ZTn=function(n){return n.tagName==="TEXTAREA"},Qet=function(n,e){if(!(n instanceof Element))return!1;var t=window.getComputedStyle(n);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!ZTn(n)&&t[e]==="visible")},KTn=function(n){return Qet(n,"overflowY")},QTn=function(n){return Qet(n,"overflowX")},Jet=function(n,e){var t=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=ett(n,i);if(r){var o=ttt(n,i),s=o[1],a=o[2];if(s>a)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},JTn=function(n){var e=n.scrollTop,t=n.scrollHeight,i=n.clientHeight;return[e,t,i]},e5n=function(n){var e=n.scrollLeft,t=n.scrollWidth,i=n.clientWidth;return[e,t,i]},ett=function(n,e){return n==="v"?KTn(e):QTn(e)},ttt=function(n,e){return n==="v"?JTn(e):e5n(e)},t5n=function(n,e){return n==="h"&&e==="rtl"?-1:1},n5n=function(n,e,t,i,r){var o=t5n(n,window.getComputedStyle(e).direction),s=o*i,a=t.target,c=e.contains(a),l=!1,u=s>0,d=0,h=0;do{if(!a)break;var p=ttt(n,a),m=p[0],y=p[1],g=p[2],x=y-g-o*m;(m||x)&&ett(n,a)&&(d+=x,h+=m);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&Math.abs(d)<1||!u&&Math.abs(h)<1)&&(l=!0),l},eV=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},ntt=function(n){return[n.deltaX,n.deltaY]},itt=function(n){return n&&"current"in n?n.current:n},i5n=function(n,e){return n[0]===e[0]&&n[1]===e[1]},r5n=function(n){return`
|
|
5345
5345
|
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
5346
5346
|
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
5347
|
-
`)},o5n=0,FR=[];function s5n(n){var e=xe.useRef([]),t=xe.useRef([0,0]),i=xe.useRef(),r=xe.useState(o5n++)[0],o=xe.useState(Zet)[0],s=xe.useRef(n);xe.useEffect(function(){s.current=n},[n]),xe.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(r));var y=ATn([n.lockRef.current],(n.shards||[]).map(itt),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[n.inert,n.lockRef.current,n.shards]);var a=xe.useCallback(function(y,g){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!s.current.allowPinchZoom;var x=eV(y),v=t.current,w="deltaX"in y?y.deltaX:v[0]-x[0],T="deltaY"in y?y.deltaY:v[1]-x[1],k,P=y.target,R=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in y&&R==="h"&&P.type==="range")return!1;var M=Jet(R,P);if(!M)return!0;if(M?k=R:(k=R==="v"?"h":"v",M=Jet(R,P)),!M)return!1;if(!i.current&&"changedTouches"in y&&(w||T)&&(i.current=k),!k)return!0;var I=i.current||k;return n5n(I,g,y,I==="h"?w:T)},[]),c=xe.useCallback(function(y){var g=y;if(!(!FR.length||FR[FR.length-1]!==o)){var x="deltaY"in g?ntt(g):eV(g),v=e.current.filter(function(k){return k.name===g.type&&(k.target===g.target||g.target===k.shadowParent)&&i5n(k.delta,x)})[0];if(v&&v.should){g.cancelable&&g.preventDefault();return}if(!v){var w=(s.current.shards||[]).map(itt).filter(Boolean).filter(function(k){return k.contains(g.target)}),T=w.length>0?a(g,w[0]):!s.current.noIsolation;T&&g.cancelable&&g.preventDefault()}}},[]),l=xe.useCallback(function(y,g,x,v){var w={name:y,delta:g,target:x,should:v,shadowParent:a5n(x)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(T){return T!==w})},1)},[]),u=xe.useCallback(function(y){t.current=eV(y),i.current=void 0},[]),d=xe.useCallback(function(y){l(y.type,ntt(y),y.target,a(y,n.lockRef.current))},[]),h=xe.useCallback(function(y){l(y.type,eV(y),y.target,a(y,n.lockRef.current))},[]);xe.useEffect(function(){return FR.push(o),n.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,$R),document.addEventListener("touchmove",c,$R),document.addEventListener("touchstart",u,$R),function(){FR=FR.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,$R),document.removeEventListener("touchmove",c,$R),document.removeEventListener("touchstart",u,$R)}},[]);var p=n.removeScrollBar,m=n.inert;return xe.createElement(xe.Fragment,null,m?xe.createElement(o,{styles:r5n(r)}):null,p?xe.createElement(WTn,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function a5n(n){for(var e=null;n!==null;)n instanceof ShadowRoot&&(e=n.host,n=n.host),n=n.parentNode;return e}const c5n=DTn(Wet,s5n);var tV=xe.forwardRef(function(n,e){return xe.createElement(QH,cT({},n,{ref:e,sideCar:c5n}))});tV.classNames=QH.classNames;var Bye=["Enter"," "],l5n=["ArrowDown","PageUp","Home"],rtt=["ArrowUp","PageDown","End"],u5n=[...l5n,...rtt],d5n={ltr:[...Bye,"ArrowRight"],rtl:[...Bye,"ArrowLeft"]},h5n={ltr:["ArrowLeft"],rtl:["ArrowRight"]},z6="Menu",[$6,p5n,f5n]=BLe(z6),[HC,ott]=$E(z6,[f5n,YH,WU]),F6=YH(),stt=WU(),[att,CM]=HC(z6),[m5n,U6]=HC(z6),ctt=n=>{const{__scopeMenu:e,open:t=!1,children:i,dir:r,onOpenChange:o,modal:s=!0}=n,a=F6(e),[c,l]=xe.useState(null),u=xe.useRef(!1),d=FE(o),h=Roe(r);return xe.useEffect(()=>{const p=()=>{u.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),he.jsx(Nye,{...a,children:he.jsx(att,{scope:e,open:t,onOpenChange:d,content:c,onContentChange:l,children:he.jsx(m5n,{scope:e,onClose:xe.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:h,modal:s,children:i})})})};ctt.displayName=z6;var _5n="MenuAnchor",jye=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n,r=F6(t);return he.jsx(Oye,{...r,...i,ref:e})});jye.displayName=_5n;var Hye="MenuPortal",[y5n,ltt]=HC(Hye,{forceMount:void 0}),utt=n=>{const{__scopeMenu:e,forceMount:t,children:i,container:r}=n,o=CM(Hye,e);return he.jsx(y5n,{scope:e,forceMount:t,children:he.jsx(US,{present:t||o.open,children:he.jsx(qH,{asChild:!0,container:r,children:i})})})};utt.displayName=Hye;var KS="MenuContent",[g5n,Vye]=HC(KS),dtt=xe.forwardRef((n,e)=>{const t=ltt(KS,n.__scopeMenu),{forceMount:i=t.forceMount,...r}=n,o=CM(KS,n.__scopeMenu),s=U6(KS,n.__scopeMenu);return he.jsx($6.Provider,{scope:n.__scopeMenu,children:he.jsx(US,{present:i||o.open,children:he.jsx($6.Slot,{scope:n.__scopeMenu,children:s.modal?he.jsx(x5n,{...r,ref:e}):he.jsx(v5n,{...r,ref:e})})})})}),x5n=xe.forwardRef((n,e)=>{const t=CM(KS,n.__scopeMenu),i=xe.useRef(null),r=H_(e,i);return xe.useEffect(()=>{const o=i.current;if(o)return Dye(o)},[]),he.jsx(Gye,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:ca(n.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),v5n=xe.forwardRef((n,e)=>{const t=CM(KS,n.__scopeMenu);return he.jsx(Gye,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),b5n=nC("MenuContent.ScrollLock"),Gye=xe.forwardRef((n,e)=>{const{__scopeMenu:t,loop:i=!1,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...y}=n,g=CM(KS,t),x=U6(KS,t),v=F6(t),w=stt(t),T=p5n(t),[k,P]=xe.useState(null),R=xe.useRef(null),M=H_(e,R,g.onContentChange),I=xe.useRef(0),A=xe.useRef(""),B=xe.useRef(0),N=xe.useRef(null),V=xe.useRef("right"),Y=xe.useRef(0),W=m?tV:xe.Fragment,K=m?{as:b5n,allowPinchZoom:!0}:void 0,ee=ue=>{const ge=A.current+ue,re=T().filter(Ve=>!Ve.disabled),oe=document.activeElement,pe=re.find(Ve=>Ve.ref.current===oe)?.textValue,Ee=re.map(Ve=>Ve.textValue),Pe=N5n(Ee,ge,pe),Oe=re.find(Ve=>Ve.textValue===Pe)?.ref.current;(function Ve(Ne){A.current=Ne,window.clearTimeout(I.current),Ne!==""&&(I.current=window.setTimeout(()=>Ve(""),1e3))})(ge),Oe&&setTimeout(()=>Oe.focus())};xe.useEffect(()=>()=>window.clearTimeout(I.current),[]),yye();const ae=xe.useCallback(ue=>V.current===N.current?.side&&L5n(ue,N.current?.area),[]);return he.jsx(g5n,{scope:t,searchRef:A,onItemEnter:xe.useCallback(ue=>{ae(ue)&&ue.preventDefault()},[ae]),onItemLeave:xe.useCallback(ue=>{ae(ue)||(R.current?.focus(),P(null))},[ae]),onTriggerLeave:xe.useCallback(ue=>{ae(ue)&&ue.preventDefault()},[ae]),pointerGraceTimerRef:B,onPointerGraceIntentChange:xe.useCallback(ue=>{N.current=ue},[]),children:he.jsx(W,{...K,children:he.jsx(LH,{asChild:!0,trapped:r,onMountAutoFocus:ca(o,ue=>{ue.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:he.jsx(OH,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:p,children:he.jsx(XLe,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:i,currentTabStopId:k,onCurrentTabStopIdChange:P,onEntryFocus:ca(c,ue=>{x.isUsingKeyboardRef.current||ue.preventDefault()}),preventScrollOnEntryFocus:!0,children:he.jsx(Het,{role:"menu","aria-orientation":"vertical","data-state":Ptt(g.open),"data-radix-menu-content":"",dir:x.dir,...v,...y,ref:M,style:{outline:"none",...y.style},onKeyDown:ca(y.onKeyDown,ue=>{const re=ue.target.closest("[data-radix-menu-content]")===ue.currentTarget,oe=ue.ctrlKey||ue.altKey||ue.metaKey,pe=ue.key.length===1;re&&(ue.key==="Tab"&&ue.preventDefault(),!oe&&pe&&ee(ue.key));const Ee=R.current;if(ue.target!==Ee||!u5n.includes(ue.key))return;ue.preventDefault();const Oe=T().filter(Ve=>!Ve.disabled).map(Ve=>Ve.ref.current);rtt.includes(ue.key)&&Oe.reverse(),I5n(Oe)}),onBlur:ca(n.onBlur,ue=>{ue.currentTarget.contains(ue.target)||(window.clearTimeout(I.current),A.current="")}),onPointerMove:ca(n.onPointerMove,j6(ue=>{const ge=ue.target,re=Y.current!==ue.clientX;if(ue.currentTarget.contains(ge)&&re){const oe=ue.clientX>Y.current?"right":"left";V.current=oe,Y.current=ue.clientX}}))})})})})})})});dtt.displayName=KS;var w5n="MenuGroup",Yye=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return he.jsx(du.div,{role:"group",...i,ref:e})});Yye.displayName=w5n;var S5n="MenuLabel",htt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return he.jsx(du.div,{...i,ref:e})});htt.displayName=S5n;var nV="MenuItem",ptt="menu.itemSelect",iV=xe.forwardRef((n,e)=>{const{disabled:t=!1,onSelect:i,...r}=n,o=xe.useRef(null),s=U6(nV,n.__scopeMenu),a=Vye(nV,n.__scopeMenu),c=H_(e,o),l=xe.useRef(!1),u=()=>{const d=o.current;if(!t&&d){const h=new CustomEvent(ptt,{bubbles:!0,cancelable:!0});d.addEventListener(ptt,p=>i?.(p),{once:!0}),jLe(d,h),h.defaultPrevented?l.current=!1:s.onClose()}};return he.jsx(ftt,{...r,ref:c,disabled:t,onClick:ca(n.onClick,u),onPointerDown:d=>{n.onPointerDown?.(d),l.current=!0},onPointerUp:ca(n.onPointerUp,d=>{l.current||d.currentTarget?.click()}),onKeyDown:ca(n.onKeyDown,d=>{const h=a.searchRef.current!=="";t||h&&d.key===" "||Bye.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});iV.displayName=nV;var ftt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,disabled:i=!1,textValue:r,...o}=n,s=Vye(nV,t),a=stt(t),c=xe.useRef(null),l=H_(e,c),[u,d]=xe.useState(!1),[h,p]=xe.useState("");return xe.useEffect(()=>{const m=c.current;m&&p((m.textContent??"").trim())},[o.children]),he.jsx($6.ItemSlot,{scope:t,disabled:i,textValue:r??h,children:he.jsx(WLe,{asChild:!0,...a,focusable:!i,children:he.jsx(du.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...o,ref:l,onPointerMove:ca(n.onPointerMove,j6(m=>{i?s.onItemLeave(m):(s.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ca(n.onPointerLeave,j6(m=>s.onItemLeave(m))),onFocus:ca(n.onFocus,()=>d(!0)),onBlur:ca(n.onBlur,()=>d(!1))})})})}),E5n="MenuCheckboxItem",mtt=xe.forwardRef((n,e)=>{const{checked:t=!1,onCheckedChange:i,...r}=n;return he.jsx(vtt,{scope:n.__scopeMenu,checked:t,children:he.jsx(iV,{role:"menuitemcheckbox","aria-checked":rV(t)?"mixed":t,...r,ref:e,"data-state":Wye(t),onSelect:ca(r.onSelect,()=>i?.(rV(t)?!0:!t),{checkForDefaultPrevented:!1})})})});mtt.displayName=E5n;var _tt="MenuRadioGroup",[T5n,M5n]=HC(_tt,{value:void 0,onValueChange:()=>{}}),ytt=xe.forwardRef((n,e)=>{const{value:t,onValueChange:i,...r}=n,o=FE(i);return he.jsx(T5n,{scope:n.__scopeMenu,value:t,onValueChange:o,children:he.jsx(Yye,{...r,ref:e})})});ytt.displayName=_tt;var gtt="MenuRadioItem",xtt=xe.forwardRef((n,e)=>{const{value:t,...i}=n,r=M5n(gtt,n.__scopeMenu),o=t===r.value;return he.jsx(vtt,{scope:n.__scopeMenu,checked:o,children:he.jsx(iV,{role:"menuitemradio","aria-checked":o,...i,ref:e,"data-state":Wye(o),onSelect:ca(i.onSelect,()=>r.onValueChange?.(t),{checkForDefaultPrevented:!1})})})});xtt.displayName=gtt;var qye="MenuItemIndicator",[vtt,A5n]=HC(qye,{checked:!1}),btt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,forceMount:i,...r}=n,o=A5n(qye,t);return he.jsx(US,{present:i||rV(o.checked)||o.checked===!0,children:he.jsx(du.span,{...r,ref:e,"data-state":Wye(o.checked)})})});btt.displayName=qye;var C5n="MenuSeparator",wtt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return he.jsx(du.div,{role:"separator","aria-orientation":"horizontal",...i,ref:e})});wtt.displayName=C5n;var P5n="MenuArrow",Stt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n,r=F6(t);return he.jsx(Vet,{...r,...i,ref:e})});Stt.displayName=P5n;var Xye="MenuSub",[R5n,Ett]=HC(Xye),Ttt=n=>{const{__scopeMenu:e,children:t,open:i=!1,onOpenChange:r}=n,o=CM(Xye,e),s=F6(e),[a,c]=xe.useState(null),[l,u]=xe.useState(null),d=FE(r);return xe.useEffect(()=>(o.open===!1&&d(!1),()=>d(!1)),[o.open,d]),he.jsx(Nye,{...s,children:he.jsx(att,{scope:e,open:i,onOpenChange:d,content:l,onContentChange:u,children:he.jsx(R5n,{scope:e,contentId:Hv(),triggerId:Hv(),trigger:a,onTriggerChange:c,children:t})})})};Ttt.displayName=Xye;var B6="MenuSubTrigger",Mtt=xe.forwardRef((n,e)=>{const t=CM(B6,n.__scopeMenu),i=U6(B6,n.__scopeMenu),r=Ett(B6,n.__scopeMenu),o=Vye(B6,n.__scopeMenu),s=xe.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,l={__scopeMenu:n.__scopeMenu},u=xe.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return xe.useEffect(()=>u,[u]),xe.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),c(null)}},[a,c]),he.jsx(jye,{asChild:!0,...l,children:he.jsx(ftt,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":r.contentId,"data-state":Ptt(t.open),...n,ref:s5(e,r.onTriggerChange),onClick:d=>{n.onClick?.(d),!(n.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:ca(n.onPointerMove,j6(d=>{o.onItemEnter(d),!d.defaultPrevented&&!n.disabled&&!t.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{t.onOpenChange(!0),u()},100))})),onPointerLeave:ca(n.onPointerLeave,j6(d=>{u();const h=t.content?.getBoundingClientRect();if(h){const p=t.content?.dataset.side,m=p==="right",y=m?-5:5,g=h[m?"left":"right"],x=h[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:g,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:g,y:h.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ca(n.onKeyDown,d=>{const h=o.searchRef.current!=="";n.disabled||h&&d.key===" "||d5n[i.dir].includes(d.key)&&(t.onOpenChange(!0),t.content?.focus(),d.preventDefault())})})})});Mtt.displayName=B6;var Att="MenuSubContent",Ctt=xe.forwardRef((n,e)=>{const t=ltt(KS,n.__scopeMenu),{forceMount:i=t.forceMount,...r}=n,o=CM(KS,n.__scopeMenu),s=U6(KS,n.__scopeMenu),a=Ett(Att,n.__scopeMenu),c=xe.useRef(null),l=H_(e,c);return he.jsx($6.Provider,{scope:n.__scopeMenu,children:he.jsx(US,{present:i||o.open,children:he.jsx($6.Slot,{scope:n.__scopeMenu,children:he.jsx(Gye,{id:a.contentId,"aria-labelledby":a.triggerId,...r,ref:l,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{s.isUsingKeyboardRef.current&&c.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ca(n.onFocusOutside,u=>{u.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ca(n.onEscapeKeyDown,u=>{s.onClose(),u.preventDefault()}),onKeyDown:ca(n.onKeyDown,u=>{const d=u.currentTarget.contains(u.target),h=h5n[s.dir].includes(u.key);d&&h&&(o.onOpenChange(!1),a.trigger?.focus(),u.preventDefault())})})})})})});Ctt.displayName=Att;function Ptt(n){return n?"open":"closed"}function rV(n){return n==="indeterminate"}function Wye(n){return rV(n)?"indeterminate":n?"checked":"unchecked"}function I5n(n){const e=document.activeElement;for(const t of n)if(t===e||(t.focus(),document.activeElement!==e))return}function k5n(n,e){return n.map((t,i)=>n[(e+i)%n.length])}function N5n(n,e,t){const r=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,o=t?n.indexOf(t):-1;let s=k5n(n,Math.max(o,0));r.length===1&&(s=s.filter(l=>l!==t));const c=s.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return c!==t?c:void 0}function O5n(n,e){const{x:t,y:i}=n;let r=!1;for(let o=0,s=e.length-1;o<e.length;s=o++){const a=e[o],c=e[s],l=a.x,u=a.y,d=c.x,h=c.y;u>i!=h>i&&t<(d-l)*(i-u)/(h-u)+l&&(r=!r)}return r}function L5n(n,e){if(!e)return!1;const t={x:n.clientX,y:n.clientY};return O5n(t,e)}function j6(n){return e=>e.pointerType==="mouse"?n(e):void 0}var D5n=ctt,z5n=jye,$5n=utt,F5n=dtt,U5n=Yye,B5n=htt,j5n=iV,H5n=mtt,V5n=ytt,G5n=xtt,Y5n=btt,q5n=wtt,X5n=Stt,W5n=Ttt,Z5n=Mtt,K5n=Ctt,oV="DropdownMenu",[Q5n,jyi]=$E(oV,[ott]),Qv=ott(),[J5n,Rtt]=Q5n(oV),Itt=n=>{const{__scopeDropdownMenu:e,children:t,dir:i,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=n,c=Qv(e),l=xe.useRef(null),[u,d]=iC({prop:r,defaultProp:o??!1,onChange:s,caller:oV});return he.jsx(J5n,{scope:e,triggerId:Hv(),triggerRef:l,contentId:Hv(),open:u,onOpenChange:d,onOpenToggle:xe.useCallback(()=>d(h=>!h),[d]),modal:a,children:he.jsx(D5n,{...c,open:u,onOpenChange:d,dir:i,modal:a,children:t})})};Itt.displayName=oV;var ktt="DropdownMenuTrigger",Ntt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,disabled:i=!1,...r}=n,o=Rtt(ktt,t),s=Qv(t);return he.jsx(z5n,{asChild:!0,...s,children:he.jsx(du.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:s5(e,o.triggerRef),onPointerDown:ca(n.onPointerDown,a=>{!i&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ca(n.onKeyDown,a=>{i||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Ntt.displayName=ktt;var e3n="DropdownMenuPortal",Ott=n=>{const{__scopeDropdownMenu:e,...t}=n,i=Qv(e);return he.jsx($5n,{...i,...t})};Ott.displayName=e3n;var Ltt="DropdownMenuContent",Dtt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Rtt(Ltt,t),o=Qv(t),s=xe.useRef(!1);return he.jsx(F5n,{id:r.contentId,"aria-labelledby":r.triggerId,...o,...i,ref:e,onCloseAutoFocus:ca(n.onCloseAutoFocus,a=>{s.current||r.triggerRef.current?.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:ca(n.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!r.modal||u)&&(s.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dtt.displayName=Ltt;var t3n="DropdownMenuGroup",n3n=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(U5n,{...r,...i,ref:e})});n3n.displayName=t3n;var i3n="DropdownMenuLabel",ztt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(B5n,{...r,...i,ref:e})});ztt.displayName=i3n;var r3n="DropdownMenuItem",$tt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(j5n,{...r,...i,ref:e})});$tt.displayName=r3n;var o3n="DropdownMenuCheckboxItem",Ftt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(H5n,{...r,...i,ref:e})});Ftt.displayName=o3n;var s3n="DropdownMenuRadioGroup",a3n=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(V5n,{...r,...i,ref:e})});a3n.displayName=s3n;var c3n="DropdownMenuRadioItem",Utt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(G5n,{...r,...i,ref:e})});Utt.displayName=c3n;var l3n="DropdownMenuItemIndicator",Btt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(Y5n,{...r,...i,ref:e})});Btt.displayName=l3n;var u3n="DropdownMenuSeparator",jtt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(q5n,{...r,...i,ref:e})});jtt.displayName=u3n;var d3n="DropdownMenuArrow",h3n=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(X5n,{...r,...i,ref:e})});h3n.displayName=d3n;var p3n=n=>{const{__scopeDropdownMenu:e,children:t,open:i,onOpenChange:r,defaultOpen:o}=n,s=Qv(e),[a,c]=iC({prop:i,defaultProp:o??!1,onChange:r,caller:"DropdownMenuSub"});return he.jsx(W5n,{...s,open:a,onOpenChange:c,children:t})},f3n="DropdownMenuSubTrigger",Htt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(Z5n,{...r,...i,ref:e})});Htt.displayName=f3n;var m3n="DropdownMenuSubContent",Vtt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(K5n,{...r,...i,ref:e,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Vtt.displayName=m3n;var _3n=Itt,y3n=Ntt,Gtt=Ott,Ytt=Dtt,qtt=ztt,Xtt=$tt,Wtt=Ftt,Ztt=Utt,Ktt=Btt,Qtt=jtt,g3n=p3n,Jtt=Htt,ent=Vtt;const Zye=_3n,Kye=y3n,Qye=Gtt,Jye=g3n,sV=xe.forwardRef(({className:n,inset:e,children:t,...i},r)=>he.jsxs(Jtt,{ref:r,className:us("rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none focus:rf-bg-zinc-100 data-[state=open]:rf-bg-zinc-100 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:focus:rf-bg-zinc-800 dark:data-[state=open]:rf-bg-zinc-800",e&&"rf-pl-8",n),...i,children:[t,he.jsx(NH,{className:"rf-ml-auto"})]}));sV.displayName=Jtt.displayName;const aV=xe.forwardRef(({className:n,...e},t)=>he.jsx(ent,{ref:t,className:us("rf-z-50 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-1 rf-text-zinc-950 rf-shadow-lg data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...e}));aV.displayName=ent.displayName;const cV=xe.forwardRef(({className:n,sideOffset:e=4,...t},i)=>he.jsx(Gtt,{children:he.jsx(Ytt,{ref:i,sideOffset:e,className:us("rf-z-50 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-1 rf-text-zinc-950 rf-shadow-md dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50","data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2",n),...t})}));cV.displayName=Ytt.displayName;const kb=xe.forwardRef(({className:n,inset:e,...t},i)=>he.jsx(Xtt,{ref:i,className:us("rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-gap-2 rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 [&>svg]:rf-size-4 [&>svg]:rf-shrink-0 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50",e&&"rf-pl-8",n),...t}));kb.displayName=Xtt.displayName;const x3n=xe.forwardRef(({className:n,children:e,checked:t,...i},r)=>he.jsxs(Wtt,{ref:r,className:us("rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50",n),checked:t,...i,children:[he.jsx("span",{className:"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center",children:he.jsx(Ktt,{children:he.jsx(IR,{className:"rf-h-4 rf-w-4"})})}),e]}));x3n.displayName=Wtt.displayName;const v3n=xe.forwardRef(({className:n,children:e,...t},i)=>he.jsxs(Ztt,{ref:i,className:us("rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50",n),...t,children:[he.jsx("span",{className:"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center",children:he.jsx(Ktt,{children:he.jsx(qJe,{className:"rf-h-2 rf-w-2 rf-fill-current"})})}),e]}));v3n.displayName=Ztt.displayName;const b3n=xe.forwardRef(({className:n,inset:e,...t},i)=>he.jsx(qtt,{ref:i,className:us("rf-px-2 rf-py-1.5 rf-text-sm rf-font-semibold",e&&"rf-pl-8",n),...t}));b3n.displayName=qtt.displayName;const tnt=xe.forwardRef(({className:n,...e},t)=>he.jsx(Qtt,{ref:t,className:us("rf--mx-1 rf-my-1 rf-h-px rf-bg-zinc-100 dark:rf-bg-zinc-800",n),...e}));tnt.displayName=Qtt.displayName;const nnt=({autoroutingLog:n,onReportAutoroutingLog:e})=>he.jsx(he.Fragment,{children:Object.keys(n??{}).length>0&&he.jsxs(Zye,{children:[he.jsx(Kye,{asChild:!0,children:he.jsxs(C0,{variant:"outline",children:[he.jsx(T2n,{className:"rf-w-4 rf-h-4 rf-mr-2"}),"Open Autorouting Log"]})}),he.jsx(cV,{className:"rf-w-96",children:Object.entries(n??{}).map(([t,{simpleRouteJson:i}])=>he.jsxs(kb,{className:"rf-flex rf-justify-between rf-items-center",children:[he.jsx("span",{className:"rf-truncate rf-text-xs rf-mr-2",children:t}),he.jsxs("div",{className:"rf-flex rf-gap-2",children:[he.jsxs(C0,{variant:"outline",size:"sm",onClick:r=>{r.stopPropagation();const o=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),s=URL.createObjectURL(o),a=document.createElement("a");a.href=s,a.download=`${t}-autorouting.json`,a.click(),URL.revokeObjectURL(s)},children:[he.jsx(A2n,{className:"rf-w-3 rf-h-3"}),"Download"]}),e&&he.jsxs(C0,{variant:"outline",size:"sm",onClick:r=>{r.stopPropagation(),e&&e(t,{simpleRouteJson:i})},children:[he.jsx(F2n,{className:"rf-w-3 rf-h-3"}),"Report Bug"]})]})]},t))})]})}),w3n=({code:n,fsMap:e,autoroutingLog:t,circuitJsonErrors:i,circuitJsonWarnings:r,onReportAutoroutingLog:o,errorMessage:s,errorStack:a,circuitJson:c,evalVersion:l})=>{const u=xe.useMemo(()=>{const I=[];if(s&&I.push({type:"Execution Error",message:s,stack:a||void 0,source:"execution"}),i&&i.length>0)for(const A of i)I.push({type:A.type||"Circuit JSON Error",message:A.message||"No error message available",stack:A.stack||"",source:"circuitJson"});return I},[s,a,i]),d=xe.useMemo(()=>!c||!Array.isArray(c)?void 0:c.find(A=>A.type==="source_project_metadata")?.software_used_string,[c]),h=xe.useMemo(()=>{const I=[];if(r&&r.length>0)for(const A of r)I.push({type:A.type||"Circuit JSON Warning",message:A.message||"No warning message available",stack:A.stack||"",source:"circuitJson"});return I},[r]),p=()=>{if(e)try{return IQt(e instanceof Map?Object.fromEntries(e.entries()):e)}catch{}return H2n(n??"")},m=(I,A)=>{const B=`https://github.com/tscircuit/tscircuit.com/issues/new?title=${encodeURIComponent(I)}&body=${encodeURIComponent(A)}`;window.open(B,"_blank")},[y,g]=xe.useState(0),[x,v]=xe.useState(0);if(u.length===0&&h.length===0)return he.jsxs("div",{className:"px-2",children:[he.jsx("div",{className:"rf-mt-4 rf-bg-green-50 rf-rounded-md rf-border rf-border-green-200",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-green-800 rf-mb-3",children:"No errors or warnings!"}),he.jsx("p",{className:"rf-text-sm rf-text-green-700",children:"Your code is running without any errors or warnings."})]})}),he.jsxs("div",{className:"rf-flex rf-gap-2 rf-mt-4 rf-justify-end",children:[he.jsx(nnt,{autoroutingLog:t,onReportAutoroutingLog:o}),he.jsxs(C0,{variant:"outline",className:"rf-p-1",onClick:()=>{const I=p();m("Issue Report",`[Package code to reproduce](${I})`)},children:[he.jsx(hye,{className:"rf-w-4 rf-h-4"}),"Report Issue"]})]})]});const w=()=>{g(I=>Math.max(I-1,0))},T=()=>{g(I=>Math.min(I+1,u.length-1))},k=()=>{v(I=>Math.max(I-1,0))},P=()=>{v(I=>Math.min(I+1,h.length-1))},R=u[y],M=h[x];return he.jsxs(he.Fragment,{children:[he.jsxs("div",{className:"rf-w-[95%] rf-mx-auto",children:[u.length>1&&he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-mb-2",children:[he.jsx("button",{type:"button",className:"rf-p-1 rf-rounded-sm rf-transition-colors",onClick:w,disabled:y===0,children:he.jsx(YJe,{className:"rf-h-4 rf-w-4 rf-text-red-500"})}),he.jsx("button",{type:"button",className:"rf-p-1 rf-rounded-sm rf-transition-colors",onClick:T,disabled:y===u.length-1,children:he.jsx(NH,{className:"rf-h-4 rf-w-4 rf-text-red-500"})}),he.jsxs("span",{className:"rf-text-sm rf-text-red-600",children:[y+1," of ",u.length," errors"]})]}),R&&he.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200 rf-max-h-[500px] rf-overflow-y-auto rf-px-2",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-1",children:R.type}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600",children:R.message}),(R.stack||l||d)&&he.jsxs("details",{style:{whiteSpace:"pre-wrap"},className:"rf-text-xs rf-font-mono rf-text-red-600 rf-mt-2",children:[l&&`@tscircuit/eval@${l}
|
|
5347
|
+
`)},o5n=0,FR=[];function s5n(n){var e=xe.useRef([]),t=xe.useRef([0,0]),i=xe.useRef(),r=xe.useState(o5n++)[0],o=xe.useState(Zet)[0],s=xe.useRef(n);xe.useEffect(function(){s.current=n},[n]),xe.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(r));var y=ATn([n.lockRef.current],(n.shards||[]).map(itt),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[n.inert,n.lockRef.current,n.shards]);var a=xe.useCallback(function(y,g){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!s.current.allowPinchZoom;var x=eV(y),v=t.current,w="deltaX"in y?y.deltaX:v[0]-x[0],T="deltaY"in y?y.deltaY:v[1]-x[1],k,P=y.target,R=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in y&&R==="h"&&P.type==="range")return!1;var M=Jet(R,P);if(!M)return!0;if(M?k=R:(k=R==="v"?"h":"v",M=Jet(R,P)),!M)return!1;if(!i.current&&"changedTouches"in y&&(w||T)&&(i.current=k),!k)return!0;var I=i.current||k;return n5n(I,g,y,I==="h"?w:T)},[]),c=xe.useCallback(function(y){var g=y;if(!(!FR.length||FR[FR.length-1]!==o)){var x="deltaY"in g?ntt(g):eV(g),v=e.current.filter(function(k){return k.name===g.type&&(k.target===g.target||g.target===k.shadowParent)&&i5n(k.delta,x)})[0];if(v&&v.should){g.cancelable&&g.preventDefault();return}if(!v){var w=(s.current.shards||[]).map(itt).filter(Boolean).filter(function(k){return k.contains(g.target)}),T=w.length>0?a(g,w[0]):!s.current.noIsolation;T&&g.cancelable&&g.preventDefault()}}},[]),l=xe.useCallback(function(y,g,x,v){var w={name:y,delta:g,target:x,should:v,shadowParent:a5n(x)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(T){return T!==w})},1)},[]),u=xe.useCallback(function(y){t.current=eV(y),i.current=void 0},[]),d=xe.useCallback(function(y){l(y.type,ntt(y),y.target,a(y,n.lockRef.current))},[]),h=xe.useCallback(function(y){l(y.type,eV(y),y.target,a(y,n.lockRef.current))},[]);xe.useEffect(function(){return FR.push(o),n.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,$R),document.addEventListener("touchmove",c,$R),document.addEventListener("touchstart",u,$R),function(){FR=FR.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,$R),document.removeEventListener("touchmove",c,$R),document.removeEventListener("touchstart",u,$R)}},[]);var p=n.removeScrollBar,m=n.inert;return xe.createElement(xe.Fragment,null,m?xe.createElement(o,{styles:r5n(r)}):null,p?xe.createElement(WTn,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function a5n(n){for(var e=null;n!==null;)n instanceof ShadowRoot&&(e=n.host,n=n.host),n=n.parentNode;return e}const c5n=DTn(Wet,s5n);var tV=xe.forwardRef(function(n,e){return xe.createElement(QH,cT({},n,{ref:e,sideCar:c5n}))});tV.classNames=QH.classNames;var Bye=["Enter"," "],l5n=["ArrowDown","PageUp","Home"],rtt=["ArrowUp","PageDown","End"],u5n=[...l5n,...rtt],d5n={ltr:[...Bye,"ArrowRight"],rtl:[...Bye,"ArrowLeft"]},h5n={ltr:["ArrowLeft"],rtl:["ArrowRight"]},z6="Menu",[$6,p5n,f5n]=BLe(z6),[HC,ott]=$E(z6,[f5n,YH,WU]),F6=YH(),stt=WU(),[att,CM]=HC(z6),[m5n,U6]=HC(z6),ctt=n=>{const{__scopeMenu:e,open:t=!1,children:i,dir:r,onOpenChange:o,modal:s=!0}=n,a=F6(e),[c,l]=xe.useState(null),u=xe.useRef(!1),d=FE(o),h=Roe(r);return xe.useEffect(()=>{const p=()=>{u.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),he.jsx(Nye,{...a,children:he.jsx(att,{scope:e,open:t,onOpenChange:d,content:c,onContentChange:l,children:he.jsx(m5n,{scope:e,onClose:xe.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:h,modal:s,children:i})})})};ctt.displayName=z6;var _5n="MenuAnchor",jye=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n,r=F6(t);return he.jsx(Oye,{...r,...i,ref:e})});jye.displayName=_5n;var Hye="MenuPortal",[y5n,ltt]=HC(Hye,{forceMount:void 0}),utt=n=>{const{__scopeMenu:e,forceMount:t,children:i,container:r}=n,o=CM(Hye,e);return he.jsx(y5n,{scope:e,forceMount:t,children:he.jsx(US,{present:t||o.open,children:he.jsx(qH,{asChild:!0,container:r,children:i})})})};utt.displayName=Hye;var KS="MenuContent",[g5n,Vye]=HC(KS),dtt=xe.forwardRef((n,e)=>{const t=ltt(KS,n.__scopeMenu),{forceMount:i=t.forceMount,...r}=n,o=CM(KS,n.__scopeMenu),s=U6(KS,n.__scopeMenu);return he.jsx($6.Provider,{scope:n.__scopeMenu,children:he.jsx(US,{present:i||o.open,children:he.jsx($6.Slot,{scope:n.__scopeMenu,children:s.modal?he.jsx(x5n,{...r,ref:e}):he.jsx(v5n,{...r,ref:e})})})})}),x5n=xe.forwardRef((n,e)=>{const t=CM(KS,n.__scopeMenu),i=xe.useRef(null),r=H_(e,i);return xe.useEffect(()=>{const o=i.current;if(o)return Dye(o)},[]),he.jsx(Gye,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:ca(n.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),v5n=xe.forwardRef((n,e)=>{const t=CM(KS,n.__scopeMenu);return he.jsx(Gye,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),b5n=nC("MenuContent.ScrollLock"),Gye=xe.forwardRef((n,e)=>{const{__scopeMenu:t,loop:i=!1,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...y}=n,g=CM(KS,t),x=U6(KS,t),v=F6(t),w=stt(t),T=p5n(t),[k,P]=xe.useState(null),R=xe.useRef(null),M=H_(e,R,g.onContentChange),I=xe.useRef(0),A=xe.useRef(""),B=xe.useRef(0),N=xe.useRef(null),V=xe.useRef("right"),Y=xe.useRef(0),W=m?tV:xe.Fragment,K=m?{as:b5n,allowPinchZoom:!0}:void 0,ee=ue=>{const ge=A.current+ue,re=T().filter(Ve=>!Ve.disabled),oe=document.activeElement,pe=re.find(Ve=>Ve.ref.current===oe)?.textValue,Ee=re.map(Ve=>Ve.textValue),Pe=N5n(Ee,ge,pe),Oe=re.find(Ve=>Ve.textValue===Pe)?.ref.current;(function Ve(Ne){A.current=Ne,window.clearTimeout(I.current),Ne!==""&&(I.current=window.setTimeout(()=>Ve(""),1e3))})(ge),Oe&&setTimeout(()=>Oe.focus())};xe.useEffect(()=>()=>window.clearTimeout(I.current),[]),yye();const ae=xe.useCallback(ue=>V.current===N.current?.side&&L5n(ue,N.current?.area),[]);return he.jsx(g5n,{scope:t,searchRef:A,onItemEnter:xe.useCallback(ue=>{ae(ue)&&ue.preventDefault()},[ae]),onItemLeave:xe.useCallback(ue=>{ae(ue)||(R.current?.focus(),P(null))},[ae]),onTriggerLeave:xe.useCallback(ue=>{ae(ue)&&ue.preventDefault()},[ae]),pointerGraceTimerRef:B,onPointerGraceIntentChange:xe.useCallback(ue=>{N.current=ue},[]),children:he.jsx(W,{...K,children:he.jsx(LH,{asChild:!0,trapped:r,onMountAutoFocus:ca(o,ue=>{ue.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:he.jsx(OH,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:p,children:he.jsx(XLe,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:i,currentTabStopId:k,onCurrentTabStopIdChange:P,onEntryFocus:ca(c,ue=>{x.isUsingKeyboardRef.current||ue.preventDefault()}),preventScrollOnEntryFocus:!0,children:he.jsx(Het,{role:"menu","aria-orientation":"vertical","data-state":Ptt(g.open),"data-radix-menu-content":"",dir:x.dir,...v,...y,ref:M,style:{outline:"none",...y.style},onKeyDown:ca(y.onKeyDown,ue=>{const re=ue.target.closest("[data-radix-menu-content]")===ue.currentTarget,oe=ue.ctrlKey||ue.altKey||ue.metaKey,pe=ue.key.length===1;re&&(ue.key==="Tab"&&ue.preventDefault(),!oe&&pe&&ee(ue.key));const Ee=R.current;if(ue.target!==Ee||!u5n.includes(ue.key))return;ue.preventDefault();const Oe=T().filter(Ve=>!Ve.disabled).map(Ve=>Ve.ref.current);rtt.includes(ue.key)&&Oe.reverse(),I5n(Oe)}),onBlur:ca(n.onBlur,ue=>{ue.currentTarget.contains(ue.target)||(window.clearTimeout(I.current),A.current="")}),onPointerMove:ca(n.onPointerMove,j6(ue=>{const ge=ue.target,re=Y.current!==ue.clientX;if(ue.currentTarget.contains(ge)&&re){const oe=ue.clientX>Y.current?"right":"left";V.current=oe,Y.current=ue.clientX}}))})})})})})})});dtt.displayName=KS;var w5n="MenuGroup",Yye=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return he.jsx(du.div,{role:"group",...i,ref:e})});Yye.displayName=w5n;var S5n="MenuLabel",htt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return he.jsx(du.div,{...i,ref:e})});htt.displayName=S5n;var nV="MenuItem",ptt="menu.itemSelect",iV=xe.forwardRef((n,e)=>{const{disabled:t=!1,onSelect:i,...r}=n,o=xe.useRef(null),s=U6(nV,n.__scopeMenu),a=Vye(nV,n.__scopeMenu),c=H_(e,o),l=xe.useRef(!1),u=()=>{const d=o.current;if(!t&&d){const h=new CustomEvent(ptt,{bubbles:!0,cancelable:!0});d.addEventListener(ptt,p=>i?.(p),{once:!0}),jLe(d,h),h.defaultPrevented?l.current=!1:s.onClose()}};return he.jsx(ftt,{...r,ref:c,disabled:t,onClick:ca(n.onClick,u),onPointerDown:d=>{n.onPointerDown?.(d),l.current=!0},onPointerUp:ca(n.onPointerUp,d=>{l.current||d.currentTarget?.click()}),onKeyDown:ca(n.onKeyDown,d=>{const h=a.searchRef.current!=="";t||h&&d.key===" "||Bye.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});iV.displayName=nV;var ftt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,disabled:i=!1,textValue:r,...o}=n,s=Vye(nV,t),a=stt(t),c=xe.useRef(null),l=H_(e,c),[u,d]=xe.useState(!1),[h,p]=xe.useState("");return xe.useEffect(()=>{const m=c.current;m&&p((m.textContent??"").trim())},[o.children]),he.jsx($6.ItemSlot,{scope:t,disabled:i,textValue:r??h,children:he.jsx(WLe,{asChild:!0,...a,focusable:!i,children:he.jsx(du.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...o,ref:l,onPointerMove:ca(n.onPointerMove,j6(m=>{i?s.onItemLeave(m):(s.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ca(n.onPointerLeave,j6(m=>s.onItemLeave(m))),onFocus:ca(n.onFocus,()=>d(!0)),onBlur:ca(n.onBlur,()=>d(!1))})})})}),E5n="MenuCheckboxItem",mtt=xe.forwardRef((n,e)=>{const{checked:t=!1,onCheckedChange:i,...r}=n;return he.jsx(vtt,{scope:n.__scopeMenu,checked:t,children:he.jsx(iV,{role:"menuitemcheckbox","aria-checked":rV(t)?"mixed":t,...r,ref:e,"data-state":Wye(t),onSelect:ca(r.onSelect,()=>i?.(rV(t)?!0:!t),{checkForDefaultPrevented:!1})})})});mtt.displayName=E5n;var _tt="MenuRadioGroup",[T5n,M5n]=HC(_tt,{value:void 0,onValueChange:()=>{}}),ytt=xe.forwardRef((n,e)=>{const{value:t,onValueChange:i,...r}=n,o=FE(i);return he.jsx(T5n,{scope:n.__scopeMenu,value:t,onValueChange:o,children:he.jsx(Yye,{...r,ref:e})})});ytt.displayName=_tt;var gtt="MenuRadioItem",xtt=xe.forwardRef((n,e)=>{const{value:t,...i}=n,r=M5n(gtt,n.__scopeMenu),o=t===r.value;return he.jsx(vtt,{scope:n.__scopeMenu,checked:o,children:he.jsx(iV,{role:"menuitemradio","aria-checked":o,...i,ref:e,"data-state":Wye(o),onSelect:ca(i.onSelect,()=>r.onValueChange?.(t),{checkForDefaultPrevented:!1})})})});xtt.displayName=gtt;var qye="MenuItemIndicator",[vtt,A5n]=HC(qye,{checked:!1}),btt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,forceMount:i,...r}=n,o=A5n(qye,t);return he.jsx(US,{present:i||rV(o.checked)||o.checked===!0,children:he.jsx(du.span,{...r,ref:e,"data-state":Wye(o.checked)})})});btt.displayName=qye;var C5n="MenuSeparator",wtt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return he.jsx(du.div,{role:"separator","aria-orientation":"horizontal",...i,ref:e})});wtt.displayName=C5n;var P5n="MenuArrow",Stt=xe.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n,r=F6(t);return he.jsx(Vet,{...r,...i,ref:e})});Stt.displayName=P5n;var Xye="MenuSub",[R5n,Ett]=HC(Xye),Ttt=n=>{const{__scopeMenu:e,children:t,open:i=!1,onOpenChange:r}=n,o=CM(Xye,e),s=F6(e),[a,c]=xe.useState(null),[l,u]=xe.useState(null),d=FE(r);return xe.useEffect(()=>(o.open===!1&&d(!1),()=>d(!1)),[o.open,d]),he.jsx(Nye,{...s,children:he.jsx(att,{scope:e,open:i,onOpenChange:d,content:l,onContentChange:u,children:he.jsx(R5n,{scope:e,contentId:Hv(),triggerId:Hv(),trigger:a,onTriggerChange:c,children:t})})})};Ttt.displayName=Xye;var B6="MenuSubTrigger",Mtt=xe.forwardRef((n,e)=>{const t=CM(B6,n.__scopeMenu),i=U6(B6,n.__scopeMenu),r=Ett(B6,n.__scopeMenu),o=Vye(B6,n.__scopeMenu),s=xe.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,l={__scopeMenu:n.__scopeMenu},u=xe.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return xe.useEffect(()=>u,[u]),xe.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),c(null)}},[a,c]),he.jsx(jye,{asChild:!0,...l,children:he.jsx(ftt,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":r.contentId,"data-state":Ptt(t.open),...n,ref:s5(e,r.onTriggerChange),onClick:d=>{n.onClick?.(d),!(n.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:ca(n.onPointerMove,j6(d=>{o.onItemEnter(d),!d.defaultPrevented&&!n.disabled&&!t.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{t.onOpenChange(!0),u()},100))})),onPointerLeave:ca(n.onPointerLeave,j6(d=>{u();const h=t.content?.getBoundingClientRect();if(h){const p=t.content?.dataset.side,m=p==="right",y=m?-5:5,g=h[m?"left":"right"],x=h[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:g,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:g,y:h.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ca(n.onKeyDown,d=>{const h=o.searchRef.current!=="";n.disabled||h&&d.key===" "||d5n[i.dir].includes(d.key)&&(t.onOpenChange(!0),t.content?.focus(),d.preventDefault())})})})});Mtt.displayName=B6;var Att="MenuSubContent",Ctt=xe.forwardRef((n,e)=>{const t=ltt(KS,n.__scopeMenu),{forceMount:i=t.forceMount,...r}=n,o=CM(KS,n.__scopeMenu),s=U6(KS,n.__scopeMenu),a=Ett(Att,n.__scopeMenu),c=xe.useRef(null),l=H_(e,c);return he.jsx($6.Provider,{scope:n.__scopeMenu,children:he.jsx(US,{present:i||o.open,children:he.jsx($6.Slot,{scope:n.__scopeMenu,children:he.jsx(Gye,{id:a.contentId,"aria-labelledby":a.triggerId,...r,ref:l,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{s.isUsingKeyboardRef.current&&c.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ca(n.onFocusOutside,u=>{u.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ca(n.onEscapeKeyDown,u=>{s.onClose(),u.preventDefault()}),onKeyDown:ca(n.onKeyDown,u=>{const d=u.currentTarget.contains(u.target),h=h5n[s.dir].includes(u.key);d&&h&&(o.onOpenChange(!1),a.trigger?.focus(),u.preventDefault())})})})})})});Ctt.displayName=Att;function Ptt(n){return n?"open":"closed"}function rV(n){return n==="indeterminate"}function Wye(n){return rV(n)?"indeterminate":n?"checked":"unchecked"}function I5n(n){const e=document.activeElement;for(const t of n)if(t===e||(t.focus(),document.activeElement!==e))return}function k5n(n,e){return n.map((t,i)=>n[(e+i)%n.length])}function N5n(n,e,t){const r=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,o=t?n.indexOf(t):-1;let s=k5n(n,Math.max(o,0));r.length===1&&(s=s.filter(l=>l!==t));const c=s.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return c!==t?c:void 0}function O5n(n,e){const{x:t,y:i}=n;let r=!1;for(let o=0,s=e.length-1;o<e.length;s=o++){const a=e[o],c=e[s],l=a.x,u=a.y,d=c.x,h=c.y;u>i!=h>i&&t<(d-l)*(i-u)/(h-u)+l&&(r=!r)}return r}function L5n(n,e){if(!e)return!1;const t={x:n.clientX,y:n.clientY};return O5n(t,e)}function j6(n){return e=>e.pointerType==="mouse"?n(e):void 0}var D5n=ctt,z5n=jye,$5n=utt,F5n=dtt,U5n=Yye,B5n=htt,j5n=iV,H5n=mtt,V5n=ytt,G5n=xtt,Y5n=btt,q5n=wtt,X5n=Stt,W5n=Ttt,Z5n=Mtt,K5n=Ctt,oV="DropdownMenu",[Q5n,jyi]=$E(oV,[ott]),Qv=ott(),[J5n,Rtt]=Q5n(oV),Itt=n=>{const{__scopeDropdownMenu:e,children:t,dir:i,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=n,c=Qv(e),l=xe.useRef(null),[u,d]=iC({prop:r,defaultProp:o??!1,onChange:s,caller:oV});return he.jsx(J5n,{scope:e,triggerId:Hv(),triggerRef:l,contentId:Hv(),open:u,onOpenChange:d,onOpenToggle:xe.useCallback(()=>d(h=>!h),[d]),modal:a,children:he.jsx(D5n,{...c,open:u,onOpenChange:d,dir:i,modal:a,children:t})})};Itt.displayName=oV;var ktt="DropdownMenuTrigger",Ntt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,disabled:i=!1,...r}=n,o=Rtt(ktt,t),s=Qv(t);return he.jsx(z5n,{asChild:!0,...s,children:he.jsx(du.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:s5(e,o.triggerRef),onPointerDown:ca(n.onPointerDown,a=>{!i&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ca(n.onKeyDown,a=>{i||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Ntt.displayName=ktt;var e3n="DropdownMenuPortal",Ott=n=>{const{__scopeDropdownMenu:e,...t}=n,i=Qv(e);return he.jsx($5n,{...i,...t})};Ott.displayName=e3n;var Ltt="DropdownMenuContent",Dtt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Rtt(Ltt,t),o=Qv(t),s=xe.useRef(!1);return he.jsx(F5n,{id:r.contentId,"aria-labelledby":r.triggerId,...o,...i,ref:e,onCloseAutoFocus:ca(n.onCloseAutoFocus,a=>{s.current||r.triggerRef.current?.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:ca(n.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!r.modal||u)&&(s.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dtt.displayName=Ltt;var t3n="DropdownMenuGroup",n3n=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(U5n,{...r,...i,ref:e})});n3n.displayName=t3n;var i3n="DropdownMenuLabel",ztt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(B5n,{...r,...i,ref:e})});ztt.displayName=i3n;var r3n="DropdownMenuItem",$tt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(j5n,{...r,...i,ref:e})});$tt.displayName=r3n;var o3n="DropdownMenuCheckboxItem",Ftt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(H5n,{...r,...i,ref:e})});Ftt.displayName=o3n;var s3n="DropdownMenuRadioGroup",a3n=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(V5n,{...r,...i,ref:e})});a3n.displayName=s3n;var c3n="DropdownMenuRadioItem",Utt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(G5n,{...r,...i,ref:e})});Utt.displayName=c3n;var l3n="DropdownMenuItemIndicator",Btt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(Y5n,{...r,...i,ref:e})});Btt.displayName=l3n;var u3n="DropdownMenuSeparator",jtt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(q5n,{...r,...i,ref:e})});jtt.displayName=u3n;var d3n="DropdownMenuArrow",h3n=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(X5n,{...r,...i,ref:e})});h3n.displayName=d3n;var p3n=n=>{const{__scopeDropdownMenu:e,children:t,open:i,onOpenChange:r,defaultOpen:o}=n,s=Qv(e),[a,c]=iC({prop:i,defaultProp:o??!1,onChange:r,caller:"DropdownMenuSub"});return he.jsx(W5n,{...s,open:a,onOpenChange:c,children:t})},f3n="DropdownMenuSubTrigger",Htt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(Z5n,{...r,...i,ref:e})});Htt.displayName=f3n;var m3n="DropdownMenuSubContent",Vtt=xe.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=Qv(t);return he.jsx(K5n,{...r,...i,ref:e,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Vtt.displayName=m3n;var _3n=Itt,y3n=Ntt,Gtt=Ott,Ytt=Dtt,qtt=ztt,Xtt=$tt,Wtt=Ftt,Ztt=Utt,Ktt=Btt,Qtt=jtt,g3n=p3n,Jtt=Htt,ent=Vtt;const Zye=_3n,Kye=y3n,Qye=Gtt,Jye=g3n,sV=xe.forwardRef(({className:n,inset:e,children:t,...i},r)=>he.jsxs(Jtt,{ref:r,className:us("rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none focus:rf-bg-zinc-100 data-[state=open]:rf-bg-zinc-100 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:focus:rf-bg-zinc-800 dark:data-[state=open]:rf-bg-zinc-800",e&&"rf-pl-8",n),...i,children:[t,he.jsx(NH,{className:"rf-ml-auto"})]}));sV.displayName=Jtt.displayName;const aV=xe.forwardRef(({className:n,...e},t)=>he.jsx(ent,{ref:t,className:us("rf-z-50 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-1 rf-text-zinc-950 rf-shadow-lg data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...e}));aV.displayName=ent.displayName;const cV=xe.forwardRef(({className:n,sideOffset:e=4,...t},i)=>he.jsx(Gtt,{children:he.jsx(Ytt,{ref:i,sideOffset:e,className:us("rf-z-50 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-1 rf-text-zinc-950 rf-shadow-md dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50","data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2",n),...t})}));cV.displayName=Ytt.displayName;const kb=xe.forwardRef(({className:n,inset:e,...t},i)=>he.jsx(Xtt,{ref:i,className:us("rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-gap-2 rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 [&>svg]:rf-size-4 [&>svg]:rf-shrink-0 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50",e&&"rf-pl-8",n),...t}));kb.displayName=Xtt.displayName;const x3n=xe.forwardRef(({className:n,children:e,checked:t,...i},r)=>he.jsxs(Wtt,{ref:r,className:us("rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50",n),checked:t,...i,children:[he.jsx("span",{className:"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center",children:he.jsx(Ktt,{children:he.jsx(IR,{className:"rf-h-4 rf-w-4"})})}),e]}));x3n.displayName=Wtt.displayName;const v3n=xe.forwardRef(({className:n,children:e,...t},i)=>he.jsxs(Ztt,{ref:i,className:us("rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50",n),...t,children:[he.jsx("span",{className:"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center",children:he.jsx(Ktt,{children:he.jsx(qJe,{className:"rf-h-2 rf-w-2 rf-fill-current"})})}),e]}));v3n.displayName=Ztt.displayName;const b3n=xe.forwardRef(({className:n,inset:e,...t},i)=>he.jsx(qtt,{ref:i,className:us("rf-px-2 rf-py-1.5 rf-text-sm rf-font-semibold",e&&"rf-pl-8",n),...t}));b3n.displayName=qtt.displayName;const tnt=xe.forwardRef(({className:n,...e},t)=>he.jsx(Qtt,{ref:t,className:us("rf--mx-1 rf-my-1 rf-h-px rf-bg-zinc-100 dark:rf-bg-zinc-800",n),...e}));tnt.displayName=Qtt.displayName;const nnt=({autoroutingLog:n,onReportAutoroutingLog:e})=>he.jsx(he.Fragment,{children:Object.keys(n??{}).length>0&&he.jsxs(Zye,{children:[he.jsx(Kye,{asChild:!0,children:he.jsxs(C0,{variant:"outline",children:[he.jsx(T2n,{className:"rf-w-4 rf-h-4 rf-mr-2"}),"Open Autorouting Log"]})}),he.jsx(cV,{className:"rf-w-96",children:Object.entries(n??{}).map(([t,{simpleRouteJson:i}])=>he.jsxs(kb,{className:"rf-flex rf-justify-between rf-items-center",children:[he.jsx("span",{className:"rf-truncate rf-text-xs rf-mr-2",children:t}),he.jsxs("div",{className:"rf-flex rf-gap-2",children:[he.jsxs(C0,{variant:"outline",size:"sm",onClick:r=>{r.stopPropagation();const o=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),s=URL.createObjectURL(o),a=document.createElement("a");a.href=s,a.download=`${t}-autorouting.json`,a.click(),URL.revokeObjectURL(s)},children:[he.jsx(A2n,{className:"rf-w-3 rf-h-3"}),"Download"]}),e&&he.jsxs(C0,{variant:"outline",size:"sm",onClick:r=>{r.stopPropagation(),e&&e(t,{simpleRouteJson:i})},children:[he.jsx(F2n,{className:"rf-w-3 rf-h-3"}),"Report Bug"]})]})]},t))})]})}),w3n=({code:n,fsMap:e,autoroutingLog:t,circuitJsonErrors:i,circuitJsonWarnings:r,onReportAutoroutingLog:o,errorMessage:s,errorStack:a,circuitJson:c,evalVersion:l})=>{const u=xe.useMemo(()=>{const I=[];if(s&&I.push({type:"Execution Error",message:s,stack:a||void 0,source:"execution"}),i&&i.length>0)for(const A of i)I.push({type:A.type||"Circuit JSON Error",message:A.message||"No error message available",stack:A.stack||"",source:"circuitJson"});return I},[s,a,i]),d=xe.useMemo(()=>!c||!Array.isArray(c)?void 0:c.find(A=>A.type==="source_project_metadata")?.software_used_string,[c]),h=xe.useMemo(()=>{const I=[];if(r&&r.length>0)for(const A of r)I.push({type:A.type||"Circuit JSON Warning",message:A.message||"No warning message available",stack:A.stack||"",source:"circuitJson"});return I},[r]),p=()=>{if(e)try{return IQt(e instanceof Map?Object.fromEntries(e.entries()):e)}catch{}return H2n(n??"")},m=(I,A)=>{const B=`https://github.com/tscircuit/tscircuit.com/issues/new?title=${encodeURIComponent(I)}&body=${encodeURIComponent(A)}`;window.open(B,"_blank")},[y,g]=xe.useState(0),[x,v]=xe.useState(0);if(u.length===0&&h.length===0)return he.jsxs("div",{className:"px-2",children:[he.jsx("div",{className:"rf-mt-4 rf-bg-green-50 rf-rounded-md rf-border rf-border-green-200",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-green-800 rf-mb-3",children:"No errors or warnings!"}),he.jsx("p",{className:"rf-text-sm rf-text-green-700",children:"Your code is running without any errors or warnings."})]})}),he.jsxs("div",{className:"rf-flex rf-gap-2 rf-mt-4 rf-justify-end",children:[he.jsx(nnt,{autoroutingLog:t,onReportAutoroutingLog:o}),he.jsxs(C0,{variant:"outline",className:"rf-p-1",onClick:()=>{const I=p();m("Issue Report",`[Package code to reproduce](${I})`)},children:[he.jsx(hye,{className:"rf-w-4 rf-h-4"}),"Report Issue"]})]})]});const w=()=>{g(I=>Math.max(I-1,0))},T=()=>{g(I=>Math.min(I+1,u.length-1))},k=()=>{v(I=>Math.max(I-1,0))},P=()=>{v(I=>Math.min(I+1,h.length-1))},R=u[y],M=h[x];return he.jsx(he.Fragment,{children:he.jsxs("div",{className:"rf-w-[95%] rf-mx-auto",children:[u.length>1&&he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-mb-2",children:[he.jsx("button",{type:"button",className:"rf-p-1 rf-rounded-sm rf-transition-colors",onClick:w,disabled:y===0,children:he.jsx(YJe,{className:"rf-h-4 rf-w-4 rf-text-red-500"})}),he.jsx("button",{type:"button",className:"rf-p-1 rf-rounded-sm rf-transition-colors",onClick:T,disabled:y===u.length-1,children:he.jsx(NH,{className:"rf-h-4 rf-w-4 rf-text-red-500"})}),he.jsxs("span",{className:"rf-text-sm rf-text-red-600",children:[y+1," of ",u.length," errors"]})]}),R&&he.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200 rf-max-h-[500px] rf-overflow-y-auto rf-px-2",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-1",children:R.type}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600",children:R.message}),(R.stack||l||d)&&he.jsxs("details",{style:{whiteSpace:"pre-wrap"},className:"rf-text-xs rf-font-mono rf-text-red-600 rf-mt-2",children:[l&&`@tscircuit/eval@${l}
|
|
5348
5348
|
`,d&&`${d}
|
|
5349
|
-
`,R.stack]})]})}),h.length>0&&he.jsxs(he.Fragment,{children:[h.length>1&&he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-mb-2 rf-mt-4",children:[he.jsx("button",{type:"button",className:"rf-p-1 rf-rounded-sm rf-transition-colors",onClick:k,disabled:x===0,children:he.jsx(YJe,{className:"rf-h-4 rf-w-4 rf-text-orange-500"})}),he.jsx("button",{type:"button",className:"rf-p-1 rf-rounded-sm rf-transition-colors",onClick:P,disabled:x===h.length-1,children:he.jsx(NH,{className:"rf-h-4 rf-w-4 rf-text-orange-500"})}),he.jsxs("span",{className:"rf-text-sm rf-text-orange-600",children:[x+1," of ",h.length," warnings"]})]}),M&&he.jsx("div",{className:"rf-mt-4 rf-bg-orange-50 rf-rounded-md rf-border rf-border-orange-200 rf-max-h-[500px] rf-overflow-y-auto rf-px-2",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-orange-800 rf-mb-1",children:M.type}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-orange-600",children:M.message}),M.stack&&he.jsx("details",{style:{whiteSpace:"pre-wrap"},className:"rf-text-xs rf-font-mono rf-text-orange-600 rf-mt-2",children:M.stack})]})})]})
|
|
5349
|
+
`,R.stack]})]})}),h.length>0&&he.jsxs(he.Fragment,{children:[h.length>1&&he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-mb-2 rf-mt-4",children:[he.jsx("button",{type:"button",className:"rf-p-1 rf-rounded-sm rf-transition-colors",onClick:k,disabled:x===0,children:he.jsx(YJe,{className:"rf-h-4 rf-w-4 rf-text-orange-500"})}),he.jsx("button",{type:"button",className:"rf-p-1 rf-rounded-sm rf-transition-colors",onClick:P,disabled:x===h.length-1,children:he.jsx(NH,{className:"rf-h-4 rf-w-4 rf-text-orange-500"})}),he.jsxs("span",{className:"rf-text-sm rf-text-orange-600",children:[x+1," of ",h.length," warnings"]})]}),M&&he.jsx("div",{className:"rf-mt-4 rf-bg-orange-50 rf-rounded-md rf-border rf-border-orange-200 rf-max-h-[500px] rf-overflow-y-auto rf-px-2",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-orange-800 rf-mb-1",children:M.type}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-orange-600",children:M.message}),M.stack&&he.jsx("details",{style:{whiteSpace:"pre-wrap"},className:"rf-text-xs rf-font-mono rf-text-orange-600 rf-mt-2",children:M.stack})]})})]}),he.jsxs("div",{className:"rf-flex rf-gap-2 rf-mt-4 rf-justify-end",children:[he.jsx(nnt,{autoroutingLog:t,onReportAutoroutingLog:o}),he.jsxs(C0,{variant:"outline",className:"rf-p-1",onClick:()=>{let I=`${R.type}: ${R.message}`;l&&(I+=`
|
|
5350
5350
|
@tscircuit/eval@${l}`),d&&(I+=`
|
|
5351
5351
|
${d}`),R.stack&&(I+=`
|
|
5352
5352
|
${R.stack}`),navigator.clipboard.writeText(I),alert("Error copied to clipboard!")},children:[he.jsx(M2n,{className:"rf-w-4 rf-h-4"}),"Copy Error"]}),he.jsxs(C0,{variant:"outline",className:"rf-p-1",onClick:()=>{const I=`Error ${R.type}`.replace(/[^a-zA-Z0-9 ]/g," ").replace(/\s+/g," ").slice(0,100);let A=`${R.type}: ${R.message}`;l&&(A+=`
|
|
@@ -5363,7 +5363,7 @@ ${A}
|
|
|
5363
5363
|
### Error
|
|
5364
5364
|
\`\`\`
|
|
5365
5365
|
${R.type}: ${N}
|
|
5366
|
-
\`\`\``}m(I,B)},children:[he.jsx(hye,{className:"rf-w-4 rf-h-4"}),"Report Issue"]})]})]})};function S3n(n,e,t){const{transform:i,shouldDrawErrors:r}=t;if(!r)return[];const{pcb_port_ids:o}=n,s=e.find(h=>h.type==="pcb_port"&&h.pcb_port_id===o?.[0]),a=e.find(h=>h.type==="pcb_port"&&h.pcb_port_id===o?.[1]);if(!s||!a){const p=n.message?.match(/pcb_via\[#?(pcb_via_\d+)\]/)?.[1],m=e.find(y=>y.type==="pcb_via"&&y.pcb_via_id===p);if(m&&m.type==="pcb_via")return E3n(n,m,t);if(n.center){const y=Yt(i,{x:n.center.x,y:n.center.y});return[{name:"rect",type:"element",attributes:{x:(y.x-5).toString(),y:(y.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${y.x} ${y.y})`},children:[],value:""},{name:"text",type:"element",attributes:{x:y.x.toString(),y:(y.y-15).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:n.message||"Pcb Trace Error",name:"",attributes:{},children:[]}],value:""}]}else return[]}const c=Yt(i,{x:s.x,y:s.y}),l=Yt(i,{x:a.x,y:a.y}),u={x:(c.x+l.x)/2,y:(c.y+l.y)/2};return isNaN(c.x)||isNaN(c.y)||isNaN(l.x)||isNaN(l.y)||isNaN(u.x)||isNaN(u.y)?[]:[{name:"line",type:"element",attributes:{x1:c.x.toString(),y1:c.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:"red","stroke-width":"1.5","stroke-dasharray":"2,2"},children:[],value:""},{name:"line",type:"element",attributes:{x1:u.x.toString(),y1:u.y.toString(),x2:l.x.toString(),y2:l.y.toString(),stroke:"red","stroke-width":"1.5","stroke-dasharray":"2,2"},children:[],value:""},{name:"rect",type:"element",attributes:{x:(u.x-5).toString(),y:(u.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${u.x} ${u.y})`},children:[],value:""},{name:"text",type:"element",attributes:{x:u.x.toString(),y:(u.y-15).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:n.message||"Pcb Trace Error",name:"",attributes:{},children:[]}],value:""}]}function E3n(n,e,t){const{transform:i}=t;if(n.center&&e){const r=Yt(i,{x:n.center.x,y:n.center.y}),o=Yt(i,{x:e.x,y:e.y}),s=o.x-r.x,a=o.y-r.y,c=Math.sqrt(s*s+a*a),l=Math.atan2(a,s)*180/Math.PI,d=c+10*2,h=20,p=(r.x+o.x)/2,m=(r.y+o.y)/2;return[{name:"rect",type:"element",attributes:{x:(p-d/2).toString(),y:(m-h/2).toString(),width:d.toString(),height:h.toString(),fill:"none",stroke:"red","stroke-width":"1","stroke-dasharray":"3,2",transform:`rotate(${l} ${p} ${m})`},children:[],value:""},{name:"rect",type:"element",attributes:{x:(p-5).toString(),y:(m-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${p} ${m})`},children:[],value:""},{name:"text",type:"element",attributes:{x:p.toString(),y:(m-h/2-5).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:n.message||"Pcb Trace Error",name:"",attributes:{},children:[]}],value:""}]}return[]}function T3n(n,e){const{transform:t,layer:i}=e;if(!n.route||!Array.isArray(n.route))return[];const r=n.route[0],o=n.route[n.route.length-1],s=r.x===o.x&&r.y===o.y,a=n.route.slice(0,s?-1:void 0).map((c,l)=>{const[u,d]=Yt(t,[c.x,c.y]);return l===0?`M ${u} ${d}`:`L ${u} ${d}`}).join(" ")+(s?" Z":"");return[{name:"path",type:"element",attributes:{class:"pcb-fabrication-note-path",stroke:n.color||"rgba(255,255,255,0.5)",fill:"none",d:a,"stroke-width":(n.stroke_width*Math.abs(t.a)).toString(),"data-pcb-component-id":n.pcb_component_id,"data-pcb-fabrication-note-path-id":n.pcb_fabrication_note_path_id},value:"",children:[]}]}function M3n(n,e){const{transform:t,layer:i}=e,{anchor_position:r,anchor_alignment:o,text:s,font_size:a=1,layer:c="top",color:l}=n;if(i&&c!==i)return[];if(!r||typeof r.x!="number"||typeof r.y!="number")return console.error("Invalid anchor_position:",r),[];const[u,d]=Yt(t,[r.x,r.y]),h=a*Math.abs(t.a),p=as(vs(u,d),wb(Math.PI/180));return[{name:"text",type:"element",attributes:{x:"0",y:"0","font-family":"Arial, sans-serif","font-size":h.toString(),"text-anchor":"middle","dominant-baseline":"central",transform:TE(p),class:"pcb-fabrication-note-text",fill:l||"rgba(255,255,255,0.5)"},children:[{type:"text",value:s,name:"",attributes:{},children:[]}],value:""}]}function A3n(n,e){const{transform:t,colorMap:i}=e,[r,o]=Yt(t,[n.x,n.y]);if(n.shape==="pill"){const s=n.outer_width*Math.abs(t.a),a=n.outer_height*Math.abs(t.a),c=n.hole_width*Math.abs(t.a),l=n.hole_height*Math.abs(t.a),u=s/2,d=c/2,h=a-s,p=n.ccw_rotation||0,m=p?`translate(${r} ${o}) rotate(${-p})`:`translate(${r} ${o})`,y=p?`translate(${r} ${o}) rotate(${-p})`:`translate(${r} ${o})`;return[{name:"g",type:"element",children:[{name:"path",type:"element",attributes:{class:"pcb-hole-outer",fill:i.copper.top,d:`M${-u},${-h/2} v${h} a${u},${u} 0 0 0 ${s},0 v-${h} a${u},${u} 0 0 0 -${s},0 z`,transform:m},value:"",children:[]},{name:"path",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,d:`M${-d},${-(l-c)/2} v${l-c} a${d},${d} 0 0 0 ${c},0 v-${l-c} a${d},${d} 0 0 0 -${c},0 z`,transform:y},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="circle"){const s=n.outer_diameter*Math.abs(t.a),a=n.outer_diameter*Math.abs(t.a),c=n.hole_diameter*Math.abs(t.a),l=n.hole_diameter*Math.abs(t.a),u=Math.min(s,a)/2,d=Math.min(c,l)/2;return[{name:"g",type:"element",children:[{name:"circle",type:"element",attributes:{class:"pcb-hole-outer",fill:i.copper.top,cx:r.toString(),cy:o.toString(),r:u.toString()},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,cx:r.toString(),cy:o.toString(),r:d.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="circular_hole_with_rect_pad"){const s=n,a=n.hole_diameter*Math.abs(t.a),c=n.rect_pad_width*Math.abs(t.a),l=n.rect_pad_height*Math.abs(t.a),u=(n.rect_border_radius??0)*Math.abs(t.a),d=a/2,[h,p]=Yt(t,[s.x+(s.hole_offset_x??0),s.y+(s.hole_offset_y??0)]);return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:i.copper.top,x:(r-c/2).toString(),y:(o-l/2).toString(),width:c.toString(),height:l.toString(),...u?{rx:u.toString(),ry:u.toString()}:{}},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,cx:h.toString(),cy:p.toString(),r:d.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="pill_hole_with_rect_pad"){const s=n,a=s.rect_pad_width*Math.abs(t.a),c=s.rect_pad_height*Math.abs(t.a),l=(s.rect_border_radius??0)*Math.abs(t.a),u=s.hole_height*Math.abs(t.a),d=s.hole_width*Math.abs(t.a),h=s,p=h.hole_offset_x??0,m=h.hole_offset_y??0,[y,g]=Yt(t,[s.x+p,s.y+m]),x=Math.min(u,d)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:i.copper.top,x:(r-a/2).toString(),y:(o-c/2).toString(),width:a.toString(),height:c.toString(),...l?{rx:l.toString(),ry:l.toString()}:{}},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,x:(y-d/2).toString(),y:(g-u/2).toString(),width:d.toString(),height:u.toString(),rx:x.toString(),ry:x.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="rotated_pill_hole_with_rect_pad"){const s=n,a=s.rect_pad_width*Math.abs(t.a),c=s.rect_pad_height*Math.abs(t.a),l=(s.rect_border_radius??0)*Math.abs(t.a),u=s.hole_height*Math.abs(t.a),d=s.hole_width*Math.abs(t.a),h=s,p=h.hole_offset_x??0,m=h.hole_offset_y??0,[y,g]=Yt(t,[s.x+p,s.y+m]),x=Math.min(u,d)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:i.copper.top,x:(-a/2).toString(),y:(-c/2).toString(),width:a.toString(),height:c.toString(),transform:`translate(${r} ${o}) rotate(${-s.rect_ccw_rotation})`,...l?{rx:l.toString(),ry:l.toString()}:{}},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,x:(-d/2).toString(),y:(-u/2).toString(),width:d.toString(),height:u.toString(),rx:x.toString(),ry:x.toString(),transform:`translate(${y} ${g}) rotate(${-s.hole_ccw_rotation})`},value:"",children:[]}],value:"",attributes:{}}]}return[]}function C3n(n,e){const{transform:t,layer:i,colorMap:r}=e;if(!n.route||!Array.isArray(n.route))return[];let o=n.route.map((u,d)=>{const[h,p]=Yt(t,[u.x,u.y]);return d===0?`M ${h} ${p}`:`L ${h} ${p}`}).join(" ");const s=n.route[0],a=n.route[n.route.length-1];s&&a&&s.x===a.x&&s.y===a.y&&(o+=" Z");const c=n.layer||"top";if(i&&c!==i)return[];const l=c==="bottom"?r.silkscreen.bottom:r.silkscreen.top;return[{name:"path",type:"element",attributes:{class:`pcb-silkscreen pcb-silkscreen-${c}`,d:o,fill:"none",stroke:l,"stroke-width":(n.stroke_width*Math.abs(t.a)).toString(),"stroke-linecap":"round","stroke-linejoin":"round","data-pcb-component-id":n.pcb_component_id,"data-pcb-silkscreen-path-id":n.pcb_silkscreen_path_id},value:"",children:[]}]}function P3n(n,e){const{transform:t,layer:i,colorMap:r}=e,{anchor_position:o,text:s,font_size:a=1,layer:c="top",ccw_rotation:l=0,anchor_alignment:u="center"}=n;if(i&&c!==i)return[];if(!o||typeof o.x!="number"||typeof o.y!="number")return console.error("Invalid anchor_position:",o),[];const[d,h]=Yt(t,[o.x,o.y]),p=a*Math.abs(t.a);let m="middle",y="central";const g=0,x=0;switch(u){case"top_left":m="start",y="text-before-edge";break;case"top_center":m="middle",y="text-before-edge";break;case"top_right":m="end",y="text-before-edge";break;case"center_left":m="start",y="central";break;case"center_right":m="end",y="central";break;case"bottom_left":m="start",y="text-after-edge";break;case"bottom_center":m="middle",y="text-after-edge";break;case"bottom_right":m="end",y="text-after-edge";break;case"center":default:m="middle",y="central";break}const v=as(vs(d,h),wb(-l*Math.PI/180),...c==="bottom"?[Ey(-1,1)]:[]),w=c==="bottom"?r.silkscreen.bottom:r.silkscreen.top,T=s.split(`
|
|
5366
|
+
\`\`\``}m(I,B)},children:[he.jsx(hye,{className:"rf-w-4 rf-h-4"}),"Report Issue"]})]})]})})};function S3n(n,e,t){const{transform:i,shouldDrawErrors:r}=t;if(!r)return[];const{pcb_port_ids:o}=n,s=e.find(h=>h.type==="pcb_port"&&h.pcb_port_id===o?.[0]),a=e.find(h=>h.type==="pcb_port"&&h.pcb_port_id===o?.[1]);if(!s||!a){const p=n.message?.match(/pcb_via\[#?(pcb_via_\d+)\]/)?.[1],m=e.find(y=>y.type==="pcb_via"&&y.pcb_via_id===p);if(m&&m.type==="pcb_via")return E3n(n,m,t);if(n.center){const y=Yt(i,{x:n.center.x,y:n.center.y});return[{name:"rect",type:"element",attributes:{x:(y.x-5).toString(),y:(y.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${y.x} ${y.y})`},children:[],value:""},{name:"text",type:"element",attributes:{x:y.x.toString(),y:(y.y-15).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:n.message||"Pcb Trace Error",name:"",attributes:{},children:[]}],value:""}]}else return[]}const c=Yt(i,{x:s.x,y:s.y}),l=Yt(i,{x:a.x,y:a.y}),u={x:(c.x+l.x)/2,y:(c.y+l.y)/2};return isNaN(c.x)||isNaN(c.y)||isNaN(l.x)||isNaN(l.y)||isNaN(u.x)||isNaN(u.y)?[]:[{name:"line",type:"element",attributes:{x1:c.x.toString(),y1:c.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:"red","stroke-width":"1.5","stroke-dasharray":"2,2"},children:[],value:""},{name:"line",type:"element",attributes:{x1:u.x.toString(),y1:u.y.toString(),x2:l.x.toString(),y2:l.y.toString(),stroke:"red","stroke-width":"1.5","stroke-dasharray":"2,2"},children:[],value:""},{name:"rect",type:"element",attributes:{x:(u.x-5).toString(),y:(u.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${u.x} ${u.y})`},children:[],value:""},{name:"text",type:"element",attributes:{x:u.x.toString(),y:(u.y-15).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:n.message||"Pcb Trace Error",name:"",attributes:{},children:[]}],value:""}]}function E3n(n,e,t){const{transform:i}=t;if(n.center&&e){const r=Yt(i,{x:n.center.x,y:n.center.y}),o=Yt(i,{x:e.x,y:e.y}),s=o.x-r.x,a=o.y-r.y,c=Math.sqrt(s*s+a*a),l=Math.atan2(a,s)*180/Math.PI,d=c+10*2,h=20,p=(r.x+o.x)/2,m=(r.y+o.y)/2;return[{name:"rect",type:"element",attributes:{x:(p-d/2).toString(),y:(m-h/2).toString(),width:d.toString(),height:h.toString(),fill:"none",stroke:"red","stroke-width":"1","stroke-dasharray":"3,2",transform:`rotate(${l} ${p} ${m})`},children:[],value:""},{name:"rect",type:"element",attributes:{x:(p-5).toString(),y:(m-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${p} ${m})`},children:[],value:""},{name:"text",type:"element",attributes:{x:p.toString(),y:(m-h/2-5).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:n.message||"Pcb Trace Error",name:"",attributes:{},children:[]}],value:""}]}return[]}function T3n(n,e){const{transform:t,layer:i}=e;if(!n.route||!Array.isArray(n.route))return[];const r=n.route[0],o=n.route[n.route.length-1],s=r.x===o.x&&r.y===o.y,a=n.route.slice(0,s?-1:void 0).map((c,l)=>{const[u,d]=Yt(t,[c.x,c.y]);return l===0?`M ${u} ${d}`:`L ${u} ${d}`}).join(" ")+(s?" Z":"");return[{name:"path",type:"element",attributes:{class:"pcb-fabrication-note-path",stroke:n.color||"rgba(255,255,255,0.5)",fill:"none",d:a,"stroke-width":(n.stroke_width*Math.abs(t.a)).toString(),"data-pcb-component-id":n.pcb_component_id,"data-pcb-fabrication-note-path-id":n.pcb_fabrication_note_path_id},value:"",children:[]}]}function M3n(n,e){const{transform:t,layer:i}=e,{anchor_position:r,anchor_alignment:o,text:s,font_size:a=1,layer:c="top",color:l}=n;if(i&&c!==i)return[];if(!r||typeof r.x!="number"||typeof r.y!="number")return console.error("Invalid anchor_position:",r),[];const[u,d]=Yt(t,[r.x,r.y]),h=a*Math.abs(t.a),p=as(vs(u,d),wb(Math.PI/180));return[{name:"text",type:"element",attributes:{x:"0",y:"0","font-family":"Arial, sans-serif","font-size":h.toString(),"text-anchor":"middle","dominant-baseline":"central",transform:TE(p),class:"pcb-fabrication-note-text",fill:l||"rgba(255,255,255,0.5)"},children:[{type:"text",value:s,name:"",attributes:{},children:[]}],value:""}]}function A3n(n,e){const{transform:t,colorMap:i}=e,[r,o]=Yt(t,[n.x,n.y]);if(n.shape==="pill"){const s=n.outer_width*Math.abs(t.a),a=n.outer_height*Math.abs(t.a),c=n.hole_width*Math.abs(t.a),l=n.hole_height*Math.abs(t.a),u=s/2,d=c/2,h=a-s,p=n.ccw_rotation||0,m=p?`translate(${r} ${o}) rotate(${-p})`:`translate(${r} ${o})`,y=p?`translate(${r} ${o}) rotate(${-p})`:`translate(${r} ${o})`;return[{name:"g",type:"element",children:[{name:"path",type:"element",attributes:{class:"pcb-hole-outer",fill:i.copper.top,d:`M${-u},${-h/2} v${h} a${u},${u} 0 0 0 ${s},0 v-${h} a${u},${u} 0 0 0 -${s},0 z`,transform:m},value:"",children:[]},{name:"path",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,d:`M${-d},${-(l-c)/2} v${l-c} a${d},${d} 0 0 0 ${c},0 v-${l-c} a${d},${d} 0 0 0 -${c},0 z`,transform:y},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="circle"){const s=n.outer_diameter*Math.abs(t.a),a=n.outer_diameter*Math.abs(t.a),c=n.hole_diameter*Math.abs(t.a),l=n.hole_diameter*Math.abs(t.a),u=Math.min(s,a)/2,d=Math.min(c,l)/2;return[{name:"g",type:"element",children:[{name:"circle",type:"element",attributes:{class:"pcb-hole-outer",fill:i.copper.top,cx:r.toString(),cy:o.toString(),r:u.toString()},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,cx:r.toString(),cy:o.toString(),r:d.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="circular_hole_with_rect_pad"){const s=n,a=n.hole_diameter*Math.abs(t.a),c=n.rect_pad_width*Math.abs(t.a),l=n.rect_pad_height*Math.abs(t.a),u=(n.rect_border_radius??0)*Math.abs(t.a),d=a/2,[h,p]=Yt(t,[s.x+(s.hole_offset_x??0),s.y+(s.hole_offset_y??0)]);return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:i.copper.top,x:(r-c/2).toString(),y:(o-l/2).toString(),width:c.toString(),height:l.toString(),...u?{rx:u.toString(),ry:u.toString()}:{}},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,cx:h.toString(),cy:p.toString(),r:d.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="pill_hole_with_rect_pad"){const s=n,a=s.rect_pad_width*Math.abs(t.a),c=s.rect_pad_height*Math.abs(t.a),l=(s.rect_border_radius??0)*Math.abs(t.a),u=s.hole_height*Math.abs(t.a),d=s.hole_width*Math.abs(t.a),h=s,p=h.hole_offset_x??0,m=h.hole_offset_y??0,[y,g]=Yt(t,[s.x+p,s.y+m]),x=Math.min(u,d)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:i.copper.top,x:(r-a/2).toString(),y:(o-c/2).toString(),width:a.toString(),height:c.toString(),...l?{rx:l.toString(),ry:l.toString()}:{}},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,x:(y-d/2).toString(),y:(g-u/2).toString(),width:d.toString(),height:u.toString(),rx:x.toString(),ry:x.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="rotated_pill_hole_with_rect_pad"){const s=n,a=s.rect_pad_width*Math.abs(t.a),c=s.rect_pad_height*Math.abs(t.a),l=(s.rect_border_radius??0)*Math.abs(t.a),u=s.hole_height*Math.abs(t.a),d=s.hole_width*Math.abs(t.a),h=s,p=h.hole_offset_x??0,m=h.hole_offset_y??0,[y,g]=Yt(t,[s.x+p,s.y+m]),x=Math.min(u,d)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:i.copper.top,x:(-a/2).toString(),y:(-c/2).toString(),width:a.toString(),height:c.toString(),transform:`translate(${r} ${o}) rotate(${-s.rect_ccw_rotation})`,...l?{rx:l.toString(),ry:l.toString()}:{}},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,x:(-d/2).toString(),y:(-u/2).toString(),width:d.toString(),height:u.toString(),rx:x.toString(),ry:x.toString(),transform:`translate(${y} ${g}) rotate(${-s.hole_ccw_rotation})`},value:"",children:[]}],value:"",attributes:{}}]}return[]}function C3n(n,e){const{transform:t,layer:i,colorMap:r}=e;if(!n.route||!Array.isArray(n.route))return[];let o=n.route.map((u,d)=>{const[h,p]=Yt(t,[u.x,u.y]);return d===0?`M ${h} ${p}`:`L ${h} ${p}`}).join(" ");const s=n.route[0],a=n.route[n.route.length-1];s&&a&&s.x===a.x&&s.y===a.y&&(o+=" Z");const c=n.layer||"top";if(i&&c!==i)return[];const l=c==="bottom"?r.silkscreen.bottom:r.silkscreen.top;return[{name:"path",type:"element",attributes:{class:`pcb-silkscreen pcb-silkscreen-${c}`,d:o,fill:"none",stroke:l,"stroke-width":(n.stroke_width*Math.abs(t.a)).toString(),"stroke-linecap":"round","stroke-linejoin":"round","data-pcb-component-id":n.pcb_component_id,"data-pcb-silkscreen-path-id":n.pcb_silkscreen_path_id},value:"",children:[]}]}function P3n(n,e){const{transform:t,layer:i,colorMap:r}=e,{anchor_position:o,text:s,font_size:a=1,layer:c="top",ccw_rotation:l=0,anchor_alignment:u="center"}=n;if(i&&c!==i)return[];if(!o||typeof o.x!="number"||typeof o.y!="number")return console.error("Invalid anchor_position:",o),[];const[d,h]=Yt(t,[o.x,o.y]),p=a*Math.abs(t.a);let m="middle",y="central";const g=0,x=0;switch(u){case"top_left":m="start",y="text-before-edge";break;case"top_center":m="middle",y="text-before-edge";break;case"top_right":m="end",y="text-before-edge";break;case"center_left":m="start",y="central";break;case"center_right":m="end",y="central";break;case"bottom_left":m="start",y="text-after-edge";break;case"bottom_center":m="middle",y="text-after-edge";break;case"bottom_right":m="end",y="text-after-edge";break;case"center":default:m="middle",y="central";break}const v=as(vs(d,h),wb(-l*Math.PI/180),...c==="bottom"?[Ey(-1,1)]:[]),w=c==="bottom"?r.silkscreen.bottom:r.silkscreen.top,T=s.split(`
|
|
5367
5367
|
`),k=T.length===1?[{type:"text",value:s,name:"",attributes:{},children:[]}]:T.map((R,M)=>({type:"element",name:"tspan",value:"",attributes:{x:"0",...M>0?{dy:p.toString()}:{}},children:[{type:"text",value:R,name:"",attributes:{},children:[]}]}));return[{name:"text",type:"element",attributes:{x:"0",y:"0",dx:g.toString(),dy:x.toString(),fill:w,"font-family":"Arial, sans-serif","font-size":p.toString(),"text-anchor":m,"dominant-baseline":y,transform:TE(v),class:`pcb-silkscreen-text pcb-silkscreen-${c}`,"data-pcb-silkscreen-text-id":n.pcb_component_id,stroke:"none"},children:k,value:""}]}function R3n(n,e){const{transform:t,layer:i,colorMap:r}=e,{center:o,width:s,height:a,layer:c="top",pcb_silkscreen_rect_id:l,stroke_width:u,is_filled:d,has_stroke:h,is_stroke_dashed:p}=n;if(i&&c!==i)return[];if(!o||typeof o.x!="number"||typeof o.y!="number"||typeof s!="number"||typeof a!="number")return console.error("Invalid rectangle data:",{center:o,width:s,height:a}),[];const[m,y]=Yt(t,[o.x,o.y]),g=s*Math.abs(t.a),x=a*Math.abs(t.d),v=u*Math.abs(t.a),w=c==="bottom"?r.silkscreen.bottom:r.silkscreen.top,T={x:(m-g/2).toString(),y:(y-x/2).toString(),width:g.toString(),height:x.toString(),class:`pcb-silkscreen-rect pcb-silkscreen-${c}`,"data-pcb-silkscreen-rect-id":l};T.fill=d?w:"none";let k;if(h===void 0?k=v>0:k=h,k){if(T.stroke=w,T["stroke-width"]=v.toString(),p){const R=.1*Math.abs(t.a),M=.05*Math.abs(t.a);T["stroke-dasharray"]=`${R} ${M}`}}else T.stroke="none";return[{name:"rect",type:"element",attributes:T,value:"",children:[]}]}function I3n(n,e){const{transform:t,layer:i,colorMap:r}=e,{center:o,radius:s,layer:a="top",pcb_silkscreen_circle_id:c,stroke_width:l=1}=n;if(i&&a!==i)return[];if(!o||typeof o.x!="number"||typeof o.y!="number"||typeof s!="number")return console.error("Invalid PCB Silkscreen Circle data:",{center:o,radius:s}),[];const[u,d]=Yt(t,[o.x,o.y]),h=s*Math.abs(t.a),p=l*Math.abs(t.a),m=a==="bottom"?r.silkscreen.bottom:r.silkscreen.top;return[{name:"circle",type:"element",attributes:{cx:u.toString(),cy:d.toString(),r:h.toString(),class:`pcb-silkscreen-circle pcb-silkscreen-${a}`,stroke:m,"stroke-width":p.toString(),"data-pcb-silkscreen-circle-id":c},value:"",children:[]}]}function k3n(n,e){const{transform:t,layer:i,colorMap:r}=e,{x1:o,y1:s,x2:a,y2:c,stroke_width:l,layer:u="top",pcb_silkscreen_line_id:d}=n;if(i&&u!==i)return[];if(typeof o!="number"||typeof s!="number"||typeof a!="number"||typeof c!="number")return console.error("Invalid coordinates:",{x1:o,y1:s,x2:a,y2:c}),[];const[h,p]=Yt(t,[o,s]),[m,y]=Yt(t,[a,c]),g=l*Math.abs(t.a),x=u==="bottom"?r.silkscreen.bottom:r.silkscreen.top;return[{name:"line",type:"element",attributes:{x1:h.toString(),y1:p.toString(),x2:m.toString(),y2:y.toString(),stroke:x,"stroke-width":g.toString(),class:`pcb-silkscreen-line pcb-silkscreen-${u}`,"data-pcb-silkscreen-line-id":d},value:"",children:[]}]}function N3n(n){const e=[];for(let t=0;t<n.length-1;t++)e.push([n[t],n[t+1]]);return e}var gv={copper:{top:"rgb(200, 52, 52)",bottom:"rgb(77, 127, 196)"},soldermask:{top:"rgb(200, 52, 52)",bottom:"rgb(77, 127, 196)"},drill:"#FF26E2",silkscreen:{top:"#f2eda1",bottom:"#5da9e9"},boardOutline:"rgba(255, 255, 255, 0.5)",debugComponent:{fill:null,stroke:null}};gv.drill,gv.silkscreen.top,gv.silkscreen.bottom,gv.copper.top,gv.copper.bottom;function VC(n,e=gv){return e.copper[n]??"white"}var O3n={bottom:"rgb(105, 105, 105)",top:"rgb(105, 105, 105)"};function lV(n){return O3n[n]??"rgb(105, 105, 105)"}function L3n(n,e){const{transform:t,layer:i,colorMap:r,renderSolderMask:o}=e;if(!n.route||!Array.isArray(n.route)||n.route.length<2)return[];const s=N3n(n.route),a=[];for(const[c,l]of s){const u=Yt(t,[c.x,c.y]),d=Yt(t,[l.x,l.y]),h="layer"in c?c.layer:"layer"in l?l.layer:null;if(!h||i&&h!==i)continue;const p=VC(h,r),m=r.soldermask[h]??p,y="width"in c?c.width:"width"in l?l.width:null,g=y?(y*Math.abs(t.a)).toString():"0.3";if(o){const x={name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-trace",stroke:p,fill:"none",d:`M ${u[0]} ${u[1]} L ${d[0]} ${d[1]}`,"stroke-width":g,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"crispEdges","data-layer":h}},v={name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask",stroke:m,fill:"none",d:`M ${u[0]} ${u[1]} L ${d[0]} ${d[1]}`,"stroke-width":g,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"crispEdges","data-layer":h}};a.push(v,x)}else{const x={name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-trace",stroke:m,fill:"none",d:`M ${u[0]} ${u[1]} L ${d[0]} ${d[1]}`,"stroke-width":g,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"crispEdges","data-layer":h}};a.push(x)}}return a.sort((c,l)=>{const u=c.attributes["data-layer"],d=l.attributes["data-layer"];return u==="bottom"&&d!=="bottom"?-1:u==="top"&&d!=="top"?1:0}),a}function D3n(n,e){const{transform:t,layer:i,colorMap:r}=e;if(i&&n.layer!==i)return[];const o=!!n?.is_covered_with_solder_mask,s=r.soldermask[n.layer]??r.soldermask.top;if(n.shape==="rect"||n.shape==="rotated_rect"){const a=n.width*Math.abs(t.a),c=n.height*Math.abs(t.d),[l,u]=Yt(t,[n.x,n.y]),d=(n.rect_border_radius??0)*Math.abs(t.a);if(n.shape==="rotated_rect"&&n.ccw_rotation){const m={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad",fill:VC(n.layer,r),x:(-a/2).toString(),y:(-c/2).toString(),width:a.toString(),height:c.toString(),transform:`translate(${l} ${u}) rotate(${-n.ccw_rotation})`,"data-layer":n.layer,...d?{rx:d.toString(),ry:d.toString()}:{}}};if(!o)return[m];const y={name:m.name,type:m.type,value:"",children:[],attributes:{...m.attributes,class:"pcb-solder-mask",fill:s}};return[m,y]}const h={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad",fill:VC(n.layer,r),x:(l-a/2).toString(),y:(u-c/2).toString(),width:a.toString(),height:c.toString(),"data-layer":n.layer,...d?{rx:d.toString(),ry:d.toString()}:{}}};if(!o)return[h];const p={name:h.name,type:h.type,value:"",children:[],attributes:{...h.attributes,class:"pcb-solder-mask",fill:s}};return[h,p]}if(n.shape==="pill"){const a=n.width*Math.abs(t.a),c=n.height*Math.abs(t.d),l=n.radius*Math.abs(t.a),[u,d]=Yt(t,[n.x,n.y]),h={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad",fill:VC(n.layer,r),x:(u-a/2).toString(),y:(d-c/2).toString(),width:a.toString(),height:c.toString(),rx:l.toString(),ry:l.toString(),"data-layer":n.layer}};if(!o)return[h];const p={name:h.name,type:h.type,value:"",children:[],attributes:{...h.attributes,class:"pcb-solder-mask",fill:s}};return[h,p]}if(n.shape==="circle"){const a=n.radius*Math.abs(t.a),[c,l]=Yt(t,[n.x,n.y]),u={name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-pad",fill:VC(n.layer,r),cx:c.toString(),cy:l.toString(),r:a.toString(),"data-layer":n.layer}};if(!o)return[u];const d={name:u.name,type:u.type,value:"",children:[],attributes:{...u.attributes,class:"pcb-solder-mask",fill:s}};return[u,d]}if(n.shape==="polygon"){const a=(n.points??[]).map(u=>Yt(t,[u.x,u.y])),c={name:"polygon",type:"element",value:"",children:[],attributes:{class:"pcb-pad",fill:VC(n.layer,r),points:a.map(u=>u.join(",")).join(" "),"data-layer":n.layer}};if(!o)return[c];const l={name:c.name,type:c.type,value:"",children:[],attributes:{...c.attributes,class:"pcb-solder-mask",fill:s}};return[c,l]}return[]}function int(n,e){const{transform:t,colorMap:i}=e,{width:r,height:o,center:s,outline:a}=n;let c;if(a&&Array.isArray(a)&&a.length>=3)c=a.map((l,u)=>{const[d,h]=Yt(t,[l.x,l.y]);return u===0?`M ${d} ${h}`:`L ${d} ${h}`}).join(" ");else{const l=r/2,u=o/2,d=Yt(t,[s.x-l,s.y-u]),h=Yt(t,[s.x+l,s.y-u]),p=Yt(t,[s.x+l,s.y+u]),m=Yt(t,[s.x-l,s.y+u]);c=`M ${d[0]} ${d[1]} L ${h[0]} ${h[1]} L ${p[0]} ${p[1]} L ${m[0]} ${m[1]}`}return c+=" Z",[{name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-board",d:c,fill:"none",stroke:i.boardOutline,"stroke-width":(.1*Math.abs(t.a)).toString()}}]}function z3n(n,e){const{transform:t,colorMap:i}=e,[r,o]=Yt(t,[n.x,n.y]),s=n.outer_diameter*Math.abs(t.a),a=n.outer_diameter*Math.abs(t.a),c=n.hole_diameter*Math.abs(t.a),l=n.hole_diameter*Math.abs(t.a),u=Math.min(s,a)/2,d=Math.min(c,l)/2;return{name:"g",type:"element",children:[{name:"circle",type:"element",attributes:{class:"pcb-hole-outer",fill:i.copper.top,cx:r.toString(),cy:o.toString(),r:u.toString()}},{name:"circle",type:"element",attributes:{class:"pcb-hole-inner",fill:i.drill,cx:r.toString(),cy:o.toString(),r:d.toString()}}]}}function $3n(n,e){const{transform:t,colorMap:i}=e,[r,o]=Yt(t,[n.x,n.y]);if(n.hole_shape==="circle"||n.hole_shape==="square"){const s=n.hole_diameter*Math.abs(t.a),a=s/2;return n.hole_shape==="circle"?[{name:"circle",type:"element",attributes:{class:"pcb-hole",cx:r.toString(),cy:o.toString(),r:a.toString(),fill:i.drill},children:[],value:""}]:[{name:"rect",type:"element",attributes:{class:"pcb-hole",x:(r-a).toString(),y:(o-a).toString(),width:s.toString(),height:s.toString(),fill:i.drill},children:[],value:""}]}if(n.hole_shape==="oval"){const s=n.hole_width*Math.abs(t.a),a=n.hole_height*Math.abs(t.a),c=s/2,l=a/2;return[{name:"ellipse",type:"element",attributes:{class:"pcb-hole",cx:r.toString(),cy:o.toString(),rx:c.toString(),ry:l.toString(),fill:i.drill},children:[],value:""}]}return[]}var F3n=(n,e)=>{const t=sa(e).pcb_smtpad.get(n);if(t&&"x"in t&&"y"in t)return{x:t.x,y:t.y};const i=sa(e).pcb_plated_hole.get(n);return i&&"x"in i&&"y"in i?{x:i.x,y:i.y}:null},U3n=(n,e,t,i)=>{const r=t.getIdsConnectedToNet(e);let o=null,s=1/0;for(const a of r){const c=F3n(a,i);if(c){const l=n.x-c.x,u=n.y-c.y,d=Math.sqrt(l*l+u*u);d>0&&d<s&&(s=d,o=c)}}return o};function B3n(n,e){const{transform:t}=e,i=TP(n),r=n.filter(c=>c.type==="pcb_port"),o=n.filter(c=>c.type==="source_trace"),s=[];r.forEach((c,l)=>{const u=c.pcb_port_id;if(!u)return;const d=i.getNetConnectedToId(u);if(!d)return;let h=!1;const p=sa(n).source_port.getWhere({pcb_port_id:u});if(p&&p.source_port_id){const g=p.source_port_id;for(const x of o)if(Array.isArray(x.connected_source_port_ids)&&x.connected_source_port_ids.includes(g)&&Array.isArray(x.connected_source_net_ids)&&x.connected_source_net_ids.length>0){h=!0;break}}const m={x:c.x,y:c.y},y=U3n(m,d,i,n);y&&s.push({key:`${u}-${l}`,startPoint:m,endPoint:y,isInNet:h})});const a=[];for(const c of s){const l=Yt(t,[c.startPoint.x,c.startPoint.y]),u=Yt(t,[c.endPoint.x,c.endPoint.y]),d={x1:l[0].toString(),y1:l[1].toString(),x2:u[0].toString(),y2:u[1].toString(),stroke:"white","stroke-width":"1","stroke-dasharray":"6,6"};a.push({name:"line",type:"element",attributes:d,value:"",children:[]})}return a}function j3n(n,e){const{transform:t,colorMap:i}=e;if(n.shape==="rect"){const r=n,[o,s]=Yt(t,[r.center.x,r.center.y]),a=r.width*Math.abs(t.a),c=r.height*Math.abs(t.d),l=-(r.rotation??0);return[{name:"rect",type:"element",attributes:{class:"pcb-cutout pcb-cutout-rect",x:(-a/2).toString(),y:(-c/2).toString(),width:a.toString(),height:c.toString(),fill:i.drill,transform:TE(as(vs(o,s),wb(l*Math.PI/180)))},children:[],value:""}]}if(n.shape==="circle"){const r=n,[o,s]=Yt(t,[r.center.x,r.center.y]),a=r.radius*Math.abs(t.a);return[{name:"circle",type:"element",attributes:{class:"pcb-cutout pcb-cutout-circle",cx:o.toString(),cy:s.toString(),r:a.toString(),fill:i.drill},children:[],value:""}]}if(n.shape==="polygon"){const r=n;return!r.points||r.points.length===0?[]:[{name:"polygon",type:"element",attributes:{class:"pcb-cutout pcb-cutout-polygon",points:r.points.map(a=>Yt(t,[a.x,a.y])).map(a=>`${a[0]},${a[1]}`).join(" "),fill:i.drill},children:[],value:""}]}return[]}function rnt(n,e){if(n.length===0)return"";const t=n.map(r=>{const[o,s]=Yt(e,[r.x,r.y]);return{...r,x:o,y:s}});let i=`M ${t[0].x} ${t[0].y}`;for(let r=0;r<t.length;r++){const o=t[r],s=t[(r+1)%t.length];if(o.bulge){if(Math.hypot(s.x-o.x,s.y-o.y)<1e-9)continue;const a=o.bulge,c=s.x-o.x,l=s.y-o.y,u=Math.hypot(c,l),d=Math.abs(u/4/a*(a*a+1)),h=a<0?1:0,p=Math.abs(a)>1?1:0;i+=` A ${d} ${d} 0 ${p} ${h} ${s.x} ${s.y}`}else i+=` L ${s.x} ${s.y}`}return i+=" Z",i}function H3n(n,e){const{transform:t,layer:i,colorMap:r}=e,{layer:o}=n;if(i&&o!==i)return[];const s=VC(o,r),a="0.5";if(n.shape==="rect"){const[c,l]=Yt(t,[n.center.x,n.center.y]),u=n.width*Math.abs(t.a),d=n.height*Math.abs(t.d),h=-(n.rotation??0);return[{name:"rect",type:"element",attributes:{class:"pcb-copper-pour pcb-copper-pour-rect",x:(-u/2).toString(),y:(-d/2).toString(),width:u.toString(),height:d.toString(),fill:s,"fill-opacity":a,transform:TE(as(vs(c,l),wb(h*Math.PI/180))),"data-layer":o},children:[],value:""}]}if(n.shape==="polygon")return!n.points||n.points.length===0?[]:[{name:"polygon",type:"element",attributes:{class:"pcb-copper-pour pcb-copper-pour-polygon",points:n.points.map(u=>Yt(t,[u.x,u.y])).map(u=>`${u[0]},${u[1]}`).join(" "),fill:s,"fill-opacity":a,"data-layer":o},children:[],value:""}];if(n.shape==="brep"){const{brep_shape:c}=n;let l=rnt(c.outer_ring.vertices,t);for(const u of c.inner_rings??[])l+=` ${rnt(u.vertices,t)}`;return[{name:"path",type:"element",attributes:{class:"pcb-copper-pour pcb-copper-pour-brep",d:l,fill:s,"fill-rule":"evenodd","fill-opacity":a,"data-layer":o},children:[],value:""}]}return[]}function V3n(n,e){const{transform:t}=e,{center:i,width:r,height:o,rotation:s=0}=n,[a,c]=Yt(t,[i.x,i.y]),l=r*Math.abs(t.a),u=o*Math.abs(t.d),d=`translate(${a}, ${c}) rotate(${-s}) scale(1, -1)`;return!e.colorMap.debugComponent?.fill&&!e.colorMap.debugComponent?.stroke?[]:[{name:"g",type:"element",attributes:{transform:d},children:[{name:"rect",type:"element",attributes:{class:"pcb-component",x:(-l/2).toString(),y:(-u/2).toString(),width:l.toString(),height:u.toString(),fill:e.colorMap.debugComponent.fill??"transparent",stroke:e.colorMap.debugComponent.stroke??"transparent"}}],value:""}]}function UR(n){return n.find(t=>t.type==="project_software_metadata"||t.type==="source_project_metadata")?.software_used_string}var G3n={version:"0.0.204"},BR=G3n.version,ont=["pcb_trace_error","pcb_plated_hole","pcb_fabrication_note_text","pcb_fabrication_note_path","pcb_silkscreen_text","pcb_silkscreen_path","pcb_via","pcb_cutout","pcb_copper_pour","pcb_smtpad","pcb_trace","pcb_component","pcb_board"];function ege(n,e){const t=e?.drawPaddingOutsideBoard??!0,i=e?.layer,r=e?.colorOverrides,o={copper:{top:r?.copper?.top??gv.copper.top,bottom:r?.copper?.bottom??gv.copper.bottom},drill:r?.drill??gv.drill,silkscreen:{top:r?.silkscreen?.top??gv.silkscreen.top,bottom:r?.silkscreen?.bottom??gv.silkscreen.bottom},boardOutline:r?.boardOutline??gv.boardOutline,soldermask:{top:r?.soldermask?.top??gv.soldermask.top,bottom:r?.soldermask?.bottom??gv.soldermask.bottom},debugComponent:{fill:r?.debugComponent?.fill??gv.debugComponent.fill,stroke:r?.debugComponent?.stroke??gv.debugComponent.stroke}};let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,d=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;for(const Ne of n)if(Ne.type==="pcb_board")Ne.outline&&Array.isArray(Ne.outline)&&Ne.outline.length>=3?(Ee(Ne.outline),Pe(Ne.outline)):"center"in Ne&&"width"in Ne&&"height"in Ne&&(oe(Ne.center,Ne.width,Ne.height),pe(Ne.center,Ne.width,Ne.height));else if("x"in Ne&&"y"in Ne)oe({x:Ne.x,y:Ne.y},0,0);else if(Ne.type==="pcb_smtpad"){const le=Ne;le.shape==="rect"||le.shape==="rotated_rect"||le.shape==="pill"?oe({x:le.x,y:le.y},le.width,le.height):le.shape==="circle"?oe({x:le.x,y:le.y},le.radius*2,le.radius*2):le.shape==="polygon"&&Oe(le.points)}else"route"in Ne?Oe(Ne.route):Ne.type==="pcb_silkscreen_text"||Ne.type==="pcb_silkscreen_rect"||Ne.type==="pcb_silkscreen_circle"||Ne.type==="pcb_silkscreen_line"?Ve(Ne):Ne.type==="pcb_copper_pour"&&(Ne.shape==="rect"?oe(Ne.center,Ne.width,Ne.height):Ne.shape==="polygon"&&Oe(Ne.points));const m=t?1:0,y=t||!Number.isFinite(u)?s:u,g=t||!Number.isFinite(d)?a:d,x=t||!Number.isFinite(h)?c:h,v=t||!Number.isFinite(p)?l:p,w=x-y+2*m,T=v-g+2*m;let k=e?.width??800,P=e?.height??600;if(e?.matchBoardAspectRatio){const Ne=h-u,le=p-d;if(Ne>0&&le>0){const Se=Ne/le;e?.width&&!e?.height?P=e.width/Se:e?.height&&!e?.width?k=e.height*Se:P=k/Se}}const R=[];for(const Ne of n)"route"in Ne&&Ne.route!==void 0&&R.push(Ne.route);const M=k/w,I=P/T,A=Math.min(M,I),B=(k-w*A)/2,N=(P-T*A)/2,V=as(vs(B-y*A+m*A,P-N+g*A-m*A),Ey(A,-A)),Y={transform:V,layer:i,shouldDrawErrors:e?.shouldDrawErrors,drawPaddingOutsideBoard:t,colorMap:o,renderSolderMask:e?.renderSolderMask};function W(Ne){if(Ne.type==="pcb_smtpad")return Ne.layer==="top"||Ne.layer==="bottom"?Ne.layer:void 0;if(Ne.type==="pcb_trace")for(const le of Ne.route??[]){const Se="layer"in le&&le.layer||"from_layer"in le&&le.from_layer||"to_layer"in le&&le.to_layer||void 0;if(Se==="top"||Se==="bottom")return Se}}function K(Ne){return Ne.type==="pcb_trace"||Ne.type==="pcb_smtpad"}let ee=n.sort((Ne,le)=>{const Se=W(Ne),ve=W(le);if(K(Ne)&&K(le)&&Se!==ve){if(Se==="top")return 1;if(ve==="top"||Se==="bottom")return-1;if(ve==="bottom")return 1}return(ont.indexOf(le.type)??9999)-(ont.indexOf(Ne.type)??9999)}).flatMap(Ne=>Y3n({elm:Ne,circuitJson:n,ctx:Y}));for(const Ne of n)if("stroke_width"in Ne){String(A*Ne.stroke_width);break}if(e?.shouldDrawRatsNest){const Ne=B3n(n,Y);ee=ee.concat(Ne)}const ae=[{name:"style",type:"element",value:"",attributes:{},children:[{type:"text",value:"",name:"",attributes:{},children:[]}]},{name:"rect",type:"element",value:"",attributes:{class:"boundary",x:"0",y:"0",fill:e?.backgroundColor??"#000",width:k.toString(),height:P.toString()},children:[]}];t&&ae.push(q3n(V,s,a,c,l)),ae.push(...ee);const ue=UR(n),ge=BR,re={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",width:k.toString(),height:P.toString(),...ue&&{"data-software-used-string":ue},...e?.includeVersion&&{"data-circuit-to-svg-version":ge}},value:"",children:ae.filter(Ne=>Ne!==null)};try{return SN(re)}catch(Ne){throw console.error("Error stringifying SVG object:",Ne),Ne}function oe(Ne,le,Se){const ve=le/2,Ye=Se/2;s=Math.min(s,Ne.x-ve),a=Math.min(a,Ne.y-Ye),c=Math.max(c,Ne.x+ve),l=Math.max(l,Ne.y+Ye)}function pe(Ne,le,Se){const ve=le/2,Ye=Se/2;u=Math.min(u,Ne.x-ve),d=Math.min(d,Ne.y-Ye),h=Math.max(h,Ne.x+ve),p=Math.max(p,Ne.y+Ye)}function Ee(Ne){for(const le of Ne)s=Math.min(s,le.x),a=Math.min(a,le.y),c=Math.max(c,le.x),l=Math.max(l,le.y)}function Pe(Ne){for(const le of Ne)u=Math.min(u,le.x),d=Math.min(d,le.y),h=Math.max(h,le.x),p=Math.max(p,le.y)}function Oe(Ne){for(const le of Ne)s=Math.min(s,le.x),a=Math.min(a,le.y),c=Math.max(c,le.x),l=Math.max(l,le.y)}function Ve(Ne){if(Ne.type==="pcb_silkscreen_text")oe(Ne.anchor_position,0,0);else if(Ne.type==="pcb_silkscreen_path")Oe(Ne.route);else if(Ne.type==="pcb_silkscreen_rect")oe(Ne.center,Ne.width,Ne.height);else if(Ne.type==="pcb_silkscreen_circle")oe(Ne.center,Ne.radius*2,Ne.radius*2);else if(Ne.type==="pcb_silkscreen_line")oe({x:Ne.x1,y:Ne.y1},0,0),oe({x:Ne.x2,y:Ne.y2},0,0);else if(Ne.type==="pcb_cutout"){const le=Ne;le.shape==="rect"?oe(le.center,le.width,le.height):le.shape==="circle"?oe(le.center,le.radius*2,le.radius*2):le.shape==="polygon"&&Oe(le.points)}}}function Y3n({elm:n,circuitJson:e,ctx:t}){switch(n.type){case"pcb_trace_error":return S3n(n,e,t).filter(Boolean);case"pcb_component":return V3n(n,t).filter(Boolean);case"pcb_trace":return L3n(n,t);case"pcb_copper_pour":return H3n(n,t);case"pcb_plated_hole":return A3n(n,t).filter(Boolean);case"pcb_hole":return $3n(n,t);case"pcb_smtpad":return D3n(n,t);case"pcb_silkscreen_text":return P3n(n,t);case"pcb_silkscreen_rect":return R3n(n,t);case"pcb_silkscreen_circle":return I3n(n,t);case"pcb_silkscreen_line":return k3n(n,t);case"pcb_fabrication_note_path":return T3n(n,t);case"pcb_fabrication_note_text":return M3n(n,t);case"pcb_silkscreen_path":return C3n(n,t);case"pcb_board":return t.drawPaddingOutsideBoard?int(n,t):[];case"pcb_via":return z3n(n,t);case"pcb_cutout":return j3n(n,t);default:return[]}}function q3n(n,e,t,i,r){const[o,s]=Yt(n,[e,t]),[a,c]=Yt(n,[i,r]),l=Math.abs(a-o),u=Math.abs(c-s),d=Math.min(o,a),h=Math.min(s,c);return{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-boundary",fill:"none",stroke:"#fff","stroke-width":"0.3",x:d.toString(),y:h.toString(),width:l.toString(),height:u.toString()}}}var X3n=ege,uV={fill:"none",stroke:"rgb(0,0,0)",strokeOpacity:"0.8",strokeWidthFactor:.2};function W3n(n,e,t={}){const{width:i,height:r,center:o,outline:s}=n;let a;if(s&&Array.isArray(s)&&s.length>=3)a=s.map((c,l)=>{const[u,d]=Yt(e,[c.x,c.y]);return l===0?`M ${u} ${d}`:`L ${u} ${d}`}).join(" ");else{const c=i/2,l=r/2,u=Yt(e,[o.x-c,o.y-l]),d=Yt(e,[o.x+c,o.y-l]),h=Yt(e,[o.x+c,o.y+l]),p=Yt(e,[o.x-c,o.y+l]);a=`M ${u[0]} ${u[1]} L ${d[0]} ${d[1]} L ${h[0]} ${h[1]} L ${p[0]} ${p[1]}`}return a+=" Z",[{name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-board",d:a,fill:t.fill??uV.fill,stroke:t.stroke??uV.stroke,"stroke-opacity":t.strokeOpacity??uV.strokeOpacity,"stroke-width":((t.strokeWidthFactor??uV.strokeWidthFactor)*Math.abs(e.a)).toString()}}]}var Z3n={pin_number:.15,negated_pin_number:.15*.8,reference_designator:.18,manufacturer_number:.18,net_label:.18,error:.05},jR=(n,e)=>e??Z3n[n],L5=(n,e,t)=>Math.abs(n.a)*jR(e,t);function K3n(n,e){const{elm:t,portPosition:i,name:r,arePinsInterchangeable:o}=n,{transform:s}=e,{center:a,width:c,height:l,rotation:u=0,layer:d="top"}=t;if(!a||typeof c!="number"||typeof l!="number")return null;const[h,p]=Yt(s,[a.x,a.y]),[m,y]=Yt(s,[i.x,i.y]),g=c*Math.abs(s.a),x=l*Math.abs(s.d),v=y>p,w=m<h,T=[Q3n(g,x,u,d),J3n(g,x,r??"")];return o||T.push(eMn(g,x,u,d,v,w)),{name:"g",type:"element",value:"",attributes:{transform:`translate(${h}, ${p}) scale(1, -1)`},children:T}}function Q3n(n,e,t,i){const r=n/2,o=e/2;return{name:"path",type:"element",attributes:{class:"assembly-component",d:tMn(r,o,t),"stroke-width":.8.toFixed(2),transform:`rotate(${-t})`,"stroke-dasharray":i==="bottom"?"2,2":""},value:"",children:[]}}function J3n(n,e,t,i){const r=Math.min(n,e),c=Math.min(58,Math.max(3,r*.8)),l=e>n;return{name:"text",type:"element",attributes:{x:"0",y:"0",class:"assembly-component-label","text-anchor":"middle",dy:".10em",style:"pointer-events: none","font-size":`${c.toFixed(1)}px`,transform:l?"rotate(90) scale(1, -1)":"scale(1, -1)"},children:[{type:"text",value:t||"",name:"",attributes:{},children:[]}],value:""}}function eMn(n,e,t,i,r,o){const s=n/2,a=e/2,c=Math.min(s,a)*.5;let l;return r&&o?l=[[-s,-a],[-s+c,-a],[-s,-a+c]]:r&&!o?l=[[s,-a],[s-c,-a],[s,-a+c]]:!r&&o?l=[[-s,a],[-s+c,a],[-s,a-c]]:l=[[s,a],[s-c,a],[s,a-c]],{name:"polygon",type:"element",attributes:{class:"assembly-pin1-indicator",points:l.map(d=>d.join(",")).join(" "),fill:"#333",stroke:"none",transform:`rotate(${-t})`},value:"",children:[]}}function tMn(n,e,t){const i=(a,c,l)=>{const u=Math.PI/180*l,d=Math.cos(u),h=Math.sin(u);return[a*d-c*h,a*h+c*d]};return`${[[-n,-e],[n,-e],[n,e],[-n,e]].map(([a,c])=>i(a,c,t)).map(([a,c],l)=>l===0?`M${a},${c}`:`L${a},${c}`).join(" ")} Z`}var tge="rgb(190, 190, 190)";function nMn(n,e){const{transform:t}=e,[i,r]=Yt(t,[n.x,n.y]);if(n.hole_shape==="circle"||n.hole_shape==="square"){const o=n.hole_diameter*Math.abs(t.a),s=o/2;return n.hole_shape==="circle"?[{name:"circle",type:"element",attributes:{class:"assembly-hole",cx:i.toString(),cy:r.toString(),r:s.toString(),fill:tge},children:[],value:""}]:[{name:"rect",type:"element",attributes:{class:"assembly-hole",x:(i-s).toString(),y:(r-s).toString(),width:o.toString(),height:o.toString(),fill:tge},children:[],value:""}]}if(n.hole_shape==="oval"){const o=n.hole_width*Math.abs(t.a),s=n.hole_height*Math.abs(t.a),a=o/2,c=s/2;return[{name:"ellipse",type:"element",attributes:{class:"assembly-hole",cx:i.toString(),cy:r.toString(),rx:a.toString(),ry:c.toString(),fill:tge},children:[],value:""}]}return[]}var H6="rgb(210, 210, 210)",V6="rgb(190, 190, 190)";function iMn(n,e){const{transform:t}=e,[i,r]=Yt(t,[n.x,n.y]);if(n.shape==="pill"){const o=n.outer_width*Math.abs(t.a),s=n.outer_height*Math.abs(t.a),a=n.hole_width*Math.abs(t.a),c=n.hole_height*Math.abs(t.a),l=o/2,u=s-o,d=a/2;return[{name:"g",type:"element",children:[{name:"path",type:"element",attributes:{class:"assembly-hole-outer",fill:H6,d:`M${i-l},${r-u/2} v${u} a${l},${l} 0 0 0 ${o},0 v-${u} a${l},${l} 0 0 0 -${o},0 z`},value:"",children:[]},{name:"path",type:"element",attributes:{class:"assembly-hole-inner",fill:V6,d:`M${i-d},${r-(c-a)/2} v${c-a} a${d},${d} 0 0 0 ${a},0 v-${c-a} a${d},${d} 0 0 0 -${a},0 z`},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="circle"){const o=n.outer_diameter*Math.abs(t.a),s=n.outer_diameter*Math.abs(t.a),a=n.hole_diameter*Math.abs(t.a),c=n.hole_diameter*Math.abs(t.a),l=Math.min(o,s)/2,u=Math.min(a,c)/2;return[{name:"g",type:"element",children:[{name:"circle",type:"element",attributes:{class:"assembly-hole-outer",fill:H6,cx:i.toString(),cy:r.toString(),r:l.toString()},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"assembly-hole-inner",fill:V6,cx:i.toString(),cy:r.toString(),r:u.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="circular_hole_with_rect_pad"){const o=n,s=o.hole_diameter*Math.abs(t.a),a=o.rect_pad_width*Math.abs(t.a),c=o.rect_pad_height*Math.abs(t.a),l=(o.rect_border_radius??0)*Math.abs(t.a),u=s/2,[d,h]=Yt(t,[o.x+o.hole_offset_x,o.y+o.hole_offset_y]);return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"assembly-hole-outer-pad",fill:H6,x:(i-a/2).toString(),y:(r-c/2).toString(),width:a.toString(),height:c.toString(),...l?{rx:l.toString(),ry:l.toString()}:{}},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"assembly-hole-inner",fill:V6,cx:d.toString(),cy:h.toString(),r:u.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="pill_hole_with_rect_pad"){const o=n,s=o.rect_pad_width*Math.abs(t.a),a=o.rect_pad_height*Math.abs(t.a),c=(o.rect_border_radius??0)*Math.abs(t.a),l=o.hole_height*Math.abs(t.a),u=o.hole_width*Math.abs(t.a),d=o,h=d.hole_offset_x??0,p=d.hole_offset_y??0,[m,y]=Yt(t,[o.x+h,o.y+p]),g=Math.min(l,u)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"assembly-hole-outer-pad",fill:H6,x:(i-s/2).toString(),y:(r-a/2).toString(),width:s.toString(),height:a.toString(),...c?{rx:c.toString(),ry:c.toString()}:{}},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"assembly-hole-inner",fill:V6,x:(m-u/2).toString(),y:(y-l/2).toString(),width:u.toString(),height:l.toString(),rx:g.toString(),ry:g.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(n.shape==="rotated_pill_hole_with_rect_pad"){const o=n,s=o.rect_pad_width*Math.abs(t.a),a=o.rect_pad_height*Math.abs(t.a),c=(o.rect_border_radius??0)*Math.abs(t.a),l=o.hole_height*Math.abs(t.a),u=o.hole_width*Math.abs(t.a),d=o,h=d.hole_offset_x??0,p=d.hole_offset_y??0,[m,y]=Yt(t,[o.x+h,o.y+p]),g=Math.min(l,u)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"assembly-hole-outer-pad",fill:H6,x:(-s/2).toString(),y:(-a/2).toString(),width:s.toString(),height:a.toString(),transform:`translate(${i} ${r}) rotate(${-o.rect_ccw_rotation})`,...c?{rx:c.toString(),ry:c.toString()}:{}},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"assembly-hole-inner",fill:V6,x:(-u/2).toString(),y:(-l/2).toString(),width:u.toString(),height:l.toString(),rx:g.toString(),ry:g.toString(),transform:`translate(${m} ${y}) rotate(${-o.hole_ccw_rotation})`},value:"",children:[]}],value:"",attributes:{}}]}return[]}var G6="rgb(210, 210, 210)";function rMn(n,e){const{transform:t}=e;if(n.shape==="rect"||n.shape==="rotated_rect"){const i=n.width*Math.abs(t.a),r=n.height*Math.abs(t.d),[o,s]=Yt(t,[n.x,n.y]),a=(n.rect_border_radius??0)*Math.abs(t.a);return n.shape==="rotated_rect"&&n.ccw_rotation?[{name:"rect",type:"element",attributes:{class:"assembly-pad",fill:G6,x:(-i/2).toString(),y:(-r/2).toString(),width:i.toString(),height:r.toString(),transform:`translate(${o} ${s}) rotate(${-n.ccw_rotation})`,"data-layer":n.layer,...a?{rx:a.toString(),ry:a.toString()}:{}},value:"",children:[]}]:[{name:"rect",type:"element",attributes:{class:"assembly-pad",fill:G6,x:(o-i/2).toString(),y:(s-r/2).toString(),width:i.toString(),height:r.toString(),"data-layer":n.layer,...a?{rx:a.toString(),ry:a.toString()}:{}},value:"",children:[]}]}if(n.shape==="pill"){const i=n.width*Math.abs(t.a),r=n.height*Math.abs(t.d),o=n.radius*Math.abs(t.a),[s,a]=Yt(t,[n.x,n.y]);return[{name:"rect",type:"element",attributes:{class:"assembly-pad",fill:G6,x:(s-i/2).toString(),y:(a-r/2).toString(),width:i.toString(),height:r.toString(),rx:o.toString(),ry:o.toString(),"data-layer":n.layer},value:"",children:[]}]}if(n.shape==="circle"){const i=n.radius*Math.abs(t.a),[r,o]=Yt(t,[n.x,n.y]);return[{name:"circle",type:"element",attributes:{class:"assembly-pad",fill:G6,cx:r.toString(),cy:o.toString(),r:i.toString(),"data-layer":n.layer},value:"",children:[]}]}if(n.shape==="polygon"){const i=(n.points??[]).map(r=>Yt(t,[r.x,r.y]));return[{name:"polygon",type:"element",attributes:{class:"assembly-pad",fill:G6,points:i.map(r=>r.join(",")).join(" "),"data-layer":n.layer},value:"",children:[]}]}return[]}var snt=["pcb_component","pcb_smtpad","pcb_hole","pcb_plated_hole","pcb_board"];function ant(n,e){let t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(const P of n)if(P.type==="pcb_board"){const R=P.center,M=P.width||0,I=P.height||0;t=Math.min(t,R.x-M/2),i=Math.min(i,R.y-I/2),r=Math.max(r,R.x+M/2),o=Math.max(o,R.y+I/2)}const s=1,a=r-t+2*s,c=o-i+2*s,l=e?.width??800,u=e?.height??600,d=l/a,h=u/c,p=Math.min(d,h),m=(l-a*p)/2,y=(u-c*p)/2,g=as(vs(m-t*p+s*p,u-y+i*p-s*p),Ey(p,-p)),x={transform:g},v=n.sort((P,R)=>(snt.indexOf(R.type)??9999)-(snt.indexOf(P.type)??9999)).flatMap(P=>oMn(P,x,n)),w=UR(n),T=BR,k={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",width:l.toString(),height:u.toString(),...w&&{"data-software-used-string":w},...e?.includeVersion&&{"data-circuit-to-svg-version":T}},value:"",children:[{name:"style",type:"element",children:[{type:"text",value:`
|
|
5368
5368
|
.assembly-component {
|
|
5369
5369
|
fill: none;
|
|
@@ -5608,7 +5608,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}}),_xe={};CIn(_xe,{all_layers:()=>qxe
|
|
|
5608
5608
|
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
|
5609
5609
|
* Released under the MIT License.
|
|
5610
5610
|
*)
|
|
5611
|
-
*/const e6n=({containerClassName:n,...e})=>{const t=xe.useRef(null),[i,r]=xe.useState(620);return xe.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),he.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:he.jsx(JOn,{...e,height:i})})},t6n='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[400px\\]{width:400px}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[400px\\]{min-width:400px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[100px\\]{max-width:100px}.rf-max-w-\\[120px\\]{max-width:120px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[400px\\]{max-width:400px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.\\!rf-overflow-x-auto{overflow-x:auto!important}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',MG=()=>{xe.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=t6n,document.head.appendChild(e)},[])},n6n=n=>{xe.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},Xat=n=>`hsl(${ow.indexOf(n)*137.5%360}, 70%, 50%)`,i6n=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return he.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[he.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:ow.map(t=>{const i=n[t]||0,r=i/e*100;return he.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:Xat(t)},children:he.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),he.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},r6n=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=xe.useState("chronological"),[r,o]=xe.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return he.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[he.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&he.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[he.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>he.jsx("option",{value:l.value,children:l.label},l.value))}),he.jsx(C0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>ow.indexOf(l[0])-ow.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return he.jsxs("div",{className:"rf-bg-white",children:[he.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[he.jsx("div",{children:"Render Logs"}),he.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&he.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[he.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>he.jsx("option",{value:l.value,children:l.label},l.value))}),he.jsx(C0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),he.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:he.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=new Blob([u.content],{type:"text/plain"}),h=URL.createObjectURL(d),p=document.createElement("a");p.href=h,p.download=`debug-${u.name}.txt`,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(h)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[he.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>he.jsx("option",{value:l.name,children:l.name},l.name))]})}),he.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[he.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),he.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[he.jsx("option",{value:"chronological",children:"Phase Order"}),he.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),he.jsx(i6n,{phaseTimings:n.phaseTimings}),he.jsxs("table",{className:"rf-w-full rf-text-xs",children:[he.jsx("thead",{children:he.jsxs("tr",{children:[he.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),he.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),he.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),he.jsx("tbody",{children:a.map(([l,u])=>he.jsxs("tr",{children:[he.jsx("td",{className:"rf-p-2",children:ow.indexOf(l)}),he.jsx("td",{className:"rf-p-2",children:l}),he.jsx("td",{className:"rf-p-2",children:he.jsx("div",{className:"rf-w-8",children:he.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:Xat(l),width:`${u/c*100}%`}})})}),he.jsx("td",{className:"rf-p-2",children:he.jsxs("div",{className:"rf-flex w-full",children:[he.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),he.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},Wat=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{xe.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{RB.captureException(i)}catch{}}},[n,e]),xe.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{RB.captureException(r,{error_type:i.type})}catch{}}},[t])},o6n="0.0.1056";function Zat(n,e){const[t,i]=xe.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return xe.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const AG=DLe()(zLe(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),s6n=n=>{const[e,t]=xe.useState([]),[i,r]=xe.useState(null),[o,s]=xe.useState(""),[a,c]=Zat("eval-version-selection",null),l=AG(p=>p.setLastRunEvalVersion),u=AG(p=>p.lastRunEvalVersion);return xe.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{if(Array.isArray(p?.versions)){let m=[...p.versions];p.tags?.latest&&(r(p.tags.latest),m=m.filter(y=>y!==p.tags.latest)),t(m)}}).catch(()=>{})},[n]),xe.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:xe.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},a6n=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=xe.useState(""),[s,a]=xe.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return he.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:he.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[he.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),he.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),he.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>he.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&he.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),he.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[he.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),he.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},c6n=n=>{const e=xe.useRef(null),t=Tb(i=>i.recentEvents);xe.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var CG="Dialog",[Kat,Qat]=$E(CG),[l6n,Z2]=Kat(CG),Jat=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=xe.useRef(null),c=xe.useRef(null),[l,u]=iC({prop:i,defaultProp:r??!1,onChange:o,caller:CG});return he.jsx(l6n,{scope:e,triggerRef:a,contentRef:c,contentId:Hv(),titleId:Hv(),descriptionId:Hv(),open:l,onOpenChange:u,onOpenToggle:xe.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};Jat.displayName=CG;var ect="DialogTrigger",tct=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(ect,t),o=H_(e,r.triggerRef);return he.jsx(du.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":o1e(r.open),...i,ref:o,onClick:ca(n.onClick,r.onOpenToggle)})});tct.displayName=ect;var i1e="DialogPortal",[u6n,nct]=Kat(i1e,{forceMount:void 0}),ict=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=Z2(i1e,e);return he.jsx(u6n,{scope:e,forceMount:t,children:xe.Children.map(i,s=>he.jsx(US,{present:t||o.open,children:he.jsx(qH,{asChild:!0,container:r,children:s})}))})};ict.displayName=i1e;var PG="DialogOverlay",rct=xe.forwardRef((n,e)=>{const t=nct(PG,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=Z2(PG,n.__scopeDialog);return o.modal?he.jsx(US,{present:i||o.open,children:he.jsx(h6n,{...r,ref:e})}):null});rct.displayName=PG;var d6n=nC("DialogOverlay.RemoveScroll"),h6n=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(PG,t);return he.jsx(tV,{as:d6n,allowPinchZoom:!0,shards:[r.contentRef],children:he.jsx(du.div,{"data-state":o1e(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),u4="DialogContent",oct=xe.forwardRef((n,e)=>{const t=nct(u4,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=Z2(u4,n.__scopeDialog);return he.jsx(US,{present:i||o.open,children:o.modal?he.jsx(p6n,{...r,ref:e}):he.jsx(f6n,{...r,ref:e})})});oct.displayName=u4;var p6n=xe.forwardRef((n,e)=>{const t=Z2(u4,n.__scopeDialog),i=xe.useRef(null),r=H_(e,t.contentRef,i);return xe.useEffect(()=>{const o=i.current;if(o)return Dye(o)},[]),he.jsx(sct,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ca(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:ca(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ca(n.onFocusOutside,o=>o.preventDefault())})}),f6n=xe.forwardRef((n,e)=>{const t=Z2(u4,n.__scopeDialog),i=xe.useRef(!1),r=xe.useRef(!1);return he.jsx(sct,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),sct=xe.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=Z2(u4,t),c=xe.useRef(null),l=H_(e,c);return yye(),he.jsxs(he.Fragment,{children:[he.jsx(LH,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:he.jsx(OH,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":o1e(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),he.jsxs(he.Fragment,{children:[he.jsx(_6n,{titleId:a.titleId}),he.jsx(g6n,{contentRef:c,descriptionId:a.descriptionId})]})]})}),r1e="DialogTitle",act=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(r1e,t);return he.jsx(du.h2,{id:r.titleId,...i,ref:e})});act.displayName=r1e;var cct="DialogDescription",lct=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(cct,t);return he.jsx(du.p,{id:r.descriptionId,...i,ref:e})});lct.displayName=cct;var uct="DialogClose",dct=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(uct,t);return he.jsx(du.button,{type:"button",...i,ref:e,onClick:ca(n.onClick,()=>r.onOpenChange(!1))})});dct.displayName=uct;function o1e(n){return n?"open":"closed"}var hct="DialogTitleWarning",[m6n,pct]=UXt(hct,{contentName:u4,titleName:r1e,docsSlug:"dialog"}),_6n=({titleId:n})=>{const e=pct(hct),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5611
|
+
*/const e6n=({containerClassName:n,...e})=>{const t=xe.useRef(null),[i,r]=xe.useState(620);return xe.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),he.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:he.jsx(JOn,{...e,height:i})})},t6n='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[400px\\]{width:400px}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[400px\\]{min-width:400px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[100px\\]{max-width:100px}.rf-max-w-\\[120px\\]{max-width:120px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[400px\\]{max-width:400px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.\\!rf-overflow-x-auto{overflow-x:auto!important}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',MG=()=>{xe.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=t6n,document.head.appendChild(e)},[])},n6n=n=>{xe.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},Xat=n=>`hsl(${ow.indexOf(n)*137.5%360}, 70%, 50%)`,i6n=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return he.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[he.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:ow.map(t=>{const i=n[t]||0,r=i/e*100;return he.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:Xat(t)},children:he.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),he.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},r6n=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=xe.useState("chronological"),[r,o]=xe.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return he.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[he.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&he.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[he.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>he.jsx("option",{value:l.value,children:l.label},l.value))}),he.jsx(C0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>ow.indexOf(l[0])-ow.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return he.jsxs("div",{className:"rf-bg-white",children:[he.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[he.jsx("div",{children:"Render Logs"}),he.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&he.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[he.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>he.jsx("option",{value:l.value,children:l.label},l.value))}),he.jsx(C0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),he.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:he.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=new Blob([u.content],{type:"text/plain"}),h=URL.createObjectURL(d),p=document.createElement("a");p.href=h,p.download=`debug-${u.name}.txt`,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(h)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[he.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>he.jsx("option",{value:l.name,children:l.name},l.name))]})}),he.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[he.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),he.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[he.jsx("option",{value:"chronological",children:"Phase Order"}),he.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),he.jsx(i6n,{phaseTimings:n.phaseTimings}),he.jsxs("table",{className:"rf-w-full rf-text-xs",children:[he.jsx("thead",{children:he.jsxs("tr",{children:[he.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),he.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),he.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),he.jsx("tbody",{children:a.map(([l,u])=>he.jsxs("tr",{children:[he.jsx("td",{className:"rf-p-2",children:ow.indexOf(l)}),he.jsx("td",{className:"rf-p-2",children:l}),he.jsx("td",{className:"rf-p-2",children:he.jsx("div",{className:"rf-w-8",children:he.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:Xat(l),width:`${u/c*100}%`}})})}),he.jsx("td",{className:"rf-p-2",children:he.jsxs("div",{className:"rf-flex w-full",children:[he.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),he.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},Wat=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{xe.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{RB.captureException(i)}catch{}}},[n,e]),xe.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{RB.captureException(r,{error_type:i.type})}catch{}}},[t])},o6n="0.0.1058";function Zat(n,e){const[t,i]=xe.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return xe.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const AG=DLe()(zLe(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),s6n=n=>{const[e,t]=xe.useState([]),[i,r]=xe.useState(null),[o,s]=xe.useState(""),[a,c]=Zat("eval-version-selection",null),l=AG(p=>p.setLastRunEvalVersion),u=AG(p=>p.lastRunEvalVersion);return xe.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{if(Array.isArray(p?.versions)){let m=[...p.versions];p.tags?.latest&&(r(p.tags.latest),m=m.filter(y=>y!==p.tags.latest)),t(m)}}).catch(()=>{})},[n]),xe.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:xe.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},a6n=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=xe.useState(""),[s,a]=xe.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return he.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:he.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[he.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),he.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),he.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>he.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&he.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),he.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[he.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),he.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},c6n=n=>{const e=xe.useRef(null),t=Tb(i=>i.recentEvents);xe.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var CG="Dialog",[Kat,Qat]=$E(CG),[l6n,Z2]=Kat(CG),Jat=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=xe.useRef(null),c=xe.useRef(null),[l,u]=iC({prop:i,defaultProp:r??!1,onChange:o,caller:CG});return he.jsx(l6n,{scope:e,triggerRef:a,contentRef:c,contentId:Hv(),titleId:Hv(),descriptionId:Hv(),open:l,onOpenChange:u,onOpenToggle:xe.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};Jat.displayName=CG;var ect="DialogTrigger",tct=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(ect,t),o=H_(e,r.triggerRef);return he.jsx(du.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":o1e(r.open),...i,ref:o,onClick:ca(n.onClick,r.onOpenToggle)})});tct.displayName=ect;var i1e="DialogPortal",[u6n,nct]=Kat(i1e,{forceMount:void 0}),ict=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=Z2(i1e,e);return he.jsx(u6n,{scope:e,forceMount:t,children:xe.Children.map(i,s=>he.jsx(US,{present:t||o.open,children:he.jsx(qH,{asChild:!0,container:r,children:s})}))})};ict.displayName=i1e;var PG="DialogOverlay",rct=xe.forwardRef((n,e)=>{const t=nct(PG,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=Z2(PG,n.__scopeDialog);return o.modal?he.jsx(US,{present:i||o.open,children:he.jsx(h6n,{...r,ref:e})}):null});rct.displayName=PG;var d6n=nC("DialogOverlay.RemoveScroll"),h6n=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(PG,t);return he.jsx(tV,{as:d6n,allowPinchZoom:!0,shards:[r.contentRef],children:he.jsx(du.div,{"data-state":o1e(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),u4="DialogContent",oct=xe.forwardRef((n,e)=>{const t=nct(u4,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=Z2(u4,n.__scopeDialog);return he.jsx(US,{present:i||o.open,children:o.modal?he.jsx(p6n,{...r,ref:e}):he.jsx(f6n,{...r,ref:e})})});oct.displayName=u4;var p6n=xe.forwardRef((n,e)=>{const t=Z2(u4,n.__scopeDialog),i=xe.useRef(null),r=H_(e,t.contentRef,i);return xe.useEffect(()=>{const o=i.current;if(o)return Dye(o)},[]),he.jsx(sct,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ca(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:ca(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ca(n.onFocusOutside,o=>o.preventDefault())})}),f6n=xe.forwardRef((n,e)=>{const t=Z2(u4,n.__scopeDialog),i=xe.useRef(!1),r=xe.useRef(!1);return he.jsx(sct,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),sct=xe.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=Z2(u4,t),c=xe.useRef(null),l=H_(e,c);return yye(),he.jsxs(he.Fragment,{children:[he.jsx(LH,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:he.jsx(OH,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":o1e(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),he.jsxs(he.Fragment,{children:[he.jsx(_6n,{titleId:a.titleId}),he.jsx(g6n,{contentRef:c,descriptionId:a.descriptionId})]})]})}),r1e="DialogTitle",act=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(r1e,t);return he.jsx(du.h2,{id:r.titleId,...i,ref:e})});act.displayName=r1e;var cct="DialogDescription",lct=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(cct,t);return he.jsx(du.p,{id:r.descriptionId,...i,ref:e})});lct.displayName=cct;var uct="DialogClose",dct=xe.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=Z2(uct,t);return he.jsx(du.button,{type:"button",...i,ref:e,onClick:ca(n.onClick,()=>r.onOpenChange(!1))})});dct.displayName=uct;function o1e(n){return n?"open":"closed"}var hct="DialogTitleWarning",[m6n,pct]=UXt(hct,{contentName:u4,titleName:r1e,docsSlug:"dialog"}),_6n=({titleId:n})=>{const e=pct(hct),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5612
5612
|
|
|
5613
5613
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5614
5614
|
|